cprover
Toggle main menu visibility
Loading...
Searching...
No Matches
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
15
class
dstringt
;
16
typedef
dstringt
irep_idt
;
17
18
struct
property_infot
;
19
using
propertiest
= std::map<irep_idt, property_infot>;
20
enum 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
27
enum class
prop_statust
28
{
30
NOT_CHECKED
,
32
UNKNOWN
,
34
NOT_REACHABLE
,
36
PASS
,
38
FAIL
,
40
ERROR
41
};
42
43
enum class
verifier_resultt
44
{
45
UNKNOWN
,
47
PASS
,
49
FAIL
,
51
ERROR
52
};
53
54
struct
verification_resultt
55
{
56
verification_resultt
();
57
verification_resultt
(
const
verification_resultt
&other);
58
~verification_resultt
();
59
verification_resultt
&
operator=
(
verification_resultt
&&);
60
verification_resultt
&
operator=
(
const
verification_resultt
&other);
61
62
void
set_result
(
resultt
&result);
63
void
set_properties
(
propertiest
&properties);
64
65
verifier_resultt
final_result
()
const
;
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
70
private
:
71
class
verification_result_implt
;
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).
77
int
verifier_result_to_exit_code
(
verifier_resultt
result);
78
79
#endif
// CPROVER_GOTO_CHECKER_VERIFICATION_RESULT_H
dstringt
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition
dstring.h:38
verification_resultt::verification_result_implt
Definition
verification_result.cpp:19
propertiest
std::map< irep_idt, property_infot > propertiest
A map of property IDs to property infos.
Definition
properties.h:76
resultt
resultt
The result of goto verifying.
Definition
properties.h:45
property_infot
Definition
properties.h:59
verification_resultt::operator=
verification_resultt & operator=(verification_resultt &&)
verification_resultt::verification_resultt
verification_resultt()
Definition
verification_result.cpp:62
verification_resultt::get_property_ids
std::vector< std::string > get_property_ids() const
Definition
verification_result.cpp:112
verification_resultt::~verification_resultt
~verification_resultt()
Definition
verification_result.cpp:67
verification_resultt::set_result
void set_result(resultt &result)
Definition
verification_result.cpp:90
verification_resultt::_impl
std::unique_ptr< verification_result_implt > _impl
Definition
verification_result.h:72
verification_resultt::get_property_description
std::string get_property_description(const std::string &property_id) const
Definition
verification_result.cpp:122
verification_resultt::set_properties
void set_properties(propertiest &properties)
Definition
verification_result.cpp:85
verification_resultt::get_property_status
prop_statust get_property_status(const std::string &property_id) const
Definition
verification_result.cpp:132
verification_resultt::final_result
verifier_resultt final_result() const
Definition
verification_result.cpp:95
irep_idt
dstringt irep_idt
Definition
verification_result.h:16
verifier_resultt
verifier_resultt
Definition
verification_result.h:44
prop_statust
prop_statust
Definition
verification_result.h:28
prop_statust::UNKNOWN
@ UNKNOWN
The checker was unable to determine the status of the property.
Definition
verification_result.h:32
prop_statust::NOT_REACHABLE
@ NOT_REACHABLE
The property was proven to be unreachable.
Definition
verification_result.h:34
prop_statust::PASS
@ PASS
The property was not violated.
Definition
verification_result.h:36
prop_statust::ERROR
@ ERROR
An error occurred during goto checking.
Definition
verification_result.h:40
prop_statust::FAIL
@ FAIL
The property was violated.
Definition
verification_result.h:38
prop_statust::NOT_CHECKED
@ NOT_CHECKED
The property was not checked (also used for initialization).
Definition
verification_result.h:30
propertiest
std::map< irep_idt, property_infot > propertiest
Definition
verification_result.h:19
verifier_result_to_exit_code
int verifier_result_to_exit_code(verifier_resultt result)
Definition
verification_result.cpp:155
libcprover-cpp
verification_result.h
Generated by
1.17.0