SWI-Prolog Portable is based on a very simple Prolog virtual machine called ZIP which defines only 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 Portable is a tool that extends the minimal set of instructions in order to improve 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).
What's New in This Release:
· 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.