UTAP::SignalFlow Class Reference

Class SignalFlow is for analysing UPPAAL specifications and extracting the timed automata input/output "interface" information which can be treated as a data flow or entity-relationship map of the system. More...

#include <signalflow.h>

Inheritance diagram for UTAP::SignalFlow:

UTAP::StatementVisitor UTAP::Partitioner List of all members.

Public Types

typedef std::set< const char *,
const less_str
strs_t
typedef std::map< const proc_t *,
strs_t
proc2strs_t
typedef std::map< const char *,
strs_t
str2strs_t
typedef std::set< proc_t * > procs_t
typedef std::map< const char *,
procs_t, less_str
str2procs_t

Public Member Functions

 SignalFlow (const char *_title, TimedAutomataSystem &ta)
 Analyse the system and extract I/O information:.
void setVerbose (int verbose)
virtual ~SignalFlow ()
 All strings are from TASystem (don't dispose TASystem before SignalFlow).
void printForTron (std::ostream &os)
 Print I/O information in TRON format into given output stream.
void printForDot (std::ostream &os, bool ranked, bool erd, bool cEdged)
 Print I/O information in DOT format into given output stream.
int32_t visitEmptyStatement (EmptyStatement *stat)
 System visitor pattern extracts read/write information from UCode.
int32_t visitExprStatement (ExprStatement *stat)
int32_t visitForStatement (ForStatement *stat)
int32_t visitIterationStatement (IterationStatement *stat)
int32_t visitWhileStatement (WhileStatement *stat)
int32_t visitDoWhileStatement (DoWhileStatement *stat)
int32_t visitBlockStatement (BlockStatement *stat)
int32_t visitSwitchStatement (SwitchStatement *stat)
int32_t visitCaseStatement (CaseStatement *stat)
int32_t visitDefaultStatement (DefaultStatement *stat)
int32_t visitIfStatement (IfStatement *stat)
int32_t visitBreakStatement (BreakStatement *stat)
int32_t visitContinueStatement (ContinueStatement *stat)
int32_t visitReturnStatement (ReturnStatement *stat)
int32_t visitAssertStatement (UTAP::AssertStatement *stat)

Protected Member Functions

bool checkParams (const symbol_t &s)
void addChan (const symbol_t &, strs_t &, str2procs_t &)
void addVar (const symbol_t &, str2strs_t &, str2procs_t &)
void visitProcess (instance_t &)
void visitExpression (const expression_t &)
void pushIO ()
void popIO ()

Protected Attributes

int verbosity
const char * title
procs_t procs
str2procs_t receivers
str2procs_t transmiters
strs_t processes
strs_t channels
strs_t variables
proc_tcTA
instance_tcP
const char * cChan
bool inp
bool out
bool sync
bool paramsExpanded
std::stack< std::pair< bool,
bool > > 
ioStack

Classes

struct  less_str
struct  proc_t

Detailed Description

Class SignalFlow is for analysing UPPAAL specifications and extracting the timed automata input/output "interface" information which can be treated as a data flow or entity-relationship map of the system.

The result can be processed by the dot (graphviz.org) to produce a "human-readable" picture. The other (tron) format is used in TRON project. Feel free to add more "formats" and/or tune the dot output.

The system must be built by TypeChecker/SystemBuilder before SignalFlow. Simply create using constructor and then use print* methods. The rest of methods are used internally by visitor pattern. Feel free to add new print* methods or inheriting classes.

Author: Marius Mikucionis <marius@cs.aau.dk>


Member Typedef Documentation

typedef std::map<const proc_t*, strs_t> UTAP::SignalFlow::proc2strs_t

typedef std::set<proc_t*> UTAP::SignalFlow::procs_t

typedef std::map<const char*, procs_t, less_str> UTAP::SignalFlow::str2procs_t

typedef std::map<const char*, strs_t> UTAP::SignalFlow::str2strs_t

typedef std::set<const char*, const less_str> UTAP::SignalFlow::strs_t


Constructor & Destructor Documentation

SignalFlow::SignalFlow ( const char *  _title,
TimedAutomataSystem ta 
)

Analyse the system and extract I/O information:.

SignalFlow::~SignalFlow (  )  [virtual]

All strings are from TASystem (don't dispose TASystem before SignalFlow).


Member Function Documentation

void SignalFlow::addChan ( const symbol_t ,
strs_t ,
str2procs_t  
) [protected]

void SignalFlow::addVar ( const symbol_t ,
str2strs_t ,
str2procs_t  
) [protected]

bool SignalFlow::checkParams ( const symbol_t s  )  [protected]

void UTAP::SignalFlow::popIO (  )  [inline, protected]

void UTAP::SignalFlow::printForDot ( std::ostream &  os,
bool  ranked,
bool  erd,
bool  cEdged 
)

Print I/O information in DOT format into given output stream.

ranked -- puts oposite "ranks" on variables and channels erd -- puts boxes and diamonds rather than (compact) ellipses. cEdged -- channels are moved on edges rather than separate nodes.

Reimplemented in UTAP::Partitioner.

void UTAP::SignalFlow::printForTron ( std::ostream &  os  ) 

Print I/O information in TRON format into given output stream.

void UTAP::SignalFlow::pushIO (  )  [inline, protected]

void UTAP::SignalFlow::setVerbose ( int  verbose  )  [inline]

int32_t SignalFlow::visitAssertStatement ( UTAP::AssertStatement stat  )  [virtual]

Implements UTAP::StatementVisitor.

int32_t SignalFlow::visitBlockStatement ( BlockStatement stat  )  [virtual]

Implements UTAP::StatementVisitor.

int32_t SignalFlow::visitBreakStatement ( BreakStatement stat  )  [virtual]

Implements UTAP::StatementVisitor.

int32_t SignalFlow::visitCaseStatement ( CaseStatement stat  )  [virtual]

Implements UTAP::StatementVisitor.

int32_t SignalFlow::visitContinueStatement ( ContinueStatement stat  )  [virtual]

Implements UTAP::StatementVisitor.

int32_t SignalFlow::visitDefaultStatement ( DefaultStatement stat  )  [virtual]

Implements UTAP::StatementVisitor.

int32_t SignalFlow::visitDoWhileStatement ( DoWhileStatement stat  )  [virtual]

Implements UTAP::StatementVisitor.

int32_t SignalFlow::visitEmptyStatement ( EmptyStatement stat  )  [virtual]

System visitor pattern extracts read/write information from UCode.

This is actually "const" visitor and should contain "const Statement *stat". Not tested (contains sample implementation but tested only on v3.4 specs).

Implements UTAP::StatementVisitor.

void SignalFlow::visitExpression ( const expression_t  )  [protected]

int32_t SignalFlow::visitExprStatement ( ExprStatement stat  )  [virtual]

Implements UTAP::StatementVisitor.

int32_t SignalFlow::visitForStatement ( ForStatement stat  )  [virtual]

Implements UTAP::StatementVisitor.

int32_t SignalFlow::visitIfStatement ( IfStatement stat  )  [virtual]

Implements UTAP::StatementVisitor.

int32_t SignalFlow::visitIterationStatement ( IterationStatement stat  )  [virtual]

Implements UTAP::StatementVisitor.

void SignalFlow::visitProcess ( instance_t  )  [protected]

int32_t SignalFlow::visitReturnStatement ( ReturnStatement stat  )  [virtual]

Implements UTAP::StatementVisitor.

int32_t SignalFlow::visitSwitchStatement ( SwitchStatement stat  )  [virtual]

Implements UTAP::StatementVisitor.

int32_t SignalFlow::visitWhileStatement ( WhileStatement stat  )  [virtual]

Implements UTAP::StatementVisitor.


Member Data Documentation

const char* UTAP::SignalFlow::cChan [protected]

strs_t UTAP::SignalFlow::channels [protected]

instance_t* UTAP::SignalFlow::cP [protected]

proc_t* UTAP::SignalFlow::cTA [protected]

bool UTAP::SignalFlow::inp [protected]

std::stack<std::pair<bool, bool> > UTAP::SignalFlow::ioStack [protected]

bool UTAP::SignalFlow::out [protected]

bool UTAP::SignalFlow::paramsExpanded [protected]

strs_t UTAP::SignalFlow::processes [protected]

procs_t UTAP::SignalFlow::procs [protected]

str2procs_t UTAP::SignalFlow::receivers [protected]

bool UTAP::SignalFlow::sync [protected]

const char* UTAP::SignalFlow::title [protected]

str2procs_t UTAP::SignalFlow::transmiters [protected]

strs_t UTAP::SignalFlow::variables [protected]

int UTAP::SignalFlow::verbosity [protected]


The documentation for this class was generated from the following files:
Generated on Thu Feb 22 14:46:53 2007 for libutap by  doxygen 1.4.7