Skip to content

Commit 547f73a

Browse files
committed
Fix CBMC counterexample translation
1 parent ac14bed commit 547f73a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

cex.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,19 @@ def fmt(match, store_name, tid):
3838
# endline = " " if not(init) and store_name == "L" else "\n"
3939
return f"\n{agent}\t{assign}"
4040
is_attr = ATTR.match(var)
41+
is_env = ENV.match(var)
42+
is_lstig = LSTIG.match(var)
43+
is_ltstamp = LTSTAMP.match(var)
4144
if is_attr and info.i:
4245
return fmt(is_attr, "I", tid)
43-
is_env = ENV.match(var)
44-
if is_env:
46+
elif is_env:
4547
return fmt(is_env, "E", tid)
46-
is_lstig = LSTIG.match(var)
47-
if is_lstig:
48+
elif is_lstig:
4849
return fmt(is_lstig, "L", tid)
49-
is_ltstamp = LTSTAMP.match(var)
50-
if is_ltstamp:
50+
elif is_ltstamp:
5151
return f" [{value}]"
52+
else:
53+
return f"cannot match {var}, {value}\n"
5254
return None
5355

5456
STATE, FILE, FN, LINE, THREAD = (

0 commit comments

Comments
 (0)