2.6 Higher order QuLog with function rules and action sequence rules

What we now had was a QuLog extension of Qu-Prolog implemented using operator declarations and the term expansion feature. This is a quick and straightforward way of implementing a language extension of a Prolog system. To implement all the functionality of a multi-threaded robotic agent we needed to use the untyped Qu-Prolog as well as the typed TeleoR procedures and typed knowledge relation rules.

However, having to implement our agents half in a typed language and half in an untyped language was unsatisfactory. We therefore decided to extend the embryonic QuLog to a much richer typed knowledge representation language. We decided to make it higher order with function and well as relation definitions. In addition, we added typed action sequence rules language with which we could implement the agent functionality for which we currently had to use untyped Qu-Prolog. This new QuLog would not be implemented as an operator extension of Qu-Prolog, but as a quite separate language compiled into Qu-Prolog. The key features of this stand alone typed higher-order QuLog, as described in this manual, are:

  • static relations and functions can be defined by sequences of guarded rules, with the guards being relation queries
  • non-robotic actions such as file I/O, thread forking, inter-thread communication and dynamic relation updates cannot be called from relation or function rules but must be invoked from a new class of action sequence rules
  • it has a special class of dynamic relations, that can only be defined by facts, which can be updated by primitive actions
  • named functions, relations, actions and TeleoR procedures can be passed as arguments and returned as values. The QuLog sub-type relation is extended to cover the four code types
  • implicitly existentially quantified named variables of negated conditions, and implicitly universally quantified named variables in forall conditions, have to be explicitly quantified.

On This Site