|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
edu.wis.jtlv.env.JTLVThread
public abstract class JTLVThread
JTLVThread is a thread dedicated to BDD operations. The BDD packages them selves are not implemented to support multi threading. This current implementation is very restrictive. The user must be completely aware to the implementation, and avoid the following issue.
Main thread has a BDD manager of its own. In addition, each instance of a
JTLV thread has a completely disjoint dedicated BDD manager in JTLV
environment. You can get the thread dedicated manager index by using
getDedicatedBDDManagerIdx()
.
Performing operation between two BDD, created from different BDD manager will
lead to and error. The only way to port BDDs from one manager to another is
by using adjustBDD* procedure given in this implementation. Porting is a BDD
action, be also careful with multi threading porting.
e.g. don't do adjustBDDToBase in two concurrent threads since both are
writing to the same base manager.
The number managers must be declared up-front before doing anything in "Env"
(or before reseting the environment). The number of managers is declared by
the System.property key "pool_size" (plus one additional manager to the main
thread).
Be aware that instantiating and assigning more JTLVThread then the number of
managers, will lock the last thread until a manager will be freed. (e.g.
might lead to a deadlock.)
Env.getThreadPoolSize()
,
Env.assignDedicatedBDDManagerIdx(JTLVThread)
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Method Summary | |
---|---|
BDD |
adjustBDDToBase(BDD to_adjust)
Copy the BDD from this manager to the base manager. |
BDD[] |
adjustBDDToBase(BDD[] to_adjust)
Copy an array of BDDs from this manager to the base manager. |
BDD |
adjustBDDToManager(BDD to_adjust)
Copy the BDD to the manager assigned to this thread. |
BDD[] |
adjustBDDToManager(BDD[] to_adjust)
Copy an array of BDDs to the manager assigned to this thread. |
BDDVarSet |
adjustBDDVarSetToBase(BDDVarSet to_adjust)
Copy the BDDVarSet from this manager to the base manager. |
BDDVarSet[] |
adjustBDDVarSetToBase(BDDVarSet[] to_adjust)
Copy an array of BDDVarSets from this manager to the base manager. |
BDDVarSet |
adjustBDDVarSetToManager(BDDVarSet to_adjust)
Copy the BDDVarSet to the manager assigned to this thread. |
BDDVarSet[] |
adjustBDDVarSetToManager(BDDVarSet[] to_adjust)
Copy an array of BDDVarSets to the manager assigned to this thread. |
long |
getCopyTime()
Get the accumulated overall time (since last reset) of copy to this BDD factory. |
int |
getDedicatedBDDManagerIdx()
|
boolean |
isMonitoringCopyTime()
|
void |
resetCopyTime()
Reset the time this thread spent on copying. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public int getDedicatedBDDManagerIdx()
public boolean isMonitoringCopyTime()
public void resetCopyTime()
Reset the time this thread spent on copying.
getCopyTime()
public long getCopyTime()
Get the accumulated overall time (since last reset) of copy to this BDD factory.
resetCopyTime()
public BDD adjustBDDToManager(BDD to_adjust)
Copy the BDD to the manager assigned to this thread.
to_adjust
- The BDD to copy.
adjustBDDToBase(BDD)
,
adjustBDDToBase(BDD[])
,
adjustBDDToManager(BDD[])
public BDD[] adjustBDDToManager(BDD[] to_adjust)
Copy an array of BDDs to the manager assigned to this thread.
to_adjust
- The array of BDD's to copy.
adjustBDDToBase(BDD)
,
adjustBDDToBase(BDD[])
,
adjustBDDToManager(BDD)
public BDD adjustBDDToBase(BDD to_adjust)
Copy the BDD from this manager to the base manager.
to_adjust
- The BDD to copy.
adjustBDDToBase(BDD[])
,
adjustBDDToManager(BDD)
,
adjustBDDToManager(BDD[])
public BDD[] adjustBDDToBase(BDD[] to_adjust)
Copy an array of BDDs from this manager to the base manager.
to_adjust
- The array of BDD's to copy.
adjustBDDToBase(BDD)
,
adjustBDDToManager(BDD)
,
adjustBDDToManager(BDD[])
public BDDVarSet adjustBDDVarSetToManager(BDDVarSet to_adjust)
Copy the BDDVarSet to the manager assigned to this thread.
to_adjust
- The BDDVarSet to copy.
adjustBDDVarSetToBase(BDDVarSet)
,
adjustBDDVarSetToBase(BDDVarSet[])
,
adjustBDDVarSetToManager(BDDVarSet[])
public BDDVarSet[] adjustBDDVarSetToManager(BDDVarSet[] to_adjust)
Copy an array of BDDVarSets to the manager assigned to this thread.
to_adjust
- The array of BDDVarSet's to copy.
adjustBDDVarSetToBase(BDDVarSet)
,
adjustBDDVarSetToBase(BDDVarSet[])
,
adjustBDDVarSetToManager(BDDVarSet)
public BDDVarSet adjustBDDVarSetToBase(BDDVarSet to_adjust)
Copy the BDDVarSet from this manager to the base manager.
to_adjust
- The BDDVarSet to copy.
adjustBDDVarSetToBase(BDDVarSet[])
,
adjustBDDVarSetToManager(BDDVarSet)
,
adjustBDDVarSetToManager(BDDVarSet[])
public BDDVarSet[] adjustBDDVarSetToBase(BDDVarSet[] to_adjust)
Copy an array of BDDVarSets from this manager to the base manager.
to_adjust
- The array of BDDVarSet's to copy.
adjustBDDVarSetToBase(BDDVarSet)
,
adjustBDDVarSetToManager(BDDVarSet)
,
adjustBDDVarSetToManager(BDDVarSet[])
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |