diff options
author | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-12-04 14:00:21 +0000 |
---|---|---|
committer | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-12-04 16:51:38 +0000 |
commit | ec76d6cfbf5410fc90060667612461c1e8f3c111 (patch) | |
tree | 6d3268ba7116c2aad3c7238500e87bb990d31a27 /src/main/scala/uk/ac/ox/cs/rsacomb/CanonicalModel.scala | |
parent | d7fa665c289923c362c17ce16cda03588911a817 (diff) | |
download | RSAComb-ec76d6cfbf5410fc90060667612461c1e8f3c111.tar.gz RSAComb-ec76d6cfbf5410fc90060667612461c1e8f3c111.zip |
Rework skolemization strategies
In particular `ConstantRSA` has been removed, since it was *not* a
skolemization strategy. The case for extra atoms generation previously
handled by `ConstantRSA` is not dealt with inside the RSA check.
Diffstat (limited to 'src/main/scala/uk/ac/ox/cs/rsacomb/CanonicalModel.scala')
-rw-r--r-- | src/main/scala/uk/ac/ox/cs/rsacomb/CanonicalModel.scala | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/main/scala/uk/ac/ox/cs/rsacomb/CanonicalModel.scala b/src/main/scala/uk/ac/ox/cs/rsacomb/CanonicalModel.scala index bcc336a..c605e51 100644 --- a/src/main/scala/uk/ac/ox/cs/rsacomb/CanonicalModel.scala +++ b/src/main/scala/uk/ac/ox/cs/rsacomb/CanonicalModel.scala | |||
@@ -24,12 +24,7 @@ import tech.oxfordsemantic.jrdfox.logic.expression.{ | |||
24 | IRI | 24 | IRI |
25 | } | 25 | } |
26 | 26 | ||
27 | import uk.ac.ox.cs.rsacomb.converter.{ | 27 | import uk.ac.ox.cs.rsacomb.converter._ |
28 | SkolemStrategy, | ||
29 | RDFoxConverter | ||
30 | // RDFoxAxiomConverter, | ||
31 | // RDFoxPropertyExprConverter | ||
32 | } | ||
33 | import uk.ac.ox.cs.rsacomb.suffix._ | 28 | import uk.ac.ox.cs.rsacomb.suffix._ |
34 | import uk.ac.ox.cs.rsacomb.util.RSA | 29 | import uk.ac.ox.cs.rsacomb.util.RSA |
35 | 30 | ||
@@ -114,10 +109,8 @@ class CanonicalModel(val ontology: RSAOntology) { | |||
114 | val (facts, rules) = { | 109 | val (facts, rules) = { |
115 | val term = RSAOntology.genFreshVariable() | 110 | val term = RSAOntology.genFreshVariable() |
116 | val unsafe = ontology.unsafeRoles | 111 | val unsafe = ontology.unsafeRoles |
117 | val skolem = SkolemStrategy.None | ||
118 | val suffix = Empty | ||
119 | ontology.axioms | 112 | ontology.axioms |
120 | .map(CanonicalModelConverter.convert(_, term, unsafe, skolem, suffix)) | 113 | .map(CanonicalModelConverter.convert(_, term, unsafe, NoSkolem, Empty)) |
121 | .unzip | 114 | .unzip |
122 | } | 115 | } |
123 | ( | 116 | ( |
@@ -245,10 +238,9 @@ class CanonicalModel(val ontology: RSAOntology) { | |||
245 | 238 | ||
246 | case a: OWLSubClassOfAxiom if a.isT5 => { | 239 | case a: OWLSubClassOfAxiom if a.isT5 => { |
247 | val role = axiom.objectPropertyExpressionsInSignature(0) | 240 | val role = axiom.objectPropertyExpressionsInSignature(0) |
248 | if (unsafe contains role) { | 241 | if (unsafe contains role) |
249 | val skolem = SkolemStrategy.Standard(a.toString) | 242 | super.convert(a, term, unsafe, new Standard(a), Forward) |
250 | super.convert(a, term, unsafe, skolem, Forward) | 243 | else { |
251 | } else { | ||
252 | val (f1, r1) = rules1(a) | 244 | val (f1, r1) = rules1(a) |
253 | (f1, r1 ::: rules2(a) ::: rules3(a)) | 245 | (f1, r1 ::: rules2(a) ::: rules3(a)) |
254 | } | 246 | } |
@@ -256,9 +248,9 @@ class CanonicalModel(val ontology: RSAOntology) { | |||
256 | 248 | ||
257 | case a: OWLSubObjectPropertyOfAxiom => { | 249 | case a: OWLSubObjectPropertyOfAxiom => { |
258 | val (factsF, rulesF) = | 250 | val (factsF, rulesF) = |
259 | super.convert(a, term, unsafe, SkolemStrategy.None, Forward) | 251 | super.convert(a, term, unsafe, NoSkolem, Forward) |
260 | val (factsB, rulesB) = | 252 | val (factsB, rulesB) = |
261 | super.convert(a, term, unsafe, SkolemStrategy.None, Backward) | 253 | super.convert(a, term, unsafe, NoSkolem, Backward) |
262 | (factsF ::: factsB, rulesF ::: rulesB) | 254 | (factsF ::: factsB, rulesF ::: rulesB) |
263 | } | 255 | } |
264 | 256 | ||