diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/scala/rsacomb/CanonicalModel.scala | 10 | ||||
-rw-r--r-- | src/main/scala/rsacomb/FilteringProgram.scala | 12 | ||||
-rw-r--r-- | src/main/scala/rsacomb/RSA.scala | 4 |
3 files changed, 13 insertions, 13 deletions
diff --git a/src/main/scala/rsacomb/CanonicalModel.scala b/src/main/scala/rsacomb/CanonicalModel.scala index 5f781d1..d9e1641 100644 --- a/src/main/scala/rsacomb/CanonicalModel.scala +++ b/src/main/scala/rsacomb/CanonicalModel.scala | |||
@@ -92,14 +92,14 @@ class CanonicalModel(val ontology: RSAOntology) extends RSAAxiom { | |||
92 | val varZ = Variable.create("Z") | 92 | val varZ = Variable.create("Z") |
93 | List( | 93 | List( |
94 | // Reflexivity | 94 | // Reflexivity |
95 | Rule.create(RSA.EquivTo(varX, varX), RSA.Thing(varX)), | 95 | Rule.create(RSA.congruent(varX, varX), RSA.Thing(varX)), |
96 | // Simmetry | 96 | // Simmetry |
97 | Rule.create(RSA.EquivTo(varY, varX), RSA.EquivTo(varX, varY)), | 97 | Rule.create(RSA.congruent(varY, varX), RSA.congruent(varX, varY)), |
98 | // Transitivity | 98 | // Transitivity |
99 | Rule.create( | 99 | Rule.create( |
100 | RSA.EquivTo(varX, varZ), | 100 | RSA.congruent(varX, varZ), |
101 | RSA.EquivTo(varX, varY), | 101 | RSA.congruent(varX, varY), |
102 | RSA.EquivTo(varY, varZ) | 102 | RSA.congruent(varY, varZ) |
103 | ) | 103 | ) |
104 | ) | 104 | ) |
105 | } | 105 | } |
diff --git a/src/main/scala/rsacomb/FilteringProgram.scala b/src/main/scala/rsacomb/FilteringProgram.scala index 5aaf5b0..c82dcb6 100644 --- a/src/main/scala/rsacomb/FilteringProgram.scala +++ b/src/main/scala/rsacomb/FilteringProgram.scala | |||
@@ -159,7 +159,7 @@ class FilteringProgram(query: SelectQuery, constants: List[Term]) | |||
159 | RSA(bounded.indexOf(role1.getArguments.get(2))), | 159 | RSA(bounded.indexOf(role1.getArguments.get(2))), |
160 | RSA(bounded.indexOf(role2.getArguments.get(2))) | 160 | RSA(bounded.indexOf(role2.getArguments.get(2))) |
161 | ), | 161 | ), |
162 | not(RSA.EquivTo(role1.getArguments.get(0), role2.getArguments.get(0))) | 162 | not(RSA.congruent(role1.getArguments.get(0), role2.getArguments.get(0))) |
163 | ) | 163 | ) |
164 | val r4b = for { | 164 | val r4b = for { |
165 | role1 <- body.filter(_.isRoleAssertion) | 165 | role1 <- body.filter(_.isRoleAssertion) |
@@ -174,7 +174,7 @@ class FilteringProgram(query: SelectQuery, constants: List[Term]) | |||
174 | RSA(bounded.indexOf(role1.getArguments.get(2))), | 174 | RSA(bounded.indexOf(role1.getArguments.get(2))), |
175 | RSA(bounded.indexOf(role2.getArguments.get(0))) | 175 | RSA(bounded.indexOf(role2.getArguments.get(0))) |
176 | ), | 176 | ), |
177 | not(RSA.EquivTo(role1.getArguments.get(0), role2.getArguments.get(2))) | 177 | not(RSA.congruent(role1.getArguments.get(0), role2.getArguments.get(2))) |
178 | ) | 178 | ) |
179 | val r4c = for { | 179 | val r4c = for { |
180 | role1 <- body.filter(_.isRoleAssertion) | 180 | role1 <- body.filter(_.isRoleAssertion) |
@@ -189,7 +189,7 @@ class FilteringProgram(query: SelectQuery, constants: List[Term]) | |||
189 | RSA(bounded.indexOf(role1.getArguments.get(0))), | 189 | RSA(bounded.indexOf(role1.getArguments.get(0))), |
190 | RSA(bounded.indexOf(role2.getArguments.get(0))) | 190 | RSA(bounded.indexOf(role2.getArguments.get(0))) |
191 | ), | 191 | ), |
192 | not(RSA.EquivTo(role1.getArguments.get(2), role2.getArguments.get(2))) | 192 | not(RSA.congruent(role1.getArguments.get(2), role2.getArguments.get(2))) |
193 | ) | 193 | ) |
194 | 194 | ||
195 | /* Rules 5x */ | 195 | /* Rules 5x */ |
@@ -215,7 +215,7 @@ class FilteringProgram(query: SelectQuery, constants: List[Term]) | |||
215 | RSA(bounded indexOf role1arg2), | 215 | RSA(bounded indexOf role1arg2), |
216 | RSA(bounded indexOf role2arg2) | 216 | RSA(bounded indexOf role2arg2) |
217 | ), | 217 | ), |
218 | RSA.EquivTo(role1arg0, role2arg0), | 218 | RSA.congruent(role1arg0, role2arg0), |
219 | not(RSA.NI(role1arg0)) | 219 | not(RSA.NI(role1arg0)) |
220 | ) | 220 | ) |
221 | val r5b = for { | 221 | val r5b = for { |
@@ -240,7 +240,7 @@ class FilteringProgram(query: SelectQuery, constants: List[Term]) | |||
240 | RSA(bounded indexOf role1arg2), | 240 | RSA(bounded indexOf role1arg2), |
241 | RSA(bounded indexOf role2arg0) | 241 | RSA(bounded indexOf role2arg0) |
242 | ), | 242 | ), |
243 | RSA.EquivTo(role1arg0, role2arg2), | 243 | RSA.congruent(role1arg0, role2arg2), |
244 | not(RSA.NI(role1arg0)) | 244 | not(RSA.NI(role1arg0)) |
245 | ) | 245 | ) |
246 | val r5c = for { | 246 | val r5c = for { |
@@ -265,7 +265,7 @@ class FilteringProgram(query: SelectQuery, constants: List[Term]) | |||
265 | RSA(bounded indexOf role1arg0), | 265 | RSA(bounded indexOf role1arg0), |
266 | RSA(bounded indexOf role2arg0) | 266 | RSA(bounded indexOf role2arg0) |
267 | ), | 267 | ), |
268 | RSA.EquivTo(role1arg2, role2arg2), | 268 | RSA.congruent(role1arg2, role2arg2), |
269 | not(RSA.NI(role1arg2)) | 269 | not(RSA.NI(role1arg2)) |
270 | ) | 270 | ) |
271 | 271 | ||
diff --git a/src/main/scala/rsacomb/RSA.scala b/src/main/scala/rsacomb/RSA.scala index 3a37a87..ab4f539 100644 --- a/src/main/scala/rsacomb/RSA.scala +++ b/src/main/scala/rsacomb/RSA.scala | |||
@@ -42,8 +42,8 @@ object RSA { | |||
42 | 42 | ||
43 | def notIn(t: Term)(implicit set: Term) = Negation.create(In(t)(set)) | 43 | def notIn(t: Term)(implicit set: Term) = Negation.create(In(t)(set)) |
44 | 44 | ||
45 | def EquivTo(t1: Term, t2: Term) = | 45 | def congruent(t1: Term, t2: Term) = |
46 | TupleTableAtom.rdf(t1, RSA("EquivTo"), t2) | 46 | TupleTableAtom.rdf(t1, RSA("congruent"), t2) |
47 | 47 | ||
48 | def QM(implicit variables: (List[Term], List[Term])) = { | 48 | def QM(implicit variables: (List[Term], List[Term])) = { |
49 | val (answer, bounded) = variables | 49 | val (answer, bounded) = variables |