aboutsummaryrefslogtreecommitdiff
path: root/test/uk/ac/ox/cs/pagoda/global_tests/CostEvaluation.java
diff options
context:
space:
mode:
authorFederico Igne <federico.igne@cs.ox.ac.uk>2022-05-10 18:17:06 +0100
committerFederico Igne <federico.igne@cs.ox.ac.uk>2022-05-11 12:34:47 +0100
commit17bd9beaf7f358a44e5bf36a5855fe6727d506dc (patch)
tree47e9310a0cff869d9ec017dcb2c81876407782c8 /test/uk/ac/ox/cs/pagoda/global_tests/CostEvaluation.java
parent8651164cd632a5db310b457ce32d4fbc97bdc41c (diff)
downloadACQuA-17bd9beaf7f358a44e5bf36a5855fe6727d506dc.tar.gz
ACQuA-17bd9beaf7f358a44e5bf36a5855fe6727d506dc.zip
[pagoda] Move project to Scala
This commit includes a few changes: - The repository still uses Maven to manage dependency but it is now a Scala project. - The code has been ported from OWLAPI 3.4.10 to 5.1.20 - A proof of concept program using both RSAComb and PAGOdA has been added.
Diffstat (limited to 'test/uk/ac/ox/cs/pagoda/global_tests/CostEvaluation.java')
-rw-r--r--test/uk/ac/ox/cs/pagoda/global_tests/CostEvaluation.java115
1 files changed, 0 insertions, 115 deletions
diff --git a/test/uk/ac/ox/cs/pagoda/global_tests/CostEvaluation.java b/test/uk/ac/ox/cs/pagoda/global_tests/CostEvaluation.java
deleted file mode 100644
index 01e8203..0000000
--- a/test/uk/ac/ox/cs/pagoda/global_tests/CostEvaluation.java
+++ /dev/null
@@ -1,115 +0,0 @@
1package uk.ac.ox.cs.pagoda.global_tests;
2
3import org.semanticweb.owlapi.model.OWLOntology;
4import org.testng.annotations.Test;
5import uk.ac.ox.cs.pagoda.owl.OWLHelper;
6import uk.ac.ox.cs.pagoda.reasoner.QueryReasoner;
7import uk.ac.ox.cs.pagoda.reasoner.QueryReasoner.Type;
8import uk.ac.ox.cs.pagoda.tester.PagodaTester;
9import uk.ac.ox.cs.pagoda.util.TestUtil;
10import uk.ac.ox.cs.pagoda.util.Timer;
11import uk.ac.ox.cs.pagoda.util.Utility;
12
13public class CostEvaluation {
14
15 @Test
16 public void lubm100() {
17 int number = 1;
18 String ontoDir = TestUtil.getConfig().getProperty("ontoDir");
19 PagodaTester.main(
20 TestUtil.combinePaths(ontoDir, "lubm/univ-bench.owl"),
21 TestUtil.combinePaths(ontoDir, "lubm/data/lubm" + number + ".ttl"),
22 TestUtil.combinePaths(ontoDir, "lubm/queries/test_all_pagoda.sparql")
23 );
24// AllTests.copy("output/log4j.log", "results-backup/jair/lubm" + number + ".out");
25 }
26
27 public void lubm1000() {
28 int number = 1000;
29 String ontoDir = TestUtil.getConfig().getProperty("ontoDir");
30 String[] args = new String[] {
31 TestUtil.combinePaths(ontoDir, "lubm/univ-bench.owl"),
32 TestUtil.combinePaths(ontoDir, "lubm/data/lubm" + number + ".ttl"),
33 TestUtil.combinePaths(ontoDir, "lubm/queries/test_all_pagoda.sparql")
34 };
35 OWLOntology ontology = OWLHelper.loadOntology(args[0]);
36 QueryReasoner reasoner = QueryReasoner.getInstance(Type.ELHOU, ontology, true, true);
37 Timer t = new Timer();
38 reasoner.loadOntology(ontology);
39 reasoner.importData(args[1]);
40 if (!reasoner.preprocess())
41 return ;
42 Utility.logInfo("Preprocessing Done in " + t.duration() + " seconds.");
43
44 reasoner.evaluate(reasoner.getQueryManager().collectQueryRecords(args[2]));
45// AllTests.copy("output/log4j.log", "results-backup/jair/lubm" + number + ".out");
46 }
47
48 @Test
49 public void uobm5() {
50 int number = 1;
51 String ontoDir = TestUtil.getConfig().getProperty("ontoDir");
52 String[] args = new String[] {
53 TestUtil.combinePaths(ontoDir, "uobm/univ-bench-dl.owl"),
54 TestUtil.combinePaths(ontoDir, "uobm/data/uobm" + number + ".ttl"),
55 TestUtil.combinePaths(ontoDir, "uobm/queries/standard_all_pagoda.sparql")
56 };
57 PagodaTester.main(args);
58// AllTests.copy("output/log4j.log", "results-backup/jair/uobm" + number + ".out");
59 }
60
61 public void uobm100() {
62 int number = 200;
63 String ontoDir = TestUtil.getConfig().getProperty("ontoDir");
64 String[] args = new String[] {
65 TestUtil.combinePaths(ontoDir, "uobm/univ-bench-dl.owl"),
66 TestUtil.combinePaths(ontoDir, "uobm/data/uobm" + number + ".ttl"),
67 TestUtil.combinePaths(ontoDir, "uobm/queries/standard_group3_all.sparql")
68 };
69 PagodaTester.main(args);
70// AllTests.copy("output/log4j.log", "results-backup/jair/uobm" + number + ".out");
71 }
72
73 public void uobm500() {
74 int number = 500;
75 String ontoDir = TestUtil.getConfig().getProperty("ontoDir");
76 String[] args = new String[] {
77 TestUtil.combinePaths(ontoDir, "uobm/univ-bench-dl.owl"),
78 TestUtil.combinePaths(ontoDir, "uobm/data/uobm" + number + ".ttl"),
79 TestUtil.combinePaths(ontoDir, "uobm/queries/standard_all_pagoda.sparql")
80 };
81
82 OWLOntology ontology = OWLHelper.loadOntology(args[0]);
83 QueryReasoner reasoner = QueryReasoner.getInstance(Type.ELHOU, ontology, true, true);
84 Timer t = new Timer();
85 reasoner.loadOntology(ontology);
86 reasoner.importData(args[1]);
87 if (!reasoner.preprocess())
88 return ;
89 Utility.logInfo("Preprocessing Done in " + t.duration() + " seconds.");
90
91 reasoner.evaluate(reasoner.getQueryManager().collectQueryRecords(args[2]));
92// AllTests.copy("output/log4j.log", "results-backup/jair/uobm" + number + ".out");
93 }
94
95
96 public static void main(String... args) {
97 String ontoDir = TestUtil.getConfig().getProperty("ontoDir");
98 args = new String[] {
99 TestUtil.combinePaths(ontoDir, "dbpedia/integratedOntology-all-in-one-minus-datatype.owl"),
100 TestUtil.combinePaths(ontoDir, "dbpedia/data/dbpedia-minus-datatype-new.ttl"),
101 TestUtil.combinePaths(ontoDir, "dbpedia/queries/atomic_ground.sparql")
102 };
103
104 OWLOntology ontology = OWLHelper.loadOntology(args[0]);
105 QueryReasoner reasoner = QueryReasoner.getInstance(Type.ELHOU, ontology, true, true);
106 Timer t = new Timer();
107 reasoner.loadOntology(ontology);
108 reasoner.importData(args[1]);
109 if (!reasoner.preprocess())
110 return ;
111 Utility.logInfo("Preprocessing Done in " + t.duration() + " seconds.");
112
113 reasoner.evaluate(reasoner.getQueryManager().collectQueryRecords(args[2]));
114 }
115}