Search code examples
pythonprologlogic-programming

Relational/Logic Programming in Python?


I'm a longtime python developer and recently have been introduced to Prolog. I love the concept of using relationship rules for certain kinds of tasks, and would like to add this to my repertoire.

Are there any good libraries for logic programming in Python? I've done some searching on Google but only found the following:

jtauber's blog series on relational_python

Would love to compare to some others...thanks!

-aj


Solution

  • Perhaps you should google "Logic Programming in Python". Pyke looks promising:

    Pyke introduces a form of Logic Programming (inspired by Prolog) to the Python community by providing a knowledge-based inference engine (expert system) written in 100% Python.

    Unlike Prolog, Pyke integrates with Python allowing you to invoke Pyke from Python and intermingle Python statements and expressions within your expert system rules.