Skip to content

Commit 09e1041

Browse files
committed
pretty-print expression instructions
This adds pretty-printing for goto-program expression instructions.
1 parent c00319e commit 09e1041

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

regression/goto-instrument/remove-calls-no-body2/test.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ main.c
66
^VERIFICATION SUCCESSFUL$
77
func3\(\)
88
func4\(\)
9-
567\)
10-
285\)
9+
567$
10+
285$
1111
ret1 :=.*nondet.*
1212
--
1313
func1\(.*\)

src/goto-programs/goto_program.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ std::ostream &goto_programt::instructiont::output(std::ostream &out) const
124124
<< '\n';
125125
break;
126126
}
127+
else if(code.get_statement() == ID_expression)
128+
{
129+
out << "EXPRESSION " << format(code.op0()) << '\n';
130+
break;
131+
}
127132
else if(code.get_statement() == ID_havoc_object)
128133
{
129134
out << "HAVOC_OBJECT " << format(code.op0()) << '\n';

0 commit comments

Comments
 (0)