Skip to content

Commit be9135c

Browse files
Add function for reverting formula slicing
This functionality is necessary to use slicing of symex_target_equationt in combination with incremental unwinding. Assertions in future unwindings may depend on steps that have been sliced away in previous unwindings. Thus, we have to undo and recompute the slice.
1 parent 5530ca3 commit be9135c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/goto-symex/slice.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,3 +262,12 @@ void simple_slice(symex_target_equationt &equation)
262262
s_it->ignore=true;
263263
}
264264
}
265+
266+
void revert_slice(symex_target_equationt &equation)
267+
{
268+
// set ignore to false
269+
for(auto step : equation.SSA_steps)
270+
{
271+
step.ignore = false;
272+
}
273+
}

src/goto-symex/slice.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ Author: Daniel Kroening, [email protected]
1919
// slice an equation with respect to the assertions contained therein
2020
void slice(symex_target_equationt &equation);
2121

22+
/// Undo whatever has been done by `slice`
23+
void revert_slice(symex_target_equationt &);
24+
2225
// this simply slices away anything after the last assertion
2326
void simple_slice(symex_target_equationt &equation);
2427

0 commit comments

Comments
 (0)