Skip to content

Commit 409f97e

Browse files
author
Daniel Kroening
authored
Merge pull request #630 from lucasccordeiro/fix-full-slice-01
Fixed test cases slice02 and slice14 from goto-instrument regression
2 parents 415c324 + 211cb90 commit 409f97e

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

regression/goto-instrument/slice02/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
KNOWNBUG
1+
CORE
22
main.c
33
--pointer-check --full-slice
44
^EXIT=0$

regression/goto-instrument/slice14/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
KNOWNBUG
1+
CORE
22
main.c
33
--pointer-check --full-slice
44
^EXIT=10$

src/cbmc/cbmc_parse_options.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -900,13 +900,6 @@ bool cbmc_parse_optionst::process_goto_program(
900900
// Similar removal of RTTI inspection:
901901
remove_instanceof(symbol_table, goto_functions);
902902

903-
// full slice?
904-
if(cmdline.isset("full-slice"))
905-
{
906-
status() << "Performing a full slice" << eom;
907-
full_slicer(goto_functions, ns);
908-
}
909-
910903
// do partial inlining
911904
status() << "Partial Inlining" << eom;
912905
goto_partial_inline(goto_functions, ns, ui_message_handler);
@@ -920,6 +913,14 @@ bool cbmc_parse_optionst::process_goto_program(
920913
// add generic checks
921914
status() << "Generic Property Instrumentation" << eom;
922915
goto_check(ns, options, goto_functions);
916+
917+
// full slice?
918+
if(cmdline.isset("full-slice"))
919+
{
920+
status() << "Performing a full slice" << eom;
921+
full_slicer(goto_functions, ns);
922+
}
923+
923924
// checks don't know about adjusted float expressions
924925
adjust_float_expressions(goto_functions, ns);
925926

src/goto-instrument/goto_instrument_parse_options.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,6 +1432,7 @@ void goto_instrument_parse_optionst::instrument_goto_program()
14321432
// full slice?
14331433
if(cmdline.isset("full-slice"))
14341434
{
1435+
remove_returns(symbol_table, goto_functions);
14351436
do_indirect_call_and_rtti_removal();
14361437

14371438
status() << "Performing a full slice" << eom;

0 commit comments

Comments
 (0)