2PPy (tuProlog in Python)
Experimental porting of 2P-Kt on Python, via JPype.
This is a work in progress. 2PPy is not ready for general availability, yet.
Introduction
Object-oriented and modular ecosystem for symbolic AI and logic programming, currently featuring:
- a module for logic terms and clauses representation, namely tuprolog.core,
- a module for logic unification, namely tuprolog.unify,
- a module for in-memory indexing and storing logic theories, as well as other sorts of collections of logic clauses, namely tuprolog.theory,
- a module providing generic API for resolution of logic queries, namely tuprolog.solve, currently implementing a Prolog solver
- two parsing modules: one aimed at parsing terms, namely tuprolog.core.parsing, and the other aimed at parsing theories, namely tuprolog.theory.parsing,
- two serialisation-related modules: one aimed at (de)serialising terms and clauses, namely tuprolog.core.serialize, and the
other aimed at (de)serialising terms theories, namely tuprolog.theory.serialize,
- a module for using Prolog via a command-line interface, namely tuprolog.repl.
How to do stuff
Prerequisites
- Install Python 3 (look into the .python-version to know the exact version)
- I suggest using Pyenv to easily handle multiple Python versions on the same machine
- Ensure PIP works fine
- Install Java (JDK preferred), and ensure the JAVAHOME variable is correctly set
- Ensure Java and Python are both either 64bit or 32bit