A Denotational Semantics For Dataflow with Firing Edward A. Lee Jike Chong Wei Zheng Paper Discussion for
Kahn Process Network Definition Functional Nodes Unbounded FIFO –Reads block –Writes don’t block Signals are streams
Data-flow network Definition A collection of functional nodes Connected and communicate over unbounded FIFO queues Nodes are commonly called actors The bits of information that are communicated over the queues are commonly called tokens Source: ee249 slides
Question from this paper: What is a denotational semantic? Why is Kahn Process Networks important? Why do we need firing?
Question from this paper: Denotational Semantic Two approach of semantics –Denotational Developed by Scott and Strachey Meaning of the language is in terms of relation –Operational Turing machine Meaning of the language is in terms of actions taken by some abstract machine Closer to implementation
Question from this paper: Why is Kahn Process Networks important? –General –Solid semantics –Properties: Functional Node Unbounded FIFO Blocking read No total order (concept of partial order) –No over specification –May be difficult to determine order in the real world
Question from this paper: Why do we need firing? –Basic element of dataflow networks –Provides notion of tokens passed from inputs to outputs –Enables scheduling of input to output event –Closer to real world scenarios Kahn Process Network + Firing data-flow network
Formal Semantic Model – Kahn Process Network Provides a formal semantic model to construct rigorous proofs for Process Networks properties Need firing concepts based on the interactions of input sequences and the Process Network functional nodes
Paper Outline Kahn Process Network property –Prefix order –Complete partial order –Monotonic function –Continuous function –Composition of processes –Determinacy of processes –Least fixed point semantics –Higher Order Function Example
Paper Outline Kahn process network with Firing –Dataflow actors –Dataflow processes Extend Monotonic property to dataflow processes Extend Continuous property to dataflow processes –Continuity of dataflow process –Commutative firings and compositionality
Prefix Order Prefix order {$} is a prefix of {$, #} Partially ordered set - poset {{$}, {$,#}, {#}} -- {$} is not a prefix of {#} Empty signal the empty sequence Chain – totally ordered set {{$}, {$,#},{$,#,%}}
Complete Partial Order Upper bound –where every element is a prefix LUB – least upper bound LUB({{$}, {$,#},{$,#,%}}) = {$,#,%} Union of all sets Complete Partial Order A poset with a bottom s.t. every chain in the set has a LUB
Paper Outline Kahn Process Network property –Prefix order –Complete partial order –Monotonic function –Continuous function –Composition of processes –Determinacy of processes –Least fixed point semantics –Higher Order Function Example
Monotonic Function untimed notion of causality
Continuous Function Response to an infinite input sequence is the limit of its response to the finite approximation of this input
Paper Outline Kahn Process Network property –Prefix order –Complete partial order –Monotonic function –Continuous function –Composition of processes –Determinacy of processes –Least fixed point semantics –Higher Order Function Example
Composition of Processes And a collection
Determinate Composition A composition is determinate if given the input sequences, all other sequences are determined.
Paper Outline Kahn Process Network property –Prefix order –Complete partial order –Monotonic function –Continuous function –Composition of processes –Determinacy of processes –Least fixed point semantics –Higher Order Function Example
Least Fixed Point Composition does not deal with feedback Feedback loops may not have deterministic behavior Introduce the Least fixed point
Least Fixed Point A method to gain deterministic behavior in process networks with feedback topologies Start with the empty sequence Apply the (monotonic) function Apply the function again to the result Repeat forever
Higher Order Function Definition –Functions that take functions as arguments and return functions CPO over functions –Use a similar technique to study dataflow with firing (sm-) ? Is a CPO –Proof All chains in the set have LUB Bottom element
Higher Order Function Functionals example
Higher Order Function Example Sieve of Eratosthenese – Output prime numbers by recursive filtering – mapping functions onto functions
Paper Outline Kahn Process Network property Kahn process network with Firing –Dataflow actors –Dataflow processes Extend Monotonic property to dataflow processes Extend Continuous property to dataflow processes –Continuity of dataflow process –Commutative firings and compositionality
Dataflow with firings Based on continuous functionals on POSET of functions Dennis Dataflow –Kahn process networks where processes are made up of a sequence of atomic computations called firings Firing can be described as functions Firing rule
Dataflow actors Concatenation of the two tuples of sequences, S needs to be finite JOIN is defined to be LUB of the two tuples. If the join exists, They are said to be joinable Dataflow actor
Dataflow processes Question: Function F exists? Function F unique? Any assumption?
Dataflow processes F exists, and unique in the pointwise prefix order We can prove that is monotonic and continuous least fixed point F such that (F) = F, this F satisfied the definition in previous slides Find a constructive procedure for finding F F is OK to be the semantics of the dataflow process
Paper Outline Kahn process network with Firing –Dataflow actors –Dataflow processes Extend Monotonic property to dataflow processes Extend Continuous property to dataflow processes –Continuity of dataflow process –Commutative firings and compositionality
Continuity of dataflow process F is the least fixed point of the continuous functional F(s) is the LUB of the chain given by (19) why do we care about the continuity? guarantee the determinacy
Commutative firings and Compositionality How to solve this problem? Replace rule 4 with followings:
Redefine the functional
Conclusion Bridge the gap –Sequences of firings define a continuous Kahn process as the Least Fixed Point of an appropriately constructed functional
References [1] A Denotational Semantics for Dataflow with Firing, Edward A. Lee, Technical Memorandum UCB/ERL M97/3, Electronics Research Laboratory, Berkeley [2] Models of Computation for Embedded System Design, L. Lavagno, A. Sangiovanni-Vincentelli and E. Sentovich, 1998 NATO ASI Proceedings on System Synthesis, Il Ciocco (Italy) 1998 [3] Dataflow Process Networks, Edward A. Lee and Thomas M. Parks, Proceedings of the IEEE, vol. 83, no. 5, pp May, 1995 [4] Lecture notes from ee249/ee290n.