[WIP] On IValue
to IAction
dispatch
#3133
greymistcube
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Definitions
Let$\mathbb{N}$ be the set of all block indices, $\mathbb{S}$ be the set of all $\mathbb{T}$ be the set of all $X_{\mathbb{T}}$ to be the set of all instances of $\mathbb{T}$ .
IValue
s, andtype
s, includingnull
for the undefinedtype
. Furthermore, we definetype
s inMaps
We define
TypeLoad
function to be a mapWe can define
Instantiate
function to be a mapWe also define
Bencoding
function to be a mapThen we want the following properties:
type
of
type
IValue
with indexof
type
IValue
must beIValue
for some instanceis some index
Preliminary Analysis
Although the maps$\Sigma, \Phi$ , and $\Gamma$ may be arbitrary, what we really want is $\Sigma$ to schematically map to $\mathbb{T}$ .
For example, we can have
Integer
, map totype
Text
, map totype
However, it is lot more practical to have$t$ itself have the information required so that
type
TypeLoad
function is intuitively defined.Hence, we further require$\mathbb{T}$ to have the following property:
To make use of this, we also need to require every$s \in \mathbb{S}$ to have include $e(t)$ schematically. This is currently semi-enforced by the usage of
IValue
type_id
field in the codebase1.So we also require$\mathbb{S}$ to have the following property:
type
IValue
Footnotes
This forces $s$ to be a
Dictionary
with atype_id
field. Sadly, for backward compatibility, this must be supported going onwards. ↩Beta Was this translation helpful? Give feedback.
All reactions