Swi prolog mac os
Linux versions are often available as a package for your distribution. We collect information about available packages and issues for building on specific distros here. We provide a PPA for Ubuntu and snap images
Android binaries are available for Termux as the package swi-prolog . See also Building SWI-Prolog on Android using LinuxOnAndroid
Please check the windows release notes (also in the SWI-Prolog startup menu of your installed version) for details.
Examine the ChangeLog.
Binaries | ||||||
---|---|---|---|---|---|---|
12,469,294 bytes | SWI-Prolog 8.4.0-1 for Microsoft Windows (64 bit) Self-installing executable for Microsoft’s Windows 64-bit editions. Requires at least Windows 7. See the reference manual for deciding on whether to use the 32- or 64-bits version. This binary is linked against GMP 6.1.1 which is covered by the LGPL license. | |||||
12,452,305 bytes | SWI-Prolog 8.4.0-1 for Microsoft Windows (32 bit) Self-installing executable for MS-Windows. Requires at least Windows 7. Installs swipl-win.exe and swipl.exe. This binary is linked against GMP 6.1.1 which is covered by the LGPL license. | |||||
28,189,668 bytes | SWI-Prolog 8.4.0-1 for MacOSX 10.12 (Sierra) and later on intel Installer with binaries created using Macports. Installs /opt/local/bin/swipl . Needs xquartz (X11) and the Developer Tools (Xcode) installed for running the development tools | |||||
Sources | ||||||
11,348,919 bytes | SWI-Prolog source for 8.4.0 Sources in .tar.gz format, including packages and generated documentation files. See build instructions. | |||||
Documentation | ||||||
2,895,543 bytes | SWI-Prolog 8.4.0 reference manual in PDF SWI-Prolog reference manual as PDF file. This does not include the package documentation. SWI-Prolog version 8The SWI-Prolog 8.0 major release marks mostly a milestone for the internals, stability, deployment options and maintainability of the system. SWI-Prolog extensions and incompatibilities wrt. traditional Prolog are described in extensions. SWI-Prolog 8.4.x Adds interfaces to Redis and STOMP micro services, isolated transactions and additional thread synchronization, new support for deterministic coding using $/0, $/1 and det/1 and monotonic tabling. Источник Запуск пролога на macУ меня самая трудная попытка запустить SWI-пролог на моем Mac. Когда я печатаю: Я получаю сообщение об ошибке: Когда я просто набираю «swipl», я получаю: Я пробовал это как на терминале, так и на XQuartz. Я даже зашел в чтобы увидеть, будет ли это что-либо делать, однако текст пролога «Добро пожаловать» никогда не появляется. Вполне возможно, что ближе всего я когда-либо работал, когда я набрал «pl», когда находился в папке MacOS. Однако я остался с моим терминалом, ничего не делая и должен был использовать Crtl-D. Есть ли что-то, что я делаю неправильно? Я установил что-то неправильно? Я работаю на Mac OS X 10.9.1 Mavericks. Я поместил приложение SWI-Prolog в папку своего приложения, и я также загрузил XQuartz за рекомендацию на веб-сайте. ОТВЕТЫОтвет 1Если у вас установлен Homebrew, вы можете просто запустить из терминала, который будет строить его из источника в одной команде. Затем вы можете запустить интерпретатор с помощью swipl . Ответ 2Существует три разумных способа установки SWI-Prolog на MacOS X в возрастающем порядке сложности: Загрузите приложение SWI-Prolog. В этом случае вы просто загрузите образ диска, откройте его и перетащите приложение на свой диск (например, в папку Applications . Вы используете приложение как любое другое приложение, дважды щелкнув по его значку. также используйте двоичный код внутри пакета приложений, добавьте в него каталог Contents/MacOS на ваш системный путь (например, предположив, что вы скопировали приложение SWI-Prolog в папку приложений, сделайте export PATH=/Applications/SWI-Prolog.app/Contents/MacOS:$PATH в файле конфигурации оболочки). Использование MacPorts. Предполагая, что он установлен и обновлен, просто введите sudo port install swi-prolog для стабильной версии или sudo port install swi-prolog-devel для версии разработки. Замените sudo port install на sudo port -u upgrade при обновлении установленной версии. Это вы уже используете MacPorts, тогда /opt/local/bin уже должен быть в вашем системном пути. Введите echo $PATH в окне Terminal , чтобы проверить. Компиляция из источников. В этом случае загрузите исходный архив, распакуйте его и следуйте инструкциям в файле README.MacOSX . Ответ 3OSX EI Captian имеет эту команду для установки swi-proog Ответ 4Homebrew переместил swi-prolog на вершину несколько дней назад, и из-за этого другие ответы больше не действительны. Причина этого: формула swi-prolog была расположена в бутылке x11, но зависимость x11 является необязательной. На сегодняшний день, чтобы установить swi-proog с homebrew, просто выполните: Если вы уже установили его из бутылки x11, подумайте об удалении переустановки из нового местоположения. В противном случае вы можете столкнуться с ошибками при обновлении/обновлении. Ответ 5Если вы загрузите приложение SWI-Prolog в свою папку /Applications , добавьте его в свой .bash_profile : Двоид swipl живет в этом каталоге MacOS. (Не забудьте после source Источник Swi prolog mac osThe swi-prolog port depends on readline , ncurses gmp libmcrypt , Xfree86 and jpeg , Opening and installing the meta installer installs the required ports from the Darwinports system. The programs are installed in the directory /opt/local/bin . The main executable is named swipl . Not being a Macintosh Application, SWI-Prolog must be started from a terminal window. This can either be an X11 xterm or Terminal.app from Utilities. For comfortable usage it is necessary to setup some environment variables. The procedure depends on your shell of choice. On Tiger the default is bash . Add the following lines to the file /.bashrc (or create this file if it does not yet exist). Now start X11.App and configure it to autostart at login. Open Terminal.app or xterm and type If X11 is properly configured, the help system of the graphics subsystem XPCE can now be started using the command below. Prolog source files can be loaded by specifying their filename between [] . In addition to a plain filename, files may be searched on a named search-path 1 See file_search_path/2 in the manual for details. using the notation SearchPath(File) . Two defined paths are library for the Prolog library and swi for the Prolog installation directory. Below we load the file likes.pl from the demo directory in the installation directory, Be sure to get the quotes right and terminate the command with a full-stop ( . ). After loading a program, one can ask Prolog queries about the program. The query below asks Prolog what food `sam’ likes. The system responds with X = value > if it can prove the goal for a certain X . The user can type the semi-colon (;) 2 On most installations, single-character commands are executed without waiting for the RETURN key. if (s)he wants another solution, or RETURN if (s)he is satisfied, after which Prolog will say Yes . If Prolog answers No , it indicates it cannot find any (more) answers to the query. Finally, Prolog can answer using an error message to indicate the query or program contains an error. There are three options for editing. One is to run an editor of choice in a separate window and use the below described make/0 command to reload modified files. In addition to this option Prolog can be used to locate predicates, modules and loaded files by specifying the editor of choice for use with the edit/1 command described below. This is achieved by editing the personalisation file /.plrc . A commented template is in the directory dotfiles of the SWI-Prolog installation directory. Finally, you may wish to use the built-in editor called PceEmacs . This editor provides colourisation support based on real-time parsing and cross-reference analysis of the program. It is started using the command ?- emacs. or can be set as default editor in the personalisation file. This section provides a very brief overview of important or commonly used SWI-Prolog predicates to control the environment. consult ( +File ) Load a source-file. A Prolog list ([ . ]) can be used to abbreviate the consult command. The file-extension ( .pl can be omitted. Here are some examples:
To use SWI-Prolog with C or C++ code you must install Apples Xcode environment, providing gcc . If all paths are properly installed, programs can be linked using the plld command described in the manual. XPCE and the meta-key By default, the `Meta’ key is bound to X11 modifier 1 which is set by the `Alt’ key. This doesn’t work very well for the Mac as the Alt key is commonly used to create alternative characters, while the Command key, which is used for composing commands, is bound to the X11 modifier 2 . For the Apple we therefore bind the XPCE meta modifier to the X11 modifier 2. Wherever the documentation mentions Alt-X or Meta-X this must be read as Command-X . Threaded XPCE programs XPCE programs do not open If fonts do not display correctly (e.g. manpce pages not showing bold styles or editor text in `screen’ font looking mis-spaced and misaligned) you may try to rebuild the X11 font cache by using the command sudo /usr/x11r6/bin/ fc-cache .
The SWI-Prolog license allows it to be used in a wide variety of environments, including closed-source commercial applications. In practice, redistribution and embedding is allowed, as long as modifications to the SWI-Prolog source are published following the Free Software rules. The SWI-Prolog kernel and foreign libraries are licensed under the Lesser General Public License (LGPL). The Prolog files are licensed under the normal General Public License GPL with an additional statement that allows for embedding in proprietary software:
This exception is a proven construct used for libgcc , the GNU C-compiler runtime library. There are several ways to support SWI-Prolog: Источник Swi prolog mac osLast updated: Oct 31, 2018, homebrew Using MacportsBuilding SWI-Prolog for MacOS requires Macports. In general, the Portfiles are kept nicely up-to-date thanks to Paulo Moura. If you are a Macport user, SWI-Prolog can be installed simply using one of the commands below. The first installs the `stable’ version and the second the `development’ version. Note that most of the time developers are better of using the development version. If you like to keep nice and lean system (i.e., if you do not want Macports copies of X11, ODBC, etc), you still need to install several prerequisites. First:
Next, you must install the following Macport libraries for a complete build.
Next, you can download SWI-Prolog as a source archive or using GIT. After installing all dependencies SWI-Prolog can be build according to the generic instructions using cmake that can be found here Using HomebrewHomebrew provides an alternative to Macports. The command below installs the latest stable version of SWI-Prolog: The latest git version of SWI-Prolog can be installed with this command: (contributed by Rinke Hoekstra) Building from source using Homebrew for dependenciesAs of version 7.7.21 the SWI-Prolog sources are fully compatible for building with dependencies provided by Homebrew. The dependencies can be installed using Brew does not provide junit.jar which is needed to run the JPL (Java interface) tests. If you want to test this get junit.jar as described in https://github.com/junit-team/junit4/wiki/download-and-install and install in /usr/local/share/java/junit.jar . After installing all dependencies SWI-Prolog can be build according to the generic instructions using cmake that can be found here See also — The Portfile — The scripts for building a binary release as distributed through our download pages are available in a git repository. Use Источник |