Is the Prova implemented with a Prolog compiler or Prolog interpreter?

五迷三道 提交于 2020-01-06 03:50:51

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!