Home

DECOL Rule Writing Language (Syntax)

Qualification | Set Constraint | Logical Connector | Relational Property | Control Operator | Meta SDT

DECOL stands for “Decision Commitment Language”. Note that the SDT commitments are formed according to a semantic path. A semantic path has two directions. For example, the commitment

P1 = [competence level, is of, has, competence]: L (P1 (has), P1 (is of)).

The above commitment is read as "competence level is NECESSARILY of competence".
A semantic path ends with a dot ".". Readers may be careful not to write a dot before the end of a commitment.
A semantic path is often labeled and starts with an alphabetic word. Numbers, underscores may follow this alphabetic word, e.g. P1, path_A, competence1_a etc.
A semantic path is written as a lexon, which has the order of head term, role, co-role and tail term. If an element is omitted, we keep the slot empty. For example, the following examples of semantic paths are accepted:

P1 = [person, work, , ].
P2 = [person, work for, , university].
P3 = [ , , , university].

Any ontological constraints can be put after a declaration of a semantic path (or a set of semantic paths). A colon ":" is used to split a semantic path declaration and its constraint(s).

1. Qualification

1.1. Cardinality

1.1.1. Cardinality of Uniqueness

Consider a lexon that represents the fact "(a) person is born in (a) country". If we apply the Cardinality of Uniqueness to the lexon “EACH person is born in AT MOST ONE country”.
We write this SDT commitment as:

P2 = [person, is born in, is the place of birth, country]: UNIQ (P2).

There also exists spanned uniqueness. Look at the following examples:

P2_1 = [car, is driven by, drives, driver]: UNIQ (P2_1).
P2_2 = [driver, drives, is driven by, car]: UNIQ (P2_2).

They are different from the commitment below:

P2_1 = [car, is driven by, drives, driver], P2_2 = [driver, drives, is driven by, car]): UNIQ (P2_1, P2_2).

The former is verbalized as "EACH car is driven by AT MOST ONE driver, and, EACH driver drives AT MOST ONE car". The latter is verbalized as "the record pair of driver and car is UNIQUE".
The above commitments with the uniqueness constraints are direction sensitive. Seeing that the uniqueness constraint is applied only on roles (not on terms), they can in practice be written in a direction insensitive way.
For example,

p2 = [person, is born in, is the place of birth, country]: UNIQ (p2 (is born in)).

The above statement can as well be written as below.

p2 = [person, is born in, is the place of birth, country]: UNIQ (p2).

The commitment -

p2_1 = [car, is driven by, drives, driver]: UNIQ (p2_1 (is driven by)), UNIQ (p2_1 (drives)).

- is equivalent to

p2_1 = [car, is driven by, drives, driver]: UNIQ (p2_1).
p2_2 = [driver, drives, is driven by, car]: UNIQ (p2_2).

The commitment -

p2_1 = [car, is driven by, drives, driver]: UNIQ(p2_1(is driven by), p2_1(drives)).

- is equivalent to

(p2_1 = [car, is driven by, drives, driver], p2_2 = [driver, drives, is driven by, car]): UNIQ (p2_1, p2_2).

1.1.2. Cardinality of Multiple (Occurrence frequency)

Suppose that we have a lexon and we want to have a commitment as "EACH person has AT MOST 2 legs". The SDT commitment is written as:

P3 = [person, has, is of, leg]: CARD (p3 (has), 2).

If there is a lexon and a company has its own (decision) rules, such as "EACH employee has AT MOST 5 job titles". We can write an SDT commitment as:

p4 = [employee, has, is of, job title]: CARD (p4 (has), <=5).

Note that the cardinality is also called occurrence frequency in ORM (Halpin, 2001, p. 278) and in this thesis (section 4.1.2.1). The occurrence frequency defined in ORM defines the column number in a data table, while we use it as an operator to specify the occurrence of an object that plays a certain role. “CARD” is only applied on the lexon roles.

1.2. Quantification

Quantification is normally used in logic to satisfy an open formula. In predicate logic, they can be used respectively for the existential quantification and universal quantification.

1.2.1. Universal quantification

The SDT commitment:

P5 = [person, has, is of, mother]: FORALL (P5).

It expresses that "EVERY (or FOR ALL) person has mother ".

1.2.2. Existential quantification

The SDT commitment –

P6 = [person, work in, is the working place of, enterprise]: EXIST (P6).

It means that "SOME person(s) work in enterprise" or "there EXISTS (a) person who work(s) in enterprise".
Note that how to use the qualification in SDT is a future work. It is not used within the discussions of this thesis. Therefore, we have only defined it at the syntactical level for the DECOL language.

1.3. Value Constraint

It is rather easy to understand the value constraint. The mathematical operators - <,>,>=, <=, = - are verbalized as "less than", "more than", "more than or equal to", "less than or equal to" and "equal to" respectively.
For instance, we have an SDT commitment as:

P6 = [group, has, is of, member number]: P6 (member number) <=5, P6 (member number)>=2.

The above commitment means, the member number of a group is more than 2 and less than 5. Note that in the earlier version, we use a propositional separator • to separate the path and its path member. For instance,

P6 = [member, has, is of, member number]: P6• (member number) <=5, P6• (member number)>=2.

The value constraints are also used to limit the value candidates. For example, English course has only five levels – EN A, EN B, EN C, EN D and EN E. The commitment is written as follows.

P9 = [English course, has, is of, English course level]: P9 (English course level) = {EN A, EN B, EN C, EN D, EN E}.

Furthermore, if we want to train employees with the English courses level up to B, then we have the commitment written as below.

(P10 = [Employee, learn, is learned by, English course], P11 = [English course, has, is of, English course level]): P11 (English course) = {EN A, EN B}. 

Queries

If we want to get a value that is the minimum value in the value range, then we use the following statement.

(P1= [Weight, has, is of, Value]): MIN(P1 (Value)).

If we want to get a value that is the minimum positive value (>0) in the value range, then we use the following statement.

(P1= [Weight, has, is of, Value]): MIN_POS(P1 (Value)).

If we want to get a value that is the minimum negative value (<0) in the value range, then we use the following statement.

(P1= [Weight, has, is of, Value]): MIN_NEG(P1 (Value)).

If we want to get a value that is the maximum value in the value range, then we use the following statement.

(P1= [Weight, has, is of, Value]): MAX(P1 (Value)).

If we want to get a value that is the maximum positive value (>0) in the value range, then we use the following statement.

(P1= [Weight, has, is of, Value]): MAX_POS(P1 (Value)).

If we want to get a value that is the maximum negative value (<0) in the value range, then we use the following statement.

(P1= [Weight, has, is of, Value]): MAX_Neg(P1 (Value)).

1.4. Modification

Modification is a computer linguistic term. Lexons are represented in (some) language, e.g. English. One task of the commitment layer is to interpret the "meaning" of lexon terms. Understanding adverbial clauses and how they function in discourse is often very useful in interpreting subtle layers of meaning. Therefore, it is necessary to have the modification as a special kind of commitment constraint.
There are two types of modifiers for a lexon - the pre-modifier and the post-modifier. Accordingly, the modification can be pre-modification or post-modification.

1.4.1. PREMODI - pre-modification

P7 = [weather, cause, is caused by, mood]: PREMODI (P7 (weather), rainy), PREMODI (P7 (mood), bad).

The commitment means that 'weather' is pre-modified with 'rainy' and 'mood' is pre-modified with 'bad'.

1.4.2. POSMODI - post-modification

P8 = [weather, cause, is caused by, depression]: POSMODI (P8 (weather), from Belgium).

It means that 'weather' is post-modified with 'from Belgium'.
Note that modification is not discussed in this thesis. It is a future work.

1.5. Time

Time constraints are often seen as 'before', 'after', 'at the same time', 'in parallel' etc. In the current version, we only include the comparison of two facts in the time aspect. For instance, a fact (represented as a lexon) happens later than another fact.

1.5.1. Time sequence (Sequence)

Suppose that we have two facts - 'a user has a login name', 'a user logs in the system'. The former happens earlier than the latter. We model the commitment as -

(P9 = [user, has, is of, login name], P10 = [user, log in, is logged in, system]): TSEQ (P9, P10).

TSEQ can contain more member parameters, i.e.

(P9 = [user, has, is of, login name], P10 = [user, log in, is logged in, system], P11 = [user, request, is requested by, order]): TSEQ (P9, P10, P11).

The commitment above means that P9 (a user has a login name) happens before P10 (the user logs in a system), and P10 happens before P11 (the user requests an order).
The sentences, such as '... happens before (after)...', can be used to express this kind of time sequence constraint
TSEQ is used equivalently to ORDER. For instance, the commitments above can also be written as below.

(P9 = [user, has, is of, login name], P10 = [user, log in, is logged in, system]): ORDER (P9, P10).

And,

(P9 = [user, has, is of, login name], P10 = [user, log in, is logged in, system], P11 = [user, request, is requested by, order]): ORDER (P9, P10, P11).

1.5.2. Parallel events

The sentences, such as the ones that contain the phrase 'happens at the same time as', can be constrained with parallel time constraint.

(P12 = [data, is enriched by, enrich, user], P13 = [data, is enriched by, enrich, system administrator]): PARA (P12, P13).

This commitment means that data is enriched by a user; and at the same time, data is enriched by a system administrator.
Note that only time sequence is used in this thesis. Two parallel events can be described with the time sequence constraint. For instance, the commitment of “The events ‘data is enriched by user’ and ‘data is enriched by system administrator’ happen simultaneously” can be also written as below.

(P12 = [data, is enriched by, enrich, user], P13 = [data, is enriched by, enrich, system administrator]): NOT (ORDER (P12, P13)), NOT (ORDER (P13, P12)).

1.6. Aspect

If we consider a concept (that is, an SDT lexon term) as a class, then an aspect describes an iteration of the interaction between two (or more) concepts. In the field of modern programming languages, the notion of aspect is specified as services. An aspect constraint indeed is the interpretation of a (co-)role of a lexon. For example,

P14 = [data, is enriched by, enrich, user]: INVSERV (P14 (enrich), serviceX).

The aspect constraint keyword "INVSERV" stands for "invoke service". Not that serviceX is a variable, which is application dependent. We may replace serviceX with a specific service of opening a URL that contains a data uploading service.
Note that the aspect constraint is not used in this thesis because further research needs to be studied in the future.

1.7. Identification Schema

The identification schema is another level of modeling view of SDT commitments. The modeling view is NOT equivalent to the graphical view. It will be explored in the future.

2. Set Constraints

2.1. Member

The member commitment describes the members of a set. For example, the commitment -

P15 = [professor, work in, is a working place of, university]: P15 (professor) = {'Robert Meersman', 'Edward Nyssen'}.

It means that 'Robert Meersman' and 'Edward Nyssen' are the members of the set of professors. They are also called instances of the type “professor”.
We can also treat the whole lexon as the set member. For example,

P16 = [Driver's License, is issued to, has, Driver].
P17 = [Driver, has, is of, Name].
Selection 1 = {P16, P17}.

It means that I have selected lexons and into the set Selection 1.

2.2. Intersection

The intersection constraint normally describes an overlapping subset of two sets. For instance, we have two sets of professors - the math professors and the biochemistry professors. The intersection set contains the professor who teaches both math and biochemistry. Accordingly, we have a commitment as below.

(P16 = [math professor, work in, is the working place of, university], P17 = [biochemistry professor, work in, is the working place of, university]): INTERS (P16 (math professor), P17 (biochemistry professor)).

2.3. Union

The set union contains all the members from any involved sets (See Fig. 2). For instance (following the same example), we have two sets of professors - the math professors or the biochemistry professors. The intersection set contains the professors who teach math or biochemistry (or both). Accordingly, we have a commitment as below.

(P16 = [math professor, work in, is the working place of, university], P17 = [biochemistry professor, work in, is the working place of, university]): UNION (P16 (math professor), P17 (biochemistry professor)).

2.4. Equality

The equality constraint is to construct the equivalent relations between two sets. The equivalent sets are sometimes called identity sets. Set A is equivalent to Set B when Set A has exactly the same members as Set B. For example, if consider the set of people who walk in a forest and the set of people who hike in a forest equivalently, we write the commitment as below.

(P18 = [people, walk in, is a leisure place for, wood]), P19 = [people, hike in, is a hiking place for, forest]): EQUAL (P18 (walk in), P19 (hike in)).

The constraint is checked when we update the members for the set of people who walk in a forest. An equality constraint needs to be applied on the lexon terms.
Example 2,

(P10 = [teacher, teach, is taught by, student], P11 = [teacher, has, is of, salary]): EQUAL (P10 (teach), P11 (has)).

The above commitment expresses the constraint that the set of the teachers who teach courses is equivalent to the set of the teachers who get paid.

2.5. Exclusion

We say that two sets are mutually exclusive when they do not share any members. For example, suppose that we don't allow a teacher to be a student at the same time. We shall apply the exclusion constraint as written below.

(P20 = [teacher, teach, is taught by, course], P21 = [student, learn, is learned by, course]): EXCLUSIVE_OR (P20 (teach), P21 (learn)).

Or,

P20 = [person, teach, is taught by, person]: EXCLUSIVE_OR (P20 (teach), P20 (is taught by)).

These two commitments are used equivalently.
Note that the exclusion constraint is equal to the disjunction connector in logics.

2.6. Subset

Set A is a subset of Set B when all the members of A belong to B. The subset constraint is applied on the roles of two lexons that share a lexon term. For instance, in the context of university, the set of the persons who are lecturers is a subset of the set of the persons who are teachers.

(P22_1 = [person, has job title, is of, lecturer], P22_2 = [person, has job title, is of, teacher]): SUBSET (P22_1 (has job title), P22_2 (has job title)).

2.7. Subtype

We use subtyping to classify an object type. For instance, if we specify the object type “bus driver” as a subtype of “driver”, then we write this commitment as below.

P13 = [bus driver, is a, is, driver]: SUBTYPE (P13 (bus driver), P13 (driver)).

The above commitment contains the subtype for one lexon. This constraint can also be applied to two lexon terms that belong to two different lexons, e.g.

(P13_1 = [bus driver, drive, is driven by, car], P13_2 = [driver, has, is of, driver’s license]): SUBTYPE (P13_1 (bus driver), P13_2 (driver)).

Note that the subtype can also be applied to lexon roles when a lexon contains “is-a” taxonomical role pairs. For instance, the first commitment can be written equivalently as below.

P13 = [bus driver, is a, is, driver]: SUBTYPE (P13 (is a)).

2.8. Mandatory

In database theory, a role is mandatory if and only if, for all states of the database, the role must be played by every member of the population of its object type.
There are two ways to write mandatory constrained commitments.
Method 1:

P30 = [driver, has, is issued to, driver's license]: L (P30).

It is equivalent to

P30 = [driver, has, is issued to, driver's license]: L (P30 (has, is issued to)).

And Method 2:

P30 = [driver, has, is issued to, driver's license]: MAND (P30).

It is equivalent to

P30 = [driver, has, is issued to, driver's license]: MAND (P30 (has, is issued to)).

L is used as the necessity operator in modal logic. The reason why we need two different names for the mandatory constraints is for the convenience of different kinds of users.

3. Logical Connectors

There are five basic propositional logic connectives. They are Negation, Conjunction, Disjunction, Implication and Equivalence (bi-conditional).

3.1. Negation

We use NOT to indicate the negation connective in the commitment. For example, the commitment -

P18 = [customer, is listed in, list, customer category]: NOT (P18 (is listed in), P18 (list)).

It can be verbalized as: a customer is NOT listed in a customer category, and can also be written as below.

P18 = [customer, is listed in, list, customer category]: NOT (P18).

3.2. Conjunction

A conjunction connective is read as 'and'. We use AND to formalize the semantics of conjunction constraint for the semantic paths.

(P19 = [STAR member, work for, is a working place of, STAR lab], P20 = [STAR member, work for, is a working place of, VUB]): AND (P19, P20).

The above commitment links two lexons together, which express that "a STAR member works for the STAR lab AND he works for VUB".

3.3. Disjunction

The disjunction operator is to link multiple choices of several lexons with the logical disjunction operator. Such commitments are designed with “OR”. For instance, if we have a commitment as "a person EITHER works for VUB, OR works for ULB". We use exclusive-or constraint for the commitment.

(P21 = [person, work for, is a working place of, VUB], P22 = [person, work for, is as working place of, ULB]): OR (P21, P22).

3.4. Implication

For example, the rule “IF a customer is not listed in the customer catalog THEN the order manager creates a new customer” can be expressed as a commitment:

(p23 = [Customer, is Listed In, list, Customer Catalog], p24 = [Order Manager, create, is Created By, New Customer]): IMPLIES (NOT (p23 (is Listed In), p23 (list)), p24).

3.5. Equivalence

As the equivalence operator is often used to check the equivalence of two formulae, we do not include it here. It should be a function at the application level to check, for instance, the similarity of two SDT commitments.

3.7. Possibility

Let’s look at this situation 1: a cat has skin and the skin color is possibly black. We write this commitment as below.

(P31 = [cat, has, is of, skin], P32 = [skin, has value, indicate, color]): P32 (color) = P {black}.

Note that we use P to indicate the possibility constraint and the set member operator {} to add the possible value. The above commitment is different from the commitment as below.

(P31 = [cat, has, is of, skin], P32 = [skin, has value, indicate, color]): P32 (color) = {black}.

The commitment without "P" is the value constraint. Therefore, the color can only be the set member - 'black'. However, the commitment with "P" means that the color can be 'black' or something else.

4. Relational properties

Halpin (2001) groups the following main relation properties in ORM: reflexive, symmetric, transitive (also called acyclic), antisymmetric, asymmetric, irreflexive and intransitive. We follow the same naming as in ORM ring constraints. ans – antisymmetric, as – asymmetric, ac – acyclic, ir – irreflexive, it – intransitive and sym – symmetric.
For example, if we want to apply the reflexive constraint on lexon . We write it as follows.
P33 = [person, teaches, is taught by, person]: RING_REF (P33 (teaches)).
Similarly, we write the relation properties of symmetric, antisymmetric, asymmetric, irreflexive and intransitive in the commitments as below.

P33 = [person, teaches, is taught by, person]: RING_SYM (P33 (teaches).
P33 = [person, teaches, is taught by, person]: RING_TRA (P33 (teaches)).
P33 = [person, teaches, is taught by, person]: RING_ANS (P33 (teaches)).
P33 = [person, teaches, is taught by, person]: RING_AS (P33 (teaches)).
P33 = [person, teaches, is taught by, person]: RING_IR (P33 (teaches)).
P33 = [person, teaches, is taught by, person]: RING_IT (P33 (teaches)).

Note that these relational properties are not used in this thesis because the application domain goes beyond this thesis. How to use these constraints is the future work.

5. Control Operators

In this thesis, there are two types of control operators: trans-context equality and trans-context subtyping. They are used when lexons are defined in different contexts.

5.1. Trans-Context Equality

The trans-context equality is used to control the population of a set. For example,

(P1 = [Teacher, teach, is taught by, Course], P2 = [Student, learn, is learnt by, Course]): TRANSCONTEXT_EQUAL (P1 (Course), P2 (Course)).

The above commitment means that all the instances in “Course” for P1 are equivalent to the instances in “Course” for P2.
The trans-context equality is very similar to the equality constraint. The difference between them is trans-context equality is applied to two lexons within two different contexts, while the equality constraint is applied to one lexon, or two lexons within the same contexts.
Note that the trans-context equality is always applied to two terms that belong to two lexons in two different contexts. And these two terms need to have the same name.

5.2. Trans-Context Subtyping

The trans-context subtyping is used to control the subtypes of an object type. For instance,

(P1 = [Teacher, teach, is taught by, Course], P2 = [Student, learn, is learnt by, Course]): TRANSCONTEXT_SUBTYPE (P1 (Course), P2 (Course)).

6. Meta SDT

A meta-SDT contains meta decision rules in the form of a decision table. We use the following statement to specify the location of a meta-SDT.

P=[META-SDT, has, is of, LOCATION]: P(LOCATION) = "C:\SDT Files\x.xml".

We use the following statement to specify the title of a meta-SDT (if it's unique).

P=[META-SDT, has, is of, TITLE ]:P(TITLE) = "TABLE X-1023".
 

Invocational SDTs

P6 = [GOTO SDT4, is instance of, has instance, INVOKE_COMMAND].

P7 = [GOTO SDT4, has, is of, FILE_LOCATION]: P7 (FILE_LOCATION) = “C:\\x.xml”.

 

More Examples

Example 1:  set the value range for a value that is annotated with predefined value types

The predefined value types are Float, Integer, Boolean and String (Single) and String (Set).

If we want to define a value that is a Float and it has a value range of [0,1], then the DECOL statement is written as follows.

(P1= [Weight, has, is of, Value], P2 = [Weight, has value type, is value type of, Float]): P1 (Value)>=0, P1 (Value) <=1.

P2 expresses the annotation lexon.

Example 2: set a value that is minimum in the value range

If we want to define a value that should be a minimum value in a value range of [0,1], then we write it as follows.

(P1= [Weight, has, is of, Value], P2 = [Weight, has value type, is value type of, Float]): P1 (Value)>=0, P1 (Value) <=1.

Type of Unit of Measurement

P1 = [Temperature, has, is of, Value]: MEASUREMENT_UNIT(P1 (Value), Celsius Degree). 

References

Yan Tang, Semantic Decision Tables - A New, Promising and Practical Way of Organizing Your Business Semantics with Existing Decision Making Tools , ISBN 978-3-8383-3791-3, LAP LAMBERT Academic Publishing AG & Co. KG, Saarbrücken, Germany, 2010.
http://www.amazon.co.uk/Semantic-Decision-Tables-Promising-Organizing/dp/3838337913

Other Issues

The above commitment contains a constraint that ensures the situation as follows. The subtypes of “course” in the context of P1 are equivalent to the subtypes of “course” in the context of P2.
In this thesis, we have only defined the control operators of trans-context equality and trans-context subtyping. A future work of the control operators will be inspired by the business process models (BPM).

[last update:2012-03-15]