UTAP::Partitioner Class Reference

Partitions the system into environment and IUT according to TRON assumptions. More...

#include <signalflow.h>

Inheritance diagram for UTAP::Partitioner:

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

Public Member Functions

 Partitioner (const char *_title, TimedAutomataSystem &ta)
 ~Partitioner ()
int partition (const strs_t &inputs, const strs_t &outputs)
int partition (std::istream &ioinfo)
void printForDot (std::ostream &os, bool ranked, bool erd, bool cEdged)
 Print I/O information in DOT format into given output stream.
void printViolation (const proc_t *process, const char *variable)
void fillWithEnvProcs (strs_t &procs)
void fillWithIUTProcs (strs_t &procs)

Protected Member Functions

void addProcs (const strs_t &chans, const str2procs_t &index, procs_t &result, procs_t &exclude)
 Adds processes to the result which use the channels from chans list according to index.
void addIntChans (const procs_t &procs, strs_t &result, strs_t &exclude)
 Takes the internal channels of each process from procs list and adds them to the result list.
void addIntVars (const procs_t &procs, strs_t &result, strs_t &exclude)
 Takes the variables of each process from procs list and adds them to the result list.
void addProcsByVars (const strs_t &vars, procs_t &procs, procs_t &exclude)
 Take all variables and add all accessing processes to the list.

Protected Attributes

procs_t procsEnv
procs_t procsIUT
procs_t procsBad
strs_t chansIntEnv
strs_t chansIntIUT
strs_t observable
strs_t chansBad
strs_t varsEnv
strs_t varsIUT
strs_t varsBad
strs_t chansInp
strs_t chansOut
const char * rule

Detailed Description

Partitions the system into environment and IUT according to TRON assumptions.

inputs/outputs are channel names. Environment processes shout on inputs and listens to outputs, while IUT processes shout on outputs and listen to inputs. There are additional rules to complete the partitioning (to cathegorize the internal processes): 1) channels, that are not declared as inputs/outputs, are non-observable, called internal. 2) internal channel belongs to environment (IUT) if it is used by environment (IUT) process (respectively). Model is inconsistent and cannot be partitioned if the internal channel is used by both environment and IUT. 3) process belongs to environment (IUT) if it uses the internal environment (IUT) channel (respectively). 4) variable belongs to environment (IUT) if it is accessed by environment (IUT) process without observable input/output channel synchronization. Variable is not cathegorized (can be either) if accessed consistently only during observable input/output channel synchronization. 5) process belongs to environment (IUT) if accesses environment (IUT) variable (respectively) without observable channel synchronization. Returns: 0 if partitioning was consistent and complete, 1 if partitioning was consistent but incomplete (some proc/chan is free) 2 if partitioning was inconsistent (some proc/chan/var is both Env and IUT)


Constructor & Destructor Documentation

UTAP::Partitioner::Partitioner ( const char *  _title,
TimedAutomataSystem ta 
) [inline]

Partitioner::~Partitioner (  ) 


Member Function Documentation

void Partitioner::addIntChans ( const procs_t procs,
strs_t result,
strs_t exclude 
) [protected]

Takes the internal channels of each process from procs list and adds them to the result list.

Reports inconcistency if channel is in the exclude list.

void Partitioner::addIntVars ( const procs_t procs,
strs_t result,
strs_t exclude 
) [protected]

Takes the variables of each process from procs list and adds them to the result list.

Reports inconcistency if variable is in the exclude list.

void Partitioner::addProcs ( const strs_t chans,
const str2procs_t index,
procs_t result,
procs_t exclude 
) [protected]

Adds processes to the result which use the channels from chans list according to index.

Reports inconsistency if some process happens to be in exclude list.

void Partitioner::addProcsByVars ( const strs_t vars,
procs_t procs,
procs_t exclude 
) [protected]

Take all variables and add all accessing processes to the list.

Report inconcistencies if process happens to be in exclude list.

void Partitioner::fillWithEnvProcs ( strs_t procs  ) 

void Partitioner::fillWithIUTProcs ( strs_t procs  ) 

int UTAP::Partitioner::partition ( std::istream &  ioinfo  ) 

int Partitioner::partition ( const strs_t inputs,
const strs_t outputs 
)

void UTAP::Partitioner::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 from UTAP::SignalFlow.

void Partitioner::printViolation ( const proc_t *  process,
const char *  variable 
) [inline]


Member Data Documentation

strs_t UTAP::Partitioner::chansBad [protected]

strs_t UTAP::Partitioner::chansInp [protected]

strs_t UTAP::Partitioner::chansIntEnv [protected]

strs_t UTAP::Partitioner::chansIntIUT [protected]

strs_t UTAP::Partitioner::chansOut [protected]

strs_t UTAP::Partitioner::observable [protected]

procs_t UTAP::Partitioner::procsBad [protected]

procs_t UTAP::Partitioner::procsEnv [protected]

procs_t UTAP::Partitioner::procsIUT [protected]

const char* UTAP::Partitioner::rule [protected]

strs_t UTAP::Partitioner::varsBad [protected]

strs_t UTAP::Partitioner::varsEnv [protected]

strs_t UTAP::Partitioner::varsIUT [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