Re: Compie prolog programs

From: Brian Hulley (brianh_at_metamilk.com)
Date: 03/01/05


Date: 1 Mar 2005 08:27:23 -0800


Matteo wrote:
> I've done a simple while-like parser in swi-prolog and i would to
> compile it to run in machines that don't have installed any prolog...
>
> Is this possible with swi-prolog ?

If you download the manual from SWI-Prolog's website,
http://www.swi-prolog.org and look at Chapter 10 there are instructions
for creating a stand alone executable using qsave_program/2

The executable consists of compiled byte code + the runtime
concatenated into one file.

If you want compilation to native machine code as in a C compiler, you
might like to try GNU Prolog, although GNU Prolog does not (the last
time I looked at its website) allow you to use assert/retract etc in
the compiled code.



Relevant Pages

  • Re: VERY short program enclosed - why is it not tail-recursive?
    ... When I compiled that program with gplc under Linux, ... Efficiency is very important in my evaluation of Prolog tools, ... >> Why is the stack overflown very, very quickly when I run the program in gnu prolog? ... > If you compile the program first and then execute the executable file, ...
    (comp.lang.prolog)
  • Re: Book Advice
    ... starting out with prolog please? ... Prolog is a language. ... compile it. ... Most of the abstract machines used for Prolog are at ...
    (comp.lang.prolog)
  • Re: Prolog & C linking Problem
    ... > I am trying to compile and link a Prolog source code being called by a ... > I am trying to compile Prolog and C using plld. ...
    (comp.lang.prolog)
  • Re: Matrix math
    ... I have been curious about whether or not matrix math can be compiled ... People have been asking about numerical methods in Prolog. ... My approach is to compile dataflow diagrams that do the ...
    (comp.lang.prolog)
  • Re: Why Not Prolog in Prolog ?
    ... of the old command interpreter and extend the functionality ... adding a meta-interpeter to prolog to put a new interpeter ... compile everything and create a whole new environment for a new ... What you describe seems similar on what GNU Prolog makes possible via the generation a new top-level. ...
    (comp.lang.prolog)