Package org.mpi_sws.jmc.strategies
Interface ReplayableSchedulingStrategy
- All Superinterfaces:
SchedulingStrategy
- All Known Implementing Classes:
RandomSchedulingStrategy,TrustStrategy
A ReplayableSchedulingStrategy is a scheduling strategy that can record and replay its execution
trace. This is useful for debugging and testing purposes, allowing the same sequence of events to
be replayed multiple times.
The storage and management of the recorded trace is implementation-specific.
recordTrace() will be called by the model checker whenever a AssertionError is thrown during the execution of the scheduling strategy. This allows the strategy to capture the current state of the scheduling decisions made up to that point, which can then be replayed to reproduce the error or analyze the behavior of the system.
replayRecordedTrace() will be called to replay the recorded trace. The checker will call this method before initIteration() and allows the strategy to fetch the recorded trace and setup to allow replaying in the subsequent iteration.
-
Method Summary
Modifier and TypeMethodDescriptionvoidRecords the current execution trace of the scheduling strategy.voidReplays the recorded execution trace of the scheduling strategy.Methods inherited from interface org.mpi_sws.jmc.strategies.SchedulingStrategy
initIteration, nextTask, resetIteration, teardown, updateEvent
-
Method Details
-
recordTrace
Records the current execution trace of the scheduling strategy.- Throws:
JmcCheckerException
-
replayRecordedTrace
Replays the recorded execution trace of the scheduling strategy.- Throws:
JmcCheckerException
-