QuLog relations and actions are both
typed and
moded. The modes determine which argumements must be given as
ground terms (terms with no unbound variables) in calls, and which arguments will be ground if the call succeeds. Its functions are just typed, as all their arguments must be given as ground terms. Functions always return ground term values. The types and modes are so that we can guarantee at compile time that there will be no runtime failures or errors due to wrongly typed arguments, or due to arguments that
must be given not having been computed before the call, particularly calls to
QuLog primitives. We need this to make
QuLog (and
TeleoR) a serious agent and robotic programming language. The result of these constraints is that all but a handful of primitives of
QuLog, and
most program defined relations, ground all their arguments if they succeed.
Subsections