Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 864
AJ. Avatar asked Dec 16 '09 20:12

AJ.


People also ask

What is Logic Programming in Python?

Logic Programming is a programming paradigm in which the problems are expressed as facts and rules by program statements but within a system of formal logic. Just like other programming paradigms like object oriented, functional, declarative, and procedural, etc., it is also a particular way to approach programming.

Can Logic Programming done in Python?

Python Logic programming is a programming paradigm that sees computation as automatic reasoning over a database of knowledge made of facts and rules. It is a way of programming and is based on formal logic.

Is Logic Programming used for AI?

The smarter the machine gets, the better that AI code is considered. As the advent of creating intelligent machines is increasing, there is also an increase in the creative ways of coding these machines. One such creative construct being used to build AI is Logic Programming.


1 Answers

You may want to use pyDatalog, a logic programming library that I developed for Python implementing Datalog. It also works with SQLAlchemy to query relational databases using logic clauses.

like image 93
Pierre Carbonnelle Avatar answered Oct 03 '22 23:10

Pierre Carbonnelle