ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
ld_language.h
Go to the documentation of this file.
1#pragma once
2
6#include <string>
7#include <vector>
8
9class ld_languaget : public languaget
10{
11public:
12 // Parse PLCopen XML → LdAst; run type checker.
13 bool parse(const std::string &path) override;
14
15 // Run ld_converter: populate contextt with symbolt entries and the
16 // scan-loop GOTO function body. Mirrors python_languaget::typecheck().
17 bool typecheck(contextt &context, const std::string &module) override;
18
19 bool final(contextt &) override
20 {
21 return false;
22 }
23
24 std::string id() const override
25 {
26 return "ld";
27 }
28
29 void show_parse(std::ostream &out) override;
30
31 languaget *new_language() const override
32 {
33 return new ld_languaget;
34 }
35
36 bool from_expr(
37 const exprt &expr,
38 std::string &code,
39 const namespacet &ns,
40 unsigned flags) override;
41
42 bool from_type(
43 const typet &type,
44 std::string &code,
45 const namespacet &ns,
46 unsigned flags) override;
47
48 unsigned default_flags(presentationt target) const override;
49
50 // Set the path to the YAML property file (used by ld-verify CLI).
51 void set_props_path(const std::string &path)
52 {
53 props_path_ = path;
54 }
55
56private:
57 LdAst ast_;
58 std::string props_path_;
59 std::vector<LdProperty> props_;
60};
61
Definition context.h:57
Definition expr.h:34
Definition language.h:16
Definition ld_language.h:10
bool from_expr(const exprt &expr, std::string &code, const namespacet &ns, unsigned flags) override
Definition ld_language.cpp:124
bool from_type(const typet &type, std::string &code, const namespacet &ns, unsigned flags) override
Definition ld_language.cpp:134
std::string id() const override
Definition ld_language.h:24
void show_parse(std::ostream &out) override
Definition ld_language.cpp:159
bool parse(const std::string &path) override
Definition ld_language.cpp:19
unsigned default_flags(presentationt target) const override
Definition ld_language.cpp:144
languaget * new_language() const override
Definition ld_language.h:31
bool typecheck(contextt &context, const std::string &module) override
Definition ld_language.cpp:72
void set_props_path(const std::string &path)
Definition ld_language.h:51
Definition module.h:60
Definition namespace.h:10
Definition type.h:9
presentationt
Definition language.h:10
languaget * new_ld_language()
Definition ld_language.cpp:14
Definition path.py:1
Definition ld_ast.h:256