cprover
dott Class Reference
Collaboration diagram for dott:
[legend]

Public Member Functions

 dott (const goto_functionst &_goto_functions, const namespacet &_ns)
 
void output (std::ostream &out)
 

Protected Member Functions

void write_dot_subgraph (std::ostream &, const std::string &, const goto_programt &)
 writes the dot graph that corresponds to the goto program to the output stream. More...
 
void do_dot_function_calls (std::ostream &)
 
std::string & escape (std::string &str)
 escapes a string. More...
 
void write_edge (std::ostream &, const goto_programt::instructiont &, const goto_programt::instructiont &, const std::string &)
 writes an edge from the from node to the to node and with the given label to the output stream (dot format) More...
 
void find_next (const goto_programt::instructionst &, const goto_programt::const_targett &, std::set< goto_programt::const_targett > &, std::set< goto_programt::const_targett > &)
 finds an instructions successors (for goto graphs) More...
 

Protected Attributes

const namespacetns
 
const goto_functionstgoto_functions
 
unsigned subgraphscount
 
std::list< exprtfunction_calls
 
std::list< exprtclusters
 

Detailed Description

Definition at line 25 of file dot.cpp.

Constructor & Destructor Documentation

§ dott()

dott::dott ( const goto_functionst _goto_functions,
const namespacet _ns 
)
inline

Definition at line 28 of file dot.cpp.

References output().

Member Function Documentation

§ do_dot_function_calls()

void dott::do_dot_function_calls ( std::ostream &  out)
protected

Definition at line 223 of file dot.cpp.

References clusters, function_calls, and subgraphscount.

Referenced by output().

§ escape()

std::string & dott::escape ( std::string &  str)
protected

escapes a string.

beware, this might not work for all kinds of strings.

parameters: a string
Returns
the escaped string

Definition at line 280 of file dot.cpp.

References size_type().

Referenced by write_dot_subgraph().

§ find_next()

void dott::find_next ( const goto_programt::instructionst instructions,
const goto_programt::const_targett it,
std::set< goto_programt::const_targett > &  tres,
std::set< goto_programt::const_targett > &  fres 
)
protected

finds an instructions successors (for goto graphs)

parameters: instructions, instruction iterator, true results and
false results
Returns
none

Definition at line 309 of file dot.cpp.

Referenced by write_dot_subgraph().

§ output()

void dott::output ( std::ostream &  out)

§ write_dot_subgraph()

void dott::write_dot_subgraph ( std::ostream &  out,
const std::string &  name,
const goto_programt goto_program 
)
protected

writes the dot graph that corresponds to the goto program to the output stream.

parameters: output stream, name and goto program
Returns
true on error, false otherwise

Definition at line 72 of file dot.cpp.

References clusters, escape(), find_next(), from_expr(), function_calls, goto_program_templatet< codeT, guardT >::get_successors(), goto_program_templatet< codeT, guardT >::instructions, ns, exprt::operands(), subgraphscount, and write_edge().

Referenced by output().

§ write_edge()

void dott::write_edge ( std::ostream &  out,
const goto_programt::instructiont &  from,
const goto_programt::instructiont &  to,
const std::string &  label 
)
protected

writes an edge from the from node to the to node and with the given label to the output stream (dot format)

parameters: output stream, from, to and a label
Returns
none

Definition at line 333 of file dot.cpp.

References subgraphscount.

Referenced by write_dot_subgraph().

Member Data Documentation

§ clusters

std::list<exprt> dott::clusters
protected

Definition at line 46 of file dot.cpp.

Referenced by do_dot_function_calls(), output(), and write_dot_subgraph().

§ function_calls

std::list<exprt> dott::function_calls
protected

Definition at line 45 of file dot.cpp.

Referenced by do_dot_function_calls(), and write_dot_subgraph().

§ goto_functions

const goto_functionst& dott::goto_functions
protected

Definition at line 41 of file dot.cpp.

Referenced by output().

§ ns

const namespacet& dott::ns
protected

Definition at line 40 of file dot.cpp.

Referenced by write_dot_subgraph().

§ subgraphscount

unsigned dott::subgraphscount
protected

Definition at line 43 of file dot.cpp.

Referenced by do_dot_function_calls(), write_dot_subgraph(), and write_edge().


The documentation for this class was generated from the following file: