diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/scala/rsacomb/CanonicalModel.scala | 4 | ||||
-rw-r--r-- | src/main/scala/rsacomb/RSAOntology.scala | 9 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/main/scala/rsacomb/CanonicalModel.scala b/src/main/scala/rsacomb/CanonicalModel.scala index a248d61..c07fc06 100644 --- a/src/main/scala/rsacomb/CanonicalModel.scala +++ b/src/main/scala/rsacomb/CanonicalModel.scala | |||
@@ -86,10 +86,10 @@ class ProgramGenerator( | |||
86 | import RDFoxUtil._ | 86 | import RDFoxUtil._ |
87 | 87 | ||
88 | def rules1(axiom: OWLSubClassOfAxiom): List[Rule] = { | 88 | def rules1(axiom: OWLSubClassOfAxiom): List[Rule] = { |
89 | val unfold = ontology.cycle(axiom).toList | 89 | val unfold = ontology.unfold(axiom).toList |
90 | // Fresh Variables | 90 | // Fresh Variables |
91 | val v0 = IRI.create("v0_" ++ axiom.hashCode.toString) | 91 | val v0 = IRI.create("v0_" ++ axiom.hashCode.toString) |
92 | val varX = Variable.create("x") | 92 | val varX = Variable.create("X") |
93 | // Predicates | 93 | // Predicates |
94 | val atomA: Atom = { | 94 | val atomA: Atom = { |
95 | val cls = axiom.getSubClass.asInstanceOf[OWLClass].getIRI | 95 | val cls = axiom.getSubClass.asInstanceOf[OWLClass].getIRI |
diff --git a/src/main/scala/rsacomb/RSAOntology.scala b/src/main/scala/rsacomb/RSAOntology.scala index 2941440..9e45c28 100644 --- a/src/main/scala/rsacomb/RSAOntology.scala +++ b/src/main/scala/rsacomb/RSAOntology.scala | |||
@@ -264,10 +264,15 @@ trait RSAOntology { | |||
264 | .map(_.getInverseProperty) | 264 | .map(_.getInverseProperty) |
265 | 265 | ||
266 | invSuperRoles | 266 | invSuperRoles |
267 | .flatMap( | 267 | .flatMap(x => |
268 | reasoner.subObjectProperties(_).collect(Collectors.toSet()).asScala | 268 | reasoner |
269 | .subObjectProperties(x) | ||
270 | .collect(Collectors.toSet()) | ||
271 | .asScala | ||
272 | .addOne(x) | ||
269 | ) | 273 | ) |
270 | .filterNot(_.isOWLBottomObjectProperty()) | 274 | .filterNot(_.isOWLBottomObjectProperty()) |
275 | .filterNot(_.getInverseProperty.isOWLTopObjectProperty()) | ||
271 | } | 276 | } |
272 | 277 | ||
273 | def self(axiom: OWLSubClassOfAxiom): Set[Term] = { | 278 | def self(axiom: OWLSubClassOfAxiom): Set[Term] = { |