public interface IStateCoder
To be able to efficiently explore a design space, a state that has been explored before through an other trajectory needs to be recognized and ignored accordingly.
This is done by generating a pseudo-unique value (object) that is only depended on the relevant parts of the model's internal state, that is, the values of two states can only be equal if the states themselves can be considered equal.
The processing engine however assumes, that any two states that share this pseudo-unique value has the same characteristics, meaning they have the same amount and type of outgoing transitions available, and firing the appropriate transitions from both states also result in states that share their pseudo-unique identifier. If this condition is not satisfied, the exploration process's result will be non-deterministic, and in consequence, solutions can be lost.
In addition to providing pseudo-unique identifiers to model states, the state coder must provide pseud-unique identifiers to the outgoing transitions as well, but they only need to be unique on the scope of the particular state, not globally. Global addressing thus can be achieved by considering the pseudo-unique identifier of the state and the pseudo-unique identifier of the transition together if needed.
Both identifiers can be arbitrary objects, and equality is checked by calling
Object.equals(Object) on the
Usually it is unnecessary to represent everything from the model in a state code, only the parts which are modified by the transformation rules.
|Modifier and Type||Method and Description|
Returns a pseudo-unique identifier that describes the given
Returns a pseudo-unique identifier that describes the underlying model's current internal state.
Initializes the state coder on the given model.
void init(org.eclipse.emf.common.notify.Notifier notifier)
Objectthat can be used as the identifier.
java.lang.Object createActivationCode(IPatternMatch match)
IPatternMatchin the context of the underlying model's current internal state.
Objectthat can be used as the identifier in the given state.