logic-rs
A parser of relational predicate logic and truth tree solver

About

logic-rs is a parser of relational predicate logic and truth tree solver written in Rust. This page provides the frontend to it.
Being heavily influenced by the book Meaning and Argument: An Introduction To Logic Through Language, by Ernest Lepore and Sam Cumming, and trying to follow as closely as possible its grammar and rules, it:
  • provides syntax to distinguish between statement sets, arguments, and single statements as input
  • produces detailed truth trees
  • analyses the truth trees to auto-check the consistency of statement sets, the formal validity of arguments, and the logical properties of statements, namely contradiction, tautology, and contingency.
You're welcome to view and contribute to the project on GitHub. Both the website and library are hosted there.

Usage

In the editor above, you can type in either a statement set, an argument, or a single statement, following the grammar as specified below.



If you'd like to have a look at a more detailed specification of the language, you can browse to the wiki on the GitHub repository by clicking here.

Once you're finished, click "Solve" at the top of the editor. One or more detailed truth trees should appear, along with the result of the analysis of the truth trees. If the truth trees are too large, you can zoom in and out with either mouse or touch, as well as move them around with mouse, touch, or keyboard.

In order to type in the Unicode tokens, either use the buttons on the toolbar, or use the available keyboard shortcuts if on PC. You can find the keyboard shortcut for each token by hovering over each button on the toolbar.