问题
I am looking at the Java-written Prolog system, Prova. https://prova.ws/
But it is not clear about its implementation, a Prolog compiler or Prolog interpreter? I read the manual, but did not found an answer.
回答1:
There are some rumors that Prova is based on Mandarax. The newest version seem to be heading in the same direction as SWI-Prolog 7, i.e. it supports dicts and a dot notation. See also here:
http://prova.ws/confluence/display/REWRITEDEV/Prova+maps+for+defining+slotted+terms
The original Mandarax seems to have been an interpreter, and in the user manual of Prova we find one sentence that self declares it as a Prolog interpreter, but no hint for compilation.
But there seems to be a newer version of Mandarax (1.1.0) which was some kind of compiler, but maybe Prova was already branched out before the compiler arrived, and its still an interpeter.
So although it self declares as a Prolog interpreter, it is most likely not an ISO Prolog systems, since for example op/3 is missing. I guess it uses aa tokenizer with some hard wired operators and a parser with some hard wired operator expressions. (*)
It might nevertheless offer some goodies, but judging from the documentation and binary size, they might not be many. Which is possibly compensated by the ability to directly embed Java calls by the dot notation:
http://prova.ws/confluence/display/REWRITEDEV/Calling+Java+from+Prova+rulebases
Bye
(*) The Prova syntax goes even that far, that it requires the end-user to write fail() instead of fail. A syntax variant that is also found in the new SWI-Prolog 7, although not with the same drastic effect on the end-user that he/she would be not anymore allowed to use atoms as goals.
来源:https://stackoverflow.com/questions/25213929/is-the-prova-implemented-with-a-prolog-compiler-or-prolog-interpreter