Package ptolemy.actor.util
Interface Dependency
-
- All Superinterfaces:
java.lang.Comparable<Dependency>
- All Known Implementing Classes:
BooleanDependency
,RealDependency
,SuperdenseDependency
public interface Dependency extends java.lang.Comparable<Dependency>
This interface provides a dependency for causality interfaces as described in the paper "Causality Interfaces for Actor Networks" by Ye Zhou and Edward A. Lee, ACM Transactions on Embedded Computing Systems (TECS), April 2008, as available as Technical Report No. UCB/EECS-2006-148, November 16, 2006.A dependency represents a causality relationship between two ports. Implementations of this interface are required to satisfy certain algebraic properties, but as long as these are satisfied, there is considerable freedom.
- Since:
- Ptolemy II 8.0
- Version:
- $Id$
- Author:
- Edward A. Lee
- Pt.AcceptedRating:
- Red (eal)
- Pt.ProposedRating:
- Yellow (eal)
-
-
Field Summary
Fields Modifier and Type Field Description static int
EQUALS
Return value of compareTo() if this is equal to the argument.static int
GREATER_THAN
Return value of compareTo() if this is greater than the argument.static int
INCOMPARABLE
Return value of compareTo() if this is incomparable to the argument.static int
LESS_THAN
Return value of compareTo() if this is less than the argument.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Dependency
oPlus(Dependency d)
Return a dependency that results from parallel composition of this one and the specified one.Dependency
oPlusIdentity()
Return the dependency that when added to any other dependency using oPlus() yields the other dependency.Dependency
oTimes(Dependency d)
Return a dependency that results from serial composition of this one and the specified one.Dependency
oTimesIdentity()
Return the dependency that when multiplied by any other dependency using oTimes() yields the other dependency.
-
-
-
Field Detail
-
EQUALS
static final int EQUALS
Return value of compareTo() if this is equal to the argument.- See Also:
- Constant Field Values
-
GREATER_THAN
static final int GREATER_THAN
Return value of compareTo() if this is greater than the argument.- See Also:
- Constant Field Values
-
INCOMPARABLE
static final int INCOMPARABLE
Return value of compareTo() if this is incomparable to the argument.- See Also:
- Constant Field Values
-
LESS_THAN
static final int LESS_THAN
Return value of compareTo() if this is less than the argument.- See Also:
- Constant Field Values
-
-
Method Detail
-
oPlus
Dependency oPlus(Dependency d)
Return a dependency that results from parallel composition of this one and the specified one. This is required to be associative and commutative. That is, d1.oPlus(d2).oPlus(d3) should be equal to d1.oPlus(d2.oPlus(d3)), and d1.oPlus(d2) should be equal to d2.oPlus(d1). In addition, any implementation should be idempotent, meaning that d.oPlus(d) is equal to d.- Parameters:
d
- The dependency to add.- Returns:
- A dependency whose value is the logical OR of the two dependency values.
- Throws:
java.lang.ClassCastException
- if d is not a BooleanDependency.
-
oPlusIdentity
Dependency oPlusIdentity()
Return the dependency that when added to any other dependency using oPlus() yields the other dependency.- Returns:
- The additive identity.
-
oTimes
Dependency oTimes(Dependency d)
Return a dependency that results from serial composition of this one and the specified one. This is required to be associative, but not necessarily commutative. That is, d1.oTimes(d2).oTimes(d3) should be equal to d1.oTimes(d2.oTimes(d3)). Moreover, it should be distributive over oPlus. That is, d1.oTimes(d2.oPlus(d3)) should be equal to (d1.oTimes(d2)).oPlus(d1.oTimes(d3)).- Parameters:
d
- The dependency to multiply.- Returns:
- A dependency whose value is the logical AND of the value of this one and the specified one.
- Throws:
java.lang.ClassCastException
- if d is not a BooleanDependency.
-
oTimesIdentity
Dependency oTimesIdentity()
Return the dependency that when multiplied by any other dependency using oTimes() yields the other dependency.- Returns:
- The multiplicative identity.
-
-