Prolog systems in Javascript [closed]

梦想与她 提交于 2019-11-28 06:27:52

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).

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