Skip to content

[depends: #1330] Interpreter fixes #1274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/goto-instrument/goto_instrument_parse_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ int goto_instrument_parse_optionst::doit()
if(cmdline.isset("interpreter"))
{
status() << "Starting interpreter" << eom;
interpreter(symbol_table, goto_functions);
interpreter(symbol_table, goto_functions, get_message_handler());
return 0;
}

Expand Down
5 changes: 4 additions & 1 deletion src/goto-programs/goto_trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ void goto_trace_stept::output(
case goto_trace_stept::typet::ASSIGNMENT: out << "ASSIGNMENT"; break;
case goto_trace_stept::typet::GOTO: out << "GOTO"; break;
case goto_trace_stept::typet::DECL: out << "DECL"; break;
case goto_trace_stept::typet::DEAD: out << "DEAD"; break;
case goto_trace_stept::typet::OUTPUT: out << "OUTPUT"; break;
case goto_trace_stept::typet::INPUT: out << "INPUT"; break;
case goto_trace_stept::typet::ATOMIC_BEGIN: out << "ATOMC_BEGIN"; break;
Expand All @@ -53,7 +54,9 @@ void goto_trace_stept::output(
case goto_trace_stept::typet::FUNCTION_CALL: out << "FUNCTION CALL"; break;
case goto_trace_stept::typet::FUNCTION_RETURN:
out << "FUNCTION RETURN"; break;
default: UNREACHABLE;
default:
out << "unknown type: " << static_cast<int>(type) << std::endl;
UNREACHABLE;
}

if(type==typet::ASSERT || type==typet::ASSUME || type==typet::GOTO)
Expand Down
7 changes: 7 additions & 0 deletions src/goto-programs/goto_trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@ class goto_tracet
steps.push_back(step);
}

// retrieves the final step in the trace for manipulation
// (used to fill a trace from code, hence non-const)
inline goto_trace_stept &get_last_step()
{
return steps.back();
}

// delete all steps after (not including) s
void trim_after(stepst::iterator s)
{
Expand Down
Loading