A comprehensive Prolog environment
SWI-Prolog is a tool based on a very simple Prolog virtual machine called ZIP that defines 7 instructions.
Prolog can easily be compiled into this language and the abstract machine code is easily decompiled back into Prolog. As it is also possible to wire a standard 4-port debugger in the virtual machine there is no need for a distinction between compiled and interpreted code.
Besides simplifying the design of the Prolog system itself this approach has advantages for program development: the compiler is simple and fast, the user does not have to decide in advance whether debugging is required and the system only runs slightly slower when in debug mode.
The price we have to pay is some performance degradation (taking out the debugger from the VM interpreter improves performance by about 20%) and somewhat additional memory usage to help the decompiler and debugger.
SWI-Prolog has the possibility of extending the minimal set of instructions in order to enhance the performance.
While extending this set care has been taken to maintain the advantages of decompilation and tracing of compiled code.
The extensions include specialised instructions for unification, predicate invocation, some frequently used built-in predicates, arithmetic, and control (;/2, |/2), if-then (->/2) and negation-by-failure (\+/1).
Here are some key features of "SWI-Prolog":
· E.g., loads 140,000 lines of code spread over 500 source-files in 2.3 seconds on an AMD 5400+ system.
· Robust and free of memory leaks. In use for several servers that run 24x7 (including this web-service).
· The full development environment, including graphics, libraries and many interface packages requires approx. 40MB harddisk. The non-graphical kernel is about 650Kb, the graphics library adds about 1.2Mb to the image.
Scales well for large applications:
· No limits on program size, atom-length, term-arity or integer values. No performance degradation on predicates with many (indexed) facts.
· Just-In-Time indexing of both static and dynamic code on any argument greatly simplifies handling multi-moded relations with many clauses.
· Unbounded integer and rational number arithmetic based on GMP library.
· Comprehensive set of built-in predicates, covering Part 1 of the ISO standard, the de-facto Edinburgh Prolog standard and important parts of Quintus and SICStus Prolog. Fair compatibility to Ciao, YAP and GNU-Prolog.
· Flexible and fast interface to the C- and C++-Language. The interface allows for calling both-ways, handling of non-determinism both ways and embedding of the SWI-Prolog kernel in C/C++ projects.
· modules (upward compatible to Quintus and SICStus), garbage-collection (transparent to C/C++-code, including atom garbage collection), last-call optimisation, Dynamic expansion of the runtime stacks, ISO exception-handling (including C/C++ interface for catching and throwing exceptions).
· Source-level debugger on all platforms that supports graphics through XPCE
· Execution profiler (time and call statistics)
· Cross-Referencer. gxref/0 provides a graphical front-end for the extensible Prolog cross-referencer (xref).
· Sources are plain C99, configured automatically using GNU autoconf (configure, make, make install).
· UNICODE character set handling internal. Ideal for web- and international applications.
· Machine-independent saved-states (save on one platform, run using the virtual machine of another platform).
· Multi-threading support: run multiple pre-emptively scheduled prolog engines on the same database.
· attributed variables, coroutining (freeze/2, when/2, dif/2), global variables, cyclic terms.
· Flag-controlled handling of occurs-check (false/true/error) see current_prolog_flag/2.
· Constraint Logic Programming, providing libraries for CHR (Constraint Handling Rules), clp(FD), clp(R,Q) and various others.
· Bundled with interface libraries for Java (JPL), ODBC, TCP/IP sockets, SSL, CGI form handling, etc. Check the packages.
· Multi-threaded Web server library with comprehensive libraries to generate HTML, HTTP authorization, session management, exchanging JSON (used by many AJAX widgets), etc.
· Fast and flexible libraries for parsing SGML/XML (HTML), parsing RDF, store and query the RDF triple model. A graphical editor for RDF/RDFS and OWL models called Triple20 is distributed seperately.
· Literate programming support through PlDoc. Provides integrated view on manual and application documentation and producing LaTeX documentation for your application.
· Unit testing support through PlUnit.
What's New in This Release: [ read full changelog ]
· Initial version of the `pack' package manager
· Better source file handling, notably wrt. :- include(File).
· Many fixes to the debugger, improving source handling and the logic that decides on which ports are hidden.
· Windows version now build using the MinGW compiler project, resulting in 10-20% speedup. Enhancements to swipl-win.exe console: copy/paste and color support.
| ||Softpedia guarantees that SWI-Prolog 6.2.6 is 100% FREE, which means it does not contain any form of malware, including spyware, viruses, trojans and backdoors. [read more >] |