lecture 4 component behavioral modeling with remes
DESCRIPTION
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. - PowerPoint PPT PresentationTRANSCRIPT
Page 1, CBSE graduate course
Lecture 4 Lecture 4
Component Behavioral ModelingComponent Behavioral Modeling
with REMES with REMES
AgendaAgenda
Background and Motivation
REMES
REMES Editor
Lab3
Page 2, CBSE graduate course
23-04-21
3
Embedded systems microprocessor-based systems that are built
(embedded) in a larger system
Background and Motivation
23-04-21
4
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
23-04-21
Challenge construct component model for ES design enriched with
behavioral information
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
Background and Motivation
C2
{RC2}
Cn
{RCn}
{RB} > {RC1}
23-04-216
C1
{RC1}B{RB
RepositoryRepository
REMES behavioural languageREMES behavioural language
Page 7, CBSE graduate course
Resource Class Characteristics
A(memory)
discrete referable
B(CPU, bandwidth)
discrete non-referable
C(CPU, energy, bandwidth)
continuous non-referable
23-04-21
8
0c
0c
Znnc ,
Resource consumption- anotated with c;
accumulated resource usage up to some time point
c` - rate of consumption over time
Classification of resources: discrete or continuous nature
referable or non-referable
Classification of resources
REMES – Resource Model for Embedded SystemsREMES – Resource Model for Embedded Systems
Page 9, CBSE graduate course
Behavioral model intended to describe the resource-wise behavior of interacting embedded components
Behavior of a component is a mode
Modes atomic
composite
REMES - modesREMES - modes
Page 10, CBSE graduate course
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
Entry Point
Exit Point
C
main
submode1 submode2
submode3
23-04-21
11
C
Control
Init
Entry
Exit
login=userdata
cpu’=2
t<=30,
Credentials
Air_conditioning
Example1Example1- - internal behaviour of Control component in REMESinternal behaviour of Control component in REMES
logged==true
logged==false
cpu’=10eng’=2
mem+=30, t:=0
Initializationresource mem:TA; resource cpu:TC; resource eng:TC; t:clock
turnoff==tru
e
23-04-21
12
Analysing REMES based ESAnalysing REMES based ES
REMES modes have access to R1,…, Rn
Goal
analyze various scenarios of system’s resource usage
Analysis model for REMES
rtot total accumulated resource consumption for R1,…, Rn
r1,…, rn accumulated consumption of R1,…, Rn
w1,…, wn relative importance of r1,…, rn
nndeftot rwrwrwr 2211
23-04-21REMES: A Resource Model for Embedded Systems13
Translating REMES into Priced timed automata or Multi priced timed 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,…, wn relative importance of c1,…, cn
properties specified in WCTL
nn cwcwcwcost 2211
Analysing REMES based ESAnalysing REMES based ES
23-04-21
14
Model Checker(Uppaal Cora)
PTA / MPTA
resource-aware property
error trace
yes
Assumptions from hardware abstraction:
Memory budget, Bandwidth, Cost model
vEF ntcos
Analysing REMES based ESAnalysing REMES based ES
23-04-21
15
REMESProCom
Attribute Framework
Architectural modeling
Behavioral
modeling
Managing and integrating properties
ProCom Model
Integrated through
REMES Model
Formal analysis
Analysing REMES based ESAnalysing REMES based ES
23-04-21
16
ProSave level• 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
Connecting ProCom and REMESConnecting ProCom and REMES
23-04-21A Resource-Aware Component Model for Embedded Systems
Example2Example2- - Temperature control systemTemperature 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 R1 or R2
a rod is available again after T time units
23-04-21
TCS Model with 3 components
REMES mode for each component
Assume memory, energy and cpu usage
Example2Example2- - Temperature control systemTemperature control system
1919
REMES EditorREMES Editor
Page 20, CBSE graduate course
Page 21, CBSE graduate course
REMES language elementsREMES language elements
Page 22, CBSE graduate course
Composite mode Compartments for declaration variables, resources, constants
REMES language elementsREMES language elements
Page 23, CBSE graduate course
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) .
REMES language elementsREMES language elements
Page 24, CBSE graduate course
Input and output Init-, entry-, exit-, write – points (local exit points not presented here)
Page 25, CBSE graduate course
REMES language elementsREMES language elements
Control flow
Edges with guards and actions Conditional connectors
Introduction to Lab3Introduction to Lab3
Page 26, CBSE graduate course
Page 27, CBSE graduate course
ObjectivesObjectives 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
Expected OutputExpected 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 !
Page 28, April 21, 2023Advanced CBSE
DeadlineDeadline
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
Page 29, CBSE graduate course
The assignmentThe assignment
In 2 exercices
Modelling behavior of simple Touch-Lamp system
Modeling behavior of an abstracted version of a Baking Conveyor System
Page 30, CBSE graduate course
Exercise 1- Touch Lamp System Exercise 1- Touch Lamp System
Page 31, CBSE graduate course
Lamp has two modes of light Lamp has two modes of light operationoperation
Dim – 1 touch
Bright – 2 successive touches within 15 seconds
Exercise 2- Industrial Baking Conveyor System Exercise 2- Industrial Baking Conveyor System
Page 32, CBSE graduate course
Main parts:Main parts:
Oven
Conveyor Belt
Orechstrator
Usage ScenarioUsage Scenario
Page 33, CBSE graduate course
Orchestrator
OvenConveyor Belt
Oven monitors the temperature and humidity and Oven monitors the temperature and humidity and determines 1. if the heat should be increased or determines 1. if the heat should be increased or decreased and 2. displays the status of the cookiesdecreased and 2. displays the status of the cookies
Carries the cookies Carries the cookies from point A to point B from point A to point B in passing by the ovenin passing by the oven
Ensure that the conveyor belt Ensure that the conveyor belt and the oven are working and the oven are working togethertogether
Exercise 1 and 2- What you need to do?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
Page 34, CBSE graduate course
Questions ?!?Questions ?!?
Page 35, CBSE graduate course
Questions ?!!?Questions ?!!?