|
||||||||||
| 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>
modhelxs.abstractsemantics.ModelOfComputationImpl<T>
public abstract class ModelOfComputationImpl<T extends java.lang.Comparable<? super T>>
Common default implementation of a model of computation features.
| Field Summary | |
|---|---|
(package private) java.util.Map<Token,java.lang.Object> |
tokenValues_
Association of values to tokens. |
| Constructor Summary | |
|---|---|
ModelOfComputationImpl(java.lang.String name)
|
|
| Method Summary | |
|---|---|
Token |
createToken(java.lang.Object val)
Create a new token for this MoC. |
Token |
duplicateToken(Token tok)
Duplicate a token (return a new, different token, associated to the same value. |
void |
emitObservationRequests(BlockStructure s)
Place ticks on clocks to request to be observed in future snapshots. |
void |
endOfSnapshot(BlockStructure s)
End of the snapshot => update internal state, produce outputs. |
java.lang.Object |
getTokenValue(Token t)
Get the value associated to a token by this MoC. |
void |
prep(BlockStructure s)
Prepare for simulation. |
void |
reset(BlockStructure s)
Reset for a new computation of the current snapshot (called at least once at the beginning of the snapshot). |
void |
setTokenValue(Token t,
java.lang.Object val)
Set the value associated to a token by this MoC. |
void |
setup(BlockStructure s)
Setup for simulation. |
void |
startOfSnapshot(BlockStructure s)
Start the computation of a new snapshot on structure s. |
boolean |
validate(BlockStructure s)
Tell if the current computation of the snapshot is valid according to the semantics of this MoC. |
void |
wrapup(BlockStructure s)
End of the simulation => release resources and clean up. |
| Methods inherited from class modhelxs.abstractsemantics.ModelOfComputation |
|---|
canGoFurther, endOfUpdate, getClock, getCurrentTime, propagate, schedule, startOfUpdate, update |
| 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 |
| Field Detail |
|---|
java.util.Map<Token,java.lang.Object> tokenValues_
| Constructor Detail |
|---|
public ModelOfComputationImpl(java.lang.String name)
| Method Detail |
|---|
public java.lang.Object getTokenValue(Token t)
ModelOfComputation
getTokenValue in class ModelOfComputation<T extends java.lang.Comparable<? super T>>
public void setTokenValue(Token t,
java.lang.Object val)
ModelOfComputation
setTokenValue in class ModelOfComputation<T extends java.lang.Comparable<? super T>>public Token createToken(java.lang.Object val)
ModelOfComputation
createToken in class ModelOfComputation<T extends java.lang.Comparable<? super T>>public Token duplicateToken(Token tok)
ModelOfComputation
duplicateToken in class ModelOfComputation<T extends java.lang.Comparable<? super T>>public void prep(BlockStructure s)
ModelOfComputation
prep in class ModelOfComputation<T extends java.lang.Comparable<? super T>>s - the block structure of the model driven by this MoCpublic void setup(BlockStructure s)
ModelOfComputationprep, before the first snapshot.
setup in class ModelOfComputation<T extends java.lang.Comparable<? super T>>s - the block structure of the model driven by this MoCpublic void startOfSnapshot(BlockStructure s)
ModelOfComputations.
startOfSnapshot in class ModelOfComputation<T extends java.lang.Comparable<? super T>>public void reset(BlockStructure s)
ModelOfComputation
reset in class ModelOfComputation<T extends java.lang.Comparable<? super T>>public boolean validate(BlockStructure s)
ModelOfComputation
validate in class ModelOfComputation<T extends java.lang.Comparable<? super T>>public void endOfSnapshot(BlockStructure s)
ModelOfComputation
endOfSnapshot in class ModelOfComputation<T extends java.lang.Comparable<? super T>>public void emitObservationRequests(BlockStructure s)
ModelOfComputation
emitObservationRequests in class ModelOfComputation<T extends java.lang.Comparable<? super T>>public void wrapup(BlockStructure s)
ModelOfComputation
wrapup in class ModelOfComputation<T extends java.lang.Comparable<? super T>>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||