EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization

Size: px
Start display at page:

Download "EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization"

Transcription

1 EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Dataflow Lecture: SDF, Kahn Process Networks Stavros Tripakis University of California, Berkeley Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 1 / 52

2 Dataflow: Meanings and Origins Dataflow: generic term in computer science, with multiple meanings common theme: data flowing through some computing network this course: asynchronous processes communicating via FIFO queues Multiple origins: Computer architecture: dataflow (vs. von Neumann) architectures for efficient, parallel computing Note: HW is dataflow in any case Signal processing (c.f. SDF) Foundations of distributed systems (c.f. Kahn Process Networks)... possibly others... Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 2 / 52

3 Synchronous Data Flow 1 (SDF) One of the most basic dataflow models Proposed in 1987 [Lee and Messerschmitt, 1987] Widely used: mainly in signal-processing applications Many many variants: SDF, CSDF, HSDF, SADF,... Semantics: untimed, timed, probabilistic untimed variants can be used for checking correctness of the system (e.g., consistency, deadlocks), and for design-space exploration (e.g., buffer sizing) timed variants can be used for performance analysis: worst-case or, in the case of probabilistic models, average-case We look first at untimed, then at timed SDF 1 a better (and sometimes used) term is Static Data Flow Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 3 / 52

4 UNTIMED SDF Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 4 / 52

5 (Untimed) SDF 1 α 2 3 β 1 A B C An SDFG (SDF Graph) A, B, C: dataflow actors 1, 2, 3,...: token production/consumption rates α, β: (a-priori unbounded) FIFO queues (channels) each channel has unique producer/consumer abstract from token values FIFO property ignored Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 5 / 52

6 (Untimed) SDF A 1 α 2 B 3 β 1 C 2 An SDFG (SDF Graph) A, B, C: dataflow actors 1, 2, 3,...: token production/consumption rates α, β: (a-priori unbounded) FIFO queues (channels) each channel has unique producer/consumer abstract from token values FIFO property ignored Channels can have initial tokens Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 5 / 52

7 (Untimed) SDF A 1 α 2 B 3 β 1 C 2 An SDFG (SDF Graph) A, B, C: dataflow actors 1, 2, 3,...: token production/consumption rates α, β: (a-priori unbounded) FIFO queues (channels) each channel has unique producer/consumer abstract from token values FIFO property ignored Channels can have initial tokens Behavior (intuition): A: can fire at any time; it produces 1 token every time it fires B: needs 2 tokens in order to fire; it consumes 2 tokens and produces 3 tokens every time it fires; C: needs 1 token in order to fire; it consumes 1 token each time it fires. Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 5 / 52

8 SDF Formal Semantics (sketch) A 1 α 2 B 3 β 1 C 2 An SDFG defines a labeled transition system: State = a vector describing how many tokens are in every channel Note: tokens have no value FIFO property irrelevant Initial state (unique): determined by initial tokens E.g., (α : 2, β : 1) in example above Transitions: if actor A consumes c A tokens from α i and produces p A tokens to α j, and k i c A, then the following transition is possible: (k 1,..., k i,..., k j,..., k n ) A (k 1,..., k i c A,..., k j + p A,..., k n ) Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 6 / 52

9 Example 1 α 2 3 β 1 A B C This SDFG defines the following LTS: (0, 0)

10 Example 1 α 2 3 β 1 A B C This SDFG defines the following LTS: (0, 0) A (1, 0)

11 Example 1 α 2 3 β 1 A B C This SDFG defines the following LTS: (0, 0) A (1, 0) A (2, 0)

12 Example 1 α 2 3 β 1 A B C This SDFG defines the following LTS: (0, 0) A (1, 0) A (2, 0) A (3, 0) A (4, 0)

13 Example 1 α 2 3 β 1 A B C This SDFG defines the following LTS: (0, 0) A (1, 0) A (2, 0) A (3, 0) A (4, 0) B (0, 3)

14 Example 1 α 2 3 β 1 A B C This SDFG defines the following LTS: (0, 0) A (1, 0) A (2, 0) A (3, 0) A (4, 0) B (0, 3) A A (1, 3) (2, 3) C (0, 2) Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 7 / 52

15 Example 1 α 2 3 β 1 A B C Observe: There exist behaviors where queues grow unbounded Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 8 / 52

16 Example 1 α 2 3 β 1 A B C Observe: There exist behaviors where queues grow unbounded But there are also behaviors where this doesn t happen and all actors keep firing Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 8 / 52

17 Example 1 α 2 3 β 1 A B C Observe: There exist behaviors where queues grow unbounded But there are also behaviors where this doesn t happen and all actors keep firing These are the behaviors we want Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 8 / 52

18 Example 1 α 2 3 β 1 A B C Observe: There exist behaviors where queues grow unbounded But there are also behaviors where this doesn t happen and all actors keep firing These are the behaviors we want Some can be represented by periodic schedules: (AABCCC) ω Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 8 / 52

19 Example 1 α 2 3 β 1 A B C Observe: There exist behaviors where queues grow unbounded But there are also behaviors where this doesn t happen and all actors keep firing These are the behaviors we want Some can be represented by periodic schedules: (AABCCC) ω Can we always find such schedules? Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 8 / 52

20 SDF: Deadlock A B Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 9 / 52

21 SDF: Deadlock A B Behavior deadlocks! (0, 2) A (1, 0) B (0, 1) Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 9 / 52

22 SDF: Unbounded Behavior 2 1 A 1 1 B Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 10 / 52

23 SDF: Unbounded Behavior 2 1 A 1 1 B Queues keep growing! (0, 1) A (2, 0) B (1, 1) B (0, 2) A (2, 1) B (1, 2) B (0, 3) Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 10 / 52

24 Balance Equations and Repetition Vectors 2 1 A 1 1 B Balance equations: For each channel: tokens produced = tokens consumed initial tokens don t matter for balance equations q A 2 = q B 1 // equation for channel A B q B 1 = q A 1 // equation for channel B A q A : number of times actor A fires Solution to balance equations is called repetition vector Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 11 / 52

25 Balance Equations and Repetition Vectors 2 1 A 1 1 B q A = 2q A q B = q A Only trivial solution (always exists): q A = q B = 0 SDF graph is called inconsistent Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 12 / 52

26 Balance Equations and Repetition Vectors Another example: 3 6 A B 3q A = 6q B // equation for channel A B 2q A = 4q B // equation for channel B A Non-zero solution: q B = 1, q A = 2q B = 2 Any multiple is also a solution SDF graph is called consistent Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 13 / 52

27 Balance Equations and Repetition Vectors Another example: 3 6 A B 3q A = 6q B // equation for channel A B 2q A = 4q B // equation for channel B A Non-zero solution: q B = 1, q A = 2q B = 2 Any multiple is also a solution SDF graph is called consistent Does consistency imply no deadlock? Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 13 / 52

28 Consistency vs. Deadlock Consistency absence of deadlock: 1 1 A 1 1 B Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 14 / 52

29 Consistency vs. Deadlock Consistency absence of deadlock: 1 1 A 1 1 B Absence of deadlock consistency: 2 1 A 1 1 B Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 14 / 52

30 SDF Consistency Can chain SDFGs be inconsistent? Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 15 / 52

31 SDF Consistency Can chain SDFGs be inconsistent? No. Can tree SDFGs be inconsistent? Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 15 / 52

32 SDF Consistency Can chain SDFGs be inconsistent? No. Can tree SDFGs be inconsistent? No. Can arbitrary DAGs be inconsistent? Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 15 / 52

33 SDF Consistency Can chain SDFGs be inconsistent? No. Can tree SDFGs be inconsistent? No. Can arbitrary DAGs be inconsistent? Yes: 2 1 A 1 1 B Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 15 / 52

34 Solving Balance Equations A B C 2 1 Balance equations rewritten: let a = q A, b = q B, c = q C : in matrix form: a b = 0 2b c = 0 2a +c = a b c = 0 Balance equations can be solved efficiently e.g., by Gaussian elimination Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 16 / 52

35 Checking for Deadlock Consistency absence of deadlocks: 1 1 A 1 1 B How to check whether a given SDF graph deadlocks? Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 17 / 52

36 Checking for Deadlock Consistency absence of deadlocks: 1 1 A 1 1 B How to check whether a given SDF graph deadlocks? 1. Check consistency: if consistent, compute non-zero repetition vector q 2. Simulate execution of SDFG, firing actors no more times than what q specifies ( termination) if manage to complete execution then no deadlock: periodic schedule has been found otherwise: SDFG deadlocks Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 17 / 52

37 Checking for Deadlock: Example 1 1 A 1 1 B 1. Graph consistent: q A = q B = 1 2. Simulate execution: from initial channel state (0, 0) no firing possible SDFG deadlocks Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 18 / 52

38 Checking for Deadlock: Another Example A B 1. Graph consistent: q A = 1, q B = 2 2. Simulate execution (firing A at most once, B twice): (2, 0) B (1, 1) SDFG is deadlock-free schedule: (BBA) ω B (0, 2) A (2, 0) Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 19 / 52

39 Interesting Questions on Deadlock-Checking Algorithm Why is it enough to stop after one repetition vector? Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 20 / 52

40 Interesting Questions on Deadlock-Checking Algorithm Why is it enough to stop after one repetition vector? channel state after one repetition = initial channel state same execution can be repeated forever Does the order in which actors are fired during simulation matter? Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 20 / 52

41 Interesting Questions on Deadlock-Checking Algorithm Why is it enough to stop after one repetition vector? channel state after one repetition = initial channel state same execution can be repeated forever Does the order in which actors are fired during simulation matter? No. Deep result: c.f. Kahn Process Networks Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 20 / 52

42 KAHN PROCESS NETWORKS Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 21 / 52

43 Kahn Process Networks Can be seen as generalization of SDF although Kahn s work [Kahn, 1974] pre-dates SDF [Lee and Messerschmitt, 1987] by more than 10 years Kahn s motivation: distributed systems / parallel programming Main idea: generalize dataflow actors to Kahn processes Kahn process: an arbitrary sequential program reading from and writing to queues read is blocking (Kahn called it wait): if queue is empty, process blocks until queue becomes non-empty write is non-blocking (Kahn called it send): queues are a-priori unbounded as in SDF Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 22 / 52

44 Kahn Process Networks Can be seen as generalization of SDF although Kahn s work [Kahn, 1974] pre-dates SDF [Lee and Messerschmitt, 1987] by more than 10 years Kahn s motivation: distributed systems / parallel programming Main idea: generalize dataflow actors to Kahn processes Kahn process: an arbitrary sequential program reading from and writing to queues read is blocking (Kahn called it wait): if queue is empty, process blocks until queue becomes non-empty write is non-blocking (Kahn called it send): queues are a-priori unbounded as in SDF Highly recommended reading: [Kahn, 1974] (on bspace). Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 22 / 52

45 Kahn Process Network: Example Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 23 / 52

46 SDF Actors are a special case of Kahn Processes SDF actor: 2 A 3 Corresponding Kahn process: Process A(integer in U; integer out V); Begin integer I1, I2, R1, R2, R3; Repeat Begin I1 := wait(u); I2 := wait(u);... compute R1, R2, R3... send R1 on V; send R2 on V; send R3 on V; end; End; Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 24 / 52

47 Kahn Processes are more general than SDF actors In SDF, token production/consumption rates are static: 2 A 3 In Kahn processes, they are dynamic: Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 25 / 52

48 SDF Graphs are a special case of Kahn Process Networks Kahn process network: Begin Integer channel X; SDFG: A B Process A(integer out V); Begin integer R1, R2, R;... compute initial tokens R1, R2... send R1 on V; send R2 on V; Repeat Begin... compute R... send R on V; end; End; Process B(integer in U);... End; /* main: */ A(X) par B(X) End; Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 26 / 52

49 Semantics of Kahn Process Networks We can give both operational and denotational semantics. Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 27 / 52

50 Operational vs. Denotational Semantics What is the meaning of a (say, C) program? Operational semantics answer: the sequence of steps that the program takes to compute its output from its input Denotational semantics answer: a function f that returns the right output for a given input Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 28 / 52

51 Semantics of Kahn Process Networks Operational semantics: KPN defines a transition system (similar to the SDF semantics we defined above) global state = local states (local vars, program counters,...) of each process + contents of all queues transition: one process makes a move must define some kind of atomic moves for processes: for instance, one statement in the sequential program asynchronous (interleaving) semantics (c.f. Spin) Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 29 / 52

52 Semantics of Kahn Process Networks Operational semantics: KPN defines a transition system (similar to the SDF semantics we defined above) global state = local states (local vars, program counters,...) of each process + contents of all queues transition: one process makes a move must define some kind of atomic moves for processes: for instance, one statement in the sequential program asynchronous (interleaving) semantics (c.f. Spin) Denotational semantics: this is what we will focus on next. Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 29 / 52

53 Denotational Semantics of Kahn Process Networks General idea: Each process = a function on streams An entire (closed) network = a (big) function on (vectors of) streams Semantics = the stream computed by the network at every queue Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 30 / 52

54 Denotational Semantics of Kahn Process Networks General idea: Each process = a function on streams An entire (closed) network = a (big) function on (vectors of) streams Semantics = the stream computed by the network at every queue Major benefits: Can handle feedback loops in an elegant manner: fixpoint theory Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 30 / 52

55 Denotational Semantics of Kahn Process Networks General idea: Each process = a function on streams An entire (closed) network = a (big) function on (vectors of) streams Semantics = the stream computed by the network at every queue Major benefits: Can handle feedback loops in an elegant manner: fixpoint theory Determinacy: network has a unique solution In terms of operational semantics: order of interleaving does not matter (as long as it is fair) Example: if one execution deadlocks, all executions deadlock Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 30 / 52

56 Streams Stream = a finite or infinite sequence of values. D: set of values D : set of all finite sequences of values from D D ω : set of all infinite sequences of values from D D = D D ω Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 31 / 52

57 Streams Stream = a finite or infinite sequence of values. D: set of values D : set of all finite sequences of values from D This includes the empty sequence ε D ω : set of all infinite sequences of values from D D = D D ω Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 31 / 52

58 Streams Stream = a finite or infinite sequence of values. D: set of values D : set of all finite sequences of values from D This includes the empty sequence ε D ω : set of all infinite sequences of values from D Note: D ω = D N = set of all total functions from N to D D = D D ω Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 31 / 52

59 Streams: Examples Let D = {0, 1}. Consider the streams: 0 D Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 32 / 52

60 Streams: Examples Let D = {0, 1}. Consider the streams: 0 D = 0 5 D Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 32 / 52

61 Streams: Examples Let D = {0, 1}. Consider the streams: 0 D = 0 5 D = (01) ω D ω Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 32 / 52

62 Streams: Examples Let D = {0, 1}. Consider the streams: 0 D = 0 5 D = (01) ω D ω D ω Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 32 / 52

63 Prefix Order on Streams Let s s denote stream concatenation: if s = ε, then s s = s (s could be infinite in this case) if s ε, then s must be finite (s could be finite or infinite) s 1 is a prefix of s 2, denoted s 1 s 2, iff s 3 : s 2 = s 1 s 3 Note that s 3 may be the empty string, in which case s 1 = s 2 so s s for any stream s Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 33 / 52

64 Prefix Order on Streams Let s s denote stream concatenation: if s = ε, then s s = s (s could be infinite in this case) if s ε, then s must be finite (s could be finite or infinite) s 1 is a prefix of s 2, denoted s 1 s 2, iff s 3 : s 2 = s 1 s 3 Note that s 3 may be the empty string, in which case s 1 = s 2 so s s for any stream s Examples: Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 33 / 52

65 Prefix Order on Streams Let s s denote stream concatenation: if s = ε, then s s = s (s could be infinite in this case) if s ε, then s must be finite (s could be finite or infinite) s 1 is a prefix of s 2, denoted s 1 s 2, iff s 3 : s 2 = s 1 s 3 Note that s 3 may be the empty string, in which case s 1 = s 2 so s s for any stream s Examples: ω Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 33 / 52

66 Prefix Order on Streams Let s s denote stream concatenation: if s = ε, then s s = s (s could be infinite in this case) if s ε, then s must be finite (s could be finite or infinite) s 1 is a prefix of s 2, denoted s 1 s 2, iff s 3 : s 2 = s 1 s 3 Note that s 3 may be the empty string, in which case s 1 = s 2 so s s for any stream s Examples: ω Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 33 / 52

67 Prefix Order on Streams Let s s denote stream concatenation: if s = ε, then s s = s (s could be infinite in this case) if s ε, then s must be finite (s could be finite or infinite) s 1 is a prefix of s 2, denoted s 1 s 2, iff s 3 : s 2 = s 1 s 3 Note that s 3 may be the empty string, in which case s 1 = s 2 so s s for any stream s Examples: ω = 0 ω 10 ω = 1000 Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 33 / 52

68 Partial Orders Possible definitions of partial orders: is a partial order iff it is: reflexive : s : s s antisymmetric : s, s : s s s s s = s transitive : s, s, s : s s s s s s < is a partial order iff it is: irreflexive : s : s s transitive : s, s, s : s < s s < s s < s The definitions are equivalent in the sense that from we can get < and vice-versa. How? Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 34 / 52

69 Partial Orders Possible definitions of partial orders: is a partial order iff it is: reflexive : s : s s antisymmetric : s, s : s s s s s = s transitive : s, s, s : s s s s s s < is a partial order iff it is: irreflexive : s : s s transitive : s, s, s : s < s s < s s < s The definitions are equivalent in the sense that from we can get < and vice-versa. How? Given, define < := {(a, b) a b a b}. Given <, define := {(a, b) a < b a = b}. Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 34 / 52

70 Prefix Order on Streams is a partial order on D, i.e., it is reflexive : s : s s antisymmetric : s, s : s s s s s = s transitive : s, s, s : s s s s s s Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 35 / 52

71 Prefix Order on Streams is a partial order on D, i.e., it is reflexive : s : s s antisymmetric : s, s : s s s s s = s transitive : s, s, s : s s s s s s The pair (D, ) is a poset (partially-ordered set). In fact, it is a CPO (a complete poset) because it also satisfies for any increasing chain s 0 s 1 s 2 : lim n s n is in D Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 35 / 52

72 Prefix Order on Streams is a partial order on D, i.e., it is reflexive : s : s s antisymmetric : s, s : s s s s s = s transitive : s, s, s : s s s s s s The pair (D, ) is a poset (partially-ordered set). In fact, it is a CPO (a complete poset) because it also satisfies for any increasing chain s 0 s 1 s 2 : lim n s n is in D It has a least element (which one is it?) such that s : s. Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 35 / 52

73 Prefix Order on Streams is a partial order on D, i.e., it is reflexive : s : s s antisymmetric : s, s : s s s s s = s transitive : s, s, s : s s s s s s The pair (D, ) is a poset (partially-ordered set). In fact, it is a CPO (a complete poset) because it also satisfies for any increasing chain s 0 s 1 s 2 : lim n s n is in D It has a least element (which one is it?) such that s : s. = ε (the empty sequence) Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 35 / 52

74 Functions on Streams Function on streams (single-input / single-output): f : D D Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 36 / 52

75 Functions on Streams Function on streams (single-input / single-output): f : D D Function on streams (general): f : (D ) n (D ) m s 1. s n f s 1. s m Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 36 / 52

76 Kahn Processes = Functions on Streams s 1 s 1 s 1 s 1. P. = f P.. s n s m s n s m Basic idea: Fix the contents of input queues to s 1,..., s n. Let the process P run. Observe the contents of output queues: s 1,..., s m. Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 37 / 52

77 Kahn Processes = Functions on Streams s 1 s 1 s 1 s 1. P. = f P.. s n s m s n s m Basic idea: Fix the contents of input queues to s 1,..., s n. Let the process P run. Observe the contents of output queues: s 1,..., s m. Notice that Kahn processes are deterministic programs. Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 37 / 52

78 Monotonic Functions on Streams A stream function f : D D is monotonic (w.r.t. ) iff s, s D : s s f(s) f(s ) Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 38 / 52

79 Monotonic Functions on Streams A stream function f : D D is monotonic (w.r.t. ) iff s, s D : s s f(s) f(s ) Stream functions defined by Kahn processes are monotonic. Why? Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 38 / 52

80 Monotonic Functions on Streams A stream function f : D D is monotonic (w.r.t. ) iff s, s D : s s f(s) f(s ) Stream functions defined by Kahn processes are monotonic. Why? Once something is written to an output queue, it cannot be taken back. More inputs more outputs. Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 38 / 52

81 Continuous Functions on Streams A stream function f : D D is continuous (w.r.t. ) if f is monotonic and for any increasing chain s 0 s 1 s 2 f( lim n s n) = lim n f(s n) Note: by monotonicity of f, and the fact that s 0 s 1 s 2 is a chain, f(s 0 ) f(s 1 ) f(s 2 ) is also a chain, so is well-defined. lim f(s n) n Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 39 / 52

82 Continuous Functions on Streams By definition continuity implies monotonicity. 2 But: monotonicity does not generally imply continuity. Quiz: Can you think of a non-monotonic stream function? a non-continuous stream function? a monotonic but non-continuous stream function? 2 Alternative definitions of continuity exist that imply monotonicity. See good textbook on order theory: [Davey and Priestley, 2002]. Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 40 / 52

83 Continuous Functions on Streams Stream functions defined by Kahn processes are continuous. Quiz: Why? Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 41 / 52

84 Continuous Functions on Streams Stream functions defined by Kahn processes are continuous. Quiz: Why? Kahn processes cannot take forever to produce an output. Every output they produce must be produced because of the finite sequence of inputs the process has read so far. If for all finite sequences the process produces no outputs, then the process produces no outputs at all, even for the infinite sequence. Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 41 / 52

85 Monotonic and Continuous Functions on Streams The notions of monotonicity and continuity extend to functions of arbitrary arity: f : (D ) n (D ) m Basic idea: Lift to vectors element-wise iff (s 1, s 2,..., s n ) (s 1, s 2,..., s n) s 1 s 1 s 2 s 2 s n s n Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 42 / 52

86 Fixpoint Theorem Theorem A continuous function f : (D ) n (D ) n has a least fixpoint s. Moreover, s = lim n f n (ε, ε,..., ε). Least fixpoint s means: s is a fixpoint: f(s) = s. s is a least fixpoint: for any other fixpoint s = f(s ), s s. Note: least implies s is unique. Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 43 / 52

87 Fixpoint Theorem Theorem A continuous function f : (D ) n (D ) n has a least fixpoint s. Moreover, s = lim n f n (ε, ε,..., ε). Least fixpoint s means: s is a fixpoint: f(s) = s. s is a least fixpoint: for any other fixpoint s = f(s ), s s. Note: least implies s is unique. How is s related to the semantics of Kahn process networks? Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 43 / 52

88 From Process Network to Fixpoint Equations s 1 f 1 f 2 P 1 P 2 process network = s 2 fixpoint equations s 1 = f 1 (s 2 ) s 2 = f 2 (s 1 ) Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 44 / 52

89 From Process Network to Fixpoint Equations s 1 f 1 f 2 P 1 P 2 process network Can be rewritten as: = s 2 fixpoint equations s 1 = f 1 (s 2 ) s 2 = f 2 (s 1 ) (s 1, s 2 ) = f(s 1, s 2 ) where f : (D ) 2 (D ) 2 is defined as: f(s 1, s 2 ) = ( f 1 (s 2 ), f 2 (s 1 ) ) Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 44 / 52

90 Putting it all together The denotational semantics of the Kahn process network P 1 P 2 = f 1 f 2 s 1 s 2 is the unique least fixpoint (s 1, s 2 ) of the set of equations: s 1 = f 1 (s 2 ) s 2 = f 2 (s 1 ) Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 45 / 52

91 Example: denotational semantics of SDF graphs 1 1 A 1 1 B Viewing A and B as functions on streams of tokens: A(ε) = B(ε) = ε A( ) = B( ) = A( ) = B( ) = A( ) = B( ) = Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 46 / 52

92 Example: denotational semantics of SDF graphs 1 1 A 1 1 B Viewing A and B as functions on streams of tokens: A(ε) = B(ε) = ε A( ) = B( ) = A( ) = B( ) = A( ) = B( ) = Computing the fixpoint: f(ε, ε) = (A(ε), B(ε)) = (ε, ε) Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 46 / 52

93 Example: denotational semantics of SDF graphs A B Viewing A as a function on streams of tokens (B is as before): A(ε) = // this captures initial tokens A( ) = A( ) = A( ) = A( ) = Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 47 / 52

94 Example: denotational semantics of SDF graphs A B Viewing A as a function on streams of tokens (B is as before): A(ε) = // this captures initial tokens A( ) = A( ) = A( ) = A( ) = Computing the fixpoint: f(ε, ε) = (A(ε), B(ε)) = (, ε) f(, ε) = (A(ε), B( )) = (, ) f(, ) = (A( ), B( )) = (, )... fixpoint is ( ω, ω ). Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 47 / 52

95 Assessment Why get excited about Kahn process networks? Elegant mathematics (to compare, try to define formal operational semantics, or see papers that do that, e.g., [Lynch and Stark, 1989, Jonsson, 1994]) Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 48 / 52

96 Assessment Why get excited about Kahn process networks? Elegant mathematics Caveats: (to compare, try to define formal operational semantics, or see papers that do that, e.g., [Lynch and Stark, 1989, Jonsson, 1994]) Still need to relate denotational to some operational semantics, to convince ourselves that they are equivalent [Lynch and Stark, 1989, Jonsson, 1994]. Framework difficult to extend to non-deterministic processes c.f. famous Brock-Ackerman anomaly and related literature [Brock and Ackerman, 1981, Jonsson, 1994] Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 48 / 52

97 Assessment Why get excited about Kahn process networks? Foundations of asynchronous message-passing paradigm. Deterministic concurrency. Writing/debugging concurrent programs made easier. Contrast this to threads [Lee, 2006]. Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 49 / 52

98 Assessment Why get excited about Kahn process networks? Foundations of asynchronous message-passing paradigm. Deterministic concurrency. Writing/debugging concurrent programs made easier. Contrast this to threads [Lee, 2006]. How is determinism achieved in Kahn Process Networks? No shared memory! Channels have unique writer/reader processes. Blocking read. No peeking into input queues allowed, no removing data already written into output queues, etc. Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 49 / 52

99 Assessment Why get excited about Kahn process networks? Foundations of asynchronous message-passing paradigm. Deterministic concurrency. Writing/debugging concurrent programs made easier. Contrast this to threads [Lee, 2006]. How is determinism achieved in Kahn Process Networks? No shared memory! Channels have unique writer/reader processes. Blocking read. No peeking into input queues allowed, no removing data already written into output queues, etc. Criticism: KPN use infinite queues but these do not exist in reality. Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 49 / 52

100 Assessment Why get excited about Kahn process networks? Foundations of asynchronous message-passing paradigm. Deterministic concurrency. Writing/debugging concurrent programs made easier. Contrast this to threads [Lee, 2006]. How is determinism achieved in Kahn Process Networks? No shared memory! Channels have unique writer/reader processes. Blocking read. No peeking into input queues allowed, no removing data already written into output queues, etc. Criticism: KPN use infinite queues but these do not exist in reality. Answer: finite queues can easily be modeled in KPN (also in SDF). How? Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 49 / 52

101 Modeling Finite Queues with Backward Channels P queue of size k P = P 1 P 2 1 k 1 Each time P 1 needs to write, it must first remove a token from the backward channel. If there are no tokens left then it means that the (forward) queue is full. Each time P 2 reads, it puts a token into the backward channel. Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 50 / 52

102 Kahn Process Networks vs. Petri Nets [Ignore if you don t know what Petri nets are] Petri nets: More abstract model: processes = transitions. Non-deterministic: Each place can have many incoming / outgoing transitions. Each place may be shared by multiple producers / consumers. Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 51 / 52

103 Bibliography Brock, J. and Ackerman, W. (1981). Scenarios: A model of non-determinate computation. In Proc. Intl. Colloq. on Formalization of Programming Concepts, pages , London, UK. Springer-Verlag. Davey, B. A. and Priestley, H. A. (2002). Introduction to Lattices and Order. Cambridge University Press, 2nd edition. Jonsson, B. (1994). Compositional specification and verification of distributed systems. ACM Trans. Program. Lang. Syst., 16(2): Kahn, G. (1974). The semantics of a simple language for parallel programming. In Information Processing 74, Proceedings of IFIP Congress 74. North-Holland. Lee, E. (2006). The problem with threads. IEEE Computer, 39(5): Lee, E. and Messerschmitt, D. (1987). Synchronous data flow. Proceedings of the IEEE, 75(9): Lynch, N. and Stark, E. (1989). A Proof of the Kahn Principle for Input/Output Automata. Information and Computation, 82: Stavros Tripakis: EECS 144/244 Dataflow SDF, Kahn Process Networks 52 / 52

Fundamental Algorithms for System Modeling, Analysis, and Optimization

Fundamental Algorithms for System Modeling, Analysis, and Optimization Fundamental Algorithms for System Modeling, Analysis, and Optimization Stavros Tripakis, Edward A. Lee UC Berkeley EECS 144/244 Fall 2014 Copyright 2014, E. A. Lee, J. Roydhowdhury, S. A. Seshia, S. Tripakis

More information

Overview of Dataflow Languages. Waheed Ahmad

Overview of Dataflow Languages. Waheed Ahmad Overview of Dataflow Languages Waheed Ahmad w.ahmad@utwente.nl The purpose of models is not to fit the data but to sharpen the questions. Samuel Karlins 11 th R.A Fisher Memorial Lecture Royal Society

More information

Main application of SDF: DSP hardware modeling

Main application of SDF: DSP hardware modeling EE 144/244: Fundamental lgorithms for System Modeling, nalysis, and Optimization Fall 2014 Dataflow Timed SDF, Throughput nalysis Stavros Tripakis University of California, erkeley Stavros Tripakis (UC

More information

From synchronous models to distributed, asynchronous architectures

From synchronous models to distributed, asynchronous architectures From synchronous models to distributed, asynchronous architectures Stavros Tripakis Joint work with Claudio Pinello, Cadence Alberto Sangiovanni-Vincentelli, UC Berkeley Albert Benveniste, IRISA (France)

More information

Concurrent Models of Computation

Concurrent Models of Computation Concurrent Models of Computation Edward A. Lee Robert S. Pepper Distinguished Professor, UC Berkeley EECS 219D: Concurrent Models of Computation Fall 2011 Copyright 2011, Edward A. Lee, All rights reserved

More information

Compositionality in Synchronous Data Flow: Modular Code Generation from Hierarchical SDF Graphs

Compositionality in Synchronous Data Flow: Modular Code Generation from Hierarchical SDF Graphs Compositionality in Synchronous Data Flow: Modular Code Generation from Hierarchical SDF Graphs Stavros Tripakis Dai Bui Marc Geilen Bert Rodiers Edward A. Lee Electrical Engineering and Computer Sciences

More information

Embedded Systems 7 BF - ES - 1 -

Embedded Systems 7 BF - ES - 1 - Embedded Systems 7-1 - Production system A modelbased realtime faultdiagnosis system for technical processes Ch. Steger, R. Weiss - 2 - Sprout Counter Flow Pipeline-Processor Based on a stream of data

More information

Embedded Systems 8. Identifying, modeling and documenting how data moves around an information system. Dataflow modeling examines

Embedded Systems 8. Identifying, modeling and documenting how data moves around an information system. Dataflow modeling examines Embedded Systems 8 - - Dataflow modeling Identifying, modeling and documenting how data moves around an information system. Dataflow modeling examines processes (activities that transform data from one

More information

Embedded Systems 7. Models of computation for embedded systems

Embedded Systems 7. Models of computation for embedded systems Embedded Systems 7 - - Models of computation for embedded systems Communication/ local computations Communicating finite state machines Data flow model Computational graphs Von Neumann model Discrete event

More information

fakultät für informatik informatik 12 technische universität dortmund Data flow models Peter Marwedel TU Dortmund, Informatik /10/08

fakultät für informatik informatik 12 technische universität dortmund Data flow models Peter Marwedel TU Dortmund, Informatik /10/08 12 Data flow models Peter Marwedel TU Dortmund, Informatik 12 2009/10/08 Graphics: Alexandra Nolte, Gesine Marwedel, 2003 Models of computation considered in this course Communication/ local computations

More information

HW/SW Codesign. Exercise 2: Kahn Process Networks and Synchronous Data Flows

HW/SW Codesign. Exercise 2: Kahn Process Networks and Synchronous Data Flows HW/SW Codesign Exercise 2: Kahn Process Networks and Synchronous Data Flows 4. October 2017 Stefan Draskovic stefan.draskovic@tik.ee.ethz.ch slides by: Mirela Botezatu 1 Kahn Process Network (KPN) Specification

More information

Embedded Systems CS - ES

Embedded Systems CS - ES Embedded Systems - 1 - Synchronous dataflow REVIEW Multiple tokens consumed and produced per firing Synchronous dataflow model takes advantage of this Each edge labeled with number of tokens consumed/produced

More information

Dataflow Languages. Languages for Embedded Systems. Prof. Stephen A. Edwards. March Columbia University

Dataflow Languages. Languages for Embedded Systems. Prof. Stephen A. Edwards. March Columbia University Dataflow Languages Languages for Embedded Systems Prof. Stephen A. Edwards Columbia University March 2009 Philosophy of Dataflow Languages Drastically different way of looking at computation Von Neumann

More information

STATIC SCHEDULING FOR CYCLO STATIC DATA FLOW GRAPHS

STATIC SCHEDULING FOR CYCLO STATIC DATA FLOW GRAPHS STATIC SCHEDULING FOR CYCLO STATIC DATA FLOW GRAPHS Sukumar Reddy Anapalli Krishna Chaithanya Chakilam Timothy W. O Neil Dept. of Computer Science Dept. of Computer Science Dept. of Computer Science The

More information

Computational Models for Concurrent Streaming Applications

Computational Models for Concurrent Streaming Applications 2 Computational Models for Concurrent Streaming Applications The challenges of today Twan Basten Based on joint work with Marc Geilen, Sander Stuijk, and many others Department of Electrical Engineering

More information

Tokens vs. Signals: On Conformance between Formal Models of Dataflow and Hardware

Tokens vs. Signals: On Conformance between Formal Models of Dataflow and Hardware DOI 10.1007/s11265-015-0971-y Tokens vs. Signals: On Conformance between Formal Models of Dataflow and Hardware Stavros Tripakis Rhishikesh Limaye Kaushik Ravindran Guoqiang Wang Hugo Andrade Arkadeb Ghosal

More information

Compositionality in Synchronous Data Flow: Modular Code Generation from Hierarchical SDF Graphs

Compositionality in Synchronous Data Flow: Modular Code Generation from Hierarchical SDF Graphs Compositionality in Synchronous Data Flow: Modular Code Generation from Hierarchical SDF Graphs STAVROS TRIPAKIS and DAI BUI, University of California, Berkeley MARC GEILEN, Eindhoven University of Technology

More information

Requirements on the Execution of Kahn Process Networks

Requirements on the Execution of Kahn Process Networks Requirements on the Execution of Kahn Process Networks Marc Geilen and Twan Basten Dept. of Elec. Eng., Eindhoven University of Technology, The Netherlands {m.c.w.geilen, a.a.basten}@tue.nl Abstract. Kahn

More information

SDL. Jian-Jia Chen (slides are based on Peter Marwedel) TU Dortmund, Informatik 年 10 月 18 日. technische universität dortmund

SDL. Jian-Jia Chen (slides are based on Peter Marwedel) TU Dortmund, Informatik 年 10 月 18 日. technische universität dortmund 12 SDL Jian-Jia Chen (slides are based on Peter Marwedel) TU Dortmund, Informatik 12 2017 年 10 月 18 日 Springer, 2010 These slides use Microsoft clip arts. Microsoft copyright restrictions apply. Models

More information

Hierarchical Reconfiguration of Dataflow Models

Hierarchical Reconfiguration of Dataflow Models In Conference on Formal Methods and Models for Codesign (MEMOCODE) June 22-25, 2004 Hierarchical Reconfiguration of Dataflow Models Stephen Neuendorffer and Edward Lee EECS Department University of California

More information

Hardware Software Codesign

Hardware Software Codesign Hardware Software Codesign 2. Specification and Models of Computation Lothar Thiele 2-1 System Design Specification System Synthesis Estimation SW-Compilation Intellectual Prop. Code Instruction Set HW-Synthesis

More information

Modelling and simulation of guaranteed throughput channels of a hard real-time multiprocessor system

Modelling and simulation of guaranteed throughput channels of a hard real-time multiprocessor system Modelling and simulation of guaranteed throughput channels of a hard real-time multiprocessor system A.J.M. Moonen Information and Communication Systems Department of Electrical Engineering Eindhoven University

More information

Model checking pushdown systems

Model checking pushdown systems Model checking pushdown systems R. Ramanujam Institute of Mathematical Sciences, Chennai jam@imsc.res.in Update Meeting, IIT-Guwahati, 4 July 2006 p. 1 Sources of unboundedness Data manipulation: integers,

More information

Modelling, Analysis and Scheduling with Dataflow Models

Modelling, Analysis and Scheduling with Dataflow Models technische universiteit eindhoven Modelling, Analysis and Scheduling with Dataflow Models Marc Geilen, Bart Theelen, Twan Basten, Sander Stuijk, AmirHossein Ghamarian, Jeroen Voeten Eindhoven University

More information

LabVIEW Based Embedded Design [First Report]

LabVIEW Based Embedded Design [First Report] LabVIEW Based Embedded Design [First Report] Sadia Malik Ram Rajagopal Department of Electrical and Computer Engineering University of Texas at Austin Austin, TX 78712 malik@ece.utexas.edu ram.rajagopal@ni.com

More information

Hierarchical Reconfiguration of Dataflow Models

Hierarchical Reconfiguration of Dataflow Models Please cite as: UC Berkeley ERL MEMO M04/2 Hierarchical Reconfiguration of Dataflow Models Stephen Neuendorffer and Edward Lee EECS Department University of California at Berkeley Berkeley, CA 94720, U.S.A.

More information

Symbolic Buffer Sizing for Throughput-Optimal Scheduling of Dataflow Graphs

Symbolic Buffer Sizing for Throughput-Optimal Scheduling of Dataflow Graphs Symbolic Buffer Sizing for Throughput-Optimal Scheduling of Dataflow Graphs Anan Bouakaz Pascal Fradet Alain Girault Real-Time and Embedded Technology and Applications Symposium, Vienna April 14th, 2016

More information

FSMs & message passing: SDL

FSMs & message passing: SDL 12 FSMs & message passing: SDL Peter Marwedel TU Dortmund, Informatik 12 Springer, 2010 2012 年 10 月 30 日 These slides use Microsoft clip arts. Microsoft copyright restrictions apply. Models of computation

More information

EE249 Discussion Petri Nets: Properties, Analysis and Applications - T. Murata. Chang-Ching Wu 10/9/2007

EE249 Discussion Petri Nets: Properties, Analysis and Applications - T. Murata. Chang-Ching Wu 10/9/2007 EE249 Discussion Petri Nets: Properties, Analysis and Applications - T. Murata Chang-Ching Wu 10/9/2007 What are Petri Nets A graphical & modeling tool. Describe systems that are concurrent, asynchronous,

More information

AMAJOR impediment to further progress in modeling

AMAJOR impediment to further progress in modeling IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN OF INTEGRATED CIRCUITS AND SYSTEMS, VOL. 17, NO. 12, DECEMBER 1998 1217 A Framework for Comparing Models of Computation Edward A. Lee, Fellow, IEEE, and Alberto

More information

Static Scheduling and Code Generation from Dynamic Dataflow Graphs With Integer- Valued Control Streams

Static Scheduling and Code Generation from Dynamic Dataflow Graphs With Integer- Valued Control Streams Presented at 28th Asilomar Conference on Signals, Systems, and Computers November, 994 Static Scheduling and Code Generation from Dynamic Dataflow Graphs With Integer- Valued Control Streams Joseph T.

More information

Lecture 4: Synchronous Data Flow Graphs - HJ94 goal: Skiing down a mountain

Lecture 4: Synchronous Data Flow Graphs - HJ94 goal: Skiing down a mountain Lecture 4: Synchronous ata Flow Graphs - I. Verbauwhede, 05-06 K.U.Leuven HJ94 goal: Skiing down a mountain SPW, Matlab, C pipelining, unrolling Specification Algorithm Transformations loop merging, compaction

More information

By: Chaitanya Settaluri Devendra Kalia

By: Chaitanya Settaluri Devendra Kalia By: Chaitanya Settaluri Devendra Kalia What is an embedded system? An embedded system Uses a controller to perform some function Is not perceived as a computer Software is used for features and flexibility

More information

Petri Nets ee249 Fall 2000

Petri Nets ee249 Fall 2000 Petri Nets ee249 Fall 2000 Marco Sgroi Most slides borrowed from Luciano Lavagno s lecture ee249 (1998) 1 Models Of Computation for reactive systems Main MOCs: Communicating Finite State Machines Dataflow

More information

Modeling Stream-Based Applications using the SBF model of computation

Modeling Stream-Based Applications using the SBF model of computation Modeling Stream-Based Applications using the SBF model of computation Bart Kienhuis and Ed F. Deprettere Leiden University, LIACS, Niels Bohrweg 1, 2333 CA, Leiden The Netherlands kienhuis,edd @liacs.nl

More information

ESE532: System-on-a-Chip Architecture. Today. Process. Message FIFO. Thread. Dataflow Process Model Motivation Issues Abstraction Recommended Approach

ESE532: System-on-a-Chip Architecture. Today. Process. Message FIFO. Thread. Dataflow Process Model Motivation Issues Abstraction Recommended Approach ESE53: System-on-a-Chip Architecture Day 5: January 30, 07 Dataflow Process Model Today Dataflow Process Model Motivation Issues Abstraction Recommended Approach Message Parallelism can be natural Discipline

More information

Actors and their composition. Jörn W. Janneck

Actors and their composition. Jörn W. Janneck Actors and their composition Jörn W. Janneck Memorandum No. UCB/ERL M02/37 Electronics Research Laboratory University of California at Berkeley 18 December 2002 Actors and their composition Jörn W. Janneck

More information

Interface Automata and Actif Actors

Interface Automata and Actif Actors Interface Automata and Actif Actors H. John Reekie Dept. of Electrical Engineering and Computer Science University of California at Berkeley johnr@eecs.berkeley.edu Abstract This technical note uses the

More information

Implementation of Process Networks in Java

Implementation of Process Networks in Java Implementation of Process Networks in Java Richard S, Stevens 1, Marlene Wan, Peggy Laramie, Thomas M. Parks, Edward A. Lee DRAFT: 10 July 1997 Abstract A process network, as described by G. Kahn, is a

More information

Modal Models in Ptolemy

Modal Models in Ptolemy Modal Models in Ptolemy Edward A. Lee Stavros Tripakis UC Berkeley Workshop on Equation-Based Object-Oriented Modeling Languages and Tools 3rd International Workshop on Equation-Based Object-Oriented Modeling

More information

Petri Nets. Robert A. McGuigan, Department of Mathematics, Westfield State

Petri Nets. Robert A. McGuigan, Department of Mathematics, Westfield State 24 Petri Nets Author: College. Robert A. McGuigan, Department of Mathematics, Westfield State Prerequisites: The prerequisites for this chapter are graphs and digraphs. See Sections 9.1, 9.2, and 10.1

More information

A Schedulability-Preserving Transformation Scheme from Boolean- Controlled Dataflow Networks to Petri Nets

A Schedulability-Preserving Transformation Scheme from Boolean- Controlled Dataflow Networks to Petri Nets Schedulability-Preserving ransformation Scheme from oolean- ontrolled Dataflow Networks to Petri Nets ong Liu Edward. Lee University of alifornia at erkeley erkeley,, 94720, US {congliu,eal}@eecs. berkeley.edu

More information

Reliable Embedded Multimedia Systems?

Reliable Embedded Multimedia Systems? 2 Overview Reliable Embedded Multimedia Systems? Twan Basten Joint work with Marc Geilen, AmirHossein Ghamarian, Hamid Shojaei, Sander Stuijk, Bart Theelen, and others Embedded Multi-media Analysis of

More information

Dynamic Dataflow Modeling in Ptolemy II. by Gang Zhou. Research Project

Dynamic Dataflow Modeling in Ptolemy II. by Gang Zhou. Research Project Dynamic Dataflow Modeling in Ptolemy II by Gang Zhou Research Project Submitted to the Department of Electrical Engineering and Computer Sciences, University of California at Berkeley, in partial satisfaction

More information

Petri Nets. Petri Nets. Petri Net Example. Systems are specified as a directed bipartite graph. The two kinds of nodes in the graph:

Petri Nets. Petri Nets. Petri Net Example. Systems are specified as a directed bipartite graph. The two kinds of nodes in the graph: System Design&Methodologies Fö - 1 System Design&Methodologies Fö - 2 Petri Nets 1. Basic Petri Net Model 2. Properties and Analysis of Petri Nets 3. Extended Petri Net Models Petri Nets Systems are specified

More information

Building Synchronous DataFlow graphs with UML & MARTE/CCSL

Building Synchronous DataFlow graphs with UML & MARTE/CCSL Building Synchronous DataFlow graphs with UML & MARTE/CCSL F. Mallet, J. DeAntoni, C. André, R. de Simone Aoste - INRIA/I3S Université de Nice Sophia Antipolis UML & Formal methods Ambiguity and structural

More information

Compositionality in system design: interfaces everywhere! UC Berkeley

Compositionality in system design: interfaces everywhere! UC Berkeley Compositionality in system design: interfaces everywhere! Stavros Tripakis UC Berkeley DREAMS Seminar, Mar 2013 Computers as parts of cyber physical systems cyber-physical ~98% of the world s processors

More information

EE382N.23: Embedded System Design and Modeling

EE382N.23: Embedded System Design and Modeling EE38N.3: Embedded System Design and Modeling Lecture 5 Process-Based MoCs Andreas Gerstlauer Electrical and Computer Engineering University of Texas at Austin gerstl@ece.utexas.edu Lecture 5: Outline Process-based

More information

Höllische Programmiersprachen Hauptseminar im Wintersemester 2014/2015 Determinism and reliability in the context of parallel programming

Höllische Programmiersprachen Hauptseminar im Wintersemester 2014/2015 Determinism and reliability in the context of parallel programming Höllische Programmiersprachen Hauptseminar im Wintersemester 2014/2015 Determinism and reliability in the context of parallel programming Raphael Arias Technische Universität München 19.1.2015 Abstract

More information

Coverability Graph and Fairness

Coverability Graph and Fairness Coverability Graph and Fairness prof.dr.ir. Wil van der Aalst www.vdaalst.com Recall reachability analysis or1 x r1 rg1 g1 go1 o1 r2 rg2 g2 go2 o2 or2 Petri net standard properties Boundedness Terminating

More information

Embedded Systems 7. Petri net plan coordination for robocup teams G. Kontes and M.G. Lagoudakis BF - ES BF - ES - 2 -

Embedded Systems 7. Petri net plan coordination for robocup teams G. Kontes and M.G. Lagoudakis BF - ES BF - ES - 2 - Embedded Systems 7-1 - Petri net plan coordination for robocup teams G. Kontes and M.G. Lagoudakis - 2-1 Passing Maneuver Teamwork Design Based on Petri Net Plan P. F. Palamara, V. A. Ziparo, L. Iocchi,

More information

EE213A - EE298-2 Lecture 8

EE213A - EE298-2 Lecture 8 EE3A - EE98- Lecture 8 Synchronous ata Flow Ingrid Verbauwhede epartment of Electrical Engineering University of California Los Angeles ingrid@ee.ucla.edu EE3A, Spring 000, Ingrid Verbauwhede, UCLA - Lecture

More information

Specifications and Modeling

Specifications and Modeling 12 Specifications and Modeling Peter Marwedel TU Dortmund, Informatik 12 Springer, 2010 2012 年 10 月 17 日 These slides use Microsoft clip arts. Microsoft copyright restrictions apply. Hypothetical design

More information

Lecture 6. Abstract Interpretation

Lecture 6. Abstract Interpretation Lecture 6. Abstract Interpretation Wei Le 2014.10 Outline Motivation History What it is: an intuitive understanding An example Steps of abstract interpretation Galois connection Narrowing and Widening

More information

Promela and SPIN. Mads Dam Dept. Microelectronics and Information Technology Royal Institute of Technology, KTH. Promela and SPIN

Promela and SPIN. Mads Dam Dept. Microelectronics and Information Technology Royal Institute of Technology, KTH. Promela and SPIN Promela and SPIN Mads Dam Dept. Microelectronics and Information Technology Royal Institute of Technology, KTH Promela and SPIN Promela (Protocol Meta Language): Language for modelling discrete, event-driven

More information

Paradigms of computer programming

Paradigms of computer programming Paradigms of computer programming Louv1.1x and Louv1.2x form a two-course sequence Together they teach programming as a unified discipline that covers all programming languages Second-year university level:

More information

Outline. Petri nets. Introduction Examples Properties Analysis techniques. 1 EE249Fall04

Outline. Petri nets. Introduction Examples Properties Analysis techniques. 1 EE249Fall04 Outline Petri nets Introduction Examples Properties Analysis techniques 1 Petri Nets (PNs) Model introduced by C.A. Petri in 1962 Ph.D. Thesis: Communication with Automata Applications: distributed computing,

More information

Bounded Scheduling of Process Networks. Thomas M. Parks. B.S.E (Princeton University) in the

Bounded Scheduling of Process Networks. Thomas M. Parks. B.S.E (Princeton University) in the Bounded Scheduling of Process Networks by Thomas M. Parks B.S.E (Princeton University) 987 A dissertation submitted in partial satisfaction of the requirements for the degree of Doctor of Philosophy in

More information

Concurrent Models of Computation

Concurrent Models of Computation Chapter 5 Concurrent Models of Computation Contents 5.1 Structure of Models....................... 117 5.2 Synchronous-Reactive Models................. 118 Sidebar: Actor Networks as a System of Equations.......

More information

HW/SW Cyber-System Co-Design and Modeling

HW/SW Cyber-System Co-Design and Modeling HW/SW Cyber-System Co-Design and Modeling Julio OLIVEIRA Karol DESNOS Karol Desnos (IETR) & Julio Oliveira (TNO) 1 Introduction Who are we? Julio de OLIVEIRA Position: TNO - Researcher & innovation scientist

More information

COMP 763. Eugene Syriani. Ph.D. Student in the Modelling, Simulation and Design Lab School of Computer Science. McGill University

COMP 763. Eugene Syriani. Ph.D. Student in the Modelling, Simulation and Design Lab School of Computer Science. McGill University Eugene Syriani Ph.D. Student in the Modelling, Simulation and Design Lab School of Computer Science McGill University 1 OVERVIEW In the context In Theory: Timed Automata The language: Definitions and Semantics

More information

3.7 Denotational Semantics

3.7 Denotational Semantics 3.7 Denotational Semantics Denotational semantics, also known as fixed-point semantics, associates to each programming language construct a well-defined and rigorously understood mathematical object. These

More information

Throughout this course, we use the terms vertex and node interchangeably.

Throughout this course, we use the terms vertex and node interchangeably. Chapter Vertex Coloring. Introduction Vertex coloring is an infamous graph theory problem. It is also a useful toy example to see the style of this course already in the first lecture. Vertex coloring

More information

[module 2.2] MODELING CONCURRENT PROGRAM EXECUTION

[module 2.2] MODELING CONCURRENT PROGRAM EXECUTION v1.0 20130407 Programmazione Avanzata e Paradigmi Ingegneria e Scienze Informatiche - UNIBO a.a 2013/2014 Lecturer: Alessandro Ricci [module 2.2] MODELING CONCURRENT PROGRAM EXECUTION 1 SUMMARY Making

More information

fakultät für informatik informatik 12 technische universität dortmund Specifications Peter Marwedel TU Dortmund, Informatik /11/15

fakultät für informatik informatik 12 technische universität dortmund Specifications Peter Marwedel TU Dortmund, Informatik /11/15 12 Specifications Peter Marwedel TU Dortmund, Informatik 12 2008/11/15 Graphics: Alexandra Nolte, Gesine Marwedel, 2003 Structure of this course Application Knowledge 3: Embedded System HW 2: Specifications

More information

EECS 144/244. Fundamental Algorithms for System Modeling, Analysis, and Optimization. Lecture 1: Introduction, Systems

EECS 144/244. Fundamental Algorithms for System Modeling, Analysis, and Optimization. Lecture 1: Introduction, Systems EECS 144/244 Fundamental Algorithms for System Modeling, Analysis, and Optimization Lecture 1: Introduction, Systems Stavros Tripakis UC Berkeley Spring 2013 1 Computers as parts of Systems ~98% of the

More information

6.080 / Great Ideas in Theoretical Computer Science Spring 2008

6.080 / Great Ideas in Theoretical Computer Science Spring 2008 MIT OpenCourseWare http://ocw.mit.edu 6.8 / 6.89 Great Ideas in Theoretical Computer Science Spring 28 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

More information

A NETWORK OF COMMUNICATING LOGIC PROGRAMS AND ITS SEMANTICS. Susumu Yamasaki. Department of Information Science, Kyoto University Sakyo, Kyoto, Japan

A NETWORK OF COMMUNICATING LOGIC PROGRAMS AND ITS SEMANTICS. Susumu Yamasaki. Department of Information Science, Kyoto University Sakyo, Kyoto, Japan A NETWORK OF COMMUNICATING LOGIC PROGRAMS AND ITS SEMANTICS Susumu Yamasaki Department of Information Science, Kyoto University Sakyo, Kyoto, Japan ABSTRACT In this paper, a network of communicating loqic

More information

Petri Nets ~------~ R-ES-O---N-A-N-C-E-I--se-p-te-m--be-r Applications.

Petri Nets ~------~ R-ES-O---N-A-N-C-E-I--se-p-te-m--be-r Applications. Petri Nets 2. Applications Y Narahari Y Narahari is currently an Associate Professor of Computer Science and Automation at the Indian Institute of Science, Bangalore. His research interests are broadly

More information

Transactional Information Systems:

Transactional Information Systems: Transactional Information Systems: Theory, Algorithms, and the Practice of Concurrency Control and Recovery Gerhard Weikum and Gottfried Vossen Teamwork is essential. It allows you to blame someone else.

More information

DIGITAL VS. ANALOG SIGNAL PROCESSING Digital signal processing (DSP) characterized by: OUTLINE APPLICATIONS OF DIGITAL SIGNAL PROCESSING

DIGITAL VS. ANALOG SIGNAL PROCESSING Digital signal processing (DSP) characterized by: OUTLINE APPLICATIONS OF DIGITAL SIGNAL PROCESSING 1 DSP applications DSP platforms The synthesis problem Models of computation OUTLINE 2 DIGITAL VS. ANALOG SIGNAL PROCESSING Digital signal processing (DSP) characterized by: Time-discrete representation

More information

Counting Interface Automata and their Application in Static Analysis of Actor Models

Counting Interface Automata and their Application in Static Analysis of Actor Models Counting Interface Automata and their Application in Static Analysis of Actor Models Ernesto Wandeler Jörn W. Janneck Edward A. Lee Lothar Thiele Abstract We present an interface theory based approach

More information

The Markov Reformulation Theorem

The Markov Reformulation Theorem The Markov Reformulation Theorem Michael Kassoff and Michael Genesereth Logic Group, Department of Computer Science Stanford University {mkassoff, genesereth}@cs.stanford.edu Abstract In this paper, we

More information

Timed Automata: Semantics, Algorithms and Tools

Timed Automata: Semantics, Algorithms and Tools Timed Automata: Semantics, Algorithms and Tools Johan Bengtsson and Wang Yi Uppsala University Email: {johanb,yi}@it.uu.se Abstract. This chapter is to provide a tutorial and pointers to results and related

More information

Math 5593 Linear Programming Lecture Notes

Math 5593 Linear Programming Lecture Notes Math 5593 Linear Programming Lecture Notes Unit II: Theory & Foundations (Convex Analysis) University of Colorado Denver, Fall 2013 Topics 1 Convex Sets 1 1.1 Basic Properties (Luenberger-Ye Appendix B.1).........................

More information

CONVENTIONAL EXECUTABLE SEMANTICS. Grigore Rosu CS422 Programming Language Semantics

CONVENTIONAL EXECUTABLE SEMANTICS. Grigore Rosu CS422 Programming Language Semantics CONVENTIONAL EXECUTABLE SEMANTICS Grigore Rosu CS422 Programming Language Semantics Conventional Semantic Approaches A language designer should understand the existing design approaches, techniques and

More information

System Correctness. EEC 421/521: Software Engineering. System Correctness. The Problem at Hand. A system is correct when it meets its requirements

System Correctness. EEC 421/521: Software Engineering. System Correctness. The Problem at Hand. A system is correct when it meets its requirements System Correctness EEC 421/521: Software Engineering A Whirlwind Intro to Software Model Checking A system is correct when it meets its requirements a design without requirements cannot be right or wrong,

More information

Hardware-Software Codesign. 6. System Simulation

Hardware-Software Codesign. 6. System Simulation Hardware-Software Codesign 6. System Simulation Lothar Thiele 6-1 System Design specification system simulation (this lecture) (worst-case) perf. analysis (lectures 10-11) system synthesis estimation SW-compilation

More information

PROGRAM ANALYSIS & SYNTHESIS

PROGRAM ANALYSIS & SYNTHESIS Lecture 02 Structural Operational Semantics (SOS) PROGRAM ANALYSIS & SYNTHESIS EranYahav 1 Previously static analysis over-approximation of program behavior abstract interpretation abstraction, transformers,

More information

CS 6110 S14 Lecture 38 Abstract Interpretation 30 April 2014

CS 6110 S14 Lecture 38 Abstract Interpretation 30 April 2014 CS 6110 S14 Lecture 38 Abstract Interpretation 30 April 2014 1 Introduction to Abstract Interpretation At this point in the course, we have looked at several aspects of programming languages: operational

More information

Formal Specification and Verification

Formal Specification and Verification Formal Specification and Verification Introduction to Promela Bernhard Beckert Based on a lecture by Wolfgang Ahrendt and Reiner Hähnle at Chalmers University, Göteborg Formal Specification and Verification:

More information

Computational Process Networks a model and framework for high-throughput signal processing

Computational Process Networks a model and framework for high-throughput signal processing Computational Process Networks a model and framework for high-throughput signal processing Gregory E. Allen Ph.D. Defense 25 April 2011 Committee Members: James C. Browne Craig M. Chase Brian L. Evans

More information

4/6/2011. Model Checking. Encoding test specifications. Model Checking. Encoding test specifications. Model Checking CS 4271

4/6/2011. Model Checking. Encoding test specifications. Model Checking. Encoding test specifications. Model Checking CS 4271 Mel Checking LTL Property System Mel Mel Checking CS 4271 Mel Checking OR Abhik Roychoudhury http://www.comp.nus.edu.sg/~abhik Yes No, with Counter-example trace 2 Recap: Mel Checking for mel-based testing

More information

The alternator. Mohamed G. Gouda F. Furman Haddix

The alternator. Mohamed G. Gouda F. Furman Haddix Distrib. Comput. (2007) 20:21 28 DOI 10.1007/s00446-007-0033-1 The alternator Mohamed G. Gouda F. Furman Haddix Received: 28 August 1999 / Accepted: 5 July 2000 / Published online: 12 June 2007 Springer-Verlag

More information

Software Engineering using Formal Methods

Software Engineering using Formal Methods Software Engineering using Formal Methods Introduction to Promela Wolfgang Ahrendt & Richard Bubel & Reiner Hähnle & Wojciech Mostowski 31 August 2011 SEFM: Promela /GU 110831 1 / 35 Towards Model Checking

More information

Behavioural Equivalences and Abstraction Techniques. Natalia Sidorova

Behavioural Equivalences and Abstraction Techniques. Natalia Sidorova Behavioural Equivalences and Abstraction Techniques Natalia Sidorova Part 1: Behavioural Equivalences p. p. The elevator example once more How to compare this elevator model with some other? The cabin

More information

Fork Sequential Consistency is Blocking

Fork Sequential Consistency is Blocking Fork Sequential Consistency is Blocking Christian Cachin Idit Keidar Alexander Shraer May 14, 2008 Abstract We consider an untrusted server storing shared data on behalf of clients. We show that no storage

More information

Course Modelling of Concurrent Systems Summer Semester 2016 University of Duisburg-Essen

Course Modelling of Concurrent Systems Summer Semester 2016 University of Duisburg-Essen Course Modelling of Concurrent Systems Summer Semester 2016 University of Duisburg-Essen Harsh Beohar LF 265, harsh.beohar@uni-due.de Harsh Beohar Course Modelling of Concurrent Systems 1 Course handler

More information

Imperative model of computation

Imperative model of computation 12 Imperative model of computation Jian-Jia Chen (Slides are based on Peter Marwedel) Informatik 12 TU Dortmund Germany Springer, 2010 2016 年 11 月 09 日 These slides use Microsoft clip arts. Microsoft copyright

More information

CS422 - Programming Language Design

CS422 - Programming Language Design 1 CS422 - Programming Language Design Denotational Semantics Grigore Roşu Department of Computer Science University of Illinois at Urbana-Champaign 2 Denotational semantics, alsoknownasfix-point semantics,

More information

Hierarchical FSMs with Multiple CMs

Hierarchical FSMs with Multiple CMs Hierarchical FSMs with Multiple CMs Manaloor Govindarajan Balasubramanian Manikantan Bharathwaj Muthuswamy (aka Bharath) Reference: Hierarchical FSMs with Multiple Concurrency Models. Alain Girault, Bilung

More information

CONVENTIONAL EXECUTABLE SEMANTICS. Grigore Rosu CS522 Programming Language Semantics

CONVENTIONAL EXECUTABLE SEMANTICS. Grigore Rosu CS522 Programming Language Semantics CONVENTIONAL EXECUTABLE SEMANTICS Grigore Rosu CS522 Programming Language Semantics Conventional Semantic Approaches A language designer should understand the existing design approaches, techniques and

More information

Qualitative Analysis of WorkFlow nets using Linear Logic: Soundness Verification

Qualitative Analysis of WorkFlow nets using Linear Logic: Soundness Verification Proceedings of the 2009 IEEE International Conference on Systems, Man, and Cybernetics San Antonio, TX, USA - October 2009 Qualitative Analysis of WorkFlow nets using Linear Logic: Soundness Verification

More information

Distributed Systems Programming (F21DS1) Formal Verification

Distributed Systems Programming (F21DS1) Formal Verification Distributed Systems Programming (F21DS1) Formal Verification Andrew Ireland Department of Computer Science School of Mathematical and Computer Sciences Heriot-Watt University Edinburgh Overview Focus on

More information

The SPIN Model Checker

The SPIN Model Checker The SPIN Model Checker Metodi di Verifica del Software Andrea Corradini Lezione 1 2013 Slides liberamente adattate da Logic Model Checking, per gentile concessione di Gerard J. Holzmann http://spinroot.com/spin/doc/course/

More information

Fork Sequential Consistency is Blocking

Fork Sequential Consistency is Blocking Fork Sequential Consistency is Blocking Christian Cachin Idit Keidar Alexander Shraer Novembe4, 008 Abstract We consider an untrusted server storing shared data on behalf of clients. We show that no storage

More information

Reactive Process Networks

Reactive Process Networks Reactive Process Networks Marc Geilen and Twan Basten Eindhoven University of Technology Department of Electrical Engineering P.O.Box 513, 5600 MB, Eindhoven, The Netherlands M.C.W.Geilen@tue.nl, A.A.Basten@tue.nl

More information

A Fair Extension of (Soft) Concurrent Constraint Languages

A Fair Extension of (Soft) Concurrent Constraint Languages A Fair Extension of (Soft) Concurrent Constraint Languages Stefano Bistarelli 1,2,3 and Paola Campli 1 1 Department of Science, University G. d Annunzio of Chieti-Pescara, Italy [bista,campli]@sci.unich.it

More information

Design and Analysis of Distributed Interacting Systems

Design and Analysis of Distributed Interacting Systems Design and Analysis of Distributed Interacting Systems Lecture 5 Linear Temporal Logic (cont.) Prof. Dr. Joel Greenyer May 2, 2013 (Last Time:) LTL Semantics (Informally) LTL Formulae are interpreted on

More information

Computer Science Technical Report

Computer Science Technical Report Computer Science Technical Report Feasibility of Stepwise Addition of Multitolerance to High Atomicity Programs Ali Ebnenasir and Sandeep S. Kulkarni Michigan Technological University Computer Science

More information