cz.vutbr.fit.atomicity
Class AtomicitySimple

java.lang.Object
  extended by cz.vutbr.fit.atomicity.AtomicitySimple
All Implemented Interfaces:
Atomicity

public class AtomicitySimple
extends java.lang.Object
implements Atomicity

The representation of an atomicity with one end.

Author:
zdenek

Field Summary
 Access atomBegin
           
 
Constructor Summary
AtomicitySimple(Access aBegin, Access aEnd)
          Constructor takes the end of the atomicity.
 
Method Summary
 void genXML(javax.xml.transform.sax.TransformerHandler hd, boolean learning)
          Generates an XML record of this atomicity.
 Access[] getAtomEnds()
          Returns the array of ending Accesses.
 RaceDetector.Operation getBeginOp()
          Returns the access type (read/write of the atomicity begin operation.
 java.lang.String getKeyProgLocation()
          Returns ConTest program location of the begin access of this atomicity.
 void incViolation()
          This method will safely increment tne counter of this atomicity violation - this value is used during the learning stage.
 RaceDetector.Operation isEnd(java.lang.String progLocation)
          Returns true if the given program location represents the end of the atomicity.
 java.lang.String toString()
          Returns string representation of the atomicity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

atomBegin

public final Access atomBegin
Constructor Detail

AtomicitySimple

public AtomicitySimple(Access aBegin,
                       Access aEnd)
Constructor takes the end of the atomicity.

Parameters:
aEnd -
Method Detail

getBeginOp

public RaceDetector.Operation getBeginOp()
Returns the access type (read/write of the atomicity begin operation.

Specified by:
getBeginOp in interface Atomicity
Returns:
access type

getKeyProgLocation

public java.lang.String getKeyProgLocation()
Returns ConTest program location of the begin access of this atomicity.

Specified by:
getKeyProgLocation in interface Atomicity
Returns:
program location

getAtomEnds

public Access[] getAtomEnds()
Returns the array of ending Accesses.

Specified by:
getAtomEnds in interface Atomicity

incViolation

public void incViolation()
This method will safely increment tne counter of this atomicity violation - this value is used during the learning stage.

Specified by:
incViolation in interface Atomicity

isEnd

public RaceDetector.Operation isEnd(java.lang.String progLocation)
Returns true if the given program location represents the end of the atomicity.

Specified by:
isEnd in interface Atomicity
Parameters:
progLocation - ConTest program location.

genXML

public void genXML(javax.xml.transform.sax.TransformerHandler hd,
                   boolean learning)
            throws org.xml.sax.SAXException
Generates an XML record of this atomicity. (According to atomicity.dtd)

Specified by:
genXML in interface Atomicity
learning - True if the violation count should be also written
Throws:
org.xml.sax.SAXException

toString

public java.lang.String toString()
Returns string representation of the atomicity.

Specified by:
toString in interface Atomicity
Overrides:
toString in class java.lang.Object