package electrod

  1. Overview
  2. Docs

Type of relations.

type t =
  1. | Const of {
    1. name : Name.t;
    2. arity : int;
    3. scope : Scope.t;
    }
  2. | Var of {
    1. name : Name.t;
    2. arity : int;
    3. scope : Scope.t;
    4. fby : Scope.t option;
    }

A relation is either static (const) or dynamic (var). In the latter case, it may either be specified in a unique scope or with a scope for the initial instant and then a scope for all other instants. The arity is compulsorily specified by the user for empty bounds and optionally otherwise.

val const : Name.t -> int -> Scope.t -> t

Constructors

val var : Name.t -> int -> Scope.t -> Scope.t option -> t
val arity : t -> int

Arity of the relation. (> 0)

val name : t -> Name.t
val is_set : t -> bool

Tells whether the relation is a set or a relation of arity > 1.

val is_nary : t -> bool
val is_const : t -> bool
val is_var : t -> bool
val scope : t -> Scope.t

Returns the scope of a relation (for variable relations: not fby!)

val must : t -> TupleSet.t
val may : t -> TupleSet.t
val sup : t -> TupleSet.t
val pp : ?print_name:bool -> Stdlib.Format.formatter -> t -> unit
val to_string : ?print_name:bool -> t -> string
OCaml

Innovation. Community. Security.