ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
property_encoder.h
Go to the documentation of this file.
1#pragma once
2
7#include <string>
8#include <vector>
9
10// property_encoder translates LdProperty objects into code_assertt nodes
11// which are appended to the end of the scan-loop body by ld_converter.
13{
14public:
15 property_encoder(contextt &context, const std::string &source_file);
16
17 // Encode all properties and return a code_blockt of assertions.
18 // Throws std::runtime_error if a property references an undeclared variable.
19 code_blockt encode(const std::vector<LdProperty> &props);
20
21private:
22 contextt &context_;
23 std::string source_file_;
24
25 symbol_exprt var_expr(const std::string &name, const LdProperty &p) const;
26 exprt parse_bool_expr(const std::string &expr_str, const LdProperty &p) const;
27
28 code_assertt make_assert(const exprt &cond, const LdProperty &p) const;
29
30 code_blockt encode_mutual_exclusion(const LdProperty &p);
31 code_blockt encode_invariant(const LdProperty &p);
32 code_blockt encode_absence(const LdProperty &p);
33 code_blockt encode_reachability(const LdProperty &p);
34 code_blockt encode_response(const LdProperty &p);
35};
Definition std_code.h:243
Definition std_code.h:49
Definition context.h:57
Definition expr.h:34
code_blockt encode(const std::vector< LdProperty > &props)
Definition property_encoder.cpp:263
property_encoder(contextt &context, const std::string &source_file)
Definition property_encoder.cpp:11
Definition std_expr.h:58
pthread_cond_t cond
Definition cuda.h:50
Definition yaml_property_parser.h:25