Module Lift.SSA_Lift

This functor generates a Classical_Domain from an SSA_Domain as described in the paper. The second parameter is used to toggle global value numbering (GVN) on or off.

Its command line id is Lift or LiftGVN.

Parameters

module _ : sig ... end

Signature

module State : sig ... end

The state contains:

include Sig.Classical_Domain with type relation = Ast.Program.relation and module State := State
include Sig.Doc
val id : string

Unique identifier for the domain, eg "N", "FA",...

val name : Stdlib.Format.formatter -> unit -> unit

Full human readable name

val state_name : string

Name of the domain's states

val doc : string

Long description of the domain

type relation = Ast.Program.relation

program relations (edges in the CFG), typically Ast.Program.relation

Set of abstract states

val apply : relation -> State.t -> State.t option

None means state is unreacheble (eg: if false ...)

  • raises Division_by_zero
val join : StateSet.t -> State.t option

joins the states given as arguments

  • None on emptyset
  • single element on singleton
val 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

Queries

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

Convert a classical expression into an SSA one, by replacing all the variables by their values in the current state