ptolemy.actor
Class CausalityMarker

java.lang.Object
  extended by ptolemy.kernel.util.NamedObj
      extended by ptolemy.kernel.util.Attribute
          extended by ptolemy.actor.CausalityMarker
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Changeable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

public class CausalityMarker
extends Attribute

This is a marker that stores list of a sets of dependent ports. Each set implies a pure event produced in this actor is causally related to events coming into the ports in this set. The reason to have a list of sets is that an actor may produce different pure events which are causally related to a subset of the input ports.

The set of ports is very closely related to equivalence class. The current understanding of this relationship (which may not be correct) is summarized as follows:

1. If two ports belong to the same set, then they should also belong to the same finite equivalence class. 2. If two ports belong to the same finite equivalence class, they should also be in the same set.

From this summarization, it seems the causality marker is exactly the same as equivalence class. In the future, this class may be integrated as a part of the CausalityInterface. This may require ports to be created for pure events.

Since:
Ptolemy II 8.0
Version:
$Id: CausalityMarker.java 59167 2010-09-21 17:08:02Z cxh $
Author:
Jia Zou
See Also:
Serialized Form
Accepted Rating:
Red (jiazou)
Proposed Rating:
Red (jiazou)

Nested Class Summary
 
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
 
Field Summary
 java.util.List<java.util.Set<Port>> causalityMarker
          The list of sets of ports in the causality marker.
 
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
 
Constructor Summary
CausalityMarker(NamedObj container, java.lang.String name)
          Construct a CausalityMarker.
 
Method Summary
 void addDependentPortSet(java.util.Set<Port> dependentPorts)
          Add a set of ports into the list.
 boolean containsPort(Port port)
          Check if this port is contained in the list of sets of ports.
 
Methods inherited from class ptolemy.kernel.util.Attribute
_checkContainer, _getContainedObject, _propagateExistence, clone, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setContainer, setName, updateContent
 
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _description, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _recordDecoratedAttributes, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, attributeChanged, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, propagateExistence, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

causalityMarker

public java.util.List<java.util.Set<Port>> causalityMarker
The list of sets of ports in the causality marker.

Constructor Detail

CausalityMarker

public CausalityMarker(NamedObj container,
                       java.lang.String name)
                throws IllegalActionException,
                       NameDuplicationException
Construct a CausalityMarker. This creates a list of sets of ports.

Parameters:
container - The container for this marker
name - The name of this marker.
Throws:
IllegalActionException
NameDuplicationException
Method Detail

addDependentPortSet

public void addDependentPortSet(java.util.Set<Port> dependentPorts)
Add a set of ports into the list.

Parameters:
dependentPorts - set of ports to be added.

containsPort

public boolean containsPort(Port port)
                     throws IllegalActionException
Check if this port is contained in the list of sets of ports.

Parameters:
port - to be checked.
Returns:
true if this port is contained in causality marker. Else return false.
Throws:
IllegalActionException