Parameter PersistentArrayNCA.Value

type 'a node = 'a Node.t

The generic type of nodes, should match POLYMORPHIC_NODE.t

type 'a t

The generic type of our values. An 'a t value is associated to each class of our union find whose representative has type 'a POLYMORPHIC_NODE.t.

val meet : 'a node -> 'a t -> 'a t -> 'a t

Intersection of values

val equal : 'a node -> 'a t -> 'a t -> bool

Equality on values.

val incl : 'a node -> 'a t -> 'a t -> bool

incl x y is true if x is included (smaller than) y (i.e. x = meet x y or y = join x y).

val pretty : 'a node -> Stdlib.Format.formatter -> 'a t -> unit

Pretty-printer

val join : 'a node -> 'a t -> 'a t -> 'a t option

Union of values, only required for join. Can return None for a top value that does not need to be stored.

type ('a, 'b) relation = ('a, 'b) Relation.t

The type of relations, should match POLYMORPHIC_GROUP.t.

val apply : 'a node -> 'a t -> ('a, 'b) relation -> 'b t

apply v r is the value obtained by applying relation r to value v apply should be a group action from R : POLYMORPHIC_GROUP with type ('a,'b) t = ('a,'b) relation on the value 'a t. Meaning it should verify the following:

  • apply v R.identity = v
  • apply (apply v r2) r1 = apply v (R.compose r2 r1)