CBMC
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
verification_result.h
Go to the documentation of this file.
1// Copyright (c) 2023 Fotis Koutoulakis for Diffblue Ltd.
2
5// in a structured form.
6
7#ifndef CPROVER_LIBCPROVER_CPP_VERIFICATION_RESULT_H
8#define CPROVER_LIBCPROVER_CPP_VERIFICATION_RESULT_H
9
10#include <map>
11#include <memory>
12#include <string>
13#include <vector>
14
15class dstringt;
17
18struct property_infot;
19using propertiest = std::map<irep_idt, property_infot>;
20enum class resultt;
21
22// The enumerations here mirror the ones in properties.h.
23// The reason we do so is that we want to expose the same information
24// to users of the API, without including (and therefore, exposing)
25// CBMC internal headers.
26
27enum class prop_statust
28{
32 UNKNOWN,
36 PASS,
38 FAIL,
40 ERROR
41};
42
44{
45 UNKNOWN,
47 PASS,
49 FAIL,
51 ERROR
52};
53
55{
61
62 void set_result(resultt &result);
63 void set_properties(propertiest &properties);
64
66 std::vector<std::string> get_property_ids() const;
67 std::string get_property_description(const std::string &property_id) const;
68 prop_statust get_property_status(const std::string &property_id) const;
69
70private:
72 std::unique_ptr<verification_result_implt> _impl;
73};
74
75// Allow translation of `verifier_resultt` into a CPROVER_EXIT_CODES (so that
76// they can be consistent across various tools using the API).
78
79#endif // CPROVER_GOTO_CHECKER_VERIFICATION_RESULT_H
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition dstring.h:38
std::map< irep_idt, property_infot > propertiest
A map of property IDs to property infos.
Definition properties.h:76
resultt
The result of goto verifying.
Definition properties.h:45
verification_resultt & operator=(verification_resultt &&)
std::vector< std::string > get_property_ids() const
void set_result(resultt &result)
std::unique_ptr< verification_result_implt > _impl
std::string get_property_description(const std::string &property_id) const
void set_properties(propertiest &properties)
prop_statust get_property_status(const std::string &property_id) const
verifier_resultt final_result() const
dstringt irep_idt
verifier_resultt
@ 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
int verifier_result_to_exit_code(verifier_resultt result)