Domains.SigSourceThe Bottom exception can be raised by any transfer function that realises the state is empty. This should mainly be WithAssume.assume, but it can also forward transfer function (for instance, division by zero).
Raised e.g. when storing to an invalid location.
A Context represent a set of paths leading to the current state (it corresponds to a path condition in symbolic execution)
Queries allow to ask the domain an overapproximation of the set of concrete objects to which a dimension concretizes. This set of object must be finitely represented, but the choice of this representation is left to the domain. It is required that these objects can be converted to some standard representations.
In addition, we require this set of object to be represented by a lattice, so that it is possible to test inclusion and perform approximation of union on these set of objects.
module type Boolean_Lattice =
Lattices.Sig.BOOLEAN_LATTICE with type t = Lattices.Quadrivalent.tNote: since Lattices.Quadrivalent exactly represents the powerset of {true,false}, there is no point in using another type.
Fixpoint iteration, and base for all abstract domains.
An integer uniquely identifying a widening point.
BASE module types describing operations on one or several types of terms.
Notes on the base operations:
We document the boolean cases, as integer are pretty similar.
This signature is useful when we don't have any new flow-sensitive state and just need all the things on the top of the stack to stay the same.
This signature does not have pre-built values, except booleans.
These are functions that can be implemented using the base signatures. See Domain_extend for instantiation.
Context conversion procedures: pass through the values by just changing the context.
module Convert_Boolean_Forward
(C : Convert_Contexts)
(D : With_Boolean_Forward with module Context = C.To) :
sig ... endmodule Convert_Integer_Forward
(C : Convert_Contexts)
(D : With_Integer_Forward with module Context = C.To) :
sig ... endmodule Convert_Binary_Forward
(C : Convert_Contexts)
(D : With_Binary_Forward with module Context = C.To) :
sig ... endmodule Convert_Enum_Forward
(C : Convert_Contexts)
(D : With_Enum_Forward with module Context = C.To) :
sig ... endThis will help to the transition in a top-down manner, starting from the translation and top-level domain to the lower-level domain.