sofya.apps.atomicity
Class DefaultEventClassifier

java.lang.Object
  extended by sofya.ed.semantic.EventFilter
      extended by sofya.ed.semantic.EventSelectionFilter
          extended by sofya.apps.atomicity.EventClassifier
              extended by sofya.apps.atomicity.DefaultEventClassifier
All Implemented Interfaces:
EventListener

public class DefaultEventClassifier
extends EventClassifier

This class implements a default global event classification policy.

Version:
12/19/2005
Author:
Alex Kinneer

Nested Class Summary
 
Nested classes/interfaces inherited from class sofya.apps.atomicity.EventClassifier
EventClassifier.EventClass
 
Nested classes/interfaces inherited from interface sofya.ed.semantic.EventListener
EventListener.Arguments, EventListener.CallData, EventListener.ExceptionData, EventListener.FieldData, EventListener.MethodData, EventListener.MonitorData, EventListener.NewAllocationData, EventListener.ObjectData, EventListener.ThreadData, EventListener.ThreadStatus
 
Field Summary
 
Fields inherited from class sofya.apps.atomicity.EventClassifier
eventClass
 
Fields inherited from class sofya.ed.semantic.EventFilter
listenerCount, listeners
 
Constructor Summary
DefaultEventClassifier(boolean objectSensitive, MultiLocksetRaceDetector raceDetector, HappenBeforeChecker hbChecker)
          Creates a new default event classifier.
 
Method Summary
 void constructorEnterEvent(EventListener.ThreadData td, EventListener.ObjectData od, EventListener.MethodData md)
          Notification that a constructor was entered.
 void instanceFieldAccessEvent(EventListener.ThreadData td, EventListener.ObjectData od, EventListener.FieldData fd)
          Notification that an instance field was read.
 void instanceFieldWriteEvent(EventListener.ThreadData td, EventListener.ObjectData od, EventListener.FieldData fd)
          Notification that an instance field was written.
 void monitorAcquireEvent(EventListener.ThreadData td, EventListener.ObjectData od, EventListener.MonitorData md)
          Notification that a thread has acquired a monitor.
 void monitorContendEvent(EventListener.ThreadData td, EventListener.ObjectData od, EventListener.MonitorData md)
          Notification that a thread is contending for a monitor.
 void monitorPreReleaseEvent(EventListener.ThreadData td, EventListener.ObjectData od, EventListener.MonitorData md)
          Notification that a thread is about to release a monitor.
 void monitorReleaseEvent(EventListener.ThreadData td, EventListener.ObjectData od, EventListener.MonitorData md)
          Notification that a thread has released a monitor.
 void staticFieldAccessEvent(EventListener.ThreadData td, EventListener.FieldData fd)
          Notification that a static field was read.
 void staticFieldWriteEvent(EventListener.ThreadData td, EventListener.FieldData fd)
          Notification that a static field was written.
 void threadDeathEvent(EventListener.ThreadData td)
          Notification that a thread has terminated.
 void threadStartEvent(EventListener.ThreadData td)
          Notification that a thread has started.
 
Methods inherited from class sofya.ed.semantic.EventSelectionFilter
callReturnEvent, classPrepareEvent, constructorCallEvent, constructorExitEvent, exceptionCatchEvent, exceptionThrowEvent, executionStarted, interfaceCallEvent, newAllocationEvent, staticCallEvent, staticInitializerEnterEvent, staticMethodEnterEvent, staticMethodExitEvent, systemExited, systemStarted, virtualCallEvent, virtualMethodEnterEvent, virtualMethodExitEvent
 
Methods inherited from class sofya.ed.semantic.EventFilter
addEventListener, ensureCapacity, removeEventListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultEventClassifier

public DefaultEventClassifier(boolean objectSensitive,
                              MultiLocksetRaceDetector raceDetector,
                              HappenBeforeChecker hbChecker)
Creates a new default event classifier.

Parameters:
objectSensitive - Specifies whether race detection should treat field of every object instance as distinct.
raceDetector - Multi-lockset race detector to be used to refine race detection.
hbChecker - Happens-before checker used to refine race detection.
Method Detail

constructorEnterEvent

public void constructorEnterEvent(EventListener.ThreadData td,
                                  EventListener.ObjectData od,
                                  EventListener.MethodData md)
Description copied from interface: EventListener
Notification that a constructor was entered.

This is the first point during the object creation process at which the object can be uniquely identified.

Specified by:
constructorEnterEvent in interface EventListener
Overrides:
constructorEnterEvent in class EventSelectionFilter
Parameters:
td - Information about the thread executing the constructor.
od - Information about the object under construction. At the time of this event, only the object ID will be valid.
md - Information about the entered constructor.

threadStartEvent

public void threadStartEvent(EventListener.ThreadData td)
Description copied from interface: EventListener
Notification that a thread has started. These events are not dependent on the module description.

Specified by:
threadStartEvent in interface EventListener
Overrides:
threadStartEvent in class EventSelectionFilter
Parameters:
td - Information about the newly started thread.

threadDeathEvent

public void threadDeathEvent(EventListener.ThreadData td)
Description copied from interface: EventListener
Notification that a thread has terminated. These events are not dependent on the module description.

Specified by:
threadDeathEvent in interface EventListener
Overrides:
threadDeathEvent in class EventSelectionFilter
Parameters:
td - Information about the terminated thread.

monitorContendEvent

public void monitorContendEvent(EventListener.ThreadData td,
                                EventListener.ObjectData od,
                                EventListener.MonitorData md)
Description copied from interface: EventListener
Notification that a thread is contending for a monitor.

Specified by:
monitorContendEvent in interface EventListener
Overrides:
monitorContendEvent in class EventSelectionFilter
Parameters:
td - Information about the thread which is contending for a monitor.
od - Information about the object which owns the monitor.
md - Information about the location of the monitor contention.

monitorAcquireEvent

public void monitorAcquireEvent(EventListener.ThreadData td,
                                EventListener.ObjectData od,
                                EventListener.MonitorData md)
Description copied from interface: EventListener
Notification that a thread has acquired a monitor.

Specified by:
monitorAcquireEvent in interface EventListener
Overrides:
monitorAcquireEvent in class EventSelectionFilter
Parameters:
td - Information about the thread which acquired a monitor.
od - Information about the object which owns the monitor.
md - Information about the location of the monitor acquisition.

monitorPreReleaseEvent

public void monitorPreReleaseEvent(EventListener.ThreadData td,
                                   EventListener.ObjectData od,
                                   EventListener.MonitorData md)
Description copied from interface: EventListener
Notification that a thread is about to release a monitor.

Specified by:
monitorPreReleaseEvent in interface EventListener
Overrides:
monitorPreReleaseEvent in class EventSelectionFilter
Parameters:
td - Information about the thread which is about to release a monitor.
od - Information about the object which owns the monitor.
md - Information about the location of the monitor about to be released event..

monitorReleaseEvent

public void monitorReleaseEvent(EventListener.ThreadData td,
                                EventListener.ObjectData od,
                                EventListener.MonitorData md)
Description copied from interface: EventListener
Notification that a thread has released a monitor.

Specified by:
monitorReleaseEvent in interface EventListener
Overrides:
monitorReleaseEvent in class EventSelectionFilter
Parameters:
td - Information about the thread which released a monitor.
od - Information about the object which owns the monitor.
md - Information about the location of the monitor release.

staticFieldAccessEvent

public void staticFieldAccessEvent(EventListener.ThreadData td,
                                   EventListener.FieldData fd)
Description copied from interface: EventListener
Notification that a static field was read.

Specified by:
staticFieldAccessEvent in interface EventListener
Overrides:
staticFieldAccessEvent in class EventSelectionFilter
Parameters:
td - Information about the thread in which the field access occurred.
fd - Information about the accessed field.

instanceFieldAccessEvent

public void instanceFieldAccessEvent(EventListener.ThreadData td,
                                     EventListener.ObjectData od,
                                     EventListener.FieldData fd)
Description copied from interface: EventListener
Notification that an instance field was read.

Specified by:
instanceFieldAccessEvent in interface EventListener
Overrides:
instanceFieldAccessEvent in class EventSelectionFilter
Parameters:
td - Information about the thread in which the field access occurred.
od - Information about the object which owns the accessed field.
fd - Information about the accessed field.

staticFieldWriteEvent

public void staticFieldWriteEvent(EventListener.ThreadData td,
                                  EventListener.FieldData fd)
Description copied from interface: EventListener
Notification that a static field was written.

Specified by:
staticFieldWriteEvent in interface EventListener
Overrides:
staticFieldWriteEvent in class EventSelectionFilter
Parameters:
td - Information about the thread in which the field write occurred.
fd - Information about the written field.

instanceFieldWriteEvent

public void instanceFieldWriteEvent(EventListener.ThreadData td,
                                    EventListener.ObjectData od,
                                    EventListener.FieldData fd)
Description copied from interface: EventListener
Notification that an instance field was written.

Specified by:
instanceFieldWriteEvent in interface EventListener
Overrides:
instanceFieldWriteEvent in class EventSelectionFilter
Parameters:
td - Information about the thread in which the field write occurred.
od - Information about the object which owns the written field.
fd - Information about the written field.