diff options
author | 2020-05-07 17:26:07 +0200 | |
---|---|---|
committer | 2020-05-07 17:26:07 +0200 | |
commit | 6a3ff9bb588bf47242a56b91e35479dbba38eb19 (patch) | |
tree | 0432ecd0edafb99dc9f017d0a8cfee31a931583a /Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme | |
parent | Fix concurrency bug in AlloyHandler (diff) | |
download | VIATRA-Generator-6a3ff9bb588bf47242a56b91e35479dbba38eb19.tar.gz VIATRA-Generator-6a3ff9bb588bf47242a56b91e35479dbba38eb19.tar.zst VIATRA-Generator-6a3ff9bb588bf47242a56b91e35479dbba38eb19.zip |
Scope unsat benchmarks
Diffstat (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme')
1 files changed, 4 insertions, 5 deletions
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/NeighbourhoodBasedStateCoderFactory.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/NeighbourhoodBasedStateCoderFactory.xtend index 5e442ca7..f19ac30f 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/NeighbourhoodBasedStateCoderFactory.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/NeighbourhoodBasedStateCoderFactory.xtend | |||
@@ -59,15 +59,14 @@ class NeighbourhoodBasedPartialInterpretationStateCoder<ModelRep, NodeRep> exten | |||
59 | override doCreateActivationCode(IPatternMatch match) { | 59 | override doCreateActivationCode(IPatternMatch match) { |
60 | val size = match.specification.parameters.size | 60 | val size = match.specification.parameters.size |
61 | val res = new ArrayList(size) | 61 | val res = new ArrayList(size) |
62 | var int index = 0 | ||
63 | var int equivalenceHash = 0 | 62 | var int equivalenceHash = 0 |
64 | val prime = 31 | 63 | val prime = 31 |
65 | 64 | ||
66 | while (index < size) { | 65 | for (var int index = 0; index < size; index++) { |
67 | res.add(getCode(match.get(index))) | 66 | val matchArgument = match.get(index) |
68 | index++ | 67 | res.add(getCode(matchArgument)) |
69 | for (var i = 0; i < index; i++) { | 68 | for (var i = 0; i < index; i++) { |
70 | val number = if (match.get(index) === match.get(i)) { | 69 | val number = if (matchArgument === match.get(i)) { |
71 | 1 | 70 | 1 |
72 | } else { | 71 | } else { |
73 | 0 | 72 | 0 |