Base.MainFunctormodule Priv : BasePriv.Smodule RVEval : BaseDomain.ExpEvaluator with type t = BaseComponents(Priv.D).tinclude module type of struct include Analyses.DefaultSpec endmodule P = Analyses.UnitPval asm : ('a, 'b, 'c, 'd) Analyses.ctx -> 'aval skip : ('a, 'b, 'c, 'd) Analyses.ctx -> 'aval paths_as_set : ('a, 'b, 'c, 'd) Analyses.ctx -> 'a listmodule A = Analyses.UnitAmodule Dom : sig ... endtype t = Dom.tmodule D = Dommodule C = Dommodule V : sig ... endmodule G : sig ... endtype extra = (GoblintCil.varinfo * Offs.t * bool) listtype store = D.ttype value = VD.ttype address = AD.tval startstate : 'a -> storeval exitstate : 'a -> storeval is_privglob : GoblintCil.varinfo -> boolmodule VarH : sig ... endmodule VarMap : sig ... endval array_map : GoblintCil.attributes VarMap.t VarH.t reftype marshal = GoblintCil.attributes VarMap.t VarH.tval add_to_array_map :
GoblintCil.fundec ->
(GoblintCil.varinfo * VD.t) list ->
unitval attributes_varinfo :
VarMap.key ->
GoblintCil.fundec ->
(GoblintCil.attributes * GoblintCil.attribute list) optionval project_val :
ValueDomainQueries.t ->
(GoblintCil.attributes * GoblintCil.attributes) option ->
PrecisionUtil.int_precision option ->
VD.t ->
bool ->
VD.tval project :
ValueDomainQueries.t ->
PrecisionUtil.int_precision option ->
CPA.t ->
GoblintCil.fundec ->
CPA.tval return_varstore : GoblintCil.varinfo refval return_varinfo : unit -> GoblintCil.varinfoval return_var : unit -> AD.tval return_lval : unit -> GoblintCil.lvalval longjmp_return : GoblintCil.varinfo refval heap_var : bool -> ('a, 'b, 'c, 'd) Analyses.ctx -> Basetype.Variables.tval char_array : (GoblintCil.lval, Batteries.bytes) Batteries.Hashtbl.tval init : GoblintCil.attributes VarMap.t VarH.t option -> unitval finalize : unit -> GoblintCil.attributes VarMap.t VarH.tval unop_ID : GoblintCil.unop -> ID.t -> ID.tval unop_FD : GoblintCil.unop -> FD.t -> FD.tval evalunop : GoblintCil.unop -> GoblintCil.Cil.typ -> value -> valueval binop_ID : GoblintCil.Cil.ikind -> GoblintCil.binop -> ID.t -> ID.t -> ID.tval binop_FD : GoblintCil.Cil.fkind -> GoblintCil.binop -> FD.t -> FD.t -> FD.tval int_returning_binop_FD :
GoblintCil.binop ->
FD.t ->
FD.t ->
IntDomain.IntDomTuple.tval is_int_returning_binop_FD : GoblintCil.binop -> boolval evalbinop_base :
Q.ask ->
store ->
GoblintCil.binop ->
GoblintCil.typ ->
value ->
GoblintCil.typ ->
value ->
GoblintCil.typ ->
valueval add_offset_varinfo : Addr.Offs.t -> Addr.t -> Addr.tval sync' :
[ `Init | `Join | `Normal | `Return | `Thread ] ->
(BaseDomain.BaseComponents(Priv.D).t,
[> `Bot | `Lifted1 of Priv.G.t ],
'a,
[> `Left of Priv.V.t ])
Analyses.ctx ->
D.tval sync :
(BaseDomain.BaseComponents(Priv.D).t,
[> `Bot | `Lifted1 of Priv.G.t ],
'a,
[> `Left of Priv.V.t ])
Analyses.ctx ->
[< `Init | `Join | `Normal | `Return | `Thread ] ->
D.tval publish_all :
(BaseDomain.BaseComponents(Priv.D).t,
[> `Bot | `Lifted1 of Priv.G.t ],
'a,
[> `Left of Priv.V.t ])
Analyses.ctx ->
[ `Init | `Join | `Normal | `Return | `Thread ] ->
unitval get_var : Q.ask -> glob_fun -> store -> GoblintCil.varinfo -> valueval get :
?top:VD.t ->
?full:bool ->
Q.ask ->
glob_fun ->
store ->
address ->
GoblintCil.exp option ->
valueget st addr returns the value corresponding to addr in st * adding proper dependencies. * For the exp argument it is always ok to put None. This means not using precise information about * which part of an array is involved.
val reachable_from_value :
Q.ask ->
glob_fun ->
'a ->
value ->
GoblintCil.typ ->
string ->
AD.tval context : GoblintCil.fundec -> store -> storeval reachable_top_pointers_types :
(store, G.t, 'a, V.t) Analyses.ctx ->
AD.t ->
Queries.TS.tval eval_rv_ask_evalint : Q.ask -> glob_fun -> store -> GoblintCil.exp -> VD.tEvaluate expression using EvalInt query. Base itself also answers EvalInt, so recursion goes indirectly through queries. This allows every subexpression to also meet more precise value from other analyses. Non-integer expression just delegate to next eval_rv function.
val eval_rv_no_ask_evalint :
Q.ask ->
glob_fun ->
store ->
GoblintCil.exp ->
valueEvaluate expression without EvalInt query on outermost expression. This is used by base responding to EvalInt to immediately directly avoid EvalInt query cycle, which would return top. Recursive eval_rv calls on subexpressions still go through eval_rv_ask_evalint.
val eval_rv_back_up : Q.ask -> glob_fun -> store -> GoblintCil.exp -> valueval eval_rv_base : Q.ask -> glob_fun -> store -> GoblintCil.exp -> valueEvaluate expression structurally by base. This handles constants directly and variables using CPA. Subexpressions delegate to eval_rv, which may use queries on them.
val eval_rv_base_lval :
eval_lv:(Q.ask -> glob_fun -> store -> GoblintCil.lval -> AD.t) ->
Q.ask ->
glob_fun ->
store ->
GoblintCil.exp ->
GoblintCil.lval ->
valueval evalbinop :
Q.ask ->
glob_fun ->
store ->
GoblintCil.binop ->
e1:GoblintCil.exp ->
?t1:GoblintCil.typ ->
e2:GoblintCil.exp ->
?t2:GoblintCil.typ ->
GoblintCil.typ ->
valueval evalbinop_mustbeequal :
Q.ask ->
glob_fun ->
store ->
GoblintCil.binop ->
e1:GoblintCil.exp ->
?t1:GoblintCil.typ ->
e2:GoblintCil.exp ->
?t2:GoblintCil.typ ->
GoblintCil.typ ->
valueEvaluate BinOp using MustBeEqual query as fallback.
val eval_fv : Q.ask -> glob_fun -> store -> GoblintCil.exp -> AD.tval eval_tv : Q.ask -> glob_fun -> store -> GoblintCil.exp -> AD.tval eval_int :
Q.ask ->
glob_fun ->
store ->
GoblintCil.exp ->
IntDomain.IntDomTuple.tval convert_offset : Q.ask -> glob_fun -> store -> GoblintCil.offset -> VD.offsval eval_lv : Q.ask -> glob_fun -> store -> GoblintCil.lval -> AD.tval eval_rv_keep_bot : Q.ask -> glob_fun -> store -> GoblintCil.exp -> valueval eval_rv : Q.ask -> glob_fun -> store -> GoblintCil.exp -> valueval query_evalint :
Q.ask ->
glob_fun ->
store ->
GoblintCil.exp ->
[> `Bot | `Lifted of IntDomain.IntDomTuple.t | `Top ]val eval_exp : store -> GoblintCil.exp -> IntDomain.IntDomTuple.int_t optionval eval_funvar :
(store, G.t, 'a, V.t) Analyses.ctx ->
GoblintCil.exp ->
ValueDomainQueries.AD.tval eval_rv_address : Q.ask -> glob_fun -> store -> GoblintCil.exp -> VD.tEvaluate expression as address. Avoids expensive Apron EvalInt if the Int result would be useless to us anyway.
val is_not_alloc_var :
('a, 'b, 'c, 'd) Analyses.ctx ->
GoblintCil.varinfo ->
boolval is_not_heap_alloc_var :
('a, 'b, 'c, 'd) Analyses.ctx ->
GoblintCil.varinfo ->
boolval query_invariant :
(Priv.D.t BaseDomain.basecomponents_t, G.t, 'a, V.t) Analyses.ctx ->
Invariant.context ->
Invariant.tval query_invariant_global :
('a, [> `Bot | `Lifted1 of Priv.G.t ], 'b, [> `Left of Priv.V.t ])
Analyses.ctx ->
[< `Left of Priv.V.t | `Right of 'c ] ->
Invariant.tval update_variable :
GoblintCil.varinfo ->
GoblintCil.typ ->
CPA.value ->
CPA.t ->
CPA.tval add_partitioning_dependencies :
GoblintCil.varinfo ->
VD.t ->
store ->
storeAdd dependencies between a value and the expression it (or any of its contents) are partitioned by
val set :
Q.ask ->
ctx:(store, G.t, 'a, V.t) Analyses.ctx ->
?invariant:bool ->
?lval_raw:GoblintCil.lval ->
?rval_raw:GoblintCil.exp ->
?t_override:GoblintCil.Cil.typ ->
glob_fun ->
store ->
AD.t ->
GoblintCil.Cil.typ ->
value ->
storeset st addr val returns a state where addr is set to val * it is always ok to put None for lval_raw and rval_raw, this amounts to not using/maintaining * precise information about arrays.
val rem_many : 'a -> store -> GoblintCil.varinfo list -> storeval rem_many_partitioning :
ValueDomainQueries.t ->
store ->
GoblintCil.varinfo list ->
storeval is_some_bot : value -> boolmodule InvariantEval : sig ... endmodule Invariant : sig ... endval invariant :
(InvariantEval.D.t, InvariantEval.G.t, 'a, InvariantEval.V.t) Analyses.ctx ->
Queries.ask ->
(InvariantEval.V.t -> InvariantEval.G.t) ->
InvariantEval.D.t ->
GoblintCil.exp ->
bool ->
InvariantEval.D.tval set_savetop :
ctx:(store, G.t, 'a, V.t) Analyses.ctx ->
?lval_raw:GoblintCil.lval ->
?rval_raw:GoblintCil.exp ->
Q.ask ->
glob_fun ->
store ->
AD.t ->
GoblintCil.typ ->
VD.t ->
storeval assign :
(store, G.t, 'a, V.t) Analyses.ctx ->
GoblintCil.lval ->
GoblintCil.exp ->
storeval branch :
(store, G.t, 'a, V.t) Analyses.ctx ->
GoblintCil.exp ->
bool ->
storeval body : (store, G.t, 'a, V.t) Analyses.ctx -> GoblintCil.fundec -> storeval return :
(store, G.t, 'a, V.t) Analyses.ctx ->
GoblintCil.exp option ->
GoblintCil.fundec ->
storeval vdecl : (store, G.t, 'a, V.t) Analyses.ctx -> GoblintCil.varinfo -> storeval collect_funargs :
Q.ask ->
?warn:bool ->
glob_fun ->
store ->
GoblintCil.exp list ->
address listFrom a list of expressions, collect a list of addresses that they might point to, or contain pointers to.
val collect_invalidate :
deep:bool ->
Q.ask ->
?warn:bool ->
glob_fun ->
store ->
GoblintCil.exp list ->
address listval invalidate :
?deep:bool ->
ctx:(store, G.t, 'a, V.t) Analyses.ctx ->
Q.ask ->
glob_fun ->
store ->
GoblintCil.exp list ->
storeval make_entry :
?thread:bool ->
(D.t, G.t, C.t, V.t) Analyses.ctx ->
GoblintCil.fundec ->
GoblintCil.exp list ->
D.tval enter :
(D.t, G.t, C.t, V.t) Analyses.ctx ->
'a ->
GoblintCil.fundec ->
GoblintCil.exp list ->
(D.t * D.t) listval forkfun :
(D.t, G.t, C.t, V.t) Analyses.ctx ->
GoblintCil.lval option ->
GoblintCil.varinfo ->
GoblintCil.exp list ->
(GoblintCil.lval option * GoblintCil.varinfo * GoblintCil.exp list) list
* boolval assert_fn :
(InvariantEval.D.t, InvariantEval.G.t, 'a, InvariantEval.V.t) Analyses.ctx ->
GoblintCil.exp ->
bool ->
InvariantEval.D.tval special_unknown_invalidate :
(store, G.t, 'a, V.t) Analyses.ctx ->
'b ->
glob_fun ->
store ->
CilType.Varinfo.t ->
GoblintCil.Cil.exp list ->
storeval check_invalid_mem_dealloc :
(store, G.t, 'a, V.t) Analyses.ctx ->
GoblintCil.varinfo ->
GoblintCil.exp ->
unitval points_to_heap_only :
('a, 'b, 'c, 'd) Analyses.ctx ->
GoblintCil.exp ->
boolval get_size_of_ptr_target :
('a, 'b, 'c, 'd) Analyses.ctx ->
GoblintCil.exp ->
ValueDomainQueries.ID.t Queries.resultval special :
(store, G.t, C.t, V.t) Analyses.ctx ->
GoblintCil.lval option ->
GoblintCil.varinfo ->
GoblintCil.exp list ->
storeval combine_env :
(store, G.t, 'a, V.t) Analyses.ctx ->
'b ->
'c ->
GoblintCil.fundec ->
'd ->
'e ->
D.t ->
Queries.ask ->
Priv.D.t Goblint_lib__BaseDomain.basecomponents_tval combine_assign :
(store, G.t, 'a, V.t) Analyses.ctx ->
GoblintCil.lval option ->
'b ->
GoblintCil.fundec ->
GoblintCil.exp list ->
'c ->
D.t ->
Q.ask ->
D.tval threadenter :
(D.t, G.t, C.t, V.t) Analyses.ctx ->
multiple:'a ->
GoblintCil.lval option ->
GoblintCil.varinfo ->
GoblintCil.exp list ->
D.t listval threadspawn :
(BaseDomain.BaseComponents(Priv.D).t,
[> `Bot | `Lifted1 of Priv.G.t ],
'a,
[> `Left of Priv.V.t ])
Analyses.ctx ->
multiple:'b ->
GoblintCil.lval option ->
GoblintCil.varinfo ->
GoblintCil.exp list ->
('c, 'd, 'e, 'f) Analyses.ctx ->
D.tval unassume :
(D.t, G.t, 'a, V.t) Analyses.ctx ->
GoblintCil.exp ->
WideningTokens.TS.elt list ->
D.tval event :
(store, G.t, 'a, V.t) Analyses.ctx ->
Events.t ->
'b ->
BaseDomain.BaseComponents(Priv.D).t