当前位置: 动力学知识库 > 问答 > 编程问答 >

python - First Order Logic Engine

问题描述:

I'd like to create an application that can do simple reasoning using first order logic. Can anyone recommend an "engine" that can accept an arbitrary number of FOL expressions, and allow querying of those expressions (preferably accessible via Python)?

网友答案:

PyLog:

PyLog is a first order logic library including a PROLOG engine in Python.

网友答案:

Don't query using first-order logic (FOL) unless you absolutely have to: first-order logic is not decidable, but only semi-decidable, and so queries will often, unavoidably not terminate.

Description logic is essentially a decidable fragment of first-order logic, reformulated in a manner that is good for talking about classes of entity and their interrelationships. There are many engines for description logic in Python, for example seth, based on OWL-DL.

If you are really sure that you need the vastness of FOL, then FLiP is worth a look. I've not used it (not really keen on Python, to be honest), but this is a good approach to making logic checking available to a programming language.

网友答案:

Recipe 303057: Pythologic -- Prolog syntax in Python / http://code.activestate.com/recipes/303057/

分享给朋友:
您可能感兴趣的文章:
随机阅读: