JavaScript library for logic programming [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
开发者_如何学CClosed 6 years ago.
Improve this questionDo you know of any good javascript library for logic programming?
I'm interested in something like jsprolog, but I want to use javascript to communicate with the lib, and not a different language (such as prolog in this case).
Many thanks.
In addition to jsprolog, there are several JavaScript libraries for logic programming:
chr.js is a constraint logic programming library for JavaScript. It is an implementation of the Constraint Handling Rules programming language.
There are several JavaScript implementations of Datalog such as DataScript.
Yield Prolog allows Prolog programs to be embedded directly in JavaScript. This is especially useful because it allows JavaScript functions to be used in Prolog predicates, and vice-versa.
LogicJS is a JavaScript library that is based on MiniKanRen, which has been implemented in many programming languages, including JavaScript.
JavaScript-Logic-Programming-System is another logic programming system for JavaScript.
There is another Prolog implementation that was written in less than 200 lines of JavaScript code.
Of course, there are also several C++ libraries for logic programming that could be automatically ported into JavaScript using Emscripten.
There are a bunch of other languages that compile to javascript: https://github.com/jashkenas/coffee-script/wiki/List-of-languages-that-compile-to-JS
It is possible (although not probable!) one of those has a javascript friendly API AND a suitable library that can by "compiled" into JavaScript.
Exactly what you aren't looking for, and probably a time waster :)
Please check out (JSL) https://www.npmjs.com/package/lib-jsl.
From the overview document, JSL is a JSON based logic programming library meant for embedded use in JS programs. It uses JSON as its syntax as well as I/O method
There is a new tool, a generic compiler adding any effect to JS, including logic programming, there is an example of prolog append: https://github.com/awto/mfjs-samples/tree/master/unify
精彩评论