Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

UTAP::IOInterface Class Reference

The system must be built by TypeChecker/SystemBuilder before IOInterface. More...

#include <iointerface.h>

Inheritance diagram for UTAP::IOInterface:

UTAP::StatementVisitor List of all members.

Public Member Functions

 IOInterface (const char *_title, TimedAutomataSystem &ta)
 Analyse the system and extract I/O information:.
virtual ~IOInterface ()
 Nothing dynamic has been used, no string allocations, therefore no cleanup.
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)

Protected Types

typedef std::set< const char *,
less_str
strs_t
typedef std::map< const iota_t *,
strs_t
iota2strs_t
typedef std::map< const char *,
strs_t
str2strs_t
typedef std::map< const char *,
std::set< iota_t * >, less_str
str2tas_t

Protected Member Functions

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

Protected Attributes

const char * title
std::list< iota_tautomata
str2tas_t receivers
str2tas_t transmiters
strs_t procs
strs_t channels
strs_t variables
iota_tcTA
instance_tcP
const char * cChan
bool inp
bool out
bool sync
bool paramsExpanded
std::stack< std::pair< bool,
bool > > 
ioStack

Classes

struct  iota_t
struct  less_str

Detailed Description

The system must be built by TypeChecker/SystemBuilder before IOInterface.

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.


Member Typedef Documentation

typedef std::map<const iota_t*, strs_t> UTAP::IOInterface::iota2strs_t [protected]
 

typedef std::map<const char*, strs_t> UTAP::IOInterface::str2strs_t [protected]
 

typedef std::map<const char*, std::set<iota_t*>, less_str> UTAP::IOInterface::str2tas_t [protected]
 

typedef std::set<const char*, less_str> UTAP::IOInterface::strs_t [protected]
 


Constructor & Destructor Documentation

IOInterface::IOInterface const char *  _title,
TimedAutomataSystem tas
 

Analyse the system and extract I/O information:.

Visit all processes in the system.

virtual UTAP::IOInterface::~IOInterface  )  [inline, virtual]
 

Nothing dynamic has been used, no string allocations, therefore no cleanup.

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


Member Function Documentation

void IOInterface::addChan const symbol_t ,
strs_t ,
str2tas_t
[protected]
 

void IOInterface::addVar const symbol_t ,
str2strs_t ,
str2tas_t
[protected]
 

bool IOInterface::checkParams const symbol_t s  )  [protected]
 

void UTAP::IOInterface::popIO  )  [inline, protected]
 

void IOInterface::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.

void IOInterface::printForTron std::ostream &  os  ) 
 

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

void UTAP::IOInterface::pushIO  )  [inline, protected]
 

int32_t IOInterface::visitBlockStatement BlockStatement stat  )  [virtual]
 

Implements UTAP::StatementVisitor.

int32_t IOInterface::visitBreakStatement BreakStatement stat  )  [virtual]
 

Implements UTAP::StatementVisitor.

int32_t IOInterface::visitCaseStatement CaseStatement stat  )  [virtual]
 

Implements UTAP::StatementVisitor.

int32_t IOInterface::visitContinueStatement ContinueStatement stat  )  [virtual]
 

Implements UTAP::StatementVisitor.

int32_t IOInterface::visitDefaultStatement DefaultStatement stat  )  [virtual]
 

Implements UTAP::StatementVisitor.

int32_t IOInterface::visitDoWhileStatement DoWhileStatement stat  )  [virtual]
 

Implements UTAP::StatementVisitor.

int32_t IOInterface::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 IOInterface::visitExpression const expression_t  )  [protected]
 

int32_t IOInterface::visitExprStatement ExprStatement stat  )  [virtual]
 

Implements UTAP::StatementVisitor.

int32_t IOInterface::visitForStatement ForStatement stat  )  [virtual]
 

Implements UTAP::StatementVisitor.

int32_t IOInterface::visitIfStatement IfStatement stat  )  [virtual]
 

Implements UTAP::StatementVisitor.

int32_t IOInterface::visitIterationStatement IterationStatement stat  )  [virtual]
 

Implements UTAP::StatementVisitor.

void IOInterface::visitProcess instance_t  )  [protected]
 

int32_t IOInterface::visitReturnStatement ReturnStatement stat  )  [virtual]
 

Implements UTAP::StatementVisitor.

int32_t IOInterface::visitSwitchStatement SwitchStatement stat  )  [virtual]
 

Implements UTAP::StatementVisitor.

int32_t IOInterface::visitWhileStatement WhileStatement stat  )  [virtual]
 

Implements UTAP::StatementVisitor.


Member Data Documentation

std::list<iota_t> UTAP::IOInterface::automata [protected]
 

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

strs_t UTAP::IOInterface::channels [protected]
 

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

iota_t* UTAP::IOInterface::cTA [protected]
 

bool UTAP::IOInterface::inp [protected]
 

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

bool UTAP::IOInterface::out [protected]
 

bool UTAP::IOInterface::paramsExpanded [protected]
 

strs_t UTAP::IOInterface::procs [protected]
 

str2tas_t UTAP::IOInterface::receivers [protected]
 

bool UTAP::IOInterface::sync [protected]
 

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

str2tas_t UTAP::IOInterface::transmiters [protected]
 

strs_t UTAP::IOInterface::variables [protected]
 


The documentation for this class was generated from the following files:
Generated on Sat Apr 29 21:02:14 2006 for libutap by  doxygen 1.4.2