CBMC: /home/runner/work/cbmc/cbmc/src/goto-checker/properties.h Source File

CBMC
Loading...
Searching...
No Matches
properties.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: Properties
4
5Author: Daniel Kroening, Peter Schrammel
6
7\*******************************************************************/
8
11
12#ifndef CPROVER_GOTO_CHECKER_PROPERTIES_H
13#define CPROVER_GOTO_CHECKER_PROPERTIES_H
14
15#include <map>
16
17#include <goto-programs/goto_program.h>
18
19class abstract_goto_modelt;
20class json_objectt;
21class json_stream_objectt;
22class xmlt;
23
25 enum class property_statust
26{
30 UNKNOWN,
34 PASS,
36 FAIL,
38 ERROR
39};
40
41std::string as_string(property_statust);
42
44 enum class resultt
45{
47 UNKNOWN,
49 PASS,
51 FAIL,
53 ERROR
54};
55
56std::string as_string(resultt);
57
74
76 typedef std::map<irep_idt, property_infot> propertiest;
77
79propertiest initialize_properties(const abstract_goto_modelt &);
80
82void update_properties_from_goto_model(
83 propertiest &properties,
84 const abstract_goto_modelt &goto_model);
85
86std::string
87as_string(const irep_idt &property_id, const property_infot &property_info);
88
89xmlt xml(const irep_idt &property_id, const property_infot &property_info);
90
91json_objectt
92json(const irep_idt &property_id, const property_infot &property_info);
93
95void json(json_stream_objectt &, const irep_idt &, const property_infot &);
96
97int result_to_exit_code(resultt result);
98
100std::size_t count_properties(const propertiest &, property_statust);
101
103bool is_property_to_check(property_statust);
104
106bool has_properties_to_check(const propertiest &properties);
107
108property_statust &operator|=(property_statust &, property_statust const &);
109property_statust &operator&=(property_statust &, property_statust const &);
110resultt determine_result(const propertiest &properties);
111
112#endif // CPROVER_GOTO_CHECKER_PROPERTIES_H
Abstract interface to eager or lazy GOTO models.
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:566
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition dstring.h:38
instructionst::const_iterator const_targett
Definition goto_program.h:614
Provides methods for streaming JSON objects.
Definition json_stream.h:140
Definition xml.h:21
Concrete Goto Program.
bool is_property_to_check(property_statust)
Return true if the status is NOT_CHECKED or UNKNOWN.
Definition properties.cpp:175
property_statust & operator|=(property_statust &, property_statust const &)
Update with the preference order.
Definition properties.cpp:197
propertiest initialize_properties(const abstract_goto_modelt &)
Returns the properties in the goto model.
Definition properties.cpp:70
bool has_properties_to_check(const propertiest &properties)
Return true if there as a property with NOT_CHECKED or UNKNOWN status.
Definition properties.cpp:181
property_statust
The status of a property.
Definition properties.h:26
@ UNKNOWN
The checker was unable to determine the status of the property.
@ NOT_REACHABLE
The property was proven to be unreachable.
@ PASS
The property was not violated.
@ ERROR
An error occurred during goto checking.
@ FAIL
The property was violated.
@ NOT_CHECKED
The property was not checked (also used for initialization)
std::map< irep_idt, property_infot > propertiest
A map of property IDs to property infos.
Definition properties.h:76
property_statust & operator&=(property_statust &, property_statust const &)
Update with the preference order.
Definition properties.cpp:231
resultt
The result of goto verifying.
Definition properties.h:45
resultt determine_result(const propertiest &properties)
Determines the overall result corresponding from the given properties That is PASS if all properties ...
Definition properties.cpp:264
void update_properties_from_goto_model(propertiest &properties, const abstract_goto_modelt &goto_model)
Updates properties with the assertions in goto_model.
Definition properties.cpp:77
std::size_t count_properties(const propertiest &, property_statust)
Return the number of properties with given status.
Definition properties.cpp:164
json_objectt json(const irep_idt &property_id, const property_infot &property_info)
Definition properties.cpp:132
int result_to_exit_code(resultt result)
Definition properties.cpp:147
xmlt xml(const irep_idt &property_id, const property_infot &property_info)
Definition properties.cpp:110
std::string as_string(property_statust)
Definition properties.cpp:41
property_statust status
The status of the property.
Definition properties.h:72
std::string description
A description (usually derived from the assertion's comment)
Definition properties.h:69
goto_programt::const_targett pc
A pointer to the corresponding goto instruction.
Definition properties.h:66

AltStyle によって変換されたページ (->オリジナル) /