@@ -81,32 +81,8 @@ get_checked_pointer_from_null_pointer_check(const exprt &violation)
8181 UNREACHABLE;
8282}
8383
84- optionst cegis_verifiert::get_options ()
84+ void cegis_verifiert::preprocess_goto_model ()
8585{
86- optionst options;
87-
88- // Default options
89- // These options are the same as we run CBMC without any set flag.
90- options.set_option (" built-in-assertions" , true );
91- options.set_option (" propagation" , true );
92- options.set_option (" simple-slice" , true );
93- options.set_option (" simplify" , true );
94- options.set_option (" show-goto-symex-steps" , false );
95- options.set_option (" show-points-to-sets" , false );
96- options.set_option (" show-array-constraints" , false );
97- options.set_option (" built-in-assertions" , true );
98- options.set_option (" assertions" , true );
99- options.set_option (" assumptions" , true );
100- options.set_option (" arrays-uf" , " auto" );
101- options.set_option (" depth" , UINT32_MAX);
102- options.set_option (" exploration-strategy" , " lifo" );
103- options.set_option (" symex-cache-dereferences" , false );
104- options.set_option (" rewrite-union" , true );
105- options.set_option (" self-loops-to-assumptions" , true );
106-
107- // Generating trace for counterexamples.
108- options.set_option (" trace" , true );
109-
11086 // Preprocess `goto_model`. Copied from `cbmc_parse_options.cpp`.
11187 remove_asm (goto_model);
11288 link_to_library (
@@ -119,7 +95,6 @@ optionst cegis_verifiert::get_options()
11995
12096 remove_skip (goto_model);
12197 label_properties (goto_model);
122- return options;
12398}
12499
125100cext::violation_typet
@@ -203,7 +178,6 @@ std::list<loop_idt> cegis_verifiert::get_cause_loop_id(
203178 std::list<loop_idt> result;
204179
205180 // build the dependence graph
206- const namespacet ns (goto_model.symbol_table );
207181 dependence_grapht dependence_graph (ns);
208182 dependence_graph (goto_model);
209183
@@ -382,8 +356,6 @@ cext cegis_verifiert::build_cex(
382356 const goto_tracet &goto_trace,
383357 const source_locationt &loop_entry_loc)
384358{
385- const namespacet ns (goto_model.symbol_table );
386-
387359 // Valuations of havoced variables right after havoc instructions.
388360 std::unordered_map<exprt, mp_integer, irep_hash> object_sizes;
389361 std::unordered_map<exprt, mp_integer, irep_hash> havoced_values;
@@ -588,8 +560,6 @@ optionalt<cext> cegis_verifiert::verify()
588560 // 3. construct the formatted counterexample from the violated property and
589561 // its trace.
590562
591- const namespacet ns (goto_model.symbol_table );
592-
593563 // Store the original functions. We will restore them after the verification.
594564 for (const auto &fun_entry : goto_model.goto_functions .function_map )
595565 {
@@ -618,7 +588,7 @@ optionalt<cext> cegis_verifiert::verify()
618588 // Get the checker same as CBMC api without any flag.
619589 // TODO: replace the checker with CBMC api once it is implemented.
620590 ui_message_handlert ui_message_handler (log.get_message_handler ());
621- const auto options = get_options ();
591+ preprocess_goto_model ();
622592 std::unique_ptr<
623593 all_properties_verifier_with_trace_storaget<multi_path_symex_checkert>>
624594 checker = util_make_unique<
0 commit comments