OCaml Design Frames/Rules

From WikiOsp
Jump to: navigation, search


It is useful to gather the entities of a Domain into sub-Sets defined by their position in the Builder-Tree. This sub-Sets are natural Nodes of the Constructor-Tree


a Domain Xset is defined as the Set of all entities :

  • which are all sharing the property is a kind of X.
  • which are linked transitively by the relation is needed by to be evaluated.
  • a Domain is closed by these two relations. It means that any entity of X can be built by from the closure.
  • If an entity 'e of X is needed to build an entity of a domain Y then e is excluded from X.
the Coordinate of an Atom in a Molecule and the Coordinate of a Point in a Triangle : both are a kind of Coordinate and as a Molecule is not a Figure, the Coordinate is excluded from both Figureset end Moleculeset.


  • For a domain X the fence collects the entities having external entities as builders.
  • The Fence consists in the leaves of the Builder-Tree and the closure of the relation is needed by.
  • Fence of Fence is itself.
  • For an entity E the Fence is the leaves of its Builder-Tree.


  • the Deepfence of an entity E consists in the expression of its Fence in Elementary Tags (by recursion).


any entity of any domain is evaluated in a Context of three entities the Domain the Database and the Datafile of the Database.


  • the Body collects all entities of the Domain not beeing in the Context or the Fence.


  • when needed the Body and the Fence are united as the Field.
  • There is a Field in Figure, and no Field in Prototype.

Transdomain connection[edit]

  • Rule the Builders of a Fence-entity are connected to an other domain entity by an uno datastructure (its container).

Example :

  • the Container for a Point in Figure is a Coordinate_tuple of Elementary domain
  • the Container for an Aopef in Prototype is a aopef_parameter_tuple of Elementary domain


Unicity of a Building Function[edit]

for each entity A there is one and only one building function (a_build) and to each building function a_build corresponds a unique A.
In other words, there is a bijection between A and a_build.

Unicity of a Builder list[edit]

the arguments of a building function are the values of a well defined list of EI : its builders.
By well defined we mean that the function is not partial : all arguments must have values when the function is applied.

Unicity of Tag[edit]

Any entity is fully and uniquely defined by its Tag.

the Builder Tag tree[edit]

All Tags of a Domain form a tree the Builder Tree

Unicity of Name[edit]

The name of any Entity is unique

Tag hierarchy[edit]

Any Tag is built from its only father Tag. Therefore it is possible of extract any ancestor Tag from a Tag.

Label types[edit]

type x_label = 
  | E_label of E_label_t.e_label 
  | F_label of F_label_t.f_label
  • Bud types are variants of the form :
type x_label = 
  | X_constructor of string 

this allows to define X as a type not only a Constructor.

  • Stem types are variants of the form :
type x_label = 
  | E_label of E_label_t.e_label 
  | F_label of F_label_t.f_label

where E and F are Buds

  • Rule No mixture of Stem and Bud is allowed.
  • Rule Stem contains only Buds.


Any property of any entity is calculable if its Tag is known.