Python中的关系/逻辑编程?

2024-04-28 09:42:49 发布

您现在位置:Python中文网/ 问答频道 /正文

我是一个长期的python开发人员,最近被介绍到Prolog。我喜欢在某些类型的任务中使用关系规则的概念,并希望将此添加到我的曲目中。

有没有用Python编写逻辑程序的好库?我在谷歌上做了一些搜索,但只找到了以下内容:

jtauber's blog series on relational_python

想和其他人比较一下…谢谢!

-aj公司


Tags: 概念类型关系开发人员on规则公司blog
3条回答

您可能想使用pyDatalog,这是我为实现Datalog的Python开发的逻辑编程库。它还与SQLAlchemy一起使用逻辑子句查询关系数据库。

或许你应该在谷歌上搜索“Python中的逻辑编程”。Pyke看起来很有前途:

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.

LogPy是Python中关系编程语言miniKanren的实现。它遵循Clojure中卓越的逻辑编程解决方案^{}的传统。LogPy是为与已有的代码库的互操作性而设计的。

相关问题 更多 >