Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sireliah/logic-solver
Interpreter of propositional logic statements
https://github.com/sireliah/logic-solver
Last synced: 3 days ago
JSON representation
Interpreter of propositional logic statements
- Host: GitHub
- URL: https://github.com/sireliah/logic-solver
- Owner: sireliah
- Created: 2023-12-03T21:35:26.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2023-12-17T12:06:01.000Z (11 months ago)
- Last Synced: 2024-04-24T07:35:56.132Z (7 months ago)
- Language: Rust
- Homepage:
- Size: 35.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Logic solver
Experimental interpreter that is able to evaluate propositional logic statements.
```bash
$ echo "
p := 1
q := 0
~p v ~q <=> ~(p ^ q)" > statement.prop
$ cargo run statement.propResult: true
```## Visualizing AST
It's possible to draw a graphical representation of the Abstract Syntax Tree used
as immediate representation of the statement.```bash
$ cargo run statement.prop && dot -Tsvg graph.dot -o graph.svg
```![visualization of graph](./graph_murphy.svg)