Previous: , Up: Syntax   [Contents][Index]


3.10 Programs

A Qulog program comprises a sequence of:

A QuLog/TeleoR program also includes TeleoR procedures.

They may appear in any order except that all the rules for a particular relation, action or function must be contiguous. A type declaration for a relation, action, function or procedure does not need to be given immediately before its code. The rules of a TeleoR procedure are all included inside {...} braces following the procedure head.

An important constraint is that each type definition, type declaration, relation, action and function rule must begin at the left end of a new line. If one needs to be continued over more than one line all but the first line must be indented from the left end by at least one space or tab. Fullstop terminators may be given at the end of each definition, declaration or rule but is not needed. It is the text starting at the extreme left end of a line after one or more newlines that terminates the previous program statement.

TeleoR procedures must also begin at the left end of a line but inside the {...} there are more relaxed layout constraints. Each TeleoR rule can start anywhere on a new line. The parser can use the rule syntax to determine that it is the start of a new rule. Again fullstop terminators may be given at the end of each rule but are ignored.


Previous: , Up: Syntax   [Contents][Index]