PyRes 1.0

Stephan Schulz
DHBW Stuttgart, Germany

Architecture

PyRes is a simple resolution-style theorem prover for first-order logic, implemented in very clear and well-commented Python. It has been written as a pedagogical tool to illustrate the architecture and basic algorithms of a saturation-style theorem prover. The prover consists of a parser for (most of) TPTP-3 format, a simple clausifier to convert full first-order format into clause normal form, and a saturation core trying to derive the empty clause from the resulting clause set. The saturation core is based on the DISCOUNT-loop variant of the given-clause algorithm, i.e., a strict separation of active and passive facts. It implements simple binary resolution and factoring [Ro65], optionally with selection of negative literals [BG2001]. Redundancy elimination is restricted to forward and backward subsumption and tautology deletion. There are no inference rules for equality - if equality is detected, the necessary axioms are added.

Strategies

The prover supports several negative literal selection strategies, as well as selection of the given clause from a set of differently weighted priority queues in the style of E [SCV2019]. In the competition, it will always select the syntactically largest literal, and will use weight-age interleaved clause selection with a pick-given ration of 5 to 1.

Implementation

The prover is implemented in Python 2.7, with maximal emphasis on clear and well-documented code. Terms are represented as nested lists (equivalent to LISP style s-expressions), Literals, clauses, and formulas are implemented as classes using an object-oriented style. The system does not use any indexing or other advanced techniques. PyRes builds a proof object on the fly, and can print a TPTP-3 style proof or saturation derivation. The system source is available at
    https://github.com/eprover/PyRes

Expected Competition Performance

Performance is expected to be mediocre for non-equational problems and abysmal for problems with equality. However, per CASC rules, PyRes will still be assumed superior to any non-participating prover.

References

SCV2019
Schulz S., Cruanes, S., Vukmirovic, P. (2019), Faster, Higher, Stronger: E 2.3, Proc. of the 27th CADE, Natal, LNAI 11716, Springer (to appear)
BG2001
Bachmair, Leo and Ganzinger, Harald (2001) Resolution theorem proving, Handbook of Automated Reasining, pp. 19-99, Elsevier
Rob1965
Robinson, J.A. (1965( A Machine-Oriented Logic Based on the Resolution Principle, Journal of the ACM 12(1), pp. 23-41, Elsevier