|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmodhelxs.abstractsemantics.NamedEntity
modhelxs.abstractsemantics.ModelOfComputation<T>
public abstract class ModelOfComputation<T extends java.lang.Comparable<? super T>>
A ModelOfComputation models the rules for combining the behavior of the blocks in a structure.
| Constructor Summary | |
|---|---|
ModelOfComputation(java.lang.String name)
|
|
| Method Summary | |
|---|---|
abstract boolean |
canGoFurther(BlockStructure s)
Tell if it is possible to compute more information. |
abstract Token |
createToken(java.lang.Object val)
Create a new token for this MoC. |
abstract Token |
duplicateToken(Token t)
Duplicate a token (return a new, different token, associated to the same value. |
abstract void |
emitObservationRequests(BlockStructure s)
Place ticks on clocks to request to be observed in future snapshots. |
abstract void |
endOfSnapshot(BlockStructure s)
End of the snapshot => update internal state, produce outputs. |
abstract void |
endOfUpdate(BlockStructure s)
Called at the end of an update of an inner block (produce partial outputs for the upper model). |
abstract Clock<T> |
getClock()
Get the observation clock of this MoC. |
abstract T |
getCurrentTime()
Get the current time of this MoC. |
abstract java.lang.Object |
getTokenValue(Token t)
Get the value associated to a token by this MoC. |
abstract void |
prep(BlockStructure s)
Prepare for simulation. |
abstract void |
propagate(BlockStructure s)
Propagate new information produced by the update of a block. |
abstract void |
reset(BlockStructure s)
Reset for a new computation of the current snapshot (called at least once at the beginning of the snapshot). |
abstract void |
schedule(BlockStructure s)
Choose a block to be updated. |
abstract void |
setTokenValue(Token t,
java.lang.Object val)
Set the value associated to a token by this MoC. |
abstract void |
setup(BlockStructure s)
Setup for simulation. |
abstract void |
startOfSnapshot(BlockStructure s)
Start the computation of a new snapshot on structure s. |
abstract void |
startOfUpdate(BlockStructure s)
Called at the beginning of an update of an inner block (get partial inputs from the upper model). |
abstract void |
update(BlockStructure s)
Update a block. |
abstract boolean |
validate(BlockStructure s)
Tell if the current computation of the snapshot is valid according to the semantics of this MoC. |
abstract void |
wrapup(BlockStructure s)
End of the simulation => release resources and clean up. |
| 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 |
| Methods inherited from interface modhelxs.ecore.NamedEntity |
|---|
getName, getProperties, setName |
| Constructor Detail |
|---|
public ModelOfComputation(java.lang.String name)
| Method Detail |
|---|
public abstract Clock<T> getClock()
public abstract T getCurrentTime()
public abstract java.lang.Object getTokenValue(Token t)
public abstract void setTokenValue(Token t,
java.lang.Object val)
public abstract Token createToken(java.lang.Object val)
public abstract Token duplicateToken(Token t)
public abstract void prep(BlockStructure s)
s - the block structure of the model driven by this MoCpublic abstract void setup(BlockStructure s)
prep, before the first snapshot.
s - the block structure of the model driven by this MoCpublic abstract void startOfSnapshot(BlockStructure s)
s.
public abstract void reset(BlockStructure s)
public abstract void schedule(BlockStructure s)
public abstract void update(BlockStructure s)
public abstract void propagate(BlockStructure s)
public abstract boolean canGoFurther(BlockStructure s)
public abstract boolean validate(BlockStructure s)
public abstract void endOfSnapshot(BlockStructure s)
public abstract void emitObservationRequests(BlockStructure s)
public abstract void startOfUpdate(BlockStructure s)
public abstract void endOfUpdate(BlockStructure s)
public abstract void wrapup(BlockStructure s)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||