[英]examples of prolog meta-interpreter uses?
I'm reading several texts and online guides to understand the possibilities of prolog meta-interpreters.我正在阅读一些文本和在线指南,以了解 prolog 元解释器的可能性。
The following seem like solid use cases:以下似乎是可靠的用例:
Question - what other compelling use-cases are there?问题- 还有哪些其他引人注目的用例?
Quoting from A Couple of Meta-interpreters in Prolog which is a part of the book "The Power of Prolog" :引用 Prolog 中的几个元解释器,这是“Prolog 的力量”一书的一部分:
Further extensions
进一步扩展
Other possible extensions are module systems, delayed goals, checking for various kinds of infinite loops, profiling, debugging, type systems, constraint solving etc. The overhead incurred by implementing these things using MIs can be compiled away using partial evaluation techniques.
其他可能的扩展是模块系统、延迟目标、检查各种无限循环、分析、调试、类型系统、约束解决等。使用 MI 实现这些东西所产生的开销可以使用部分评估技术编译掉。 [...]
[...]
This quite extends your proposed uses, eg, by这大大扩展了您建议的用途,例如,通过
p(X):- p(s(X)).
p(X):- p(s(X)).
to detect loops (including "obvious" ones like this one),
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.