Skip to content

Commit f283180

Browse files
committed
renamed local variable to be distinct from global variable
1 parent 88db81a commit f283180

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Source/Model/Model.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ public Element TryGet(string varname)
874874
public void AddBinding(string varname, Element value)
875875
{
876876
vars.Add(varname);
877-
valuations.Add(varname, value);
877+
valuations.Add(varname, value); // SQ: exception occurs if a global variable and a local variable have the same name
878878
}
879879

880880
// Change name of the state

Test/civl/regression-tests/left-mover.bpl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// RUN: %parallel-boogie "%s" > "%t"
22
// RUN: %diff "%s.expect" "%t"
3-
// UNSUPPORTED: batch_mode
43

54
var {:layer 0,2} x : int;
65

@@ -33,7 +32,7 @@ asserts {:add_to_pool "A", i+1} true;
3332
assume j > i;
3433
}
3534

36-
pure action intro (x:int)
35+
pure action intro (k: int)
3736
{
38-
assume x == 0;
37+
assume k == 0;
3938
}

0 commit comments

Comments
 (0)