You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kuebler edited this page Apr 19, 2012
·
14 revisions
Getting started
Warthog is written in Scala and we use SBT as our build tool.
A good place to get the necessary tools, documentation and help is the Typesafe homepage.
Once you have installed Scala and SBT, you can just run
$ sbt console
within the Warthog directory to start a console with the necessary Warthog files compiled and already imported.
You can test if everything works by executing the following code on the console:
scala> val phi = "(x & y => ~x & ~y) & x & y".pl
scala> import org.warthog.pl.knowledgecompilation.bdd.BDDManager
scala> val m = new BDDManager()
scala> m.isContradiction(m.mkBDD(phi))
This code creates a formula phi = (x ∧ y → ¬x ∧ ¬y) ∧ x ∧ y, create a BDD for phi and check if it's a contradiction. This should output true since the phi is indeed a contradiction.