====== Prolog Tools ====== ===== General Compilers ===== * SWI http://www.swi-prolog.org/ * Yap http://www.ncc.up.pt/~vsc/Yap/ * GNU http://gnu-prolog.inria.fr/ * Amzi! http://www.amzi.com/ ===== Small Footprint, Embedded ===== [[http://www-ctp.di.fct.unl.pt/~amd/|Artur Miguel Dias]] [[http://ctp.di.fct.unl.pt/~amd/cxprolog/|CxProlog]] ===== Source Code Documentation ===== ==== PrologDoc ==== On Jul 18, 2006, at 2:57 PM, Robert Rothenberg wrote: >I am looking for the best way to write documentation for some Prolog >libraries. Is there a Prolog-equivalent to POD (for Perl) or >Haddock (for >Haskel) that allows me to embed documentation in the source code? > Yes! There is PrologDocNG, see http://www.sourceforge.net/projects/PrologDoc (make sure you get the cvs version) I have documented my modules here: http://www.blipkit.org/modules.html Here is an example module: http://www.blipkit.org/pdoc/bioseq.html The source is here: http://www.blipkit.org/pdoc/bioseq.pro.html As you see it's more similar to a javadoc style However, I have not get succeeded in getting pdoc working with swi- prolog 5.6.x, so my docs are a little out of date I have also switched to a mixed style of documentation where I do verbose docs in the pldoc style, but for a typical exported predicate I will just try and provide as much metadata as possible as assertions. I haven't get figured out to get most of these assertions into the pdoc framework (I'm not the author of PrologDocNG, that's Salvador Fandino, I have just tweaked it in places) Here is some other links: http://prologdoc.sourceforge.net/ http://iew3.technion.ac.il/~sarac/project/PrologDoc.html ==== PlDoc ==== PlDoc is the SWI-Prolog source-code documentation infrastructure. PlDoc is loosely based on JavaDoc, using structured comments to mix documentation with source-code. SWI-Prolog's PlDoc is entirely written in Prolog and well integrated with the environment. It can create HTML+CSS and LaTeX documentation files as well as act as a web-server for the loaded project during program development. http://www.swi-prolog.org/packages/pldoc.html ===== Databases with Prolog ===== Jelly View Technology, ReDaReS system, http://home.agh.edu.pl/~wojnicki/phd/ {{:prolog:ingres.pdf|Prolog-INGRESS}} {{:prolog:glue-nail.ps|Glue-Nail}} Deductive Database System. {{:prolog:rsss94-coral-journal.ps|Coral}} Deductive Database Systems with rich declarative language. ===== Prolog and Web Pages ===== Prolog Server Pages (PSP) is a server-side scripting language based on Prolog. PSP is embedded in HTML documents and interpreted as a Prolog program. The output is then sent to the client (i.e. browser) together with the native HTML code. Several version of PSP exist, with minor differences, see links below. An example implementation: http://www.prologonlinereference.org/psp.psp Different PSP implementation comparison and review: http://www.benjaminjohnston.com.au/template.prolog?t=psp See also: [[http://www.clip.dia.fi.upm.es/Software/pillow/]] ===== Editing Prolog Code ===== GNU [[prolog:emacs]] is the editor of choice for many, offering: * [[prolog:emacs#Ediprolog]] for Emacs -- editing and executing prolog code in any buffer. * [[http://stud4.tuwien.ac.at/~e0225855/etrace/etrace.html|ETrace]] -- Prolog tracer Emacs is the extensible, customizable, self-documenting real-time display editor. If this seems to be a bit of a mouthful, an easier explanation is Emacs is a text editor and more. At its core is an interpreter for Emacs Lisp (“elisp”, for short), a dialect of the Lisp programming language with extensions to support text editing. Some of the features of GNU Emacs include: * Content sensitive major modes for a wide variety of file types, from plain text to source code to HTML files, with syntax coloring. * Complete built-in documentation, including a tutorial for new users. * Highly extensible through the Emacs Lisp language. * Support for many languages and their scripts, including all the European “Latin” scripts, Russian, Greek, Japanese, Chinese, Korean, Thai, Vietnamese, Lao, Ethiopian, and some Indian scripts. (Sorry, Mayan hieroglyphs are not supported.) * A large number of extensions which add other functionality. The GNU Emacs distribution includes many extensions; many others are available separately—even a web browser [[http://www.gnu.org/software/emacs/|Emacs Web Site]] ==== Ediprolog ==== {{::ediprolog.el}} is an [[wp>Emacs]] mode which lets you transparently interact with SWI Prolog. Syntax highlighting is included. You can load and syntax-check Prolog programs and execute queries with minimal exposure to the toplevel. Queries start with '?-' or ':-', possibly preceded by '%' and whitespace. To install, copy ediprolog.el to your home directory, and add to your .emacs: (load "~/ediprolog") (global-set-key [f10] 'ediprolog-dwim) More info: http://stud4.tuwien.ac.at/~e0225855/ediprolog/ediprolog.html ==== Tramp Emacs ==== [[http://www.fifi.org/doc/tramp/tramp-emacs.html|Transparent Remote (file) Access, Multiple Protocol]]. This package provides remote file editing, similar to Ange-FTP. The difference is that Ange-FTP uses FTP to transfer files between the local and the remote host, whereas TRAMP uses a combination of rsh and rcp or other work-alike programs, such as ssh/scp ==== Emacs Goodies for Debian ==== The file you're currently reading is mostly meant as an introductory starter for the various goodies included in emacs-goodies-el. Consult the Info node `emacs-goodies-el' for more complete information. See: http://packages.debian.org/emacs-goodies-el ===== Java and Prolog ===== ==== JPL ==== [[http://www.swi-prolog.org/packages/jpl/java_api/index.html|JPL]] is a set of Java classes and C functions providing an interface between Java and Prolog. JPL uses the Java Native Interface (JNI) to connect to a Prolog engine through the Prolog Foreign Language Interface (FLI), which is more or less in the process of being standardized in various implementations of Prolog. JPL is not a pure Java implementation of Prolog; it makes extensive use of native implementations of Prolog on supported platforms. The current version of JPL only works with SWI-Prolog. Currently, JPL only supports the embedding of a Prolog engine within the Java VM. Future versions may support the embedding of a Java VM within Prolog, so that, for example, one could take advantage of the rich class structure of the Java environment from within Prolog. JPL is designed in two layers, a low-level interface to the Prolog FLI and a high-level Java interface for the Java programmer who is not concerned with the details of the Prolog FLI. The low-level interface is provided for C programmers who may wish to port their C implementations which use the FLI to Java with minimal fuss. Some instructions regarding [[prolog:jpl:jpl|installing JPL for Linux]]. ==== InterProlog ==== [[http://www.declarativa.com/interprolog/|InterProlog]] is an open source Java front-end and functional enhancement for standard Prologs, running on Windows, Linux and Mac OS X, and currently supporting the top open source logic engines: XSB Prolog from the USA (most declarative), SWI Prolog from the Netherlands (best environment) and YAP Prolog from Portugal (fastest). InterProlog comes with Prolog term visualization aids and programming examples, namely a graphical Sudoku puzzle editor and solver. InterProlog provides Java with the ability to call any Prolog goal through a PrologEngine object, and for Prolog to invoke any Java method through a javaMessage predicate, while passing virtually any Java objects and Prolog terms between both languages with a single instruction. Mutual recursion and (Java) multithreading are supported. Java Reflection and Serialization mechanisms, together with Prolog’s natural strengths, are used to give the combination great flexibility and dynamism. Rather than tasting like an objectified Prolog/C interfaces, InterProlog provides a higher-level API equating objects to terms, inducing a more concise and declarative programming style. ==== Java <-> Prolog via Sockets ==== An example of enabling a Java tic tac toe GUI to interact with the Prolog tic tac toe game agent, using a socket data connector: http://www.csupomona.edu/~jrfisher/www/prolog_tutorial/8_4.html ==== mProlog ==== mProlog is a sub-product of the 3APL-M project. It delivers a reduced Prolog engine, optimized for J2ME applications. The mProlog engine was developed based on the W-Prolog project from Michael Winikoff. The 3APL-M project a platform for building applications using Artificial Autonomous Agents Programming Language (3APL) as the enabling logic for the deliberation cycles and internal knowledge representation. more reading at [[http://www.cs.uu.nl/3apl-m/mprolog.html|http://www.cs.uu.nl/3apl-m/mprolog.html]] ==== JSP with Prolog ==== see a [[http://www.jaist.ac.jp/~fuji/work/docs/html4/jpro_p2.html|tutorial]] ==== Prolog2Java ==== [[http://kaminari.istc.kobe-u.ac.jp/PrologCafe/|PrologCafe]] is a Prolog-to-Java source-to-source translator system. ==== Unsorted ==== http://ktiml.mff.cuni.cz/~bartak/prolog/implementations.html#prolog_in http://www.robert-tolksdorf.de/vmlanguages.html http://www.ugosweb.com/jiprolog/index.aspx http://jlogic.sourceforge.net/ http://www.clip.dia.fi.upm.es/Software/Ciao/ http://www.declarativa.com/interprolog/systems.htm ===== XML and Prolog ===== * [[http://www.semanticweb.gr/TheaOWLLib/|Thea An OWL library for SWI]] * see other XML links at [[student:msc2008_xml_knowledge_transformation]] ===== Prolog in Javascript ===== http://ioctl.org/logic/jsprolog-history ===== Prolog and Eclipse ===== [[http://roots.iai.uni-bonn.de/research/pdt/|The Prolog Development Tool - A Prolog IDE for Eclipse]] from their page: The PDT is a Prolog IDE provided as a plug-in for the Eclipse Platform . Current features include: * A comfortable Prolog editor offering code completion, syntax checking and highlighting, and an outline. * A Prolog console view offering bash-like completion and command history. * A reusable Java API for communiating with SWI-Prolog .