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.smtlib/Binsec_smtlib/Formula/Model/index.html
Module Formula.Model
Internal model representation
Model types
type address = Binsec_base.Bitvector.tval empty : tConstructors
Empty model.
val extract : Binsec_smtlib__.Smtlib.model -> textract model extracts relevant information in SMT-LIB model concerning registers and memory values. This function takes into account the various "model dialects" spoken by:
- Z3;
- CVC4;
- Boolector
val extract_value : Binsec_smtlib__.Smtlib.constant -> Binsec_base.Bitvector.textract_value value extracts the value returned by (get-value) the same * way extract returns the model returned by (get-model). * This function currently only supports bitvectors
val yices_extract : string -> tyices_extract s extracts the same information as extract but for a yices-smt2 produced model yices-smt2 models use another syntax and are parsed on their own s is expected to be the raw string of the model and not, for example, a filename
Create from scratch
val create : ?len:int -> unit -> tval add_var : t -> string -> Binsec_base.Bitvector.t -> unitval add_memcell :
t ->
Binsec_base.Bitvector.t ->
Binsec_base.Bitvector.t ->
unitval add_memory_term :
t ->
(Binsec_smtlib__.Smtlib.term * Binsec_smtlib__.Smtlib.term) list ->
unitPretty-printer
val pp : Format.formatter -> t -> unitval pp_with_sections :
(Binsec_base.Virtual_address.t -> string option) ->
Format.formatter ->
t ->
unitAccessors
val find_variable : t -> identifier -> Binsec_base.Bitvector.t optionfind_register model name finds the bitvector value of register name in the model
val find_address_contents : t -> address -> Binsec_base.Bitvector.t optionfind_address_contents model addr find the (byte-sized) value of address addr from the model.
val find_address_content :
t ->
address ->
Binsec_base.Size.Byte.t ->
Binsec_base.Machine.endianness ->
Binsec_base.Bitvector.t optionNot yet implemented
val variables : t -> identifier listget_register model gets the list of registers of this model
get_register model gets the list of addresses with specific values of this model
val memory_bindings : t -> (address * Binsec_base.Bitvector.t) arrayget_register model gets the list of pair address/value of this model
is_memory_set model address checks if the given address is present in the memory of this model
val filter :
?keep_default:bool ->
addr_p:(Binsec_base.Bitvector.t -> bool) ->
var_p:(string -> bool) ->
t ->
tfilter ?keep_default ~addr_p ~var_p model creates a new model m with the following properties:
mhas the same default value for memory adresses thanmodelifkeep_defaultistrue(default isfalse)mkeeps frommodelall addresses verifying the predicateaddr_pand all the variable names verifyingvar_p