Skip to content

Commit

Permalink
Merge pull request diffblue#44 from NathanJPhillips/cleanup/issue-317
Browse files Browse the repository at this point in the history
Cleanup logging
  • Loading branch information
NathanJPhillips authored and smowton committed Mar 1, 2017
1 parent 0647ec6 commit 3ed7a14
Show file tree
Hide file tree
Showing 15 changed files with 699 additions and 847 deletions.
74 changes: 38 additions & 36 deletions src/analyses/pointsto_summary_domain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,23 +505,25 @@ pointsto_expressiont pointsto_evaluate_expression(
}

pointsto_expressiont pointsto_evaluate_access_path(
const pointsto_rulest& domain_value,
const access_path_to_memoryt& access_path,
const bool as_lvalue,
const irep_idt& fn_name,
const unsigned int location_id,
const namespacet& ns
)
{
const pointsto_rulest& domain_value,
const access_path_to_memoryt& access_path,
const bool as_lvalue,
const irep_idt& fn_name,
const unsigned int location_id,
const namespacet& ns,
message_handlert& message_handler)
{
messaget msg(message_handler);
if (is_typecast(access_path))
return pointsto_evaluate_access_path(
domain_value,
get_typecast_target(access_path,ns),
as_lvalue,
fn_name,
location_id,
ns
);
return
pointsto_evaluate_access_path(
domain_value,
get_typecast_target(access_path,ns),
as_lvalue,
fn_name,
location_id,
ns,
message_handler);

if (is_identifier(access_path))
{
Expand All @@ -534,13 +536,13 @@ pointsto_expressiont pointsto_evaluate_access_path(
}
if (is_dereference(access_path))
return pointsto_evaluate_access_path(
domain_value,
get_dereferenced_operand(access_path),
false,
fn_name,
location_id,
ns
);
domain_value,
get_dereferenced_operand(access_path),
false,
fn_name,
location_id,
ns,
message_handler);
if (is_side_effect_malloc(access_path))
{
return pointsto_set_of_concrete_targetst(
Expand All @@ -553,14 +555,14 @@ pointsto_expressiont pointsto_evaluate_access_path(
{
const irep_idt& member_name = get_member_name(access_path);
const pointsto_expressiont accessor =
pointsto_evaluate_access_path(
domain_value,
get_member_accessor(access_path),
false,
fn_name,
location_id,
ns
);
pointsto_evaluate_access_path(
domain_value,
get_member_accessor(access_path),
false,
fn_name,
location_id,
ns,
message_handler);
if (pointsto_is_empty_set_of_targets(accessor))
return accessor;
const pointsto_address_shiftt shift(
Expand All @@ -577,11 +579,11 @@ pointsto_expressiont pointsto_evaluate_access_path(
);
}

std::cout << "\n\n**** UNSUPPORTED YET ***********************************\n";
dump_access_path_in_html(access_path,ns,std::cout);
std::cout << "\n";
dump_irept(access_path,std::cout);
std::cout.flush();
msg.warning() << "\n\n**** UNSUPPORTED YET ***********************************\n";
dump_access_path_in_html(access_path, ns, msg.debug());
msg.debug() << "\n";
dump_irept(access_path, msg.debug());
msg.debug() << messaget::eom;

return pointsto_expression_empty_set_of_targets();
}
Expand Down
14 changes: 7 additions & 7 deletions src/analyses/pointsto_summary_domain.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,13 +275,13 @@ pointsto_expressiont pointsto_evaluate_expression(
);

pointsto_expressiont pointsto_evaluate_access_path(
const pointsto_rulest& domain_value,
const access_path_to_memoryt& access_path,
const bool as_lvalue,
const irep_idt& fn_name,
const unsigned int location_id,
const namespacet& ns
);
const pointsto_rulest& domain_value,
const access_path_to_memoryt& access_path,
const bool as_lvalue,
const irep_idt& fn_name,
const unsigned int location_id,
const namespacet& ns,
message_handlert& message_handler);


pointsto_expressiont pointsto_temp_prune_pure_locals(
Expand Down
Loading

0 comments on commit 3ed7a14

Please sign in to comment.