1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374(**************************************************************************)(* This file is part of the Codex semantics library. *)(* *)(* Copyright (C) 2013-2025 *)(* CEA (Commissariat à l'énergie atomique et aux énergies *)(* alternatives) *)(* *)(* you can redistribute it and/or modify it under the terms of the GNU *)(* Lesser General Public License as published by the Free Software *)(* Foundation, version 2.1. *)(* *)(* It is distributed in the hope that it will be useful, *)(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)(* GNU Lesser General Public License for more details. *)(* *)(* See the GNU Lesser General Public License version 2.1 *)(* for more details (enclosed in the file LICENSE). *)(* *)(**************************************************************************)(** Our primary way of exchanging and information about the program is
using lattices. Lattices should be the abstraction of a set of
something (its concretization).
Note that many operations operate over several lattices (notably,
transfer functions) are defined in the {!Single_value_abstraction}
module. Lattices operation defined here should be concerned only
with a single lattice.
TODO: This is probably what we should be exporting for later
display.
*)moduleSig=Lattice_sigmoduleUnimplemented=Unimplemented_Lattice(**The quadrivalent lattice for booleans, with four elements:
Bottom, True, False, and Top.*)moduleQuadrivalent=Quadrivalent_LatticemoduleUnit=Unit_Lattice(**Product lattice is a lattice that pairs two (or more) component
lattices*)moduleProd=Prod_Lattice(** A bitvector lattice based on “known bits”: tracks which bits are
definitely 0 or definitely 1, leaving others unknown. *)moduleKnown_Bits:Sig.BITVECTOR_LATTICEwithtypet=Bitvector_standard.Known_Bits.t=Bitvector_standard.Known_Bits(** A lattice of finite sets of bitvectors. Best for small domains where
explicit enumeration is feasible. *)moduleBVSet=Bitvector_standard.BVSet(** The congruence lattice: abstracts integers by modular constraints
of the form x ≡ a (mod n). Captures properties like even/odd or
divisibility. *)moduleCongruence=Bitvector_standard.Congruence(** Signed interval lattice: represents ranges of integers with signed
semantics (e.g. [-10, 42])*)moduleSigned_Interval=Bitvector_standard.Signed_IntervalmoduleUnsigned_Interval=Bitvector_standard.Unsigned_IntervalmoduleInteger=structmoduleKnown_Bits=Integer_standard.Known_BitsendmoduleBitfield=Bitfield_LatticemoduleBitvector_Of_Integer=Bitvector_Of_Integer