Skip to content

Incremental unwinding of one specified loop #4361

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
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 7 additions & 0 deletions src/goto-symex/goto_symex.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,13 @@ class goto_symext
/// by the symbolic executions.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What exactly does "ignored" mean? Any why is this ever the right thing to do?

bool ignore_assertions = false;

virtual bool check_break(
const irep_idt &id,
bool is_function,
statet &state,
const exprt &cond,
unsigned unwind);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation?


protected:
/// The configuration to use for this symbolic execution
const symex_configt symex_config;
Expand Down
17 changes: 17 additions & 0 deletions src/goto-symex/symex_goto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ void goto_symext::symex_goto(statet &state)

if(should_stop_unwind(state.source, state.call_stack(), unwind))
{
// we break the loop
loop_bound_exceeded(state, new_guard);

// next instruction
Expand All @@ -297,6 +298,11 @@ void goto_symext::symex_goto(statet &state)

if(new_guard.is_true())
{
// we continue executing the loop
if(check_break(loop_id, false, state, new_guard, unwind))
{
should_pause_symex = true;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this only done in the new_guard.is_true() case? What about a non-constant guard for a backwards-goto?

symex_transition(state, goto_target, true);
return; // nothing else to do
}
Expand Down Expand Up @@ -516,6 +522,17 @@ void goto_symext::symex_goto(statet &state)
}
}

bool goto_symext::check_break(
const irep_idt &id,
bool is_function,
statet &state,
const exprt &cond,
unsigned unwind)
{
// dummy implementation
return false;
}

void goto_symext::merge_gotos(statet &state)
{
framet &frame = state.call_stack().top();
Expand Down