Skip to content

Commit 2c3ed7f

Browse files
Add all_properties_verifier
This will replace bmc_all_propertiest.
1 parent e196ac5 commit 2c3ed7f

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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 "goto_checker.h"
18+
#include "properties.h"
19+
#include "report_util.h"
20+
21+
template<class 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+
goto_checker(options, ui_message_handler, goto_model)
32+
{
33+
properties = std::move(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(goto_checker(properties) != goto_checkert::statust::DONE)
43+
{
44+
// loop until we are done
45+
}
46+
return determine_result(properties);
47+
}
48+
49+
void report() override
50+
{
51+
output_properties(properties, ui_message_handler);
52+
output_overall_result(determine_result(properties), ui_message_handler);
53+
}
54+
55+
protected:
56+
abstract_goto_modelt &goto_model;
57+
goto_checkerT goto_checker;
58+
};
59+
60+
#endif // CPROVER_GOTO_CHECKER_ALL_PROPERTIES_VERIFIER_H

0 commit comments

Comments
 (0)