20static std::optional<std::string>
24 if(abstract_state->is_top())
27 if(loc->source_location().get_line().empty())
30 return loc->source_location().full_path();
34static std::set<std::string>
37 std::set<std::string>
files;
45 files.insert(file.value());
54 const std::string &src,
58 const std::size_t p =
indent_line.find_first_not_of(
" \t");
59 const std::string indent =
60 p == std::string::npos ? std::string() : std::string(
indent_line, 0, p);
61 std::istringstream in(src);
85 std::map<std::size_t, ai_baset::locationt>
line_map;
96 const std::size_t line_no =
108 for(std::size_t line_no = 1; std::getline(in, line); line_no++)
This is the basic interface of the abstract interpreter with default implementations of the core func...
goto_programt::const_targett locationt
virtual void output(const namespacet &ns, const irep_idt &function_id, const goto_programt &goto_program, std::ostream &out) const
Output the abstract states for a single function.
virtual cstate_ptrt abstract_state_before(locationt l) const
Get a copy of the abstract state before the given instruction, without needing to know what kind of d...
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
function_mapt function_map
symbol_tablet symbol_table
Symbol table.
goto_functionst goto_functions
GOTO functions.
Class that provides messages with a built-in verbosity 'level'.
static const commandt reset
return to default formatting, as defined by the terminal
mstreamt & warning() const
mstreamt & result() const
static const commandt blue
render text with blue foreground color
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
#define forall_goto_program_instructions(it, program)
const std::string & id2string(const irep_idt &d)
void show_on_source(const std::string &source_file, const goto_modelt &goto_model, const ai_baset &ai, message_handlert &message_handler)
output source code annotated with abstract states for given file
static void print_with_indent(const std::string &src, const std::string &indent_line, std::ostream &out)
print a string with indent to match given sample line
static std::optional< std::string > show_location(const ai_baset &ai, ai_baset::locationt loc)
get the name of the file referred to at a location loc, if any
static std::set< std::string > get_source_files(const goto_modelt &goto_model, const ai_baset &ai)
get the source files with non-top abstract states
#define widen_if_needed(s)