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

https://github.com/safememoryzone/propl-solver

Simple propositioal logic solver that outputs a truth table for terms.
https://github.com/safememoryzone/propl-solver

Last synced: about 2 months ago
JSON representation

Simple propositioal logic solver that outputs a truth table for terms.

Awesome Lists containing this project

README

        

# propl-solver

Simple propositioal logic solver that outputs a truth table for terms.

## Quickstart

```sh
python3 solver.py [-h] [--ast]
-h : Print usage and exit.
--ast : Print parsed abstract syntax tree (AST).
: Parses and solves linked boolean algebra expressions from each line of the specified file.
```

## Syntax

```
- variable letters, numbers and special symbols
- not !
- and &
- xor ^
- or |
- implication >
- nor nor
- nand nand
- if and only if (equals) =
- true 1
- false 0
```

## Example

Example for an input file:
```
a > b > c > d
a ^ d
g = c
```
Note: All terms are interconnected.