Make.A
include Domain_sig.Base
include Domain_sig.Minimal
include Domain_sig.Minimal_No_Boolean
include Domain_sig.With_Context
module Context : Domain_sig.Context
val root_context : unit -> Context.t
val context_pretty : Stdlib.Format.formatter -> Context.t -> unit
include Domain_sig.With_Assume
with module Context := Context
and type boolean := boolean
Corresponds to the creation of a new basic block, accessible only if the condition is met. None means bottom.
Because the transfer functions imperatively change the context, they cannot use assume, that returns a new context. Temporarily, we provide this instead (it should be applied only to fresh symbolic variables and not modify the set of valuations of the other symbolic variables. In particular, the condition must never make the context bottom).
The good long-term solution would be to make every transfer function return a new Context.t option, viewing the context as some state monad.
include Domain_sig.With_Nondet with module Context := Context
val typed_nondet2 :
Context.t ->
Context.t ->
'a Context.in_tuple ->
Context.t * 'a Context.out_tuple
val nondet_same_context :
Context.t ->
'a Context.in_tuple ->
'a Context.out_tuple
include Domain_sig.With_Fixpoint_Computation with module Context := Context
val typed_fixpoint_step :
init:Context.t ->
arg:Context.t ->
body:Context.t ->
(bool * 'a Context.in_tuple) ->
bool * (close:bool -> 'a Context.out_tuple * Context.t)
include Domain_sig.With_Boolean
with module Context := Context
and type boolean := boolean
module Boolean : Datatype_sig.S with type t = boolean
val serialize_boolean :
Context.t ->
boolean ->
Context.t ->
boolean ->
'a Context.in_acc ->
(boolean, 'a) Context.result
module Boolean_Forward :
Transfer_functions.Boolean_Forward
with module Arity := Domain_sig.Context_Arity_Forward(Context)
and type boolean := boolean
val query_boolean : Context.t -> boolean -> Lattices.Quadrivalent.t
include Domain_sig.With_Queries
with module Context := Context
and type binary := binary
and type memory := memory
module Query : sig ... end
should_focus ~size ctx mem addr
asks the domain whether it is useful to "focus" (or "unfold", i.e. try to represent precisely the memory region pointed to by addr
, as long as aliasing info ensures that it is sound) a loaded value. size
should be the size of addr
. If the answer is yes, then the returned value should contain three things about the region to focus: its base, its size (in bits) and the offset of addr
in it (in bits).
may_alias ~ptr_size ~size1 ~size2 ctx addr1 addr2
should return whether the region starting at addr1
of size size1
bytes and the region starting at addr2
of size size2
bytes may have a non-empty intersection. This function is used by focusing abstractions to discard a focused region when writing in a possibly aliased address. ptr_size
is the size in bits of both addr1
and addr2
.
include Domain_sig.With_Types
with module Context := Context
and type binary := binary
val binary_unknown_typed : size:int -> Context.t -> Types.Ctypes.typ -> binary
Returns an unknown value with a given type.
include Domain_sig.With_Binary
with module Context := Context
and type binary := binary
and type boolean := boolean
module Binary : Datatype_sig.S with type t = binary
val serialize_binary :
size:int ->
Context.t ->
binary ->
Context.t ->
binary ->
'a Context.in_acc ->
(binary, 'a) Context.result
include Domain_sig.With_Binary_Forward
with module Context := Context
and type binary := binary
and type boolean := boolean
module Binary_Forward :
Transfer_functions.Binary_Forward
with module Arity := Domain_sig.Context_Arity_Forward(Context)
and type boolean := boolean
and type binary := binary
include Domain_sig.With_Memory
with module Context := Context
and type memory := memory
and type binary := binary
and type boolean := boolean
val serialize_memory :
Context.t ->
memory ->
Context.t ->
memory ->
'a Context.in_acc ->
(memory, 'a) Context.result
include Domain_sig.With_Memory_Forward
with module Context := Context
and type memory := memory
and type binary := binary
and type boolean := boolean
module Memory_Forward :
Transfer_functions.Memory_Forward
with module Arity := Domain_sig.Context_Arity_Forward(Context)
and type boolean := boolean
and type binary := binary
and type memory := memory
val union :
Transfer_functions.Condition.t ->
Context.t ->
'a Context.in_tuple ->
'a Context.out_tuple
val satisfiable : Context.t -> boolean -> Smtbackend.Smtlib_sig.sat
val reachable : Context.t -> memory -> Smtbackend.Smtlib_sig.sat