DREAM::IFInterpreter Class Reference

The IFInterpreter class generates input for the IF toolset from the DREAM models. More...

#include <IFInterpreter.h>

List of all members.

Public Member Functions

 IFInterpreter (DREAM::System *system_ptr)
 Constructor.
 ~IFInterpreter ()
 Destructor.
void visitor_if (char *outputFile)
 Generates the IF system description.

Private Member Functions

std::string create_fixedpriority_exec_assignment (NODE_MAP *node_map, std::string scheduler_id, const DREAM::Node *const node)
 Creates an assignment that preempts lower priority tasks to model fixed-priority scheduling based on priorities.
std::string create_fixedpriority_guard (NODE_MAP *node_map, std::string scheduler_id, const DREAM::Node *const node)
 Creates guard condition to model fixed-priority scheduling based on priorities.
std::string create_fixedpriority_back_guard (NODE_MAP *node_map, std::string scheduler_id, const DREAM::Node *const node)
 Creates guard condition for going back to the initial state to model fixed-priority scheduling based on priorities.
std::string create_fixedpriority_preemption_guard (NODE_MAP *node_map, std::string scheduler_id, const DREAM::Node *const node)
 Creates guard condition for the preemptions within schedule_ states.
bool highestpriority (DREAM::Node *task_ptr)
 Determines whether the Task is the highest priority Task in the Scheduler.
bool lowestpriority (DREAM::Node *task_ptr)
 Determines whether the Task is the lowest priority Task in the Scheduler.

Private Attributes

DREAM::Systemsystem_ptr_
 Pointer to store the DREAM system.
std::string filename_
 String storing the name of the generated file.


Detailed Description

The IFInterpreter class generates input for the IF toolset from the DREAM models.

Definition at line 60 of file IFInterpreter.h.


Constructor & Destructor Documentation

DREAM::IFInterpreter::IFInterpreter ( DREAM::System system_ptr  ) 

Constructor.

Parameters:
system_ptr is the pointer to the system to be output.

Definition at line 56 of file IFInterpreter.cpp.

DREAM::IFInterpreter::~IFInterpreter (  ) 

Destructor.

Definition at line 61 of file IFInterpreter.cpp.


Member Function Documentation

void DREAM::IFInterpreter::visitor_if ( char *  outputFile  ) 

Generates the IF system description.

It uses the visitor pattern to get the data from the DREAM models.

Parameters:
outputFile specifies the output file to be generated.

Definition at line 208 of file IFInterpreter.cpp.

Referenced by main().

std::string DREAM::IFInterpreter::create_fixedpriority_exec_assignment ( NODE_MAP node_map,
std::string  scheduler_id,
const DREAM::Node *const  node 
) [private]

Creates an assignment that preempts lower priority tasks to model fixed-priority scheduling based on priorities.

Parameters:
node_map contains the Nodes in the Scheduler.
scheduler_id specifies the Scheduler id.
node is used to calculate the priority level used in the guard.

Definition at line 65 of file IFInterpreter.cpp.

References DREAM::Node::id(), and DREAM::Node::priority().

std::string DREAM::IFInterpreter::create_fixedpriority_guard ( NODE_MAP node_map,
std::string  scheduler_id,
const DREAM::Node *const  node 
) [private]

Creates guard condition to model fixed-priority scheduling based on priorities.

Parameters:
node_map contains the Nodes in the Scheduler.
scheduler_id specifies the Scheduler id.
node is used to calculate the priority level used in the guard.

Definition at line 99 of file IFInterpreter.cpp.

References DREAM::Node::id(), DREAM::Node::priority(), and DREAM::Node::subpriority().

std::string DREAM::IFInterpreter::create_fixedpriority_back_guard ( NODE_MAP node_map,
std::string  scheduler_id,
const DREAM::Node *const  node 
) [private]

Creates guard condition for going back to the initial state to model fixed-priority scheduling based on priorities.

Parameters:
node_map contains the Nodes in the Scheduler.
scheduler_id specifies the Scheduler id.
node is used to calculate the priority level used in the guard.

Definition at line 135 of file IFInterpreter.cpp.

References DREAM::Node::priority(), and DREAM::Node::subpriority().

std::string DREAM::IFInterpreter::create_fixedpriority_preemption_guard ( NODE_MAP node_map,
std::string  scheduler_id,
const DREAM::Node *const  node 
) [private]

Creates guard condition for the preemptions within schedule_ states.

Parameters:
node_map contains the Nodes in the Scheduler.
scheduler_id specifies the Scheduler id.
node is used to calculate the priority level used in the guard.

Definition at line 168 of file IFInterpreter.cpp.

References DREAM::Node::priority().

bool DREAM::IFInterpreter::highestpriority ( DREAM::Node task_ptr  )  [private]

Determines whether the Task is the highest priority Task in the Scheduler.

Used to reduce state space caused by preemptions.

Parameters:
task_ptr is a pointer to the Task to be checked.
Returns:
true if the Task is the highest priority Task in the Scheduler, false otherwise.

Definition at line 198 of file IFInterpreter.cpp.

References DREAM::Scheduler::highestpriority(), and DREAM::Node::scheduler().

bool DREAM::IFInterpreter::lowestpriority ( DREAM::Node task_ptr  )  [private]

Determines whether the Task is the lowest priority Task in the Scheduler.

Used to reduce state space caused by preemptions.

Parameters:
task_ptr is a pointer to the Task to be checked.
Returns:
true if the Task is the lowest priority Task in the Scheduler, false otherwise.

Definition at line 203 of file IFInterpreter.cpp.

References DREAM::Scheduler::lowestpriority(), and DREAM::Node::scheduler().


Member Data Documentation

DREAM::System* DREAM::IFInterpreter::system_ptr_ [private]

Pointer to store the DREAM system.

Definition at line 142 of file IFInterpreter.h.

std::string DREAM::IFInterpreter::filename_ [private]

String storing the name of the generated file.

Definition at line 145 of file IFInterpreter.h.


The documentation for this class was generated from the following files:
Generated on Fri Jul 27 18:30:04 2007 for DREAM by  doxygen 1.5.1