From adrpo@... Sun Apr 9 20:31:27 2006 Date: Sun, 9 Apr 2006 20:31:26 +0200 (CEST) From: Adrian Pop To: maclarty@... Subject: small Mercury help Hi, I'm trying to port a small Prolog program to Mercury and I'm having problems with modes for one predicate. This is for a small performance evaluation Mercury vs. RML (http://www.ida.liu.se/~pelab/rml) and I would really like to get it to work because in many aspects RML is quite close to Mercury. I thought to ask you because we have meet briefly at AADEBUG'2005 last year and I know you are a Mercury guru. Here are the sources: http://www.ida.liu.se/~adrpo/rml/mercury/ There is a mf.m there that does not compile and the prolog source I'm trying to translate from: mf.pl.txt The code implements a specification of a "call-by-name" functional language called Mini-Freja on top of which an example of sieve of Eratosthenes is executed. The prolog code works well on both SWI-Prolog and SICStus but they cannot calculate more than 40-50 prime numbers because they go out of memory. For example RML calculates the first 200 prime numbers in ~13 seconds and I expect quite the same performance from Mercury. Also, if you point me how can I compile the Mercury code to go as fast as possible would be a cool thing. Of course if you don't have time, no problem, just let me know. Thanks in advance, Adrian Pop/ _____________________________________________________________________ Adrian Pop | PhD Student Department of Computer Science | http://www.ida.liu.se/~adrpo Linköping University | phone:+46 13 285781/+46 76 2343499 S-581 83 Linköping, Sweden | fax: +46 13 142231 LiU/IDA/PELAB | office: 3B:478