File tree Expand file tree Collapse file tree 5 files changed +43
-0
lines changed Expand file tree Collapse file tree 5 files changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ target_link_libraries(goto-analyzer-lib
12
12
cpp
13
13
linking
14
14
big-int
15
+ goto-checker
15
16
goto-programs
16
17
analyses
17
18
pointer-analysis
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ OBJ += ../ansi-c/ansi-c$(LIBEXT) \
13
13
../cpp/cpp$(LIBEXT ) \
14
14
../linking/linking$(LIBEXT ) \
15
15
../big-int/big-int$(LIBEXT ) \
16
+ ../goto-checker/goto-checker$(LIBEXT ) \
16
17
../goto-programs/goto-programs$(LIBEXT ) \
17
18
../analyses/analyses$(LIBEXT ) \
18
19
../pointer-analysis/pointer-analysis$(LIBEXT ) \
Original file line number Diff line number Diff line change 3
3
assembler
4
4
cpp
5
5
goto-analyzer
6
+ goto-checker
6
7
goto-programs
7
8
java_bytecode # will go away
8
9
langapi # should go away
Original file line number Diff line number Diff line change @@ -27,6 +27,39 @@ struct static_verifier_resultt
27
27
irep_idt function_id;
28
28
};
29
29
30
+ void static_verifier (
31
+ const abstract_goto_modelt &abstract_goto_model,
32
+ const ai_baset &ai,
33
+ propertiest &properties)
34
+ {
35
+ auto const ns = namespacet{abstract_goto_model.get_symbol_table ()};
36
+ for (auto &property : properties)
37
+ {
38
+ auto &property_status = property.second .status ;
39
+ auto const &property_location = property.second .pc ;
40
+ auto condition = property_location->get_condition ();
41
+ auto const predecessor = ai.abstract_state_before (property_location);
42
+ auto const &domain = *predecessor;
43
+ domain.ai_simplify (condition, ns);
44
+ if (condition.is_true ())
45
+ {
46
+ property_status = property_statust::PASS;
47
+ }
48
+ else if (condition.is_false ())
49
+ {
50
+ property_status = property_statust::FAIL;
51
+ }
52
+ else if (domain.is_bottom ())
53
+ {
54
+ property_status = property_statust::NOT_REACHABLE;
55
+ }
56
+ else
57
+ {
58
+ property_status = property_statust::UNKNOWN;
59
+ }
60
+ }
61
+ }
62
+
30
63
// / Makes a status message string from a status.
31
64
static const char *message (const static_verifier_resultt::statust &status)
32
65
{
Original file line number Diff line number Diff line change 9
9
#ifndef CPROVER_GOTO_ANALYZER_STATIC_VERIFIER_H
10
10
#define CPROVER_GOTO_ANALYZER_STATIC_VERIFIER_H
11
11
12
+ #include < goto-checker/properties.h>
13
+ #include < goto-programs/abstract_goto_model.h>
12
14
#include < iosfwd>
13
15
14
16
class ai_baset ;
@@ -23,4 +25,9 @@ bool static_verifier(
23
25
message_handlert &,
24
26
std::ostream &);
25
27
28
+ void static_verifier (
29
+ const abstract_goto_modelt &abstract_goto_model,
30
+ const ai_baset &ai,
31
+ propertiest &properties);
32
+
26
33
#endif // CPROVER_GOTO_ANALYZER_STATIC_VERIFIER_H
You can’t perform that action at this time.
0 commit comments