Skip to content
Snippets Groups Projects
Commit e606c07c authored by Loïc Correnson's avatar Loïc Correnson
Browse files

[eva] export evaluation and condition reductions

parent 8cdc9daf
No related branches found
No related tags found
No related merge requests found
......@@ -40,10 +40,11 @@ module type Results = sig
val eval_lval_to_loc: state -> lval -> location evaluated
val eval_function_exp:
state -> ?args:exp list -> exp -> kernel_function list evaluated
val assume_cond : stmt -> state -> exp -> bool -> state or_bottom
end
module type S = sig
include Abstractions.S
include Abstractions.Eva
include Results with type state := Dom.state
and type value := Val.t
and type location := Loc.location
......@@ -95,6 +96,11 @@ module Make (Abstract: Abstractions.S) = struct
let eval_function_exp state ?args e =
Eval.eval_function_exp e ?args state >>=: (List.map fst)
let assume_cond stmt state cond positive =
fst (Eval.reduce state cond positive) >>- fun valuation ->
let dval = Eval.to_domain_valuation valuation in
Dom.assume stmt cond positive dval state
end
......
......@@ -40,6 +40,7 @@ module type Results = sig
val eval_lval_to_loc: state -> lval -> location evaluated
val eval_function_exp:
state -> ?args:exp list -> exp -> kernel_function list evaluated
val assume_cond : stmt -> state -> exp -> bool -> state or_bottom
end
......@@ -55,7 +56,7 @@ end
module type S = sig
include Abstractions.S
include Abstractions.Eva
include Results with type state := Dom.state
and type value := Val.t
and type location := Loc.location
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment