12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091(****************************************************************************)(* *)(* This file is part of MOPSA, a Modular Open Platform for Static Analysis. *)(* *)(* Copyright (C) 2017-2019 The MOPSA Project. *)(* *)(* This program is free software: 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, either version 3 of the License, or *)(* (at your option) any later version. *)(* *)(* This program 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. *)(* *)(* You should have received a copy of the GNU Lesser General Public License *)(* along with this program. If not, see <http://www.gnu.org/licenses/>. *)(* *)(****************************************************************************)(** Interface of lattice structures *)openChangeopenContextopenPrint(** Signature of a lattice module. *)moduletypeLATTICE=sig(** {2 Structure} *)(** ************* *)typet(** Type of an abstract elements. *)valbottom:t(** Least abstract element of the lattice. *)valtop:t(** Greatest abstract element of the lattice. *)(** {2 Predicates} *)(** ************** *)valis_bottom:t->bool(** [is_bottom a] tests whether [a] is bottom or not. *)valsubset:t->t->bool(** Partial order relation. [subset a1 a2] tests whether [a1] is
related to (or included in) [a2]. *)(** {2 Operators} *)(** ************* *)valjoin:t->t->t(** [join a1 a2] computes an upper bound of [a1] and [a2]. *)valmeet:t->t->t(** [meet a1 a2] computes a lower bound of [a1] and [a2]. *)valwiden:'actx->t->t->t(** [widen ctx a1 a2] computes an upper bound of [a1] and [a2] that
ensures stabilization of ascending chains. *)(** {2 Printing} *)(** ************ *)valprint:printer->t->unit(** Printer of an abstract element. *)end(** Lattice operators *)type'alattice={bottom:'a;top:'a;is_bottom:'a->bool;subset:'actx->'a->'a->bool;join:'actx->'a->'a->'a;meet:'actx->'a->'a->'a;widen:'actx->'a->'a->'a;merge:'a->'a*change_map->'a*change_map->'a;print:printer->'a->unit;}