March 2001
Intermediate to advanced
400 pages
8h 35m
English
A rule is an axiom, or statement of truth, that has more than one structure. In a rule, the truth of the first structure follows from the ability to prove the remaining structures. For example, you could add to a program a rule that displays itself as
custCharge (Name, Fee) :-
charge(City, Fee), customer(Name, City);
The “:-” symbol is the “if” symbol. Prolog and Logikus use this symbol rather than a comma after the first structure in a rule. This convention emphasizes the meaning of rules: The first structure is true if the latter structures are provable. Figure 12.4 shows the Rule class.
Read now
Unlock full access