Run._module Uid : Binsec_symbolic.State.UIDmodule Value : Binsec_symbolic.State.VALUE with type id = Uid.tinclude Binsec_symbolic.State.DATA with type t := t and type value := Value.tval lookup : Binsec_kernel.Dba.Var.t -> t -> Value.tlookup var s returns the value assigned to var in s.
val read :
addr:Value.t ->
int ->
Binsec_kernel.Machine.endianness ->
t ->
Value.t * tread ~addr len d s returns len bytes of the value stored at address addr in the main memory array @, together with the updated state s. The byte order is determined by the endianness d.
val select :
string ->
addr:Value.t ->
int ->
Binsec_kernel.Machine.endianness ->
t ->
Value.t * tselect m ~addr len d s returns len bytes of the value stored at address addr in the memory array m, together with the updated state s. The byte order is determined by the endianness d.
val empty : unit -> tempty creates an empty state.
val assign : Binsec_kernel.Dba.Var.t -> Value.t -> t -> tassign var v s returns a copy of s with the value v assigned to the variable var.
declare ~array idx s returns a copy of s where array is a fresh mapping between addresses of idx bits to (first-order) constant.
The None represents the main memory @ (e.g. the RAM). The functions read and write operate on @.
The Some name represents a named array. The functions select and store operate on name.
val write :
addr:Value.t ->
Value.t ->
Binsec_kernel.Machine.endianness ->
t ->
twrite ~addr v d s returns a copy of s where the value v is written at the address addr in the main memory. The byte order is determined by the endianness d.
val store :
string ->
addr:Value.t ->
Value.t ->
Binsec_kernel.Machine.endianness ->
t ->
tstore m ~addr v s returns a copy of s where the value v is stored at the address addr in the memory array m. The byte order is determined by the endianness d.
val memcpy :
string option ->
addr:Value.t ->
int ->
Binsec_kernel.Loader_types.buffer ->
t ->
tmemcpy m ~addr len content s returns a copy of s where len bytes from the zero extended buffer content are copied to the memory array m at the address addr.
assume v s returns the a copy of the state s for which the boolean condition v has been added to the path predicate.
Returns None if the state s can infer that v always evaluates to false.
is_symbolic v s checks if the value v may depend on symbolic values.
val is_zero : Value.t -> t -> Binsec_symbolic.State.trileanis_zero v s checks if v may depend on symbolic values.
It returns True when the state implies v is false and False when the state implies v is true.
Otherwise, it returns !constructor-Unknown, that means that v syntactically depends on a symbolic value.
module Model : Binsec_symbolic.State.MODEL with type value := Value.tmodule Cookie : Binsec_symbolic.State.COOKIEcheck_sat c s returns a model that satisfies the predicate of s, using the configuration stored in the cookie c.
module Enumeration :
Binsec_symbolic.State.ENUMERATION
with type value := Binsec_kernel.Bitvector.t * Model.tval enumerate :
Cookie.t ->
Value.t ->
?except:Binsec_kernel.Bitvector.t list ->
t ->
Enumeration.tenumerate c v ~except s returns a new enumeration for the value v, using the configuration stored in the cookie c.
The enumeration will not contain any Binsec_kernel.Bitvector present in except.
val print_smtlib :
?slice:(Value.t * string) list ->
Format.formatter ->
t ->
unitprint_smtlib ~slice f s outputs the predicate of s in the SMTlib format in the formatter f.
If slice is given, it outputs the current mapping between values and name. Otherwise, it outputs the full mapping (variables and arrays) of s.
val pp : Format.formatter -> t -> unitpp f s outputs the state s in the formatter f.
val more :
(Value.t, t, Cookie.t, 'a) Binsec_symbolic.State.feature ->
'a optionmore feature returns Some a value of type 'a; or None if the current implementation does not support the queried feature.