Skip to content

Commit 5159ef1

Browse files
Merge pull request #830 from mariusmc92/cleanup/move-singularity-in-vsa
Added singularity check method as virtual in VSA
2 parents 8faef3b + 606a5ab commit 5159ef1

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/pointer-analysis/value_set_analysis.h

+21
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Author: Daniel Kroening, [email protected]
1313
#include <analyses/static_analysis.h>
1414
#include <util/xml_expr.h>
1515
#include <util/xml.h>
16+
#include <util/expr_util.h>
1617

1718
#include "value_set_domain.h"
1819
#include "value_sets.h"
@@ -108,6 +109,26 @@ class value_set_analysis_baset:
108109
dest,
109110
baset::ns);
110111
}
112+
113+
/*******************************************************************\
114+
115+
Function: value_set_analysis_baset::is_singular
116+
117+
Inputs: The set of expressions to check.
118+
119+
Outputs: true, if it contains only one expression and
120+
that expression is a symbol,
121+
false, otherwise.
122+
123+
Purpose: Get whether a set of expressions can have a strong update
124+
or not.
125+
126+
\*******************************************************************/
127+
128+
virtual bool is_singular(const std::set<exprt> &values)
129+
{
130+
return values.size()==1 && values.begin()->id()==ID_symbol;
131+
}
111132
};
112133

113134
typedef value_set_analysis_baset<value_sett> value_set_analysist;

0 commit comments

Comments
 (0)