java.lang.Object
dev.civl.gmc.GuidedTransitionChooser<STATE,TRANSITION>
- Type Parameters:
STATE-TRANSITION-
- All Implemented Interfaces:
TransitionChooser<STATE,TRANSITION>
public class GuidedTransitionChooser<STATE,TRANSITION>
extends Object
implements TransitionChooser<STATE,TRANSITION>
Transition Chooser which makes its choice using an explicit "guide". The
guide is a sequence of integers whose length is the number of
nondeterministic states encountered along the trace. (A nondeterministic
state is one that has more than one enabled transition.) The sequence is
specified in a compressed form. This form consists of a sequence of integer
pairs a:b. The pair a:b represents a consecutive bs. For example, "3:0 2:1"
represents the sequence 0, 0, 0, 1, 1.
-
Constructor Summary
ConstructorsConstructorDescriptionGuidedTransitionChooser(EnablerIF<STATE, TRANSITION> enabler, File traceFile) -
Method Summary
Modifier and TypeMethodDescriptionchooseEnabledTransition(STATE state) Using some protocol, chooses one of the transitions enabled at the given state.intReturns the length of this execution.
-
Constructor Details
-
GuidedTransitionChooser
public GuidedTransitionChooser(EnablerIF<STATE, TRANSITION> enabler, File traceFile) throws IOException, MisguidedExecutionException
-
-
Method Details
-
getLength
public int getLength()Returns the length of this execution.- Returns:
- length of this execution
-
chooseEnabledTransition
Description copied from interface:TransitionChooserUsing some protocol, chooses one of the transitions enabled at the given state. If there are no enabled transitions, returns null.- Specified by:
chooseEnabledTransitionin interfaceTransitionChooser<STATE,TRANSITION> - Parameters:
state- a state- Returns:
- a transition enabled at that state, or null if there is none
- Throws:
MisguidedExecutionException- if a transition cannot be selected for some reason
-