Skip to content

Pedagogical first-order prover in Python

License

Notifications You must be signed in to change notification settings

BartoszPiotrowski/PyRes

 
 

Repository files navigation

This code implements simple, resolution-based theorem provers for
first-order logic. It is released as free software under the GNU GPL
version 2, and without any warranty. See the file COPYING for
details and the individual source headers for copyright information.

pyres-simple.py
===============

This is the simplest example of a prover for the clausal fragment of
first-order logic. It implements the basic given-clause loop with
first-in-first-out clause selection and without any redundancy
elimination.

Suggested command line:
./pyres-simple.py EXAMPLES/PUZ002-1.p

PUZ001-1.p is quite hard for pyres-simple!


pyres-cnf.py
===========

This version of the prover processes the same logic as
pyres-simple.py, but adds some performance-enhancing features. This
include better clause selection heuristics, subsumption, and negative
literal selection.

Suggested command line:
./pyres-cnf.py -tfb -HPickGiven5 -nsmallest EXAMPLES/PUZ001-1.p

pyres-fof.py
===========

This prover adds a simple clausifier, so it is able to process full
first-order logic. It also will detect the use of equality, and add
equality axioms. Otherwise, it is similar to pyres-cnf.py.


Suggested command line:
./pyres-fof.py -tifbp -HPickGiven5 -nlargest EXAMPLES/PUZ001+1.p



======== Information for CASC =================

The system comes as a zip file in StarExec compatible format. It
requires (any) Python3 as python3

The runscript is starexec_run_PyRes

Problem is CNF and unsatisfiable:

# SZS status Unsatisfiable

Problem is CNF and satisfiable:

# SZS status Satisfiable

Problem is FOF and a theorem:

# SZS status Theorem

Problem is FOF and not a theorem:

# SZS status CounterSatisfiable

The start of solution output for proofs:

# SZS output start CNFRefutation.

The end of solution output for proofs:

# SZS output end CNFRefutation.

The start of solution output for models/saturations:

# SZS output start Saturation.

The end of solution output for models/saturations:

# SZS output end Saturation.

About

Pedagogical first-order prover in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 94.5%
  • OpenEdge ABL 4.0%
  • HTML 1.2%
  • Makefile 0.3%