ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
yaml_property_parser.h
Go to the documentation of this file.
1#pragma once
2
3#include <stdexcept>
4#include <string>
5#include <vector>
6
7struct LdPropertyParseError : std::runtime_error
8{
9 explicit LdPropertyParseError(const std::string &msg)
10 : std::runtime_error(msg)
11 {
12 }
13};
14
23
25{
26 std::string id;
28 std::string description;
29 std::string justification; // required for response / reachability
30
31 // mutual_exclusion
32 std::vector<std::string> variables;
33
34 // invariant / absence / reachability
35 std::string expression;
36
37 // response
38 std::string trigger;
39 std::string response_var;
40 unsigned max_scans = 0;
41};
42
44{
45public:
46 // Parse a YAML property specification file.
47 // Throws LdPropertyParseError on schema or validation errors.
48 std::vector<LdProperty> parse(const std::string &path);
49
50private:
51 static PropertyKind kind_from_string(const std::string &s);
52};
Definition yaml_property_parser.h:44
std::vector< LdProperty > parse(const std::string &path)
Definition yaml_property_parser.cpp:29
Definition witnesses.h:80
Definition path.py:1
Definition exception.cpp:51
LdPropertyParseError(const std::string &msg)
Definition yaml_property_parser.h:9
Definition yaml_property_parser.h:25
std::string trigger
Definition yaml_property_parser.h:38
std::string description
Definition yaml_property_parser.h:28
std::string response_var
Definition yaml_property_parser.h:39
std::string id
Definition yaml_property_parser.h:26
std::string justification
Definition yaml_property_parser.h:29
PropertyKind kind
Definition yaml_property_parser.h:27
std::string expression
Definition yaml_property_parser.h:35
std::vector< std::string > variables
Definition yaml_property_parser.h:32
unsigned max_scans
Definition yaml_property_parser.h:40
PropertyKind
Definition yaml_property_parser.h:16
@ absence
Definition yaml_property_parser.h:20
@ mutual_exclusion
Definition yaml_property_parser.h:17
@ reachability
Definition yaml_property_parser.h:21
@ response
Definition yaml_property_parser.h:19