From 66a8613560b3e13b4dde49a93b3fdeab4224d3cf Mon Sep 17 00:00:00 2001 From: Federico Igne Date: Fri, 23 Oct 2020 12:32:46 +0200 Subject: 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. --- src/main/scala/rsacomb/RSAOntology.scala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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 { .asScala for { axiom1 <- tbox + // TODO: is this an optimization or an error? if axiom1.isT5 - roleS <- axiom1.objectPropertyExpressionsInSignature // Just 1 + // We expect only one role coming out of a T5 axiom + roleS <- axiom1.objectPropertyExpressionsInSignature + // Triples ordering is among triples involving safe roles. + if !unsafeRoles.contains(roleS) if conflR.contains(roleS) individual = if (axiom.hashCode < axiom1.hashCode) { -- cgit v1.2.3