UnionFind.TThe terms consist of address constants and dereferencing function with sum of an integer. The dereferencing function is parametrized by the size of the element in the memory. We store the CIL expression of the term in the data type, such that it it easier to find the types of the dereferenced elements. Also so that we can easily convert back from term to Cil expression.
type t = termval hash : t -> inttype v_prop = propval hash_v_prop : v_prop -> intval is_addr : term -> boolval show : t -> stringval show_prop : prop -> stringval get_var : term -> DuplicateVars.Var.tval contains_variable : DuplicateVars.Var.t list -> term -> boolReturns true if the second parameter contains one of the variables defined in the list "variables".
val eval_int : Queries.ask -> GoblintCil.exp -> IntDomain.IntDomTuple.int_tUse query EvalInt for an expression.
val eval_int_opt :
Queries.ask ->
GoblintCil.exp ->
IntDomain.IntDomTuple.int_t optionReturns Some type for a pointer to a type and None if the result is not a pointer.
Returns the size of the type. If typ is a pointer, it returns the size of the elements it points to. If typ is an array, it returns the size of the elements of the array (even if it is a multidimensional array. Therefore get_element_size_in_bits int[][][] = sizeof(int)).
val aux_term_of_varinfo : Goblint_lib__DuplicateVars.VarType.t -> termval term_of_varinfo : Goblint_lib__DuplicateVars.VarType.t -> termval offset_to_index :
?typ:GoblintCil.typ ->
PreValueDomain.Offs.t ->
IntDomain.IntDomTuple.tFrom a offset, compute the index in bits
val cil_offs_to_idx :
Queries.ask ->
GoblintCil.offset ->
GoblintCil.Cil.typ ->
IntDomain.IntDomTuple.tConvert a Cil offset to an integer offset.
val z_of_offset :
Queries.ask ->
GoblintCil.offset ->
GoblintCil.Cil.typ ->
IntDomain.IntDomTuple.int_tConvert an offset to an integer of Z, if posible. Otherwise, this throws UnsupportedCilExpression.
val type_of_term : term -> GoblintCil.typval to_cil : term -> GoblintCil.expReturns a Cil expression which is the constant z divided by the size of the elements of t.
val get_field_offset : CilType.Fieldinfo.t -> IntDomain.IntDomTuple.int_tReturns the integer offset of a field of a struct.
Returns true if the Cil expression represents a 64 bit data type which is not a float. So it must be either a pointer or an integer that has the same size as a pointer.
Only keeps the variables that are actually pointers (or 64-bit integers).
Get a Cil expression that is equivalent to *(exp + offset), by taking into account type correctness.
val get_size : term -> Z.tval of_offset :
Queries.ask ->
term ->
GoblintCil.offset ->
GoblintCil.Cil.typ ->
GoblintCil.exp ->
termval of_lval : Queries.ask -> GoblintCil.lval -> termval of_cil_neg :
Queries.ask ->
bool ->
GoblintCil.exp ->
term option * GoblintCil__.Cilint.cilint optionConverts the negation of the expression to a term if neg = true. If neg = false then it simply converts the expression to a term.
val of_cil :
Queries.ask ->
GoblintCil.exp ->
term option * GoblintCil__.Cilint.cilint optionConvert the expression to a term, and additionally check that the term is 64 bits. If it's not a 64bit pointer, it returns None, None.
val two_terms_of_cil :
Queries.ask ->
bool ->
GoblintCil.exp ->
(term option * GoblintCil__.Cilint.cilint option)
* (term option * GoblintCil__.Cilint.cilint option)Converts a cil expression e = "t1 + off1 - (t2 + off2)" to two terms (Some t1, Some off1), (Some t2, Some off2)
val prop_of_cil : Queries.ask -> GoblintCil.Cil.exp -> bool -> prop list`prop_of_cil e pos` parses the expression `e` (or `not e` if `pos = false`) and returns a list of length 1 with the parsed expresion or an empty list if the expression can't be expressed with the type `prop`.
val prop_to_cil : prop -> GoblintCil.exp