Top Banner
7th Biennial Ptolemy M iniconference Berkeley, CA February 13, 2007 Causality Interfaces for Actor Networks Ye Zhou and Edward A. Lee University of California, Berkeley
18

7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Causality Interfaces for Actor Networks Ye Zhou and Edward A. Lee University of California,

Dec 19, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Causality Interfaces for Actor Networks Ye Zhou and Edward A. Lee University of California,

7th Biennial Ptolemy Miniconference

Berkeley, CAFebruary 13, 2007

Causality Interfaces for Actor Networks

Ye Zhou and Edward A. Lee

University of California, Berkeley

Page 2: 7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Causality Interfaces for Actor Networks Ye Zhou and Edward A. Lee University of California,

Zhou, Berkeley 2Ptolemy Miniconference, February 13, 2007

Introduction

Actor receives tokens from input ports and reacts to these tokens by producing tokens on the output ports.

What flows in the connectors are signals (streams of tokens).

actor

output port

connector

input port

Page 3: 7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Causality Interfaces for Actor Networks Ye Zhou and Edward A. Lee University of California,

Zhou, Berkeley 3Ptolemy Miniconference, February 13, 2007

Introduction (Cont’d)

Any actor network can be treated as a feedback system. We assume all actors are (Scott) continuous and use the

least fixed point semantics as the behavior of the network. Question: Will the network deadlock? Is it possible to do

static analysis?

Page 4: 7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Causality Interfaces for Actor Networks Ye Zhou and Edward A. Lee University of California,

Zhou, Berkeley 4Ptolemy Miniconference, February 13, 2007

Goal: Causality Interfaces

Use an interface approach to capture the causality properties of an actor.

Develop a mathematical structure to algebraically compose these interfaces.

Determine whether an actor network is live under certain models of computation.

Page 5: 7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Causality Interfaces for Actor Networks Ye Zhou and Edward A. Lee University of California,

Zhou, Berkeley 5Ptolemy Miniconference, February 13, 2007

The Tagged Signal Model

[Lee and Sangiovanni-Vincentelli, 1998] A signal is a set of (tag, value) pairs.

[Liu, 2005] The tag set is a partial order. A signal is defined on a down-set of .

t

v

Page 6: 7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Causality Interfaces for Actor Networks Ye Zhou and Edward A. Lee University of California,

Zhou, Berkeley 6Ptolemy Miniconference, February 13, 2007

The Tagged Signal Model (Cont’d)

Page 7: 7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Causality Interfaces for Actor Networks Ye Zhou and Edward A. Lee University of California,

Zhou, Berkeley 7Ptolemy Miniconference, February 13, 2007

Causality Interfaces

A causality interface for an actor a with input ports Pi and output ports Po is a function

where D is a partially ordered set with elements called de

pendencies.

,: DPP oia

Page 8: 7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Causality Interfaces for Actor Networks Ye Zhou and Edward A. Lee University of California,

Zhou, Berkeley 8Ptolemy Miniconference, February 13, 2007

How to compose dependencies?

Serial connection Parallel connection

We need two operators, one for serial ( ), and one for parallel ( ).

Page 9: 7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Causality Interfaces for Actor Networks Ye Zhou and Edward A. Lee University of California,

Zhou, Berkeley 9Ptolemy Miniconference, February 13, 2007

Dependency Algebra Axioms

Dependency set D is a partially ordered set with two binary operators (for parallel) and (for serial) that satisfies the following axioms: Associativity:

Commutativity and Idempotence (for only):

122121 ,, ddddDdd

)()(,,, 321321321 ddddddDddd

)()(,,, 321321321 ddddddDddd

dddDd ,

Page 10: 7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Causality Interfaces for Actor Networks Ye Zhou and Edward A. Lee University of California,

Zhou, Berkeley 10Ptolemy Miniconference, February 13, 2007

Dependency Algebra Axioms (Cont’d)

Ordering Axiom:

DdD that such 1 0, ,

11

00

0

ddd

d

dd

.,, 12121 dddDdd

Page 11: 7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Causality Interfaces for Actor Networks Ye Zhou and Edward A. Lee University of California,

Zhou, Berkeley 11Ptolemy Miniconference, February 13, 2007

Causality Interface Model

The dependency set D is a set of functions:

where is the set of all down sets of .

computes the greatest lower bound of two functions.

is function composition.

Page 12: 7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Causality Interfaces for Actor Networks Ye Zhou and Edward A. Lee University of California,

Zhou, Berkeley 12Ptolemy Miniconference, February 13, 2007

Interpretation

Recall that an actor function is

The projection of Fa onto the tag set is

which reflects the dependency of output ports on input ports. is the projection of such dependency on a pair of (input, output) ports. In general, appropriate projection onto pairs of (input, output) ports are not always possible.

Page 13: 7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Causality Interfaces for Actor Networks Ye Zhou and Edward A. Lee University of California,

Zhou, Berkeley 13Ptolemy Miniconference, February 13, 2007

Feedforward Compositions

Use for serial compositions and for parallel compositions.

Example:

))],(),((),([),(),( 4267425121 2321ppppppppqq aaaab

Page 14: 7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Causality Interfaces for Actor Networks Ye Zhou and Edward A. Lee University of California,

Zhou, Berkeley 14Ptolemy Miniconference, February 13, 2007

Feedback Compositions

The gain of a cyclic path c = (p1, p2, …, pn, p1) is:

Productivity order

Page 15: 7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Causality Interfaces for Actor Networks Ye Zhou and Edward A. Lee University of California,

Zhou, Berkeley 15Ptolemy Miniconference, February 13, 2007

Liveness Condition

Theorem:

This theorem applies to synchronous languages, discrete-event models, continuous-time models, and dataflow models.

Page 16: 7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Causality Interfaces for Actor Networks Ye Zhou and Edward A. Lee University of California,

Zhou, Berkeley 16Ptolemy Miniconference, February 13, 2007

Example – Adaptive Filtering

),,,,( 9711109 pppppc

IIIc dddppppg ),(),( 711109

Page 17: 7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Causality Interfaces for Actor Networks Ye Zhou and Edward A. Lee University of California,

Zhou, Berkeley 17Ptolemy Miniconference, February 13, 2007

Conclusion

We presented an interface theory for causality interface of actors and their compositions. We gave an algebraic procedure to determine whether an actor network is live under certain models of computation. We showed that causality analysis only needs to be performed for each simple communication cycle. Reference:Ye Zhou and Edward A. Lee. "Causality Interfaces for Actor Networks," EECS Department, University of California, Berkeley, UCB/EECS-2006-148, November 16, 2006.

Page 18: 7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Causality Interfaces for Actor Networks Ye Zhou and Edward A. Lee University of California,

Zhou, Berkeley 18Ptolemy Miniconference, February 13, 2007

Thank You!