Numeric.ClassicalQuery
Same as Classical
, but performs a few additional simplifications (removing if 0
, or x := e
when expr_forwards state (x-e)
is zero)
Its command line id is QN
include Sig.Classical_Domain
with type relation = Ast.Program.relation
and type State.t = Zs.t Ast.Program.VarMap.t
include Sig.Doc
type relation = Ast.Program.relation
program relations (edges in the CFG), typically Ast.Program.relation
module State : Std_extra.Types.TYPE with type t = Zs.t Ast.Program.VarMap.t
Abstract state
module StateSet : Std_extra.Types.SET with type elt = State.t
Set of abstract states
val join : StateSet.t -> State.t option
joins the states given as arguments
None
on emptysetval entrypoint : Ast.Program.Var.t list -> State.t
entrypoint
take the list of variables bound at the start of the program as argument, and returns the abstraction for the program entry
val join_and_widen :
Ast.Program.Loc.t ->
State.t ->
StateSet.t ->
State.t option
join_and_widen l old set
is widen loc old (join set)
Merged in a single operation as it avoids renamings in SSA.Lift
val is_included : Ast.Program.Loc.t -> State.t -> State.t -> bool
State inclusion operation used to detect convergence. This was absent from the paper
val query_truth_value :
(State.t ->
Ast.Program.VarExpr.t ->
Single_value_abstraction.Ternary.t)
option
Possible truth value of the given expression. None
when the domain provides no useful data
val query_is_constant : (State.t -> Ast.Program.VarExpr.t -> Z.t option) option
query_is_constant state expr
is Some z
only if we can prove that expr
is equal to constant z
in the given state. None
when the domain provides no useful data
val expr_forwards : State.t -> Ast.Program.VarExpr.t -> Zs.t
expr_forwards state expr
returns the best abstraction for the value of expr
in the given state
.