#include <strat.h>
Inheritance diagram for strat:


Public Member Functions | |
| strat () | |
| Basic Constructor. | |
| virtual | ~strat () |
| Destructor. | |
| void | init (eventQueue *q, rep *obj, sim *p, int pIdx) |
| Initializer. | |
| virtual void | initSync () |
| Initialize synchronization strategy type (optimistic or conservative). | |
| virtual void | Step () |
| Code here MUST be overridden, but this gives a basic idea of how a forward execution step should go. | |
| virtual void | Rollback () |
| Strategy-specific rollback. | |
| virtual void | CancelEvents () |
| Strategy-specific event cancellation. | |
| virtual POSE_TimeType | SafeTime () |
| Calculate safe time (earliest time at which object can generate events). | |
Data Fields | |
| int | STRAT_T |
| Type of strategy; see defines above. | |
| Event * | targetEvent |
| Used by strategy to denote point in event queue to 1) rollback to 2) checkpoint up to etc. | |
| Event * | currentEvent |
| Current event being executed. | |
Protected Attributes | |
| localStat * | localStats |
| PVT * | localPVT |
| Local PVT branch. | |
| eventQueue * | eq |
| Pointer to the eventQueue in the poser wrapper. | |
| rep * | userObj |
| Pointer to the representation object in the poser wrapper. | |
| sim * | parent |
| Pointer to the poser wrapper. | |
Definition at line 20 of file strat.h.
| strat::strat | ( | ) |
Basic Constructor.
Definition at line 5 of file strat.C.
References CkLocalBranch(), currentEvent, eq, localPVT, localStats, parent, pose_config, POSE_Config::stats, STRAT_T, targetEvent, theLocalStats, ThePVT, and userObj.
| void strat::init | ( | eventQueue * | q, | |
| rep * | obj, | |||
| sim * | p, | |||
| int | pIdx | |||
| ) |
| virtual void strat::initSync | ( | ) | [inline, virtual] |
| void strat::Step | ( | ) | [virtual] |
Code here MUST be overridden, but this gives a basic idea of how a forward execution step should go.
Strategies must determine if it is safe to execute an event.
Reimplemented in adapt, adapt2, adapt3, adapt4, con, opt, opt2, opt3, seq, and spec.
Definition at line 28 of file strat.C.
References sim::Activate(), currentEvent, eventQueue::currentPtr, sim::Deactivate(), Event::done, eq, Event::fnIdx, Event::msg, parent, POSE_Objects, sim::ResolveFn(), eventQueue::ShiftEvent(), and Event::timestamp.
Referenced by sim::Cancel(), and sim::Step().
| virtual void strat::Rollback | ( | ) | [inline, virtual] |
| virtual void strat::CancelEvents | ( | ) | [inline, virtual] |
| virtual POSE_TimeType strat::SafeTime | ( | ) | [inline, virtual] |
Calculate safe time (earliest time at which object can generate events).
Reimplemented in con, and opt.
Definition at line 61 of file strat.h.
References rep::OVT(), and userObj.
Referenced by sim::Status().
localStat* strat::localStats [protected] |
Definition at line 24 of file strat.h.
Referenced by opt::Rollback(), spec::Step(), opt3::Step(), opt2::Step(), opt::Step(), con::Step(), adapt4::Step(), adapt3::Step(), adapt2::Step(), adapt::Step(), and strat().
PVT* strat::localPVT [protected] |
Local PVT branch.
Definition at line 27 of file strat.h.
Referenced by con::CancelEvents(), opt::CancelSpawn(), opt::Rollback(), opt::SafeTime(), con::SafeTime(), spec::Step(), opt3::Step(), opt2::Step(), opt::Step(), con::Step(), adapt4::Step(), adapt3::Step(), adapt2::Step(), adapt::Step(), and strat().
eventQueue* strat::eq [protected] |
Pointer to the eventQueue in the poser wrapper.
Definition at line 29 of file strat.h.
Referenced by opt::AddSpawnedEvent(), con::CancelEvents(), init(), opt::Rollback(), opt::SafeTime(), con::SafeTime(), Step(), spec::Step(), seq::Step(), opt3::Step(), opt2::Step(), opt::Step(), con::Step(), adapt4::Step(), adapt3::Step(), adapt2::Step(), adapt::Step(), and strat().
rep* strat::userObj [protected] |
Pointer to the representation object in the poser wrapper.
Definition at line 31 of file strat.h.
Referenced by init(), opt::Rollback(), SafeTime(), opt::SafeTime(), con::SafeTime(), seq::Step(), adapt4::Step(), and strat().
sim* strat::parent [protected] |
Pointer to the poser wrapper.
Definition at line 33 of file strat.h.
Referenced by con::CancelEvents(), init(), seq::initSync(), opt::initSync(), con::initSync(), opt::Rollback(), opt::SafeTime(), con::SafeTime(), Step(), spec::Step(), seq::Step(), opt3::Step(), opt2::Step(), opt::Step(), con::Step(), adapt4::Step(), adapt3::Step(), adapt2::Step(), adapt::Step(), and strat().
Type of strategy; see defines above.
Definition at line 36 of file strat.h.
Referenced by adapt::adapt(), adapt2::adapt2(), adapt3::adapt3(), adapt4::adapt4(), opt::opt(), opt2::opt2(), opt3::opt3(), seq::seq(), spec::spec(), sim::Step(), and strat().
Used by strategy to denote point in event queue to 1) rollback to 2) checkpoint up to etc.
Definition at line 40 of file strat.h.
Referenced by chpt< StateType >::restore(), opt::Rollback(), and strat().
Current event being executed.
Definition at line 42 of file strat.h.
Referenced by chpt< StateType >::checkpoint(), sim::CommitError(), sim::InternalCommitPrintf(), chpt< StateType >::restore(), opt::Rollback(), Step(), spec::Step(), seq::Step(), opt3::Step(), opt2::Step(), opt::Step(), con::Step(), adapt4::Step(), adapt3::Step(), adapt2::Step(), adapt::Step(), and strat().
1.5.1