350 likes | 461 Views
Lecture 4 Component Behavioral Modeling with REMES. Agenda. Background and Motivation REMES REMES Editor Lab3. Background and Motivation. Embedded systems microprocessor-based systems that are built (embedded) in a larger system. Background and Motivation.
E N D
Lecture 4 Component Behavioral Modelingwith REMES CBSE graduate course
Agenda • Background and Motivation • REMES • REMES Editor • Lab3 CBSE graduate course
Background and Motivation • Embedded systems • microprocessor-based systems that are built (embedded) in a larger system
Background and Motivation • 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 • resource constrained • manage the growing complexity of software • Component Based Software Engineering • promising approach to handle complexity • constructs systems by reusing existing components • not yet established approach for ES design
Background and Motivation • Challenge • construct component model for ES design enriched with behavioral information • prediction methods should be available already at early design stage • bottom-up resourceanalysiscan guide the selection of components • top-down resourceanalysiscouldhelp in correctdecomposition of system’sspecification
C2 C3 Cn {RC2} {RC3} {RCn} Repository {RB} > {RC1} B {RB {RC1} C1
REMES behavioural language CBSE graduate course
Classification of resources • Resourceconsumption-anotated with c; • accumulatedresourceusage up to some time point • c` - rate of consumption over time • Classification of resources: • discrete or continuousnature • referable or non-referable
REMES – ResourceModel for Embedded Systems • Behavioral model intended to describe the resource-wise behavior of interacting embedded components • Behavior of a component is a mode • Modes • atomic • composite CBSE graduate course
REMES - modes • Mode M contains • Control points (entry-, exit-, init-, write points) • Variables (boolean, natural, integer, array, clock, history variables) • global • local • Actions • discrete A (guard, body) • delay/timed • Constraints (invariants) • Non-lazy modes • Conditional connectors • Nested submodes main C submode3 submode1 submode2 Entry Point Exit Point CBSE graduate course
Example1- internal behaviour of Control component in REMES Control Credentials t<=30, cpu’=2 login=userdata mem+=30, t:=0 Init logged==false C Entry Exit turnoff==true Air_conditioning logged==true cpu’=10 eng’=2 Initialization resource mem:TA; resource cpu:TC; resource eng:TC; t:clock
Analysing REMES based ES • REMES modes have access to R1,…, Rn • Goal • analyzevarious scenarios of system’sresourceusage • Analysis model for REMES • rtot total accumulated resource consumption for R1,…, Rn • r1,…, rnaccumulated consumption of R1,…, Rn • w1,…, wnrelative importance of r1,…, rn
Analysing REMES based ES • Translating REMES into Priced timed automata or Multipricedtimed automata • TA + costs on locations and edges • mechanized translation • notation of a resource consumption as a cost • c1,…, cn cost variables for r1,…, rn • w1,…, wnrelative importance of c1,…, cn • properties specified in WCTL REMES: A Resource Model for Embedded Systems
Analysing REMES based ES Model Checker (Uppaal Cora) yes PTA / MPTA resource-aware property error trace Assumptions from hardware abstraction: Memory budget, Bandwidth, Cost model
Analysing REMES based ES ProCom REMES ProCom Model REMES Model Behavioral modeling • Architecturalmodeling Integrated through Attribute Framework • Managing and integrating properties Formal analysis
Connecting ProCom and REMES • ProSavelevel • trigger port REMES boolean variables • data port REMES data variable • ProSys 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
Example2- Temperature control system • core is heated at some given rate • coretemperatureshould be maintainedbetween a minimum and a maximum • when max temp. is reached, designed to be cooleddown by insertingone of twoexistingrods , which cool at different rates R1 or R2 • a rod is availableagain after T time units A Resource-Aware Component Model for Embedded Systems
Example2- Temperature control system • TCS • Model with 3 components • REMES mode for eachcomponent • Assumememory, energy and cpuusage
REMES Editor CBSE graduate course
REMES language elements • Composite mode • Compartments for declaration variables, resources, constants CBSE graduate course
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
REMES language elements • Input and output • Init-, entry-, exit-, write – points(local exit points not presented here) CBSE graduate course
REMES language elements • Control flow • Edges with guards and actions • Conditional connectors CBSE graduate course
Introduction to Lab3 CBSE graduate course
Objectives • 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 REMES editor CBSE graduate course
Expected Output • Same system as for Lab1 and Lab2 • Archive files only (no folder) named ”Lab3X_Y.zip” where X=your name (and Y=name of your teammate if you work in pair). • 1 report explaining your design choices and calculation results • The Project folder for your system • Individual work (or in pair) • But nothing else! • Both have to submit the archive file • Do not copy solutions from others ! Advanced CBSE
Deadline • Friday 11February 2011 23:59 (FIRM Deadline!) • If you submit your work late, you fail one submission opportunity • Remember • Lab3 does not need to be aproved for Exam 1, but needs to be aproved for doing a project assignment CBSE graduate course
The assignment • In 2 exercices • Modelling behavior of simple Touch-Lamp system • Modeling behavior of an abstracted version of a Baking Conveyor System CBSE graduate course
Exercise 1- Touch Lamp System • Lamp has two modes of light operation • Dim – 1 touch • Bright – 2 successive touches within 15 seconds CBSE graduate course
Exercise 2- Industrial Baking Conveyor System • Main parts: • Oven • Conveyor Belt • Orechstrator CBSE graduate course
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
Exercise 1 and 2- What you need to do? • To model the behaviour of the system components • Lamp component for Exercise 1 • Orchestrator, Oven and Conveyor Belt component for Exercise 2 • Tips • Start by understanding REMES • think about different type of modes that exist in REMES • Use pen and paper before using REMES editor • Once you are sure of your solution. Model it in REMES editor CBSE graduate course
Questions ?!!? Questions ?!? CBSE graduate course