290 likes | 374 Views
Periodic-Drop-Take Calculus for Stream Transformers (based on CS-Report 05-02). Rudolf Mak January 21, 2005. Motivation. For stream processing systems build in a LEGO- like fashion from a fixed set of building blocks we want to specify verify analyze
E N D
Periodic-Drop-Take Calculus forStream Transformers(based on CS-Report 05-02) Rudolf Mak January 21, 2005 Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Motivation • For stream processing systems build in a LEGO- • like fashion from a fixed set of building blocks • we want to • specify • verify • analyze • their functional behavior. Moreover we want to • design • systems of specified functionality. Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Question What does this system compute for various values of k? Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Periodic Stream samplers Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
PDT-calculus • Operators • Drop operators • Take operators • Equational rules • Drop expansion/contraction • Drop exchange • Complement • Drop elimination/Introduction • Take composition Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Drop operator Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Canonical forms • Period-consecutive • Rank-increasing • Primitive X Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Drop expansion/contraction rule Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Example (l+1)-fold q-fold Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Drop exchange rule Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Completeness Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Rewriting to canonical form Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Take operator Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Complement Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Rules involving take operators • Drop elimination/introduction • Take composition Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Split component Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Merge component Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Block reverser Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Split-merge systems Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
The set of equations Esv Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Solving a single equation 1 • Arbitrary shape • Canonical shape • Period-aligned, pseudo-canonical shape Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Solving a single equation 2 Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Example Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Esv theorem for SISO systems Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Split component Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Emv theorem for SISO systems Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Question revisited What does this system compute for various values of k? Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Answer • k = 0, junk, irreparable deadlock • k = 1, 2-place buffer • k = 2, block reverser with block size 2 Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking
Conclusions • PDT-calculus is a simple calculus to reason about periodically sampled streams. • PDT-calculus is sound and complete. • Semantic model in the form of a monoid. • Algorithm to determine canonical forms (solves the word problem). • Algorithm to solve linear equations in a single variable (solves the division problem). • Functionality of arbitrary SISO-systems can be analyzed. • Only partial correctness is addressed. Rudolf Mak r.h.mak@tue.nl TU/e, Dept. of Math. and Comp. Sc., System Architecture and Networking