diff options
| author | Federico Igne <federico.igne@cs.ox.ac.uk> | 2021-04-05 13:14:00 +0100 |
|---|---|---|
| committer | Federico Igne <federico.igne@cs.ox.ac.uk> | 2021-04-05 13:14:00 +0100 |
| commit | b622e151905d9a3b8fff14748cc840696dc85f16 (patch) | |
| tree | bed37dc1243d7f6926560ff7fed0a10d943a875a /src/test/scala/uk | |
| parent | 4879515113b2bc107ee0e35ad164de42f6c0d059 (diff) | |
| download | RSAComb-b622e151905d9a3b8fff14748cc840696dc85f16.tar.gz RSAComb-b622e151905d9a3b8fff14748cc840696dc85f16.zip | |
Add shifting for disjunction in the rhs of an axiom
Diffstat (limited to 'src/test/scala/uk')
| -rw-r--r-- | src/test/scala/uk/ac/ox/cs/rsacomb/converter/NormalizerSpec.scala | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/scala/uk/ac/ox/cs/rsacomb/converter/NormalizerSpec.scala b/src/test/scala/uk/ac/ox/cs/rsacomb/converter/NormalizerSpec.scala index 3a686c0..7f0f720 100644 --- a/src/test/scala/uk/ac/ox/cs/rsacomb/converter/NormalizerSpec.scala +++ b/src/test/scala/uk/ac/ox/cs/rsacomb/converter/NormalizerSpec.scala | |||
| @@ -73,6 +73,27 @@ class NormalizerSpec extends AnyFlatSpec with Matchers with LoneElement { | |||
| 73 | ).flatMap(normalizer.normalize) | 73 | ).flatMap(normalizer.normalize) |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | "Disjunction on the rhs" should "be shifted" in { | ||
| 77 | def cls(n: Int) = factory.getOWLClass(s"_:class$n") | ||
| 78 | val axiom1 = | ||
| 79 | factory.getOWLSubClassOfAxiom( | ||
| 80 | factory.getOWLObjectIntersectionOf(cls(1), cls(2), cls(3)), | ||
| 81 | factory.getOWLObjectUnionOf(cls(4), cls(5)) | ||
| 82 | ) | ||
| 83 | val axiom2 = | ||
| 84 | factory.getOWLSubClassOfAxiom( | ||
| 85 | cls(1), | ||
| 86 | factory.getOWLObjectUnionOf(cls(2), cls(3), cls(4)) | ||
| 87 | ) | ||
| 88 | val axiom3 = | ||
| 89 | factory.getOWLSubClassOfAxiom( | ||
| 90 | factory.getOWLObjectIntersectionOf(cls(1), cls(2), cls(3)), | ||
| 91 | factory.getOWLObjectUnionOf(cls(4)) | ||
| 92 | ) | ||
| 93 | normalizer.normalize(axiom1) should have length 5 | ||
| 94 | normalizer.normalize(axiom2) should have length 5 | ||
| 95 | normalizer.normalize(axiom3) should have length 4 | ||
| 96 | } | ||
| 76 | //"A class name" should "be converted into a single atom" in { | 97 | //"A class name" should "be converted into a single atom" in { |
| 77 | // val cls = factory.getOWLClass(iriString0) | 98 | // val cls = factory.getOWLClass(iriString0) |
| 78 | // val atom = TupleTableAtom.rdf(term0, IRI.RDF_TYPE, IRI.create(iriString0)) | 99 | // val atom = TupleTableAtom.rdf(term0, IRI.RDF_TYPE, IRI.create(iriString0)) |
