Skip to content

Commit 6678956

Browse files
author
martin
committed
More string abstraction to be common processing of goto-programs
In the case of goto-analyzer and goto-diff this should be dead code. In CBMC it reverses the order of string abstraction and non-det statics. It is conceivable that these two interact but this way around is probably better.
1 parent 87016cc commit 6678956

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

src/cbmc/cbmc_parse_options.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -957,6 +957,12 @@ bool cbmc_parse_optionst::process_goto_program(
957957
// checks don't know about adjusted float expressions
958958
adjust_float_expressions(goto_model);
959959

960+
if(options.get_bool_option("string-abstraction"))
961+
{
962+
log.status() << "String Abstraction" << messaget::eom;
963+
string_abstraction(goto_model, log.get_message_handler());
964+
}
965+
960966
// ignore default/user-specified initialization
961967
// of variables with static lifetime
962968
if(options.get_bool_option("nondet-static"))
@@ -967,12 +973,6 @@ bool cbmc_parse_optionst::process_goto_program(
967973
nondet_static(goto_model);
968974
}
969975

970-
if(options.get_bool_option("string-abstraction"))
971-
{
972-
log.status() << "String Abstraction" << messaget::eom;
973-
string_abstraction(goto_model, log.get_message_handler());
974-
}
975-
976976
// add failed symbols
977977
// needs to be done before pointer analysis
978978
add_failed_symbols(goto_model.symbol_table);

src/goto-analyzer/goto_analyzer_parse_options.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -913,6 +913,12 @@ bool goto_analyzer_parse_optionst::process_goto_program(
913913
// checks don't know about adjusted float expressions
914914
adjust_float_expressions(goto_model);
915915

916+
if(options.get_bool_option("string-abstraction"))
917+
{
918+
log.status() << "String Abstraction" << messaget::eom;
919+
string_abstraction(goto_model, log.get_message_handler());
920+
}
921+
916922
// recalculate numbers, etc.
917923
goto_model.goto_functions.update();
918924

src/goto-diff/goto_diff_parse_options.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,12 @@ bool goto_diff_parse_optionst::process_goto_program(
310310
// checks don't know about adjusted float expressions
311311
adjust_float_expressions(goto_model);
312312

313+
if(options.get_bool_option("string-abstraction"))
314+
{
315+
log.status() << "String Abstraction" << messaget::eom;
316+
string_abstraction(goto_model, log.get_message_handler());
317+
}
318+
313319
// recalculate numbers, etc.
314320
goto_model.goto_functions.update();
315321

0 commit comments

Comments
 (0)