aboutsummaryrefslogtreecommitdiff
path: root/src/uk/ac/ox/cs/pagoda/rules/clauses
diff options
context:
space:
mode:
authorFederico Igne <federico.igne@cs.ox.ac.uk>2022-05-10 18:17:06 +0100
committerFederico Igne <federico.igne@cs.ox.ac.uk>2022-05-11 12:34:47 +0100
commit17bd9beaf7f358a44e5bf36a5855fe6727d506dc (patch)
tree47e9310a0cff869d9ec017dcb2c81876407782c8 /src/uk/ac/ox/cs/pagoda/rules/clauses
parent8651164cd632a5db310b457ce32d4fbc97bdc41c (diff)
downloadACQuA-17bd9beaf7f358a44e5bf36a5855fe6727d506dc.tar.gz
ACQuA-17bd9beaf7f358a44e5bf36a5855fe6727d506dc.zip
[pagoda] Move project to Scala
This commit includes a few changes: - The repository still uses Maven to manage dependency but it is now a Scala project. - The code has been ported from OWLAPI 3.4.10 to 5.1.20 - A proof of concept program using both RSAComb and PAGOdA has been added.
Diffstat (limited to 'src/uk/ac/ox/cs/pagoda/rules/clauses')
-rw-r--r--src/uk/ac/ox/cs/pagoda/rules/clauses/Clause.java100
1 files changed, 0 insertions, 100 deletions
diff --git a/src/uk/ac/ox/cs/pagoda/rules/clauses/Clause.java b/src/uk/ac/ox/cs/pagoda/rules/clauses/Clause.java
deleted file mode 100644
index 2adb66b..0000000
--- a/src/uk/ac/ox/cs/pagoda/rules/clauses/Clause.java
+++ /dev/null
@@ -1,100 +0,0 @@
1package uk.ac.ox.cs.pagoda.rules.clauses;
2
3public class Clause {
4
5// public static final String IF = ":-";
6// public static final String OR = "|";
7// public static final String AND = ",";
8//
9// protected final List<List<Atom>> head;
10// protected final List<Atom> body;
11//
12// protected Clause(Atom[] headAtoms, Atom[] bodyAtoms) {
13// this.head = Collections.singletonList(Arrays.asList(headAtoms));
14// this.body= Arrays.asList(bodyAtoms);
15// }
16//
17// protected Clause(String s) {
18// this.headAtoms = null;
19// this.bodyAtoms = null;
20// }
21//
22// public int getHeadLength() {
23// return headAtoms.length;
24// }
25//
26// public Atom getHeadAtom(int atomIndex) {
27// return headAtoms[atomIndex];
28// }
29//
30// public Atom[] getHeadAtoms() {
31// return headAtoms.clone();
32// }
33//
34// public int getBodyLength() {
35// return bodyAtoms.length;
36// }
37//
38// public Atom getBodyAtom(int atomIndex) {
39// return bodyAtoms[atomIndex];
40// }
41//
42// public Atom[] getBodyAtoms() {
43// return bodyAtoms.clone();
44// }
45//
46// public String toString(Prefixes prefixes) {
47// StringBuilder buffer = new StringBuilder();
48// for(int headIndex = 0; headIndex < headAtoms.length; headIndex++) {
49// if(headIndex != 0)
50// buffer.append(" ").append(OR).append(" ");
51// buffer.append(headAtoms[headIndex].toString(prefixes));
52// }
53// buffer.append(" ").append(IF).append(" ");
54// for(int bodyIndex = 0; bodyIndex < bodyAtoms.length; bodyIndex++) {
55// if(bodyIndex != 0)
56// buffer.append(AND).append(" ");
57// buffer.append(bodyAtoms[bodyIndex].toString(prefixes));
58// }
59// return buffer.toString();
60// }
61//
62// public String toString() {
63// return toString(Prefixes.STANDARD_PREFIXES);
64// }
65//
66// protected static InterningManager<? extends Clause> s_interningManager = new InterningManager<Clause>() {
67// protected boolean equal(Clause object1, Clause object2) {
68// if(object1.head.length != object2.headAtoms.length
69// || object1.bodyAtoms.length != object2.bodyAtoms.length)
70// return false;
71// for(int index = object1.headAtoms.length - 1; index >= 0; --index)
72// if(object1.headAtoms[index] != object2.headAtoms[index])
73// return false;
74// for(int index = object1.bodyAtoms.length - 1; index >= 0; --index)
75// if(object1.bodyAtoms[index] != object2.bodyAtoms[index])
76// return false;
77// return true;
78// }
79//
80// protected int getHashCode(Clause object) {
81// int hashCode = 0;
82// for(int index = object.bodyAtoms.length - 1; index >= 0; --index)
83// hashCode += object.bodyAtoms[index].hashCode();
84// for(int index = object.headAtoms.length - 1; index >= 0; --index)
85// hashCode += object.headAtoms[index].hashCode();
86// return hashCode;
87// }
88// };
89//
90// /**
91// * Creates a clause from a string.
92// *
93// * @param s
94// * @return
95// */
96// public static Clause create(String s) {
97// return s_interningManager.intern(new Clause(s));
98// }
99
100}