Reading-in declarations
Clauses represent either facts, rules or goals.
Goals encountered when consulting a file or reading-in an object declaration
are interpreted as a command.
As an alternative to the way specified above,
object declarations in DLP may also be read in as a sequence
consisting of goals and program clauses.
For ordinary object declaration a preprocessor takes care
of the appropriated conversion
as sketched below.
As an example, the declaration
\hspace{1.0cm}
\b{tabular}{l @{\hspace{1.5cm}} c @{\hspace{1.5cm}} l }
object a { & & object(a). \\
var k, n=1. & corresponds to & var(k, n=1). \\
& the sequence & \\
} & & end_object.
\e{tabular}
The clauses and goals are read-in one by one, by the global object io,
and sent to the global supervisor.
For unit clauses,
it is tested whether they must be interpreted
as a command. %% C.f. section \ref{code:parse}.
Each newly declared DLP object is then
added to the object list of the global knot.
As a remark,
the parser we used
allows brackets to be omitted in a number of cases.
However, brackets may always be used.