I am looking for a version of prolog that can be run in JavaScript in a browser. That is I want to be able to use prolog to embed logical operations in a javascript web application
Asynchronous predicates Tau Prolog has been developed following a non-blocking, callback-based approach, allowing you, for instance, to sleep the main thread or to do AJAX requests without blocking the browser.
A Prolog interpreter in JavaScript Tau Prolog is a client-side Prolog interpreter fully implemented in JavaScript, whose development has been directed by the ISO Prolog Standard.
It's relatively easy to implement a prolog-like in languages that support generators. If you can use es6, you might find the implementation here interesting: https://curiosity-driven.org/prolog-interpreter
The first example of this I came across only worked on firefox but was called yield prolog: http://yieldprolog.sourceforge.net/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With