|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmodhelxs.abstractsemantics.NamedEntity
modhelxs.abstractsemantics.Engine
public class Engine
The execution engine of ModHel'X, which drives the abstract semantics of models and blocks.
| Field Summary | |
|---|---|
private java.util.List<ClockOperation<?>> |
clockOperations_
List of clock operations to perform after a non validation. |
static java.lang.String |
EngineLogger
The logger used for logging actions related to the execution of models. |
private Model<?> |
rootModel_
The root model of this engine. |
private Clock<java.lang.Integer> |
snapshot_clock_
The clock that triggers the snapshots of the root model. |
private ClockSet |
solver_
The clock solver used by this engine. |
private Clock<Unit> |
stop_clock_
A clock used to tell the engine to stop. |
| Constructor Summary | |
|---|---|
Engine(java.lang.String name,
Model<?> root)
Build a new execution engine, with name name, and root model root. |
|
| Method Summary | |
|---|---|
void |
addClockOperation(ClockOperation<?> op)
Add a clock operation to perform before the next iteration when the snapshot is not validated. |
private void |
computeSnapshot(ClockSetMark raw_bck)
Compute a snapshot. |
private boolean |
findDrivingClocks()
Find which driving clocks can trigger a snapshot, and return whether we are still running or not. |
Clock<java.lang.Integer> |
getSnapshotClock()
Get the "snapshot" clock of this execution engine. |
ClockSet |
getSolver()
Get the clock solver of this execution engine. |
Clock<Unit> |
getStopClock()
Get the "stop" clock of this execution engine. |
void |
run()
Run the simulation. |
void |
stopAfter(int n)
Stop simulation after n snapshots. |
private void |
waitForDrivingClocks()
Wait for one of the driving clocks to tick. |
| Methods inherited from class modhelxs.abstractsemantics.NamedEntity |
|---|
getName, getProperties, getProperty, hasProperty, removeProperty, setName, setProperties, setProperty, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String EngineLogger
private Model<?> rootModel_
private ClockSet solver_
private Clock<java.lang.Integer> snapshot_clock_
private Clock<Unit> stop_clock_
private java.util.List<ClockOperation<?>> clockOperations_
| Constructor Detail |
|---|
public Engine(java.lang.String name,
Model<?> root)
name, and root model root.
| Method Detail |
|---|
public ClockSet getSolver()
public Clock<Unit> getStopClock()
public Clock<java.lang.Integer> getSnapshotClock()
public void stopAfter(int n)
n snapshots.
public void addClockOperation(ClockOperation<?> op)
private boolean findDrivingClocks()
private void waitForDrivingClocks()
private void computeSnapshot(ClockSetMark raw_bck)
raw_bck contains the state of the ClockSet before solving for the snapshot.
public void run()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||