3 ms·
I've looked at Prolog for implementing a rule-based workflow system, but I find that it's very hard to embed eg. SWI Prolog into Python, in which the rest of th
by baq 10y ago
I've looked at Prolog for implementing a rule-based workflow system, but I find that it's very hard to embed eg. SWI Prolog into Python, in which the rest of the project is written. Does anyone know of an embeddable Prolog, preferably open source?
- YeGoblynQueenne 10y agoSwi Prolog has an interface to python, pyswip: https://code.google.com/archive/p/pyswip/ https://code.google.com/archive/p/pyswip/ It's a bit unstable but if you really, really want to embed Swi Prolog it's available as a .dll - which is how pyswip and all other foreign language interfaces work.
- junke 10y agoECLiPSe, for example. See [1] for documentation about how to embed it. However, this is targetted at C, Java and Tcl/Tk, not Python. Another approach is to use a client/server approach with two processes (python starts a background prolog, for example). [1] http://eclipseclp.org/doc/embedding/embroot.html http://eclipseclp.org/doc/embedding/embroot.html
- sitkack 10y agoCould you abstract it out as a network service?