![]() |
YAP 7.1.0
|
The latest development version of Yap-7 is available source-only through GIT repositories The main reference repository is at
Please just use git clone
to obtain the distribution Ie, to download YAP from the command line please type:
The first argument is the repository, the last argument is the (optional) target directory
There are a variety of graphical interfaces to git
, including GitHub's own GitHub Desktop that supports Microsoft Windows and Apple OSX A list with GUI applications, editor integration, and much more can be found at the git Wiki,
It may be useful to know:
git clone --depth XX
to only include the last XX
commitsgit submodule
YAP-7.1.0 is a cmake based system We use cmake
because it supports mosts popular software, can generate Makefiles, Ninja, Apple's XCode, VisualStudio and ANdroid Studio, and because it includes packaging suppport, The steps required to install core YAP under cmake
:
Status as of early 2017
YAP should compile well under the GNU-CC and the [C-LANG]https://clang.llvm.org/() families, that are available across most configurations It sshould also compile well undder Intel icc
We do not recommend using Microoft's VC++ To the best of our knowledge MSC does not support threaded emulation, which YAP recquires for performance, You can still use the IDE, and experiment with the c-lang plugin
YAP compiles cleanly under cross-compilers, and we have used the crosss-compilation system mxe system with good results
All Linux and BSD distributions include cmake
, so does Homebrew and MacPorts for the Mac, and MSYS2 and cygwin for WIN32 Android Studio has native support for cmake
since 2.1, although we advise to use 2.2 Last, there are excellent plugins for the Visual Codes In case you need a recent version, consider using pre-compiled binaries at the CMake site
If you have an older Linux you may need to compile from source, available at GitHub
YAP requires [gmp]{https://gmplib.org/} for infinite precision integer and rational Please ensure the development pacakage is installed in Linux: `(lib)gmp-dev(el) In the Mac and WIN32, you can obtain GMPlib from the pakage collections mentioned above
The [MPIR]{http://mpir.org} library is compatible with GMPlib, and has good support for VC++
The [readline]() library provides line-editing and command history In Linux, make sure you have the development package
Readline is disabled by default in WIN32 OSX is distributed with a line editing library that includes a subset of readline We advise against using that library
1: Create a directory, say Build
and cd
to the directory (cd Build
) *YAP should not be compiled at its root directory, some packages do not allow for that
2: Run cmake ../
from within Build
(or equivalent)
3: Run make
from within Build
(or equivalent)
4: If the compilation succeeds, try /yap
This is your executable
5: If you feel satisfied with the result, do make install
make install
and make info
on the standard directoriesBy default, YAP supports tabling, depth first search, and most features found in modern Prologs In some cases, you may want to suport extra features, or reduce system size cmake
provides an graphical interface for doing so From the commmand line, a typical example could be:
The first argument says that this is a release, compiled with full optimisation The second argument says YAP should install under the ~ drectory In this case, YAP will add the binaries to /users/vsc/bin, include files to /users/vsc/include/Yap
, Prolog files to /users/vsc/share/Yap
, and ay DLL to /users/vsc/lib/Yap
Options include:
CMAKE_BUILD_TYPE
: the two main options are Debug
, for system development, and Release to use the systemCMAKE_INSTALL_PREFIX
: where to install YAP, by default /usr/local
WITH_CALL_TRACER
allows support for tracing all calls, retries, and backtracks in the system This can help in debugging your application, but results in performance loss (enabled in Debug)WITH_WAM_PROFILER
allows profiling of abstract machine instructions This is useful when developing YAP, should not be so useful for normal users (not currently supportted)WITH_YAP_CONDOR
allows using the Condor system that support High Throughput Computing (HTC) on large collections of distributively owned computing resources (not yet available)WITH_TABLING
allows tabling support (default)WITH_YAPOR_COPY
allows or-parallelism according to the Muse-based, YapOR model This option is still highly experimentalWITH_GMP
give a path to where one can find the GMP
library if not installed in the default path It is highly advised to have GMP in your compilation environmentWITH_READLINE
give a path to where one can find the readline
library if not installed in the default path It is highly advised in Unix-like environments but not useful in Windows-WITH_Threads
allows using of the multi-threading predicates provided by YAPYou may also want to use a different compilation environment As an example:
will generate files for compilation of YAP within Apple's Xcode IDE You can also use xcodebuild
from the command line
Bext follow instructions to fully compile YAP:
Next follows a detailed description of a full install of YAP, including all the packages that YAP can use:
cmake
and gmp
: both are available in brewgecode
, libxml2
, openssl
, mariadb
, openmpi
, postgresql
, raptor
, sqlite3
, swig
, unixodbc
Note that some of them may be preconditions to other packagesR
distribution from one of the many R
mirrorsopenssl
, python
, and sqlite3
If you prefer leaning on brew: Next we present the compilation process for Android The environment is an OSX, but steps should be similar for Linux machines We assume you have downloaded both the Android NDK and the Android SDK
cmake
: ~~~~~ export ANDROID_NDK=/Volumes/Transcend/vsc/android-ndk-r11c; \ export ANDROID_SDK=/Volumes/Transcend/vsc/AndroidSDK;\ export ANDROID_PORT=1;\ export PATH=$PATH:/Volumes/Transcend/vsc/AndroidSDK/tools/;\ cmake \ -DGMP_INCLUDE_DIRS=/Users/vsc/github/gmp/armeabi-v7a \ -DGMP_LIBRARIES=/Users/vsc/github/gmp/armeabi-v7a/libgmp.so\ -DCMAKE_TOOLCHAIN_FILE=/users/vsc/github/yap-6.3/cmake/android.toolchain.cmake \ -DANDROID_ABI=armeabi-v7a -DANDROID_NATIVE_API_LEVEL=android-23 \ && make -j ```