Skip to content

Commit ef51720

Browse files
committed
Updates requested in the PR (added comments).
1 parent 377a515 commit ef51720

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

src/pointer-analysis/value_set.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,9 @@ void value_sett::get_value_set(
369369
#endif
370370
}
371371

372+
/// \brief Builds a version of expr suitable for alias-comparison
373+
/// \param expr The expression to be converted to the alias-uniform structure
374+
/// \return expr without information which is irrelevant to alias-comparison
372375
static exprt get_uniform_expr(const exprt &expr)
373376
{
374377
if(expr.id()==ID_object_descriptor)
@@ -387,6 +390,9 @@ static exprt get_uniform_expr(const exprt &expr)
387390
return expr;
388391
}
389392

393+
/// \brief Reconstructs a type of a pointer to the object expr
394+
/// \param expr An object in a points-to set we make an alias type for
395+
/// \return A type of a pointer to the object expr
390396
static typet get_alias_type(const exprt &expr)
391397
{
392398
if(expr.id()==ID_object_descriptor)

src/pointer-analysis/value_set.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ class value_sett
221221
value_setst::valuest &dest,
222222
const namespacet &ns) const;
223223

224+
/// \brief Computes all pointers which MAY point to objects pointed to by expr
225+
/// \param expr Identifies a points
226+
/// \param dest Output container for pointers to objects pointed to by expr
227+
/// \param ns A reference to a symbol table
224228
void get_may_alias_set(
225229
const exprt &expr,
226230
value_setst::valuest &dest,

src/pointer-analysis/value_set_analysis.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ class value_set_analysis_baset:
113113
baset::ns);
114114
}
115115

116+
/// \brief Fills in dest with all pointers to any object pointed to be expr
117+
/// \param l A program location w.r.t which the operation will be performed
118+
/// \param expr Identifies a points-to set whose aliases we will compute
119+
/// \param dest Output container for aliases
116120
virtual void get_may_alias_values(
117121
locationt l,
118122
const exprt &expr,

0 commit comments

Comments
 (0)