Generic reference expressions can refer to one or more items, attributes, variable or parameter values, or list or array elements in certain contexts. For instance, the generic reference expression
any custom-object connected to my-valve in the antecedent of the following rule refers to a set of items:
whenever the authors ofany custom-object connected to my-valvereceives
a value then
inform the operator that
"The object [the public-name of the custom-object] has been edited.";
any symbol in any symbol-list in the antecedent of the following rule refers to a set of values:
ifany symbol in any symbol-listis not ok
then inform the operator that
"Validation of [the superior item of the symbol-list] found discrepancies." ;
To create a generic reference expression:
generic-reference-expression := {class-name | type} [local-name]
[generic-reference-qualifier]
To create a generic reference qualifier expression:
generic-reference-qualifier :=
{upon kb-workspace} | {connected connected-expression} |
{at at-expression} | {nearest to item} |
{superior to kb-workspace | object-attribute} |
{that is relation-name item} | {named by symbolic-expression} |
{in {g2-list | g2-array} } | {name of item}
connected to my-valve:
whenever the authors ofany custom-object connected to my-valvereceives
a value then
inform the operator that
"The object [the public-name of the custom-object] has been edited." ;
You use particular quantifiers in certain contexts, as summarized in this table:
It is possible to use the
every quantifier in outer and inner statements:
for every tank T in tank-list1 conclude that the background-color of
the workspace of every T is the symbol blue
every statement cannot refer to a local variable declared in the first, and a statement such as the example here would not compile correctly.
For example, the
there exists expression requires only the a or an quantifier for its embedded generic reference expression. This rule's antecedent tests whether any items exist that have a value other than OK in the Notes attribute:
initially
if there exists an action-button such that
(the text of the notes of the action-button /= "ok")
then inform the operator that
"At least one action-button in this KB has errors.";