package binsec
Install
dune-project
Dependency
Authors
-
AAdel Djoudi
-
BBenjamin Farinier
-
CChakib Foulani
-
DDorian Lesbre
-
FFrédéric Recoules
-
GGuillaume Girol
-
JJosselin Feist
-
LLesly-Ann Daniel
-
MMahmudul Faisal Al Ameen
-
MManh-Dung Nguyen
-
MMathéo Vergnolle
-
MMathilde Ollivier
-
MMatthieu Lemerre
-
NNicolas Bellec
-
OOlivier Nicole
-
RRichard Bonichon
-
RRobin David
-
SSébastien Bardin
-
SSoline Ducousso
-
TTa Thanh Dinh
-
YYaëlle Vinçont
-
YYanis Sellami
Maintainers
Sources
sha256=4cf70a0367fef6f33ee3165f05255914513ea0539b94ddfef0bd46fc9b42fa8a
sha512=cd67a5b7617f661a7786bef0c828ee55307cef5260dfecbb700a618be795d81b1ac49fc1a18c4904fd2eb8a182dc862b0159093028651e78e7dc743f5babf9e3
doc/binsec_sse_stake/Binsec_sse_stake/Builtin/argument-2-E/Path/State/index.html
Module Path.State
type t = stateA symbolic state.
module Uid : Binsec_symbolic.State.UIDinclude Binsec_symbolic.State.DATA with type t := t and type value := Value.t
val 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 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.