Скачать презентацию Lecture 4 Component Behavioral Modeling with REMES CBSE Скачать презентацию Lecture 4 Component Behavioral Modeling with REMES CBSE

2a505985b2d3eb28fe78d07d1804fefe.ppt

  • Количество слайдов: 41

Lecture 4 Component Behavioral Modeling with REMES CBSE graduate course Page 1, Lecture 4 Component Behavioral Modeling with REMES CBSE graduate course Page 1,

Agenda q Background and Motivation q REMES q Connecting REMES and Pro. Com q Agenda q Background and Motivation q REMES q Connecting REMES and Pro. Com q REMES Editor q Lab 2 CBSE graduate course Page 2,

Background and Motivation q Embedded systems microprocessor-based systems that are built (embedded) in a Background and Motivation q Embedded systems microprocessor-based systems that are built (embedded) in a larger system CBSE graduate course Page 3,

Background and Motivation q Typically have tightly constrained heterogeneous requirements low cost constantly react Background and Motivation q Typically have tightly constrained heterogeneous requirements low cost constantly react to changes in the environment compute certain results in real-time without delay sized to fit on a single chip consume minimum resources manage the growing complexity of software q Requirements related to extra-functional properties and limited resources are essential CBSE graduate course Page 4,

Background and Motivation {RB} > {RC 1} B {RB C 1 {RC 1} Repository Background and Motivation {RB} > {RC 1} B {RB C 1 {RC 1} Repository C 2 {RC 2} Cn {RCn} CBSE graduate course Page 5,

Background and Motivation q Challenge construct component model for ES design enriched with behavioral Background and Motivation q Challenge construct component model for ES design enriched with behavioral information support predictable system development and as such guarantee absence or presence of certain properties prediction methods should be available already at early design stage bottom-up resource analysis can guide the selection of components top-down resource analysis could help in correct decomposition of system’s specification CBSE graduate course Page 6,

REMES behavioural language CBSE graduate course Page 7, REMES behavioural language CBSE graduate course Page 7,

Classification of resources q Resource consumption- anotated with c; accumulated resource usage up to Classification of resources q Resource consumption- anotated with c; accumulated resource usage up to some time point q c` - rate of consumption over time q Classification of resources: discrete or continuous nature referable or non-referable Resource Class A (memory) Characteristics discrete referable B (CPU, bandwidth) discrete non-referable C (CPU, energy, bandwidth) continuous non-referable CBSE graduate course Page 8,

REMES – REsource Model for Embedded Systems q Behavioral model intended to describe the REMES – REsource Model for Embedded Systems q Behavioral model intended to describe the resource-wise behavior of interacting embedded components q Behavior of a component is a mode q Modes atomic composite CBSE graduate course Page 9,

REMES - modes q Mode M contains Control points (entry-, exit-, init-, write points) REMES - modes q Mode M contains Control points (entry-, exit-, init-, write points) Variables (boolean, natural, integer, array, clock, history variables) global with locks local Actions discrete A (guard, body) delay/timed Constraints (invariants) Non-lazy modes main Conditional connectors C Nested submodes Entry Point submode 1 submode 3 submode 2 Init Point Exit Point Write Point Page 10,

Example 1 - internal behaviour of Control component in REMES Control Credentials t<=30, cpu’=2 Example 1 - internal behaviour of Control component in REMES Control Credentials t<=30, cpu’=2 n=u =0 , t: 30 = m+ e Init m Entry logi serd ata logged==false C log ged ==t Air_conditioning rue Initialization resource mem: TA; resource eng: TC; cpu’=10 eng’=2 o urn t e tru = ff= Exit resource cpu: TC; t: clock CBSE graduate course Page 11,

Analysing REMES based ES q REMES modes have access to R 1, …, Rn Analysing REMES based ES q REMES modes have access to R 1, …, Rn q Goal analyze various scenarios of system’s resource usage q Analysis model for REMES rtot total accumulated resource consumption for R 1, …, Rn r 1, …, rn accumulated consumption of R 1, …, Rn w 1, …, wn relative importance of r 1, …, rn CBSE graduate course Page 12,

Analysing REMES based ES q Translating REMES into Priced timed automata or Multi Priced Analysing REMES based ES q Translating REMES into Priced timed automata or Multi Priced timed automata PTA TA + costs on locations and edges REMES atomic mode PTA location REMES discrete edge PTA edge REMES discrete step PTA transition REMES precondition PTA synch. channels Automated translation q Types of analysis Feasibility Optimal/ worst-case resource consumption Trade-off analysis 2018 -03 -18 13 Page 13,

Analysing REMES based ES PTA / MPTA yes Model Checker (Uppaal Cora) resource-aware property Analysing REMES based ES PTA / MPTA yes Model Checker (Uppaal Cora) resource-aware property error trace Assumptions from hardware abstraction: Memory budget, Bandwidth, Cost model CBSE graduate course Page 14,

Analysing REMES based ES Pro. Com REMES Pro. Com Architectural modeling Model el S Analysing REMES based ES Pro. Com REMES Pro. Com Architectural modeling Model el S Mod REME Behavioral modeling Integrated through Attribute Framework Managing and integrating properties CBSE graduate course Formal analysis 2018 -03 -18 Page 15,

Connecting Pro. Com and REMES q Pro. Save level trigger port REMES precondition data Connecting Pro. Com and REMES q Pro. Save level trigger port REMES precondition data port REMES data variable q Pro. Sys level § input message port REMES read boolean variable and REMES read data variable of the same type as the port type § output message port REMES write boolean variable and REMES write data variable CBSE graduate course Page 16,

Example 2 - Temperature control system core is heated at some given rate core Example 2 - Temperature control system core is heated at some given rate core temperature should be maintained between a minimum and a maximum when max temp. is reached, designed to be cooled down by inserting one of two existing rods , which cool at different rates R 1 or R 2 a rod is available again after T time units CBSE graduate course Page 17,

Example 2 - Temperature control system q Model of the architecture and behaviour System Example 2 - Temperature control system q Model of the architecture and behaviour System modeled with 3 Pro. Save components Each component has a behavior depicted by a REMES mode Assume memory and cpu usage Formal analysis Pro. Com + REMES PTA CBSE graduate course Page 18,

Example 2 - Temperature control system CBSE graduate course Page 19, Example 2 - Temperature control system CBSE graduate course Page 19,

Example 2 - Temperature control system CBSE graduate course Page 20, Example 2 - Temperature control system CBSE graduate course Page 20,

Example 2 - Temperature control system – Analysis in Uppaal Just for illustration! Page Example 2 - Temperature control system – Analysis in Uppaal Just for illustration! Page 21,

QUESTIONS ? ? ? CBSE graduate course Page 22, QUESTIONS ? ? ? CBSE graduate course Page 22,

REMES tool-chain CBSE graduate course Page 23, REMES tool-chain CBSE graduate course Page 23,

REMES tool-chain q The REMES tool-chain consists of REMES model editor REMES simulator to REMES tool-chain q The REMES tool-chain consists of REMES model editor REMES simulator to test timing and resource behavior prior to formal analysis Automated transformation from REMES to PTA formal analysis and Uppaal. Lite editor CBSE graduate course Page 24,

CBSE graduate course Page 25, CBSE graduate course Page 25,

REMES editor CBSE graduate course Page 26, REMES editor CBSE graduate course Page 26,

CBSE graduate course Page 27, CBSE graduate course Page 27,

REMES language elements Composite mode Compartments for declaration variables, resources, constants CBSE graduate course REMES language elements Composite mode Compartments for declaration variables, resources, constants CBSE graduate course Page 28,

REMES language elements Submodes Invariant – time is allowed to pass until invariant is REMES language elements Submodes Invariant – time is allowed to pass until invariant is violated Non-lazy – does not contain any. invariant, Time is allowed to pass in a non-lazy mode until at least one of the guards of the outgoing discrete actions evaluates to true Urgent – time is not allowed to pass (invariant is false) . CBSE graduate course Page 29,

REMES language elements Input and output Init-, entry-, exit-, write – points (local exit REMES language elements Input and output Init-, entry-, exit-, write – points (local exit points not presented here) CBSE graduate course Page 30,

REMES language elements Control flow Edges with guards and actions Conditional connectors CBSE graduate REMES language elements Control flow Edges with guards and actions Conditional connectors CBSE graduate course Page 31,

Introduction to Lab 2 CBSE graduate course Page 32, Introduction to Lab 2 CBSE graduate course Page 32,

Objectives q Learn how to model behaviors of component-based embedded systems Model internal behavior Objectives q Learn how to model behaviors of component-based embedded systems Model internal behavior of components Think about modes, actions, resources, invariants etc. Get familiar with the REMES editor CBSE graduate course Page 33,

Expected Output q Same system as for Lab 1 Archive files only (no folder) Expected Output q Same system as for Lab 1 Archive files only (no folder) named ”Lab 2_X. zip” where X=your name 1 report explaining your design choices and calculation results The Project folder for your system q Individual work And nothing else! q Do not copy solutions from others ! CBSE graduate course Page 34,

Deadline q Thursday 16 February 2012 23: 59 (FIRM Deadline!) q If you submit Deadline q Thursday 16 February 2012 23: 59 (FIRM Deadline!) q If you submit your work late, you fail one submission opportunity q Remember Lab 2 does not need to be aproved for the Exam, but needs to be aproved for doing a project assignment CBSE graduate course Page 35,

The assignment q In 2 exercices Modelling behavior of simple Touch-Lamp system Modeling behavior The assignment q In 2 exercices Modelling behavior of simple Touch-Lamp system Modeling behavior of an abstracted version of a Baking Conveyor System CBSE graduate course Page 36,

Exercise 1 - Touch Lamp System q Lamp has two modes of light operation Exercise 1 - Touch Lamp System q Lamp has two modes of light operation Dim – 1 touch Bright – 2 successive touches within 15 seconds CBSE graduate course Page 37,

Exercise 2 - Industrial Baking Conveyor System q Main parts: Oven Conveyor Belt CBSE Exercise 2 - Industrial Baking Conveyor System q Main parts: Oven Conveyor Belt CBSE graduate course Orechstrator Page 38,

Usage Scenario Ensure that the conveyor belt and the oven are working together Orchestrator Usage Scenario Ensure that the conveyor belt and the oven are working together Orchestrator Oven Conveyor Belt Carries the cookies from point A to point B in passing by the oven Oven monitors the temperature and humidity and determines 1. if the heat should be increased or decreased and 2. displays the status of the cookies CBSE graduate course Page 39,

Exercise 1 and 2 - What you need to do? q To model the Exercise 1 and 2 - What you need to do? q To model the behaviour of the system components Lamp component for Exercise 1 Orchestrator, Oven and Conveyor Belt component for Exercise 2 q Tips Start by understanding REMES think about different types of modes that exist in REMES Use pen and paper before using REMES editor Once you are sure of your solution. Model it in the REMES editor CBSE graduate course Page 40,

Questions ? ? ? CBSE graduate course Page 41, Questions ? ? ? CBSE graduate course Page 41,