diff options
author | 2017-08-15 19:49:03 +0200 | |
---|---|---|
committer | 2017-08-15 19:49:03 +0200 | |
commit | 4e87ad2219cd888d94e5d2d85804d29cae3a79d8 (patch) | |
tree | dcfe039f8dcf6a24ca676fb132bef48c2e9a8cf3 /Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage | |
parent | Viatra Solver result support for primitive types (diff) | |
download | VIATRA-Generator-4e87ad2219cd888d94e5d2d85804d29cae3a79d8.tar.gz VIATRA-Generator-4e87ad2219cd888d94e5d2d85804d29cae3a79d8.tar.zst VIATRA-Generator-4e87ad2219cd888d94e5d2d85804d29cae3a79d8.zip |
Added known primitives to the scope
Diffstat (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage')
1 files changed, 9 insertions, 6 deletions
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 06215a2a..9ddee6a7 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 | |||
@@ -63,8 +63,9 @@ class PartialInterpretationInitialiser { | |||
63 | it.booleanelements += createBooleanElement => [it.name = "false" it.value = false it.valueSet = true] | 63 | it.booleanelements += createBooleanElement => [it.name = "false" it.value = false it.valueSet = true] |
64 | 64 | ||
65 | // Integers | 65 | // Integers |
66 | it.maxNewIntegers = typeScopes.numberOfUseableIntegers | 66 | it.maxNewIntegers = typeScopes.maxNewIntegers |
67 | for(integersInProblem : problem.eAllContents.toIterable.filter(IntLiteral).map[value].toSet) { | 67 | val knownIntegers = (typeScopes.knownIntegers + problem.eAllContents.toIterable.filter(IntLiteral).map[value]).toSet |
68 | for(integersInProblem : knownIntegers) { | ||
68 | it.integerelements += createIntegerElement => [it.name = '''«integersInProblem»''' it.value = integersInProblem it.valueSet = true] | 69 | it.integerelements += createIntegerElement => [it.name = '''«integersInProblem»''' it.value = integersInProblem it.valueSet = true] |
69 | } | 70 | } |
70 | if(maxNewIntegers>0) { | 71 | if(maxNewIntegers>0) { |
@@ -72,8 +73,9 @@ class PartialInterpretationInitialiser { | |||
72 | } | 73 | } |
73 | 74 | ||
74 | // Reals | 75 | // Reals |
75 | it.maxNewReals = typeScopes.numberOfUseableReals | 76 | it.maxNewReals = typeScopes.maxNewReals |
76 | for(realsInProblem : problem.eAllContents.toIterable.filter(RealLiteral).map[value].toSet) { | 77 | val knownReals = (typeScopes.knownReals + problem.eAllContents.toIterable.filter(RealLiteral).map[value]).toSet |
78 | for(realsInProblem : knownReals) { | ||
77 | it.realelements += createRealElement => [it.name = '''«realsInProblem»''' it.value = realsInProblem it.valueSet = true] | 79 | it.realelements += createRealElement => [it.name = '''«realsInProblem»''' it.value = realsInProblem it.valueSet = true] |
78 | } | 80 | } |
79 | if(maxNewReals>0) { | 81 | if(maxNewReals>0) { |
@@ -81,8 +83,9 @@ class PartialInterpretationInitialiser { | |||
81 | } | 83 | } |
82 | 84 | ||
83 | // Strings | 85 | // Strings |
84 | it.maxNewStrings = typeScopes.numberOfUseableStrings | 86 | it.maxNewStrings = typeScopes.maxNewStrings |
85 | for(stringsInProblem : problem.eAllContents.toIterable.filter(StringLiteral).map[value].toSet) { | 87 | val knownStrings = (typeScopes.knownStrings + problem.eAllContents.toIterable.filter(StringLiteral).map[value]).toSet |
88 | for(stringsInProblem : knownStrings) { | ||
86 | it.stringelement += createStringElement => [it.name = '''"«stringsInProblem»"''' it.value=stringsInProblem it.valueSet = true] | 89 | it.stringelement += createStringElement => [it.name = '''"«stringsInProblem»"''' it.value=stringsInProblem it.valueSet = true] |
87 | } | 90 | } |
88 | if(maxNewStrings>0) { | 91 | if(maxNewStrings>0) { |