Skip to content

Added singularity check method as virtual in VSA #830

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/pointer-analysis/value_set_analysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Author: Daniel Kroening, [email protected]
#include <analyses/static_analysis.h>
#include <util/xml_expr.h>
#include <util/xml.h>
#include <util/expr_util.h>

#include "value_set_domain.h"
#include "value_sets.h"
Expand Down Expand Up @@ -108,6 +109,26 @@ class value_set_analysis_baset:
dest,
baset::ns);
}

/*******************************************************************\

Function: value_set_analysis_baset::is_singular

Inputs: The set of expressions to check.

Outputs: true, if it contains only one expression and
that expression is a symbol,
false, otherwise.

Purpose: Get whether a set of expressions can have a strong update
or not.

\*******************************************************************/

virtual bool is_singular(const std::set<exprt> &values)
{
return values.size()==1 && values.begin()->id()==ID_symbol;
}
};

typedef value_set_analysis_baset<value_sett> value_set_analysist;
Expand Down