1 / 22

Kahn’s Principle and the Semantics of Discrete Event Systems

Kahn’s Principle and the Semantics of Discrete Event Systems. Xiaojun Liu EE290N Class Project December 10, 2004. Kahn Process Networks. An elegant model of computation for deterministic concurrent processes.

ninon
Download Presentation

Kahn’s Principle and the Semantics of Discrete Event Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Kahn’s Principle and the Semantics of Discrete Event Systems Xiaojun Liu EE290N Class Project December 10, 2004

  2. 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. Kahn’s Principle Can we extend this to timed systems? • The input-output function of any network is denoted by the least fixed point solution of the network’s recursion equations. z (y, z) = f(x) F(f)(x) = (p(x, 2(f(x))), q(1(f(x)))) f = fix(F) x p q y 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

  4. 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. 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. 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. 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 s1: L1 V is a prefix of s2: L2 V, denoted s1s2, if and only if L1  L2, and s1(t) = s2(t), tL1 • Let S(T, V) be the set of all signals from lower sets of T to V.

  8. 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. 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. Discrete Event Signals • The set of DE signals, S([0, ), V  {}) is a CPO. • Examples: clock: 0 1 2 3 … … zeno: 0 ½ 1 2 3 … … r-zeno: 0 ½ 1 2 3 …

  11. Discrete Event Processes s1: L1 V add s: L V s2: L2 V L = L1  L2 s(t) = s1(t) +s2(t), tL delay by 1 s1: L1 V s2: L2 V L2 = L1{1}  [0, 1) s2(t) = s1(t 1), when t 1 and , when t  [0, 1)

  12. Biased Merge or “Default” s1: L1 V biased merge s: L V s2: L2 V Let p = sup L2. If pL2, L = L1  L2 {q | q  p and t[p, q], s1(t)V } and if pL2, L = L1  L2 {q | q  p and t(p, q], s1(t)V } s(t) = s1(t), when s1(t)V s2(t), otherwise, tL

  13. 0 ½ 1 … … … … … … … … 0 ½ 1 2 3 … 0 ½ 1 2 3 … 0 ½ 1 … 0 ½ 1 2 0 ½ 1 2 A Discrete Event System delay by 1 biased merge zeno … 0 ½ 1 2 3 …

  14. YADES  lookahead by 1  biased merge r-zeno … 0 ½ 1 2 3 …

  15. 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. 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. clock: 0 1 … … 0 0 ½ ½ 1 1 A Caveat biased merge ? zeno:

  18. 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. Representing Discrete Signals as Timed Streams • Only “present” events? (0.0, 1) many-to-one prefix not a prefix (0.0, 1), (1.0, 1)

  20. Null Events (0.0, 1), (1.0, ) (0.0, 1), (2.0, ) one-to-many (0.0, 1), (1.0, ), (2.0, ) (0.0, 1), (1.0, 1), (2.0, )

  21. 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. 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

More Related