Module Domains.Memory_sig
Signature for the parts of memory domain.
The general idea is this. A memory maps adresses to values. Memories are built hierarchically: a part of a memory may be represented by another memory (e.g. whole memory can be parametrized by how memory is represented in each region, arrays can be parametrized by how memory is represented inside single cells, etc.). Ultimately, memories contain scalar /values/.
The fact that the value at the bottom of the hierarchy in the memory may contain parts of the adresses used at the top of the hierarchy requires a particular instantiation of functors. In general, a functor use the adresses of its parameter to build its own adresses. The adress of the top-level functor can be used as the value for the whole chain of functors, and is passed as an argument to build the memories.
So memory "domains" contains two parts: a part used to build adresses and the final value, which is passed as an argument to the second part, to build memories.
Used to distinguish cases for weak updates, strong updates, or completely invalid destinations.
module type AADT = sig ... endAn Abstract Abstract Datatype (AADT) is just a data structure that can contains symbolic values constrainted by a base domain, named Scalar.
module type WITH_BOOLEAN_REDEFINITION = sig ... endFor AADTs that redefine the notion of boolean.
module type AADT_WITH_BOOLEAN = sig ... endmodule type VALUE = sig ... endA scalar value stored inside a memory region. Should be a subset of Sig.MINIMAL + Sig.WITH_BINARY.
module type WITH_OFFSET = sig ... endAbstraction of an offset in a contiguous memory region.
module type WITH_ADDRESS = sig ... endAbstraction of an address, pointing to a region in a C-like memory model. The type adress is named binary for historical reasons, and also to help sharing with bitvectors in whole.
module type ADDRESS = sig ... endRepresentation of pointers inside some memory regions.
module type WITH_MEMORY_QUERIES = sig ... endmodule type WITH_FIXED_SIZE_VALUE = sig ... endA fixed-size value is the type of values returned by C expressions or held in machine code registers, i.e. it is a bitvector containing an integer, pointer, floating point value, or contenation or extraction of other fixed-size values.
module type FIXED_SIZE_VALUE_DOMAIN = sig ... endAn abstract domain handling fixed-size values.
Base module types describing operations on terms of block types
module type BLOCK = sig ... endmodule type MEMORY = sig ... endMemory map adresses to values. These types may differ (for instance, an array functor can takes integer as adresses, but can contain any value).
Those are the canonical signatures of memory domains; however many domains provide a more specialized signature (with additional Context and type equalities, and sometimes also ask for more specialized signature (but that wil improve)
module type OFFSET_AND_MAKE_BLOCK = sig ... endmodule type ADDRESS_AND_MAKE_MEMORY = sig ... endmodule type WHOLE_MEMORY_DOMAIN = sig ... endLike ADDRESS_AND_MAKE_MEMORY, but we can do bitvector operations on addresses. This module is not fully instantiated as module MEMORY still a functor waiting for parameter of module type BLOCK
module type COMPLETE_DOMAIN = sig ... endThis is a fully instantiated version of WHOLE_MEMORY_DOMAIN. It is used to break the recursion of the stack of recursive domains (containing uninitiated functors) in modules Codex_register and Dba2Codex
Base module types describing operations on one or several types of terms including memory ones
module type WITH_BLOCK_FORWARD = sig ... endmodule type WITH_BLOCK = sig ... endmodule type WITH_MEMORY_FORWARD = sig ... endmodule type WITH_BLOCK_OFFSET = sig ... endmodule type WITH_MEMORY = sig ... endmodule type WITH_QUERIES = sig ... endmodule type Base = sig ... end