package mopsa

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

Parameters

module Key : ORDER
module Value : ORDER

Signature

Set of keys

Set of values

type t

Type of inversible maps

val bottom : t

⊥ element

val top : t

⊤ element

val is_bottom : t -> bool

is_bottom a checks whether a is ⊥

val print : Core.All.Print.printer -> t -> unit

Pretty printer.

val empty : t

Singleton of empty map

val subset : t -> t -> bool

Inclusion test.

val join : t -> t -> t

Join two sets of partial maps.

val meet : t -> t -> t

Intersect to sets of partial maps.

val widen : 'a Core.All.ctx -> t -> t -> t

Widening operator

find k a find the set of values attached to key k in a. Raise Not_found of the key is not found.

val find_inverse : Value.t -> t -> KeySet.t Mopsa_utils.Top.with_top

find_inverse finds the set of keys attached to value v in a.

val remove : Key.t -> t -> t

remove k a removes all bindings (k,-) in a

val remove_inverse : Value.t -> t -> t

remove_inverse v a remove all bindings (-,v) in a

val filter : (Key.t -> ValueSet.t Mopsa_utils.Top.with_top -> bool) -> t -> t

filter f a keeps all bindings (k,vs) in a such that f k vs is true

val filter_inverse : (Value.t -> KeySet.t -> bool) -> t -> t

filter_inverse f a keeps all inverse bindings (v,ks) in a such that f v ks is true

set k vs a adds the binding (k,vs) to a. Previous bindings are overwritten.

val add_inverse : Value.t -> KeySet.t -> t -> t

add_inverse v ks a adds the binding (k,{v} ∪ find k a) to a, where kks.

val rename : Key.t -> Key.t -> t -> t

rename k k' a renames key k to k' in a

val rename_inverse : Value.t -> Value.t -> t -> t

rename k k' a renames value v to v' in a

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

singleton k v createw a map with the singleton binding (k,{v})

val mem : Key.t -> t -> bool

mem k a check whether a binding (k,-) exists in a

val mem_inverse : Value.t -> t -> bool

mem v a check whether a binding (_,v) exists in a

val fold : (Key.t -> ValueSet.t Mopsa_utils.Top.with_top -> 'a -> 'a) -> t -> 'a -> 'a

fold f a init folds function f over elements (k,vs) in a

map f a replace bindings (k,vs) in a with (k,f vs)

OCaml

Innovation. Community. Security.