Go to file
Patrick Lühne 551c35ed75
Fix formatting of binary operations
The precedence rules of binary operations are a bit trickier than
expected. The fact that a parent and a child term have the same
precedence level doesn’t automatically mean that parentheses can be
omitted. This is the case, for example, with

    a - (b + c)

While addition and subtraction have the same precedence level, the
parenthesis cannot be omitted. In general, this happens on the right-
hand side of the subtraction, division, and modulo operators if the
right-hand side has the same precedence level.

This patch fixes the output of binary operations accordingly.
2020-03-30 06:37:21 +02:00
src Fix formatting of binary operations 2020-03-30 06:37:21 +02:00
.gitignore Initial commit 2020-02-05 03:23:11 +01:00
Cargo.toml Initial commit 2020-02-05 03:23:11 +01:00
LICENSE.md Initial commit 2020-02-05 03:23:11 +01:00
README.md Remove redundant release badge 2020-02-25 15:27:24 +01:00

README.md

foliage crates.io

First-order logic with integer arithmetics in Rust

This Rust crate provides an abstract syntax tree for first-order formulas with integer arithmetics.

Supported Formulas

  • Booleans values (true and false)
  • predicates
  • negated formulas
  • comparisons of terms (<, ≤, >, ≥, =, ≠)
  • implications and biconditionals
  • conjunctions and disjunctions of formulas
  • existentially and universally quantified formulas

Supported Terms

  • Boolean values (true and false)
  • integers
  • strings
  • special integers (infimum and supremum)
  • symbolic functions
  • variables
  • binary operations (addition, subtraction, multiplication, division, modulo, exponentiation)
  • unary operations (absolute value, numeric negation)