diff options
author | 2018-11-07 12:57:05 +0100 | |
---|---|---|
committer | 2018-11-07 12:57:05 +0100 | |
commit | f0537e4b36cb15d7806b671317ee48e84878f5af (patch) | |
tree | 45221eb1709615dd97b877996d40e58ca2c5a472 /Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver | |
parent | Fixed xmi generation with attributes. Added better error messages. (diff) | |
download | VIATRA-Generator-f0537e4b36cb15d7806b671317ee48e84878f5af.tar.gz VIATRA-Generator-f0537e4b36cb15d7806b671317ee48e84878f5af.tar.zst VIATRA-Generator-f0537e4b36cb15d7806b671317ee48e84878f5af.zip |
some missing string support bugs in partial interpretation are fixed
Diffstat (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver')
2 files changed, 5 insertions, 2 deletions
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/PartialInterpretation2Logic.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/PartialInterpretation2Logic.xtend index bba4ae92..f15f5787 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/PartialInterpretation2Logic.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/PartialInterpretation2Logic.xtend | |||
@@ -27,6 +27,7 @@ import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.par | |||
27 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BooleanElement | 27 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BooleanElement |
28 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.IntegerElement | 28 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.IntegerElement |
29 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RealElement | 29 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RealElement |
30 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.StringElement | ||
30 | 31 | ||
31 | @Data class PartialInterpretation2Logic_Trace { | 32 | @Data class PartialInterpretation2Logic_Trace { |
32 | Map<DefinedElement,DefinedElement> new2Old = new HashMap | 33 | Map<DefinedElement,DefinedElement> new2Old = new HashMap |
@@ -157,7 +158,6 @@ class PartialInterpretation2Logic { | |||
157 | p.add(assertion) | 158 | p.add(assertion) |
158 | p.annotations+= ^annotation | 159 | p.annotations+= ^annotation |
159 | } | 160 | } |
160 | |||
161 | } | 161 | } |
162 | 162 | ||
163 | def private createLink(RelationLink link, SymbolicDeclaration relationDeclaration) { | 163 | def private createLink(RelationLink link, SymbolicDeclaration relationDeclaration) { |
@@ -183,6 +183,9 @@ class PartialInterpretation2Logic { | |||
183 | def private dispatch createValueInLink(RealElement element) { | 183 | def private dispatch createValueInLink(RealElement element) { |
184 | return element.value.asTerm | 184 | return element.value.asTerm |
185 | } | 185 | } |
186 | def private dispatch createValueInLink(StringElement element) { | ||
187 | return element.value.asTerm | ||
188 | } | ||
186 | def private dispatch createValueInLink(DefinedElement element) { | 189 | def private dispatch createValueInLink(DefinedElement element) { |
187 | return createSymbolicValue => [it.symbolicReference = element] | 190 | return createSymbolicValue => [it.symbolicReference = element] |
188 | } | 191 | } |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/PartialInterpretationInitialiser.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/PartialInterpretationInitialiser.xtend index d0fdeac4..f7a1ce4f 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/PartialInterpretationInitialiser.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/PartialInterpretationInitialiser.xtend | |||
@@ -246,7 +246,7 @@ class PartialInterpretationInitialiser { | |||
246 | #[assertion] | 246 | #[assertion] |
247 | } else if(assertion instanceof And){ | 247 | } else if(assertion instanceof And){ |
248 | val res = assertion.operands.filter(SymbolicValue) | 248 | val res = assertion.operands.filter(SymbolicValue) |
249 | if(res.size != assertion.operands) { | 249 | if(res.size != assertion.operands.size) { |
250 | throw new UnsupportedOperationException('''Assertion describing partial model of "«r.interpretationOf.name»" contains unsupported constructs''') | 250 | throw new UnsupportedOperationException('''Assertion describing partial model of "«r.interpretationOf.name»" contains unsupported constructs''') |
251 | } else { | 251 | } else { |
252 | res | 252 | res |