• DOMAINS
•
PREDICATES
•
CLAUSES
•
GOALS
What is DOMAIN?
. The section of
code where we define the legal values for any type that is not defined
as a standard type. This may include aliasing of types
(renaming).
. Domain
declarations can also be used to define structures that are not defined by the
standard domains.
. What are
PREDICATES?
. The PREDICATES
section is where we define predicates to be used in the
CLAUSES section and define the domains for their
arguments.
. Symbolic name of
a relation
. We found it best
to think of predicate declarations as function prototypes.
. Ex: age(string,
integer )
. What are CLAUSES
. Clauses are the
heart of the program.
. A clause is an
instance of a predicate, followed by a period.
. Clauses are
of two types:
. Facts
. Rules
Clause Facts:
o Facts in the
CLAUSE section are relations that are known to be true by the
programmer.
o Self-standing
basis for inference
o A property of an
object or a relation between objects.
o Ex:
red(car)