package soteria
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=22e0fc3f97555ac35b96fae10817a887
sha512=10457c9d1302e3f3018dca652cdf81f0cdfd461a79eca1a8a8b754e964a47f7f35c10a8c07aff8f5193ee7e794440635d788d91925ce75fb8280b60b4f0d6663
doc/soteria/Soteria/Symex/module-type-Base/index.html
Module type Symex.Base
include Core
include Soteria.Soteria_std.Monad.Base with type 'a t := 'a t
Type of error that corresponds to a logical failure (i.e. a logical mismatch during consumption).
Use this instead of `Lfail directly in type signatures to avoid potential typos such as `LFail which will take precious time to debug... trust me.
val pp_lfail :
Ppx_deriving_runtime.Format.formatter ->
lfail ->
Ppx_deriving_runtime.unitval show_lfail : lfail -> Ppx_deriving_runtime.stringval pp_cons_fail :
Ppx_deriving_runtime.Format.formatter ->
cons_fail ->
Ppx_deriving_runtime.unitval show_cons_fail : cons_fail -> Ppx_deriving_runtime.stringval assume : Value.sbool Value.t list -> unit tval vanish : unit -> 'a tval assert_ : Value.sbool Value.t -> bool tAssert is a symbolic process that does not branch but tests for the feasibility of the input symbolic value.
- In UX,
assert_returnsfalseif and only ifnot valueis satisfiable. - In OX,
assert_returnstrueif and only ifnot valueis unsatisfiable.
simplify v simplifies the value v according to the current path condition.
val branch_on :
?left_branch_name:string ->
?right_branch_name:string ->
Value.sbool Value.t ->
then_:(unit -> 'a t) ->
else_:(unit -> 'a t) ->
'a tval if_sure :
?left_branch_name:string ->
?right_branch_name:string ->
Value.sbool Value.t ->
then_:(unit -> 'a t) ->
else_:(unit -> 'a t) ->
'a tif_sure cond ~then_ ~else_ evaluates the ~then_ branch if cond is guaranteed to hold in the current context, and otherwise evaluates ~else_.
This is to be used with caution: the ~then_ branch should always describe a behaviour that is semantically equivalent to that of the ~else_ branch when cond holds.
val branch_on_take_one :
?left_branch_name:string ->
?right_branch_name:string ->
Value.sbool Value.t ->
then_:(unit -> 'a t) ->
else_:(unit -> 'a t) ->
'a tBranches on value, and (in UX only) takes at most one branch, starting with the then branch. This means that if the then_ branch is SAT, it is taken and the else_ branch is ignored, otherwise the else_ branch is taken. In OX mode, this behaves exactly as branch_on.
val give_up : string -> 'a tGives up on this path of execution for incompleteness reason. For instance, if a give feature is unsupported.
Runs the process within a section of execution with given name. Corresponds to frames in the flamegraph.
Fuel
val consume_fuel_steps : int -> unit tval log_solver_state : level:Logs.Level.t -> unit -> unitLogs the current solver state, at the given log level
include Soteria.Soteria_std.Monad.S with type 'a t := 'a t
include Soteria_std.Monad.Extension with type 'a t := 'a t
val fold :
(module M : Soteria_std.Sigs.Foldable)
->
'elem M.t ->
init:'a ->
f:('a -> 'elem -> 'a t) ->
'a tval iter :
(module M : Soteria_std.Sigs.Foldable)
->
'elem M.t ->
f:('elem -> unit t) ->
unit tval map_m :
(module M : Soteria_std.Sigs.Foldable)
->
'elem M.t ->
f:('elem -> 'a t) ->
'a list tval assert_or_error :
Value.sbool Value.t ->
'err ->
(unit, 'err, 'f) Soteria.Soteria_std.Compo_res.t tassert_or_error guard err asserts guard is true, and otherwise returns Compo_res.Error err. Biased towards the assertion being false to reduce SAT-checks.
This is provided as a utility, and is equivalent to
branch_on (not guard)
~then_:(fun () -> return (Compo_res.error err))
~else_:(fun () -> return (Compo_res.ok ()))val some_or_give_up : string -> 'a option -> 'a tIf the given option is None, gives up execution, otherwise continues, unwrapping the option.
module Result : sig ... endmodule Syntax : sig ... endmodule Producer : sig ... endmodule Consumer : sig ... end