Dear Sir. Thank you for your prompt answer.
Just for curiosity, and to see if I am in the right track, how does GNU Prolog behave? Are the figures you obtain as bad as Ciao Prolog's?
You are right. GnuProlog is almost as slow as Ciao Prolog.
After all, they are different languages, with Mercury requiring more user effort, such as modes, types, determinism declarations, etc., which makes translation to C (or assembler) easier.
Again, I am sure you are right. I think that mode and type inference makes Mercury run faster. I never declare modes or types. I always compile with the option "mmc --infer-all myprogram.m". In any case, Mercury infer modes and types. As for determinism, my students and I avoid non-deterministic predicates very carefully. Thus, I am sure that all predicates are deterministic.
Question: Is it possible to insert mode declaration in a Ciao-Prolog code? If the answer is yes, I could check how it influences speed.
I have made an experience with GNU-Prolog that may help. Dr. Marcus Vinicius, from Ryerson University (http://www.scs.ryerson.ca/~m3santos/) wrote a Prolog to C translator as part of his MSC thesis. I got a copy of this thesis and of the translator. A few years later, Dr. Cedric Carvalho wrote a Prolog to JVM compiler with mode and type inference. One of my students combined the two compilers to generate C code (instead of JVM) for GNU-Prolog. Then, I used gplc to compile and link this code to a GNU-Prolog program. With this off-hand scheme, I was able to compile only very simple programs. However, they proved to be as fast as equivalent programs in Mercury. Is it possible to add an option to Ciao Prolog to generate mode and type inference? Of course, it is possible. I think I should rephrase the question. Do you have plans to add mode and type inference to Ciao-Prolog?
Yes, it is true that we are working on compilation to C. However the compiler is still on a very preliminary stage, and although results are good, it is still far from being usable.
Would you accept volunteers? I am sending copies of this letter to Dr. Cedric and Dr. Marcus. They know well the kind of programs I write, and they may make suggestions. I am also sure that they would be happy to work as volunteers in your Prolog to C compiler, if you accept volunteers, of course.
By the way, I do not want to keep with Mercury because it generates ridiculously large code (ten times larger than Ciao Prolog, or GNU-Prolog). Finally, I am giving up Visual Prolog because it requires type declaration.
Eduardo Costa ============================================================================== Message: Address: Action: help majordomo(a)clip.dia.fi.upm.es Info. on useful commands subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list <whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list ----------------------------------------------------------------------------- Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/ -----------------------------------------------------------------------------