This is a continuation of the tutorial in the Foundations of Knowledge Representation in Cyc. This section covers the Syntax of CycL.
CycL constants denote specific individuals or collections, such as individual relations, individual people, types of computer programs, or types of cars. Each CycL constant is prefixed by the string ‘#$’ (pronounced “hash-dollar”).
Here’s a sampling of some constants. Each constant in the first group denotes a collection. For example, #$Dog denotes the collection of all dogs, #$SnowSkiing denotes the collection of all snow skiing events, and #$PhysicalAttribute denotes the collection of physical attributes.
Each constant in the second group denotes an individual. For example #$BillClinton, #$Rover, and #$DisneyLand-TouristAttraction denote partially tangible individuals, individuals you can physically pick out. #$likesAsFriend, #$bordersOn, #$objectHasColor, #$and, #$not, #$implies, and #$forAll also denote individuals, but these are individual relations, rather than tangible objects.
Each constant in the final group denotes an attribute value. Attribute values are specific properties that something can have, such as being red in color or being sandy-soiled
A CycL formula is a relation applied to some arguments, with parentheses around the group. The slide contains three examples of CycL formulas.
The first two of these formulas are CycL sentences. They are well-formed formulas with a truth-function in the first position (a.k.a the arg0 position). [We'll say more about truth functions shortly.] All sentences have a truth value; that is, it may be true or false. The first sentence says that #$GeorgeWBush is an instance of #$Person. The second sentence says that #$GeorgeWBush likes #$AlGore as a friend.
The third formula is not a sentence, and cannot be true or false. Instead, it is a Non-Atomic Term (also known as a “NAT”). Instead of denoting a sentence, this formula gives us a new term, referring to a particular event: the birth of Jacqueline Kennedy Onassis.
The next two slides look at CycL Sentences and CycL Non-Atomic Terms in more detail.
Let’s look at sentences again. Each CycL sentence starts with a truth function. Truth functions in CycL are easy to recognize because they begin with a lower-case letter. Types of truth functions include predicates, logical connectives, and quantifiers. They are called truth functions because the result of applying them to some arguments is a sentence that’s true or false.
We'll look at logical connectives and quantifiers in a moment. For now, let's focus on predicates. The first four examples, #$likesAsFriend, #$bordersOn, #$objectHasColor, and #$isa are all predicates. Each of the two sample CycL sentences is constructed by applying one of these predicates to some arguments.
In the first case, the predicate #$isa, which means "is an instance of," is applied to the arguments #$GeorgeWBush, which denotes the individual George W. Bush, and #$Person, which denotes the collection of all persons. The resulting sentence says that George Bush is an instance of person.
In the second case, the predicate #$likesAsFriend is applied to the arguments #$GeorgeWBush and #$AlGore. The resulting sentence says that George Bush likes Al Gore as a friend.
CycL sentences are used to form assertions (to tell something to Cyc) and to form queries (to ask Cyc something).