Home

Horn Clause Solver Lab

Linear-time satisfiability for Horn CNF formulas — step-by-step exploration

Horn SAT in O(n)
Horn clause: a CNF clause with at most one positive literal.  ·  Types: fact single positive (p)  ·  rule one positive + negatives (-a ∨ -b ∨ c)  ·  goal all negatives (-a ∨ -b)
Algorithm: while ∃ unit positive clause (p) → set p=TRUE · remove satisfied clauses · simplify (remove ¬p) · check for empty clause → UNSAT. When no more unit positives remain → SAT.
Formula Input (CNF)
Syntax: | between literals · , between clauses · - for negation
Examples:
Horn Solver Actions
What can I do?
Load a Horn formula to begin.
Formula (F)  
Load a formula to see clauses.
Variable Assignments
Step Explanation

Apply an action to see a step-by-step explanation.

Step History
Lab Files
🐍 Source Code
📁 Benchmarks