|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.wis.jtlv.env.module.Module
edu.wis.jtlv.env.module.ModuleWithWeakFairness
edu.wis.jtlv.env.module.ModuleWithStrongFairness
edu.wis.jtlv.env.module.SMVModule
public class SMVModule
An object which represent an SMV module.
Env.loadModule(String)
Nested Class Summary | |
---|---|
static class |
SMVModule.SyncStatus
Enum class to distinguish between synchronous and asynchronous sub module composition. |
Constructor Summary | |
---|---|
SMVModule(edu.wis.jtlv.env.core.smv.schema.SMVModuleInfo a_module_info,
java.lang.String player_name)
A constructor for an object representing SMV modules. |
|
SMVModule(edu.wis.jtlv.env.core.smv.schema.SMVModuleInfo a_module_info,
java.lang.String player_name,
java.lang.String[] an_args,
java.lang.String[] a_params)
An object representing SMV modules. |
|
SMVModule(java.lang.String player_name)
A constructor for an object representing SMV modules. |
|
SMVModule(java.lang.String player_name,
java.lang.String[] params,
java.lang.String[] instantiate_str)
A constructor for an object representing SMV modules. |
Method Summary | |
---|---|
void |
___addDefine(java.lang.String addr)
Deprecated. INTERNAL PROCEDURE - will be encapsulated and removed from the external API in the following few releases. |
void |
___addDefineFromParam(java.lang.String addr)
Deprecated. INTERNAL PROCEDURE - will be encapsulated and removed from the external API in the following few releases. |
void |
___attachParamPointers()
Deprecated. INTERNAL PROCEDURE - will be encapsulated and removed from the external API in the following few releases. |
edu.wis.jtlv.env.core.smv.schema.SMVModuleInfo |
___getModuleInfo()
Deprecated. INTERNAL PROCEDURE - will be encapsulated and removed from the external API in the following few releases. |
void |
addCompassion(BDD p,
BDD q)
Add strong (compassion) winning condition to the module. |
void |
addInitial(BDD to_add)
Conjunct the initial condition with the given condition. |
void |
addInstanceVar(SMVModule inner,
boolean is_sync)
Add a module instance as a variable to this module. |
void |
addJustice(BDD to_add)
Add weak (justice) winning condition to the module. |
ModuleBDDField |
addVar(java.lang.String new_var)
Add a variable to the module. |
ModuleBDDField |
addVar(java.lang.String new_var,
int range_start,
int range_end)
Add a range variable to this module. |
ModuleBDDField |
addVar(java.lang.String new_var,
java.lang.String[] val_names)
Add a set of values variable to this module. |
BDD[] |
allJustice()
Getter for all the justice requirements of the module. |
BDD[] |
allPCompassion()
Getter for all the p's, of the compassion requirements of the module. |
BDD[] |
allQCompassion()
Getter for all the q's, of the compassion requirements of the module. |
void |
asyncComposition(Module inner)
add asynchronous composition to this module. |
int |
compassionNum()
Getter for the number of compassion condition defined in the module. |
void |
conjunctTrans(BDD to_add)
Conjunct the transition relation with the given condition. |
void |
decompose(Module inner)
remove composition from this module. |
void |
disjunctTrans(BDD to_add)
Disjunct the transition relation with the given condition. |
java.util.Vector<BDD> |
getAllConjunctTransElements()
|
ModuleBDDDefine[] |
getAllDefines()
Getter for all the defines declared in this module. |
ModuleBDDField[] |
getAllFields()
Getter for all fields declared in this module. |
java.util.Vector<BDD> |
getAllIniRestrictions()
Get all restrictions on the initial states. |
SMVModule[] |
getAllInstances()
Getter for all instances declared in this module. |
SMVModule[] |
getAllInstances(SMVModule.SyncStatus status)
Getter for all synchronous or asynchronous instances declared in this module. |
ModuleParamHolder[] |
getAllParams()
Getter for all declared parameters in this module signature. |
java.util.Vector<BDD> |
getAllTransRestrictions()
Get all restrictions on the transitions. |
ModuleBDDDefine |
getDefine(java.lang.String addr,
boolean look_hard)
Get the define declared in this module with the given name. |
java.lang.String |
getFullInstName()
Getter for the instance string. |
java.lang.String |
getFullInstNameWithParams()
Getter for the full instance name with the parameters. |
SMVModule |
getHolder()
Getter for the module instance holds this instance. |
SMVModule |
getInstance(java.lang.String addr,
boolean look_hard)
Get the instances with the given name. |
SMVModule[] |
getInstanceArray(java.lang.String addr,
boolean look_hard)
Get the array of instances with the given name. |
java.lang.String |
getName()
Getter for the declared field name which holds this instance. |
ModuleParamHolder |
getParam(int at_index)
Getter for the declared parameter and the given index, in this module signature. |
java.lang.String |
getPath()
The path leading to this module. |
BDD |
getValue(java.lang.String name)
Get A BDD for the disjunct of all variables set to the given value. |
ModuleBDDField |
getVar(java.lang.String addr,
boolean look_hard)
Get the variable with the given name. |
ModuleBDDField[] |
getVarArray(java.lang.String addr,
boolean look_hard)
Get the array of variables with the given name. |
boolean |
hasDefine(java.lang.String addr,
boolean look_hard)
Check whether a define with the given name exists. |
boolean |
hasInstance(java.lang.String addr,
boolean look_hard)
Check whether an instance with the given name exists. |
boolean |
hasInstanceArray(java.lang.String addr,
boolean look_hard)
Check whether an instance array with the given name exists. |
boolean |
hasParam(java.lang.String addr,
boolean look_hard)
Check whether a parameter with the given name exists. |
boolean |
hasValue(java.lang.String name)
Check whether a value with the given name exists in any of the variables of the system. |
boolean |
hasVar(java.lang.String addr,
boolean look_hard)
Check whether a variable with the given name exists. |
boolean |
hasVarArray(java.lang.String addr,
boolean look_hard)
Check whether a variable array with the given name exists. |
BDD |
idleStep()
Construct a BDD representing the idle transition of this module. |
BDD |
initial()
Getter for the initial states in the module. |
static void |
initModulesWithoutRunningVar()
A static option which does not add "running" variable upon a creation of a new instance. |
static void |
initModulesWithRunningVar()
For NuSMV format compatibility, a static option which adds a "running" variable upon a creation of a new instance. |
BDD |
justiceAt(int i)
Getter for a justice condition defined at the given index in the module. |
int |
justiceNum()
Getter for the number of justice condition defined in the module. |
BDDVarSet |
modulePrimeVars()
Getter for the primed variable of this module. |
BDDVarSet |
moduleUnprimeVars()
Getter for the unprimed variable of this module. |
BDD |
pCompassionAt(int i)
Getter for a P part of the compassion condition defined at the given index in the module. |
BDD[] |
popLastCompassion()
Removes the last compassion added to this module. |
BDD |
popLastJustice()
Removes the last justice added to this module. |
BDD |
presStep()
Construct a BDD representing the idle transition of this module and its synchronous sub modules. |
BDD |
qCompassionAt(int i)
Getter for a Q part of the compassion condition defined at the given index in the module. |
void |
removeAllIniRestrictions()
Remove all restrictions from the initial states. |
void |
removeAllTransRestrictions()
Remove all restrictions from the transitions. |
void |
removeIniRestriction(int id)
Remove a restriction from the initial states. |
void |
removeInstanceVar(SMVModule inner)
Removes and inner composed module. |
void |
removeRunningVar()
Remove the "running variable if is there (NuSMV compatibility) |
void |
removeTransRestriction(int id)
Remove a restriction from the transitions. |
int |
restrictIni(BDD temp_ini)
Add a restriction to the initial states. |
int |
restrictTrans(BDD temp_trans)
Add a restriction to the transitions. |
void |
setAllIniRestrictions(java.util.Vector<BDD> toSet)
Set all restrictions for the initial states. |
void |
setAllTransRestrictions(java.util.Vector<BDD> toSet)
Set all restrictions for the transitions. |
void |
setFullPrintingMode(boolean to_set)
Set the print mode for the toString procedure. |
void |
setInitial(BDD to_add)
Set the initial condition with the given condition. |
void |
syncComposition(Module inner)
add synchronous composition to this module. |
java.lang.String |
toString()
Prepare a string describing the module, its variables, define, statement, etc. |
BDD |
trans()
Getter for the transition relation of the module. |
Methods inherited from class edu.wis.jtlv.env.module.ModuleWithStrongFairness |
---|
feasible, feasible2 |
Methods inherited from class edu.wis.jtlv.env.module.Module |
---|
allPred, allSucc, controlStates, elimSuccChains, hasSuccessorsTo, moduleVars, pred, reachable, shortestPath, succ, yieldStates |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SMVModule(java.lang.String player_name)
A constructor for an object representing SMV modules.
player_name
- The name of the this instance.SMVModule(String, String[],
String[])
,
Env.loadModule(String)
public SMVModule(java.lang.String player_name, java.lang.String[] params, java.lang.String[] instantiate_str) throws ModuleException
A constructor for an object representing SMV modules. In This constructor you are allowed to add a set of parameters to the instance, and a matching set arguments (i.e. their actual values). Please
NOTE: this type of instantiation is still experimental, and not fully tested. please check to see that the result are as expected.
player_name
- The name of the this instance.params
- The name of the parameter (inside the module)instantiate_str
- The string to instantiate then with (qualified field name)
ModuleException
SMVModule(String)
,
Env.loadModule(String)
public SMVModule(edu.wis.jtlv.env.core.smv.schema.SMVModuleInfo a_module_info, java.lang.String player_name)
A constructor for an object representing SMV modules. You are discourage from directly instantiating SMV modules using this method. Please see the reference link.
a_module_info
- An abstract info of the module.player_name
- The name of the this instance.SMVModule(String)
,
SMVModule(String, String[],
String[])
,
Env.loadModule(String)
public SMVModule(edu.wis.jtlv.env.core.smv.schema.SMVModuleInfo a_module_info, java.lang.String player_name, java.lang.String[] an_args, java.lang.String[] a_params) throws ModuleException
An object representing SMV modules. For now, you are discourage from directly instantiating SMV modules. Please see the references.
a_module_info
- player_name
- an_args
- a_params
-
ModuleException
- If there was a problem with the parameters declared (i.e.
duplicate names).Method Detail |
---|
public static void initModulesWithRunningVar()
For NuSMV format compatibility, a static option which adds a "running" variable upon a creation of a new instance.
initModulesWithoutRunningVar()
public static void initModulesWithoutRunningVar()
A static option which does not add "running" variable upon a creation of a new instance.
initModulesWithRunningVar()
public ModuleBDDField addVar(java.lang.String new_var) throws ModuleException, ModuleVariableException
Module
Add a variable to the module.
addVar
in class 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.
ModuleVariableException
public void addInitial(BDD to_add) throws ModuleException
Module
Conjunct the initial condition with the given condition.
addInitial
in class Module
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.Module.initial()
,
Module.setInitial(BDD)
public void setInitial(BDD to_add) throws ModuleException
Module
Set the initial condition with the given condition.
setInitial
in class Module
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.Module.initial()
,
Module.addInitial(BDD)
public int restrictIni(BDD temp_ini)
Module
Add a restriction to the initial states.
restrictIni
in class Module
temp_ini
- The BDD to restrict with.
public void removeIniRestriction(int id)
Module
Remove a restriction from the initial states.
removeIniRestriction
in class Module
id
- The index of restriction to remove.public void removeAllIniRestrictions()
Module
Remove all restrictions from the initial states.
removeAllIniRestrictions
in class Module
public java.util.Vector<BDD> getAllIniRestrictions()
Module
Get all restrictions on the initial states.
getAllIniRestrictions
in class Module
public void setAllIniRestrictions(java.util.Vector<BDD> toSet)
Module
Set all restrictions for the initial states.
setAllIniRestrictions
in class Module
toSet
- A vector of restrictions to set.public void conjunctTrans(BDD to_add)
Module
Conjunct the transition relation with the given condition.
conjunctTrans
in class Module
to_add
- The transition to conjunct with the module's transitions.Module.trans()
,
Module.disjunctTrans(BDD)
public void disjunctTrans(BDD to_add)
Module
Disjunct the transition relation with the given condition.
disjunctTrans
in class Module
to_add
- The transition disjunct with to the module's transitions.Module.trans()
,
Module.conjunctTrans(BDD)
public int restrictTrans(BDD temp_trans)
Module
Add a restriction to the transitions.
restrictTrans
in class Module
temp_trans
- The BDD to restrict with.
public void removeTransRestriction(int id)
Module
Remove a restriction from the transitions.
removeTransRestriction
in class Module
id
- The index of restriction to remove.public void removeAllTransRestrictions()
Module
Remove all restrictions from the transitions.
removeAllTransRestrictions
in class Module
public java.util.Vector<BDD> getAllTransRestrictions()
Module
Get all restrictions on the transitions.
getAllTransRestrictions
in class Module
public void setAllTransRestrictions(java.util.Vector<BDD> toSet)
Module
Set all restrictions for the transitions.
setAllTransRestrictions
in class Module
toSet
- A vector of restrictions to set.public void addJustice(BDD to_add) throws ModuleException
ModuleWithWeakFairness
Add weak (justice) winning condition to the module.
addJustice
in class ModuleWithWeakFairness
to_add
- The winning condition to add to the module.
ModuleException
- If there was a problem with adding the condition.ModuleWithWeakFairness.justiceNum()
,
ModuleWithWeakFairness.justiceAt(int)
,
ModuleWithWeakFairness.popLastJustice()
,
ModuleWithWeakFairness.allJustice()
public BDD popLastJustice()
ModuleWithWeakFairness
Removes the last justice added to this module.
popLastJustice
in class ModuleWithWeakFairness
ModuleWithWeakFairness.addJustice(BDD)
,
ModuleWithWeakFairness.justiceNum()
,
ModuleWithWeakFairness.justiceAt(int)
,
ModuleWithWeakFairness.allJustice()
public void addCompassion(BDD p, BDD q) throws ModuleException
ModuleWithStrongFairness
Add strong (compassion) winning condition to the module.
addCompassion
in class ModuleWithStrongFairness
p
- The p winning condition to add to the module.q
- The q winning condition to add to the module.
ModuleException
- If there was a problem with adding the condition.ModuleWithStrongFairness.popLastCompassion()
,
ModuleWithStrongFairness.compassionNum()
,
ModuleWithStrongFairness.pCompassionAt(int)
,
ModuleWithStrongFairness.qCompassionAt(int)
,
ModuleWithStrongFairness.allPCompassion()
,
ModuleWithStrongFairness.allQCompassion()
public BDD[] popLastCompassion()
ModuleWithStrongFairness
Removes the last compassion added to this module.
popLastCompassion
in class ModuleWithStrongFairness
ModuleWithStrongFairness.addCompassion(BDD,
BDD)
,
ModuleWithStrongFairness.compassionNum()
,
ModuleWithStrongFairness.pCompassionAt(int)
,
ModuleWithStrongFairness.qCompassionAt(int)
,
ModuleWithStrongFairness.allPCompassion()
,
ModuleWithStrongFairness.allQCompassion()
public BDDVarSet modulePrimeVars()
Module
Getter for the primed variable of this module.
modulePrimeVars
in class Module
public BDDVarSet moduleUnprimeVars()
Module
Getter for the unprimed variable of this module.
moduleUnprimeVars
in class Module
public ModuleBDDField[] getAllFields()
Module
Getter for all fields declared in this module.
getAllFields
in class Module
public BDD initial()
Module
Getter for the initial states in the module.
initial
in class Module
Module.addInitial(BDD)
,
Module.setInitial(BDD)
public BDD trans()
Module
Getter for the transition relation of the module.
trans
in class Module
Module.disjunctTrans(BDD)
,
Module.conjunctTrans(BDD)
,
Module.idleStep()
public java.util.Vector<BDD> getAllConjunctTransElements()
public BDD idleStep()
Module
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.
idleStep
in class Module
Module.disjunctTrans(BDD)
,
Module.conjunctTrans(BDD)
,
Module.trans()
public BDD presStep()
Construct a BDD representing the idle transition of this module and its synchronous sub modules. If the process has asynchronously inner module, then it will NOT be included.
idleStep()
public int justiceNum()
ModuleWithWeakFairness
Getter for the number of justice condition defined in the module.
justiceNum
in class ModuleWithWeakFairness
ModuleWithWeakFairness.addJustice(BDD)
,
ModuleWithWeakFairness.justiceAt(int)
,
ModuleWithWeakFairness.popLastJustice()
,
ModuleWithWeakFairness.allJustice()
public BDD justiceAt(int i)
ModuleWithWeakFairness
Getter for a justice condition defined at the given index in the module.
justiceAt
in class ModuleWithWeakFairness
i
- The index of the justice condition to return.
ModuleWithWeakFairness.addJustice(BDD)
,
ModuleWithWeakFairness.justiceNum()
,
ModuleWithWeakFairness.popLastJustice()
,
ModuleWithWeakFairness.allJustice()
public BDD[] allJustice()
ModuleWithWeakFairness
Getter for all the justice requirements of the module.
allJustice
in class ModuleWithWeakFairness
ModuleWithWeakFairness.addJustice(BDD)
,
ModuleWithWeakFairness.justiceNum()
,
ModuleWithWeakFairness.justiceAt(int)
,
ModuleWithWeakFairness.popLastJustice()
public int compassionNum()
ModuleWithStrongFairness
Getter for the number of compassion condition defined in the module.
compassionNum
in class ModuleWithStrongFairness
ModuleWithStrongFairness.addCompassion(BDD,
BDD)
,
ModuleWithStrongFairness.popLastCompassion()
,
ModuleWithStrongFairness.pCompassionAt(int)
,
ModuleWithStrongFairness.qCompassionAt(int)
,
ModuleWithStrongFairness.allPCompassion()
,
ModuleWithStrongFairness.allQCompassion()
public BDD pCompassionAt(int i)
ModuleWithStrongFairness
Getter for a P part of the compassion condition defined at the given index in the module.
pCompassionAt
in class ModuleWithStrongFairness
i
- The index of the compassion condition to return.
ModuleWithStrongFairness.addCompassion(BDD,
BDD)
,
ModuleWithStrongFairness.popLastCompassion()
,
ModuleWithStrongFairness.compassionNum()
,
ModuleWithStrongFairness.qCompassionAt(int)
,
ModuleWithStrongFairness.allPCompassion()
,
ModuleWithStrongFairness.allQCompassion()
public BDD qCompassionAt(int i)
ModuleWithStrongFairness
Getter for a Q part of the compassion condition defined at the given index in the module.
qCompassionAt
in class ModuleWithStrongFairness
i
- The index of the compassion condition to return.
ModuleWithStrongFairness.addCompassion(BDD,
BDD)
,
ModuleWithStrongFairness.popLastCompassion()
,
ModuleWithStrongFairness.compassionNum()
,
ModuleWithStrongFairness.pCompassionAt(int)
,
ModuleWithStrongFairness.allPCompassion()
,
ModuleWithStrongFairness.allQCompassion()
public BDD[] allPCompassion()
ModuleWithStrongFairness
Getter for all the p's, of the compassion requirements of the module.
allPCompassion
in class ModuleWithStrongFairness
ModuleWithStrongFairness.addCompassion(BDD,
BDD)
,
ModuleWithStrongFairness.popLastCompassion()
,
ModuleWithStrongFairness.compassionNum()
,
ModuleWithStrongFairness.pCompassionAt(int)
,
ModuleWithStrongFairness.qCompassionAt(int)
,
ModuleWithStrongFairness.allQCompassion()
public BDD[] allQCompassion()
ModuleWithStrongFairness
Getter for all the q's, of the compassion requirements of the module.
allQCompassion
in class ModuleWithStrongFairness
ModuleWithStrongFairness.addCompassion(BDD,
BDD)
,
ModuleWithStrongFairness.popLastCompassion()
,
ModuleWithStrongFairness.compassionNum()
,
ModuleWithStrongFairness.pCompassionAt(int)
,
ModuleWithStrongFairness.qCompassionAt(int)
,
ModuleWithStrongFairness.allPCompassion()
public ModuleBDDField addVar(java.lang.String new_var, java.lang.String[] val_names) throws ModuleException
Add a set of values variable to this module.
new_var
- The new variable name.val_names
- The set of values that this variable can be assigned with.
ModuleException
- If an illegal manipulation to the module had been done. e.g.
duplicate variable names.addVar(String)
,
addVar(String, int, int)
,
hasVar(String, boolean)
,
getVar(String, boolean)
,
hasVarArray(String, boolean)
,
getVarArray(String, boolean)
public ModuleBDDField addVar(java.lang.String new_var, int range_start, int range_end) throws ModuleException
Add a range variable to this module.
new_var
- The new variable name.range_start
- The starting range of the variable.range_end
- The ending range of the variable.
ModuleException
- If an illegal manipulation to the module had been done. e.g.
duplicate variable names.addVar(String)
,
addVar(String, String[])
,
hasVar(String, boolean)
,
getVar(String, boolean)
,
hasVarArray(String, boolean)
,
getVarArray(String, boolean)
public void addInstanceVar(SMVModule inner, boolean is_sync)
Add a module instance as a variable to this module.
inner
- The inner instance to compose this module with.is_sync
- Is this a synchronous inner instance or asynchronous.
ModuleException
- If the name of the module does not fit the naming convention
for internal modules. i.e. if this module name is not the
longest prefix of the module to add name.hasInstance(String, boolean)
,
hasInstanceArray(String, boolean)
,
getInstance(String, boolean)
,
getAllInstances()
,
getAllInstances(edu.wis.jtlv.env.module.SMVModule.SyncStatus)
,
getInstanceArray(String, boolean)
,
removeInstanceVar(SMVModule)
public void removeInstanceVar(SMVModule inner)
Removes and inner composed module.
inner
- The inner module to remove.addInstanceVar(SMVModule, boolean)
,
hasInstance(String, boolean)
,
hasInstanceArray(String, boolean)
,
getInstance(String, boolean)
,
getAllInstances()
,
getAllInstances(edu.wis.jtlv.env.module.SMVModule.SyncStatus)
,
getInstanceArray(String, boolean)
public void removeRunningVar()
Remove the "running variable if is there (NuSMV compatibility)
public void syncComposition(Module inner)
Module
add synchronous composition to this module.
syncComposition
in class Module
inner
- The module to compose this instance with.public void asyncComposition(Module inner)
Module
add asynchronous composition to this module.
asyncComposition
in class Module
inner
- The module to compose this instance with.public void decompose(Module inner)
Module
remove composition from this module.
decompose
in class Module
inner
- The module to remove from this instance.public boolean hasVar(java.lang.String addr, boolean look_hard)
Check whether a variable with the given name exists.
addr
- The variable full name relative to this module.look_hard
- Whether to go into sub modules and keep on looking.
addVar(String)
,
addVar(String, String[])
,
addVar(String, int, int)
,
getVar(String, boolean)
,
hasVarArray(String, boolean)
,
getVarArray(String, boolean)
public boolean hasVarArray(java.lang.String addr, boolean look_hard)
Check whether a variable array with the given name exists.
addr
- The array full name relative to this module.look_hard
- Whether to go into sub modules and keep on looking.
addVar(String)
,
addVar(String, String[])
,
addVar(String, int, int)
,
hasVar(String, boolean)
,
hasVarArray(String, boolean)
,
getVar(String, boolean)
public boolean hasDefine(java.lang.String addr, boolean look_hard)
Check whether a define with the given name exists.
addr
- The define full name relative to this module.look_hard
- Whether to go into sub modules and keep on looking.
getDefine(String, boolean)
,
getAllDefines()
public boolean hasInstance(java.lang.String addr, boolean look_hard)
Check whether an instance with the given name exists.
addr
- The instance full name relative to this module.look_hard
- Whether to go into sub modules and keep on looking.
addInstanceVar(SMVModule, boolean)
,
hasInstanceArray(String, boolean)
,
getInstance(String, boolean)
,
getAllInstances()
,
getAllInstances(edu.wis.jtlv.env.module.SMVModule.SyncStatus)
,
getInstanceArray(String, boolean)
public boolean hasInstanceArray(java.lang.String addr, boolean look_hard)
Check whether an instance array with the given name exists.
addr
- The array full name relative to this module.look_hard
- Whether to go into sub modules and keep on looking.
addInstanceVar(SMVModule, boolean)
,
getInstanceArray(String, boolean)
,
hasInstance(String, boolean)
,
getInstance(String, boolean)
public boolean hasValue(java.lang.String name)
Check whether a value with the given name exists in any of the variables of the system.
name
- The value name.
getValue(String)
public boolean hasParam(java.lang.String addr, boolean look_hard)
Check whether a parameter with the given name exists.
addr
- The parameter full name relative to this module.look_hard
- Whether to go into sub modules and keep on looking.
getParam(int)
,
getAllParams()
public ModuleBDDField getVar(java.lang.String addr, boolean look_hard)
Get the variable with the given name.
addr
- The variable full name relative to this module.look_hard
- Whether to go into sub modules and keep on looking.
addVar(String)
,
addVar(String, String[])
,
addVar(String, int, int)
,
hasVar(String, boolean)
,
hasVarArray(String, boolean)
,
getVarArray(String, boolean)
public ModuleBDDField[] getVarArray(java.lang.String addr, boolean look_hard)
Get the array of variables with the given name. i.e., for an array of
variables,
var_arr : array 0..3 of boolean;
This procedure with the parameter "var_arr", will return all 4 fields of
this array. To get an exact field, for example "var_arr[3]", you can use
getVar(String, boolean)
, with
the parameter "inst_arr[3]".
addr
- The array full name relative to this module.look_hard
- Whether to go into sub modules and keep on looking.
addVar(String)
,
addVar(String, String[])
,
addVar(String, int, int)
,
hasVar(String, boolean)
,
hasVarArray(String, boolean)
,
getVar(String, boolean)
public ModuleBDDDefine getDefine(java.lang.String addr, boolean look_hard)
Get the define declared in this module with the given name.
addr
- The define full name relative to this module.look_hard
- Whether to go into sub modules and keep on looking.
hasDefine(String, boolean)
,
getAllDefines()
public SMVModule getInstance(java.lang.String addr, boolean look_hard)
Get the instances with the given name.
addr
- The instance full name relative to this module.look_hard
- Whether to go into sub modules and keep on looking.
addInstanceVar(SMVModule, boolean)
,
hasInstanceArray(String, boolean)
,
hasInstance(String, boolean)
,
getAllInstances()
,
getAllInstances(edu.wis.jtlv.env.module.SMVModule.SyncStatus)
,
getInstanceArray(String, boolean)
public SMVModule[] getInstanceArray(java.lang.String addr, boolean look_hard)
Get the array of instances with the given name. i.e., for an array of
instances,
inst_arr : array 0..7 of some_module;
This procedure with the parameter "inst_arr", will return all 8 instances
of this array. To get an exact instance, for example "inst_arr[3]", you
can use
getInstance(String, boolean)
,
with the parameter "inst_arr[3]".
addr
- The array full name relative to this module.look_hard
- Whether to go into sub modules and keep on looking.
addInstanceVar(SMVModule, boolean)
,
hasInstanceArray(String, boolean)
,
hasInstance(String, boolean)
,
getInstance(String, boolean)
public BDD getValue(java.lang.String name)
Get A BDD for the disjunct of all variables set to the given value. i.e., if a variable does not have the given string value, it is set to false.
name
- The value name.
hasValue(String)
public ModuleParamHolder getParam(int at_index)
Getter for the declared parameter and the given index, in this module signature.
at_index
- The index of the param to return.
hasDefine(String, boolean)
,
getAllParams()
public ModuleBDDDefine[] getAllDefines()
Getter for all the defines declared in this module.
hasDefine(String, boolean)
,
getDefine(String, boolean)
public SMVModule[] getAllInstances()
Getter for all instances declared in this module.
addInstanceVar(SMVModule, boolean)
,
hasInstance(String, boolean)
,
getInstance(String, boolean)
,
getHolder()
,
getAllInstances(edu.wis.jtlv.env.module.SMVModule.SyncStatus)
public SMVModule[] getAllInstances(SMVModule.SyncStatus status)
Getter for all synchronous or asynchronous instances declared in this module.
status
- The type of modules to fetch.
addInstanceVar(SMVModule, boolean)
,
hasInstance(String, boolean)
,
hasInstanceArray(String, boolean)
,
getInstance(String, boolean)
,
getHolder()
,
getAllInstances()
,
SMVModule.SyncStatus
public ModuleParamHolder[] getAllParams()
Getter for all declared parameters in this module signature.
hasParam(String, boolean)
,
getParam(int)
public SMVModule getHolder()
Getter for the module instance holds this instance.
getAllInstances()
,
getAllInstances(edu.wis.jtlv.env.module.SMVModule.SyncStatus)
public java.lang.String getFullInstName()
Module
Getter for the instance string.
getFullInstName
in class Module
public java.lang.String getFullInstNameWithParams()
Getter for the full instance name with the parameters.
public void setFullPrintingMode(boolean to_set)
Set the print mode for the toString procedure. If printing mode is set to full, then all BDDs and winning conditions will also be printed.
to_set
- Set or reset the printing mode.public java.lang.String toString()
Module
Prepare a string describing the module, its variables, define, statement, etc.
toString
in class Module
public java.lang.String getName()
Module
Getter for the declared field name which holds this instance.
getName
in class Module
public java.lang.String getPath()
Module
The path leading to this module.
getPath
in class Module
public void ___addDefine(java.lang.String addr) throws ModuleException
Add a new define variable to this module. This procedure only creates an
entity and does not attach a value. To attach a value, the user most
obtain the newly created define entity, using
getDefine(String, boolean)
or
getAllDefines()
, and attach a
value using
ModuleBDDDefine.attachStmt(edu.wis.jtlv.env.core.smv.eval.StmtDefineOperator)
addr
- The name for the newly created define entity.
ModuleException
- If an illegal manipulation to the module had been done. e.g.
duplicate variable names.___addDefineFromParam(String)
public void ___addDefineFromParam(java.lang.String addr) throws ModuleException
Add a new define variable from a lower instance to this module. This
procedure only creates an entity and does not attach a value. To attach a
value, the user most obtain the newly created define entity, using
getDefine(String, boolean)
or
getAllDefines()
, and attach a
value using
ModuleBDDDefine.attachStmt(edu.wis.jtlv.env.core.smv.eval.StmtDefineOperator)
addr
- The name for the newly created define entity.
ModuleException
- If an illegal manipulation to the module had been done. e.g.
duplicate variable names.___addDefine(String)
public edu.wis.jtlv.env.core.smv.schema.SMVModuleInfo ___getModuleInfo()
The the module parsing information.
public void ___attachParamPointers() throws ModuleException
Attach the module signature variables to their values.
ModuleException
- If there was a problem evaluating defines.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |