cz.vutbr.fit.atomicity
Class AtomicityTriple

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

public class AtomicityTriple
extends java.lang.Object
implements Atomicity

The atomicity with three ends.

Author:
zdenek

Field Summary
 Access atomBegin
           
 
Constructor Summary
AtomicityTriple(Access aBegin, Access aEnd1, Access aEnd2, Access aEnd3)
          Constructor takes the two ends.
 
Method Summary
 void genXML(javax.xml.transform.sax.TransformerHandler hd, boolean learning)
          Generates 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)
          Determines if the given program location represents one of the ends of this atomicity.
 java.lang.String toString()
          Give a text 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

AtomicityTriple

public AtomicityTriple(Access aBegin,
                       Access aEnd1,
                       Access aEnd2,
                       Access aEnd3)
Constructor takes the two ends.

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)
Determines if the given program location represents one of the ends of this 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 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()
Give a text representation of the atomicity.

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