Download presentation

Presentation is loading. Please wait.

1
Using Interfaces to Analyze Compositionality Haiyang Zheng and Rachel Zhou EE290N Class Project Presentation Dec. 10, 2004

2
Outline Introduction and motivation. Study and development of several interfaces for discrete-event models. Applying the previously developed interfaces on dataflow and process network models. Conclusion.

3
Introduction What is a composition? –A product of mixing or combining various elements or ingredients. (From Merriam-Webster Online.) What is a valid composition? –The interface of a composition should be indistinguishable from its elements. An interface of an actor can be a set of ports and parameters. –The behavior of a composition should be the same as that of before being composed. A behavior includes not only ports and parameters but also the signals going through the ports. Can we reason about the behavioral validity of a composition by analyzing its interfaces only?

4
An Example without Composition A discrete-event model that has a unique behavior. A delta-causal process.

5
An Example with Composition What about the existence and uniqueness of the behavior of the following model (modified from the previous example by introducing a hierarchy)? The causality property is missing. An interface only consisting of ports and parameters is insufficient to reason about the behavior of the composite actor.

6
A Refined Interface This interface includes function dependencies of an actor. –A function dependency of an actor is a data dependency relation that an output port has on an input port of the same actor in the same firing. This interface is a graph, where nodes are ports and directed edges represent data dependencies. Function Dependency (No data dependency.) Interfaces Function Dependency (Output depends on input.)

7
A Refined Interface (Continued) Abstraction Communication Dependency Interfaces (graphs) of component actors can be composed with communication dependencies to construct another graph. The interface of a composite actor is an abstraction of the resulted graph.

8
Revisiting Example What about the existence and uniqueness of the behavior of the following model (modified from the previous example by introducing a hierarchy)? A strictly causal process. The new interface containing function dependency is still insufficient to reason about the behavior of the composite actor.

9
A Weighted Interface This interface contains weighted function dependencies. Each input-output pair has a directed edge going from input to output. Each edge has a weight, where the weight represents the amount of delay between input and output. A directed edge with weight 1.0. A directed edge with weight 0.0. A directed edge with weight infinity. A directed edge with weight x. 1.0 0.0 infinity x

10
A Weighted Interface (Cont.) This interface distinguishes delta causality from strict causality. If an edge has a weight depending on states, this interface may not help much. Abstraction 0.0 1.00.01.0 Sum Abstraction 0.0 x x Sum Replace TimedDelay with

11
Revisiting Example What about the existence and uniqueness of the behavior of the following model (modified from the previous example by introducing a hierarchy)? A delta causal process. The new interface containing weighted function dependency is sufficient to reason about the behavior of the composite actor.

12
A More Complex DE Model We can conclude from the analysis of interfaces that the following model has a unique behavior and it is a valid composition according to the DE semantics. –A DE simulator may complain about a direct feedback loop. –However, if a DE simulator can simulate the model, it does give the same behavior as that of a flattened model. p1p3p2 p4 0.0 p5 0.0 p6 0.0 p1 p2 p3 p4 (t, 1, 1) a a (t, 1, 2) a a (t, 2, 1) b b (t, 2, 2) b b p1 p2 p3 p4 (t, 1) a a a a (t, 2) b b b b Before composition After composition Index for Firings of Composite Firing order of Actors

13
Where are we… Introduction and motivation. Study and improvement of several interfaces for discrete-event models. Applying the previously developed interfaces on dataflow and process network models. Conclusion.

14
B E 2 D A F C SDF B E 2 D A F C Composition Example 1 in Dataflow Composition in SDF adds constraints on the number of firings of actor B and E in the firing vector. A consistent SDF graph. This makes the whole model inconsistent. This is an invalid composition.

15
B E 2 D A F C SDF B E 2 D A F C Schedules for actor B and E are actually independent, but composition adds constraint on them. Decomposition using Function Dependency One solution is to perform function dependency analysis and decomposition. Only necessary decomposition is performed so maximum compositionality is preserved.

16
Composition Example 2 in Dataflow A consistent SDF graph. Schedulability is lost if hierarchy is introduced. The graph becomes deadlock.

17
Weighted Interface for Dataflow Nodes represent ports and directed edges represent data and communication dependencies. Each node has a weight, which represents the number of initial tokens available at this node (port). A directed edge represents dependency between the weight of its sink node on that of its source node. kk+1kk k k 0

18
Dataflow Example 2 Revisited Abstraction kkk +1 k The interface exposes the necessary information to analyze deadlock correctly.

19
Dataflow Example 3 A {0} 2 B 3 32 k When k = 1, Therefore, actor B has enough tokens to fire and the deadlock is resolved. A symbolic representation of the interface.

20
Dataflow Example 1 Revisited B E 2 D A F C SDF m n m n Similarly, we can use symbolic representation (weighted interfaces) for the rate signature of the composite actor. The variable m and n give 2 degrees of freedom on the composite actor schedule. m and n can be determined by the outside constraint (balance equations) and the minimum solution requirement.

21
Artificial Local Deadlock in Process Network B ED A F C PN B ED A F C One solution is to introduce a new hierarchy for each disconnected graph. Each inside PN director is responsible to detect its own deadlock. Artificial local deadlock is not handled by Parks’ algorithm.

22
Conclusion We developed several interfaces to analyze compositionality of models with different models of computation. Future work will be to develop more useful interfaces.

23
The End. Thanks!

Similar presentations

© 2020 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google