|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.wis.jtlv.env.module.Module
public abstract class Module
A general interface for modules. It is advise to load modules and manipulate
them through the file itself, and then load it to the environment through
Env. However, this is not the only way to create a new module. One can use
whole set of manipulating procedures provided by this interface, to create a
new module.
By default, The initial condition is TRUE, transition relation is TRUE.
Env.loadModule(String)
,
Env.getAllModules()
,
Env.getModule(String)
Constructor Summary | |
---|---|
Module()
|
Method Summary | |
---|---|
abstract void |
addInitial(BDD to_add)
Conjunct the initial condition with the given condition. |
abstract ModuleBDDField |
addVar(java.lang.String new_var)
Add a variable to the module. |
BDD |
allPred(BDD to)
Given a set of state, this procedure return all states which can lead in any number of module steps to these states. |
BDD |
allSucc(BDD from)
This procedure return all states which the module can reach in any number of steps from given a set of state. |
abstract void |
asyncComposition(Module inner)
add asynchronous composition to this module. |
abstract void |
conjunctTrans(BDD to_add)
Conjunct the transition relation with the given condition. |
BDD |
controlStates(Module responder,
BDD to)
A state s is included in the returning result if the this module can force the responder to reach a state in "to". |
abstract void |
decompose(Module inner)
remove composition from this module. |
abstract void |
disjunctTrans(BDD to_add)
Disjunct the transition relation with the given condition. |
BDD |
elimSuccChains(BDD scc)
Eliminate states from scc which have no successors within scc. |
BDD |
feasible()
This is essentially algorithm "FEASIBLE", from the article: Yonit Ketsen, Amir Pnueli, Li-on Raviv, Elad Shahar, "Model checking with strong fairness". |
BDD |
feasible2()
Version which allows justice and compassion requirement to refer to the next state. |
abstract ModuleBDDField[] |
getAllFields()
Getter for all fields declared in this module. |
abstract java.util.Vector<BDD> |
getAllIniRestrictions()
Get all restrictions on the initial states. |
abstract java.util.Vector<BDD> |
getAllTransRestrictions()
Get all restrictions on the transitions. |
abstract java.lang.String |
getFullInstName()
Getter for the instance string. |
abstract java.lang.String |
getName()
Getter for the declared field name which holds this instance. |
abstract java.lang.String |
getPath()
The path leading to this module. |
BDD |
hasSuccessorsTo(BDD state,
BDD to)
Get the subset of states which has successor to the other given set of states. |
abstract BDD |
idleStep()
Construct a BDD representing the idle transition of this module. |
abstract BDD |
initial()
Getter for the initial states in the module. |
abstract BDDVarSet |
modulePrimeVars()
Getter for the primed variable of this module. |
abstract BDDVarSet |
moduleUnprimeVars()
Getter for the unprimed variable of this module. |
BDDVarSet |
moduleVars()
Getter for all, primed and unprimed variable of this module. |
BDD |
pred(BDD to)
Given a set of state, this procedure return all states which can lead in a single module step to these states. |
BDD |
reachable()
Calculate all reachable states form the initial states. |
abstract void |
removeAllIniRestrictions()
Remove all restrictions from the initial states. |
abstract void |
removeAllTransRestrictions()
Remove all restrictions from the transitions. |
abstract void |
removeIniRestriction(int id)
Remove a restriction from the initial states. |
abstract void |
removeTransRestriction(int id)
Remove a restriction from the transitions. |
abstract int |
restrictIni(BDD temp_ini)
Add a restriction to the initial states. |
abstract int |
restrictTrans(BDD temp_trans)
Add a restriction to the transitions. |
abstract void |
setAllIniRestrictions(java.util.Vector<BDD> toSet)
Set all restrictions for the initial states. |
abstract void |
setAllTransRestrictions(java.util.Vector<BDD> toSet)
Set all restrictions for the transitions. |
abstract void |
setInitial(BDD to_add)
Set the initial condition with the given condition. |
BDD[] |
shortestPath(BDD source,
BDD dest)
Compute the shortest path from source to destination. |
BDD |
succ(BDD from)
This procedure return all states which the module can reach in a single step from given a set of state. |
abstract void |
syncComposition(Module inner)
add synchronous composition to this module. |
abstract java.lang.String |
toString()
Prepare a string describing the module, its variables, define, statement, etc. |
abstract BDD |
trans()
Getter for the transition relation of the module. |
BDD |
yieldStates(Module responder,
BDD to)
A state s in included in the returning result if responder module can force this module to reach a state in "to". That is, regardless of how this module will move from the result, the responder module can choose an appropriate move into "to". |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Module()
Method Detail |
---|
public abstract ModuleBDDField addVar(java.lang.String new_var) throws ModuleException
Add a variable to the module.
new_var
- The name of the new variable to add.
ModuleException
- If there was a problem with adding the variable, e.g. a
variable with this name already exists.public abstract void addInitial(BDD to_add) throws ModuleException
Conjunct the initial condition with the given condition.
to_add
- The condition to add to the module.
ModuleException
- If there was a problem with adding the condition, e.g. a
there where primed variables in the condition.initial()
,
setInitial(BDD)
public abstract void setInitial(BDD to_add) throws ModuleException
Set the initial condition with the given condition.
to_add
- The condition to set to the module.
ModuleException
- If there was a problem with setting the condition, e.g. a
there where primed variables in the condition.initial()
,
addInitial(BDD)
public abstract void conjunctTrans(BDD to_add) throws ModuleException
Conjunct the transition relation with the given condition.
to_add
- The transition to conjunct with the module's transitions.
ModuleException
- If there was a problem with adding relation.trans()
,
disjunctTrans(BDD)
public abstract void disjunctTrans(BDD to_add) throws ModuleException
Disjunct the transition relation with the given condition.
to_add
- The transition disjunct with to the module's transitions.
ModuleException
- If there was a problem with adding relation.trans()
,
conjunctTrans(BDD)
public abstract ModuleBDDField[] getAllFields()
Getter for all fields declared in this module.
public abstract BDDVarSet modulePrimeVars()
Getter for the primed variable of this module.
public abstract BDDVarSet moduleUnprimeVars()
Getter for the unprimed variable of this module.
public BDDVarSet moduleVars()
Getter for all, primed and unprimed variable of this module.
public abstract BDD initial()
Getter for the initial states in the module.
addInitial(BDD)
,
setInitial(BDD)
public abstract BDD trans()
Getter for the transition relation of the module.
disjunctTrans(BDD)
,
conjunctTrans(BDD)
,
idleStep()
public abstract BDD idleStep()
Construct a BDD representing the idle transition of this module. If the process has a synchronously composed inner module, then it will also construct its idle step.
disjunctTrans(BDD)
,
conjunctTrans(BDD)
,
trans()
public BDD pred(BDD to)
Given a set of state, this procedure return all states which can lead in a single module step to these states.
to
- The set of state to be reach.
allPred(BDD)
,
trans()
,
succ(BDD)
public BDD allPred(BDD to)
Given a set of state, this procedure return all states which can lead in any number of module steps to these states.
to
- The set of state to be reach.
pred(BDD)
,
trans()
,
allSucc(BDD)
public BDD succ(BDD from)
This procedure return all states which the module can reach in a single step from given a set of state.
from
- The set of state to start from.
allSucc(BDD)
,
trans()
,
pred(BDD)
public BDD allSucc(BDD from)
This procedure return all states which the module can reach in any number of steps from given a set of state.
from
- The set of state to start from.
allPred(BDD)
,
trans()
,
succ(BDD)
public abstract void syncComposition(Module inner)
add synchronous composition to this module.
inner
- The module to compose this instance with.public abstract void asyncComposition(Module inner)
add asynchronous composition to this module.
inner
- The module to compose this instance with.public abstract void decompose(Module inner)
remove composition from this module.
inner
- The module to remove from this instance.public abstract int restrictIni(BDD temp_ini)
Add a restriction to the initial states.
temp_ini
- The BDD to restrict with.
public abstract void removeIniRestriction(int id)
Remove a restriction from the initial states.
id
- The index of restriction to remove.public abstract void removeAllIniRestrictions()
Remove all restrictions from the initial states.
public abstract java.util.Vector<BDD> getAllIniRestrictions()
Get all restrictions on the initial states.
public abstract void setAllIniRestrictions(java.util.Vector<BDD> toSet)
Set all restrictions for the initial states.
toSet
- A vector of restrictions to set.public abstract int restrictTrans(BDD temp_trans)
Add a restriction to the transitions.
temp_trans
- The BDD to restrict with.
public abstract void removeTransRestriction(int id)
Remove a restriction from the transitions.
id
- The index of restriction to remove.public abstract void removeAllTransRestrictions()
Remove all restrictions from the transitions.
public abstract java.util.Vector<BDD> getAllTransRestrictions()
Get all restrictions on the transitions.
public abstract void setAllTransRestrictions(java.util.Vector<BDD> toSet)
Set all restrictions for the transitions.
toSet
- A vector of restrictions to set.public BDD reachable()
Calculate all reachable states form the initial states.
public BDD[] shortestPath(BDD source, BDD dest)
Compute the shortest path from source to destination.
Algorithm from: Yonit Kesten, Amir Pnueli, Li-on Raviv, Elad Shahar,
"Model Checking with Strong Fairness".
source
- The states to start look for path.dest
- The states to reach in the path.
public BDD feasible()
This is essentially algorithm "FEASIBLE", from the article:
Yonit Ketsen, Amir Pnueli, Li-on Raviv, Elad Shahar, "Model checking with
strong fairness". This implementation is reduced to a module without any
fairness requirements.
The line numbers are the line numbers of that algorithm. Read the article for further details.
ModuleWithWeakFairness.feasible()
,
ModuleWithStrongFairness.feasible()
,
feasible2()
public BDD feasible2()
Version which allows justice and compassion requirement to refer to the next state.
feasible()
,
ModuleWithWeakFairness.feasible2()
,
ModuleWithStrongFairness.feasible2()
public BDD yieldStates(Module responder, BDD to)
A state s in included in the returning result if responder module can
force this module to reach a state in "to".
That is, regardless of how this module will move from the result, the
responder module can choose an appropriate move into "to".
responder
- The module which moves (i.e. this is the responder).to
- The states to reach.
allPred(BDD)
public BDD controlStates(Module responder, BDD to)
A state s is included in the returning result if the this module can
force the responder to reach a state in "to".
responder
- The module to check for.to
- The states to reach.
public BDD elimSuccChains(BDD scc)
Eliminate states from scc which have no successors within scc. scc is supposed to be a strongly connected component, however, it also contains chains of states which exit the scc, but are not in it. This procedure eliminates these chains.
scc
- The set of states to find scc for.
public BDD hasSuccessorsTo(BDD state, BDD to)
Get the subset of states which has successor to the other given set of states.
state
- The first set of states.to
- The second set of states.
public abstract java.lang.String toString()
Prepare a string describing the module, its variables, define, statement, etc.
toString
in class java.lang.Object
public abstract java.lang.String getPath()
The path leading to this module.
public abstract java.lang.String getName()
Getter for the declared field name which holds this instance.
public abstract java.lang.String getFullInstName()
Getter for the instance string.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |