package frama-c

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Builds a lattice mixing maps and sets, provided that each one has a lattice structure.

Parameters

module Value : Value
module KVMap : Map_Lattice with type key = Key.t and type v = Value.t

Signature

include MapSet_Lattice with type set := KSet.t and type map := KVMap.t and type key := Key.t and type v := Value.t
type t =
  1. | Top of KSet.t * Origin.t
  2. | Map of KVMap.t
include Datatype.S_with_collections with type t := t
include Datatype.S with type t := t
include Datatype.S_no_copy with type t := t
include Datatype.Ty with type t := t
module Set : Datatype.Set with type elt = t
module Map : Datatype.Map with type key = t
module Hashtbl : Datatype.Hashtbl with type key = t
include Lattice with type t := t
include Lattice_type.Bounded_Join_Semi_Lattice with type t := t
include Lattice_type.Join_Semi_Lattice with type t := t

datatype of element of the lattice

include Datatype.S with type t := t
include Datatype.S_no_copy with type t := t
include Datatype.Ty with type t := t
val name : string

Unique name of the datatype.

val descr : t Descr.t

Datatype descriptor.

val packed_descr : Structural_descr.pack

Packed version of the descriptor.

val reprs : t list

List of representants of the descriptor.

val equal : t -> t -> bool

Equality: same spec than Stdlib.(=).

val compare : t -> t -> int

Comparison: same spec than Stdlib.compare.

val hash : t -> int

Hash function: same spec than Hashtbl.hash.

val pretty : Stdlib.Format.formatter -> t -> unit

Pretty print each value in an user-friendly way.

val mem_project : (Project_skeleton.t -> bool) -> t -> bool

mem_project f x must return true iff there is a value p of type Project.t in x such that f p returns true.

val copy : t -> t

Deep copy: no possible sharing between x and copy x.

val join : t -> t -> t

over-approximation of union

val is_included : t -> t -> bool

is first argument included in the second?

include Lattice_type.With_Narrow with type t := t
val narrow : t -> t -> t

over-approximation of intersection

include Lattice_type.With_Under_Approximation with type t := t

under-approximation of union

val meet : t -> t -> t

under-approximation of intersection

include Lattice_type.With_Intersects with type t := t
val intersects : t -> t -> bool

intersects t1 t2 returns true iff the intersection of t1 and t2 is non-empty.

include Lattice_type.With_Diff with type t := t
val diff : t -> t -> t

diff t1 t2 is an over-approximation of t1-t2. t2 must be an under-approximation or exact.

val bottom : t
val top : t
val add : Key.t -> Value.t -> t -> t

add key v t binds the value v to key in t. If t is a set, it adds key to the set. If v is bottom, then it removes the key from t instead.

val find : Key.t -> t -> Value.t

find key t returns the value bound to key in t. It returns Value.top if t is a set that contains key. It returns Value.bottom if key does not belong to t.

val find_lonely_key : t -> Key.t * Value.t

If t is a singleton map binding k to v, then returns the pair (k,v).

  • raises Not_found

    otherwise.

val split : Key.t -> t -> Value.t * t

split key t is equivalent to find key t, add key bottom t.

val inject : Key.t -> Value.t -> t

Returns the singleton map binding key to v.

val get_keys : t -> KSet.t

Returns the set of keys in t.

val filter_keys : (Key.t -> bool) -> t -> t
val map : (Value.t -> Value.t) -> t -> t
val fold_keys : (Key.t -> 'a -> 'a) -> t -> 'a -> 'a
val fold : (Key.t -> Value.t -> 'a -> 'a) -> t -> 'a -> 'a
val cached_fold : cache_name:string -> temporary:bool -> f:(Key.t -> Value.t -> 'a) -> projection:(Key.t -> Value.t) -> joiner:('a -> 'a -> 'a) -> empty:'a -> t -> 'a
val for_all : (Key.t -> Value.t -> bool) -> t -> bool

for_all p t checks if all binding of t satisfy p . Always false if t is top.

val exists : (Key.t -> Value.t -> bool) -> t -> bool

exists p t checks if one binding of t satisfies p. Always true if t is top.

val pretty_debug : Stdlib.Format.formatter -> t -> unit
module With_Cardinality (_ : Map_Lattice_with_cardinality with type t := KVMap.t and type key := Key.t and type v := Value.t) : MapSet_Lattice_with_cardinality with type t := t and type key := Key.t and type v := Value.t