#include <IFInterpreter.h>
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::System * | system_ptr_ |
Pointer to store the DREAM system. | |
std::string | filename_ |
String storing the name of the generated file. |
Definition at line 60 of file IFInterpreter.h.
DREAM::IFInterpreter::IFInterpreter | ( | DREAM::System * | system_ptr | ) |
Constructor.
system_ptr | is the pointer to the system to be output. |
Definition at line 56 of file IFInterpreter.cpp.
DREAM::IFInterpreter::~IFInterpreter | ( | ) |
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.
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.
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.
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.
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.
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.
task_ptr | is a pointer to the Task to be checked. |
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.
task_ptr | is a pointer to the Task to be checked. |
Definition at line 203 of file IFInterpreter.cpp.
References DREAM::Scheduler::lowestpriority(), and DREAM::Node::scheduler().
DREAM::System* DREAM::IFInterpreter::system_ptr_ [private] |
std::string DREAM::IFInterpreter::filename_ [private] |