3.2.2 Examples

Example

For example:

Entity > Animate.
Animate > HumanBeing, Animal.

HumanBeing = Peter, Paul, Mary.
Animal = Garfield, Odie, Eeek.

(This example can be found in the AAU directory as "Type-hierarchy2.plgCG".)

Explanation

First, we have a very small type-hierarchy (specified with ">"). This declares our types.

Then we have the catalog of instances:

  • The "HumanBeing" type has three instances: "Peter", "Paul", and "Mary".
  • The "Animal" type also has three instances: "Garfield", "Odie", and "Eeek".

Next

Next, we give some further rules.


PrevLite: 3.2.1 The rules
NextLite: 3.2.3 Further rules

Prev: 3.2.1 The rules
Up: 3.2 Concept type instances in Prolog+CG
Next: 3.2.3 Further rules