Prova是通过Prolog编译器或Prolog解释器实现的吗

Prova是通过Prolog编译器或Prolog解释器实现的吗

本文介绍了Prova是通过Prolog编译器或Prolog解释器实现的吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在看用Java编写的Prolog系统Prova. https://prova.ws/

I am looking at the Java-written Prolog system, Prova.https://prova.ws/

但是不清楚它的实现是Prolog编译器还是Prolog解释器?我阅读了手册,但没有找到答案.

But it is not clear about its implementation, a Prolog compiler or Prolog interpreter? I read the manual, but did not found an answer.

推荐答案

有传言称Prova基于Mandarax.最新的版本似乎正朝着SWI-Prolog 7的方向发展即它支持字典和点表示法.另请参见此处:

There are some rumors that Prova is based on Mandarax. The newestversion 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

原始的Mandarax似乎是一名口译员,并且在Prova用户手册中,我们发现一个句子将其声明为Prolog解释器,但没有编译提示.

The original Mandarax seems to have been an interpreter, andin the user manual of Prova we find one sentence that selfdeclares it as a Prolog interpreter, but no hint for compilation.

但是似乎有Mandarax(1.1.0)的较新版本,某种编译器,但也许Prova已经分支了在编译器到达之前,它仍然是一个犯罪者.

But there seems to be a newer version of Mandarax (1.1.0) which wassome kind of compiler, but maybe Prova was already branched outbefore the compiler arrived, and its still an interpeter.

因此,尽管它自己声明为Prolog解释器,但大多数情况下可能不是ISO Prolog系统,因为例如缺少op/3.我猜它使用了一个带有一些硬接线员的令牌生成器和一个具有一些硬接线运算符表达式的解析器. (*)

So although it self declares as a Prolog interpreter, it is mostlikely not an ISO Prolog systems, since for example op/3 is missing.I guess it uses aa tokenizer with some hard wired operators and aparser with some hard wired operator expressions. (*)

尽管如此,它可能会提供一些好处,但是从文档和二进制文件大小,可能不会很多.哪个直接嵌入Java的能力可能会补偿用点表示法调用:

It might nevertheless offer some goodies, but judging from thedocumentation and binary size, they might not be many. Whichis possibly compensated by the ability to directly embed Javacalls by the dot notation:

http://prova.ws/confluence/display/REWRITEDEV/从+ Prova + rulebases调用+ Java +

再见

(*)Prova语法走得更远,需要最终用户写fail()而不是fail.语法变体在新的SWI-Prolog 7中发现,尽管没有那么激烈对最终用户的影响,他/她将不再被允许使用原子作为目标.

(*)The Prova syntax goes even that far, that it requires the end-userto write fail() instead of fail. A syntax variant that is alsofound in the new SWI-Prolog 7, although not with the same drasticeffect on the end-user that he/she would be not anymore allowed to useatoms as goals.

这篇关于Prova是通过Prolog编译器或Prolog解释器实现的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 01:14