Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jieyouxu/propositional-tableau-solver-rs
Determines the satisfiability of a propositional formula using the Propositional Tableaux method
https://github.com/jieyouxu/propositional-tableau-solver-rs
Last synced: 3 days ago
JSON representation
Determines the satisfiability of a propositional formula using the Propositional Tableaux method
- Host: GitHub
- URL: https://github.com/jieyouxu/propositional-tableau-solver-rs
- Owner: jieyouxu
- Created: 2020-02-19T12:37:14.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-25T09:21:26.000Z (over 4 years ago)
- Last Synced: 2024-05-22T22:32:55.083Z (7 months ago)
- Language: Rust
- Size: 93.8 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-rust-formalized-reasoning - Propositional Tableaux Solver - tableau-solver-rs):zzz: - solver using the propositional tableaux method. (Propositional logic / Libraries)
README
# Propositional Tableaux Solver
A little propositional formula satisfiability solver using the propositional
tableaux method, written in the [Rust](https://github.com/rust-lang/rust)
programming language!See http://www.dis.uniroma1.it/liberato/planning/tableau/tableau.html.
## Syntax of Propositional Formula
The input to the solver must be a well-formed propositional formula.
It can be described by the following BNF grammar:
```enbf
::=
| ( - ) # negation
| ( ^ ) # conjunction
| ( | ) # disjunction
| ( -> ) # implication
| ( <-> ) # bi-implication
```Whitespaces are stripped and ignored, and a `` can be
any sequence of alphanumeric characters `[a-zA-Z][a-zA-Z0-9]*` that begin with
a alphabet character. Cases are respected and `aaa` is a different
propositional variable from `AAA`.## Running via Cargo
### Mode
The CLI supports both `satisfiability` mode and `validity` mode checking for a
given propositional formula.Use the `-m` mode switch:
1. Validity mode: `-m v`.
2. Satisfiability mode (default): `-m s`.### Input
Two ways to supply the propositional formula exist, with the `-c` switch method
taking precedence:1. CLI argument switch `-c `
2. IO redirection#### Command-line String
Using the `-c `
```bash
$ cargo run -c "(a^b)"
```#### IO Redirection
Alternatively, redirect the standard input `stdin` to the solver to supply the
propositional formula.```bash
$ cat input.txt > cargo run
```