Verification of Expressions
Correct Gellish expressions satisfy a number of rules. A few very important ones are described below. Others are implemented in the Gellish Communicator software reference application that is available on GitHub.
Rule 1: Ideas shall be expressed as binary relations between things
Ideas, such as assertions, queries, etc. shall be expressed in Gellish as one or more binary relations, each of which shall relate two things, thus forming a Gellish expression that represent a single line in the Gellish syntax (the expression format). A related thing may be anything, including an individual thing or a kind of thing, a single thing or a plural thing (collection) or a relation and may be real or imaginary. Only in the case of denotations by aliases such as synonyms and translations it is allowed that the UIDs that represent the related things shall be the same while their names may be different.
Rule 2: Each thing shall be defined by an explicit classification or specialization relation
This implies that each Gellish expression shall only only relate things (individual things and kinds of things or concepts) that are properly defined in one of the following three ways:
1. It is a concept that is already defined in the Gellish Dictionary and is selected from that dictionary (its name or synonym and unique identifier).
2. It is a new concept (kind of thing) that is properly defined according to the document ‘Gellish proper definition of a concept’ or ‘rules for proper definitions of concepts’. This includes that the new concept is defined by the specification of an explicit specialization relation that defines it as a (proprietary) subtype of one of the concepts that already exist in the Gellish English Dictionary. Definitions of new concepts can be issued as proposals for inclusion in the Open Source Gellish English dictionary.
For example: the definition of the concept oak tree as a subtype of tree is specified as follows:
- oak tree is a kind of tree that differs from other kinds of trees by the aspect(s) that ….
3. It is a new individual thing that is properly defined by means of at least one classification relation with one of the kinds of things that is selected from the Gellish Dictionary or by one of the new (proprietary) subtypes. For example, the introduction of John Doe as an individual person is specified as follows:
- John Doe is classified as a man (optionally described by some characteristics).
Rule 3: Each relation shall be classified by a standard kind of relation
Each relation shall be classified by a kind of relation that is selected from the Gellish dictionary. Private extensions of the Gellish Dictionary with additional kinds of relations are possible, provided that is done conform the rules for defining new concepts.
For example, for an electronic catalog of fasteners it may be requirement that a bolt shall have a length. Such a requirement shall be expressed by a relation that is classified by a standard kind of relation with unique identifier 4956 and shall have as ‘name’ the standard phrase ‘shall have as aspect a’. The Gellish expression then becomes:
|UID of left hand object||Name of left hand object||UID of idea||UID of kind of relation||Name of kind of relation||UID of right hand object||Name of right hand object|
|340016||bolt||1||4956||shall have as aspect a||551353||length|
Rule 4: The kind of relation shall be compatible with related objects
The kind of relation that classifies a relation determines the kinds of roles that shall be played by the related things. This implies that a related thing shall be suitable to play the kind of role that is required by the relation type. This is a semantics consistency rule.
Example 1: Assume that A is a performer of B. This implies that A shall be a physical object, because the ‘is a performer of’ kind of relation requires a first role (performer) that can only be played by a physical object. The second role (performed) is a role that can only be played by an occurrence. So B must be an occurrence.
Example 2: Assume that C is a kind of D. This implies that C is a concept (kind of thing), because the ‘is a kind of’ relation requires a first role that is a subtype, which can only be played by a concept (or a subtype of concept).
Further guidance and explanation about these requirements is provided in the chapter ‘Gellish English Dictionary Extension’ in the book ‘Semantic Information Modeling Methodology’.
Continue with How to write Gellish enabled software