kind_von(karl_VI, leopold_I).
kind_von(maria_theresia, karl_VI).
kind_von(joseph_II, maria_theresia).
kind_von(joseph_II, franz_I).
kind_von(leopold_II, maria_theresia).
kind_von(marie_antoinette, maria_theresia).
:- kind_von(Kind, Elternteil).
-----         n599 ------------------------
Goals are inserted like ordinary program text. Such goals are called assertions (like assertions in procedural languages). They are part of the program. Every time an example is saved such goals are all tested immediately. (In our case the assertion is true, since there are some children around.) Typical example/problem statements often involve phrases like ... P is true for ..., is false for .... Such parts can be formulated directly as goals in the program text.

A predicate can thus be specified before being implemented. In contrast, when using a toplevel shell it does not make sense at all to enter queries about predicates that do not yet exist. When using a toplevel shell a separate pass for testing programs is needed. Too often programs are written first and then test cases are conceived - if at all. Recently, the idea of testing prior to coding in software development has been popularized by the extreme programming (XP)-movement.
**NEXT:Continue.


Valid HTML 3.2 [185.911, UWN]