Skip to content

Commit 961db10

Browse files
martinmartin-cs
authored andcommitted
Adapt accessor methods to ait's newer style
shared_ptr's are returned rather than references as it allows the abstract interpreter to synthesise domains at query time, either for unexplored locations or merging multiple traces.
1 parent 686c9e4 commit 961db10

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/pointer-analysis/value_set_analysis.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,13 @@ class value_set_analysis_templatet : public value_setst, public ait<VSDT>
3838
{
3939
}
4040

41-
const value_sett &get_value_set(goto_programt::const_targett t)
42-
{
43-
return (*this)[t].value_set;
44-
}
45-
46-
public:
4741
// interface value_sets
4842
std::vector<exprt>
4943
get_values(const irep_idt &, locationt l, const exprt &expr) override
5044
{
51-
return (*this)[l].value_set.get_value_set(expr, ns);
45+
auto s = this->abstract_state_before(l);
46+
auto d = std::dynamic_pointer_cast<const domaint>(s);
47+
return d->value_set.get_value_set(expr, ns);
5248
}
5349
};
5450

0 commit comments

Comments
 (0)