diff options
| author | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-08-11 13:07:55 +0100 |
|---|---|---|
| committer | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-08-11 13:07:55 +0100 |
| commit | 09cd0c4b916fb111d586f622ebe57801db5fc36a (patch) | |
| tree | 3df27964ebb6761fe40335f8d6b46995bb78b70b /src/main/scala/rsacomb/RSAOntology.scala | |
| parent | e1e0bf5c2d634c4b2e5350614625996e843e2e9a (diff) | |
| download | RSAComb-09cd0c4b916fb111d586f622ebe57801db5fc36a.tar.gz RSAComb-09cd0c4b916fb111d586f622ebe57801db5fc36a.zip | |
Fix role unsafety check
We now check that the existential expression in the axiom of type T3 is
not top.
Diffstat (limited to 'src/main/scala/rsacomb/RSAOntology.scala')
| -rw-r--r-- | src/main/scala/rsacomb/RSAOntology.scala | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/main/scala/rsacomb/RSAOntology.scala b/src/main/scala/rsacomb/RSAOntology.scala index 92be118..3b08e61 100644 --- a/src/main/scala/rsacomb/RSAOntology.scala +++ b/src/main/scala/rsacomb/RSAOntology.scala | |||
| @@ -108,9 +108,6 @@ trait RSAOntology { | |||
| 108 | * For all roles r1 appearing in an axiom of type T5, r1 is unsafe | 108 | * For all roles r1 appearing in an axiom of type T5, r1 is unsafe |
| 109 | * if there exists a role r2 (different from top) appearing in an axiom | 109 | * if there exists a role r2 (different from top) appearing in an axiom |
| 110 | * of type T3 and r1 is a subproperty of the inverse of r2. | 110 | * of type T3 and r1 is a subproperty of the inverse of r2. |
| 111 | * | ||
| 112 | * TODO: We are not checking whether the class expression on the right in T3 | ||
| 113 | * is top. For now we can assume it is always the case. | ||
| 114 | */ | 111 | */ |
| 115 | val unsafe1 = for { | 112 | val unsafe1 = for { |
| 116 | axiom <- tbox | 113 | axiom <- tbox |
| @@ -119,7 +116,7 @@ trait RSAOntology { | |||
| 119 | roleSuper = role1 +: reasoner.superObjectProperties(role1).collect(Collectors.toList()).asScala | 116 | roleSuper = role1 +: reasoner.superObjectProperties(role1).collect(Collectors.toList()).asScala |
| 120 | roleSuperInv = roleSuper.map(_.getInverseProperty) | 117 | roleSuperInv = roleSuper.map(_.getInverseProperty) |
| 121 | axiom <- tbox | 118 | axiom <- tbox |
| 122 | if axiom.isT3 | 119 | if axiom.isT3 && !axiom.isT3top |
| 123 | role2 <- axiom.objectPropertyExpressionsInSignature | 120 | role2 <- axiom.objectPropertyExpressionsInSignature |
| 124 | if roleSuperInv.contains(role2) | 121 | if roleSuperInv.contains(role2) |
| 125 | } yield role1 | 122 | } yield role1 |
