Keywords

General Keywords

General keywords

-

For condition alternatives, the [–] symbol indicates that the alternative is irrelevant for the outcome of the reasoning.

Location: condition alternative.

Syntax: no arguments.

DEDUCE

The keyword DEDUCE is used as an argument in a logic model

expression to pass the response value in a query.

Location: the settings of the inference method Deduce from logic model in the variable properties.

Syntax: no arguments. Usage:

  1. LogicQuery(DEDUCE)
  2. LogicQuery(100,DEDUCE)
  3. LogicQuery(VALUE(<aVariable>),DEDUCE)

EVAL

Calculations can be made by using the keyword EVAL. Remember to use the keyword VALUE if you are using any variables in your calculation. The variables you are using do not have to originate from the table in which you are making the calculation.

Location: condition alternative and action value.

Syntax: EVAL(<arithmetic expression>)

INF

The keyword INF is used to denote an infinite number in an interval specification. The negative infinite is represented by – INF.

Location: field for interval in the domain tab in the variable properties.

Syntax: no arguments.

SHOW / DISPLAY

The keywords SHOW and DISPLAY are used to make the presentation more attractive to the user. Depending on the result of the consultation the message after the keywords SHOW and DISPLAY are shown in the Results window on the player.

Location: action subject.
Syntax:

  1. SHOW / DISPLAY <aText>
  2. SHOW / DISPLAY VALUE(<aVariable>) with <X> in action value
  3. SHOW / DISPLAY with <aText> in an action value. <aText> can contain VALUE(<aVariable>)

SHOWVAR / DISPLAYVAR

The keywords SHOWVAR and DISPLAYVAR have the same effect as the SHOWDISPLAY keywords, but in this case, we are using a display variable to encapsulate the message.

Location: action subject.

Syntax:

  1. SHOWVAR / DISPLAYVAR <displayVariable>
  2. SHOWVAR / DISPLAYVAR with <displayVariable> in an action value.

VALUE

The keyword VALUE is used to refer to the value of a variable.

Location: condition alternative; action value; body of a display variable; with other keywords; in the question or explanation of a variable; or in the call to a formula, logic model or in combination with Match Web Player extension keywords.

Syntax: VALUE(<aVariable>)

Logical keywords

AND

The logical AND or conjunction for the elements of the value of a multivalued variable.

Location: condition alternative or action value.

Syntax: no arguments.

Usage:

  1. A1 | Selected Fruit || Banana AND Pineapple |
  2. C1 | FavouriteColours || Red AND Blue | ELSE |
  3. C1|Age||<10|>=10AND=<21|

ELSE

The keyword ELSE matches every value of the domain, except for

the values in the previous alternatives.

Location: condition alternative, the last one.

Syntax: no arguments.

Usage: C2 | Age || 16 | 17 | ELSE |

OR

A logical OR.

Location: condition alternative.

Syntax: <aValue1>OR<aValue2>

KNOWN/UNKNOWN

The keyword KNOWN tests whether the value of a variable is already determined.

The keyword UNKNOWN tests whether the value of a variable is not yet determined.

Location: condition alternative.

Syntax: no arguments, always used together .

Usage: C2 | Length || KNOWN | UNKNOWN |

Membership keywords

ANY

The ANY keyword has been introduced to simplify, improve and extend much of the functionality previously offered by the MEMBER keyword.

ANY is used with multi-valued variables only. In the Match context, ANY effectively means “any number of additional values (including zero or none)”. This effectively means that a condition alternative of Red AND ANY means that the alternative Red must be present, and whether or not any other alternatives exists is not taken into account. The result of this is that ANY causes an alternative to be extended to cover a larger subset of the domain.

You can also use a number of AND and OR keywords in combination with various alternatives to achieve the same effect as with the ANY keyword.

DOMAIN

The keyword DOMAIN is used together with the MEMBER keyword to imply a domain reference. See MEMBER for more details.

Location: second argument of MEMBER keyword.

Syntax: DOMAIN(<aVariable>)

MEMBER

The keyword MEMBER will test the membership of a value in a set of values. It has two arguments, one is the value to be tested and the other is the set.

Location: condition subject.

Syntax:

  1. MEMBER(<value reference>,<domain reference>)
  2. MEMBER(<value reference1>,<value reference2>)
  3. MEMBER(<value>,<domain reference>)
  4. MEMBER(<value>,<value reference>)

Usage: MEMBER(VALUE(<variable1>),DOMAIN(<variable2>))

NO

The keyword NO indicates that the condition with MEMBER evaluates to false. Its use is obligatory for a condition with MEMBER. The opposite of this keyword is the keyword YES.

Location: condition alternative for a condition subject with MEMBER.

Syntax: no arguments.

YES

The YES keyword indicates that the condition with MEMBER evaluates to true. Its use is obligatory for a condition with MEMBER. The opposite of this keyword is the keyword NO.

Location: condition alternative for a condition subject with MEMBER.

Syntax: no arguments.

List recursion Keywords

INSTANCE

The keyword INSTANCE refers to an instance.

Location: in combination with the keywords: OF, MEMBER, DISPLAY; action value; body of a display variable; and question and explanation of the properties of a variable.

Syntax:

  1. INSTANCE(<base name>(<nr>))
  2. INSTANCE(<base name>(VALUE(<quant var for N>)))

in which:

<base name>refers to an existing base name.

<base name>cannot be replaced by a VALUE reference.

Usage: C2 | Colour OF INSTANCE(Bike(3)) || Orange | ELSE |

CURRENT_INSTANCE

The keyword CURRENT_INSTANCE is used to refer to the current instance for a specific base name. The name returned is: <base name>(<nr>), in which <nr> N.

Location: action value; in combination with the keywords OF, MEMBER and DISPLAY.

Syntax: CURRENT_INSTANCE(<base name>) in which:

  1. <base name>refers to an existing base name.
  2. <base name>cannot be replaced by a VALUE reference.

OF

The keyword OF indicates a variable value of an instance.

Location: condition subject; action subject; and VALUE, as part of its argument.

Syntax: <variable>OF <instance reference>

Usage: C1 | Colour OF CURRENT_INSTANCE(Bike) || Orange | ELSE |

FRAME

The keyword FRAME refers to a frame instance

Location: in combination with the keywords: IDENTIFIER, NAME; action value; body of a display variable; and question and explanation of the properties of a variable.

Syntax: FRAME(NAME(‘Frame name’),IDENTIFIER((NAME(‘Primary key of the frame’),VALUE(‘instance of the frame instances’))),VALUE(‘Variable to retrieve’))

IDENTIFIER

The keyword IDENTIFIER is used to acces the correct frame. See FRAME

NAME

The keyword NAME is used to distinguish the name of the primary key of the to be accessed frame for IDENTIFIER. See FRAME

HEAD

The HEAD keyword refers to the first item in a list. It can be used in the condition and action space.

TAIL

The TAIL keyword refers to the remaining items in a list. It can be used in the condition and action space.

[ ]

The double brackets refer to an empty list. It can only be used in the condition space that has two alternatives, the other being [HEAD | TAIL].

REPEAT

The keyword REPEAT causes the evaluation of a table to be repeated.

Location: action subject.

Syntax: no arguments.

Usage: A4 | REPEAT || X | || X |