64 std::string description,
66 : pc(pc), description(std::move(description)), status(status)
82 for(
const auto &function_pair : goto_functions.function_map)
84 const goto_programt &goto_program = function_pair.second.body;
89 if(!i_it->is_assert())
92 std::string description =
93 id2string(i_it->source_location().get_comment());
94 if(description.empty())
95 description =
"assertion";
97 i_it->source_location().get_property_id(),
112 xmlt xml_result(
"result");
119 template <
class json_
objectT>
121 json_objectT &result,
128 result[
"sourceLocation"] =
json(property_info.
pc->source_location());
135 json<json_objectt>(result, property_id, property_info);
144 json<json_stream_objectt>(result, property_id, property_info);
166 std::size_t count = 0;
167 for(
const auto &property_pair : properties)
169 if(property_pair.second.status == status)
183 for(
const auto &property_pair : properties)
267 for(
const auto &property_pair : properties)
269 status &= property_pair.second.status;
Abstract interface to eager or lazy GOTO models.
Abstract interface to eager or lazy GOTO models.
virtual const goto_functionst & get_goto_functions() const =0
Accessor to get a raw goto_functionst.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
A generic container class for the GOTO intermediate representation of one function.
instructionst::const_iterator const_targett
Provides methods for streaming JSON objects.
void set_attribute(const std::string &attribute, unsigned value)
xmlt & new_element(const std::string &key)
Document and give macros for the exit codes of CPROVER binaries.
#define CPROVER_EXIT_INTERNAL_ERROR
An error has been encountered during processing the requested analysis.
#define CPROVER_EXIT_VERIFICATION_SAFE
Verification successful indicates the analysis has been performed without error AND the software is s...
#define CPROVER_EXIT_VERIFICATION_INCONCLUSIVE
Verification inconclusive indicates the analysis has been performed without error AND the software is...
#define CPROVER_EXIT_VERIFICATION_UNSAFE
Verification successful indicates the analysis has been performed without error AND the software is n...
#define forall_goto_program_instructions(it, program)
const std::string & id2string(const irep_idt &d)
property_statust & operator|=(property_statust &a, property_statust const &b)
Update with the preference order.
static void json(json_objectT &result, const irep_idt &property_id, const property_infot &property_info)
bool has_properties_to_check(const propertiest &properties)
Return true if there as a property with NOT_CHECKED or UNKNOWN status.
bool is_property_to_check(property_statust status)
Return true if the status is NOT_CHECKED or UNKNOWN.
resultt determine_result(const propertiest &properties)
Determines the overall result corresponding from the given properties That is PASS if all properties ...
void update_properties_from_goto_model(propertiest &properties, const abstract_goto_modelt &goto_model)
Updates properties with the assertions in goto_model.
std::size_t count_properties(const propertiest &properties, property_statust status)
Return the number of properties with given status.
int result_to_exit_code(resultt result)
xmlt xml(const irep_idt &property_id, const property_infot &property_info)
std::string as_string(resultt result)
propertiest initialize_properties(const abstract_goto_modelt &goto_model)
Returns the properties in the goto model.
property_statust & operator&=(property_statust &a, property_statust const &b)
Update with the preference order.
property_statust
The status of a property.
@ 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.
resultt
The result of goto verifying.
@ UNKNOWN
No property was violated, neither was there an error.
@ PASS
No properties were violated.
@ ERROR
An error occurred during goto checking.
@ FAIL
Some properties were violated.
#define UNREACHABLE
This should be used to mark dead code.
#define PRECONDITION(CONDITION)
property_statust status
The status of the property.
std::string description
A description (usually derived from the assertion's comment)
property_infot(goto_programt::const_targett pc, std::string description, property_statust status)
goto_programt::const_targett pc
A pointer to the corresponding goto instruction.