ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
smt_tuple_sym_ast.h
Go to the documentation of this file.
1#ifndef SOLVERS_SMT_TUPLE_SMT_TUPLE_SYM_AST_H_
2#define SOLVERS_SMT_TUPLE_SMT_TUPLE_SYM_AST_H_
3
5
8
10
12{
13public:
18 tuple_sym_smt_ast(smt_solver_baset *ctx, smt_sortt s, std::string _name)
19 : smt_ast(ctx, s), name(std::move(_name))
20 {
21 }
22 ~tuple_sym_smt_ast() override = default;
23
26 const std::string name;
27
29 ite(smt_solver_baset *ctx, smt_astt cond, smt_astt falseop) const override;
30 smt_astt eq(smt_solver_baset *ctx, smt_astt other) const override;
34 unsigned int idx,
35 const expr2tc &idx_expr = expr2tc()) const override;
36 smt_astt select(smt_solver_baset *ctx, const expr2tc &idx) const override;
37 smt_astt project(smt_solver_baset *ctx, unsigned int elem) const override;
38
39 void dump() const override
40 {
41 }
42};
43
45{
46 tuple_sym_smt_astt ta = dynamic_cast<tuple_sym_smt_astt>(a);
47 assert(ta != nullptr && "Tuple AST mismatch");
48 return ta;
49}
50
51#endif
smt_ast(smt_solver_baset *ctx, smt_sortt s)
Definition smt_solver.h:1270
The base SMT-conversion class/interface.
Definition smt_solver.h:170
Definition smt_tuple_node.h:12
Definition smt_tuple_sym_ast.h:12
~tuple_sym_smt_ast() override=default
smt_astt update(smt_solver_baset *ctx, smt_astt value, unsigned int idx, const expr2tc &idx_expr=expr2tc()) const override
Abstractly produce an "update", i.e., an array 'with' or tuple 'with'.
Definition smt_tuple_sym_ast.cpp:121
smt_astt ite(smt_solver_baset *ctx, smt_astt cond, smt_astt falseop) const override
Definition smt_tuple_sym_ast.cpp:60
const std::string name
The symbol prefix of the variables representing this tuples value, as a string (i....
Definition smt_tuple_sym_ast.h:26
tuple_sym_smt_ast(smt_solver_baset *ctx, smt_sortt s, std::string _name)
Primary constructor.
Definition smt_tuple_sym_ast.h:18
smt_astt eq(smt_solver_baset *ctx, smt_astt other) const override
Abstractly produce an equality.
Definition smt_tuple_sym_ast.cpp:95
void dump() const override
Definition smt_tuple_sym_ast.h:39
smt_astt select(smt_solver_baset *ctx, const expr2tc &idx) const override
Select a value from an array, for both normal arrays and tuple arrays.
Definition smt_tuple_sym_ast.cpp:171
smt_astt project(smt_solver_baset *ctx, unsigned int elem) const override
Project a member from a structure, or an field-array from a struct array.
Definition smt_tuple_sym_ast.cpp:180
Definition toml.hpp:1531
@ other
Definition converter_compare.cpp:887
pthread_cond_t cond
Definition cuda.h:50
irep_container< expr2t > expr2tc
Definition irep2.h:431
Definition exception.cpp:51
const smt_ast * smt_astt
Definition smt_ast.h:30
SMT conversion tools and utilities.
const smt_sort * smt_sortt
Definition smt_sort.h:37
const tuple_sym_smt_ast * tuple_sym_smt_astt
Definition smt_tuple_sym.h:8
tuple_sym_smt_astt to_tuple_sym_ast(smt_astt a)
Definition smt_tuple_sym_ast.h:44