aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRncLsn <rnc.lsn@gmail.com>2015-06-16 15:54:53 +0100
committerRncLsn <rnc.lsn@gmail.com>2015-06-26 12:04:49 +0100
commit29eecb27c7f91de92b21bbd646d8b7a55e526833 (patch)
tree233481bccd68e4b718598320f121024db16ff0e5
parent3a276b7c7836e56a171ab753b018913ce022ba8e (diff)
downloadACQuA-29eecb27c7f91de92b21bbd646d8b7a55e526833.tar.gz
ACQuA-29eecb27c7f91de92b21bbd646d8b7a55e526833.zip
Maybe fixed bug in internalisation.
-rw-r--r--data/uobm/uobm_sygenia_all-blanks.sparql1725
-rw-r--r--src/resources/pagoda.properties2
-rw-r--r--src/uk/ac/ox/cs/pagoda/endomorph/Endomorph.java10
-rw-r--r--src/uk/ac/ox/cs/pagoda/multistage/MultiStageQueryEngine.java15
-rw-r--r--src/uk/ac/ox/cs/pagoda/multistage/StageQueryEngine.java2
-rw-r--r--src/uk/ac/ox/cs/pagoda/query/QueryRecord.java4
-rw-r--r--src/uk/ac/ox/cs/pagoda/query/rollup/QueryGraph.java57
-rw-r--r--src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java13
-rw-r--r--src/uk/ac/ox/cs/pagoda/reasoner/QueryReasoner.java2
-rw-r--r--src/uk/ac/ox/cs/pagoda/reasoner/full/Checker.java2
-rw-r--r--src/uk/ac/ox/cs/pagoda/reasoner/full/HermitChecker.java457
-rw-r--r--src/uk/ac/ox/cs/pagoda/rules/Program.java2
-rw-r--r--src/uk/ac/ox/cs/pagoda/summary/HermitSummaryFilter.java15
-rw-r--r--src/uk/ac/ox/cs/pagoda/util/PagodaProperties.java6
-rw-r--r--test/resources/BugTests.xml17
-rw-r--r--test/resources/Correctness.xml20
-rw-r--r--test/resources/LightTests.xml4
-rw-r--r--test/resources/test.properties1
-rw-r--r--test/uk/ac/ox/cs/pagoda/global_tests/MinimumCardinalityTest.java101
-rw-r--r--test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaFLY.java6
-rw-r--r--test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java2
-rw-r--r--test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaUOBM.java41
22 files changed, 2221 insertions, 283 deletions
diff --git a/data/uobm/uobm_sygenia_all-blanks.sparql b/data/uobm/uobm_sygenia_all-blanks.sparql
index e69de29..3957cb8 100644
--- a/data/uobm/uobm_sygenia_all-blanks.sparql
+++ b/data/uobm/uobm_sygenia_all-blanks.sparql
@@ -0,0 +1,1725 @@
1^[query1]
2PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
3PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
4SELECT ?x
5WHERE {
6 _:y benchmark:isMemberOf ?x .
7 _:y rdf:type benchmark:Person
8}
9
10^[query2]
11PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
12PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
13SELECT ?x
14WHERE {
15 _:y benchmark:isStudentOf ?x
16}
17
18^[query3]
19PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
20PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
21SELECT ?x
22WHERE {
23 ?x benchmark:hasStudent _:y .
24 _:z benchmark:hasStudent _:y
25}
26
27^[query4]
28PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
29PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
30SELECT ?x
31WHERE {
32 ?x rdf:type benchmark:AcademicSubject
33}
34
35^[query5]
36PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
37PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
38SELECT ?x ?y
39WHERE {
40 ?y benchmark:isFriendOf ?x
41}
42
43^[query6]
44PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
45PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
46SELECT ?x
47WHERE {
48 ?x benchmark:hasStudent _:y .
49 _:y benchmark:isMemberOf _:z .
50 _:z rdf:type benchmark:Organization
51}
52
53^[query7]
54PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
55PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
56SELECT ?x
57WHERE {
58 ?x benchmark:isCrazyAbout _:y
59}
60
61^[query8]
62PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
63PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
64SELECT ?x
65WHERE {
66 ?x rdf:type benchmark:SupportingStaff
67}
68
69^[query9]
70PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
71PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
72SELECT ?x
73WHERE {
74 ?x benchmark:like _:y
75}
76
77^[query10]
78PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
79PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
80SELECT ?x
81WHERE {
82 _:y benchmark:teacherOf ?x
83}
84
85^[query11]
86PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
87PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
88SELECT ?x
89WHERE {
90 ?x rdf:type benchmark:ResearchGroup
91}
92
93^[query12]
94PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
95PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
96SELECT ?x
97WHERE {
98 _:y benchmark:hasMember ?x .
99 _:y rdf:type benchmark:ResearchGroup
100}
101
102^[query13]
103PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
104PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
105SELECT ?x
106WHERE {
107 ?x benchmark:hasMember _:y .
108 _:z benchmark:hasMember _:y .
109 _:z rdf:type benchmark:Organization
110}
111
112^[query14]
113PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
114PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
115SELECT ?x
116WHERE {
117 ?x benchmark:isTaughtBy _:y .
118 _:y benchmark:isMemberOf _:z
119}
120
121^[query15]
122PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
123PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
124SELECT ?x
125WHERE {
126 ?x benchmark:hasUndergraduateDegreeFrom _:y
127}
128
129^[query16]
130PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
131PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
132SELECT ?x
133WHERE {
134 ?x benchmark:isTaughtBy _:y .
135 _:y rdf:type benchmark:Person
136}
137
138^[query17]
139PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
140PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
141SELECT ?x
142WHERE {
143 _:y benchmark:isMemberOf ?x .
144 _:y benchmark:isMemberOf _:z
145}
146
147^[query18]
148PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
149PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
150SELECT ?x
151WHERE {
152 ?x benchmark:hasSameHomeTownWith _:y
153}
154
155^[query19]
156PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
157PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
158SELECT ?x ?y
159WHERE {
160 ?x benchmark:hasAlumnus ?y
161}
162
163^[query20]
164PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
165PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
166SELECT ?x
167WHERE {
168 ?x benchmark:isTaughtBy _:y .
169 _:y benchmark:worksFor _:z .
170 _:z rdf:type benchmark:Organization
171}
172
173^[query21]
174PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
175PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
176SELECT ?x
177WHERE {
178 _:y benchmark:hasMember ?x .
179 _:y rdf:type benchmark:Organization
180}
181
182^[query22]
183PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
184PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
185SELECT ?x
186WHERE {
187 ?x benchmark:hasMember _:y .
188 _:y benchmark:isStudentOf _:z .
189 _:z rdf:type benchmark:Organization
190}
191
192^[query23]
193PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
194PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
195SELECT ?x
196WHERE {
197 _:y benchmark:hasStudent ?x .
198 _:y rdf:type benchmark:Organization
199}
200
201^[query24]
202PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
203PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
204SELECT ?x
205WHERE {
206 ?x benchmark:like _:y .
207 _:y rdf:type benchmark:Insterest
208}
209
210^[query25]
211PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
212PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
213SELECT ?x
214WHERE {
215 _:y benchmark:isMemberOf ?x .
216 _:y benchmark:isStudentOf _:z .
217 _:z rdf:type benchmark:Organization
218}
219
220^[query26]
221PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
222PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
223SELECT ?x
224WHERE {
225 ?x benchmark:hasStudent _:y .
226 _:y rdf:type benchmark:Person
227}
228
229^[query27]
230PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
231PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
232SELECT ?x
233WHERE {
234 _:y benchmark:isStudentOf ?x .
235 _:y benchmark:isMemberOf _:z .
236 _:z rdf:type benchmark:Organization
237}
238
239^[query28]
240PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
241PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
242SELECT ?x
243WHERE {
244 ?x benchmark:enrollIn _:y .
245 _:y rdf:type benchmark:Department
246}
247
248^[query29]
249PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
250PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
251SELECT ?x
252WHERE {
253 ?x rdf:type benchmark:Article
254}
255
256^[query30]
257PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
258PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
259SELECT ?x
260WHERE {
261 ?x benchmark:hasAlumnus _:y .
262 _:y rdf:type benchmark:Person
263}
264
265^[query31]
266PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
267PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
268SELECT ?x
269WHERE {
270 ?x benchmark:isFriendOf _:y .
271 _:y rdf:type benchmark:Person
272}
273
274^[query32]
275PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
276PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
277SELECT ?x
278WHERE {
279 ?x benchmark:isCrazyAbout _:y .
280 _:y rdf:type benchmark:TennisClass
281}
282
283^[query33]
284PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
285PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
286SELECT ?x
287WHERE {
288 _:y benchmark:hasDegreeFrom ?x
289}
290
291^[query34]
292PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
293PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
294SELECT ?x
295WHERE {
296 ?x benchmark:isCrazyAbout _:y .
297 _:y rdf:type benchmark:SwimmingClass
298}
299
300^[query35]
301PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
302PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
303SELECT ?x
304WHERE {
305 _:y benchmark:hasStudent ?x
306}
307
308^[query36]
309PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
310PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
311SELECT ?x ?y
312WHERE {
313 ?y benchmark:hasAlumnus ?x
314}
315
316^[query37]
317PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
318PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
319SELECT ?x
320WHERE {
321 _:y benchmark:isMemberOf ?x .
322 _:y benchmark:isStudentOf _:z
323}
324
325^[query38]
326PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
327PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
328SELECT ?x
329WHERE {
330 _:y benchmark:isMemberOf ?x .
331 _:z benchmark:hasStudent _:y
332}
333
334^[query39]
335PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
336PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
337SELECT ?x
338WHERE {
339 ?x benchmark:isMemberOf _:y .
340 _:y rdf:type benchmark:ResearchGroup
341}
342
343^[query40]
344PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
345PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
346SELECT ?x
347WHERE {
348 ?x benchmark:hasStudent _:y .
349 _:y benchmark:isStudentOf _:z .
350 _:z rdf:type benchmark:Organization
351}
352
353^[query41]
354PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
355PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
356SELECT ?x
357WHERE {
358 ?x benchmark:hasMasterDegreeFrom _:y .
359 _:y rdf:type benchmark:University
360}
361
362^[query42]
363PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
364PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
365SELECT ?x
366WHERE {
367 ?x rdf:type benchmark:Department
368}
369
370^[query43]
371PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
372PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
373SELECT ?x
374WHERE {
375 ?x benchmark:like _:y .
376 _:y rdf:type benchmark:BasketBallClass
377}
378
379^[query44]
380PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
381PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
382SELECT ?x
383WHERE {
384 _:y benchmark:isStudentOf ?x .
385 _:y benchmark:isStudentOf _:z .
386 _:z rdf:type benchmark:Organization
387}
388
389^[query45]
390PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
391PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
392SELECT ?x
393WHERE {
394 ?x benchmark:enrollIn _:y .
395 _:y rdf:type benchmark:Organization
396}
397
398^[query46]
399PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
400PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
401SELECT ?x
402WHERE {
403 _:y benchmark:isMemberOf ?x .
404 _:y benchmark:isMemberOf _:z .
405 _:z rdf:type benchmark:Organization
406}
407
408^[query47]
409PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
410PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
411SELECT ?x
412WHERE {
413 ?x rdf:type benchmark:Science
414}
415
416^[query48]
417PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
418PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
419SELECT ?x
420WHERE {
421 ?x benchmark:hasMember _:y .
422 _:y benchmark:isMemberOf _:z .
423 _:z rdf:type benchmark:Organization
424}
425
426^[query49]
427PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
428PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
429SELECT ?x ?y
430WHERE {
431 ?x benchmark:like ?y
432}
433
434^[query50]
435PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
436PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
437SELECT ?x
438WHERE {
439 ?x rdf:type benchmark:Sports
440}
441
442^[query51]
443PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
444PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
445SELECT ?x
446WHERE {
447 _:y benchmark:hasAlumnus ?x
448}
449
450^[query52]
451PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
452PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
453SELECT ?x
454WHERE {
455 ?x benchmark:isHeadOf _:y .
456 _:y rdf:type benchmark:Department
457}
458
459^[query53]
460PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
461PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
462SELECT ?x ?y
463WHERE {
464 ?x benchmark:teacherOf ?y
465}
466
467^[query54]
468PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
469PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
470SELECT ?x ?y
471WHERE {
472 ?x benchmark:isTaughtBy ?y
473}
474
475^[query55]
476PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
477PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
478SELECT ?x
479WHERE {
480 ?x benchmark:isCrazyAbout _:y .
481 _:y rdf:type benchmark:BasketBallClass
482}
483
484^[query56]
485PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
486PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
487SELECT ?x
488WHERE {
489 ?x benchmark:isTaughtBy _:y .
490 _:y benchmark:isMemberOf _:z .
491 _:z rdf:type benchmark:Organization
492}
493
494^[query57]
495PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
496PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
497SELECT ?x
498WHERE {
499 ?x benchmark:hasDegreeFrom _:y
500}
501
502^[query58]
503PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
504PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
505SELECT ?x
506WHERE {
507 ?x benchmark:hasSameHomeTownWith _:y .
508 _:y rdf:type benchmark:Person
509}
510
511^[query59]
512PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
513PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
514SELECT ?x
515WHERE {
516 ?x benchmark:isHeadOf _:y .
517 _:y rdf:type benchmark:Organization
518}
519
520^[query60]
521PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
522PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
523SELECT ?x
524WHERE {
525 _:y benchmark:isMemberOf ?x .
526 _:z benchmark:hasMember _:y .
527 _:z rdf:type benchmark:Organization
528}
529
530^[query61]
531PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
532PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
533SELECT ?x
534WHERE {
535 ?x benchmark:isHeadOf _:y .
536 _:y rdf:type benchmark:College
537}
538
539^[query62]
540PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
541PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
542SELECT ?x
543WHERE {
544 ?x benchmark:hasDoctoralDegreeFrom _:y .
545 _:y rdf:type benchmark:University
546}
547
548^[query63]
549PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
550PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
551SELECT ?x
552WHERE {
553 ?x benchmark:isTaughtBy _:y .
554 _:z benchmark:hasMember _:y .
555 _:z rdf:type benchmark:Organization
556}
557
558^[query64]
559PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
560PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
561SELECT ?x
562WHERE {
563 ?x benchmark:isCrazyAbout _:y .
564 _:y rdf:type benchmark:BaseballClass
565}
566
567^[query65]
568PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
569PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
570SELECT ?x
571WHERE {
572 ?x benchmark:like _:y .
573 _:y rdf:type benchmark:Sports
574}
575
576^[query66]
577PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
578PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
579SELECT ?x
580WHERE {
581 _:y benchmark:hasDegreeFrom ?x .
582 _:y rdf:type benchmark:Person
583}
584
585^[query67]
586PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
587PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
588SELECT ?x ?y
589WHERE {
590 ?x benchmark:hasMember ?y
591}
592
593^[query68]
594PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
595PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
596SELECT ?x
597WHERE {
598 ?x rdf:type benchmark:Software
599}
600
601^[query69]
602PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
603PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
604SELECT ?x
605WHERE {
606 _:y benchmark:hasSameHomeTownWith ?x
607}
608
609^[query70]
610PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
611PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
612SELECT ?x
613WHERE {
614 ?x rdf:type benchmark:Professor
615}
616
617^[query71]
618PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
619PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
620SELECT ?x
621WHERE {
622 ?x benchmark:worksFor _:y .
623 _:y rdf:type benchmark:ResearchGroup
624}
625
626^[query72]
627PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
628PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
629SELECT ?x
630WHERE {
631 _:y benchmark:isStudentOf ?x .
632 _:z benchmark:hasMember _:y .
633 _:z rdf:type benchmark:Organization
634}
635
636^[query73]
637PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
638PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
639SELECT ?x
640WHERE {
641 ?x benchmark:isTaughtBy _:y .
642 _:y rdf:type benchmark:Employee
643}
644
645^[query74]
646PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
647PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
648SELECT ?x
649WHERE {
650 ?x rdf:type benchmark:Work
651}
652
653^[query75]
654PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
655PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
656SELECT ?x
657WHERE {
658 _:y benchmark:teacherOf ?x .
659 _:y benchmark:worksFor _:z .
660 _:z rdf:type benchmark:Organization
661}
662
663^[query76]
664PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
665PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
666SELECT ?x ?y
667WHERE {
668 ?x benchmark:worksFor ?y
669}
670
671^[query77]
672PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
673PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
674SELECT ?x
675WHERE {
676 ?x rdf:type benchmark:TeachingAssistant
677}
678
679^[query78]
680PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
681PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
682SELECT ?x
683WHERE {
684 ?x benchmark:hasDegreeFrom _:y .
685 _:y rdf:type benchmark:University
686}
687
688^[query79]
689PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
690PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
691SELECT ?x
692WHERE {
693 ?x benchmark:isCrazyAbout _:y .
694 _:y rdf:type benchmark:Insterest
695}
696
697^[query80]
698PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
699PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
700SELECT ?x
701WHERE {
702 ?x benchmark:hasStudent _:y .
703 _:y benchmark:isMemberOf _:z
704}
705
706^[query81]
707PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
708PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
709SELECT ?x
710WHERE {
711 ?x benchmark:hasStudent _:y .
712 _:z benchmark:hasMember _:y
713}
714
715^[query82]
716PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
717PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
718SELECT ?x
719WHERE {
720 ?x rdf:type benchmark:FineArts
721}
722
723^[query83]
724PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
725PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
726SELECT ?x
727WHERE {
728 ?x benchmark:isStudentOf _:y
729}
730
731^[query84]
732PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
733PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
734SELECT ?x
735WHERE {
736 _:y benchmark:isFriendOf ?x .
737 _:y rdf:type benchmark:Person
738}
739
740^[query85]
741PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
742PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
743SELECT ?x
744WHERE {
745 _:y benchmark:isFriendOf ?x
746}
747
748^[query86]
749PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
750PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
751SELECT ?x
752WHERE {
753 ?x benchmark:worksFor _:y .
754 _:y rdf:type benchmark:Program
755}
756
757^[query87]
758PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
759PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
760SELECT ?x
761WHERE {
762 ?x benchmark:hasMasterDegreeFrom _:y .
763 _:y rdf:type benchmark:Organization
764}
765
766^[query88]
767PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
768PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
769SELECT ?x
770WHERE {
771 ?x rdf:type benchmark:Engineering
772}
773
774^[query89]
775PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
776PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
777SELECT ?x
778WHERE {
779 ?x benchmark:hasDoctoralDegreeFrom _:y
780}
781
782^[query90]
783PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
784PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
785SELECT ?x
786WHERE {
787 ?x benchmark:hasStudent _:y .
788 _:z benchmark:hasMember _:y .
789 _:z rdf:type benchmark:Organization
790}
791
792^[query91]
793PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
794PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
795SELECT ?x
796WHERE {
797 ?x benchmark:like _:y .
798 _:y rdf:type benchmark:BaseballClass
799}
800
801^[query92]
802PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
803PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
804SELECT ?x
805WHERE {
806 ?x benchmark:worksFor _:y
807}
808
809^[query93]
810PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
811PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
812SELECT ?x
813WHERE {
814 ?x rdf:type benchmark:Faculty
815}
816
817^[query94]
818PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
819PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
820SELECT ?x ?y
821WHERE {
822 ?y benchmark:hasStudent ?x
823}
824
825^[query95]
826PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
827PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
828SELECT ?x
829WHERE {
830 ?x benchmark:hasMajor _:y .
831 _:y rdf:type benchmark:Science
832}
833
834^[query96]
835PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
836PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
837SELECT ?x
838WHERE {
839 ?x benchmark:worksFor _:y .
840 _:y rdf:type benchmark:Department
841}
842
843^[query97]
844PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
845PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
846SELECT ?x
847WHERE {
848 ?x benchmark:isFriendOf _:y
849}
850
851^[query98]
852PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
853PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
854SELECT ?x
855WHERE {
856 _:y benchmark:teacherOf ?x .
857 _:y benchmark:worksFor _:z
858}
859
860^[query99]
861PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
862PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
863SELECT ?x
864WHERE {
865 ?x benchmark:hasMember _:y .
866 _:y benchmark:isStudentOf _:z
867}
868
869^[query100]
870PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
871PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
872SELECT ?x
873WHERE {
874 ?x benchmark:isCrazyAbout _:y .
875 _:y rdf:type benchmark:Sports
876}
877
878^[query101]
879PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
880PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
881SELECT ?x
882WHERE {
883 _:y benchmark:isMemberOf ?x .
884 _:y rdf:type benchmark:Student
885}
886
887^[query102]
888PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
889PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
890SELECT ?x
891WHERE {
892 _:y benchmark:teacherOf ?x .
893 _:z benchmark:hasMember _:y .
894 _:z rdf:type benchmark:Organization
895}
896
897^[query103]
898PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
899PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
900SELECT ?x
901WHERE {
902 ?x benchmark:hasDoctoralDegreeFrom _:y .
903 _:y rdf:type benchmark:Organization
904}
905
906^[query104]
907PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
908PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
909SELECT ?x
910WHERE {
911 ?x benchmark:hasMember _:y .
912 _:y rdf:type benchmark:Student
913}
914
915^[query105]
916PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
917PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
918SELECT ?x ?y
919WHERE {
920 ?y benchmark:isStudentOf ?x
921}
922
923^[query106]
924PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
925PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
926SELECT ?x
927WHERE {
928 _:y benchmark:isStudentOf ?x .
929 _:z benchmark:hasStudent _:y
930}
931
932^[query107]
933PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
934PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
935SELECT ?x ?y
936WHERE {
937 ?y benchmark:hasMember ?x
938}
939
940^[query108]
941PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
942PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
943SELECT ?x
944WHERE {
945 _:y benchmark:isStudentOf ?x .
946 _:y rdf:type benchmark:Student
947}
948
949^[query109]
950PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
951PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
952SELECT ?x
953WHERE {
954 ?x rdf:type benchmark:Course
955}
956
957^[query110]
958PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
959PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
960SELECT ?x
961WHERE {
962 ?x benchmark:isHeadOf _:y .
963 _:y rdf:type benchmark:Program
964}
965
966^[query111]
967PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
968PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
969SELECT ?x
970WHERE {
971 ?x benchmark:hasStudent _:y
972}
973
974^[query112]
975PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
976PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
977SELECT ?x
978WHERE {
979 _:y benchmark:hasMember ?x .
980 _:y rdf:type benchmark:Program
981}
982
983^[query113]
984PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
985PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
986SELECT ?x
987WHERE {
988 ?x benchmark:isMemberOf _:y .
989 _:y rdf:type benchmark:Organization
990}
991
992^[query114]
993PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
994PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
995SELECT ?x
996WHERE {
997 ?x rdf:type benchmark:Student
998}
999
1000^[query115]
1001PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1002PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1003SELECT ?x
1004WHERE {
1005 _:y benchmark:isStudentOf ?x .
1006 _:y benchmark:isStudentOf _:z
1007}
1008
1009^[query116]
1010PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1011PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1012SELECT ?x ?y
1013WHERE {
1014 ?x benchmark:hasStudent ?y
1015}
1016
1017^[query117]
1018PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1019PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1020SELECT ?x
1021WHERE {
1022 ?x benchmark:hasStudent _:y .
1023 _:y rdf:type benchmark:Student
1024}
1025
1026^[query118]
1027PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1028PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1029SELECT ?x
1030WHERE {
1031 ?x rdf:type benchmark:College
1032}
1033
1034^[query119]
1035PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1036PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1037SELECT ?x
1038WHERE {
1039 ?x benchmark:teacherOf _:y .
1040 _:y rdf:type benchmark:Work
1041}
1042
1043^[query120]
1044PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1045PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1046SELECT ?x
1047WHERE {
1048 ?x benchmark:isMemberOf _:y
1049}
1050
1051^[query121]
1052PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1053PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1054SELECT ?x
1055WHERE {
1056 ?x benchmark:hasAlumnus _:y
1057}
1058
1059^[query122]
1060PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1061PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1062SELECT ?x
1063WHERE {
1064 _:y benchmark:teacherOf ?x .
1065 _:y benchmark:isMemberOf _:z
1066}
1067
1068^[query123]
1069PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1070PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1071SELECT ?x
1072WHERE {
1073 ?x benchmark:like _:y .
1074 _:y rdf:type benchmark:SwimmingClass
1075}
1076
1077^[query124]
1078PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1079PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1080SELECT ?x
1081WHERE {
1082 _:y benchmark:hasMember ?x
1083}
1084
1085^[query125]
1086PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1087PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1088SELECT ?x
1089WHERE {
1090 ?x benchmark:isHeadOf _:y
1091}
1092
1093^[query126]
1094PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1095PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1096SELECT ?x
1097WHERE {
1098 ?x benchmark:hasStudent _:y .
1099 _:y benchmark:isStudentOf _:z
1100}
1101
1102^[query127]
1103PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1104PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1105SELECT ?x
1106WHERE {
1107 ?x benchmark:isStudentOf _:y .
1108 _:y rdf:type benchmark:Department
1109}
1110
1111^[query128]
1112PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1113PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1114SELECT ?x
1115WHERE {
1116 ?x benchmark:worksFor _:y .
1117 _:y rdf:type benchmark:College
1118}
1119
1120^[query129]
1121PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1122PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1123SELECT ?x
1124WHERE {
1125 ?x benchmark:teacherOf _:y .
1126 _:y rdf:type benchmark:Course
1127}
1128
1129^[query130]
1130PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1131PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1132SELECT ?x ?y
1133WHERE {
1134 ?y benchmark:teacherOf ?x
1135}
1136
1137^[query131]
1138PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1139PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1140SELECT ?x
1141WHERE {
1142 ?x rdf:type benchmark:Organization
1143}
1144
1145^[query132]
1146PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1147PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1148SELECT ?x
1149WHERE {
1150 _:y benchmark:teacherOf ?x .
1151 _:z benchmark:hasMember _:y
1152}
1153
1154^[query133]
1155PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1156PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1157SELECT ?x
1158WHERE {
1159 ?x benchmark:hasMember _:y .
1160 _:y rdf:type benchmark:Person
1161}
1162
1163^[query134]
1164PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1165PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1166SELECT ?x
1167WHERE {
1168 _:y benchmark:hasSameHomeTownWith ?x .
1169 _:y rdf:type benchmark:Person
1170}
1171
1172^[query135]
1173PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1174PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1175SELECT ?x
1176WHERE {
1177 _:y benchmark:isMemberOf ?x .
1178 _:z benchmark:hasStudent _:y .
1179 _:z rdf:type benchmark:Organization
1180}
1181
1182^[query136]
1183PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1184PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1185SELECT ?x
1186WHERE {
1187 ?x benchmark:isMemberOf _:y .
1188 _:y rdf:type benchmark:Program
1189}
1190
1191^[query137]
1192PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1193PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1194SELECT ?x
1195WHERE {
1196 _:y benchmark:isStudentOf ?x .
1197 _:y benchmark:isMemberOf _:z
1198}
1199
1200^[query138]
1201PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1202PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1203SELECT ?x
1204WHERE {
1205 ?x benchmark:teachingAssistantOf _:y .
1206 _:y rdf:type benchmark:Course
1207}
1208
1209^[query139]
1210PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1211PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1212SELECT ?x
1213WHERE {
1214 ?x benchmark:hasMember _:y .
1215 _:z benchmark:hasStudent _:y .
1216 _:z rdf:type benchmark:Organization
1217}
1218
1219^[query140]
1220PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1221PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1222SELECT ?x
1223WHERE {
1224 ?x benchmark:hasMember _:y
1225}
1226
1227^[query141]
1228PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1229PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1230SELECT ?x
1231WHERE {
1232 ?x benchmark:enrollIn _:y
1233}
1234
1235^[query142]
1236PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1237PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1238SELECT ?x
1239WHERE {
1240 _:y benchmark:isStudentOf ?x .
1241 _:z benchmark:hasMember _:y
1242}
1243
1244^[query143]
1245PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1246PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1247SELECT ?x ?y
1248WHERE {
1249 ?x benchmark:hasSameHomeTownWith ?y
1250}
1251
1252^[query144]
1253PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1254PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1255SELECT ?x
1256WHERE {
1257 _:y benchmark:hasAlumnus ?x .
1258 _:y rdf:type benchmark:Organization
1259}
1260
1261^[query145]
1262PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1263PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1264SELECT ?x
1265WHERE {
1266 ?x rdf:type benchmark:Dean
1267}
1268
1269^[query146]
1270PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1271PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1272SELECT ?x
1273WHERE {
1274 _:y benchmark:isTaughtBy ?x .
1275 _:y rdf:type benchmark:Course
1276}
1277
1278^[query147]
1279PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1280PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1281SELECT ?x
1282WHERE {
1283 ?x benchmark:isTaughtBy _:y .
1284 _:y rdf:type benchmark:Faculty
1285}
1286
1287^[query148]
1288PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1289PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1290SELECT ?x
1291WHERE {
1292 ?x benchmark:isStudentOf _:y .
1293 _:y rdf:type benchmark:Organization
1294}
1295
1296^[query149]
1297PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1298PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1299SELECT ?x
1300WHERE {
1301 ?x benchmark:hasMajor _:y .
1302 _:y rdf:type benchmark:AcademicSubject
1303}
1304
1305^[query150]
1306PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1307PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1308SELECT ?x ?y
1309WHERE {
1310 ?x benchmark:isStudentOf ?y
1311}
1312
1313^[query151]
1314PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1315PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1316SELECT ?x
1317WHERE {
1318 ?x benchmark:hasMember _:y .
1319 _:z benchmark:hasStudent _:y
1320}
1321
1322^[query152]
1323PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1324PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1325SELECT ?x
1326WHERE {
1327 ?x benchmark:hasUndergraduateDegreeFrom _:y .
1328 _:y rdf:type benchmark:University
1329}
1330
1331^[query153]
1332PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1333PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1334SELECT ?x
1335WHERE {
1336 _:y benchmark:isStudentOf ?x .
1337 _:z benchmark:hasStudent _:y .
1338 _:z rdf:type benchmark:Organization
1339}
1340
1341^[query154]
1342PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1343PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1344SELECT ?x ?y
1345WHERE {
1346 ?y benchmark:hasSameHomeTownWith ?x
1347}
1348
1349^[query155]
1350PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1351PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1352SELECT ?x
1353WHERE {
1354 ?x benchmark:hasMember _:y .
1355 _:z benchmark:hasMember _:y
1356}
1357
1358^[query156]
1359PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1360PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1361SELECT ?x
1362WHERE {
1363 ?x rdf:type benchmark:Employee
1364}
1365
1366^[query157]
1367PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1368PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1369SELECT ?x
1370WHERE {
1371 ?x benchmark:teachingAssistantOf _:y
1372}
1373
1374^[query158]
1375PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1376PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1377SELECT ?x
1378WHERE {
1379 ?x benchmark:isTaughtBy _:y
1380}
1381
1382^[query159]
1383PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1384PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1385SELECT ?x
1386WHERE {
1387 ?x rdf:type benchmark:Research
1388}
1389
1390^[query160]
1391PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1392PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1393SELECT ?x ?y
1394WHERE {
1395 ?y benchmark:isMemberOf ?x
1396}
1397
1398^[query161]
1399PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1400PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1401SELECT ?x
1402WHERE {
1403 ?x benchmark:isTaughtBy _:y .
1404 _:z benchmark:hasMember _:y
1405}
1406
1407^[query162]
1408PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1409PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1410SELECT ?x
1411WHERE {
1412 _:y benchmark:isTaughtBy ?x
1413}
1414
1415^[query163]
1416PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1417PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1418SELECT ?x
1419WHERE {
1420 _:y benchmark:teacherOf ?x .
1421 _:y benchmark:isMemberOf _:z .
1422 _:z rdf:type benchmark:Organization
1423}
1424
1425^[query164]
1426PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1427PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1428SELECT ?x
1429WHERE {
1430 ?x benchmark:isMemberOf _:y .
1431 _:y rdf:type benchmark:College
1432}
1433
1434^[query165]
1435PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1436PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1437SELECT ?x ?y
1438WHERE {
1439 ?x benchmark:isFriendOf ?y
1440}
1441
1442^[query166]
1443PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1444PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1445SELECT ?x ?y
1446WHERE {
1447 ?x benchmark:hasDegreeFrom ?y
1448}
1449
1450^[query167]
1451PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1452PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1453SELECT ?x
1454WHERE {
1455 _:y benchmark:isTaughtBy ?x .
1456 _:y rdf:type benchmark:Work
1457}
1458
1459^[query168]
1460PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1461PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1462SELECT ?x ?y
1463WHERE {
1464 ?y benchmark:isTaughtBy ?x
1465}
1466
1467^[query169]
1468PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1469PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1470SELECT ?x
1471WHERE {
1472 _:y benchmark:hasAlumnus ?x .
1473 _:y rdf:type benchmark:University
1474}
1475
1476^[query170]
1477PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1478PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1479SELECT ?x
1480WHERE {
1481 ?x rdf:type benchmark:Person
1482}
1483
1484^[query171]
1485PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1486PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1487SELECT ?x
1488WHERE {
1489 ?x benchmark:isTaughtBy _:y .
1490 _:y benchmark:worksFor _:z
1491}
1492
1493^[query172]
1494PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1495PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1496SELECT ?x
1497WHERE {
1498 ?x benchmark:hasMasterDegreeFrom _:y
1499}
1500
1501^[query173]
1502PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1503PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1504SELECT ?x
1505WHERE {
1506 _:y benchmark:isMemberOf ?x .
1507 _:z benchmark:hasMember _:y
1508}
1509
1510^[query174]
1511PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1512PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1513SELECT ?x
1514WHERE {
1515 ?x benchmark:teacherOf _:y
1516}
1517
1518^[query175]
1519PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1520PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1521SELECT ?x
1522WHERE {
1523 ?x benchmark:isMemberOf _:y .
1524 _:y rdf:type benchmark:Department
1525}
1526
1527^[query176]
1528PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1529PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1530SELECT ?x ?y
1531WHERE {
1532 ?x benchmark:isMemberOf ?y
1533}
1534
1535^[query177]
1536PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1537PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1538SELECT ?x
1539WHERE {
1540 ?x benchmark:hasStudent _:y .
1541 _:z benchmark:hasStudent _:y .
1542 _:z rdf:type benchmark:Organization
1543}
1544
1545^[query178]
1546PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1547PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1548SELECT ?x
1549WHERE {
1550 ?x benchmark:hasMajor _:y
1551}
1552
1553^[query179]
1554PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1555PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1556SELECT ?x
1557WHERE {
1558 ?x rdf:type benchmark:Insterest
1559}
1560
1561^[query180]
1562PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1563PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1564SELECT ?x
1565WHERE {
1566 _:y benchmark:isStudentOf ?x .
1567 _:y rdf:type benchmark:Person
1568}
1569
1570^[query181]
1571PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1572PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1573SELECT ?x
1574WHERE {
1575 ?x benchmark:hasDegreeFrom _:y .
1576 _:y rdf:type benchmark:Organization
1577}
1578
1579^[query182]
1580PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1581PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1582SELECT ?x
1583WHERE {
1584 ?x rdf:type benchmark:HumanitiesAndSocial
1585}
1586
1587^[query183]
1588PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1589PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1590SELECT ?x
1591WHERE {
1592 _:y benchmark:teacherOf ?x .
1593 _:y rdf:type benchmark:Faculty
1594}
1595
1596^[query184]
1597PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1598PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1599SELECT ?x
1600WHERE {
1601 ?x rdf:type benchmark:Publication
1602}
1603
1604^[query185]
1605PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1606PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1607SELECT ?x
1608WHERE {
1609 ?x benchmark:like _:y .
1610 _:y rdf:type benchmark:TennisClass
1611}
1612
1613^[query186]
1614PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1615PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1616SELECT ?x
1617WHERE {
1618 _:y benchmark:isMemberOf ?x
1619}
1620
1621^[query187]
1622PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1623PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1624SELECT ?x ?y
1625WHERE {
1626 ?y benchmark:hasDegreeFrom ?x
1627}
1628
1629^[query188]
1630PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1631PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1632SELECT ?x
1633WHERE {
1634 ?x benchmark:hasMember _:y .
1635 _:y benchmark:isMemberOf _:z
1636}
1637
1638^[query189]
1639PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1640PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1641SELECT ?x
1642WHERE {
1643 _:y benchmark:teacherOf ?x .
1644 _:y rdf:type benchmark:Person
1645}
1646
1647^[query190]
1648PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1649PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1650SELECT ?x
1651WHERE {
1652 _:y benchmark:teacherOf ?x .
1653 _:y rdf:type benchmark:Employee
1654}
1655
1656^[query191]
1657PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1658PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1659SELECT ?x
1660WHERE {
1661 _:y benchmark:hasStudent ?x .
1662 _:y rdf:type benchmark:Department
1663}
1664
1665^[query192]
1666PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1667PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1668SELECT ?x
1669WHERE {
1670 ?x benchmark:teachingAssistantOf _:y .
1671 _:y rdf:type benchmark:Work
1672}
1673
1674^[query193]
1675PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1676PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1677SELECT ?x
1678WHERE {
1679 ?x rdf:type benchmark:University
1680}
1681
1682^[query194]
1683PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1684PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1685SELECT ?x
1686WHERE {
1687 ?x benchmark:hasUndergraduateDegreeFrom _:y .
1688 _:y rdf:type benchmark:Organization
1689}
1690
1691^[query195]
1692PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1693PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1694SELECT ?x
1695WHERE {
1696 ?x rdf:type benchmark:Schedule
1697}
1698
1699^[query196]
1700PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1701PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1702SELECT ?x
1703WHERE {
1704 ?x benchmark:worksFor _:y .
1705 _:y rdf:type benchmark:Organization
1706}
1707
1708^[query197]
1709PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1710PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1711SELECT ?x
1712WHERE {
1713 _:y benchmark:hasMember ?x .
1714 _:y rdf:type benchmark:College
1715}
1716
1717^[query198]
1718PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1719PREFIX benchmark: <http://semantics.crl.ibm.com/univ-bench-dl.owl#>
1720SELECT ?x
1721WHERE {
1722 _:y benchmark:hasMember ?x .
1723 _:y rdf:type benchmark:Department
1724}
1725
diff --git a/src/resources/pagoda.properties b/src/resources/pagoda.properties
index 64de225..0401d64 100644
--- a/src/resources/pagoda.properties
+++ b/src/resources/pagoda.properties
@@ -1,5 +1,5 @@
1debug=true 1debug=true
2useAlwaysSimpleUpperBound=false 2useAlwaysSimpleUpperBound=false
3useSkolemUpperBound=true 3useSkolemUpperBound=false
4 4
5statisticsDir=/home/alessandro/Dropbox/Oxford/PAGOdA/statistics \ No newline at end of file 5statisticsDir=/home/alessandro/Dropbox/Oxford/PAGOdA/statistics \ No newline at end of file
diff --git a/src/uk/ac/ox/cs/pagoda/endomorph/Endomorph.java b/src/uk/ac/ox/cs/pagoda/endomorph/Endomorph.java
index cde0895..1c853d7 100644
--- a/src/uk/ac/ox/cs/pagoda/endomorph/Endomorph.java
+++ b/src/uk/ac/ox/cs/pagoda/endomorph/Endomorph.java
@@ -85,10 +85,18 @@ public class Endomorph extends Checker {
85 } 85 }
86 86
87 @Override 87 @Override
88 public int getNoOfCalls() {
89 return fullReasoner.getNoOfCalls();
90 }
91
92 @Override
88 public void dispose() { 93 public void dispose() {
89 super.dispose(); 94 super.dispose();
90 95
91 fullReasoner.dispose(); 96 if(fullReasoner != null) {
97// Utility.logInfo("Hermit was called " + fullReasoner.getNoOfCalls() + " times");
98 fullReasoner.dispose();
99 }
92 } 100 }
93 101
94 public Graph getGraph() { 102 public Graph getGraph() {
diff --git a/src/uk/ac/ox/cs/pagoda/multistage/MultiStageQueryEngine.java b/src/uk/ac/ox/cs/pagoda/multistage/MultiStageQueryEngine.java
index 2471c80..33f9f03 100644
--- a/src/uk/ac/ox/cs/pagoda/multistage/MultiStageQueryEngine.java
+++ b/src/uk/ac/ox/cs/pagoda/multistage/MultiStageQueryEngine.java
@@ -83,21 +83,6 @@ public class MultiStageQueryEngine extends StageQueryEngine {
83 return materialise(program, treatment, gap); 83 return materialise(program, treatment, gap);
84 } 84 }
85 85
86 /**
87 * delta-chase with fixed mad term depth
88 */
89 @Override
90 public int materialiseSkolemly(DatalogProgram dProgram, GapByStore4ID gap) {
91 if(isDisposed()) throw new DisposedException();
92
93 materialise("lower program", dProgram.getLower().toString());
94 Program generalProgram = dProgram.getGeneral();
95 LimitedSkolemisationApplication program =
96 new LimitedSkolemisationApplication(generalProgram, dProgram.getUpperBottomStrategy());
97 Treatment treatment = new Pick4NegativeConceptNaive(this, program);
98 return materialise(program, treatment, gap);
99 }
100
101 public int materialise4SpecificQuery(Program generalProgram, QueryRecord record, BottomStrategy upperBottom) { 86 public int materialise4SpecificQuery(Program generalProgram, QueryRecord record, BottomStrategy upperBottom) {
102 if(isDisposed()) throw new DisposedException(); 87 if(isDisposed()) throw new DisposedException();
103 88
diff --git a/src/uk/ac/ox/cs/pagoda/multistage/StageQueryEngine.java b/src/uk/ac/ox/cs/pagoda/multistage/StageQueryEngine.java
index ffca55a..65184ee 100644
--- a/src/uk/ac/ox/cs/pagoda/multistage/StageQueryEngine.java
+++ b/src/uk/ac/ox/cs/pagoda/multistage/StageQueryEngine.java
@@ -21,8 +21,6 @@ public abstract class StageQueryEngine extends BasicQueryEngine {
21 21
22 public abstract int materialiseRestrictedly(DatalogProgram dProgram, GapByStore4ID gap); 22 public abstract int materialiseRestrictedly(DatalogProgram dProgram, GapByStore4ID gap);
23 23
24 public abstract int materialiseSkolemly(DatalogProgram dProgram, GapByStore4ID gap);
25
26 public boolean isValid() { 24 public boolean isValid() {
27 if (!checkValidity) return true; 25 if (!checkValidity) return true;
28 if (validMaterialisation != null) return validMaterialisation; 26 if (validMaterialisation != null) return validMaterialisation;
diff --git a/src/uk/ac/ox/cs/pagoda/query/QueryRecord.java b/src/uk/ac/ox/cs/pagoda/query/QueryRecord.java
index 5878a57..291af27 100644
--- a/src/uk/ac/ox/cs/pagoda/query/QueryRecord.java
+++ b/src/uk/ac/ox/cs/pagoda/query/QueryRecord.java
@@ -188,6 +188,10 @@ public class QueryRecord extends Disposable {
188 return new AnswerTuplesImp(answerVariables[0], gapAnswerTuples); 188 return new AnswerTuplesImp(answerVariables[0], gapAnswerTuples);
189 } 189 }
190 190
191 public int getGapAnswersCount() {
192 return gapAnswerTuples.size();
193 }
194
191 public String toString() { 195 public String toString() {
192 if(isDisposed()) throw new DisposedException(); 196 if(isDisposed()) throw new DisposedException();
193 197
diff --git a/src/uk/ac/ox/cs/pagoda/query/rollup/QueryGraph.java b/src/uk/ac/ox/cs/pagoda/query/rollup/QueryGraph.java
index a567699..a09cf5b 100644
--- a/src/uk/ac/ox/cs/pagoda/query/rollup/QueryGraph.java
+++ b/src/uk/ac/ox/cs/pagoda/query/rollup/QueryGraph.java
@@ -81,6 +81,44 @@ public class QueryGraph {
81 return axioms; 81 return axioms;
82 } 82 }
83 83
84// public Set<OWLClassExpression> getExistentialConditions(Map<Variable, Term> assignment) {
85// if(!rollable_edges.isEmpty()) return null;
86//
87// OWLIndividual sub;
88// Visitor visitor = new Visitor(factory, assignment);
89// Set<OWLClassExpression> axioms = new HashSet<>();
90// for(Map.Entry<Term, Set<OWLClassExpression>> entry : concepts.map.entrySet()) {
91// // TODO check correctness!!!
92// if(existVars.contains(entry.getKey())) {
93// OWLClassExpression conjunction =
94// factory.getOWLObjectIntersectionOf(factory.getOWLThing());
95// for(OWLClassExpression owlClassExpression : entry.getValue()) {
96// conjunction = factory.getOWLObjectIntersectionOf(conjunction, owlClassExpression.accept(visitor));
97// }
98// axioms.add(conjunction);
99//// continue; // previously the "then" contained only this
100// }
101// }
102// return axioms;
103// }
104
105 public Set<OWLAxiom> getExistentialAxioms() {
106 if(!rollable_edges.isEmpty()) return null;
107
108 Set<OWLAxiom> axioms = new HashSet<>();
109 for(Map.Entry<Term, Set<OWLClassExpression>> entry : concepts.map.entrySet()) {
110 if(existVars.contains(entry.getKey())) {
111 OWLClassExpression conjunction =
112 factory.getOWLObjectIntersectionOf(factory.getOWLThing());
113 for(OWLClassExpression owlClassExpression : entry.getValue()) {
114 conjunction = factory.getOWLObjectIntersectionOf(conjunction, owlClassExpression);
115 }
116 axioms.add(factory.getOWLSubClassOfAxiom(conjunction, factory.getOWLNothing()));
117 }
118 }
119 return axioms;
120 }
121
84 public Set<OWLAxiom> getAssertions(Map<Variable, Term> assignment) { 122 public Set<OWLAxiom> getAssertions(Map<Variable, Term> assignment) {
85 if(!rollable_edges.isEmpty()) return null; 123 if(!rollable_edges.isEmpty()) return null;
86 124
@@ -88,10 +126,21 @@ public class QueryGraph {
88 Visitor visitor = new Visitor(factory, assignment); 126 Visitor visitor = new Visitor(factory, assignment);
89 Set<OWLAxiom> axioms = getPropertyAssertions(assignment); 127 Set<OWLAxiom> axioms = getPropertyAssertions(assignment);
90 for(Map.Entry<Term, Set<OWLClassExpression>> entry : concepts.map.entrySet()) { 128 for(Map.Entry<Term, Set<OWLClassExpression>> entry : concepts.map.entrySet()) {
91 if(existVars.contains(entry.getKey())) continue; 129 // TODO check correctness!!!
92 sub = factory.getOWLNamedIndividual(IRI.create(getIndividual(entry.getKey(), assignment).getIRI())); 130 if(existVars.contains(entry.getKey())) {
93 for(OWLClassExpression clsExp : entry.getValue()) { 131// OWLClassExpression conjunction =
94 axioms.add(factory.getOWLClassAssertionAxiom(clsExp.accept(visitor), sub)); 132// factory.getOWLObjectIntersectionOf(factory.getOWLThing());
133// for(OWLClassExpression owlClassExpression : entry.getValue()) {
134// conjunction = factory.getOWLObjectIntersectionOf(conjunction, owlClassExpression.accept(visitor));
135// }
136// axioms.add(factory.getOWLSubClassOfAxiom(conjunction, factory.getOWLNothing()));
137 continue; // previously the "then" contained only this
138 }
139 else {
140 sub = factory.getOWLNamedIndividual(IRI.create(getIndividual(entry.getKey(), assignment).getIRI()));
141 for(OWLClassExpression clsExp : entry.getValue()) {
142 axioms.add(factory.getOWLClassAssertionAxiom(clsExp.accept(visitor), sub));
143 }
95 } 144 }
96 } 145 }
97 return axioms; 146 return axioms;
diff --git a/src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java b/src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java
index 93fbc98..51cb44d 100644
--- a/src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java
+++ b/src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java
@@ -10,7 +10,6 @@ import uk.ac.ox.cs.pagoda.query.GapByStore4ID;
10import uk.ac.ox.cs.pagoda.query.GapByStore4ID2; 10import uk.ac.ox.cs.pagoda.query.GapByStore4ID2;
11import uk.ac.ox.cs.pagoda.query.QueryRecord; 11import uk.ac.ox.cs.pagoda.query.QueryRecord;
12import uk.ac.ox.cs.pagoda.query.QueryRecord.Step; 12import uk.ac.ox.cs.pagoda.query.QueryRecord.Step;
13import uk.ac.ox.cs.pagoda.reasoner.full.Checker;
14import uk.ac.ox.cs.pagoda.reasoner.light.BasicQueryEngine; 13import uk.ac.ox.cs.pagoda.reasoner.light.BasicQueryEngine;
15import uk.ac.ox.cs.pagoda.reasoner.light.KarmaQueryEngine; 14import uk.ac.ox.cs.pagoda.reasoner.light.KarmaQueryEngine;
16import uk.ac.ox.cs.pagoda.rules.DatalogProgram; 15import uk.ac.ox.cs.pagoda.rules.DatalogProgram;
@@ -189,19 +188,21 @@ class MyQueryReasoner extends QueryReasoner {
189 return; 188 return;
190 189
191 OWLOntology relevantOntologySubset = extractRelevantOntologySubset(queryRecord); 190 OWLOntology relevantOntologySubset = extractRelevantOntologySubset(queryRecord);
192// queryRecord.saveRelevantOntology("./fragment_query" + queryRecord.getQueryID() + ".owl"); 191// queryRecord.saveRelevantOntology("/home/alessandro/Desktop/test-relevant-ontology.owl");
193 192
194 if(properties.getUseSkolemUpperBound() && 193 if(properties.getUseSkolemUpperBound() &&
195 querySkolemisedRelevantSubset(relevantOntologySubset, queryRecord)) 194 querySkolemisedRelevantSubset(relevantOntologySubset, queryRecord)) {
196 return; 195 return;
196 }
197 197
198 Timer t = new Timer(); 198 Timer t = new Timer();
199 Checker summarisedChecker = new HermitSummaryFilter(queryRecord, properties.getToCallHermiT()); 199 HermitSummaryFilter summarisedChecker = new HermitSummaryFilter(queryRecord, properties.getToCallHermiT());
200 summarisedChecker.check(queryRecord.getGapAnswers()); 200 summarisedChecker.check(queryRecord.getGapAnswers());
201 summarisedChecker.dispose(); 201// summarisedChecker.checkByFullReasoner(queryRecord.getGapAnswers());
202 Utility.logDebug("Total time for full reasoner: " + t.duration()); 202 Utility.logDebug("Total time for full reasoner: " + t.duration());
203
203 queryRecord.markAsProcessed(); 204 queryRecord.markAsProcessed();
204 Utility.logDebug("Difficulty of this query: " + queryRecord.getDifficulty()); 205 summarisedChecker.dispose();
205 } 206 }
206 207
207 @Override 208 @Override
diff --git a/src/uk/ac/ox/cs/pagoda/reasoner/QueryReasoner.java b/src/uk/ac/ox/cs/pagoda/reasoner/QueryReasoner.java
index 3a057ec..e8daa3b 100644
--- a/src/uk/ac/ox/cs/pagoda/reasoner/QueryReasoner.java
+++ b/src/uk/ac/ox/cs/pagoda/reasoner/QueryReasoner.java
@@ -206,7 +206,7 @@ public abstract class QueryReasoner extends Disposable {
206 if you call twice, you will end up with a json file with multiple roots */ 206 if you call twice, you will end up with a json file with multiple roots */
207 if(answerWriter != null) gson.toJson(queryRecords, answerWriter); 207 if(answerWriter != null) gson.toJson(queryRecords, answerWriter);
208// queryRecords.stream().forEach(record -> Utility.logDebug(gson.toJson(record))); 208// queryRecords.stream().forEach(record -> Utility.logDebug(gson.toJson(record)));
209 queryRecords.stream().forEach(record -> record.dispose()); 209 queryRecords.stream().forEach(QueryRecord::dispose);
210 } 210 }
211 211
212 @Override 212 @Override
diff --git a/src/uk/ac/ox/cs/pagoda/reasoner/full/Checker.java b/src/uk/ac/ox/cs/pagoda/reasoner/full/Checker.java
index fd620a5..07adc6d 100644
--- a/src/uk/ac/ox/cs/pagoda/reasoner/full/Checker.java
+++ b/src/uk/ac/ox/cs/pagoda/reasoner/full/Checker.java
@@ -12,4 +12,6 @@ public abstract class Checker extends Disposable {
12 12
13 public abstract boolean isConsistent(); 13 public abstract boolean isConsistent();
14 14
15 public abstract int getNoOfCalls();
16
15} 17}
diff --git a/src/uk/ac/ox/cs/pagoda/reasoner/full/HermitChecker.java b/src/uk/ac/ox/cs/pagoda/reasoner/full/HermitChecker.java
index 35db0f2..cfae88b 100644
--- a/src/uk/ac/ox/cs/pagoda/reasoner/full/HermitChecker.java
+++ b/src/uk/ac/ox/cs/pagoda/reasoner/full/HermitChecker.java
@@ -24,228 +24,255 @@ import java.util.Map;
24import java.util.Set; 24import java.util.Set;
25 25
26public class HermitChecker extends Checker { 26public class HermitChecker extends Checker {
27 27
28 protected OWLDataFactory factory; 28 protected OWLDataFactory factory;
29 protected String[][] answerVariable; 29 protected String[][] answerVariable;
30 protected OWLOntology ontology; 30 protected OWLOntology ontology;
31 protected QueryRecord record; 31 protected QueryRecord record;
32 protected QueryGraph qGraph = null; 32 protected QueryGraph qGraph = null;
33 boolean toCheck = true; 33 boolean toCheck = true;
34 AnswerTuple topAnswerTuple = null, botAnswerTuple = null; 34 AnswerTuple topAnswerTuple = null, botAnswerTuple = null;
35 private String queryText; 35 private String queryText;
36 private DLClause queryClause; 36 private DLClause queryClause;
37 private Reasoner hermit; 37 private Reasoner hermit;
38 private int tag = 0; 38 private int tag = 0;
39 private int counter = 0; 39
40 private DependencyGraph dGraph = null; 40 public int getNoOfCalls() {
41 public HermitChecker(Checker checker) { 41 if(isDisposed()) throw new DisposedException();
42 if (checker instanceof HermitChecker) { 42 return noOfCalls;
43 HermitChecker other = (HermitChecker) checker; 43 }
44 factory = other.factory; 44
45 queryText = other.queryText; 45 private int noOfCalls = 0;
46 queryClause = other.queryClause; 46 private DependencyGraph dGraph = null;
47 answerVariable = other.answerVariable; 47
48 ontology = other.ontology; 48 public HermitChecker(Checker checker) {
49 if(checker instanceof HermitChecker) {
50 HermitChecker other = (HermitChecker) checker;
51 factory = other.factory;
52 queryText = other.queryText;
53 queryClause = other.queryClause;
54 answerVariable = other.answerVariable;
55 ontology = other.ontology;
49// record = other.record; 56// record = other.record;
50 } 57 }
51 58
52 hermit = new Reasoner(ontology); 59 hermit = new Reasoner(ontology);
53 } 60 }
54 61
55 public HermitChecker(OWLOntology ontology, QueryRecord record, boolean toCheck) { 62 public HermitChecker(OWLOntology ontology, QueryRecord record, boolean toCheck) {
56 this.ontology = ontology; 63 this.ontology = ontology;
57 queryText = record.getQueryText(); 64 queryText = record.getQueryText();
58 answerVariable = record.getVariables(); 65 answerVariable = record.getVariables();
59 queryClause = record.getClause(); 66 queryClause = record.getClause();
60// this.record = record; 67// this.record = record;
61 this.toCheck = toCheck; 68 this.toCheck = toCheck;
62 } 69 }
63 70
64 public HermitChecker(OWLOntology ontology, String queryText) { 71 public HermitChecker(OWLOntology ontology, String queryText) {
65 this.ontology = ontology; 72 this.ontology = ontology;
66 this.queryText = queryText; 73 this.queryText = queryText;
67 answerVariable = queryText == null ? null : ConjunctiveQueryHelper.getAnswerVariables(queryText); 74 answerVariable = queryText == null ? null : ConjunctiveQueryHelper.getAnswerVariables(queryText);
68 queryClause = DLClauseHelper.getQuery(queryText, null); 75 queryClause = DLClauseHelper.getQuery(queryText, null);
69// this.record = null; 76// this.record = null;
70 } 77 }
71 78
72 @Override 79 @Override
73 public int check(AnswerTuples answers) { 80 public int check(AnswerTuples answers) {
74 if(isDisposed()) throw new DisposedException(); 81 if(isDisposed()) throw new DisposedException();
75 82
76 if(hermit == null) initialiseReasoner(); 83 if(hermit == null) initialiseReasoner();
77 int answerCounter = 0, counter = 0; 84 int answerCounter = 0, counter = 0;
78 for(; answers.isValid(); answers.moveNext()) { 85 for(; answers.isValid(); answers.moveNext()) {
79 ++counter; 86 ++counter;
80 if(check(answers.getTuple())) ++answerCounter; 87 if(check(answers.getTuple())) ++answerCounter;
81 } 88 }
82 answers.dispose(); 89 answers.dispose();
83 90
84 Utility.logDebug("The number of individuals to be checked by HermiT: " + counter, 91 Utility.logDebug("The number of individuals to be checked by HermiT: " + counter,
85 "The number of correct answers: " + answerCounter); 92 "The number of correct answers: " + answerCounter);
86 return answerCounter; 93 return answerCounter;
87 } 94 }
88 95
89 @Override 96 @Override
90 public boolean check(AnswerTuple answerTuple) { 97 public boolean check(AnswerTuple answerTuple) {
91 if(isDisposed()) throw new DisposedException(); 98 if(isDisposed()) throw new DisposedException();
92 99
93 if(!toCheck) return false; 100 if(!toCheck) return false;
94 101 ++noOfCalls;
95 if(hermit == null) initialiseReasoner(); 102
96 if(tag != 0) return tag == 1; 103 if(tag != 0) return tag == 1;
97 ++counter; 104 if(hermit == null) initialiseReasoner();
98 Timer t = new Timer(); 105
99 Map<Variable, Term> sub = answerTuple.getAssignment(answerVariable[1]); 106 Timer t = new Timer();
100 Set<OWLAxiom> toCheckAxioms = qGraph.getAssertions(sub); 107 Map<Variable, Term> sub = answerTuple.getAssignment(answerVariable[1]);
108 Set<OWLAxiom> toCheckAxioms = qGraph.getAssertions(sub);
109
110 // TODO complete
111 Set<OWLAxiom> toCheckExistentialAxioms = qGraph.getExistentialAxioms();
112
113 // TODO possibly inefficient
114 for(OWLAxiom subclassAxiom : toCheckExistentialAxioms) {
115 Utility.logDebug("Checking consistency of ontology union " + subclassAxiom);
116 ontology.getOWLOntologyManager().addAxiom(ontology, subclassAxiom);
117 if(hermit.isConsistent()) {
118 Utility.logDebug("@TIME to check one tuple: " + t.duration());
119 return false;
120 }
121 ontology.getOWLOntologyManager().removeAxiom(ontology, subclassAxiom);
122 }
123
101 124
102// for (OWLAxiom axiom: toCheckAxioms) System.out.println(axiom.toString()); 125// for (OWLAxiom axiom: toCheckAxioms) System.out.println(axiom.toString());
103 126
104 if(hermit.isEntailed(toCheckAxioms)) { 127// Utility.logInfo(toCheckAxioms);
105 Utility.logDebug("@TIME to check one tuple: " + t.duration()); 128
106 return true; 129 if(hermit.isEntailed(toCheckAxioms)) {
107 } 130 Utility.logDebug("@TIME to check one tuple: " + t.duration());
108 Utility.logDebug("@TIME to check one tuple: " + t.duration()); 131 return true;
109 return false; 132 }
110 } 133 Utility.logDebug("@TIME to check one tuple: " + t.duration());
111 134 return false;
112 @Override 135 }
113 public boolean isConsistent() { 136
114 if(isDisposed()) throw new DisposedException(); 137 @Override
115 138 public boolean isConsistent() {
116 if(hermit == null) initialiseReasoner(); 139 if(isDisposed()) throw new DisposedException();
117 return hermit.isConsistent(); 140
118 } 141 if(hermit == null) initialiseReasoner();
119 142 return hermit.isConsistent();
120 public void dispose() { 143 }
121 super.dispose(); 144
122 145 public void dispose() {
123 Utility.logInfo("Hermit was called " + counter + " times."); 146 super.dispose();
124 if(hermit != null) hermit.dispose(); 147
125 hermit = null; 148 Utility.logDebug("Disposing of an instance of Hermit after " + noOfCalls + " calls");
126 } 149 if(hermit != null) hermit.dispose();
127 150 hermit = null;
128 public void setDependencyGraph(DependencyGraph dGraph) { 151 }
129 if(isDisposed()) throw new DisposedException(); 152
130 153 public void setDependencyGraph(DependencyGraph dGraph) {
131 this.dGraph = dGraph; 154 if(isDisposed()) throw new DisposedException();
132 } 155
133 156 this.dGraph = dGraph;
134 private void initialiseReasoner() { 157 }
135 qGraph = new QueryGraph(queryClause.getBodyAtoms(), answerVariable[1], ontology); 158
136 OWLOntologyManager manager = ontology.getOWLOntologyManager(); 159 private void initialiseReasoner() {
137 factory = manager.getOWLDataFactory(); 160 qGraph = new QueryGraph(queryClause.getBodyAtoms(), answerVariable[1], ontology);
138 161 OWLOntologyManager manager = ontology.getOWLOntologyManager();
139 if(hermit != null) hermit.dispose(); 162 factory = manager.getOWLDataFactory();
140 163
141 if(dGraph != null && answerVariable[1].length == 1 && (dGraph.getExits().size() > 1 || dGraph.getEntrances() 164 if(hermit != null) hermit.dispose();
142 .size() > 1)) { 165
143 Set<OWLAxiom> topAxioms = new HashSet<OWLAxiom>(); 166 if(dGraph != null && answerVariable[1].length == 1 && (dGraph.getExits().size() > 1 || dGraph.getEntrances()
144 Set<OWLAxiom> botAxioms = new HashSet<OWLAxiom>(); 167 .size() > 1)) {
145 addTopAndBotTuple(topAxioms, botAxioms); 168 Set<OWLAxiom> topAxioms = new HashSet<OWLAxiom>();
146 manager.addAxioms(ontology, topAxioms); 169 Set<OWLAxiom> botAxioms = new HashSet<OWLAxiom>();
147 manager.addAxioms(ontology, botAxioms); 170 addTopAndBotTuple(topAxioms, botAxioms);
148 hermit = new Reasoner(ontology); 171 manager.addAxioms(ontology, topAxioms);
149 boolean topValid = true; 172 manager.addAxioms(ontology, botAxioms);
150 if(!hermit.isConsistent() || topAnswerTuple != null && (topValid = check(topAnswerTuple))) { 173 hermit = new Reasoner(ontology);
151 hermit.dispose(); 174 boolean topValid = true;
152 manager.removeAxioms(ontology, topAxioms); 175 if(!hermit.isConsistent() || topAnswerTuple != null && (topValid = check(topAnswerTuple))) {
153 hermit = new Reasoner(ontology); 176 hermit.dispose();
154 } 177 manager.removeAxioms(ontology, topAxioms);
155 else { 178 hermit = new Reasoner(ontology);
156 if(!topValid) tag = -1; 179 }
157 else if(botAnswerTuple != null && check(botAnswerTuple)) tag = 1; 180 else {
158 } 181 if(!topValid) tag = -1;
159 } 182 else if(botAnswerTuple != null && check(botAnswerTuple)) tag = 1;
160 else 183 }
161 hermit = new Reasoner(ontology); 184 }
162 } 185 else
163 186 hermit = new Reasoner(ontology);
164 private void addTopAndBotTuple(Set<OWLAxiom> topAxioms, Set<OWLAxiom> botAxioms) { 187 }
165 String top_str = Namespace.PAGODA_ANONY + "top", bot_str = Namespace.PAGODA_ANONY + "bot"; 188
166 topAnswerTuple = 189 private void addTopAndBotTuple(Set<OWLAxiom> topAxioms, Set<OWLAxiom> botAxioms) {
167 new AnswerTuple(new uk.ac.ox.cs.JRDFox.model.Individual[]{uk.ac.ox.cs.JRDFox.model.Individual.create(top_str)}); 190 String top_str = Namespace.PAGODA_ANONY + "top", bot_str = Namespace.PAGODA_ANONY + "bot";
168 botAnswerTuple = 191 topAnswerTuple =
169 new AnswerTuple(new uk.ac.ox.cs.JRDFox.model.Individual[]{uk.ac.ox.cs.JRDFox.model.Individual.create(bot_str)}); 192 new AnswerTuple(
170 OWLIndividual top_ind = factory.getOWLNamedIndividual(IRI.create(top_str)), bot_ind = 193 new uk.ac.ox.cs.JRDFox.model.Individual[]{uk.ac.ox.cs.JRDFox.model.Individual.create(top_str)});
171 factory.getOWLNamedIndividual(IRI.create(bot_str)); 194 botAnswerTuple =
172 Map<OWLAxiom, Integer> counter = new HashMap<OWLAxiom, Integer>(); 195 new AnswerTuple(
173 196 new uk.ac.ox.cs.JRDFox.model.Individual[]{uk.ac.ox.cs.JRDFox.model.Individual.create(bot_str)});
174 Set<String> topAnswers = new HashSet<String>(), botAnswers = new HashSet<String>(); 197 OWLIndividual top_ind = factory.getOWLNamedIndividual(IRI.create(top_str)), bot_ind =
175 OWLIndividual sub, obj; 198 factory.getOWLNamedIndividual(IRI.create(bot_str));
176 if(dGraph.getExits().size() > 1) { 199 Map<OWLAxiom, Integer> counter = new HashMap<OWLAxiom, Integer>();
177 for(Clique answerClique : dGraph.getExits()) 200
178 topAnswers.add(((uk.ac.ox.cs.JRDFox.model.Individual) answerClique.getRepresentative() 201 Set<String> topAnswers = new HashSet<String>(), botAnswers = new HashSet<String>();
179 .getAnswerTuple() 202 OWLIndividual sub, obj;
180 .getGroundTerm(0)).getIRI()); 203 if(dGraph.getExits().size() > 1) {
181 } 204 for(Clique answerClique : dGraph.getExits())
182 else topAnswerTuple = null; 205 topAnswers.add(((uk.ac.ox.cs.JRDFox.model.Individual) answerClique.getRepresentative()
183 206 .getAnswerTuple()
184 if(dGraph.getEntrances().size() > 1) { 207 .getGroundTerm(0)).getIRI());
185 for(Clique answerClique : dGraph.getEntrances()) 208 }
186 botAnswers.add(((uk.ac.ox.cs.JRDFox.model.Individual) answerClique.getRepresentative() 209 else topAnswerTuple = null;
187 .getAnswerTuple() 210
188 .getGroundTerm(0)).getIRI()); 211 if(dGraph.getEntrances().size() > 1) {
189 } 212 for(Clique answerClique : dGraph.getEntrances())
190 else botAnswerTuple = null; 213 botAnswers.add(((uk.ac.ox.cs.JRDFox.model.Individual) answerClique.getRepresentative()
191 214 .getAnswerTuple()
192 for(OWLAxiom axiom : ontology.getABoxAxioms(true)) 215 .getGroundTerm(0)).getIRI());
193 if(axiom instanceof OWLClassAssertionAxiom) { 216 }
194 OWLClassAssertionAxiom ca = (OWLClassAssertionAxiom) axiom; 217 else botAnswerTuple = null;
195 sub = ca.getIndividual(); 218
196 if(topAnswers.contains(sub.toStringID())) 219 for(OWLAxiom axiom : ontology.getABoxAxioms(true))
197 topAxioms.add(factory.getOWLClassAssertionAxiom(ca.getClassExpression(), top_ind)); 220 if(axiom instanceof OWLClassAssertionAxiom) {
198 if(botAnswers.contains(sub.toStringID())) 221 OWLClassAssertionAxiom ca = (OWLClassAssertionAxiom) axiom;
199 inc(counter, factory.getOWLClassAssertionAxiom(ca.getClassExpression(), bot_ind)); 222 sub = ca.getIndividual();
200 } 223 if(topAnswers.contains(sub.toStringID()))
201 else if(axiom instanceof OWLObjectPropertyAssertionAxiom) { 224 topAxioms.add(factory.getOWLClassAssertionAxiom(ca.getClassExpression(), top_ind));
202 OWLObjectPropertyAssertionAxiom oa = (OWLObjectPropertyAssertionAxiom) axiom; 225 if(botAnswers.contains(sub.toStringID()))
203 sub = oa.getSubject(); 226 inc(counter, factory.getOWLClassAssertionAxiom(ca.getClassExpression(), bot_ind));
204 obj = oa.getObject(); 227 }
205 if(topAnswers.contains(sub.toStringID())) 228 else if(axiom instanceof OWLObjectPropertyAssertionAxiom) {
206 if(topAnswers.contains(obj.toStringID())) 229 OWLObjectPropertyAssertionAxiom oa = (OWLObjectPropertyAssertionAxiom) axiom;
207 topAxioms.add(factory.getOWLObjectPropertyAssertionAxiom(oa.getProperty(), top_ind, top_ind)); 230 sub = oa.getSubject();
208 else 231 obj = oa.getObject();
209 topAxioms.add(factory.getOWLObjectPropertyAssertionAxiom(oa.getProperty(), top_ind, obj)); 232 if(topAnswers.contains(sub.toStringID()))
210 else { 233 if(topAnswers.contains(obj.toStringID()))
211 if(topAnswers.contains(obj.toStringID())) 234 topAxioms.add(factory.getOWLObjectPropertyAssertionAxiom(oa.getProperty(), top_ind, top_ind));
212 topAxioms.add(factory.getOWLObjectPropertyAssertionAxiom(oa.getProperty(), sub, top_ind)); 235 else
213 } 236 topAxioms.add(factory.getOWLObjectPropertyAssertionAxiom(oa.getProperty(), top_ind, obj));
214 237 else {
215 if(botAnswers.contains(sub.toStringID())) 238 if(topAnswers.contains(obj.toStringID()))
216 if(botAnswers.contains(obj.toStringID())) 239 topAxioms.add(factory.getOWLObjectPropertyAssertionAxiom(oa.getProperty(), sub, top_ind));
217 inc(counter, factory.getOWLObjectPropertyAssertionAxiom(oa.getProperty(), bot_ind, bot_ind)); 240 }
218 else 241
219 inc(counter, factory.getOWLObjectPropertyAssertionAxiom(oa.getProperty(), bot_ind, obj)); 242 if(botAnswers.contains(sub.toStringID()))
220 else { 243 if(botAnswers.contains(obj.toStringID()))
221 if(botAnswers.contains(obj.toStringID())) 244 inc(counter, factory.getOWLObjectPropertyAssertionAxiom(oa.getProperty(), bot_ind, bot_ind));
222 inc(counter, factory.getOWLObjectPropertyAssertionAxiom(oa.getProperty(), sub, bot_ind)); 245 else
223 } 246 inc(counter, factory.getOWLObjectPropertyAssertionAxiom(oa.getProperty(), bot_ind, obj));
224 247 else {
225 } 248 if(botAnswers.contains(obj.toStringID()))
226 else if(axiom instanceof OWLDataPropertyAssertionAxiom) { 249 inc(counter, factory.getOWLObjectPropertyAssertionAxiom(oa.getProperty(), sub, bot_ind));
227 OWLDataPropertyAssertionAxiom da = (OWLDataPropertyAssertionAxiom) axiom; 250 }
228 sub = da.getSubject(); 251
229 if(topAnswers.contains(sub.toStringID())) 252 }
230 topAxioms.add(factory.getOWLDataPropertyAssertionAxiom(da.getProperty(), top_ind, da.getObject())); 253 else if(axiom instanceof OWLDataPropertyAssertionAxiom) {
231 254 OWLDataPropertyAssertionAxiom da = (OWLDataPropertyAssertionAxiom) axiom;
232 if(botAnswers.contains(sub.toStringID())) 255 sub = da.getSubject();
233 inc(counter, factory.getOWLDataPropertyAssertionAxiom(da.getProperty(), bot_ind, da.getObject())); 256 if(topAnswers.contains(sub.toStringID()))
234 } 257 topAxioms.add(factory.getOWLDataPropertyAssertionAxiom(da.getProperty(), top_ind, da.getObject()));
235 258
236 int number = botAnswers.size(); 259 if(botAnswers.contains(sub.toStringID()))
237 for(Map.Entry<OWLAxiom, Integer> entry : counter.entrySet()) { 260 inc(counter, factory.getOWLDataPropertyAssertionAxiom(da.getProperty(), bot_ind, da.getObject()));
238 if(entry.getValue() == number) 261 }
239 botAxioms.add(entry.getKey()); 262
240 } 263 int number = botAnswers.size();
241 } 264 for(Map.Entry<OWLAxiom, Integer> entry : counter.entrySet()) {
242 265 if(entry.getValue() == number)
243 private void inc(Map<OWLAxiom, Integer> counter, OWLAxiom newAxiom) { 266 botAxioms.add(entry.getKey());
244 if(isDisposed()) throw new DisposedException(); 267 }
245 268 }
246 Integer number = counter.get(newAxiom); 269
247 if(number == null) counter.put(newAxiom, 1); 270 private void inc(Map<OWLAxiom, Integer> counter, OWLAxiom newAxiom) {
248 else counter.put(newAxiom, number + 1); 271 if(isDisposed()) throw new DisposedException();
249 } 272
273 Integer number = counter.get(newAxiom);
274 if(number == null) counter.put(newAxiom, 1);
275 else counter.put(newAxiom, number + 1);
276 }
250 277
251} 278}
diff --git a/src/uk/ac/ox/cs/pagoda/rules/Program.java b/src/uk/ac/ox/cs/pagoda/rules/Program.java
index afc32d4..85000e3 100644
--- a/src/uk/ac/ox/cs/pagoda/rules/Program.java
+++ b/src/uk/ac/ox/cs/pagoda/rules/Program.java
@@ -119,7 +119,7 @@ protected PredicateDependency dependencyGraph;
119 } catch(IOException e) { 119 } catch(IOException e) {
120 e.printStackTrace(); 120 e.printStackTrace();
121 } 121 }
122 Utility.logDebug("The rules are saved in " + getOutputPath() + "."); 122 Utility.logInfo("The rules are saved in " + getOutputPath() + ".");
123 } 123 }
124 124
125 @Override 125 @Override
diff --git a/src/uk/ac/ox/cs/pagoda/summary/HermitSummaryFilter.java b/src/uk/ac/ox/cs/pagoda/summary/HermitSummaryFilter.java
index f3f08e9..95f2cbb 100644
--- a/src/uk/ac/ox/cs/pagoda/summary/HermitSummaryFilter.java
+++ b/src/uk/ac/ox/cs/pagoda/summary/HermitSummaryFilter.java
@@ -111,6 +111,11 @@ public class HermitSummaryFilter extends Checker {
111 } 111 }
112 112
113 @Override 113 @Override
114 public int getNoOfCalls() {
115 return summarisedHermiT.getNoOfCalls() + endomorphismChecker.getNoOfCalls();
116 }
117
118 @Override
114 public int check(AnswerTuples answers) { 119 public int check(AnswerTuples answers) {
115 if(isDisposed()) throw new DisposedException(); 120 if(isDisposed()) throw new DisposedException();
116 121
@@ -183,8 +188,14 @@ public class HermitSummaryFilter extends Checker {
183 public void dispose() { 188 public void dispose() {
184 super.dispose(); 189 super.dispose();
185 190
186 if(summarisedHermiT != null) summarisedHermiT.dispose(); 191 if(summarisedHermiT != null) {
187 endomorphismChecker.dispose(); 192 Utility.logInfo("SummarisedHermit was called " + summarisedHermiT.getNoOfCalls() + " times");
193 summarisedHermiT.dispose();
194 }
195 if(endomorphismChecker != null) {
196 Utility.logInfo("Hermit was called " + endomorphismChecker.getNoOfCalls() + " times");
197 endomorphismChecker.dispose();
198 }
188 } 199 }
189 200
190 private void initialiseSummarisedReasoner() { 201 private void initialiseSummarisedReasoner() {
diff --git a/src/uk/ac/ox/cs/pagoda/util/PagodaProperties.java b/src/uk/ac/ox/cs/pagoda/util/PagodaProperties.java
index e501821..4991d0d 100644
--- a/src/uk/ac/ox/cs/pagoda/util/PagodaProperties.java
+++ b/src/uk/ac/ox/cs/pagoda/util/PagodaProperties.java
@@ -43,14 +43,14 @@ public class PagodaProperties {
43 defaultUseAlwaysSimpleUpperBound = 43 defaultUseAlwaysSimpleUpperBound =
44 Boolean.parseBoolean(config.getProperty("useAlwaysSimpleUpperBound")); 44 Boolean.parseBoolean(config.getProperty("useAlwaysSimpleUpperBound"));
45 if(defaultUseAlwaysSimpleUpperBound) 45 if(defaultUseAlwaysSimpleUpperBound)
46 logger.info("By default the simple upper bound is always used"); 46 logger.debug("By default the simple upper bound is always used");
47 } 47 }
48 if(config.containsKey("useSkolemUpperBound")) { 48 if(config.containsKey("useSkolemUpperBound")) {
49 defaultUseSkolemUpperBound = Boolean.parseBoolean(config.getProperty("useSkolemUpperBound")); 49 defaultUseSkolemUpperBound = Boolean.parseBoolean(config.getProperty("useSkolemUpperBound"));
50 if(defaultUseSkolemUpperBound) 50 if(defaultUseSkolemUpperBound)
51 logger.info("By default the Skolem upper bound is enabled"); 51 logger.debug("By default the Skolem upper bound is enabled");
52 else 52 else
53 logger.info("By default the Skolem upper bound is disabled"); 53 logger.debug("By default the Skolem upper bound is disabled");
54 } 54 }
55 55
56 } catch(IOException e) { 56 } catch(IOException e) {
diff --git a/test/resources/BugTests.xml b/test/resources/BugTests.xml
new file mode 100644
index 0000000..5782bd4
--- /dev/null
+++ b/test/resources/BugTests.xml
@@ -0,0 +1,17 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
3
4<suite name="BugTests">
5
6 <test name="BugTest">
7 <groups>
8 <run>
9 <include name="BugTesters"/>
10 </run>
11 </groups>
12 <classes>
13 <class name="uk.ac.ox.cs.pagoda.global_tests.MinimumCardinalityTest"/>
14 </classes>
15 </test>
16
17</suite> \ No newline at end of file
diff --git a/test/resources/Correctness.xml b/test/resources/Correctness.xml
new file mode 100644
index 0000000..3b00b7b
--- /dev/null
+++ b/test/resources/Correctness.xml
@@ -0,0 +1,20 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
3
4<suite name="Correctness">
5
6 <test name="correctness">
7 <groups>
8 <run>
9 <include name="correctness"/>
10 <exclude name="heavy"/>
11 </run>
12 </groups>
13 <classes>
14 <class name="uk.ac.ox.cs.pagoda.global_tests.TestPagodaUOBM"/>
15 <!--<class name="uk.ac.ox.cs.pagoda.global_tests.TestPagodaLUBM"/>-->
16 <!--<class name="uk.ac.ox.cs.pagoda.global_tests.TestPagodaFLY"/>-->
17 </classes>
18 </test>
19
20</suite> \ No newline at end of file
diff --git a/test/resources/LightTests.xml b/test/resources/LightTests.xml
index 2bc8dac..69cb572 100644
--- a/test/resources/LightTests.xml
+++ b/test/resources/LightTests.xml
@@ -5,8 +5,8 @@
5 <test name="light"> 5 <test name="light">
6 <groups> 6 <groups>
7 <run> 7 <run>
8 <!--<include name="light"/>--> 8 <include name="light"/>
9 <include name="justExecute"/> 9 <!--<include name="justExecute"/>-->
10 </run> 10 </run>
11 </groups> 11 </groups>
12 <classes> 12 <classes>
diff --git a/test/resources/test.properties b/test/resources/test.properties
index c4a25d0..08caeba 100644
--- a/test/resources/test.properties
+++ b/test/resources/test.properties
@@ -1 +1,2 @@
1#ontoDir=/home/alessandro/Desktop
1ontoDir=/home/alessandro/Big_files/Ontologies/ \ No newline at end of file 2ontoDir=/home/alessandro/Big_files/Ontologies/ \ No newline at end of file
diff --git a/test/uk/ac/ox/cs/pagoda/global_tests/MinimumCardinalityTest.java b/test/uk/ac/ox/cs/pagoda/global_tests/MinimumCardinalityTest.java
new file mode 100644
index 0000000..71c20c1
--- /dev/null
+++ b/test/uk/ac/ox/cs/pagoda/global_tests/MinimumCardinalityTest.java
@@ -0,0 +1,101 @@
1package uk.ac.ox.cs.pagoda.global_tests;
2
3import org.semanticweb.owlapi.apibinding.OWLManager;
4import org.semanticweb.owlapi.model.*;
5import org.testng.Assert;
6import org.testng.annotations.Test;
7import uk.ac.ox.cs.pagoda.query.AnswerTuple;
8import uk.ac.ox.cs.pagoda.query.AnswerTuples;
9import uk.ac.ox.cs.pagoda.reasoner.QueryReasoner;
10import uk.ac.ox.cs.pagoda.util.TestUtil;
11
12import java.io.IOException;
13import java.nio.file.Files;
14import java.nio.file.Paths;
15
16public class MinimumCardinalityTest {
17
18 public static final String NS = "http://example.org/test#%s";
19
20 private IRI getEntityIRI(String name) {
21 return IRI.create(String.format(NS, name));
22 }
23
24 @Test(groups = {"BugTesters"})
25 public void test() throws OWLOntologyCreationException, IOException, OWLOntologyStorageException {
26
27 /*
28 * Build test ontology
29 * */
30
31 OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
32 OWLDataFactory factory = manager.getOWLDataFactory();
33 OWLOntology ontology = manager.createOntology();
34
35 OWLClass student = factory.getOWLClass(getEntityIRI("Student"));
36 manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(student));
37 OWLClass course = factory.getOWLClass(getEntityIRI("Course"));
38 manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(course));
39 OWLClass hardWorkingStudent = factory.getOWLClass(getEntityIRI("HardWorkingStudent"));
40 manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(hardWorkingStudent));
41 OWLNamedIndividual a = factory.getOWLNamedIndividual(getEntityIRI("a"));
42 OWLNamedIndividual b = factory.getOWLNamedIndividual(getEntityIRI("b"));
43 OWLNamedIndividual c1 = factory.getOWLNamedIndividual(getEntityIRI("c1"));
44 OWLNamedIndividual c2 = factory.getOWLNamedIndividual(getEntityIRI("c2"));
45 OWLNamedIndividual c3 = factory.getOWLNamedIndividual(getEntityIRI("c3"));
46 OWLNamedIndividual d1 = factory.getOWLNamedIndividual(getEntityIRI("d1"));
47 OWLNamedIndividual d2 = factory.getOWLNamedIndividual(getEntityIRI("d2"));
48 OWLNamedIndividual d3 = factory.getOWLNamedIndividual(getEntityIRI("d3"));
49 OWLObjectProperty takesCourse = factory.getOWLObjectProperty(IRI.create(String.format(NS, "takesCourse")));
50 manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(takesCourse));
51
52 // Class assertions
53 manager.addAxiom(ontology, factory.getOWLClassAssertionAxiom(student, a)); // Student(a)
54 manager.addAxiom(ontology, factory.getOWLClassAssertionAxiom(student, b)); // Student(b)
55 manager.addAxiom(ontology, factory.getOWLClassAssertionAxiom(course, c1)); // Course(c1)
56 manager.addAxiom(ontology, factory.getOWLClassAssertionAxiom(course, c2)); // Course(c2)
57 manager.addAxiom(ontology, factory.getOWLClassAssertionAxiom(course, c3)); // Course(c3)
58 manager.addAxiom(ontology, factory.getOWLClassAssertionAxiom(course, d1)); // Course(d1)
59 manager.addAxiom(ontology, factory.getOWLClassAssertionAxiom(course, d2)); // Course(d2)
60 manager.addAxiom(ontology, factory.getOWLClassAssertionAxiom(course, d3)); // Course(d3)
61
62 // Role assertions
63 manager.addAxiom(ontology, factory.getOWLObjectPropertyAssertionAxiom(takesCourse, a, c1)); // takesCourse(a,c1)
64 manager.addAxiom(ontology, factory.getOWLObjectPropertyAssertionAxiom(takesCourse, a, c2)); // takesCourse(a,c2)
65 manager.addAxiom(ontology, factory.getOWLObjectPropertyAssertionAxiom(takesCourse, a, c3)); // takesCourse(a,c3)
66 manager.addAxiom(ontology, factory.getOWLObjectPropertyAssertionAxiom(takesCourse, b, d1)); // takesCourse(b,d1)
67 manager.addAxiom(ontology, factory.getOWLObjectPropertyAssertionAxiom(takesCourse, b, d2)); // takesCourse(b,d2)
68 manager.addAxiom(ontology, factory.getOWLObjectPropertyAssertionAxiom(takesCourse, b, d3)); // takesCourse(b,d3)
69
70 // Minimum cardinality axiom
71 manager.addAxiom(ontology,
72 factory.getOWLEquivalentClassesAxiom(hardWorkingStudent,
73 factory.getOWLObjectMinCardinality(3,
74 takesCourse)));
75
76 manager.saveOntology(ontology, Files.newOutputStream(Paths.get("/home/alessandro/Desktop/test-ontology.owl")));
77
78 /*
79 * Test one query
80 * */
81
82 QueryReasoner pagoda = QueryReasoner.getInstance(ontology);
83 pagoda.loadOntology(ontology);
84 if (pagoda.preprocess()) {
85 String query = "select distinct ?x ?y " +
86 " where { "
87 + " ?x <" + takesCourse.toStringID() + "> _:z . "
88 + " ?y <" + takesCourse.toStringID() + "> _:z " +
89 " }";
90 AnswerTuples answers = pagoda.evaluate(query);
91 int count = 0;
92 for (AnswerTuple ans; answers.isValid(); answers.moveNext()) {
93 ans = answers.getTuple();
94 TestUtil.logInfo(ans);
95 count++;
96 }
97 Assert.assertEquals(count, 2);
98 }
99 pagoda.dispose();
100 }
101}
diff --git a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaFLY.java b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaFLY.java
index a0ccb1a..caaad35 100644
--- a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaFLY.java
+++ b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaFLY.java
@@ -32,7 +32,7 @@ public class TestPagodaFLY {
32 CheckAnswers.assertSameAnswers(answers, givenAnswers); 32 CheckAnswers.assertSameAnswers(answers, givenAnswers);
33 } 33 }
34 34
35 @Test(groups = {"light"}) 35 @Test(groups = {"light", "correctness"})
36 public void answersCorrectness_rolledUp() throws IOException { 36 public void answersCorrectness_rolledUp() throws IOException {
37 String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); 37 String ontoDir = TestUtil.getConfig().getProperty("ontoDir");
38 Path answers = Paths.get(File.createTempFile("answers", ".json").getAbsolutePath()); 38 Path answers = Paths.get(File.createTempFile("answers", ".json").getAbsolutePath());
@@ -43,7 +43,7 @@ public class TestPagodaFLY {
43 .ontology(Paths.get(ontoDir, "fly/fly_rolledUp.owl")) 43 .ontology(Paths.get(ontoDir, "fly/fly_rolledUp.owl"))
44 .query(Paths.get(ontoDir, "fly/queries/fly_rolledUp.sparql")) 44 .query(Paths.get(ontoDir, "fly/queries/fly_rolledUp.sparql"))
45 .answer(answers) 45 .answer(answers)
46 .answer(Paths.get("/home/alessandro/Desktop/answers.json")) 46// .answer(Paths.get("/home/alessandro/Desktop/answers.json"))
47 .classify(false) 47 .classify(false)
48 .hermit(true) 48 .hermit(true)
49 .build(); 49 .build();
@@ -68,7 +68,7 @@ public class TestPagodaFLY {
68 .run(); 68 .run();
69 } 69 }
70 70
71 @Test(groups = {"light", "comparison"}) 71 @Test(groups = {"comparison"})
72 public void compare_newQueries() throws IOException { 72 public void compare_newQueries() throws IOException {
73 String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); 73 String ontoDir = TestUtil.getConfig().getProperty("ontoDir");
74 74
diff --git a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java
index 089a7d2..fdbfc42 100644
--- a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java
+++ b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java
@@ -31,7 +31,7 @@ public class TestPagodaLUBM {
31 CheckAnswers.assertSameAnswers(answers, givenAnswers); 31 CheckAnswers.assertSameAnswers(answers, givenAnswers);
32 } 32 }
33 33
34 @Test(groups = {"light"}) 34 @Test(groups = {"light", "correctness"})
35 public void answersCorrectness_1() throws IOException { 35 public void answersCorrectness_1() throws IOException {
36 answersCorrectness(1); 36 answersCorrectness(1);
37 } 37 }
diff --git a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaUOBM.java b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaUOBM.java
index 1d9f1e6..d0f0b9a 100644
--- a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaUOBM.java
+++ b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaUOBM.java
@@ -24,12 +24,12 @@ public class TestPagodaUOBM {
24 return integers; 24 return integers;
25 } 25 }
26 26
27 @Test(groups = {"light"}) 27 @Test(groups = {"light", "correctness"})
28 public void answersCorrectness_1() throws IOException { 28 public void answersCorrectness_1() throws IOException {
29 answersCorrectness(1); 29 answersCorrectness(1);
30 } 30 }
31 31
32 @Test(groups = {"heavy"}, dataProvider = "UOBMNumbers") 32 @Test(groups = {"heavy", "correctness"}, dataProvider = "UOBMNumbers")
33 public void answersCorrectness(int number) throws IOException { 33 public void answersCorrectness(int number) throws IOException {
34 String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); 34 String ontoDir = TestUtil.getConfig().getProperty("ontoDir");
35 Path answers = Paths.get(File.createTempFile("answers", ".json").getAbsolutePath()); 35 Path answers = Paths.get(File.createTempFile("answers", ".json").getAbsolutePath());
@@ -65,13 +65,11 @@ public class TestPagodaUOBM {
65 .ontology(Paths.get(ontoDir, "uobm/univ-bench-dl.owl")) 65 .ontology(Paths.get(ontoDir, "uobm/univ-bench-dl.owl"))
66 .data(Paths.get(ontoDir, "uobm/data/uobm" + number + ".ttl")) 66 .data(Paths.get(ontoDir, "uobm/data/uobm" + number + ".ttl"))
67 .query(Paths.get(ontoDir, "uobm/queries/uobm_sygenia.sparql")) 67 .query(Paths.get(ontoDir, "uobm/queries/uobm_sygenia.sparql"))
68// .answer(answers)
69 .classify(true) 68 .classify(true)
70 .hermit(true) 69 .hermit(true)
71 .build(); 70 .build();
72 71
73 pagoda.run(); 72 pagoda.run();
74// CheckAnswers.assertSameAnswers(answers, givenAnswers);
75 } 73 }
76 74
77 @Test(groups = {"sygenia"}) 75 @Test(groups = {"sygenia"})
@@ -82,21 +80,14 @@ public class TestPagodaUOBM {
82 @Test(groups = {"heavy"}, dataProvider = "UOBMNumbers") 80 @Test(groups = {"heavy"}, dataProvider = "UOBMNumbers")
83 public void answersCorrectness_sygenia_allBlanks(int number) throws IOException { 81 public void answersCorrectness_sygenia_allBlanks(int number) throws IOException {
84 String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); 82 String ontoDir = TestUtil.getConfig().getProperty("ontoDir");
85// Path answers = Paths.get(File.createTempFile("answers", ".json").getAbsolutePath());
86// new File(answers.toString()).deleteOnExit();
87// Path givenAnswers = TestUtil.getAnswersFilePath("answers/pagoda-uobm" + number + ".json");
88 83
89 Pagoda pagoda = Pagoda.builder() 84 Pagoda.builder()
90 .ontology(Paths.get(ontoDir, "uobm/univ-bench-dl.owl")) 85 .ontology(Paths.get(ontoDir, "uobm/univ-bench-dl.owl"))
91 .data(Paths.get(ontoDir, "uobm/data/uobm" + number + ".ttl")) 86 .data(Paths.get(ontoDir, "uobm/data/uobm" + number + ".ttl"))
92 .query(Paths.get(ontoDir, "uobm/queries/uobm_sygenia_all-blanks.sparql")) 87 .query(Paths.get(ontoDir, "uobm/queries/uobm_sygenia_all-blanks.sparql"))
93// .answer(answers) 88 .classify(true)
94 .classify(true) 89 .hermit(true)
95 .hermit(true) 90 .build().run();
96 .build();
97
98 pagoda.run();
99// CheckAnswers.assertSameAnswers(answers, givenAnswers);
100 } 91 }
101 92
102 @Test(groups = {"justExecute"}) 93 @Test(groups = {"justExecute"})
@@ -104,14 +95,12 @@ public class TestPagodaUOBM {
104 String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); 95 String ontoDir = TestUtil.getConfig().getProperty("ontoDir");
105 96
106 Pagoda.builder() 97 Pagoda.builder()
107 .ontology(Paths.get(ontoDir, "uobm/univ-bench-dl.owl")) 98 .ontology(Paths.get(ontoDir, "uobm/univ-bench-dl-modified.owl"))
108 .data(Paths.get(ontoDir, "uobm/data/uobm1.ttl")) 99 .data(Paths.get(ontoDir, "uobm/data/uobm1.ttl"))
109 .query(Paths.get(ontoDir, "uobm/queries/existential_queries.sparql")) 100 .query(Paths.get(ontoDir, "uobm/queries/existential_queries.sparql"))
110// .answer(answers) 101 .classify(true)
111 .classify(true) 102 .hermit(true)
112 .hermit(true) 103 .build()
113 .skolem(false) 104 .run();
114 .build()
115 .run();
116 } 105 }
117} 106}