2008-06-17 22:21:35 +01:00
|
|
|
|
|
|
|
|
2010-10-18 09:15:38 +01:00
|
|
|
README for YAP6
|
2008-06-17 22:21:35 +01:00
|
|
|
|
|
|
|
|
2014-03-11 11:24:10 +00:00
|
|
|
This directory contains a release of the YAP 6.3.* Prolog system,
|
2008-06-17 22:21:35 +01:00
|
|
|
originally developed at the Universidade do Porto by Luis Damas and
|
2014-03-11 11:24:10 +00:00
|
|
|
Vitor Santos Costa. YAP contains the SWI-Prolog I/O library anad a
|
|
|
|
number of SWI-Prolog packages, originally developed by Jan Wielemaker
|
|
|
|
and other. It includes contributions from the Edinburgh Prolog
|
2008-06-17 22:21:35 +01:00
|
|
|
library, the C-Prolog manual authors, Ricardo Lopes, Ricardo Rocha,
|
|
|
|
M. Hermenegildo, D. Cabeza, Eric Alphonse, Paulo Moura, Nuno Fonseca,
|
2014-03-11 11:24:10 +00:00
|
|
|
Jan Wielemaker, Paul Singleton, Fred Dushin, Markus Triska, and many
|
|
|
|
others. You should read the rest of this file for information on what
|
|
|
|
YAP is and for instructions on how to build it.
|
2008-06-17 22:21:35 +01:00
|
|
|
|
2008-11-28 15:54:46 +00:00
|
|
|
YAP 6 has been built with several versions on GCC on a variety of
|
2014-03-11 11:24:10 +00:00
|
|
|
Linux, BDS, and MacOSX configurations. It has been built on Windows7
|
|
|
|
using the mingw toolkit and cygwin from Cygnus Solutions.
|
2008-06-17 22:21:35 +01:00
|
|
|
|
|
|
|
The main core of the YAP distribution is distributed under a dual
|
|
|
|
license: the Perl Artistic license 2 and the FSF's LGPL. The YAP
|
|
|
|
distribution also contains files distributed under the LGPL
|
2008-11-28 15:54:46 +00:00
|
|
|
exclusively, and under the GPL.
|
2008-06-17 22:21:35 +01:00
|
|
|
|
2014-03-11 11:24:10 +00:00
|
|
|
The YAP distribution includes several packages ported to YAP. We would
|
|
|
|
like to take the opportunity to thank the developers of these packages
|
|
|
|
for their generosity in allowing YAP to distribute these packages. Any
|
|
|
|
bugs in these packages are probably our fault.
|
2008-06-17 22:21:35 +01:00
|
|
|
|
|
|
|
If you have a question about this software, desire to add code, found
|
|
|
|
a bug, want to request a feature, or wonder how to get further
|
|
|
|
assistance, please send e-mail to yap-users@lists.sourceforge.net. To
|
|
|
|
subscribe to the mailing list or access the list archives, please see
|
|
|
|
http://lists.sourceforge.net/lists/listinfo/yap-users
|
|
|
|
|
2010-10-18 09:15:38 +01:00
|
|
|
Online documentation is available for YAP at:
|
2008-06-17 22:21:35 +01:00
|
|
|
|
2010-10-18 09:15:38 +01:00
|
|
|
http://www.dcc.fc.up.pt/~vsc/YAP/
|
2008-06-17 22:21:35 +01:00
|
|
|
|
2010-10-18 09:15:38 +01:00
|
|
|
Recent versions of YAP, including both source and selected binaries,
|
2008-06-17 22:21:35 +01:00
|
|
|
can be found from this same URL.
|
|
|
|
|
|
|
|
1. What is YAP
|
|
|
|
|
2010-10-18 09:15:38 +01:00
|
|
|
The YAP Prolog System is a high-performance Prolog compiler developed
|
|
|
|
at LIACC, Universidade do Porto. YAP provides several important
|
2008-06-17 22:21:35 +01:00
|
|
|
features:
|
|
|
|
|
2010-10-18 09:15:38 +01:00
|
|
|
o speed: YAP is widely considered one of the fastest available Prolog
|
2008-06-17 22:21:35 +01:00
|
|
|
systems.
|
|
|
|
|
|
|
|
o functionality: it supports stream I/O, sockets, modules,
|
|
|
|
exceptions, Prolog debugger, C-interface, dynamic code, internal
|
|
|
|
database, DCGs, saved states, co-routining, arrays.
|
|
|
|
|
2010-10-18 09:15:38 +01:00
|
|
|
o we explicitly allow both commercial and non-commercial use of YAP.
|
2008-06-17 22:21:35 +01:00
|
|
|
|
2010-10-18 09:15:38 +01:00
|
|
|
YAP is based on the David H. D. Warren's WAM (Warren Abstract
|
|
|
|
Machine), with several optimizations for better performance. YAP
|
2008-06-17 22:21:35 +01:00
|
|
|
follows the Edinburgh tradition, and was originally designed to be
|
|
|
|
largely compatible with DEC-10 Prolog, Quintus Prolog, and especially
|
|
|
|
with C-Prolog.
|
|
|
|
|
2010-10-18 09:15:38 +01:00
|
|
|
YAP implements most of the ISO-Prolog standard. We are striving at
|
2008-06-17 22:21:35 +01:00
|
|
|
full compatibility, and the manual describes what is still
|
|
|
|
missing. The manual also includes a (largely incomplete) comparison
|
|
|
|
with SICStus Prolog.
|
|
|
|
|
2008-11-28 15:54:46 +00:00
|
|
|
2. Obtaining YAP's development sources.
|
|
|
|
|
|
|
|
YAP is now being maintained using the git source management system. A
|
|
|
|
public repository is available at
|
|
|
|
|
2014-03-11 11:24:10 +00:00
|
|
|
http://sourceforge.net/p/yap/yap-6.3/ci/master/tree/
|
2008-11-28 15:54:46 +00:00
|
|
|
|
|
|
|
Please use
|
|
|
|
|
2014-03-11 11:24:10 +00:00
|
|
|
git clone git://git.code.sf.net/p/yap/yap-6.3
|
2008-11-28 15:54:46 +00:00
|
|
|
|
|
|
|
to obtain a copy of the current YAP tree.
|
|
|
|
|
|
|
|
3. How to compile YAP
|
2008-06-17 22:21:35 +01:00
|
|
|
|
2010-10-18 09:15:38 +01:00
|
|
|
First, make sure you have gmp and readline development packages
|
|
|
|
installed. If you plan to use ProbLog, also check for cudd.
|
|
|
|
|
|
|
|
Now, to compile YAP from the source directory just do:
|
2008-06-17 22:21:35 +01:00
|
|
|
|
2010-04-27 22:10:08 +01:00
|
|
|
(1) ./configure
|
2008-06-17 22:21:35 +01:00
|
|
|
|
2010-04-27 22:10:08 +01:00
|
|
|
(2) check the Makefile for any extensions or changes you want to make.
|
2008-06-17 22:21:35 +01:00
|
|
|
|
2010-04-27 22:10:08 +01:00
|
|
|
(3) make
|
2008-06-17 22:21:35 +01:00
|
|
|
|
2010-04-27 22:10:08 +01:00
|
|
|
(4) If the compilation succeeds, try ./yap
|
2008-06-17 22:21:35 +01:00
|
|
|
|
2010-10-18 09:15:38 +01:00
|
|
|
(5) Happy? "make install"
|
2008-06-17 22:21:35 +01:00
|
|
|
|
2010-04-27 22:10:08 +01:00
|
|
|
(6) "make install_info" will create the info files in the standard
|
2008-06-17 22:21:35 +01:00
|
|
|
info directory.
|
|
|
|
|
2010-04-27 22:10:08 +01:00
|
|
|
(7) "make html" will create documentation in html format in the
|
2008-06-17 22:21:35 +01:00
|
|
|
current directory.
|
|
|
|
|
|
|
|
In most systems you will need to be superuser in order to do "make
|
2010-10-18 09:15:38 +01:00
|
|
|
install" and "make info" on the standard system directories.
|
2008-06-17 22:21:35 +01:00
|
|
|
|
2010-10-18 09:15:38 +01:00
|
|
|
3.1 Where to install YAP
|
2008-06-17 22:21:35 +01:00
|
|
|
|
2010-10-18 09:15:38 +01:00
|
|
|
YAP uses autoconf. Recent versions of YAP try to follow GNU
|
2010-04-27 22:10:08 +01:00
|
|
|
conventions on where to place software. By default, this location is
|
|
|
|
/usr/local on Unix, Linux, and OS/X machines.
|
|
|
|
|
|
|
|
You can use the --prefix configure option to set the ROOTDIR macro and
|
|
|
|
the --exec-prefix option to set the EROOTDIR macro (for
|
|
|
|
architecture-dependent files). EROOTDIR defaults to ROOTDIR.
|
2008-06-17 22:21:35 +01:00
|
|
|
|
|
|
|
o The main executable is placed at BINDIR, which defaults at
|
2014-03-11 11:24:10 +00:00
|
|
|
$(EROOTDIR)/bin.
|
2008-06-17 22:21:35 +01:00
|
|
|
|
|
|
|
o SHAREDIR is the directory where the Prolog libraries are stored.
|
|
|
|
Its default value is $(ROOTDIR)/share. The Prolog libraries are
|
|
|
|
machine-independent text files that only need to be installed once,
|
2010-10-18 09:15:38 +01:00
|
|
|
even on systems where multiple copies of YAP of the same version are
|
2008-06-17 22:21:35 +01:00
|
|
|
installed. (e.g. with different configurations or for different
|
|
|
|
architectures sharing a file server.)
|
|
|
|
|
|
|
|
o LIBDIR is the directory where binary libraries are stored. It is
|
|
|
|
set to $(EROOTDIR)/lib by default. YAPLIBDIR is a subdirectory (by
|
2010-10-18 09:15:38 +01:00
|
|
|
default $(EROOTDIR)/lib/YAP) that contains the Prolog engine and the
|
2008-06-17 22:21:35 +01:00
|
|
|
binary Prolog libraries.
|
|
|
|
|
2010-10-18 09:15:38 +01:00
|
|
|
o INCLUDEDIR is used if you want to use YAP as a library.
|
2008-06-17 22:21:35 +01:00
|
|
|
|
|
|
|
o INFODIR is where the info help files will be stored. It defaults
|
|
|
|
to $(SHAREDIR)/info.
|
|
|
|
|
2010-04-27 22:10:08 +01:00
|
|
|
3.2 Which YAP to compile
|
2008-06-17 22:21:35 +01:00
|
|
|
|
2010-04-27 22:10:08 +01:00
|
|
|
Compiling YAP with the standard options give you a plain vanilla
|
2010-10-18 09:15:38 +01:00
|
|
|
Prolog. You can tune YAP to use extra functionality by using the
|
2008-06-17 22:21:35 +01:00
|
|
|
following options to configure:
|
|
|
|
|
2010-10-18 09:15:38 +01:00
|
|
|
Compilation options:
|
|
|
|
|
2014-03-11 11:24:10 +00:00
|
|
|
o --enable-tablingt=yes allows tabled evaluation (default option)
|
|
|
|
|
2010-04-27 22:10:08 +01:00
|
|
|
o --enable-depth-limit=yes allows depth limited evaluation, say for
|
|
|
|
implementing iterative deepening. It is required by the ILP system
|
2014-03-11 11:24:10 +00:00
|
|
|
Aleph. (default option)
|
2008-06-17 22:21:35 +01:00
|
|
|
|
2010-10-18 09:15:38 +01:00
|
|
|
o --enable-use-malloc=yes makes YAP use the system's C-library
|
2014-03-11 11:24:10 +00:00
|
|
|
allocation routines for all memory allocation (default).
|
2008-06-17 22:21:35 +01:00
|
|
|
|
2010-04-27 22:10:08 +01:00
|
|
|
o --enable-threads=yes enables POSIX thread support.
|
2008-06-17 22:21:35 +01:00
|
|
|
|
2010-10-18 09:15:38 +01:00
|
|
|
o --enable-pthread-locking=yes always use POSIX p-thread routines for locking.
|
|
|
|
|
2008-06-17 22:21:35 +01:00
|
|
|
o --enable-low-level-tracer=yes allows support for tracing all calls,
|
|
|
|
retries, and backtracks in the system. This can help in debugging your
|
|
|
|
application, but results in performance loss.
|
|
|
|
|
|
|
|
o --enable-wam-profile=yes allows profiling of abstract machine
|
|
|
|
instructions. This is useful when developing YAP, should not be very
|
|
|
|
useful for normal users.
|
|
|
|
|
2010-10-18 09:15:38 +01:00
|
|
|
o --enable-or-parallelism={env-copy,sba,a-cow} allows or-parallelism
|
|
|
|
supported by one of these three forms. This is still experimental.
|
|
|
|
|
|
|
|
o --enable-dynamic-loading compile YAP as as a shared library.
|
|
|
|
|
|
|
|
o --enable-cygwin compile YAP as a CYGWIN environment application, and not as stand-alone application.
|
|
|
|
|
2014-03-11 11:24:10 +00:00
|
|
|
o --with-gmp[=GMP_PATH] provide a path for GMP, in case GMP is not
|
2010-10-18 09:15:38 +01:00
|
|
|
installed in the system. In a Linux machine, make sure you have
|
|
|
|
installed the gmp-dev package. Binary versions of GMP are available
|
|
|
|
for WIN32.
|
2008-06-17 22:21:35 +01:00
|
|
|
|
2014-03-11 11:24:10 +00:00
|
|
|
o --enable-condor compile YAP as a static program that can be run by
|
|
|
|
condor. condor_compile must be in the system path.
|
2008-06-17 22:21:35 +01:00
|
|
|
|
2014-03-11 11:24:10 +00:00
|
|
|
Packages and Interface Libraries
|
2010-04-27 22:10:08 +01:00
|
|
|
|
2014-03-11 11:24:10 +00:00
|
|
|
o --with-cudd[=CUDD_PATH] enables compilation of the CUDD library,
|
|
|
|
used by packages such as PFL/CLP(BN) and ProbLog. The source of the
|
|
|
|
CUDD package is availablr from:
|
2010-10-18 09:15:38 +01:00
|
|
|
|
2014-03-11 11:24:10 +00:00
|
|
|
http://vlsi.colorado.edu/~fabio/CUDD
|
2010-10-18 09:15:38 +01:00
|
|
|
|
2014-03-11 11:24:10 +00:00
|
|
|
Fedora Linux and MacPorts have cudd packages. In the case of Fedora,
|
|
|
|
install cudd-devel. Ask vsc@dcc.fc.up.pt for a WIN32/WIN64 port
|
2010-10-18 09:15:38 +01:00
|
|
|
|
2014-03-11 11:24:10 +00:00
|
|
|
o --with-java[=JAVA_PATH] enables the Java Interface Library JPL.
|
2010-10-18 09:15:38 +01:00
|
|
|
|
2014-03-11 11:24:10 +00:00
|
|
|
o --enable-chr installs the Leuven CHR language implementation
|
|
|
|
(enabled by default, if package/chr exists)
|
2010-10-18 09:15:38 +01:00
|
|
|
|
2014-03-11 11:24:10 +00:00
|
|
|
o --enable-clpqr installs the Leuven CLPQR port, originally developed
|
|
|
|
for SWI-Prolog (enabled by default, if Cpackage/clpqe exists)
|
2010-10-18 09:15:38 +01:00
|
|
|
|
2014-03-11 11:24:10 +00:00
|
|
|
o --enable-myddas[=PATH] installs the MYDDAS MYSQL and/or ODBC interface
|
|
|
|
package (enabled by default, if ODBC and/or MySql
|
|
|
|
development files can be found). It also enables support for the
|
|
|
|
SWI-Prolog ODBC package.
|
2010-10-18 09:15:38 +01:00
|
|
|
|
2014-03-11 11:24:10 +00:00
|
|
|
o --with-matlab[=PATH] installs the MATLAB interface (not
|
|
|
|
default). You need to provide the full path of the MATLAB libraries.
|
2010-10-18 09:15:38 +01:00
|
|
|
|
2014-03-11 11:24:10 +00:00
|
|
|
o --with-mpi[=PATH] installs the MPI interface. This is default,
|
|
|
|
if the development libraries can be found.
|
2008-06-17 22:21:35 +01:00
|
|
|
|
2014-03-11 11:24:10 +00:00
|
|
|
o --with-gecode[=PATH] installs the GeCode Solver interface. This is default,
|
|
|
|
if gecode libraries can be found.
|
2008-06-17 22:21:35 +01:00
|
|
|
|
2014-03-11 11:24:10 +00:00
|
|
|
o --with-R[=PATH] installs the Real interface to the R language.
|
2008-06-17 22:21:35 +01:00
|
|
|
|
2014-03-11 11:24:10 +00:00
|
|
|
o --with-python[=PATH] installs a Python interface
|
2008-06-17 22:21:35 +01:00
|
|
|
|