Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

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
```