Llair.ExpExpressions
Pure (heap-independent) expressions are complex arithmetic, bitwise-logical, etc. operations over literal values and registers.
type op1 = | Signed of {}Ap1 (Signed {bits= n}, dst, arg) is arg interpreted as an n-bit signed integer and injected into the dst type. That is, it two's-complement--decodes the low n bits of the infinite two's-complement encoding of arg. The injection into dst is a no-op, so dst must be an integer type with bitwidth at least n. This expression can also be lifted to operate element-wise over arrays. When dst is an array arg must also be an array of the same length, with element types satisfying the aforementioned constraints on integer types.
| Unsigned of {}Ap1 (Unsigned {bits= n}, dst, arg) is arg interpreted as an n-bit unsigned integer and injected into the dst type. That is, it unsigned-binary--decodes the low n bits of the infinite two's-complement encoding of arg. The injection into dst is a no-op, so dst must be an integer type with bitwidth greater than n. This expression can be lifted to arrays, as described for Signed just above.
| SplatIterated concatenation of a single byte
*)| Select of intSelect an index from a record
*)val sexp_of_op1 : op1 -> Sexplib0.Sexp.tval op1_of_sexp : Sexplib0.Sexp.t -> op1type op2 = | EqEqual test
*)| DqDisequal test
*)| GtGreater-than test
*)| GeGreater-than-or-equal test
*)| LtLess-than test
*)| LeLess-than-or-equal test
*)| UgtUnsigned greater-than test
*)| UgeUnsigned greater-than-or-equal test
*)| UltUnsigned less-than test
*)| UleUnsigned less-than-or-equal test
*)| OrdOrdered test (neither arg is nan)
*)| UnoUnordered test (some arg is nan)
*)| AddAddition
*)| SubSubtraction
*)| MulMultiplication
*)| DivDivision, for integers result is truncated toward zero
*)| RemRemainder of division, satisfies a = b * div a b + rem a b and for integers rem a b has same sign as a, and |rem a b| < |b|
| UdivUnsigned division
*)| UremRemainder of unsigned division
*)| AndConjunction, boolean or bitwise
*)| OrDisjunction, boolean or bitwise
*)| XorExclusive-or, bitwise
*)| ShlShift left, bitwise
*)| LshrLogical shift right, bitwise
*)| AshrArithmetic shift right, bitwise
*)| Update of intConstant record with updated index
*)val sexp_of_op2 : op2 -> Sexplib0.Sexp.tval op2_of_sexp : Sexplib0.Sexp.t -> op2val sexp_of_op3 : op3 -> Sexplib0.Sexp.tval op3_of_sexp : Sexplib0.Sexp.t -> op3val sexp_of_opN : opN -> Sexplib0.Sexp.tval opN_of_sexp : Sexplib0.Sexp.t -> opNinclude Ppx_compare_lib.Comparable.S with type t := tval compare : t Base__Ppx_compare_lib.compareinclude Ppx_compare_lib.Equal.S with type t := tval equal : t Base__Ppx_compare_lib.equalinclude NS.Invariant.S with type t := tval invariant : t -> unitmodule Reg : sig ... endExp.Reg is re-exported as Reg
module Global : sig ... endExp.Global is re-exported as Global
module FuncName : sig ... endExp.FuncName is re-exported as FuncName
Construct
val funcname : FuncName.t -> tval label : parent:string -> name:string -> tval null : tval bool : bool -> tval true_ : tval false_ : tval float : Llair__.LlairTyp.t -> string -> tTraverse
Query
val is_true : t -> boolval is_false : t -> boolval typ_of : t -> Llair__.LlairTyp.t