Goblint_lib.UnionFindThe Union Find is used by the C-2PO Analysis. This file contains the code for a quantitative union find and the quantitative finite automata. They will be necessary in order to construct the congruence closure of terms.
module M = Messagestype term = | Addr of DuplicateVars.Var.t| Aux of DuplicateVars.Var.t * GoblintCil.exp| Deref of term * Z.t * GoblintCil.expval hash_term : term -> intTwo propositions are equal if they are syntactically equal or if one is t_1 = z + t_2 and the other t_2 = - z + t_1.
val equal_term_offset_relation :
term_offset_relation ->
term_offset_relation ->
Ppx_deriving_runtime.boolval hash_term_offset_relation : term_offset_relation -> intval compare_term_offset_relation :
term_offset_relation ->
term_offset_relation ->
Ppx_deriving_runtime.intval equal_block_relation :
block_relation ->
block_relation ->
Ppx_deriving_runtime.boolval hash_block_relation : block_relation -> intval compare_block_relation :
block_relation ->
block_relation ->
Ppx_deriving_runtime.inttype prop = | Equal of term_offset_relation| Nequal of term_offset_relation| BlNequal of block_relationval hash_prop : prop -> intmodule T : sig ... endThe 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.
module TMap : sig ... endmodule TSet : sig ... endmodule UnionFind : sig ... endQuantitative union find
module ZMap : sig ... endmodule LookupMap : sig ... endFor each representative t' of an equivalence class, the LookupMap maps t' to a map that maps z to a term in the data structure that is equal to *(z + t').