package codex

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

Module Framac_ival.BottomSource

Types, monads and utilitary functions for lattices in which the bottom is managed separately from other values.

Sourcemodule Type : sig ... end
include module type of Type
Sourcetype 'a or_bottom = [
  1. | `Value of 'a
  2. | `Bottom
]
Sourceval (>>-) : 'a or_bottom -> ('a -> 'b or_bottom) -> 'b or_bottom

This monad propagates the `Bottom value if needed.

Sourceval (>>-:) : 'a or_bottom -> ('a -> 'b) -> 'b or_bottom

Use this monad if the following function returns a simple value.

Sourceval is_bottom : 'a or_bottom -> bool
Sourceval non_bottom : 'a or_bottom -> 'a
Sourceval equal : ('a -> 'a -> bool) -> 'a or_bottom -> 'a or_bottom -> bool
Sourceval is_included : ('a -> 'a -> bool) -> 'a or_bottom -> 'a or_bottom -> bool
Sourceval join : ('a -> 'a -> 'a) -> 'a or_bottom -> 'a or_bottom -> 'a or_bottom
Sourceval join_list : ('a -> 'a -> 'a) -> 'a or_bottom list -> 'a or_bottom
Sourceval narrow : ('a -> 'a -> 'a or_bottom) -> 'a or_bottom -> 'a or_bottom -> 'a or_bottom
Sourceval pretty : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a or_bottom -> unit

Datatype constructor.

Bounds a semi-lattice.

In a lattice where the elements are lists of non-bottom values, the empty list is the bottom case.

Sourceval to_list : 'a or_bottom -> 'a list

Conversion functions.

Sourceval bot_of_list : 'a list -> 'a list or_bottom
Sourceval list_of_bot : 'a list or_bottom -> 'a list
Sourceval all : 'a or_bottom list -> 'a list
Sourceval add_to_list : 'a or_bottom -> 'a list -> 'a list

elt >:: list adds elt to the list if it is not bottom.

Sourcemodule Top : sig ... end

Lattices in which both top and bottom are managed separately