Base.MainFunctormodule Priv : BasePriv.Smodule RVEval : BaseDomain.ExpEvaluator with type t = BaseComponents(Priv.D).tinclude module type of struct include Analyses.DefaultSpec endval asm : ('a, 'b, 'c, 'd) Analyses.man -> 'aval skip : ('a, 'b, 'c, 'd) Analyses.man -> 'aval paths_as_set : ('a, 'b, 'c, 'd) Analyses.man -> 'a listmodule A = Analyses.UnitAmodule Dom : sig ... endtype t = Dom.tmodule D = Dommodule P : sig ... endmodule 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 -> storemodule VarH : sig ... endmodule VarMap : sig ... endval 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 :
ValueDomain.VDQ.t ->
(GoblintCil.attributes * GoblintCil.attributes) option ->
PrecisionUtil.int_precision option ->
VD.t ->
bool ->
VD.tval project :
ValueDomain.VDQ.t ->
PrecisionUtil.int_precision option ->
CPA.t ->
GoblintCil.fundec ->
CPA.tval alloced_var :
Q.AllocationLocation.t ->
('a, 'b, 'c, 'd) Analyses.man ->
Basetype.Variables.tval evalbinop_base :
man:('a, 'b, 'c, 'd) Analyses.man ->
GoblintCil.binop ->
GoblintCil.typ ->
value ->
GoblintCil.typ ->
value ->
GoblintCil.typ ->
valueval add_offset_varinfo : Addr.Offs.t -> Addr.t -> Addr.tval sync' :
[ `Init
| `Join
| `JoinCall of CilType.Fundec.t
| `Normal
| `Return
| `Thread ] ->
(BaseDomain.BaseComponents(Priv.D).t,
[> `Bot | `Lifted1 of Priv.G.t ],
'a,
[> `Left of Priv.V.t ])
Analyses.man ->
D.tval sync :
(BaseDomain.BaseComponents(Priv.D).t,
[> `Bot | `Lifted1 of Priv.G.t ],
'a,
[> `Left of Priv.V.t ])
Analyses.man ->
[< `Init
| `Join
| `JoinCall of CilType.Fundec.t
| `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.man ->
[ `Init
| `Join
| `JoinCall of CilType.Fundec.t
| `Normal
| `Return
| `Thread ] ->
unitval get_var :
man:
('a, [> `Bot | `Lifted1 of Priv.G.t ], 'b, [> `Left of Priv.V.t ])
Analyses.man ->
store ->
GoblintCil.varinfo ->
valueval get :
man:
('a, [> `Bot | `Lifted1 of Priv.G.t ], 'b, [> `Left of Priv.V.t ])
Analyses.man ->
?top:VD.t ->
?full:bool ->
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 :
Queries.ask ->
value ->
GoblintCil.typ ->
string ->
AD.tval reachable_top_pointers_types :
(store, [> `Bot | `Lifted1 of Priv.G.t ], 'a, [> `Left of Priv.V.t ])
Analyses.man ->
AD.t ->
Queries.TS.tval eval_rv_ask_evalint :
man:
('a, [> `Bot | `Lifted1 of Priv.G.t ], 'b, [> `Left of Priv.V.t ])
Analyses.man ->
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 :
man:
('a, [> `Bot | `Lifted1 of Priv.G.t ], 'b, [> `Left of Priv.V.t ])
Analyses.man ->
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 :
man:
('a, [> `Bot | `Lifted1 of Priv.G.t ], 'b, [> `Left of Priv.V.t ])
Analyses.man ->
store ->
GoblintCil.exp ->
valueval eval_rv_base :
man:
('a, [> `Bot | `Lifted1 of Priv.G.t ], 'b, [> `Left of Priv.V.t ])
Analyses.man ->
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:
(man:
('a,
[> `Bot | `Lifted1 of Priv.G.t ] as 'b,
'c,
[> `Left of Priv.V.t ] as 'd)
Analyses.man ->
store ->
GoblintCil.lval ->
AD.t) ->
man:('a, 'b, 'c, 'd) Analyses.man ->
store ->
GoblintCil.exp ->
GoblintCil.lval ->
valueval evalbinop :
man:
('a, [> `Bot | `Lifted1 of Priv.G.t ], 'b, [> `Left of Priv.V.t ])
Analyses.man ->
store ->
GoblintCil.binop ->
e1:GoblintCil.exp ->
?t1:GoblintCil.typ ->
e2:GoblintCil.exp ->
?t2:GoblintCil.typ ->
GoblintCil.typ ->
valueval evalbinop_mustbeequal :
man:
('a, [> `Bot | `Lifted1 of Priv.G.t ], 'b, [> `Left of Priv.V.t ])
Analyses.man ->
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 :
man:
('a, [> `Bot | `Lifted1 of Priv.G.t ], 'b, [> `Left of Priv.V.t ])
Analyses.man ->
store ->
GoblintCil.exp ->
AD.tval eval_tv :
man:
('a, [> `Bot | `Lifted1 of Priv.G.t ], 'b, [> `Left of Priv.V.t ])
Analyses.man ->
store ->
GoblintCil.exp ->
AD.tval eval_int :
man:
('a, [> `Bot | `Lifted1 of Priv.G.t ], 'b, [> `Left of Priv.V.t ])
Analyses.man ->
store ->
GoblintCil.exp ->
ValueDomain.ID.tval convert_offset :
man:
('a, [> `Bot | `Lifted1 of Priv.G.t ], 'b, [> `Left of Priv.V.t ])
Analyses.man ->
store ->
GoblintCil.offset ->
VD.offsval eval_lv :
man:
('a, [> `Bot | `Lifted1 of Priv.G.t ], 'b, [> `Left of Priv.V.t ])
Analyses.man ->
store ->
GoblintCil.lval ->
AD.tval eval_rv_keep_bot :
man:
('a, [> `Bot | `Lifted1 of Priv.G.t ], 'b, [> `Left of Priv.V.t ])
Analyses.man ->
store ->
GoblintCil.exp ->
valueval eval_rv :
man:
('a, [> `Bot | `Lifted1 of Priv.G.t ], 'b, [> `Left of Priv.V.t ])
Analyses.man ->
store ->
GoblintCil.exp ->
valueval query_evalint :
man:
('a, [> `Bot | `Lifted1 of Priv.G.t ], 'b, [> `Left of Priv.V.t ])
Analyses.man ->
store ->
GoblintCil.exp ->
[> `Bot | `Lifted of ValueDomain.ID.t | `Top ]val eval_exp : store -> GoblintCil.exp -> ValueDomain.ID.int_t optionval eval_funvar :
(store, [> `Bot | `Lifted1 of Priv.G.t ], 'a, [> `Left of Priv.V.t ])
Analyses.man ->
GoblintCil.exp ->
ValueDomain.AD.tval eval_rv_address :
man:
('a, [> `Bot | `Lifted1 of Priv.G.t ], 'b, [> `Left of Priv.V.t ])
Analyses.man ->
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.man ->
GoblintCil.varinfo ->
boolval is_not_heap_alloc_var :
('a, 'b, 'c, 'd) Analyses.man ->
GoblintCil.varinfo ->
boolval query_invariant :
(Priv.D.t BaseDomain.basecomponents_t,
[> `Bot | `Lifted1 of Priv.G.t ],
'a,
[> `Left of Priv.V.t ])
Analyses.man ->
Invariant.context ->
Invariant.tval query_invariant_global :
('a, [> `Bot | `Lifted1 of Priv.G.t ], 'b, [> `Left of Priv.V.t ])
Analyses.man ->
[< `Left of Priv.V.t | `Right of 'c ] ->
Invariant.tval exp_may_signed_overflow :
('a, 'b, 'c, 'd) Analyses.man ->
GoblintCil.exp ->
BoolDomain.MayBool.tThis query returns false if the expression exp will definitely not result in an overflow.
Each subexpression is analyzed to see if an overflow happened. For each operator in the expression, we use the query EvalInt to approximate the bounds of each operand and we compute if in the worst case there could be an overflow.
For now we return true if the expression contains a shift left.
val lval_may_signed_overflow :
('a, 'b, 'c, 'd) Analyses.man ->
GoblintCil.lval ->
BoolDomain.MayBool.tAdd dependencies between a value and the expression it (or any of its contents) are partitioned by
val set :
man:
(store, [> `Bot | `Lifted1 of Priv.G.t ], 'a, [> `Left of Priv.V.t ])
Analyses.man ->
?invariant:bool ->
?blob_destructive:bool ->
?lval_raw:GoblintCil.lval ->
?rval_raw:GoblintCil.exp ->
?t_override:GoblintCil.Cil.typ ->
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_partitioning :
ValueDomain.VDQ.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.man ->
InvariantEval.D.t ->
GoblintCil.exp ->
bool ->
InvariantEval.D.tval assign :
(store, [> `Bot | `Lifted1 of Priv.G.t ], 'a, [> `Left of Priv.V.t ])
Analyses.man ->
GoblintCil.lval ->
GoblintCil.exp ->
storeval branch :
(store, InvariantEval.G.t, 'a, InvariantEval.V.t) Analyses.man ->
GoblintCil.exp ->
bool ->
storeval body :
(store, [> `Bot | `Lifted1 of Priv.G.t ], 'a, [> `Left of Priv.V.t ])
Analyses.man ->
GoblintCil.fundec ->
storeval return :
(store,
[> `Bot | `Lifted1 of Priv.G.t | `Lifted2 of VD.t ],
'a,
[> `Left of Priv.V.t | `Right of ThreadIdDomain.Thread.t ])
Analyses.man ->
GoblintCil.exp option ->
GoblintCil.fundec ->
storeval vdecl :
(store, [> `Bot | `Lifted1 of Priv.G.t ], 'a, [> `Left of Priv.V.t ])
Analyses.man ->
GoblintCil.varinfo ->
storeval collect_funargs :
man:
('a, [> `Bot | `Lifted1 of Priv.G.t ], 'b, [> `Left of Priv.V.t ])
Analyses.man ->
?warn:bool ->
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 ->
man:
('a, [> `Bot | `Lifted1 of Priv.G.t ], 'b, [> `Left of Priv.V.t ])
Analyses.man ->
?warn:bool ->
store ->
GoblintCil.exp list ->
address listval forkfun :
(D.t, G.t, C.t, V.t) Analyses.man ->
GoblintCil.lval option ->
GoblintCil.varinfo ->
GoblintCil.exp list ->
(GoblintCil.lval option * GoblintCil.varinfo * GoblintCil.exp list * bool)
listval assert_fn :
(InvariantEval.D.t, InvariantEval.G.t, 'a, InvariantEval.V.t) Analyses.man ->
GoblintCil.exp ->
bool ->
InvariantEval.D.tval special_unknown_invalidate :
(store, [> `Bot | `Lifted1 of Priv.G.t ], 'a, [> `Left of Priv.V.t ])
Analyses.man ->
CilType.Varinfo.t ->
LibraryDesc.Cil.Cil.exp list ->
storeval check_invalid_mem_dealloc :
(store, [> `Bot | `Lifted1 of Priv.G.t ], 'a, [> `Left of Priv.V.t ])
Analyses.man ->
GoblintCil.varinfo ->
GoblintCil.exp ->
unitval points_to_heap_only :
('a, 'b, 'c, 'd) Analyses.man ->
GoblintCil.exp ->
boolval get_size_of_ptr_target :
('a, 'b, 'c, 'd) Analyses.man ->
GoblintCil.exp ->
ValueDomainQueries.ID.t Queries.resultval combine_env :
(store, [> `Bot | `Lifted1 of Priv.G.t ], 'a, [> `Left of Priv.V.t ])
Analyses.man ->
'b ->
'c ->
GoblintCil.fundec ->
'd ->
'e ->
D.t ->
Queries.ask ->
Priv.D.t Goblint_lib__BaseDomain.basecomponents_tval threadenter :
(BaseDomain.BaseComponents(Priv.D).t, G.t, C.t, V.t) Analyses.man ->
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.man ->
multiple:'b ->
GoblintCil.lval option ->
GoblintCil.varinfo ->
GoblintCil.exp list ->
('c, 'd, 'e, 'f) Analyses.man ->
D.tval unassume :
(D.t,
[ `Bot | `Lifted1 of Priv.G.t | `Lifted2 of VD.t | `Top ],
'a,
[ `Left of Priv.V.t | `Right of ThreadIdDomain.thread ])
Analyses.man ->
GoblintCil.exp ->
WideningTokenLifter.TS.elt list ->
D.tval event :
(store, InvariantEval.G.t, 'a, InvariantEval.V.t) Analyses.man ->
Events.t ->
'b ->
BaseDomain.BaseComponents(Priv.D).t