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.
- Host: GitHub
- URL: https://github.com/safememoryzone/propl-solver
- Owner: SafeMemoryZone
- License: mit
- Created: 2024-11-16T12:36:10.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-11-19T14:02:23.000Z (6 months ago)
- Last Synced: 2025-02-02T06:28:55.973Z (4 months ago)
- Language: Python
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.