320 likes | 438 Vues
This document elaborates on the YAPI model as applied in EE290N under the guidance of mentors Roberto Passerone and Jerry Burch. It explores the foundational concepts of trace algebra to formally describe the behaviors and interactions within YAPI, detailing how traces can represent individual behaviors, agent interactions, and system processes. By discussing elements like buffer modeling, concurrency, and conservative approximations, the document aims to enhance understanding of the complex semantics governing synchronous and non-deterministic KPN systems, facilitating design and verification processes.
E N D
Use trace algebra to formalize the YAPI model EE290N Spring2002 Alessandro Pinto Mentors: Roberto Passerone Jerry Burch
Outline • References • Introduction to YAPI • Implication of select • Introduction to Trace Algebra • Traces to model YAPI • Buffer model • Conservative Approximation • Example • Conclusion
References • K.A. Vissers et. al. “YAPI: Application Modeling for Signal Processing System”, DAC00 • J. Burch, R. Passerone, ASV “Overcoming Heterophobia: Modeling Concurrency in Heterogeneous Systems” • J. Burch, R. Passerone, ASV “Modeling Techniques in Design-by-Refinement Methodologies” • E.A. Lee, T.M. Parks “Dataflow Process Networks” • G. Kahn, “The Semantics of a Simple Language for Parallel Programming” • G. Kahn, D.B. MacQueen, “Corutines and Networks of Parallel Processes”
The YAPI Model 1 • KPN (blocking read, non-blocking write) • Non-determinism
The YAPI Model 2 • Selection can be done on input and output YAPI Read,Write on unbounded FIFOs Read,Write on bounded FIFOs TTL
Implication of select • continuitymonotonicity determinacy i1=[1], i2=[] F(i1,i2) = [1] i1=[1,1], i2=[2] F(i1,i2) = [2,1] i=[1] F(i) = ([1],[]) i=[1,3] F(i) = ([1],[3]), ([3],[1]), ([1,3],[]) …
Trace Algebra 1 Model of individual behaviors Model of agents Trace algebra C • Trace Algebra • Set of traces • Projection of traces • Renaming of traces • Concurrency Algebra • Set of agents • Parallel composition of agents • Projection of agents • Renaming of agents Trace structure algebra A i1 I1=[1,3,4,-1] I2=[0,3,5,2] O=[1,6,9,1] o + i2 Source: R. Passerone
Trace Algebra 2 • Alphabet • Set of traces over alphabet A • Renaming y = rename(r) (x) where x is a trace and r is a renaming function • Projection y = proj(B)(x) where x is a trace and BA • Trace structure T=(,P) where is the signature and P B(A) • A set of axioms must be verified !!!!!!!
Trace Algebra 3 Homomorphism h Derive Trace algebra C’ Trace structure algebra A’ “Abstract” Domain Yinv Yu Yl Trace algebra C Trace structure algebra A “Detailed” Domain Let Tspecand Timplbe trace structures in A. Then if Yu( Timpl ) Yl( Tspec ) then Timpl Tspec Source: R. Passerone
Implication of select: Trace Algebra View • Monotonicity is captured by projection • proj(I)(x) ⊑ proj(I)(y) proj(O)(x) ⊑ proj(O)(y) • For the previous example two traces belongs to the same process:
First step: Set of Traces • Which set of traces should we choose? • Streams • Synchronous • DE
Streams 1 • No timing information • KPN can be expressed on the same set of traces • Continuity is a constraint on the trace structures • In this sense YAPI processes can form more trace structures then KPN YAPI KPN
Streams 2 • Operation on traces • Renaming • Projection • Operation on trace structures
A more detailed domain 1 • We want to capture two important things • Relative arrival time • Bounded FIFOs • Synchronous Domain
A more detailed domain 2 • Renaming • Projection Two possible traces
Buffers • Buffers are modeled as processes • The strict version of a sequence a is • We indicate with ak the sequence up to instant k • Definition of a buffer • Trace structure TB=((I,O),P)
Buffer Constraint Two possible traces of AddSub Buf1 Gen AddSub Buf2 Bufferlength =2 T=Gen||Buf1||Buf2||AddSub Bufferlength =1
Conservative Approximation 1 Nondet KPN Homomorphism h(x) Approximation Synch
Conservative Approximation 2 h is in general many to one so this is an upper bound h(P) P Abstract Domain Detailed Domain
Conservative Approximation 2 h(P) P Abstract Domain h(B(A) – P) h(P) - h(B(A) – P) B(A) - P Detailed Domain
From Synch to ND-KPN 1 • Definition of the homomorphism h(x)
From Synch to ND-KPN 2 • Let’s consider a process: • If p is true add the inputs, if p is false subtract them h(x) h(x)
Applications of the Approximation • Verification Problem • Design Problem
Example 1 • Norm Bufferlength=n =(I,O) =(I,O) =(I,O)
Example 1 Bufferlength=n =(I,O) =(I,O) =(I,O)
Example 1 Bufferlength=n =(I,O) =(I,O) =(I,O)
Example 1 Bufferlength=n =(I,O) =(I,O) =(I,O)
Example 2 • One possible execution Bufferlength=n
Example 3 id h(x)
Example 4 • One possible execution
Example 4 • Design problem
Conclusion • The YAPI model was a good motivation for this project • Trace algebra has been applied to describe the denotational semantics of the model at different level of abstraction • A Conservative approximation between Synchronous model and ND-KPN allows abstraction from one model to another for verification and design