logic_tracer 0.0.1

Recognize a logic proposition and trace its truth value, also generate a truth table (still in development)
Documentation

Logic Traces is a simple crate that reads a logical proposition and interprets it to build the truth table and the AST of the proposition.

Makes use of regular expressions are used to validate the input and to tokenize the proposition.
Also implements the Shunting Yard Algorithm (not yet) to build the AST.

Setup

  • Use cargo build to build the project
  • Use cargo test to run the tests -To run the project, use the command:
cargo run  # run the project

Examples

cargo run --example <example name>

Roadmap

  • Validate brackets
  • Validate terms (only numbers, variables, variable with subindex)
  • Validate Logical Operators (and, or, not, implies, iff)
  • Read a logical proposition
  • Tokenize the proposition
  • Parse the proposition (validate)
  • Build the AST (Shunting Yard Algorithm) (use postfix notation)
  • Solve proposition (evaluate the AST)
  • Add good looking output (truth table, ast, function, etc.)
  • Reduce a proposition to its simplest form (boolean algebra)

Bonus (if I have time)

  • Validate mathematical operators (add, sub, mul, div, pow)
  • Add MathPropositions support (examples, tests, etc.)

License

This project is licensed under the terms of the MIT license

note for me: use cargo publish to publish the crate