Skip to content

Commit

Permalink
Merge pull request diffblue#454 from diffblue/owen-jones-diffblue/fix…
Browse files Browse the repository at this point in the history
…-comment-formatting

Replace /// with // for non-doxygen comments
  • Loading branch information
owen-jones-diffblue authored Jun 18, 2018
2 parents afd55ac + e998c87 commit 6168049
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 42 deletions.
12 changes: 6 additions & 6 deletions cbmc/src/pointer-analysis/value_set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,8 @@ void value_sett::get_value_set_rec(
it1!=object_map.end();
it1++)
{
/// Do not take a reference to object_numbering's storage as we may call
/// object_numbering.number(), which may reallocate it.
// Do not take a reference to object_numbering's storage as we may call
// object_numbering.number(), which may reallocate it.
const exprt object=object_numbering[it1->first];
get_value_set_rec(object, dest, suffix, original_type, ns);
}
Expand All @@ -526,8 +526,8 @@ void value_sett::get_value_set_rec(
it!=object_map.end();
it++)
{
/// Do not take a reference to object_numbering's storage as we may call
/// object_numbering.number(), which may reallocate it.
// Do not take a reference to object_numbering's storage as we may call
// object_numbering.number(), which may reallocate it.
const exprt object=object_numbering[it->first];
get_value_set_rec(object, dest, suffix, original_type, ns);
}
Expand Down Expand Up @@ -1443,8 +1443,8 @@ void value_sett::assign_rec(
it!=reference_set.read().end();
it++)
{
/// Do not take a reference to object_numbering's storage as we may call
/// object_numbering.number(), which may reallocate it.
// Do not take a reference to object_numbering's storage as we may call
// object_numbering.number(), which may reallocate it.
const exprt object=object_numbering[it->first];

if(object.id()!=ID_unknown)
Expand Down
36 changes: 18 additions & 18 deletions src/pointer-analysis/local_value_set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ void local_value_sett::get_value_set_rec(
function,
std::to_string(location_number),
declared_on_type);
/// Create external value set for the type and suffix
// Create external value set for the type and suffix
external_value_set_exprt new_ext_set = extinit;
new_ext_set.set_per_field_access_path(new_entry);
new_ext_set.type() = field_type.subtype();
Expand All @@ -391,16 +391,16 @@ void local_value_sett::get_value_set_rec(
entryt entry(
basename, access_path_suffix, declared_on_type, new_ext_set);

/// If there is already an entry for this EVS then find it, otherwise
/// create a new entry for it
/// TODO: figure out how to do this sort of on-demand-insert
/// without such ugly const hacking:
// If there is already an entry for this EVS then find it, otherwise
// create a new entry for it
// TODO: figure out how to do this sort of on-demand-insert
// without such ugly const hacking:
auto insert_result =
(const_cast<local_value_sett *>(this))
->values.insert(std::make_pair(irep_idt(entryname), entry));

/// If we've just created a new entry then populate the object map
/// with an initializer EVS
// If we've just created a new entry then populate the object map
// with an initializer EVS
if(insert_result.second)
insert(
insert_result.first->second.object_map,
Expand All @@ -416,7 +416,7 @@ void local_value_sett::get_value_set_rec(
function,
std::to_string(location_number),
declared_on_type);
/// Create external value set for the precise access path
// Create external value set for the precise access path
external_value_set_exprt new_ext_set = extinit;
bool loop_found = new_ext_set.extend_precise_access_path(new_entry);

Expand All @@ -433,8 +433,8 @@ void local_value_sett::get_value_set_rec(

const auto it = values.find(entryname);

/// If an entry already exists then use the values in the object
/// map, otherwise do not create an entry and use the EVS
// If an entry already exists then use the values in the object
// map, otherwise do not create an entry and use the EVS
if(it != values.end())
make_union(dest, it->second.object_map);
else
Expand Down Expand Up @@ -535,10 +535,10 @@ void local_value_sett::demote_most_recent_dynamic_objects(
to_dynamic_object_expr(entry.structured_lhs);
expr_any_allocation.set_recency(false);

/// The second and third arguments to get_entry() are only used for
/// field_sensitive(), and that will always returns true without using
/// them because name_any_allocation starts with the prefix for a
/// dynamic object, so we can use an empty type and namespace.
// The second and third arguments to get_entry() are only used for
// field_sensitive(), and that will always returns true without using
// them because name_any_allocation starts with the prefix for a
// dynamic object, so we can use an empty type and namespace.
entryt &entry_any_allocation = get_entry(
entryt(name_any_allocation, entry.suffix, expr_any_allocation),
nil_typet(),
Expand Down Expand Up @@ -739,10 +739,10 @@ void local_value_sett::assign_rec(

if(weak_write)
{
/// If we are doing a weak write, but this precise EVS did not
/// already exist in the domain, we also put a copy of the precise
/// EVS with is_initializer set to true in its value-set to
/// represent that it might have its original value
// If we are doing a weak write, but this precise EVS did not
// already exist in the domain, we also put a copy of the precise
// EVS with is_initializer set to true in its value-set to
// represent that it might have its original value
if(insert_result.second)
insert(lhs_entry.object_map, new_ext_set.as_initializer());

Expand Down
36 changes: 18 additions & 18 deletions src/pointer-analysis/local_value_set_analysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@ static exprt get_root_object_expr(

if(root_object_symbol.is_static_lifetime)
{
/// Global variable. Read its actual incoming value set:
// Global variable. Read its actual incoming value set:
return root_object_symbol.symbol_expr();
}
else
{
/// Parameter. Get the value-set for the actual argument:
// Parameter. Get the value-set for the actual argument:
size_t paramidx = (size_t)-1;
const auto &params = to_code_type(function_symbol.type).parameters();
for(size_t i = 0, ilim = params.size(); i != ilim; ++i)
Expand Down Expand Up @@ -233,11 +233,11 @@ static void follow_access_path(
++it)
{
std::string access_path_label = id2string(it->label());
/// If expr is of type Z and Z <: Y <: X <: ... <: A and we are
/// accessing a field of A then access_path_label will be
/// ".@Y.@X.@W. ... [email protected]_name". For an array dereference, the access
/// path will have the label "[]", and the access path entry before
/// it will have a label ending in ".data".
// If expr is of type Z and Z <: Y <: X <: ... <: A and we are
// accessing a field of A then access_path_label will be
// ".@Y.@X.@W. ... [email protected]_name". For an array dereference, the access
// path will have the label "[]", and the access path entry before
// it will have a label ending in ".data".
DATA_INVARIANT(
access_path_label.size() >= 2,
"Access path label must have length at least 2");
Expand Down Expand Up @@ -274,9 +274,9 @@ static void follow_access_path(
return;
}

/// We should just have a field name. It should not start with a
/// superclass identifier (".@superclass_name") or the special fields
/// ".@class_identifier" or ".@lock" on java.lang.Object.
// We should just have a field name. It should not start with a
// superclass identifier (".@superclass_name") or the special fields
// ".@class_identifier" or ".@lock" on java.lang.Object.
DATA_INVARIANT(
access_path_label[0] == '.' && access_path_label[1] != '@',
"the label of an access path entry is malformed");
Expand Down Expand Up @@ -454,7 +454,7 @@ void local_value_set_analysist::transform_function_stub(
}
else if(has_prefix(evse_label, PRECISE_EVS_PREFIX))
{
/// Precise EVS
// Precise EVS
PRECONDITION(!evse.access_path_entries().empty());
exprt precise_access_path_expr =
get_expr_from_precise_evs(evse, function_symbol, fcall, ns, *this);
Expand Down Expand Up @@ -546,7 +546,7 @@ void local_value_set_analysist::transform_function_stub(
exprt precise_access_path_expr = get_expr_from_precise_evs(
precise_evs, function_symbol, fcall, ns, *this);

/// Weak write - can we do strong writes?
// Weak write - can we do strong writes?
bool add_to_sets = true;
const auto &rhs_expr = assignment.second;
auto demoted_rhs_values = pre_call_rhs_value_sets.at(assignment.second);
Expand Down Expand Up @@ -643,8 +643,8 @@ bool local_value_set_analysist::is_singular(const std::set<exprt> &values)
void local_value_set_analysist::operator()(const goto_programt &goto_program)
{
initialize(goto_program);
/// This is a dummy variable that will always be empty because we handle
/// function calls specially
// This is a dummy variable that will always be empty because we handle
// function calls specially
goto_functionst goto_functions;

while(true)
Expand Down Expand Up @@ -672,10 +672,10 @@ bool local_value_set_analysist::add_precise_evs_initializers(

bool any_change = false;

/// For each precise EVS that was written somewhere in this function, we
/// insert a copy of the EVS with is_initializer set to true to the value-set
/// at the first instruction, to detect on a subsequent fixedpoint analysis
/// whether there are paths where it goes unaltered.
// For each precise EVS that was written somewhere in this function, we
// insert a copy of the EVS with is_initializer set to true to the value-set
// at the first instruction, to detect on a subsequent fixedpoint analysis
// whether there are paths where it goes unaltered.

for(locationt loc = goto_program.instructions.begin();
loc != goto_program.instructions.end();
Expand Down

0 comments on commit 6168049

Please sign in to comment.