Prolog in General

BAP Online Manuals : Compiler Reference Manual : Language Description: : Prolog in General
Previous: Language Description:
Next: Clocksin & Mellish

3.5.1. Prolog in General

Brain Aid Prolog is a standard PROLOG compiler, expanded with parallel functionality using library calls. This means that a single process is executed just like a sequential PROLOG program known to the user. The control flow and syntax is closely related to the standard as described by Clocksin and Mellish.

The trace model also fits into this standard, but it is supported by the means of extra debug windows . We believe that this is more comfortable.

However, there are some differences. In contrast to standard PROLOG where strings normally are represented by lists of characters, Brain Aid Prolog does not distinguish between library is provided to manipulate both strings and atoms, allowing all necessary operations (i.e. concatenation) and type conversions. These differences are founded in the distributed nature of the BAP system (a standard representation of atoms would require something like a centralised atom-server) and the speed requirements (fast treatment of both, atoms and strings). Additionally the user may use 'constants' instead of 'atoms' using the pre-processing capabilities of the compiler.

Characters are denoted as `<char>, for example `A. Characters may be converted to strings or integers .

The syntax of Brain Aid Prolog is extended by the means of keywords . A keyword has always to be written in capital letters and must be the first non-blank space in a line. (A Brain Aid Prolog source is split into separate sections by these keywords. The intention in the introduction of these keywords was to allow the parser to identify these sections easily and then process them concurrently, possibly speeding up the process of compilation.) A separate chapter contains the detailed description of the keywords.

Unfortunately, the grammar rule notation is not implemented yet. This feature might be added in future, especially if it is requested by a fair amount of users.


BAP Online Manuals : Compiler Reference Manual : Language Description: : Prolog in General
Previous: Language Description:
Next: Clocksin & Mellish