diff options
| author | yzhou <yzhou@krr-linux.cs.ox.ac.uk> | 2015-05-22 05:17:31 +0100 |
|---|---|---|
| committer | yzhou <yzhou@krr-linux.cs.ox.ac.uk> | 2015-05-22 05:17:31 +0100 |
| commit | e02ad77cefc3005e36ae48fe47bf7914007f094a (patch) | |
| tree | eaac6a47dda706e45ef74da98dc7be65e61061a5 /test/uk/ac/ox/cs/pagoda/junit/ClauseTester.java | |
| parent | 58e6d87cb604702e7b307bad73c4fd42a694c3ec (diff) | |
| download | ACQuA-e02ad77cefc3005e36ae48fe47bf7914007f094a.tar.gz ACQuA-e02ad77cefc3005e36ae48fe47bf7914007f094a.zip | |
turned on the LOG switch in Utility
added a tracking rule for inequality in TrackingRuleEncoderWithGap
added a testcase in ClauseTester
Diffstat (limited to 'test/uk/ac/ox/cs/pagoda/junit/ClauseTester.java')
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/junit/ClauseTester.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/uk/ac/ox/cs/pagoda/junit/ClauseTester.java b/test/uk/ac/ox/cs/pagoda/junit/ClauseTester.java index d23f186..ff98b3c 100644 --- a/test/uk/ac/ox/cs/pagoda/junit/ClauseTester.java +++ b/test/uk/ac/ox/cs/pagoda/junit/ClauseTester.java | |||
| @@ -8,6 +8,7 @@ import org.semanticweb.HermiT.model.AtomicConcept; | |||
| 8 | import org.semanticweb.HermiT.model.AtomicRole; | 8 | import org.semanticweb.HermiT.model.AtomicRole; |
| 9 | import org.semanticweb.HermiT.model.DLClause; | 9 | import org.semanticweb.HermiT.model.DLClause; |
| 10 | import org.semanticweb.HermiT.model.Equality; | 10 | import org.semanticweb.HermiT.model.Equality; |
| 11 | import org.semanticweb.HermiT.model.Individual; | ||
| 11 | import org.semanticweb.HermiT.model.Variable; | 12 | import org.semanticweb.HermiT.model.Variable; |
| 12 | import org.semanticweb.owlapi.apibinding.OWLManager; | 13 | import org.semanticweb.owlapi.apibinding.OWLManager; |
| 13 | import org.semanticweb.owlapi.model.OWLOntology; | 14 | import org.semanticweb.owlapi.model.OWLOntology; |
| @@ -17,7 +18,31 @@ import uk.ac.ox.cs.pagoda.approx.Clause; | |||
| 17 | import uk.ac.ox.cs.pagoda.approx.Clausifier; | 18 | import uk.ac.ox.cs.pagoda.approx.Clausifier; |
| 18 | 19 | ||
| 19 | public class ClauseTester { | 20 | public class ClauseTester { |
| 21 | |||
| 22 | public void test_clause(Atom[] headAtoms, Atom[] bodyAtoms) { | ||
| 23 | OWLOntologyManager m = OWLManager.createOWLOntologyManager(); | ||
| 24 | OWLOntology emptyOntology = null; | ||
| 25 | try { | ||
| 26 | emptyOntology = m.createOntology(); | ||
| 27 | } catch (Exception e) { | ||
| 28 | e.printStackTrace(); | ||
| 29 | fail("failed to create a new ontology"); | ||
| 30 | } | ||
| 31 | Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); | ||
| 32 | System.out.println(c.toString()); | ||
| 33 | } | ||
| 20 | 34 | ||
| 35 | @Test | ||
| 36 | public void test_nominal() { | ||
| 37 | Variable x = Variable.create("X"); | ||
| 38 | AtomicRole r = AtomicRole.create("r"); | ||
| 39 | Individual o = Individual.create("o"); | ||
| 40 | Atom[] bodyAtoms = new Atom[] { Atom.create(r, x, o) }; | ||
| 41 | AtomicConcept A = AtomicConcept.create("A"); | ||
| 42 | Atom[] headAtoms = new Atom[] { Atom.create(A, x) }; | ||
| 43 | test_clause(headAtoms, bodyAtoms); | ||
| 44 | } | ||
| 45 | |||
| 21 | @Test | 46 | @Test |
| 22 | public void test_simple() { | 47 | public void test_simple() { |
| 23 | Variable x = Variable.create("X"), y1 = Variable.create("y1"), y2 = Variable.create("y2"); | 48 | Variable x = Variable.create("X"), y1 = Variable.create("y1"), y2 = Variable.create("y2"); |
