ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
irep2_guard.h
Go to the documentation of this file.
1#ifndef IREP2_GUARD_H_
2#define IREP2_GUARD_H_
3
4#include <irep2/irep2.h>
5#include <irep2/irep2_expr.h>
6#include <irep2/guard_seq.h>
7
31class guard2tc : public expr2tc
32{
33public:
35
36 guard2tc() = default;
37 guard2tc(const guard2tc &) = default;
38 guard2tc(guard2tc &&) noexcept = default;
39 guard2tc &operator=(const guard2tc &) = default;
40 guard2tc &operator=(guard2tc &&) noexcept = default;
41
42 void add(const expr2tc &expr);
43 void append(const guard2tc &other);
44
45 expr2tc as_expr() const;
46 void guard_expr(expr2tc &dest) const;
47
48 bool disjunction_may_simplify(const guard2tc &other) const;
49 bool is_true() const;
50 bool is_false() const;
51
52 void make_true();
53 void make_false();
54
60 void swap(guard2tc &) = delete;
61
62 void dump() const;
63
64private:
65 bool is_single_symbol() const;
66 void clear();
67
71 void add_leaf(const expr2tc &expr);
72
76 void build_guard_expr();
77 void set_guard_list_and_rebuild(guard_seq &&new_guard_list);
78 void set_guard_list_and_base(guard_seq &&new_guard_list, const expr2tc &base);
79
80 friend guard2tc &operator-=(guard2tc &g1, const guard2tc &g2);
81 friend guard2tc &operator|=(guard2tc &g1, const guard2tc &g2);
82 friend bool operator==(const guard2tc &g1, const guard2tc &g2);
83};
84
85#endif /* IREP2_GUARD_H_ */
static const twodig_t base
Definition bigint.cpp:28
guard_seq guard_list
Definition irep2_guard.h:34
void make_true()
Definition irep2_guard.cpp:709
bool is_true() const
Definition irep2_guard.cpp:697
bool disjunction_may_simplify(const guard2tc &other) const
Definition irep2_guard.cpp:683
void append(const guard2tc &other)
Definition irep2_guard.cpp:326
void add(const expr2tc &expr)
Definition irep2_guard.cpp:214
guard2tc(guard2tc &&) noexcept=default
void make_false()
Definition irep2_guard.cpp:714
bool is_false() const
Definition irep2_guard.cpp:702
void swap(guard2tc &)=delete
Deleted.
guard2tc(const guard2tc &)=default
void dump() const
Definition irep2_guard.cpp:651
guard2tc()=default
expr2tc as_expr() const
Definition irep2_guard.cpp:203
void guard_expr(expr2tc &dest) const
Definition irep2_guard.cpp:274
Oldest-first immutable sequence of guard conjuncts with O(1) copy.
Definition guard_seq.h:45
@ other
Definition converter_compare.cpp:887
Classes and definitions for non-stringy internal representation.
irep_container< expr2t > expr2tc
Definition irep2.h:431