cz.vutbr.fit.racedetector
Class ARVariable
java.lang.Object
cz.vutbr.fit.racedetector.RDVariable
cz.vutbr.fit.racedetector.ARVariable
public class ARVariable
- extends RDVariable
This class implements the core of the atomicity race detecting algorithm and
contains variable related information.
Atomicity race detecting algorithm checks if two or more threads are not
accessing the parts of code that should be executed atomically
simultaneously.
- Author:
- zdenek
Constructor Summary |
ARVariable(java.lang.Object ins,
java.lang.String vName)
constructor |
Method Summary |
boolean |
afterAccess(ARThread art,
java.lang.String programLocation)
Things that should be done before the access to the variable: If this
thread is inside the critical section of this variable and the given
program location is the end of the atomic section - stop checking. |
boolean |
beforeAccess(ARThread art,
java.lang.String programLocation,
RaceDetector.Operation operation,
Atomicity beginAtom)
Things that should be done before the access to the variable: Check if
someone else is not in the critical section of this variable (if is -
than conflict is detected). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ARVariable
public ARVariable(java.lang.Object ins,
java.lang.String vName)
- constructor
beforeAccess
public boolean beforeAccess(ARThread art,
java.lang.String programLocation,
RaceDetector.Operation operation,
Atomicity beginAtom)
- Things that should be done before the access to the variable: Check if
someone else is not in the critical section of this variable (if is -
than conflict is detected). If this is the start of some atomic section
set the flag and store other useful information.
- Parameters:
art
- Thread related and cached information.programLocation
- Current program location.operation
- Type of the operation read/write.beginAtom
- Contains atomicity if there begins some at the current program
location
- Returns:
- true if there is suspected race
afterAccess
public boolean afterAccess(ARThread art,
java.lang.String programLocation)
- Things that should be done before the access to the variable: If this
thread is inside the critical section of this variable and the given
program location is the end of the atomic section - stop checking.
- Parameters:
art
- Thread related and cached information.programLocation
- Current program location.
- Returns:
- true if it was true race