Prolog is a logic programming language, a language based on first-order logic and horn clauses. Prolog is a back-chaining system, that is, it starts with a desired result and attempts to derive a path to that result using truth rules it has been given.
The new Prolog implementation in Allegro CL, called Allegro Prolog, is based on the implementation developed by Peter Norvig in Paradigms of Artificial Intelligence Programming (June, 1991). All rules for a given functor/arity pair are automatically compiled into a single, highly-optimized Lisp function. Execution speed in excess of 1 Mlips can be attained on current hardware, and the Prolog engine has been optimized to run essentially cons free. Special treatment is given for facts, that is, rules with no variables in the head and no clauses in the body. The Lisp function automatically captures these as data instead of code, allowing reasonably large collections of data to be specified as regular Prolog rules. Larger, highly-scalable data sets can be implemented by extensions in Lisp.
Allegro Prolog does not attempt to be ISO compliant, nor does it implement the entire Prolog language. Its purpose is to provide Prolog logic programming as an integrated extension for Common Lisp programs, not as a separate language. Many standard prolog arithmetic, predicate operators, and I/O operators are not implemented, as they are a subset of the standard Common Lisp operators available by calling out to Lisp. There is also no support for operator syntax (e.g. infix notation), as input notation is subsumed by sexpr syntax. These choices might be reconsidered if there is reason to extend Allegro Prolog into a self-standing Prolog implementation, but the current purpose is only to provide Lisp with the central Prolog engine for logic programming.
Allegro Prolog is included with the Allegro CL 7.0 distribution and is available by patch for Allegro CL 6.2. The patch will be downloaded by sys:update-allegro.
The documentation for Allegro Prolog is here. This documentation is preliminary and assumes a familiarity with Prolog.
|Copyright © 2018 Franz Inc., All Rights Reserved | Privacy Statement|