Next: , Up: Built-Ins   [Contents][Index]


4.1 Introduction

This section contains descriptions of the functions, relations and actions of the Qulog library. In the interpreter you can see all their names and types by entering the command

| ?? stypes.

Many of these are Qu-Prolog primitive relations ’lifted’ to QuLog by giving them appropriate type/mode declarations. Other Qu-Prolog relations and actions can be ’lifted’ to the Qulog level be giving them a QuLog type declaration in your QuLog program file.

For example, if the primitives described in List Processing had not already been made available for use in QuLog, all you would have needed to do was include their type declarations as given in that section.

As another example, there is a Qu-Prolog primitive

between(From,To,N)

for generating or testing an integer value N between given integer values From and To.

To use this in a QuLog program, add the moded type declaration

between: (integer,integer,?integer) <=

to your program file. It tells the QuLog mode/type checker that the relation is a Qu-Prolog primitive (that will be checked), and that in every use the first two arguments should be given as integers but the third integer argument may be given or may be returned as value of an unbound variable.