Native.StaticBackendSourceThe runtime values that the interpreter should use.
is_undetermined v returns true when c is a non-constant value
v_of_parsed_v constructs a value from a parsed value. Note that the prefered method to create records or any complex values is create_vector, and should be used for constructing complex values.
v_of_int is used to convert raw integers arising from the interpretation, and not parsed values.
v_to_z v returns, if possible, an integer corresponding to the value. Should be called only on values of type integer.
v_to_label v returns the identifier of the label nested in the literal inside v. Should be called only on values of type NV_Literal where the literal is of type L_Label.
Main monad type to chain operations done by the interpreter.
Monadic bind operation, used when data from the first operation is needed to compute the second operation.
Monadic bind operation, but that only passes internal interpreter data. This should not create any data-dependency.
Monadic bind operation, but that creates a control dependency between the first argument and the result of the second one.
Monadic product operation, two monads are combined "in parallel".
Applicative map.
Creates a data dependency between the output events and the input events of the argument in the resulting monad.
delay operator spits monad into result 'a and hidden structure. This permits deciding on the monad value, while using hidden structure later
Special operations with vectors
Creates a record, with the indicated names.
Creates an exception, with the indicated names.
set_i i v vec returns vec with index i replaced by v.
get_field "foo" v is the value mapped by "foo" in the record v.
set_field "foo" v record is record with "foo" mapping to v.
Other operations
v_unknown_of_type ~eval_expr_sef t constructs an arbitrary value from a type.
Evaluates the binary operation on those two values.
ternary v w1 w2 is w1 if v is true and w2 if v is false
on_read_identifier is called when a value is read from the local environment.
on_write_identifier is called when a value is read from the local environment.
Represents a range by its first accessed index and its length.
Read a slice (represented by a list of value ranges) from a bitvector.
write_to_bitvector value_ranges w v writes the bits of w into v at the positions specified by value_range.
Similar to Bitvector.concat, but monadic style obviously.
primitive types that go with this AST. First argument is list of parameters, second argument is list of arguments.