Download presentation
Presentation is loading. Please wait.
1
Kahn’s Principle and the Semantics of Discrete Event Systems Xiaojun Liu EE290N Class Project December 10, 2004
2
Xiaojun Liu 2 of 22 Kahn Process Networks An elegant model of computation for deterministic concurrent processes. Processes communicate streams of data asynchronously through unbounded FIFO channels. A denotational semantics based on complete partial orders (CPOs) and Scott continuous functions.
3
Xiaojun Liu 3 of 22 Kahn’s Principle The input-output function of any network is denoted by the least fixed point solution of the network’s recursion equations. Robert Yates and Guang Gao, “A Kahn Principle for Networks of Nonmonotonic Real-Time Processes” http://www.sable.mcgill.ca/~hendren/ftp/acaps/memo60.ps.gz pq x z y (y, z) = f(x) F(f)(x) = (p(x, 2 (f(x))), q( 1 (f(x)))) f = fix(F) Can we extend this to timed systems?
4
Xiaojun Liu 4 of 22 Previous Work: Yates & Gao Timed stream: a sequence of time-stamped tokens. The time stamps are strictly increasing and separated by a minimum time interval 0. Processes are -causal.
5
Xiaojun Liu 5 of 22 Previous Work, Continued The principle novelty of the new functional ( F ) … is that it cuts off all outputs as soon as the earliest new output token appears. The new functional lets the network “run” at each step only until the earliest new output token appears.
6
Xiaojun Liu 6 of 22 Highlights of Approach A direct extension of KPN to DE systems. More general than the previous work outlined earlier. Useful guidance to develop operational semantics and simulator.
7
Xiaojun Liu 7 of 22 Prefix Order − Definition Let T, a poset, be the set of all tags. Let L (T) be the set of lower sets of T. A signal is a function from a lower set L L (T) to some value set V, signal: L V A signal s 1 : L 1 V is a prefix of s 2 : L 2 V, denoted s 1 s 2, if and only if L 1 L 2, and s 1 (t) = s 2 (t), t L 1 Let S (T, V) be the set of all signals from lower sets of T to V.
8
Xiaojun Liu 8 of 22 Prefix Order − Examples Given any set A, treated as a poset with the discrete order, S (A, B) is the set of all partial functions from A to B. Let T = [0, ), and V = V { }, where represents the absence of value, S (T, V ) is the set of DE signals.
9
Xiaojun Liu 9 of 22 Prefix Order − Properties For any poset T of tags and set V of values, S (T, V) with the prefix order is a poset a CPO a complete lower semilattice (i.e. any subset of signals have a GLB) For any network of processes that are Scott continuous functions from input to output, Kahn’s principle applies.
10
Xiaojun Liu 10 of 22 Discrete Event Signals The set of DE signals, S ([0, ), V { }) is a CPO. Examples: clock: 0123… zeno: 0123… … ½ r-zeno: 0123… … ½
11
Xiaojun Liu 11 of 22 Discrete Event Processes add s 1 : L 1 V s 2 : L 2 V s: L V L = L 1 L 2 s(t) = s 1 (t) + s 2 (t), t L delay by 1 s 1 : L 1 V s 2 : L 2 V L 2 = L 1 {1} [0, 1) s 2 (t) =s 1 (t 1), when t 1 and , when t [0, 1)
12
Xiaojun Liu 12 of 22 Biased Merge or “Default” biased merge s 1 : L 1 V s 2 : L 2 V s: L V Let p = sup L 2. If p L 2, L = L 1 L 2 {q | q p and t [p, q], s 1 (t) V } and if p L 2, L = L 1 L 2 {q | q p and t (p, q], s 1 (t) V } s(t) =s 1 (t), when s 1 (t) V s 2 (t), otherwise, t L
13
Xiaojun Liu 13 of 22 A Discrete Event System biased merge delay by 1 zeno 0123…½ … 01½ 01½ … 012½ … 012½ … … 0123…½ …… 0123…½ … ……
14
Xiaojun Liu 14 of 22 YADES biased merge lookahead by 1 r-zeno 0123… … ½
15
Xiaojun Liu 15 of 22 Continuity and Causality A process may be continuous but not causal, e.g. “lookahead by 1”. A process may be causal but not continuous, e.g. one that produces an output event after counting an infinite number of input events.
16
Xiaojun Liu 16 of 22 Discrete Signals A DE signal s: L V is discrete if s -1 (V) is order-isomorphic with a lower set of N and s -1 (V) is a finite set, or L = [0, sup s -1 (V)). Let D ([0, ), V { }) be the set of discrete signals. With the prefix order, it is a poset, CPO, and a complete lower semilattice.
17
Xiaojun Liu 17 of 22 ? A Caveat biased merge clock: 01 01½ … zeno: 01½ …
18
Xiaojun Liu 18 of 22 Operational Semantics Represent signals as timed streams Processes map input timed streams to output timed streams An alternative development of Chandy and Misra’s distributed DE simulation
19
Xiaojun Liu 19 of 22 Representing Discrete Signals as Timed Streams Only “present” events? (0.0, 1) many-to-one (0.0, 1), (1.0, 1) prefix not a prefix
20
Xiaojun Liu 20 of 22 Null Events (0.0, 1), (1.0, ) one-to-many (0.0, 1), (1.0, 1), (2.0, ) (0.0, 1), (2.0, ) (0.0, 1), (1.0, ), (2.0, )
21
Xiaojun Liu 21 of 22 Simultaneous Events Extend the tag set to [0, ) N, with the lexicographical order. All developments so far can be generalized. Any continuous/causal DE process at a time t can be treated as a Scott continuous function from input sequences to output sequences. A “snapshot” of a DE system at a time t is a KPN.
22
Xiaojun Liu 22 of 22 Current Status Substantial progress on theoretical development Developing a plan for implementation Introduce “end-of-stream” marker in KPN Change event queue to contain sequences of events with the same time stamp and receiver Key criterion for improvement: more efficient simulation due to less traffic into/out of the event queue
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.