Make.Bval debug_value : value -> stringA printer for value, should only be used for debugging.
val is_undetermined : value -> boolis_undetermined v returns true when c is a non-constant value
val v_of_literal : AST.literal -> valuev_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.
val v_of_int : int -> valuev_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.
val v_to_label : value -> stringv_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.
val return : 'a -> 'a mMonadic constructor.
val cutoffT : string -> 'a -> 'a mFlag loop unrolling pruning
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.
val commit : string option -> unit mBranching event
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
val create_record : (AST.identifier * value) list -> value mCreates a record, with the indicated names.
val create_exception : (AST.identifier * value) list -> value mCreates 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
module Scope : Backend.SCOPEval on_read_identifier : AST.identifier -> Scope.t -> value -> unit mon_read_identifier is called when a value is read from the local environment.
val on_write_identifier : AST.identifier -> Scope.t -> value -> unit mon_write_identifier is called when a value is read from the local environment.
val read_from_bitvector : value_range list -> value -> value mRead a slice (represented by a list of value ranges) from a bitvector.
val write_to_bitvector : value_range list -> value -> value -> value mwrite_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.