3.1 Concept types and type-hierarchies in Prolog+CG

How to form a type hierarchy

In Prolog+CG, we form type hierarchies like this:

  1. Write a supertype,
  2. Write a ">" (greater-than sign, without the quotes),
  3. Write a comma-separated list of subtypes,
  4. Finish with a "." (period, without the quotes).
  5. Repeat steps 1. - 4. for all types in the hierarchy that have subtypes.

Schematic representation

This could also be represented schematically as:

Supertype > Subtype1, Subtype2, ..., SubtypeN.

Repeat this pattern for all types that have subtypes.


What you have just seen is an example of a specification of syntax. Next, we look at what syntax is and why you must be aware of it.

PrevLite: 3 Concept types and instances
NextLite: 3.1.1 Syntax

Prev: 3 Concept types and instances
Up: 3 Concept types and instances
Next: 3.1.1 Syntax