The second type of directive comprises Cyc predicates occurring within the scope of a (previously occurring) Constant directive. The Constant directive sets the “current” constant, which then is understood to be the first argument to assertions generated from the following predicate directive expressions.
(Note that predicate directive names, unlike reserved word directive names, are case-sensitive. After all, a predicate directive name is just the name of a CycL predicate, and CycL constant names are case-sensitive.)
Each predicate directive is followed by a colon delimiter, one or more data objects, and a period. That is, the form of a predicate expression in KE Text syntax is
<predicate>: <data-object-1> [<data-object-2>…<data-object-n>].
The data objects following the colon delimiter comprise the additional argument(s) to the predicate in the predicate directive.
isa: HumanCyclist ElectricalEngineer.
feelsTowardsObject: (SimoneSiegel Affection Positive)
(BillJ Curiosity Positive).
comment: “Keith Goolsbey is a member of the Cycorp technical board.”.
In this example, the Constant directive sets the “current” constant to be Goolsbey. Goolsbey is then assumed to be the first argument to assertions formed from the three following predicate directive expressions (the expressions which begin with “isa”, “feelsTowardsObject”, and “comment”).
If the predicate directive is the name of a binary predicate (such as isa and comment), each of the data objects following the colon delimiter is assumed to be part of an assertion in which the predicate directive is the predicate, the default constant is the first argument, and the data object is the second argument.
If the predicate directive is the name of an n-ary predicate where n is greater than 2 (such as #$feelsTowardsObject), each of the data objects following the colon delimiter must be a list. The elements in the list are assumed to be part of an assertion in which the predicate directive is the predicate, the default constant is the first argument, and the elements (in listed order) are the remaining arguments. So, when evaluated and processed, the KE text fragment in the example above would result in the addition of the following six assertions to the KB:
(#$isa #$Goolsbey #$HumanCyclist)
(#$isa #$Goolsbey #$ElectricalEngineer)
(#$feelsTowardsObject #$Goolsbey #$SimoneSiegel #$Affection #$Positive)
(#$feelsTowardsObject #$Goolsbey #$BillJ #$Curiosity #$Positive)
(#$comment #$Goolsbey “Keith Goolsbey is a member of the Cycorp technical board.”)
Note that because any number of data objects may follow a colon delimiter preceded by a predicate directive, one KE text expression may result in several assertions being added to the knowledge base. Any reserved word directive immediately preceding such a compound KE text expression (i.e., an expression yielding more than one assertion) will apply to all of the assertions resulting from the expression.
Also, note that since a “canonical” CycL Formula can be entered in KE text by using the F directive, the assertions resulting from the expressions in the example above are exactly the same as the assertions resulting from the expressions in the example immediately below.
F: (isa Goolsbey HumanCyclist).
F: (isa Goolsbey ElectricalEngineer).
F: (feelsTowardsObject Goolsbey SimoneSiegel Affection Positive).
F: (feelsTowardsObject Goolsbey BillJ Curiosity Positive).
F: (comment Goolsbey “Keith Goolsbey is a member of the Cycorp technical board.”).
If Cyc had the unary predicate “dog”, indicating membership in the class of all dogs (or the quality of “dogness”), assertions using this predicate could be entered with an expression such as this:
dog: Brandy .
F: (dog Brandy) .
|Reserved Words||Home||Special Handling for TheAssertionSentence|