diff options
Diffstat (limited to 'test/uk/ac/ox/cs/pagoda/junit')
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/junit/AllTests.java | 50 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/junit/ClauseTester.java | 165 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/junit/CostEvaluation.java | 109 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/junit/FullEvaluation.java | 14 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/junit/JAIR_PAGOdA.java | 173 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/junit/JAIR_Scalability.java | 85 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/junit/LightEvaluation.java | 59 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/junit/PagodaDBPedia.java | 27 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/junit/PagodaELU.java | 18 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/junit/PagodaFLY.java | 24 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/junit/PagodaLUBM.java | 38 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/junit/PagodaNPD.java | 42 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/junit/PagodaNPD_bench.java | 27 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/junit/PagodaRLU.java | 18 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/junit/PagodaUOBM.java | 48 |
15 files changed, 897 insertions, 0 deletions
diff --git a/test/uk/ac/ox/cs/pagoda/junit/AllTests.java b/test/uk/ac/ox/cs/pagoda/junit/AllTests.java new file mode 100644 index 0000000..6884081 --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/junit/AllTests.java | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | ||
| 2 | |||
| 3 | import java.io.BufferedWriter; | ||
| 4 | import java.io.FileInputStream; | ||
| 5 | import java.io.FileNotFoundException; | ||
| 6 | import java.io.FileOutputStream; | ||
| 7 | import java.io.IOException; | ||
| 8 | import java.io.InputStream; | ||
| 9 | import java.io.OutputStream; | ||
| 10 | import java.io.OutputStreamWriter; | ||
| 11 | |||
| 12 | import org.junit.runner.RunWith; | ||
| 13 | import org.junit.runners.Suite; | ||
| 14 | import org.junit.runners.Suite.SuiteClasses; | ||
| 15 | |||
| 16 | import uk.ac.ox.cs.data.WriteIntoTurtle; | ||
| 17 | |||
| 18 | @RunWith(Suite.class) | ||
| 19 | @SuiteClasses({ WriteIntoTurtle.class, PagodaUOBM.class | ||
| 20 | }) | ||
| 21 | public class AllTests { | ||
| 22 | |||
| 23 | public static void copy(String source, String dest) { | ||
| 24 | InputStream is = null; | ||
| 25 | OutputStream os = null; | ||
| 26 | try { | ||
| 27 | is = new FileInputStream(source); | ||
| 28 | os = new FileOutputStream(dest); | ||
| 29 | byte[] buffer = new byte[1024]; | ||
| 30 | int length; | ||
| 31 | while ((length = is.read(buffer)) > 0) { | ||
| 32 | os.write(buffer, 0, length); | ||
| 33 | } | ||
| 34 | is.close(); | ||
| 35 | os.close(); | ||
| 36 | |||
| 37 | BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(source))); | ||
| 38 | writer.write(""); | ||
| 39 | writer.close(); | ||
| 40 | } catch (FileNotFoundException e) { | ||
| 41 | e.printStackTrace(); | ||
| 42 | } catch (IOException e) { | ||
| 43 | e.printStackTrace(); | ||
| 44 | } | ||
| 45 | |||
| 46 | // File src = new File(source); | ||
| 47 | // src.delete(); | ||
| 48 | } | ||
| 49 | |||
| 50 | } | ||
diff --git a/test/uk/ac/ox/cs/pagoda/junit/ClauseTester.java b/test/uk/ac/ox/cs/pagoda/junit/ClauseTester.java new file mode 100644 index 0000000..d23f186 --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/junit/ClauseTester.java | |||
| @@ -0,0 +1,165 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | ||
| 2 | |||
| 3 | import static org.junit.Assert.*; | ||
| 4 | |||
| 5 | import org.junit.Test; | ||
| 6 | import org.semanticweb.HermiT.model.Atom; | ||
| 7 | import org.semanticweb.HermiT.model.AtomicConcept; | ||
| 8 | import org.semanticweb.HermiT.model.AtomicRole; | ||
| 9 | import org.semanticweb.HermiT.model.DLClause; | ||
| 10 | import org.semanticweb.HermiT.model.Equality; | ||
| 11 | import org.semanticweb.HermiT.model.Variable; | ||
| 12 | import org.semanticweb.owlapi.apibinding.OWLManager; | ||
| 13 | import org.semanticweb.owlapi.model.OWLOntology; | ||
| 14 | import org.semanticweb.owlapi.model.OWLOntologyManager; | ||
| 15 | |||
| 16 | import uk.ac.ox.cs.pagoda.approx.Clause; | ||
| 17 | import uk.ac.ox.cs.pagoda.approx.Clausifier; | ||
| 18 | |||
| 19 | public class ClauseTester { | ||
| 20 | |||
| 21 | @Test | ||
| 22 | public void test_simple() { | ||
| 23 | Variable x = Variable.create("X"), y1 = Variable.create("y1"), y2 = Variable.create("y2"); | ||
| 24 | AtomicConcept A = AtomicConcept.create("A"); | ||
| 25 | AtomicRole r = AtomicRole.create("r"); | ||
| 26 | Atom[] bodyAtoms = new Atom[] { | ||
| 27 | Atom.create(A, x), | ||
| 28 | Atom.create(r, x, y1), | ||
| 29 | Atom.create(r, x, y2) | ||
| 30 | }; | ||
| 31 | |||
| 32 | Atom[] headAtoms = new Atom[] { | ||
| 33 | Atom.create(Equality.INSTANCE, y1, y2) | ||
| 34 | }; | ||
| 35 | |||
| 36 | OWLOntologyManager m = OWLManager.createOWLOntologyManager(); | ||
| 37 | OWLOntology emptyOntology = null; | ||
| 38 | try { | ||
| 39 | emptyOntology = m.createOntology(); | ||
| 40 | } catch (Exception e) { | ||
| 41 | e.printStackTrace(); | ||
| 42 | fail("failed to create a new ontology"); | ||
| 43 | } | ||
| 44 | Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); | ||
| 45 | System.out.println(c.toString()); | ||
| 46 | } | ||
| 47 | |||
| 48 | @Test | ||
| 49 | public void test_more() { | ||
| 50 | Variable x = Variable.create("X"), y1 = Variable.create("y1"), y2 = Variable.create("y2"), y3 = Variable.create("y3"); | ||
| 51 | AtomicConcept A = AtomicConcept.create("A"); | ||
| 52 | AtomicRole r = AtomicRole.create("r"); | ||
| 53 | Atom[] bodyAtoms = new Atom[] { | ||
| 54 | Atom.create(A, x), | ||
| 55 | Atom.create(r, x, y1), | ||
| 56 | Atom.create(r, x, y2), | ||
| 57 | Atom.create(r, x, y3), | ||
| 58 | }; | ||
| 59 | |||
| 60 | Atom[] headAtoms = new Atom[] { | ||
| 61 | Atom.create(Equality.INSTANCE, y1, y2), | ||
| 62 | Atom.create(Equality.INSTANCE, y1, y3), | ||
| 63 | Atom.create(Equality.INSTANCE, y2, y3) | ||
| 64 | }; | ||
| 65 | |||
| 66 | OWLOntologyManager m = OWLManager.createOWLOntologyManager(); | ||
| 67 | OWLOntology emptyOntology = null; | ||
| 68 | try { | ||
| 69 | emptyOntology = m.createOntology(); | ||
| 70 | } catch (Exception e) { | ||
| 71 | e.printStackTrace(); | ||
| 72 | fail("failed to create a new ontology"); | ||
| 73 | } | ||
| 74 | Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); | ||
| 75 | System.out.println(c.toString()); | ||
| 76 | } | ||
| 77 | |||
| 78 | @Test | ||
| 79 | public void test_inverse() { | ||
| 80 | Variable x = Variable.create("X"), y1 = Variable.create("y1"), y2 = Variable.create("y2"); | ||
| 81 | AtomicConcept A = AtomicConcept.create("A"); | ||
| 82 | AtomicRole r = AtomicRole.create("r"); | ||
| 83 | Atom[] bodyAtoms = new Atom[] { | ||
| 84 | Atom.create(A, x), | ||
| 85 | Atom.create(r, y1, x), | ||
| 86 | Atom.create(r, y2, x) | ||
| 87 | }; | ||
| 88 | |||
| 89 | Atom[] headAtoms = new Atom[] { | ||
| 90 | Atom.create(Equality.INSTANCE, y1, y2) | ||
| 91 | }; | ||
| 92 | |||
| 93 | OWLOntologyManager m = OWLManager.createOWLOntologyManager(); | ||
| 94 | OWLOntology emptyOntology = null; | ||
| 95 | try { | ||
| 96 | emptyOntology = m.createOntology(); | ||
| 97 | } catch (Exception e) { | ||
| 98 | e.printStackTrace(); | ||
| 99 | fail("failed to create a new ontology"); | ||
| 100 | } | ||
| 101 | Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); | ||
| 102 | System.out.println(c.toString()); | ||
| 103 | } | ||
| 104 | |||
| 105 | @Test | ||
| 106 | public void test_fillter() { | ||
| 107 | Variable x = Variable.create("X"), y1 = Variable.create("y1"), y2 = Variable.create("y2"); | ||
| 108 | AtomicConcept A = AtomicConcept.create("A"); | ||
| 109 | AtomicConcept B = AtomicConcept.create("B"); | ||
| 110 | AtomicRole r = AtomicRole.create("r"); | ||
| 111 | Atom[] bodyAtoms = new Atom[] { | ||
| 112 | Atom.create(A, x), | ||
| 113 | Atom.create(r, y1, x), | ||
| 114 | Atom.create(r, y2, x), | ||
| 115 | Atom.create(B, y1), | ||
| 116 | Atom.create(B, y2) | ||
| 117 | }; | ||
| 118 | |||
| 119 | Atom[] headAtoms = new Atom[] { | ||
| 120 | Atom.create(Equality.INSTANCE, y1, y2) | ||
| 121 | }; | ||
| 122 | |||
| 123 | OWLOntologyManager m = OWLManager.createOWLOntologyManager(); | ||
| 124 | OWLOntology emptyOntology = null; | ||
| 125 | try { | ||
| 126 | emptyOntology = m.createOntology(); | ||
| 127 | } catch (Exception e) { | ||
| 128 | e.printStackTrace(); | ||
| 129 | fail("failed to create a new ontology"); | ||
| 130 | } | ||
| 131 | Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); | ||
| 132 | System.out.println(c.toString()); | ||
| 133 | } | ||
| 134 | |||
| 135 | @Test | ||
| 136 | public void test_negFillter() { | ||
| 137 | Variable x = Variable.create("X"), y1 = Variable.create("y1"), y2 = Variable.create("y2"); | ||
| 138 | AtomicConcept A = AtomicConcept.create("A"); | ||
| 139 | AtomicConcept B = AtomicConcept.create("B"); | ||
| 140 | AtomicRole r = AtomicRole.create("r"); | ||
| 141 | Atom[] bodyAtoms = new Atom[] { | ||
| 142 | Atom.create(A, x), | ||
| 143 | Atom.create(r, y1, x), | ||
| 144 | Atom.create(r, y2, x) | ||
| 145 | }; | ||
| 146 | |||
| 147 | Atom[] headAtoms = new Atom[] { | ||
| 148 | Atom.create(Equality.INSTANCE, y1, y2), | ||
| 149 | Atom.create(B, y1), | ||
| 150 | Atom.create(B, y2) | ||
| 151 | }; | ||
| 152 | |||
| 153 | OWLOntologyManager m = OWLManager.createOWLOntologyManager(); | ||
| 154 | OWLOntology emptyOntology = null; | ||
| 155 | try { | ||
| 156 | emptyOntology = m.createOntology(); | ||
| 157 | } catch (Exception e) { | ||
| 158 | e.printStackTrace(); | ||
| 159 | fail("failed to create a new ontology"); | ||
| 160 | } | ||
| 161 | Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); | ||
| 162 | System.out.println(c.toString()); | ||
| 163 | } | ||
| 164 | |||
| 165 | } | ||
diff --git a/test/uk/ac/ox/cs/pagoda/junit/CostEvaluation.java b/test/uk/ac/ox/cs/pagoda/junit/CostEvaluation.java new file mode 100644 index 0000000..87b01ed --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/junit/CostEvaluation.java | |||
| @@ -0,0 +1,109 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | ||
| 2 | |||
| 3 | import org.junit.Test; | ||
| 4 | import org.semanticweb.owlapi.model.OWLOntology; | ||
| 5 | |||
| 6 | import uk.ac.ox.cs.pagoda.owl.OWLHelper; | ||
| 7 | import uk.ac.ox.cs.pagoda.reasoner.QueryReasoner; | ||
| 8 | import uk.ac.ox.cs.pagoda.reasoner.QueryReasoner.Type; | ||
| 9 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | ||
| 10 | import uk.ac.ox.cs.pagoda.util.Timer; | ||
| 11 | import uk.ac.ox.cs.pagoda.util.Utility; | ||
| 12 | |||
| 13 | public class CostEvaluation { | ||
| 14 | |||
| 15 | @Test | ||
| 16 | public void lubm100() { | ||
| 17 | int number = 1; | ||
| 18 | PagodaTester.main( | ||
| 19 | PagodaTester.onto_dir + "lubm/univ-bench.owl", | ||
| 20 | PagodaTester.onto_dir + "lubm/data/lubm" + number + ".ttl", | ||
| 21 | PagodaTester.onto_dir + "lubm/queries/test_all_pagoda.sparql" | ||
| 22 | ); | ||
| 23 | // AllTests.copy("output/log4j.log", "results-backup/jair/lubm" + number + ".out"); | ||
| 24 | } | ||
| 25 | |||
| 26 | public void lubm1000() { | ||
| 27 | int number = 1000; | ||
| 28 | String[] args = new String[] { | ||
| 29 | PagodaTester.onto_dir + "lubm/univ-bench.owl", | ||
| 30 | PagodaTester.onto_dir + "lubm/data/lubm" + number + ".ttl", | ||
| 31 | PagodaTester.onto_dir + "lubm/queries/test_all_pagoda.sparql" | ||
| 32 | }; | ||
| 33 | OWLOntology ontology = OWLHelper.loadOntology(args[0]); | ||
| 34 | QueryReasoner reasoner = QueryReasoner.getInstance(Type.ELHOU, ontology, true, true); | ||
| 35 | Timer t = new Timer(); | ||
| 36 | reasoner.loadOntology(ontology); | ||
| 37 | reasoner.importData(args[1]); | ||
| 38 | if (!reasoner.preprocess()) | ||
| 39 | return ; | ||
| 40 | Utility.logInfo("Preprocessing Done in " + t.duration() + " seconds."); | ||
| 41 | |||
| 42 | reasoner.evaluate(reasoner.getQueryManager().collectQueryRecords(args[2])); | ||
| 43 | // AllTests.copy("output/log4j.log", "results-backup/jair/lubm" + number + ".out"); | ||
| 44 | } | ||
| 45 | |||
| 46 | @Test | ||
| 47 | public void uobm5() { | ||
| 48 | int number = 1; | ||
| 49 | String[] args = new String[] { | ||
| 50 | PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", | ||
| 51 | PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", | ||
| 52 | PagodaTester.onto_dir + "uobm/queries/standard_all_pagoda.sparql" | ||
| 53 | }; | ||
| 54 | PagodaTester.main(args); | ||
| 55 | // AllTests.copy("output/log4j.log", "results-backup/jair/uobm" + number + ".out"); | ||
| 56 | } | ||
| 57 | |||
| 58 | public void uobm100() { | ||
| 59 | int number = 200; | ||
| 60 | String[] args = new String[] { | ||
| 61 | PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", | ||
| 62 | PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", | ||
| 63 | PagodaTester.onto_dir + "uobm/queries/standard_group3_all.sparql" | ||
| 64 | }; | ||
| 65 | PagodaTester.main(args); | ||
| 66 | // AllTests.copy("output/log4j.log", "results-backup/jair/uobm" + number + ".out"); | ||
| 67 | } | ||
| 68 | |||
| 69 | public void uobm500() { | ||
| 70 | int number = 500; | ||
| 71 | String[] args = new String[] { | ||
| 72 | PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", | ||
| 73 | PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", | ||
| 74 | PagodaTester.onto_dir + "uobm/queries/standard_all_pagoda.sparql" | ||
| 75 | }; | ||
| 76 | |||
| 77 | OWLOntology ontology = OWLHelper.loadOntology(args[0]); | ||
| 78 | QueryReasoner reasoner = QueryReasoner.getInstance(Type.ELHOU, ontology, true, true); | ||
| 79 | Timer t = new Timer(); | ||
| 80 | reasoner.loadOntology(ontology); | ||
| 81 | reasoner.importData(args[1]); | ||
| 82 | if (!reasoner.preprocess()) | ||
| 83 | return ; | ||
| 84 | Utility.logInfo("Preprocessing Done in " + t.duration() + " seconds."); | ||
| 85 | |||
| 86 | reasoner.evaluate(reasoner.getQueryManager().collectQueryRecords(args[2])); | ||
| 87 | // AllTests.copy("output/log4j.log", "results-backup/jair/uobm" + number + ".out"); | ||
| 88 | } | ||
| 89 | |||
| 90 | |||
| 91 | public static void main(String... args) { | ||
| 92 | args = new String[] { | ||
| 93 | PagodaTester.onto_dir + "dbpedia/integratedOntology-all-in-one-minus-datatype.owl", | ||
| 94 | PagodaTester.onto_dir + "dbpedia/data/dbpedia-minus-datatype-new.ttl", | ||
| 95 | PagodaTester.onto_dir + "dbpedia/queries/atomic_ground.sparql" | ||
| 96 | }; | ||
| 97 | |||
| 98 | OWLOntology ontology = OWLHelper.loadOntology(args[0]); | ||
| 99 | QueryReasoner reasoner = QueryReasoner.getInstance(Type.ELHOU, ontology, true, true); | ||
| 100 | Timer t = new Timer(); | ||
| 101 | reasoner.loadOntology(ontology); | ||
| 102 | reasoner.importData(args[1]); | ||
| 103 | if (!reasoner.preprocess()) | ||
| 104 | return ; | ||
| 105 | Utility.logInfo("Preprocessing Done in " + t.duration() + " seconds."); | ||
| 106 | |||
| 107 | reasoner.evaluate(reasoner.getQueryManager().collectQueryRecords(args[2])); | ||
| 108 | } | ||
| 109 | } | ||
diff --git a/test/uk/ac/ox/cs/pagoda/junit/FullEvaluation.java b/test/uk/ac/ox/cs/pagoda/junit/FullEvaluation.java new file mode 100644 index 0000000..3406ed2 --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/junit/FullEvaluation.java | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | ||
| 2 | |||
| 3 | import org.junit.runner.RunWith; | ||
| 4 | import org.junit.runners.Suite; | ||
| 5 | import org.junit.runners.Suite.SuiteClasses; | ||
| 6 | |||
| 7 | @RunWith(Suite.class) | ||
| 8 | @SuiteClasses({ LightEvaluation.class, | ||
| 9 | CostEvaluation.class | ||
| 10 | }) | ||
| 11 | |||
| 12 | public class FullEvaluation { | ||
| 13 | |||
| 14 | } | ||
diff --git a/test/uk/ac/ox/cs/pagoda/junit/JAIR_PAGOdA.java b/test/uk/ac/ox/cs/pagoda/junit/JAIR_PAGOdA.java new file mode 100644 index 0000000..2a148cc --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/junit/JAIR_PAGOdA.java | |||
| @@ -0,0 +1,173 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | ||
| 2 | |||
| 3 | import org.junit.Test; | ||
| 4 | |||
| 5 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | ||
| 6 | |||
| 7 | public class JAIR_PAGOdA { | ||
| 8 | |||
| 9 | public void lubm1() { | ||
| 10 | String[] args = new String[] { | ||
| 11 | PagodaTester.onto_dir + "lubm/univ-bench.owl", | ||
| 12 | PagodaTester.onto_dir + "lubm/data/lubm1.ttl", | ||
| 13 | PagodaTester.onto_dir + "lubm/queries/test.sparql" | ||
| 14 | }; | ||
| 15 | PagodaTester.main(args); | ||
| 16 | AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/lubm1/pagoda"); | ||
| 17 | } | ||
| 18 | |||
| 19 | |||
| 20 | public void lubm1_conj() { | ||
| 21 | String[] args = new String[] { | ||
| 22 | PagodaTester.onto_dir + "lubm/univ-bench.owl", | ||
| 23 | PagodaTester.onto_dir + "lubm/data/lubm1.ttl", | ||
| 24 | PagodaTester.onto_dir + "lubm/queries/test_pellet.sparql" | ||
| 25 | }; | ||
| 26 | PagodaTester.main(args); | ||
| 27 | AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/lubm1/pagoda_conj"); | ||
| 28 | } | ||
| 29 | |||
| 30 | |||
| 31 | public void lubm1_rolledUp() { | ||
| 32 | String[] args = new String[] { | ||
| 33 | "/home/yzhou/backup/20141212/univ-bench-queries.owl", | ||
| 34 | PagodaTester.onto_dir + "lubm/data/lubm1.ttl", | ||
| 35 | PagodaTester.onto_dir + "lubm/queries/atomic_lubm.sparql" | ||
| 36 | }; | ||
| 37 | PagodaTester.main(args); | ||
| 38 | AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/lubm1/pagoda_rolledUp"); | ||
| 39 | } | ||
| 40 | |||
| 41 | |||
| 42 | public void uobm1() { | ||
| 43 | String[] args = new String[] { | ||
| 44 | PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", | ||
| 45 | PagodaTester.onto_dir + "uobm/data/uobm1.ttl", | ||
| 46 | PagodaTester.onto_dir + "uobm/queries/standard.sparql" | ||
| 47 | }; | ||
| 48 | PagodaTester.main(args); | ||
| 49 | AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uobm1/pagoda"); | ||
| 50 | } | ||
| 51 | |||
| 52 | |||
| 53 | public void uobm1_conj() { | ||
| 54 | String[] args = new String[] { | ||
| 55 | PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", | ||
| 56 | PagodaTester.onto_dir + "uobm/data/uobm1.ttl", | ||
| 57 | PagodaTester.onto_dir + "uobm/queries/standard_pellet.sparql" | ||
| 58 | }; | ||
| 59 | PagodaTester.main(args); | ||
| 60 | AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uobm1/pagoda_conj"); | ||
| 61 | } | ||
| 62 | |||
| 63 | |||
| 64 | public void uobm1_rolledUp() { | ||
| 65 | String[] args = new String[] { | ||
| 66 | "/home/yzhou/backup/20141212/univ-bench-dl-queries.owl", | ||
| 67 | PagodaTester.onto_dir + "uobm/data/uobm1.ttl", | ||
| 68 | PagodaTester.onto_dir + "uobm/queries/atomic_uobm.sparql" | ||
| 69 | }; | ||
| 70 | PagodaTester.main(args); | ||
| 71 | // AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uobm1/pagoda_rolledUp"); | ||
| 72 | } | ||
| 73 | |||
| 74 | |||
| 75 | public void fly() { | ||
| 76 | String[] args = new String[] { | ||
| 77 | PagodaTester.onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl", | ||
| 78 | null, | ||
| 79 | PagodaTester.onto_dir + "fly/queries/fly_pellet.sparql" | ||
| 80 | }; | ||
| 81 | PagodaTester.main(args); | ||
| 82 | // AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/fly/pagoda"); | ||
| 83 | } | ||
| 84 | |||
| 85 | @Test | ||
| 86 | public void fly_conj() { | ||
| 87 | String[] args = new String[] { | ||
| 88 | PagodaTester.onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl", | ||
| 89 | null, | ||
| 90 | PagodaTester.onto_dir + "fly/queries/fly_pellet.sparql" | ||
| 91 | }; | ||
| 92 | PagodaTester.main(args); | ||
| 93 | AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/fly/pagoda_conj"); | ||
| 94 | } | ||
| 95 | |||
| 96 | |||
| 97 | public void fly_rolledUp() { | ||
| 98 | PagodaTester.main(new String[] { | ||
| 99 | // PagodaTester.onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl", | ||
| 100 | PagodaTester.onto_dir + "fly/fly-all-in-one_rolledUp.owl", | ||
| 101 | null, | ||
| 102 | PagodaTester.onto_dir + "fly/queries/fly_atomic.sparql" | ||
| 103 | }); | ||
| 104 | // AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/fly/pagoda_rolledUp"); | ||
| 105 | } | ||
| 106 | |||
| 107 | public void dbpedia() { | ||
| 108 | PagodaTester.main( | ||
| 109 | PagodaTester.onto_dir + "dbpedia/integratedOntology-all-in-one-minus-datatype.owl", | ||
| 110 | PagodaTester.onto_dir + "dbpedia/data/dbpedia-minus-datatype-new.ttl", | ||
| 111 | PagodaTester.onto_dir + "dbpedia/queries/atomic_ground.sparql" | ||
| 112 | , "dbpedia.ans" | ||
| 113 | ); | ||
| 114 | |||
| 115 | // AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/dbpedia/pagoda"); | ||
| 116 | } | ||
| 117 | |||
| 118 | public void npd() { | ||
| 119 | PagodaTester.main( | ||
| 120 | PagodaTester.onto_dir + "npd/npd-all-minus-datatype.owl", | ||
| 121 | PagodaTester.onto_dir + "npd/data/npd-data-dump-minus-datatype-new.ttl", | ||
| 122 | PagodaTester.onto_dir + "npd/queries/atomic_ground.sparql" | ||
| 123 | , "npd.ans" | ||
| 124 | ); | ||
| 125 | |||
| 126 | // AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/npd/pagoda"); | ||
| 127 | } | ||
| 128 | |||
| 129 | public void reactome() { | ||
| 130 | PagodaTester.main( | ||
| 131 | PagodaTester.onto_dir + "bio2rdf/reactome/biopax-level3-processed.owl", | ||
| 132 | PagodaTester.onto_dir + "bio2rdf/reactome/graph sampling/reactome_sample_10.ttl", | ||
| 133 | // null, | ||
| 134 | // PagodaTester.onto_dir + "bio2rdf/reactome/queries/atomic_ground.sparql" | ||
| 135 | PagodaTester.onto_dir + "bio2rdf/reactome/queries/example.sparql" | ||
| 136 | , "pagoda_reactome.ans" | ||
| 137 | ); | ||
| 138 | AllTests.copy("log4j.log", "output/jair/pagoda_reactome.example"); | ||
| 139 | |||
| 140 | // AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/reactome/pagoda_10p"); | ||
| 141 | } | ||
| 142 | |||
| 143 | public void chembl() { | ||
| 144 | PagodaTester.main( | ||
| 145 | PagodaTester.onto_dir + "bio2rdf/chembl/cco-noDPR.ttl", | ||
| 146 | PagodaTester.onto_dir + "bio2rdf/chembl/graph sampling/sample_1.nt", | ||
| 147 | // PagodaTester.onto_dir + "bio2rdf/chembl/queries/atomic_ground.sparql" | ||
| 148 | PagodaTester.onto_dir + "bio2rdf/chembl/queries/example.sparql" | ||
| 149 | , "pagoda_chembl.ans" | ||
| 150 | ); | ||
| 151 | AllTests.copy("log4j.log", "output/jair/pagoda_chembl.example"); | ||
| 152 | // AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/chembl/pagoda_1p"); | ||
| 153 | } | ||
| 154 | |||
| 155 | public void uniprot() { | ||
| 156 | PagodaTester.main( | ||
| 157 | PagodaTester.onto_dir + "bio2rdf/uniprot/core-sat-processed.owl", | ||
| 158 | PagodaTester.onto_dir + "bio2rdf/uniprot/graph sampling/sample_1.nt", | ||
| 159 | // null, | ||
| 160 | // PagodaTester.onto_dir + "bio2rdf/uniprot/queries/atomic_ground.sparql" | ||
| 161 | PagodaTester.onto_dir + "bio2rdf/uniprot/queries/example.sparql" | ||
| 162 | , "pagoda_uniprot.ans" | ||
| 163 | ); | ||
| 164 | AllTests.copy("log4j.log", "output/jair/pagoda_uniprot.example"); | ||
| 165 | // AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uniprot/pagoda_1p"); | ||
| 166 | } | ||
| 167 | |||
| 168 | |||
| 169 | public static void main(String... args) { | ||
| 170 | new JAIR_PAGOdA().fly(); | ||
| 171 | } | ||
| 172 | |||
| 173 | } | ||
diff --git a/test/uk/ac/ox/cs/pagoda/junit/JAIR_Scalability.java b/test/uk/ac/ox/cs/pagoda/junit/JAIR_Scalability.java new file mode 100644 index 0000000..5bd3134 --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/junit/JAIR_Scalability.java | |||
| @@ -0,0 +1,85 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | ||
| 2 | |||
| 3 | import org.junit.Test; | ||
| 4 | |||
| 5 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | ||
| 6 | |||
| 7 | public class JAIR_Scalability { | ||
| 8 | |||
| 9 | private static final String date = "_0123"; | ||
| 10 | |||
| 11 | @Test | ||
| 12 | public void reactome() { | ||
| 13 | testReactome(10, false); | ||
| 14 | } | ||
| 15 | |||
| 16 | @Test | ||
| 17 | public void chembl() { | ||
| 18 | testChEMBL(1, false); | ||
| 19 | } | ||
| 20 | |||
| 21 | @Test | ||
| 22 | public void uniprot() { | ||
| 23 | testUniProt(1, false); | ||
| 24 | } | ||
| 25 | |||
| 26 | public void testReactome(int percentage, boolean save) { | ||
| 27 | String[] args = new String[] { | ||
| 28 | PagodaTester.onto_dir + "bio2rdf/reactome/biopax-level3-processed.owl", | ||
| 29 | PagodaTester.onto_dir + "bio2rdf/reactome/graph sampling/simplifed_sample_" + percentage + ".ttl", | ||
| 30 | PagodaTester.onto_dir + "bio2rdf/reactome/queries/test.sparql" | ||
| 31 | , "reactome.ans" | ||
| 32 | }; | ||
| 33 | if (percentage == 10) | ||
| 34 | args[1] = args[1].replace("simplifed", "reactome"); | ||
| 35 | |||
| 36 | PagodaTester.main(args); | ||
| 37 | if (save) | ||
| 38 | AllTests.copy("log4j.log", "/home/yzhou/java-workspace/test-share/results_new/reactome/pagoda_" + percentage + "p" + date); | ||
| 39 | } | ||
| 40 | |||
| 41 | public void testChEMBL(int percentage, boolean save) { | ||
| 42 | String[] args = new String[] { | ||
| 43 | PagodaTester.onto_dir + "bio2rdf/chembl/cco-noDPR.ttl", | ||
| 44 | PagodaTester.onto_dir + "bio2rdf/chembl/sample_" + percentage + ".nt", | ||
| 45 | // PagodaTester.onto_dir + "bio2rdf/chembl/queries/atomic_ground.sparql" | ||
| 46 | PagodaTester.onto_dir + "bio2rdf/chembl/queries/test.sparql" | ||
| 47 | , "chembl.ans" | ||
| 48 | }; | ||
| 49 | if (percentage == 1 || percentage == 10 || percentage == 50) | ||
| 50 | args[1] = args[1].replace("chembl", "chembl/graph sampling"); | ||
| 51 | else | ||
| 52 | if (percentage == 100) | ||
| 53 | args[1] = "/home/yzhou/RDFData/ChEMBL/facts/ChEMBL.ttl"; | ||
| 54 | |||
| 55 | PagodaTester.main(args); | ||
| 56 | if (save) | ||
| 57 | AllTests.copy("log4j.log", "/home/yzhou/java-workspace/test-share/results_new/chembl/pagoda_" + percentage + "p" + date); | ||
| 58 | } | ||
| 59 | |||
| 60 | public void testUniProt(int percentage, boolean save) { | ||
| 61 | String[] args = new String[] { | ||
| 62 | PagodaTester.onto_dir + "bio2rdf/uniprot/core-sat-processed.owl", | ||
| 63 | PagodaTester.onto_dir + "bio2rdf/uniprot/sample_" + percentage + ".nt", | ||
| 64 | // PagodaTester.onto_dir + "bio2rdf/uniprot/queries/atomic_ground.sparql" | ||
| 65 | PagodaTester.onto_dir + "bio2rdf/uniprot/queries/test.sparql" | ||
| 66 | , "uniprot.ans" | ||
| 67 | }; | ||
| 68 | |||
| 69 | if (percentage == 1 || percentage == 10 || percentage == 50) | ||
| 70 | args[1] = args[1].replace("uniprot", "uniprot/graph sampling"); | ||
| 71 | else | ||
| 72 | if (percentage == 100) | ||
| 73 | args[1] = "/home/yzhou/krr-nas-share/Yujiao/ontologies/bio2rdf/uniprot/data/uniprot_cleaned.nt"; | ||
| 74 | |||
| 75 | PagodaTester.main(args); | ||
| 76 | if (save) | ||
| 77 | AllTests.copy("log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uniprot/pagoda_" + percentage + "p" + date); | ||
| 78 | } | ||
| 79 | |||
| 80 | public static void main(String... args) { | ||
| 81 | PagodaTester.ShellMode = true; | ||
| 82 | new JAIR_Scalability().testUniProt(50, false); | ||
| 83 | } | ||
| 84 | |||
| 85 | } | ||
diff --git a/test/uk/ac/ox/cs/pagoda/junit/LightEvaluation.java b/test/uk/ac/ox/cs/pagoda/junit/LightEvaluation.java new file mode 100644 index 0000000..1ddca15 --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/junit/LightEvaluation.java | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | ||
| 2 | |||
| 3 | import org.junit.Test; | ||
| 4 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | ||
| 5 | |||
| 6 | public class LightEvaluation { | ||
| 7 | |||
| 8 | @Test | ||
| 9 | public void uobm1() { | ||
| 10 | int number = 1; | ||
| 11 | PagodaTester.main( | ||
| 12 | PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", | ||
| 13 | PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", | ||
| 14 | PagodaTester.onto_dir + "uobm/queries/standard.sparql" | ||
| 15 | ); | ||
| 16 | AllTests.copy("log4j.log", "output/jair/uobm1.out"); | ||
| 17 | } | ||
| 18 | |||
| 19 | @Test | ||
| 20 | public void lubm100() { | ||
| 21 | int number = 100; | ||
| 22 | PagodaTester.main( | ||
| 23 | PagodaTester.onto_dir + "lubm/univ-bench.owl", | ||
| 24 | PagodaTester.onto_dir + "lubm/data/lubm" + number + ".ttl", | ||
| 25 | PagodaTester.onto_dir + "lubm/queries/test.sparql" | ||
| 26 | ); | ||
| 27 | AllTests.copy("log4j.log", "results-backup/current/lubm100.out"); | ||
| 28 | } | ||
| 29 | |||
| 30 | @Test | ||
| 31 | public void fly() { | ||
| 32 | PagodaTester.main( | ||
| 33 | PagodaTester.onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl", | ||
| 34 | PagodaTester.onto_dir + "fly/queries/fly.sparql" | ||
| 35 | ); | ||
| 36 | AllTests.copy("log4j.log", "results-backup/current/fly.out"); | ||
| 37 | } | ||
| 38 | |||
| 39 | @Test | ||
| 40 | public void dbpedia() { | ||
| 41 | PagodaTester.main( | ||
| 42 | PagodaTester.onto_dir + "dbpedia/integratedOntology-all-in-one-minus-datatype.owl", | ||
| 43 | PagodaTester.onto_dir + "dbpedia/data/dbpedia-minus-datatype-new.ttl", | ||
| 44 | PagodaTester.onto_dir + "dbpedia/atomic.sparql" | ||
| 45 | ); | ||
| 46 | AllTests.copy("log4j.log", "results-backup/current/dbpedia.out"); | ||
| 47 | } | ||
| 48 | |||
| 49 | @Test | ||
| 50 | public void npdWithoutDataType() { | ||
| 51 | PagodaTester.main( | ||
| 52 | PagodaTester.onto_dir + "npd/npd-all-minus-datatype.owl", | ||
| 53 | PagodaTester.onto_dir + "npd/data/npd-data-dump-minus-datatype-new.ttl", | ||
| 54 | PagodaTester.onto_dir + "npd/queries/atomic.sparql" | ||
| 55 | ); | ||
| 56 | AllTests.copy("log4j.log", "results-backup/current/npd_minus.out"); | ||
| 57 | } | ||
| 58 | |||
| 59 | } | ||
diff --git a/test/uk/ac/ox/cs/pagoda/junit/PagodaDBPedia.java b/test/uk/ac/ox/cs/pagoda/junit/PagodaDBPedia.java new file mode 100644 index 0000000..37ffb44 --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/junit/PagodaDBPedia.java | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | ||
| 2 | |||
| 3 | import static org.junit.Assert.fail; | ||
| 4 | |||
| 5 | import org.junit.Test; | ||
| 6 | |||
| 7 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | ||
| 8 | import uk.ac.ox.cs.pagoda.tester.Statistics; | ||
| 9 | |||
| 10 | public class PagodaDBPedia { | ||
| 11 | |||
| 12 | @Test | ||
| 13 | public void test() { | ||
| 14 | PagodaTester.main( | ||
| 15 | PagodaTester.onto_dir + "dbpedia/integratedOntology-all-in-one-minus-datatype.owl", | ||
| 16 | PagodaTester.onto_dir + "dbpedia/data/dbpedia-minus-datatype-new.ttl", | ||
| 17 | PagodaTester.onto_dir + "dbpedia/atomic.sparql" | ||
| 18 | ); | ||
| 19 | |||
| 20 | Statistics stat = new Statistics("output/log4j.log"); | ||
| 21 | String diff = stat.diff("results-backup/benchmark/dbpedia.out"); | ||
| 22 | AllTests.copy("output/log4j.log", "results-backup/current/dbpedia.out"); | ||
| 23 | if (!diff.isEmpty()) | ||
| 24 | fail(diff); | ||
| 25 | } | ||
| 26 | |||
| 27 | } | ||
diff --git a/test/uk/ac/ox/cs/pagoda/junit/PagodaELU.java b/test/uk/ac/ox/cs/pagoda/junit/PagodaELU.java new file mode 100644 index 0000000..d999a6e --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/junit/PagodaELU.java | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | ||
| 2 | |||
| 3 | import org.junit.Test; | ||
| 4 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | ||
| 5 | |||
| 6 | public class PagodaELU { | ||
| 7 | |||
| 8 | @Test void test() { | ||
| 9 | int number = 1; | ||
| 10 | PagodaTester.main( | ||
| 11 | PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", | ||
| 12 | PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", | ||
| 13 | PagodaTester.onto_dir + "uobm/queries/standard.sparql" | ||
| 14 | ); | ||
| 15 | } | ||
| 16 | |||
| 17 | |||
| 18 | } | ||
diff --git a/test/uk/ac/ox/cs/pagoda/junit/PagodaFLY.java b/test/uk/ac/ox/cs/pagoda/junit/PagodaFLY.java new file mode 100644 index 0000000..4631837 --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/junit/PagodaFLY.java | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | ||
| 2 | |||
| 3 | import org.junit.Test; | ||
| 4 | |||
| 5 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | ||
| 6 | |||
| 7 | public class PagodaFLY { | ||
| 8 | |||
| 9 | @Test | ||
| 10 | public void test() { | ||
| 11 | PagodaTester.main( | ||
| 12 | PagodaTester.onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl", | ||
| 13 | PagodaTester.onto_dir + "fly/queries/fly_pellet.sparql" | ||
| 14 | ); | ||
| 15 | |||
| 16 | // Statistics stat = new Statistics("output/log4j.log"); | ||
| 17 | // String diff = stat.diff("results-backup/benchmark/fly.out"); | ||
| 18 | // AllTests.copy("output/log4j.log", "results-backup/current/fly.out"); | ||
| 19 | // if (!diff.isEmpty()) | ||
| 20 | // fail(diff); | ||
| 21 | } | ||
| 22 | |||
| 23 | |||
| 24 | } | ||
diff --git a/test/uk/ac/ox/cs/pagoda/junit/PagodaLUBM.java b/test/uk/ac/ox/cs/pagoda/junit/PagodaLUBM.java new file mode 100644 index 0000000..f8fef0e --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/junit/PagodaLUBM.java | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | ||
| 2 | |||
| 3 | import static org.junit.Assert.*; | ||
| 4 | |||
| 5 | import org.junit.Test; | ||
| 6 | |||
| 7 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | ||
| 8 | import uk.ac.ox.cs.pagoda.tester.Statistics; | ||
| 9 | |||
| 10 | public class PagodaLUBM { | ||
| 11 | |||
| 12 | public void test_all(int number) { | ||
| 13 | PagodaTester.main( | ||
| 14 | PagodaTester.onto_dir + "lubm/univ-bench.owl", | ||
| 15 | PagodaTester.onto_dir + "lubm/data/lubm" + number + ".ttl", | ||
| 16 | PagodaTester.onto_dir + "lubm/queries/test_all_pagoda.sparql" | ||
| 17 | ); | ||
| 18 | |||
| 19 | AllTests.copy("log4j.log", "output/jair/lubm" + number + ".out"); | ||
| 20 | } | ||
| 21 | |||
| 22 | @Test | ||
| 23 | public void test1() { test_all(1); } | ||
| 24 | |||
| 25 | public void test() { | ||
| 26 | int number = 100; | ||
| 27 | test_all(number); | ||
| 28 | } | ||
| 29 | |||
| 30 | public void check(int number) { | ||
| 31 | Statistics stat = new Statistics("output/log4j.log"); | ||
| 32 | String diff = stat.diff("results-backup/benchmark/lubm" + number + ".out"); | ||
| 33 | AllTests.copy("output/log4j.log", "results-backup/current/lubm" + number + ".out"); | ||
| 34 | if (!diff.isEmpty()) | ||
| 35 | fail(diff); | ||
| 36 | } | ||
| 37 | |||
| 38 | } | ||
diff --git a/test/uk/ac/ox/cs/pagoda/junit/PagodaNPD.java b/test/uk/ac/ox/cs/pagoda/junit/PagodaNPD.java new file mode 100644 index 0000000..96edbb4 --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/junit/PagodaNPD.java | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | ||
| 2 | |||
| 3 | import static org.junit.Assert.fail; | ||
| 4 | |||
| 5 | import org.junit.Test; | ||
| 6 | |||
| 7 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | ||
| 8 | import uk.ac.ox.cs.pagoda.tester.Statistics; | ||
| 9 | |||
| 10 | public class PagodaNPD { | ||
| 11 | |||
| 12 | @Test | ||
| 13 | public void testNPDwithoutDataType() { | ||
| 14 | PagodaTester.main( | ||
| 15 | PagodaTester.onto_dir + "npd/npd-all-minus-datatype.owl", | ||
| 16 | PagodaTester.onto_dir + "npd/data/npd-data-dump-minus-datatype-new.ttl", | ||
| 17 | PagodaTester.onto_dir + "npd/queries/atomic.sparql" | ||
| 18 | ); | ||
| 19 | |||
| 20 | Statistics stat = new Statistics("output/log4j.log"); | ||
| 21 | String diff = stat.diff("results-backup/benchmark/npd_minus.out"); | ||
| 22 | AllTests.copy("output/log4j.log", "results-backup/current/npd_minus.out"); | ||
| 23 | if (!diff.isEmpty()) | ||
| 24 | fail(diff); | ||
| 25 | } | ||
| 26 | |||
| 27 | @Test | ||
| 28 | public void testNPD() { | ||
| 29 | PagodaTester.main( | ||
| 30 | PagodaTester.onto_dir + "npd/npd-all.owl", | ||
| 31 | PagodaTester.onto_dir + "npd/data/npd-data-dump-processed.ttl", | ||
| 32 | PagodaTester.onto_dir + "npd/queries/atomic.sparql" | ||
| 33 | ); | ||
| 34 | |||
| 35 | Statistics stat = new Statistics("output/log4j.log"); | ||
| 36 | String diff = stat.diff("results-backup/benchmark/npd.out"); | ||
| 37 | AllTests.copy("output/log4j.log", "results-backup/current/npd.out"); | ||
| 38 | if (!diff.isEmpty()) | ||
| 39 | fail(diff); | ||
| 40 | } | ||
| 41 | |||
| 42 | } | ||
diff --git a/test/uk/ac/ox/cs/pagoda/junit/PagodaNPD_bench.java b/test/uk/ac/ox/cs/pagoda/junit/PagodaNPD_bench.java new file mode 100644 index 0000000..df1a57d --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/junit/PagodaNPD_bench.java | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | ||
| 2 | |||
| 3 | import static org.junit.Assert.fail; | ||
| 4 | |||
| 5 | import org.junit.Test; | ||
| 6 | |||
| 7 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | ||
| 8 | import uk.ac.ox.cs.pagoda.tester.Statistics; | ||
| 9 | |||
| 10 | public class PagodaNPD_bench { | ||
| 11 | |||
| 12 | @Test | ||
| 13 | public void test() { | ||
| 14 | PagodaTester.main( | ||
| 15 | PagodaTester.onto_dir + "npd-benchmark/npd-v2-ql_a.owl", | ||
| 16 | PagodaTester.onto_dir + "npd-benchmark/npd-v2-ql_a.ttl", | ||
| 17 | PagodaTester.onto_dir + "npd-benchmark/queries/all.sparql" | ||
| 18 | ); | ||
| 19 | |||
| 20 | Statistics stat = new Statistics("output/log4j.log"); | ||
| 21 | String diff = stat.diff("results-backup/benchmark/npd-bench.out"); | ||
| 22 | AllTests.copy("output/log4j.log", "results-backup/current/npd-bench.out"); | ||
| 23 | if (!diff.isEmpty()) | ||
| 24 | fail(diff); | ||
| 25 | } | ||
| 26 | |||
| 27 | } | ||
diff --git a/test/uk/ac/ox/cs/pagoda/junit/PagodaRLU.java b/test/uk/ac/ox/cs/pagoda/junit/PagodaRLU.java new file mode 100644 index 0000000..5d93302 --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/junit/PagodaRLU.java | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | ||
| 2 | |||
| 3 | import org.junit.Test; | ||
| 4 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | ||
| 5 | |||
| 6 | public class PagodaRLU { | ||
| 7 | |||
| 8 | @Test | ||
| 9 | public void testRL() { | ||
| 10 | int number = 1; | ||
| 11 | PagodaTester.main( | ||
| 12 | PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", | ||
| 13 | PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", | ||
| 14 | PagodaTester.onto_dir + "uobm/queries/standard.sparql" | ||
| 15 | ); | ||
| 16 | } | ||
| 17 | |||
| 18 | } | ||
diff --git a/test/uk/ac/ox/cs/pagoda/junit/PagodaUOBM.java b/test/uk/ac/ox/cs/pagoda/junit/PagodaUOBM.java new file mode 100644 index 0000000..5b56c6d --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/junit/PagodaUOBM.java | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | ||
| 2 | |||
| 3 | import org.junit.Test; | ||
| 4 | |||
| 5 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | ||
| 6 | import uk.ac.ox.cs.pagoda.tester.Statistics; | ||
| 7 | |||
| 8 | public class PagodaUOBM { | ||
| 9 | |||
| 10 | public void test_all(int number ) { | ||
| 11 | PagodaTester.main( | ||
| 12 | PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", | ||
| 13 | PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", | ||
| 14 | PagodaTester.onto_dir + "uobm/queries/standard_all_pagoda.sparql" | ||
| 15 | // PagodaTester.onto_dir + "uobm/queries/standard_group3_all_less.sparql;" + | ||
| 16 | // PagodaTester.onto_dir + "uobm/queries/G3.sparql;" + | ||
| 17 | // PagodaTester.onto_dir + "uobm/queries/last.sparql" | ||
| 18 | ); | ||
| 19 | |||
| 20 | AllTests.copy("log4j.log", "output/jair/newuobm/uobm" + number + ".out"); | ||
| 21 | } | ||
| 22 | |||
| 23 | public void test_upToSum(int number) { | ||
| 24 | PagodaTester.main( | ||
| 25 | PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", | ||
| 26 | PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", | ||
| 27 | PagodaTester.onto_dir + "uobm/queries/standard_group3_all.sparql" | ||
| 28 | ); | ||
| 29 | |||
| 30 | // AllTests.copy("log4j.log", "output/jair/uobm" + number + ".out"); | ||
| 31 | } | ||
| 32 | |||
| 33 | @Test | ||
| 34 | public void test1() { test_all(1); } | ||
| 35 | |||
| 36 | public void test500() { test_upToSum(500); } | ||
| 37 | |||
| 38 | public static void main(String... args) { | ||
| 39 | new PagodaUOBM().test_all(1); | ||
| 40 | } | ||
| 41 | |||
| 42 | public void check() { | ||
| 43 | Statistics stat = new Statistics("results-backup/current/uobm1.out"); | ||
| 44 | String diff = stat.diff("results-backup/benchmark/uobm1.out"); | ||
| 45 | System.out.println(diff); | ||
| 46 | } | ||
| 47 | |||
| 48 | } | ||
