aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFederico Igne <federico.igne@cs.ox.ac.uk>2020-10-23 12:32:46 +0200
committerFederico Igne <federico.igne@cs.ox.ac.uk>2020-10-23 12:32:46 +0200
commit66a8613560b3e13b4dde49a93b3fdeab4224d3cf (patch)
treec7e9fd2af871a029bba6e0debf798e9f42a9a5ff /src
parent87471bc45d1824cbef40dc1cfcc4e5e26e83dcea (diff)
downloadRSAComb-66a8613560b3e13b4dde49a93b3fdeab4224d3cf.tar.gz
RSAComb-66a8613560b3e13b4dde49a93b3fdeab4224d3cf.zip
Fix bug in computation of 'cycle' function
The ordering among triples that 'cycle' use to introduce new individuals is considering only triples involving safe roles. This was not the case for us and triples with unsafe roles where considered towards the generation of logic rules.
Diffstat (limited to 'src')
-rw-r--r--src/main/scala/rsacomb/RSAOntology.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/scala/rsacomb/RSAOntology.scala b/src/main/scala/rsacomb/RSAOntology.scala
index 9e45c28..b410bf0 100644
--- a/src/main/scala/rsacomb/RSAOntology.scala
+++ b/src/main/scala/rsacomb/RSAOntology.scala
@@ -301,8 +301,12 @@ trait RSAOntology {
301 .asScala 301 .asScala
302 for { 302 for {
303 axiom1 <- tbox 303 axiom1 <- tbox
304 // TODO: is this an optimization or an error?
304 if axiom1.isT5 305 if axiom1.isT5
305 roleS <- axiom1.objectPropertyExpressionsInSignature // Just 1 306 // We expect only one role coming out of a T5 axiom
307 roleS <- axiom1.objectPropertyExpressionsInSignature
308 // Triples ordering is among triples involving safe roles.
309 if !unsafeRoles.contains(roleS)
306 if conflR.contains(roleS) 310 if conflR.contains(roleS)
307 individual = 311 individual =
308 if (axiom.hashCode < axiom1.hashCode) { 312 if (axiom.hashCode < axiom1.hashCode) {