what is the best choice between SWI and GNU prolog ? 
Author Message
 what is the best choice between SWI and GNU prolog ?

Brest, le lundi 19 novembre

Hi, what is the best choice for a free prolog interpreter/compiler
for linux ? I don't want to develop projects, but I often write
a C or Caml program that writes huges Prolog files (1Mo) in order to solve
a particular problem. Once the answer has been found, I don't need any longer
the prolog file. My priority is then to find quickly the answer
(therefore I'd like rather a slow compiler with a much quicker answer than
a quite quick interpreter). I have SWI, but I read that GNU could compile
into native code. What are the main points of interest in both products ?

--
QlpoOTFBWSZTWcwiz1oAAC1fgHQTwOeABVAABAT7Zp4lMAC4hET1DQNGhoBoyGaQYyaZAyaG
QZGmBGDTJE01NMTJkZDQaAUhm7W8Wu9WYGQZg2Vd+s8PsaiAZJoF5jaDsEQUaCEQHgnxdw5H
siRDfoqLyg4gHe6/TCLCgm0gY3zjVSswgknIk85qBbV7GNcqz8yWcUOcrT4SlYICcQUgKxM2
gumlEIhPgCSCC4gUHVb3pREx/vdlGkW5r2P5Z+LuSKcKEhmEWetA | mimencode + bzip2



Sat, 08 May 2004 04:11:55 GMT  
 what is the best choice between SWI and GNU prolog ?


Quote:
>Brest, le lundi 19 novembre

>Hi, what is the best choice for a free prolog interpreter/compiler
>for linux ? I don't want to develop projects, but I often write
>a C or Caml program that writes huges Prolog files (1Mo) in order to solve
>a particular problem. Once the answer has been found, I don't need any longer
>the prolog file. My priority is then to find quickly the answer
>(therefore I'd like rather a slow compiler with a much quicker answer than
>a quite quick interpreter). I have SWI, but I read that GNU could compile
>into native code. What are the main points of interest in both products ?

The best solution is to try them both.  If you write nice ISO code
(from what you sketch, there isn't much interaction, so this might be
feasible) both should be able to parse it.  Prolog performance doesn't
stop with native code or using a virtual machine.  Indexing, speed of
built-in (assert/retract, findall, term-manipulation, etc.) may well
be more important to your problem.  I've seen comparisons of SWI-Prolog
with various other implementations and it is quite normal that system X
executes program A 10 times faster, but program B 10 times slower.

If performance becomes an issue, use the profiler to spot problems and
read `The Craft of Prolog' by Richard O'Keefe.  Well designed
datastructures and proper use of indexing makes a *huge* difference!

For fast program loading (if this is an issue), compile it using
pl -o myexe -c mysrc.pl

        Regards --- Jan



Sat, 08 May 2004 18:43:41 GMT  
 what is the best choice between SWI and GNU prolog ?

Hi !

I think GNU Prolog is the best one because :

- you can use FD constraints
- it's french ! (that the most important, cause everybody know that France
is the best place in our world)

Jean Michel LECONTE

PS : if you are under win32, use SWI : it's easier to install

Quote:

> Brest, le lundi 19 novembre

> Hi, what is the best choice for a free prolog interpreter/compiler
> for linux ? I don't want to develop projects, but I often write
> a C or Caml program that writes huges Prolog files (1Mo) in order to solve
> a particular problem. Once the answer has been found, I don't need any
longer
> the prolog file. My priority is then to find quickly the answer
> (therefore I'd like rather a slow compiler with a much quicker answer than
> a quite quick interpreter). I have SWI, but I read that GNU could compile
> into native code. What are the main points of interest in both products ?

> --
> QlpoOTFBWSZTWcwiz1oAAC1fgHQTwOeABVAABAT7Zp4lMAC4hET1DQNGhoBoyGaQYyaZAyaG
> QZGmBGDTJE01NMTJkZDQaAUhm7W8Wu9WYGQZg2Vd+s8PsaiAZJoF5jaDsEQUaCEQHgnxdw5H
> siRDfoqLyg4gHe6/TCLCgm0gY3zjVSswgknIk85qBbV7GNcqz8yWcUOcrT4SlYICcQUgKxM2
> gumlEIhPgCSCC4gUHVb3pREx/vdlGkW5r2P5Z+LuSKcKEhmEWetA | mimencode + bzip2



Sun, 09 May 2004 06:14:13 GMT  
 what is the best choice between SWI and GNU prolog ?

Quote:

> Hi, what is the best choice for a free prolog interpreter/compiler
> for linux ? I don't want to develop projects, but I often write
> a C or Caml program that writes huges Prolog files (1Mo) in order to solve
> a particular problem. Once the answer has been found, I don't need any longer
> the prolog file. My priority is then to find quickly the answer
> (therefore I'd like rather a slow compiler with a much quicker answer than
> a quite quick interpreter). I have SWI, but I read that GNU could compile
> into native code. What are the main points of interest in both products ?

Maybe you should consider a 3th alternative: Mercury
You say that the logic program is generated, so maybe you can generate as well the type declarations and the
modes. Mercury has a slow compiler (compared to how fast Prolog systems can load a program) but
it can be an order of magnitude faster, so if your program runs long, you might gain all the compilation
time back.

I wouldn't suggest that alternative for hand-written code that you throw away after running it once.

Bart Demoen



Sun, 09 May 2004 19:22:52 GMT  
 what is the best choice between SWI and GNU prolog ?

Quote:

> Maybe you should consider a 3th alternative: Mercury

BTW might the Mercury gang be persuaded to target the Java
Virtual Machine as well as Microsoft's Common Runtime Thingy,
or would they want money for it? :-)

Paul Singleton



Mon, 10 May 2004 03:04:38 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. SWI Prolog Vs GNU Prolog

2. GNU prolog, SWI-prolog and here documents

3. GNU Emacs Interface Elisp for SWI Prolog

4. SWI-Prolog 1.9.2 under GNU autoconf

5. Is Prolog the best choice ?

6. Need SWI-Prolog.h for SWI 1.8.11

7. GNU or Unipress EMACS best w/Quintus Prolog?

8. Benchmarking of Trinc-Prolog, SWI-Prolog and VisualProlog(PDC)

9. Prolog IV to SWI-Prolog

10. Prolog choicepoints - Was: Card laying problem in SWI-prolog

11. Syntex: Turbo Prolog and SWI-Prolog

12. Syntex: Turbo Prolog and SWI-Prolog

 

 
Powered by phpBB® Forum Software