Skip to content

Commit

Permalink
bugfix in backtranslation (related to #596 (comment))
Browse files Browse the repository at this point in the history
  • Loading branch information
Heizmann committed Oct 1, 2022
1 parent cf36bb6 commit 37cc23f
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public ProductBacktranslator(final Class<? extends IIcfgTransition<IcfgLocation>
continue;
}
newTrace.add(mappedEdge);
addProgramState(i, newValues, programExecution.getProgramState(i));
addProgramState(newTrace.size() - 1, newValues, programExecution.getProgramState(i));
if (oldBranchEncoders != null) {
newBranchEncoders.add(oldBranchEncoders[i]);
}
Expand All @@ -98,7 +98,10 @@ public ProductBacktranslator(final Class<? extends IIcfgTransition<IcfgLocation>

private static void addProgramState(final Integer i, final Map<Integer, ProgramState<Term>> newValues,
final ProgramState<Term> programState) {
newValues.put(i, programState);
final ProgramState<Term> oldProgramState = newValues.put(i, programState);
if ((oldProgramState != null)) {
throw new AssertionError("Must not overwrite existing state.");
}
}

@Override
Expand Down

0 comments on commit 37cc23f

Please sign in to comment.