Communicatin Centered Programming for Embedded Systems Sakura Bhandari, Shoji Yuen (Nagoya University) Presented at SOA workshop in APSEC2007 (Dec. 2007, Nagoya) 1
Basics09 workshop( 上海 ), 10/12/2009 Motivation: Behavior descriptions for embedded system software Embedded systems in multi/many cores Many cores are cheaper Control over critical components Verification/Certification Low-level coding Direct real-time device control (by interrupt) Time-aware behavior Real-time constraints 2 2
Basics09 workshop( 上海 ), 10/12/2009 Target Overview EPP theory of a process calculus: System(C1,C2,C3) ~ C1’|C2’|C3’’ Does this work for embedded system software? 3
Basics09 workshop( 上海 ), 10/12/2009 Target Overview EPP theory of a process calculus: System(C1,C2,C3) ~ C1’|C2’|C3’’ Does this work for embedded system software? extension is necessary 3
Basics09 workshop( 上海 ), 10/12/2009 Contents Overview of Communication Centered Programming Extension with Priority (in Home Appliance Network) Concluding Remarks and Future Directions 4
Basics09 workshop( 上海 ), 10/12/2009 Communication Centered Programming [Carbone,Honda,Yoshida06] Global Description : Communication between agents Send message (op,v) in session s and v is stored in x at B Local Description: Behavior at each agent Endpoint Calculus : (A version of) typed π calculus Transformation from GD to LD: End-point Projection Behavioral correctness: bisimularity Communication correctness: session type To Ensures EPP for GD=3 type principles 5
Basics09 workshop( 上海 ), 10/12/2009 Communication Centered Programming for WS CCP is successfully applied for Web Services CCP implements ‘Choreograpy’ in Web Services Business Protocol/SOA for enterprise systems 6
Basics09 workshop( 上海 ), 10/12/2009 Global Description Operational Semantics : 7
Basics09 workshop( 上海 ), 10/12/2009 Local Description Behavioral semantics : Defined by π -like SOS rules 8
Basics09 workshop( 上海 ), 10/12/2009 Well-structuredness in Global descriptions Three principles for global descriptions Connectedness Well-threadedness Coherence Well-typed in session types ( Example ) I : interaction among Buyer,Seller,Shipper 9
Basics09 workshop( 上海 ), 10/12/2009 EPP (End Point Projection) Theorem 1. EPP preserves the session type 2. EPP generates sound and complete local descriptions. (Up to structural congruence and pruning) 10
Basics09 workshop( 上海 ), 10/12/2009 Application to Embedded systems Framwork for system development (not limited to embedded systems) Embedded Systems requires more properties real-time, Priority, (and probability) Extension in syntax/semantics 11
Basics09 workshop( 上海 ), 10/12/2009 Priority in choreography P1 P2 P3 P1 communicates with P3 unless P2 wishes to communicate P2 communicates with P3 unless P1 wishes to communicate P3 communicates with P2 unless P1 wishes to communicate Globally: P1>P2>P3 Can the global priority be extended in local priority? on the limited form of Global Descriptions (Guarded/Regular) 12
Basics09 workshop( 上海 ), 10/12/2009 Services in Home Network System SOA Based Home Network System Due to the dynamic nature of home appliance network No centralized server exists Appliances can be dynamically added and modified Appliances export their own features to the network play off stop on off small DVD Player Light video_on channel_on off TV 13
Basics09 workshop( 上海 ), 10/12/2009 Services in Home Network System SOA Based Home Network System Due to the dynamic nature of home appliance network No centralized server exists Appliances can be dynamically added and modified Appliances export their own features to the network play off stop on off small DVD Player Light video_on channel_on off TV 13
Basics09 workshop( 上海 ), 10/12/2009 Services in Home Network System SOA Based Home Network System Due to the dynamic nature of home appliance network No centralized server exists Appliances can be dynamically added and modified Appliances export their own features to the network play off Loosely Coupled stop on off small DVD Player Light video_on channel_on off TV 13
Basics09 workshop( 上海 ), 10/12/2009 CCP for home appliances Example of DVD play interaction play video_on small 14
Basics09 workshop( 上海 ), 10/12/2009 CCP for home appliances Example of DVD play interaction Global Description play USER → DVD : ch DVD ( ν sDVD ). DVD → TV : ch TV : ( ν tDVD ). video_on TV → LIGHT1 : ch LIGHT1 ( ν uDVD ). USER → DVD : s DVD < play >. DVD → TV : t DVD < video_on >. TV → LIGHT1 : u DVD < small >.0 small 14
EPP Basics09 workshop( 上海 ), 10/12/2009 CCP for home appliances Example of DVD play interaction Global Description play USER → DVD : ch DVD ( ν sDVD ). DVD → TV : ch TV : ( ν tDVD ). video_on TV → LIGHT1 : ch LIGHT1 ( ν uDVD ). USER → DVD : s DVD < play >. DVD → TV : t DVD < video_on >. TV → LIGHT1 : u DVD < small >.0 small Local Descriptions DVD [ ch DVD ( ν s). ch TV ( ν s). LIGHT1 [ !ch LIGHT1 ( ν u). TV [ !ch TV ( ν t). ch LIGHT1 ( ν u). s ▷ play . s ◁ video_on . ] u ▷ small ] t ▷ video_on . u ◁ small ] 14
Basics09 workshop( 上海 ), 10/12/2009 Behavioral interference An interference example between the DVD Play Interaction and the Coming Home Interaction The TV is set to the video mode User plays The light turns o fg the DVD The light turns on The air conditioner switches on User opens the Door 15
Basics09 workshop( 上海 ), 10/12/2009 Behavioral interference An interference example between the DVD Play Interaction and the Coming Home Interaction The TV is set to the video mode User plays The light turns o fg the DVD The light turns on The air conditioner switches on User opens the Door 15
Basics09 workshop( 上海 ), 10/12/2009 Behavioral interference An interference example between the DVD Play Interaction and the Coming Home Interaction The TV is set to the video mode User plays The light turns o fg the DVD The light turns on The air conditioner switches on User opens the Door 15
Basics09 workshop( 上海 ), 10/12/2009 Behavioral interference An interference example between the DVD Play Interaction and the Coming Home Interaction The TV is set to the video mode User plays The light turns o fg the DVD The light turns on The air conditioner switches on User opens the Door Interference occurs 15
Basics09 workshop( 上海 ), 10/12/2009 Behavioral interference An interference example between the DVD Play Interaction and the Coming Home Interaction The TV is set to the video mode User plays The light turns o fg the DVD The light turns on The air conditioner switches on User opens the Door Interference occurs Interference ... a phenomenon where two interactions include two di fg erent functions of a common appliance 15
Basics09 workshop( 上海 ), 10/12/2009 Behavioral interference An interference example between the DVD Play Interaction and the Coming Home Interaction The TV is set to the video mode User plays The light turns o fg the DVD The light turns on The air conditioner switches on User opens the Door Interference occurs Interference ... a phenomenon where two interactions include two di fg erent functions of a common appliance We assign priority to each interaction which can conflict with others 15
Basics09 workshop( 上海 ), 10/12/2009 Behavioral interference An interference example between the DVD Play Interaction and the Coming Home Interaction The TV is set to the video mode p1 User plays The light turns o fg the DVD p2 The light turns on The air conditioner switches on User opens the Door 15
Basics09 workshop( 上海 ), 10/12/2009 Behavioral interference An interference example between the DVD Play Interaction and the Coming Home Interaction The TV is set to the video mode p1 User plays The light turns o fg the DVD p2 The light turns on The air conditioner switches on User opens the Door 15
Basics09 workshop( 上海 ), 10/12/2009 Behavioral interference An interference example between the DVD Play Interaction and the Coming Home Interaction The TV is set to the video mode p1 User plays The light turns o fg the DVD p2 The light turns on The air conditioner switches on User opens the Door 15
will not occur !! interference Basics09 workshop( 上海 ), 10/12/2009 Behavioral interference An interference example between the DVD Play Interaction and the Coming Home Interaction The TV is set to the video mode p1 User plays The light turns o fg the DVD p2 The light turns on The air conditioner switches on User opens the Door 15
Basics09 workshop( 上海 ), 10/12/2009 Priority wrt CCP To resolve interference within the Communication Centered Programming... Integrated Services Appliance Behavior Global Description Local Description Global Description EPP Local Description (End Point Projection) Global Description Local Description Global Description 16
Recommend
More recommend