-
Notifications
You must be signed in to change notification settings - Fork 5
Home
kuebler edited this page Apr 19, 2012
·
14 revisions
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.