@@ -133,57 +133,7 @@ void api_sessiont::load_model_from_files(
133133 files, *implementation->message_handler , *implementation->options ));
134134}
135135
136- void api_sessiont::verify_model () const
137- {
138- PRECONDITION (implementation->model );
139-
140- // Remove inline assembler; this needs to happen before adding the library.
141- remove_asm (*implementation->model );
142-
143- // add the library
144- messaget log{*implementation->message_handler };
145- log.status () << " Adding CPROVER library (" << config.ansi_c .arch << " )"
146- << messaget::eom;
147- link_to_library (
148- *implementation->model ,
149- *implementation->message_handler ,
150- cprover_c_library_factory);
151-
152- // Common removal of types and complex constructs
153- if (::process_goto_program (
154- *implementation->model , *implementation->options , log))
155- {
156- return ;
157- }
158-
159- // add failed symbols
160- // needs to be done before pointer analysis
161- add_failed_symbols (implementation->model ->symbol_table );
162-
163- // label the assertions
164- // This must be done after adding assertions and
165- // before using the argument of the "property" option.
166- // Do not re-label after using the property slicer because
167- // this would cause the property identifiers to change.
168- label_properties (*implementation->model );
169-
170- remove_skip (*implementation->model );
171-
172- ui_message_handlert ui_message_handler (*implementation->message_handler );
173- all_properties_verifier_with_trace_storaget<multi_path_symex_checkert>
174- verifier (
175- *implementation->options , ui_message_handler, *implementation->model );
176- (void )verifier ();
177- verifier.report ();
178- }
179-
180- // TODO: This is a temporary function - it's basically `verify_model`, tweaked
181- // to return the results in a structured format. It's temporary in the sense
182- // that this will get folded into the `verify_model` function, but I want to do
183- // this slightly later because modifying the interface of `verify_model` from
184- // the C++ end breaks the Rust API for now, and I want to take steps one at
185- // a time.
186- verification_resultt api_sessiont::produce_results ()
136+ std::unique_ptr<verification_resultt> api_sessiont::verify_model () const
187137{
188138 PRECONDITION (implementation->model );
189139
@@ -225,10 +175,13 @@ verification_resultt api_sessiont::produce_results()
225175 *implementation->options , ui_message_handler, *implementation->model );
226176 verification_resultt result;
227177 auto results = verifier ();
178+ // Print messages collected to callback buffer.
179+ verifier.report ();
180+ // Set results object before returning.
228181 result.set_result (results);
229182 auto properties = verifier.get_properties ();
230183 result.set_properties (properties);
231- return result;
184+ return util_make_unique<verification_resultt>( result) ;
232185}
233186
234187void api_sessiont::drop_unused_functions () const
0 commit comments