|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.ksu.cis.projects.bogor.module.DefaultSchedulingStrategist
public class DefaultSchedulingStrategist
| Nested Class Summary | |
|---|---|
protected class |
DefaultSchedulingStrategist.DefaultSchedulerStrategyInfo
|
protected class |
DefaultSchedulingStrategist.NodeContext
|
| Field Summary | |
|---|---|
protected DefaultSchedulingStrategist.DefaultSchedulerStrategyInfo |
currentDSSI
Tracks which nondeterministic branches have been taken inside a single action node. |
protected int |
currentIndex
Points to the index of the current info record used inside currentDSSI. |
protected Node |
currentNode
Stateful variable |
protected DefaultSchedulingStrategist.NodeContext |
ec
Stateful variable |
protected IExpEvaluator |
ee
Runtime module connection |
protected String |
EXCEPTION_WHEN_FAILED_ID
|
protected boolean |
exceptionWhenFailed
Configuration option |
protected String |
FALSE_WHEN_FAILED_ID
|
protected boolean |
falseWhenFailed
Configuration option |
protected boolean |
interleavingSuppressed
Stateful variable |
protected HashMap<DefaultSchedulingStrategist.NodeContext,DefaultSchedulingStrategist.DefaultSchedulerStrategyInfo> |
nodeDSSIMap
Stateful variable |
protected int |
numNonScriptedScopes
Counter giving how many re-entrant levels of non-scripting we're in (used to record whether a counterexample-trail scheduling info is generated). |
protected ISearcher |
sr
Runtime module connection |
protected ISchedulingStrategist |
ss
Runtime module connection |
protected SymbolTable |
symbolTable
Runtime module connection |
protected LongIntTable |
transformationChooseMap
Stateful variable |
protected String[] |
transformationFilterClassNames
Java class names of the custom transformation filters. |
protected ITransformationFilter[] |
transformationFilters
An ordered series of filters which strip out transitions that are otherwise enabled. |
protected String |
TRUE_WHEN_FAILED_ID
|
protected boolean |
trueWhenFailed
Configuration option |
protected IValueFactory |
vf
Runtime module connection |
| Fields inherited from interface edu.ksu.cis.projects.bogor.module.ISchedulingStrategist |
|---|
TRANSFORMATION_FILTER_ID |
| Constructor Summary | |
|---|---|
DefaultSchedulingStrategist()
|
|
| Method Summary | |
|---|---|
int |
advise(int extDesc,
Node node,
IValue[] choices,
ISchedulingStrategyInfo ssi)
Choose among several possible values for an expression. |
int |
advise(ISchedulingStrategyContext ssc,
int[] threadIds,
Transformation[] transformations,
ISchedulingStrategyInfo ssi)
Choose among several enabled transformations at the beginning of a step. |
int |
advise(ISchedulingStrategyContext ssc,
Transformation[] transformations,
ISchedulingStrategyInfo ssi)
Choose among non-deterministic transformations to take immediately following the control of transfer from one FSM location to another. |
IMessageStore |
connect(IBogorConfiguration bc)
Connects this modules to other modules. |
protected ISchedulingStrategyContext |
createContext(int stateId,
int invisibleMoves,
int threadId,
IState state)
|
void |
disableInterleaving()
Re-enable the normal calculation of getEnabledTransformation
result sets. |
void |
dispose()
Remove references. |
void |
enableInterleaving()
Prevent getEnabledTransformations (all varieties)
from stripping out transitions from all threads except the one which
most recently moved. |
void |
enter(ISchedulingStrategyContext ssc,
Node node)
Notify the scheduler that a thread is entering an FSM. |
void |
enterSimulation()
Inform the scheduling strategist that a series of transitions are about to be executed which should not be pre-scripted (e.g., will not appear in a counterexample trail). |
void |
exit()
Notify the scheduler that a thread is exiting an FSM. |
void |
exitSimulation()
Exit the scope denoted by the corresponding ISchedulingStrategist.enterSimulation()
call. |
String |
getCopyrightNotice()
Returns the copyright notice for this module. |
IntObjectTable<ArrayList<Transformation>> |
getEnabledTransformations(IEnabledTransformationsContext etc)
Find all the enabled FSM transitions. |
IntObjectTable<ArrayList<Transformation>> |
getEnabledTransformations(IEnabledTransformationsContext etc,
Set<Transformation> ignoredTransformations)
Find all the enabled FSM transitions except those given in ignoredTransformations. |
protected FSMSymbolTable |
getFSMSymbolTable(IState state,
int threadId)
|
Pair<Domain,Boolean> |
getOptionDomain(String id)
|
Collection<Triple<String,Boolean,OptionScope>> |
getOptionIds()
|
Collection<String> |
getSuggestedValues(String id,
IBogorConfiguration bc,
SymbolTable st)
|
ITransformationFilter[] |
getTransformationFilters()
Retrieve the set of transformation filters configured via the ISchedulingStrategist.TRANSFORMATION_FILTER_ID option. |
IntObjectTable<ArrayList<Transformation>> |
getWorkSet(IEnabledTransformationsContext etc)
Find a reduced set of transitions whose executions will suffice to represent the execution of all enabled transformations. |
IntObjectTable<ArrayList<Transformation>> |
getWorkSet(IEnabledTransformationsContext etc,
Set<Transformation> ignoredTransformations)
Find a reduced set of transitions whose executions will suffice to represent the execution of all enabled transformations. |
boolean |
isEnabled(IState state,
Transformation t,
int threadId)
Test if a FSM transition is enabled with respect to a particular thread. |
boolean |
isInSimulatingScope()
|
ISchedulingStrategyInfo |
newStrategyInfo()
Construct a scheduling context information records appropriate to the currently-used schedule module. |
protected void |
next()
Set up the bookkeeping so that each choice point for the current action will point to the next option (compared to last time). |
IMessageStore |
setOptions(String key,
Properties configuration)
Sets the options for this module. |
boolean |
validate(String id,
String value,
IBogorConfiguration bc,
SymbolTable st,
Collection<FileMessage> errors)
Checks whether the value of a configuration option is legal. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String TRUE_WHEN_FAILED_ID
protected String FALSE_WHEN_FAILED_ID
protected String EXCEPTION_WHEN_FAILED_ID
protected boolean trueWhenFailed
protected boolean falseWhenFailed
protected boolean exceptionWhenFailed
protected SymbolTable symbolTable
protected ISchedulingStrategist ss
protected IValueFactory vf
protected IExpEvaluator ee
protected ISearcher sr
protected DefaultSchedulingStrategist.DefaultSchedulerStrategyInfo currentDSSI
protected int currentIndex
currentDSSI.
protected Node currentNode
protected DefaultSchedulingStrategist.NodeContext ec
protected HashMap<DefaultSchedulingStrategist.NodeContext,DefaultSchedulingStrategist.DefaultSchedulerStrategyInfo> nodeDSSIMap
protected LongIntTable transformationChooseMap
protected boolean interleavingSuppressed
protected String[] transformationFilterClassNames
protected int numNonScriptedScopes
protected ITransformationFilter[] transformationFilters
| Constructor Detail |
|---|
public DefaultSchedulingStrategist()
| Method Detail |
|---|
public String getCopyrightNotice()
IModule
getCopyrightNotice in interface IModulepublic void enterSimulation()
ISchedulingStrategist
enterSimulation in interface ISchedulingStrategistpublic void exitSimulation()
ISchedulingStrategistISchedulingStrategist.enterSimulation()
call.
exitSimulation in interface ISchedulingStrategistpublic boolean isInSimulatingScope()
isInSimulatingScope in interface ISchedulingStrategistpublic void disableInterleaving()
ISchedulingStrategistgetEnabledTransformation
result sets. See the comments for ISchedulingStrategist.enableInterleaving() for more
details.
disableInterleaving in interface ISchedulingStrategistpublic void enableInterleaving()
ISchedulingStrategistgetEnabledTransformations (all varieties)
from stripping out transitions from all threads except the one which
most recently moved.
The machinery affects by calling this method is structured in a way
that calling enableInterleaving in the initial state
(that is, before any thread has yet moved) will still allow a thread
to be selected and run.
enableInterleaving in interface ISchedulingStrategist
public boolean isEnabled(IState state,
Transformation t,
int threadId)
ISchedulingStrategist
isEnabled in interface ISchedulingStrategistpublic IntObjectTable<ArrayList<Transformation>> getEnabledTransformations(IEnabledTransformationsContext etc)
ISchedulingStrategist
getEnabledTransformations in interface ISchedulingStrategistint) to an
ArrayList<Transformation> of the
transformations enabled for that thread.
public IntObjectTable<ArrayList<Transformation>> getEnabledTransformations(IEnabledTransformationsContext etc,
Set<Transformation> ignoredTransformations)
ISchedulingStrategistignoredTransformations.
getEnabledTransformations in interface ISchedulingStrategistignoredTransformations - a Set<Transformation> of transformations to
ignore across all threads
int) to an
ArrayList<Transformation> of the
transformations enabled for that thread.
public IMessageStore setOptions(String key,
Properties configuration)
IModule
setOptions in interface IModulekey - The key (prefix) for this module options. Must be non-null.
The key is used for module specific options.configuration - The options for all modules. Must be non-null.
public IntObjectTable<ArrayList<Transformation>> getWorkSet(IEnabledTransformationsContext etc,
Set<Transformation> ignoredTransformations)
ISchedulingStrategist
getWorkSet in interface ISchedulingStrategistignoredTransformations - a Set<Transformation> of transformations to
ignore across all threads
int) to an
ArrayList<Transformation> of the
transformations enabled for that thread.public IntObjectTable<ArrayList<Transformation>> getWorkSet(IEnabledTransformationsContext etc)
ISchedulingStrategist
getWorkSet in interface ISchedulingStrategistint) to an
ArrayList<Transformation> of the
transformations enabled for that thread.public ITransformationFilter[] getTransformationFilters()
ISchedulingStrategistISchedulingStrategist.TRANSFORMATION_FILTER_ID option.
getTransformationFilters in interface ISchedulingStrategist
public int advise(ISchedulingStrategyContext ssc,
Transformation[] transformations,
ISchedulingStrategyInfo ssi)
ISchedulingStrategist
advise in interface ISchedulingStrategist
public int advise(ISchedulingStrategyContext ssc,
int[] threadIds,
Transformation[] transformations,
ISchedulingStrategyInfo ssi)
ISchedulingStrategist
advise in interface ISchedulingStrategist
public int advise(int extDesc,
Node node,
IValue[] choices,
ISchedulingStrategyInfo ssi)
ISchedulingStrategistTransformation to execute and before the selection of an
optional post-control-transfer metadata Transformation
(e.g., for property- checking automata).
advise in interface ISchedulingStrategistpublic IMessageStore connect(IBogorConfiguration bc)
IModule
connect in interface IModulebc - The Bogor configuration containing modules to connect to.
Must be non-null.public void dispose()
Disposable
dispose in interface Disposable
public void enter(ISchedulingStrategyContext ssc,
Node node)
ISchedulingStrategist
enter in interface ISchedulingStrategistpublic void exit()
ISchedulingStrategist
exit in interface ISchedulingStrategistpublic ISchedulingStrategyInfo newStrategyInfo()
ISchedulingStrategistISchedulingStrategist.
newStrategyInfo in interface ISchedulingStrategist
protected FSMSymbolTable getFSMSymbolTable(IState state,
int threadId)
protected ISchedulingStrategyContext createContext(int stateId,
int invisibleMoves,
int threadId,
IState state)
protected void next()
public Collection<Triple<String,Boolean,OptionScope>> getOptionIds()
getOptionIds in interface ISelfDescribingModuleedu.ksu.cis.projects.bogor.module.ISearcher)
or global in scope (and thus no qualifier is prepended).public Pair<Domain,Boolean> getOptionDomain(String id)
getOptionDomain in interface ISelfDescribingModule
public Collection<String> getSuggestedValues(String id,
IBogorConfiguration bc,
SymbolTable st)
getSuggestedValues in interface ISelfDescribingModule
public boolean validate(String id,
String value,
IBogorConfiguration bc,
SymbolTable st,
Collection<FileMessage> errors)
validate in interface ISelfDescribingModuleid - the option's name, as returned by the first tuple element of
an item returned by getOptionIds()value - the value of the option, or null if unconfiguedst - the symbol table for the BIR modelerrors - a container into which errors should be put. Implementors
should not assume that errors is empty upon
entry into this method; it may aggregate the results of
calling validate on many
ISelfDescribingModule instances.
true iff the option is supported and its value is legal
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||