Skip to content

Commit c61ca64

Browse files
Add all_properties_verifier
This will replace bmc_all_propertiest.
1 parent 4b55962 commit c61ca64

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/*******************************************************************\
2+
3+
Module: Goto Verifier for Verifying all Properties
4+
5+
Author: Daniel Kroening, Peter Schrammel
6+
7+
\*******************************************************************/
8+
9+
/// \file
10+
/// Goto Verifier for Verifying all Properties
11+
12+
#ifndef CPROVER_GOTO_CHECKER_ALL_PROPERTIES_VERIFIER_H
13+
#define CPROVER_GOTO_CHECKER_ALL_PROPERTIES_VERIFIER_H
14+
15+
#include "goto_verifier.h"
16+
17+
#include "incremental_goto_checker.h"
18+
#include "properties.h"
19+
#include "report_util.h"
20+
21+
template <class incremental_goto_checkerT>
22+
class all_properties_verifiert : public goto_verifiert
23+
{
24+
public:
25+
all_properties_verifiert(
26+
const optionst &options,
27+
ui_message_handlert &ui_message_handler,
28+
abstract_goto_modelt &goto_model)
29+
: goto_verifiert(options, ui_message_handler),
30+
goto_model(goto_model),
31+
incremental_goto_checker(options, ui_message_handler, goto_model)
32+
{
33+
properties = initialize_properties(goto_model);
34+
}
35+
36+
resultt operator()() override
37+
{
38+
// have we got anything to check? otherwise we return PASS
39+
if(!has_properties_to_check(properties))
40+
return resultt::PASS;
41+
42+
while(incremental_goto_checker(properties) !=
43+
incremental_goto_checkert::resultt::DONE)
44+
{
45+
// loop until we are done
46+
}
47+
return determine_result(properties);
48+
}
49+
50+
void report() override
51+
{
52+
output_properties(properties, ui_message_handler);
53+
output_overall_result(determine_result(properties), ui_message_handler);
54+
}
55+
56+
protected:
57+
abstract_goto_modelt &goto_model;
58+
incremental_goto_checkerT incremental_goto_checker;
59+
};
60+
61+
#endif // CPROVER_GOTO_CHECKER_ALL_PROPERTIES_VERIFIER_H

0 commit comments

Comments
 (0)