Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marcinbrojek/log-fo-prover
A tool for automatically verifying whether a given first-order logic formula is a tautology, based on Herbrand's theory and the Davis-Putnam SAT solver. Implemented in C++.
https://github.com/marcinbrojek/log-fo-prover
automated-theorem-proving cpp first-order-logic
Last synced: about 1 month ago
JSON representation
A tool for automatically verifying whether a given first-order logic formula is a tautology, based on Herbrand's theory and the Davis-Putnam SAT solver. Implemented in C++.
- Host: GitHub
- URL: https://github.com/marcinbrojek/log-fo-prover
- Owner: MarcinBrojek
- Created: 2024-06-29T09:59:12.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-06-29T09:59:15.000Z (6 months ago)
- Last Synced: 2024-06-29T12:25:22.951Z (6 months ago)
- Topics: automated-theorem-proving, cpp, first-order-logic
- Language: C++
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FO-prover
The objective of this assignment is to build a prover for tautologies of first-order
logic based on Herbrand’s theorem and the Davis-Putnam SAT solver. The solution program must read the standard input stdin. The input consists of a single line encoding a formula of first-order logic according to the following Backus-Naur grammar:```haskell
formula ::=
| "T"
| "F"
| "Rel" string [t]*
| "Not(" formula ")"
| "And(" formula ")(" formula ")"
| "Or(" formula ")(" formula ")"
| "Implies(" formula ")(" formula ")"
| "Iff(" formula ")(" formula ")"
| "Exists" string "(" formula ")"
| "Forall" string "(" formula ")"t ::= "Var" string | "Fun" string [t]*
```string is any sequence of alphanumeric characters.
---
FO-prover should output:
- timeout - when formula contains free variables and infinite Herbrand universe
(non-tautology)otherwise:
- 1 - tautology,
- 0 - non-tautology.
---
## Example run
```bash
> make
> echo 'Or(Rel "r" [Var "a"])(Not(Rel "r" [Var "a"]))' | ./FO-prover
```returns 1 (known tautology $p \vee \neg p$)
---
## File structure
- `README.md` (this)
- `parser.h`, `parser.cpp`
- `combination.h`, `combination.cpp`
- `skolem.h`, `skolem.cpp`
- `fdpll.h`, `fdpll.cpp`
- `main.cpp`
- `makefile`