maxadamski / illogical

Easy-to-use first order logic tools & Scala library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Illogical (WIP)

Easy-to-use first order logic tools.

Features

  • Formula transformations
    • Express in terms of AND, OR, NOT
    • De Morgan's laws
    • Quantifier negation
    • Conjunctive normal form (CNF)
    • Prenex normal form (PNF)
    • Substitute variables, etc.
  • Skolemization
    • Substitute Skolem's function
  • Unification
    • Most general unifier (MGU)
  • Semantic tableaux method (MTS)
  • Resolution method
  • CLI client
  • Web client

How to run

sbt run

How to test

sbt ~test

Grammar

Qu      → ∀ | ∃
Op      → ∧ | ∨ | …
Id      → [a-z]+[0-9]*[']*
Con     → @Id
Var     → Id
Func    → Id
Pred    → Id

Args    → Term | Term, Args → List(Term)
Term    → Con | Var | Func(Args)
Atom    → Pred(Args)
Form    → Atom | ¬Form | Form Op Form | Qu Var Form
Literal → Atom | ¬Atom
Clause  → Literal ∨ Literal

About

Easy-to-use first order logic tools & Scala library


Languages

Language:Scala 100.0%