Current stable version is gprolog-1.2.16
GNU Prolog is a free Prolog compiler with constraint solving over finite domains developed by Daniel Diaz.
GNU Prolog accepts Prolog+constraint programs and produces native binaries (like gcc does from a C source). The obtained executable is then stand-alone. The size of this executable can be quite small since GNU Prolog can avoid to link the code of most unused built-in predicates. The performances of GNU Prolog are very encouraging (comparable to commercial systems).
Beside the native-code compilation, GNU Prolog offers a classical interactive interpreter (top-level) with a debugger.
The Prolog part conforms to the ISO standard for Prolog with many extensions very useful in practice (global variables, OS interface, sockets,...).
GNU Prolog also includes an efficient constraint solver over Finite Domains (FD). This opens contraint logic pogramming to the user combining the power of constraint programming to the declarativity of logic programming.
· Prolog system:
· conforms to the ISO standard for Prolog (floating point numbers, streams, dynamic code,...).
· a lot of extensions: global variables, definite clause grammars (DCG), sockets interface, operating system interface,...
· more than 300 Prolog built-in predicates.
· Prolog debugger and a low-level WAM debugger.
· line editing facility under the interactive interpreter with completion on atoms.
· powerful bidirectional interface between Prolog and C.
· Compiler:
· native-code compiler producing stand alone executables.
· simple command-line compiler accepting a wide variety of files: Prolog files, C files, WAM files,...
· direct generation of assembly code 15 times faster than wamcc + gcc.
· most of unused built-in predicates are not linked (to reduce the size of the executables).
· compiled predicates (native-code) as fast as wamcc on average.
· consulted predicates (byte-code) 5 times faster than wamcc.
· Constraint solver:
· FD variables well integrated into the Prolog environment (full compatibility with Prolog variables and integers). No need for explicit FD declarations.
· very efficient FD solver (comparable to commercial solvers).
· high-level constraints can be described in terms of simple primitives.
· a lot of predefined constraints: arithmetic constraints, boolean constraints, symbolic constraints, reified constraints,...
· several predefined enumeration heuristics.
· the user can define his own new constraints.
· more than 50 FD built-in constraints/predicates.
The GNU Prolog compiler is based on the Warren Abstract Machine (WAM). It first compiles a Prolog program to a WAM file which is then translated to a low-level machine independent language called mini-assembly specifically designed for GNU Prolog. The resulting file is then translated to the assembly language of the target machine (from which an object is obtained). This allows GNU Prolog to produce a native stand alone executable from a Prolog source (similarly to what does a C compiler from a C program). The main advantage of this compilation scheme is to produce native code and to be fast. Another interesting feature is that executables are small. Indeed, the code of most unused built-in predicates can be excluded from the executables at link-time.
GNU Prolog also includes an efficient constraint solver over Finite Domains (FD). The key feature of the GNU Prolog solver is the use of a single (low-level) primitive to define all (high-level) FD constraints. There are many advantages of this approach: constraints can be compiled, the user can define his own constraints (in terms of the primitive), the solver is open and extensible (as opposed to black-box solvers like CHIP),...Moreover, the GNU Prolog solver is rather efficient, often more than commercial solvers.
GNU Prolog is inspired by two systems developed by the same author:
· wamcc: a Prolog to C compiler. the key point of wamcc was its ability to produce stand alone executables using an original compilation scheme: the translation of Prolog to C via the WAM. Its drawback was the time needed by gcc to compile the produced sources. GNU Prolog can also produce standalone executables but using a faster compilation scheme.
· clp(FD): a constraint programming language over FD. Its key feature was the use of a single primitive to define FD constraints. GNU Prolog is based on the same idea but extends the power of primitive to make it possible more complex constraint definitions. In comparison to clp(FD), GNU Prolog offers new predefined constraints, new predefined heuristics, reified constraints,...
The development of GNU Prolog started in January 1996 under the name Calypso.
Currently the following architectures are supported:
· ix86 / GNU/Linux
· ix86 / Win32 using Cygwin
· ix86 / Win32 using MSVC++
· ix86 / SCO
· ix86 / Solaris
· ix86 / FreeBSD
· ix86 / OpenBSD
· ix86 / NetBSD
· PowerPC / GNU/Linux
· PowerPC / Darwin (Mac OS X)
· sparc / SunOS
· sparc / Solaris
· alpha / GNU/Linux
· alpha / OSF1
· mips / Irix
If you are interested in porting GNU Prolog to another architecture read the PORTING file in src.
You can consult the following files:
· the general README file.
· the NEWS file.
· the ChangeLog file.
The on-line HTML version can be consulted from this site.
You can also download several versions of the documentation:
· PostScript version (gzip file)
· PDF version (gzip file)
· DVI version + eps figures (tar+gzip file)
· HTML version one web page per chapter (tar+gzip file)
· HTML version entirely on one web page (gzip file)
The INRIA ftp server (ftp.inria.fr) provides both source and binary distributions for GNU Prolog.
Source distributions:
· the main source distribution gprolog-1.2.16.tar.gz.
· a corresponding source RPM.
Binary distributions:
· a binary RPM (compiled under under ix86 / GNU/Linux).
· a Win32 auto-install setup (compiled under ix86/windows XP).
Other versions:
· Old versions can be found in this directory.
· Unstable versions can be found in this directory.
Some of these files can also be downloaded from the primary GNU ftp site or from any mirror.
Contributions are welcome. If you want to include your contribution please post a mail to users-prolog@gnu.org (for more information on this list click here). Here is a list of available contributions:
· Bedevere - a SWIG wrapper
· CLIP - a CLP(Intervals) interpreter
· CLPGUI - a graphical user interface for CLP
· cTI - a constrained-based left Termination Inference tool for ISO-Prolog
· gprolog-rh - an extension of gprolog with attributed variables, coroutinings and CLP over reals
· Logtalk - Object Oriented extension to Prolog
· Muscle PS/SC - an interface to the Muscle PC/SC library
· MySQL/Prolog - an interface to MySQL database
· ODBC/Prolog - a small ODBC interface module for gprolog
· XGP - a Mac OS X IDE connecting gprolog and Cocoa
The mailing list users-prolog@gnu.org: is for communicating with other GNU Prolog users and/or implementors:
· To inform other uses send a mail to users-prolog@gnu.org.
· To (un)subscribe to this list send a mail to users-prolog-request@gnu.org with (un)subscribe in the subject line.
· You can also (un)subscribe via the web at http://mail.gnu.org/mailman/listinfo/users-prolog.
· From the same site you can also browse the archive.
The mailing list bug-prolog@gnu.org: is for reporting bugs:
· To inform other uses send a mail to bug-prolog@gnu.org.
· To (un)subscribe to this list send a mail to bug-prolog-request@gnu.org with (un)subscribe in the subject line.
·
You can also (un)subscribe via the web at http://mail.gnu.org/mailman/listinfo/bug-prolog.
From the same site you can also browse the archive.
Bug reports are crucial for our work. If we don't know about problems, we cannot fix them. On the other hand it is a waste of time to read/check/answer for bugs which are not bugs ! Please consult the manual (an on-line version is available). If you can try to check if the bug occurs with the last unstable version (all unstable versions are here). If you already use the last unstable version try the last stable version. When you are sure you have discovered a bug, please report it to bug-prolog@gnu.org (for more information on this list click here).
Your report should include all these things:
· The type of machine you are using (use uname -a under Unix).
· GNU Prolog version (use gprolog --version).
· The operands given to the `configure' and the output of the configuration if the bug concerns the compilation/installation phase.
· The complete text of any files needed to reproduce the bug. Try to obtain a minimal example showing the bug.
· The precise commands we need to type to reproduce the bug.
· A description of what behavior you observe that you believe is incorrect.
· If you wish to mention something in the GNU Prolog source, show the line of code with a few lines of context. Do not just give a line number.
Copyright (C) 1999-2003 Daniel Diaz
Verbatim copying and distribution
of this entire article is permitted in any medium, provided this notice is
preserved.