forked from diffblue/cbmc
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Value-set analysis: templatise and virtualise to facilitate c…
…ustomisation"
- Loading branch information
Showing
14 changed files
with
172 additions
and
673 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,10 +12,10 @@ Author: Daniel Kroening, [email protected] | |
#ifndef CPROVER_POINTER_ANALYSIS_SHOW_VALUE_SETS_H | ||
#define CPROVER_POINTER_ANALYSIS_SHOW_VALUE_SETS_H | ||
|
||
#include <pointer-analysis/value_set_analysis.h> | ||
#include <util/ui_message.h> | ||
|
||
class goto_modelt; | ||
class value_set_analysist; | ||
|
||
void show_value_sets( | ||
ui_message_handlert::uit, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,9 +13,74 @@ Author: Daniel Kroening, [email protected] | |
|
||
#include <util/prefix.h> | ||
#include <util/cprover_prefix.h> | ||
#include <util/xml_expr.h> | ||
#include <util/xml.h> | ||
|
||
#include <langapi/language_util.h> | ||
|
||
void value_set_analysist::initialize( | ||
const goto_programt &goto_program) | ||
{ | ||
baset::initialize(goto_program); | ||
} | ||
|
||
void value_set_analysist::initialize( | ||
const goto_functionst &goto_functions) | ||
{ | ||
baset::initialize(goto_functions); | ||
} | ||
|
||
void value_set_analysist::convert( | ||
const goto_programt &goto_program, | ||
const irep_idt &identifier, | ||
xmlt &dest) const | ||
{ | ||
source_locationt previous_location; | ||
|
||
forall_goto_program_instructions(i_it, goto_program) | ||
{ | ||
const source_locationt &location=i_it->source_location; | ||
|
||
if(location==previous_location) | ||
continue; | ||
|
||
if(location.is_nil() || location.get_file().empty()) | ||
continue; | ||
|
||
// find value set | ||
const value_sett &value_set=(*this)[i_it].value_set; | ||
|
||
xmlt &i=dest.new_element("instruction"); | ||
i.new_element()=::xml(location); | ||
|
||
for(value_sett::valuest::const_iterator | ||
v_it=value_set.values.begin(); | ||
v_it!=value_set.values.end(); | ||
v_it++) | ||
{ | ||
xmlt &var=i.new_element("variable"); | ||
var.new_element("identifier").data= | ||
id2string(v_it->first); | ||
|
||
#if 0 | ||
const value_sett::expr_sett &expr_set= | ||
v_it->second.expr_set(); | ||
|
||
for(value_sett::expr_sett::const_iterator | ||
e_it=expr_set.begin(); | ||
e_it!=expr_set.end(); | ||
e_it++) | ||
{ | ||
std::string value_str= | ||
from_expr(ns, identifier, *e_it); | ||
|
||
var.new_element("value").data= | ||
xmlt::escape(value_str); | ||
} | ||
#endif | ||
} | ||
} | ||
} | ||
void convert( | ||
const goto_functionst &goto_functions, | ||
const value_set_analysist &value_set_analysis, | ||
|
Oops, something went wrong.