diff options
author | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-09-07 17:55:34 +0200 |
---|---|---|
committer | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-09-07 17:55:34 +0200 |
commit | 3bc39ecf2eb168e1124bb123b9df0a8b933e6955 (patch) | |
tree | f92491ab1d0158a95ea831210f32f6c328464601 /src/main/scala/rsacomb/RDFoxClassExprConverter.scala | |
parent | d085aeae07a729467047aba50b22e9baa7a4d10f (diff) | |
download | RSAComb-3bc39ecf2eb168e1124bb123b9df0a8b933e6955.tar.gz RSAComb-3bc39ecf2eb168e1124bb123b9df0a8b933e6955.zip |
Introduce naive fresh variable generator
Diffstat (limited to 'src/main/scala/rsacomb/RDFoxClassExprConverter.scala')
-rw-r--r-- | src/main/scala/rsacomb/RDFoxClassExprConverter.scala | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main/scala/rsacomb/RDFoxClassExprConverter.scala b/src/main/scala/rsacomb/RDFoxClassExprConverter.scala index 467b3f1..a319d86 100644 --- a/src/main/scala/rsacomb/RDFoxClassExprConverter.scala +++ b/src/main/scala/rsacomb/RDFoxClassExprConverter.scala | |||
@@ -34,7 +34,7 @@ import org.semanticweb.owlapi.model.OWLObjectProperty | |||
34 | object RDFoxClassExprConverter { | 34 | object RDFoxClassExprConverter { |
35 | 35 | ||
36 | def apply( | 36 | def apply( |
37 | term: Term = Variable.create("x"), | 37 | term: Term, |
38 | skolem: SkolemStrategy = SkolemStrategy.None, | 38 | skolem: SkolemStrategy = SkolemStrategy.None, |
39 | unsafe: List[OWLObjectPropertyExpression] = List() | 39 | unsafe: List[OWLObjectPropertyExpression] = List() |
40 | ): RDFoxClassExprConverter = | 40 | ): RDFoxClassExprConverter = |
@@ -95,9 +95,7 @@ class RDFoxClassExprConverter( | |||
95 | 95 | ||
96 | // OWLObjectSomeValuesFrom | 96 | // OWLObjectSomeValuesFrom |
97 | override def visit(expr: OWLObjectSomeValuesFrom): RDFoxRuleShards = { | 97 | override def visit(expr: OWLObjectSomeValuesFrom): RDFoxRuleShards = { |
98 | // TODO: variables needs to be handled at visitor level. Hardcoding | 98 | val y = RSA.getFreshVariable() |
99 | // the name of the varibles might lead to errors for complex cases. | ||
100 | val y = Variable.create("y") | ||
101 | // Here we are assuming a role name | 99 | // Here we are assuming a role name |
102 | val prop = expr.getProperty() | 100 | val prop = expr.getProperty() |
103 | // Computes the result of rule skolemization. Depending on the used | 101 | // Computes the result of rule skolemization. Depending on the used |
@@ -141,7 +139,7 @@ class RDFoxClassExprConverter( | |||
141 | // OWLObjectMaxCardinality | 139 | // OWLObjectMaxCardinality |
142 | override def visit(expr: OWLObjectMaxCardinality): RDFoxRuleShards = { | 140 | override def visit(expr: OWLObjectMaxCardinality): RDFoxRuleShards = { |
143 | // TODO: again, no hardcoded variables | 141 | // TODO: again, no hardcoded variables |
144 | val vars = List(Variable.create("y"), Variable.create("z")) | 142 | val vars = List(RSA.getFreshVariable(), RSA.getFreshVariable()) |
145 | val classResult = RDFoxClassExprConverter.merge( | 143 | val classResult = RDFoxClassExprConverter.merge( |
146 | vars | 144 | vars |
147 | .map(new RDFoxClassExprConverter(_, skolem, unsafe)) | 145 | .map(new RDFoxClassExprConverter(_, skolem, unsafe)) |