truthful

Crates.iotruthful
lib.rstruthful
version0.1.1
sourcesrc
created_at2022-12-17 03:10:29.72385
updated_at2022-12-17 23:45:22.647423
descriptionA logical expression parser, optimizer and evaluator.
homepage
repositoryhttps://github.com/codx-dev/truthful
max_upload_size
id739607
size68,902
Victor Lopes (vlopes11)

documentation

README

Truthful

crates.io Documentation License

A logical expression parser, optimizer and evaluator.

$ cargo run
welcome! enter ? for help
> a or (a and b)
evaluating "a"
 a  eval
 0   0
 1   1
> !a v b
evaluating (!"a" v "b")
 a  b  eval
 0  0   1
 0  1   1
 1  0   0
 1  1   1
> q
bye!

TODO

  • Grammar operator precedence.
  • Actual optimization (the current one is a bunch of NAND + DeMorgan naive transformations).
Commit count: 2

cargo fmt