![]() There is a danger of collision with inherited symbols. There is no implementation of the Prolog module system. Package, but there is never any ambiguity between use of a Prolog name and a Lisp name. Some symbols exportedįrom the prolog package are eq to symbols exported from the common-lisp Variable is the symbol ` ?' (that is, ` prolog:?'). Lisp symbols that have names that begin with the ` ?' character. Lisp S-expression syntax is used rather than Edinburgh syntax,Īlthough support for Edinburgh input may be provided in the future. Typically contain both Lisp and Prolog code intermixed, it is generally a good idea toĬompile the files so that the Lisp code is compiled.Īll public symbols are exported from the prolog package. Prolog source files may be loaded either compiled or interpreted, as Prolog predicatesĪre automatically compiled upon first use. What is provided is the basic Prolog engine for logic programming. Reason to if there is motivation to make Allegro Prolog a self-standing Prolog These choices may be reconsidered in the future if there is There is also no support for operator syntax (e.g. Implemented, as they are a subset of the standard Common Lisp operators available using lisp/2. Many standard Prolog arithmetic, predicate operators, and I/O operators are not Its purpose is to provide Prolog logic programmingĪs an integrated extension to Common Lisp for use in Lisp programs, not as a separate Highly-scalable data sets can be implemented by extensions outlined below.Īllegro Prolog does not intend to be an ISO-compliant Prolog, nor does it Reasonably large collections of data to be specified as regular Prolog rules. The Lisp function automatically captures these as data instead of code. Special treatment is givenįor facts, that is, rules with no variables in the head and no clauses in the body. A single Lispįunction combines all rules for each distinct functor/arity. Prolog predicates are translated to compiled Common Lisp functions. Interface in both directions between Common Lisp and Prolog. Making an industrial-strength Prolog programming environment with a flexible calling The code has been further optimized and useful extensions provided, Implementation developed by Peter Norvig in Paradigms of Artificial Intelligence ![]() Some programming knowledge of both Prolog and Common Lisp.Īllegro Prolog is an implementation of Prolog in Common Lisp. This document is not intended as an introduction to programming in Prolog. Module and evaluate (shadowing-import '(prolog:=)) and then (use-package The cg-user package without first shadowing one or the other symbol. This will happen, for instance, if you try to use the prolog package in = which will signal a package conflict if there is an attempt to use both It happens that both the prolog and cg packages export a symbol named Probably find it convenient to execute (use-package :prolog) also. If you intend to use Prolog interactively you will Symbols are exportedįrom the prolog package. The prolog module can be loaded with (require :prolog). Release 1.1.2 of Allegro Prolog continues a sequence of
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |