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 | |
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')
3 files changed, 7 insertions, 4 deletions
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/META-INF/MANIFEST.MF b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/META-INF/MANIFEST.MF index 0241969b..acaf466f 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/META-INF/MANIFEST.MF +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/META-INF/MANIFEST.MF | |||
@@ -4,8 +4,8 @@ Bundle-Name: Logic2viatra | |||
4 | Bundle-SymbolicName: hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatraquery;singleton:=true | 4 | Bundle-SymbolicName: hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatraquery;singleton:=true |
5 | Bundle-Version: 1.0.0.qualifier | 5 | Bundle-Version: 1.0.0.qualifier |
6 | Export-Package: hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra, | 6 | Export-Package: hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra, |
7 | hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns, | 7 | hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns, |
8 | hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.queries | 8 | hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.queries |
9 | Require-Bundle: hu.bme.mit.inf.dslreasoner.logic.model;bundle-version="1.0.0", | 9 | Require-Bundle: hu.bme.mit.inf.dslreasoner.logic.model;bundle-version="1.0.0", |
10 | hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage;bundle-version="1.0.0", | 10 | hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage;bundle-version="1.0.0", |
11 | hu.bme.mit.inf.dslreasoner.ecore2logic;bundle-version="1.0.0", | 11 | hu.bme.mit.inf.dslreasoner.ecore2logic;bundle-version="1.0.0", |
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 |