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

UTAP::SystemBuilder Class Reference

This class constructs a TimedAutomataSystem. More...

#include <systembuilder.h>

Inheritance diagram for UTAP::SystemBuilder:

UTAP::ExpressionBuilder UTAP::AbstractBuilder UTAP::ParserBuilder List of all members.

Public Member Functions

 SystemBuilder (TimedAutomataSystem *)
virtual void typeArrayOfSize (size_t)
 Called to create an array type.
virtual void typeArrayOfType (size_t)
 Called to create an array type.
virtual void typeStruct (PREFIX, uint32_t fields)
 Used to construct a new struct type, which is then pushed onto the type stack.
virtual void structField (const char *name)
 Used to declare the fields of a structure.
virtual void declTypeDef (const char *name)
 A type definition.
virtual void declVar (const char *name, bool init)
 Declare a new variable of the given name.
virtual void declInitialiserList (uint32_t num)
virtual void declFieldInit (const char *name)
virtual void declProgress (bool)
 Guard progress measure declaration.
virtual void declParameter (const char *name, bool)
virtual void declFuncBegin (const char *name)
virtual void declFuncEnd ()
virtual void procBegin (const char *name)
virtual void procEnd ()
virtual void procState (const char *name, bool hasInvariant)
 Add a state to the current template.
virtual void procStateCommit (const char *name)
virtual void procStateUrgent (const char *name)
virtual void procStateWinning (const char *name)
virtual void procStateLosing (const char *name)
virtual void procStateInit (const char *name)
virtual void procEdgeBegin (const char *from, const char *to, const bool control)
virtual void procEdgeEnd (const char *from, const char *to)
virtual void procSelect (const char *id)
virtual void procGuard ()
virtual void procSync (Constants::synchronisation_t type)
virtual void procUpdate ()
virtual void blockBegin ()
virtual void blockEnd ()
virtual void emptyStatement ()
virtual void forBegin ()
virtual void forEnd ()
virtual void iterationBegin (const char *name)
virtual void iterationEnd (const char *name)
virtual void whileBegin ()
virtual void whileEnd ()
virtual void doWhileBegin ()
virtual void doWhileEnd ()
virtual void ifBegin ()
virtual void ifElse ()
virtual void ifEnd (bool)
virtual void exprStatement ()
virtual void returnStatement (bool)
virtual void exprCallBegin ()
virtual void instantiationBegin (const char *, size_t, const char *)
virtual void instantiationEnd (const char *, size_t, const char *, size_t)
virtual void process (const char *)
virtual void done ()
virtual void beforeUpdate ()
virtual void afterUpdate ()
virtual void incProcPriority ()
virtual void incChanPriority ()
virtual void chanPriority ()
virtual void procPriority (const char *)
virtual void defaultChanPriority ()

Protected Member Functions

declarations_tgetCurrentDeclarationBlock ()

Protected Attributes

int32_t currentChanPriority
 The current channel priority level.
int32_t currentProcPriority
 The current process priority level.
frame_t params
 The params frame is used temporarily during parameter parsing.
function_tcurrentFun
 The function currently being parsed.
edge_tcurrentEdge
 The edge under construction.
std::vector< BlockStatement * > blocks
 Stack of nested statement blocks.
std::vector< type_tfields
 The types of a struct.
std::vector< std::string > labels
 The labels of a struct.

Detailed Description

This class constructs a TimedAutomataSystem.

It avoids as much type checking as possible - type checking should be done with the TypeChecker class. However some checks are more convenient to do in SystemBuilder:

Left hand side expressions are assigned the correct type by SystemBuilder; if not it would be difficult to represent dot-expressions.

SystemBuilder does not

Use TypeChecker for these things.


Constructor & Destructor Documentation

SystemBuilder::SystemBuilder TimedAutomataSystem  ) 
 


Member Function Documentation

void SystemBuilder::afterUpdate  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::beforeUpdate  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::blockBegin  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::blockEnd  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::chanPriority  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::declFieldInit const char *  name  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::declFuncBegin const char *  name  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::declFuncEnd  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::declInitialiserList uint32_t  num  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::declParameter const char *  name,
bool 
[virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::declProgress bool   )  [virtual]
 

Guard progress measure declaration.

Requires two expressions if hasGuard is true, otherwise one.

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::declTypeDef const char *  name  )  [virtual]
 

A type definition.

Assign the name to the given type on the type fragment stack. In case of array types, dim constant expressions are expected on and popped from the expression stack.

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::declVar const char *  name,
bool  hasInit
[virtual]
 

Declare a new variable of the given name.

The type is expected to be on the type stack. If the variable has an initialiser (the init parameter is true), then a constant expression is expected at the top of the expression stack. The expressions will be popped of the stack (the type is left untouched).

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::defaultChanPriority  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::done  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::doWhileBegin  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::doWhileEnd  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::emptyStatement  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::exprCallBegin  )  [virtual]
 

Reimplemented from UTAP::ExpressionBuilder.

void SystemBuilder::exprStatement  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::forBegin  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::forEnd  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

declarations_t * SystemBuilder::getCurrentDeclarationBlock  )  [protected]
 

void SystemBuilder::ifBegin  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::ifElse  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::ifEnd bool   )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::incChanPriority  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::incProcPriority  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::instantiationBegin const char *  ,
size_t  ,
const char * 
[virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::instantiationEnd const char *  ,
size_t  ,
const char *  ,
size_t 
[virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::iterationBegin const char *  name  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::iterationEnd const char *  name  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::procBegin const char *  name  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::procEdgeBegin const char *  from,
const char *  to,
const bool  control
[virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::procEdgeEnd const char *  from,
const char *  to
[virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::procEnd  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::process const char *   )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::procGuard  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::procPriority const char *   )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::procSelect const char *  id  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::procState const char *  name,
bool  hasInvariant
[virtual]
 

Add a state to the current template.

An invariant expression is expected on and popped from the expression stack if hasInvariant is true.

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::procStateCommit const char *  name  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::procStateInit const char *  name  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::procStateLosing const char *  name  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::procStateUrgent const char *  name  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::procStateWinning const char *  name  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::procSync Constants::synchronisation_t  type  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::procUpdate  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::returnStatement bool   )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::structField const char *  name  )  [virtual]
 

Used to declare the fields of a structure.

The type of the field is expected to be on the type fragment stack.

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::typeArrayOfSize size_t   )  [virtual]
 

Called to create an array type.

The size of the array was previously pushed as an expression.

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::typeArrayOfType size_t   )  [virtual]
 

Called to create an array type.

The size of the array was previously pushed as a type.

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::typeStruct PREFIX  prefix,
uint32_t  n
[virtual]
 

Used to construct a new struct type, which is then pushed onto the type stack.

The type is based on n fields, which are expected to be on and will be popped off the type stack.

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::whileBegin  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.

void SystemBuilder::whileEnd  )  [virtual]
 

Reimplemented from UTAP::AbstractBuilder.


Member Data Documentation

std::vector<BlockStatement*> UTAP::SystemBuilder::blocks [protected]
 

Stack of nested statement blocks.

int32_t UTAP::SystemBuilder::currentChanPriority [protected]
 

The current channel priority level.

edge_t* UTAP::SystemBuilder::currentEdge [protected]
 

The edge under construction.

function_t* UTAP::SystemBuilder::currentFun [protected]
 

The function currently being parsed.

int32_t UTAP::SystemBuilder::currentProcPriority [protected]
 

The current process priority level.

std::vector<type_t> UTAP::SystemBuilder::fields [protected]
 

The types of a struct.

std::vector<std::string> UTAP::SystemBuilder::labels [protected]
 

The labels of a struct.

frame_t UTAP::SystemBuilder::params [protected]
 

The params frame is used temporarily during parameter parsing.


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