edu.wis.jtlv.env.module
Class Module

java.lang.Object
  extended by edu.wis.jtlv.env.module.Module
Direct Known Subclasses:
ModuleWithWeakFairness

public abstract class Module
extends java.lang.Object

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.

Version:
"1.1.0"
Author:
yaniv sa'ar.
See Also:
Env.loadModule(String), Env.getAllModules(), Env.getModule(String)

Constructor Summary
Module()
           
 
Method Summary
abstract  void addInitial(net.sf.javabdd.BDD to_add)
           Conjunct the initial condition with the given condition.
abstract  void addVar(java.lang.String new_var)
           Add a variable to the module.
 net.sf.javabdd.BDD allPred(net.sf.javabdd.BDD to)
           Given a set of state, this procedure return all states which can lead in any number of module steps to these states.
 net.sf.javabdd.BDD allSucc(net.sf.javabdd.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 conjunctTrans(net.sf.javabdd.BDD to_add)
           Conjunct the transition relation with the given condition.
abstract  void disjunctTrans(net.sf.javabdd.BDD to_add)
           Disjunct the transition relation with the given condition.
abstract  ModuleBDDField[] getAllFields()
           Getter for all fields declared in this module.
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.
abstract  net.sf.javabdd.BDD initial()
           Getter for the initial states in the module.
 net.sf.javabdd.BDD pred(net.sf.javabdd.BDD to)
           Given a set of state, this procedure return all states which can lead in a single module step to these states.
 net.sf.javabdd.BDD prime(net.sf.javabdd.BDD unprime_set)
           Prime the given BDD with respect to the variable in this module.
 net.sf.javabdd.BDDVarSet primeVars()
           Getter for the primed variable of this module.
 net.sf.javabdd.BDD succ(net.sf.javabdd.BDD from)
           This procedure return all states which the module can reach in a single step from given a set of state.
abstract  java.lang.String toString()
           Prepare a string describing the module, its variables, define, statement, etc.
abstract  net.sf.javabdd.BDD trans()
           Getter for the transition relation of the module.
 net.sf.javabdd.BDD unprime(net.sf.javabdd.BDD prime_set)
           Unprime the given BDD with respect to the variable in this module.
 net.sf.javabdd.BDDVarSet unprimeVars()
           Getter for the unprimed variable of this module.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Module

public Module()
Method Detail

addVar

public abstract void addVar(java.lang.String new_var)
                     throws ModuleException

Add a variable to the module.

Parameters:
new_var - The name of the new variable to add.
Throws:
ModuleException - If there was a problem with adding the variable, e.g. a variable with this name already exists.

addInitial

public abstract void addInitial(net.sf.javabdd.BDD to_add)
                         throws ModuleException

Conjunct the initial condition with the given condition.

Parameters:
to_add - The condition to add to the module.
Throws:
ModuleException - If there was a problem with adding the condition, e.g. a there where primed variables in the condition.
See Also:
initial()

conjunctTrans

public abstract void conjunctTrans(net.sf.javabdd.BDD to_add)
                            throws ModuleException

Conjunct the transition relation with the given condition.

Parameters:
to_add - The transition to conjunct with the module's transitions.
Throws:
ModuleException - If there was a problem with adding relation.
See Also:
trans(), disjunctTrans(BDD)

disjunctTrans

public abstract void disjunctTrans(net.sf.javabdd.BDD to_add)
                            throws ModuleException

Disjunct the transition relation with the given condition.

Parameters:
to_add - The transition disjunct with to the module's transitions.
Throws:
ModuleException - If there was a problem with adding relation.
See Also:
trans(), conjunctTrans(BDD)

initial

public abstract net.sf.javabdd.BDD initial()

Getter for the initial states in the module.

Returns:
The initial states of the module.
See Also:
addInitial(BDD)

trans

public abstract net.sf.javabdd.BDD trans()

Getter for the transition relation of the module.

Returns:
The transition relation of the module.
See Also:
disjunctTrans(BDD), conjunctTrans(BDD)

pred

public net.sf.javabdd.BDD pred(net.sf.javabdd.BDD to)
                        throws net.sf.javabdd.BDDException

Given a set of state, this procedure return all states which can lead in a single module step to these states.

Parameters:
to - The set of state to be reach.
Returns:
The set of states which can lead in a single module step to the given states.
Throws:
net.sf.javabdd.BDDException - If there was a problem with the BDD operation.
See Also:
allPred(BDD), trans(), succ(BDD)

allPred

public net.sf.javabdd.BDD allPred(net.sf.javabdd.BDD to)
                           throws net.sf.javabdd.BDDException

Given a set of state, this procedure return all states which can lead in any number of module steps to these states.

Parameters:
to - The set of state to be reach.
Returns:
The set of states which can lead in any number of module step to the given states.
Throws:
net.sf.javabdd.BDDException - If there was a problem with the BDD operation.
See Also:
pred(BDD), trans(), allSucc(BDD)

succ

public net.sf.javabdd.BDD succ(net.sf.javabdd.BDD from)
                        throws net.sf.javabdd.BDDException

This procedure return all states which the module can reach in a single step from given a set of state.

Parameters:
from - The set of state to start from.
Returns:
The set of states which the module can reach in a single module step from the given states.
Throws:
net.sf.javabdd.BDDException - If there was a problem with the BDD operation.
See Also:
allSucc(BDD), trans(), pred(BDD)

allSucc

public net.sf.javabdd.BDD allSucc(net.sf.javabdd.BDD from)
                           throws net.sf.javabdd.BDDException

This procedure return all states which the module can reach in any number of steps from given a set of state.

Parameters:
from - The set of state to start from.
Returns:
The set of states which the module can reach in any number of module steps from the given states.
Throws:
net.sf.javabdd.BDDException - If there was a problem with the BDD operation.
See Also:
allPred(BDD), trans(), succ(BDD)

getAllFields

public abstract ModuleBDDField[] getAllFields()

Getter for all fields declared in this module.

Returns:
All fields declared in this module.

prime

public net.sf.javabdd.BDD prime(net.sf.javabdd.BDD unprime_set)
                         throws net.sf.javabdd.BDDException

Prime the given BDD with respect to the variable in this module. I.e. only variable from this module will be switched to their primed version.

Parameters:
unprime_set - The BDD to prime.
Returns:
The BDD with the variables from this module switched to their primed version.
Throws:
net.sf.javabdd.BDDException - If trying to prime primed version of the variable.
See Also:
Env.prime(BDD), Env.prime(BDD, ModuleBDDField[]), unprime(BDD), primeVars()

unprime

public net.sf.javabdd.BDD unprime(net.sf.javabdd.BDD prime_set)
                           throws net.sf.javabdd.BDDException

Unprime the given BDD with respect to the variable in this module. I.e. only variable from this module will be switched to their unprimed version.

Parameters:
prime_set - The BDD to unprime.
Returns:
The BDD with the variables from this module switched to their unprimed version.
Throws:
net.sf.javabdd.BDDException - If trying to unprime unprimed version of the variable.
See Also:
Env.unprime(BDD), Env.unprime(BDD, ModuleBDDField[]), prime(BDD), unprimeVars()

primeVars

public net.sf.javabdd.BDDVarSet primeVars()

Getter for the primed variable of this module.

Returns:
The primed variables of this module.

unprimeVars

public net.sf.javabdd.BDDVarSet unprimeVars()

Getter for the unprimed variable of this module.

Returns:
The unprimed variables of this module.

toString

public abstract java.lang.String toString()

Prepare a string describing the module, its variables, define, statement, etc.

Overrides:
toString in class java.lang.Object
Returns:
A string describing the module.

getPath

public abstract java.lang.String getPath()

The path leading to this module.

Returns:
The path leading to this module.

getName

public abstract java.lang.String getName()

Getter for the declared field name which holds this instance.

Returns:
The declared field name which holds this instance.

getFullInstName

public abstract java.lang.String getFullInstName()

Getter for the instance string.

Returns:
The instance string.