Prolog systems in Javascript [closed]

血红的双手。 提交于 2019-11-27 01:22:21

问题


Javascript seems to become popular as an implementation language for other programming languages. The article Lightweight compilation of (C)LP to JavaScript. ICLP 2012 drew my attention on this.

There are a lot of proof-of-concept prototypes for Prolog systems written in Javascript around on the Web.

What are current, actively maintained, preferably ISO conforming Prolog systems written in Javascript?


回答1:


The only Prolog in JavaScript I know is YieldProlog, but I haven't tried it extensively, just the code available in QueryEditor.

I was hoping than using the yield construct it was lightweight (I used extensively such construct in C#, and I found it - paired to lambda - rather powerful).

But when I inspected (summarily) the source, I found it really complex, despite the assumptions.

edit

I've found recently these contributions, that seem really interesting: proscript and proscript2.

edit

a new implementation available:

Tau Prolog, brought to my attention from Jan on SWI mailing list

edit

Something new, hhprolog, a pure Prolog engine, based on code and documentation provided by Paul Tarau, ported by me to Javascript. So, available in both browsers and NodeJS.

The project is still preliminary, mostly needed is to bootstrap to interpreter: right now (pre)compiling Prolog to the (novel) virtual machine must be accomplished with SWI-Prolog installed, properly configured (JPL needed).

To implement such bootstrapping, I would probably need to implement negation, to reuse Paul' interface, or - better - attempt to implement something staying in the pure paradigm. In particular, only unbounded integer arithmetic (again by Paul Tarau, there is some Python code available - I will try lazily to port to Javascript).



来源:https://stackoverflow.com/questions/15435462/prolog-systems-in-javascript

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