Lecture 4 Component Behavioral Modeling with REMES - PowerPoint PPT Presentation

1 / 41
About This Presentation
Title:

Lecture 4 Component Behavioral Modeling with REMES

Description:

Lecture 4 Component Behavioral Modeling with REMES Page *, CBSE graduate course Embedded systems are everywhere around us. It is a computer that does not look like a ... – PowerPoint PPT presentation

Number of Views:146
Avg rating:3.0/5.0
Slides: 42
Provided by: MagnusL5
Category:

less

Transcript and Presenter's Notes

Title: Lecture 4 Component Behavioral Modeling with REMES


1
Lecture 4 Component Behavioral Modelingwith
REMES
2
Agenda
  • Background and Motivation
  • REMES
  • Connecting REMES and ProCom
  • REMES Editor
  • Lab2

3
Background and Motivation
  • Embedded systems
  • Computer that does not look like computer
  • Part of a larger system or machine
  • Typical requirements
  • Low cost
  • Constantly react to changes in the environment
  • Dependability
  • Compute certain results in real-time without
    delay
  • Limited available resources
  • Manage the growing complexity of software
  • Need for solutions that
  • Alleviate software complexity
  • Ensure predictable system behavior

CBSE graduate course
3
4
Background and Motivation
RB gt RC1
Repository
5
Background and Motivation
  • 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 systems specification

6
REMES behavioural language
7
Classification of resources
  • Resource consumption- annotated 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

Resource Class Characteristics
A (memory) discrete c0 or cinf referable
B (CPU, bandwidth) discrete c0 or cinf non-referable
C (CPU, energy) continuous cn, n in Z - -inf,inf non-referable
8
REMES REsource Model 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

9
REMES - modes
  • Mode M (SM, V, In, Out, E, RC, Inv, CC)
  • Control points In (Init point, Entry point),
    Out (Write point, Exit point)
  • Variables (V) (boolean, natural, integer, array,
    clock, history variables)
  • Actions over edges (E)
  • discrete A (guard, body)
  • delay/timed
  • Constraints
  • set of invariants (Inv)
  • set of res. diff equations (RC)
  • Conditional connectors (CC)
  • Nested submodes (SM)

M
C
submode3
(guard, body)
Entry Point
submode1
submode2
Inv1 RC1
Init Point
Exit Point
Write Point
10
Example1- internal behaviour of Control component
in REMES
Control
Credentials
tlt30,
cpu2
loginuserdata
mem30, t0
Init
loggedfalse
C
Entry
Exit
turnofftrue
Air_conditioning
loggedtrue
cpu10 eng2
Initialization resource memTA resource
cpuTC resource engTC tclock
11
Analysing REMES based ES
  • REMES modes have access to R1,, Rn
  • Goal
  • analyze various scenarios of systems 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

12
Analysing REMES based ES
  • Translating REMES into Priced timed automata or
    Multi PTA
  • TA costs on locations and edges
  • REMES atomic submode ? PTA location(s)
  • REMES discrete edge ? PTA edge
  • REMES discrete step ? PTA
    transition
  • REMES conditional connectors are removed
  • Automated translation
  • Types of analysis
  • Feasibility
  • Optimal/ worst-case resource consumption
  • Trade-off analysis

Page 12,
13
Analysing REMES based ES
  • PTA waits in location Start for system startup
  • Init, Entry, Write and Exit locations created
  • Transformation of Submode2
  • Internal execution rounds - PTA edge connecting
    locations Write and Submode1
  • Synchronization with other components

Page 13,
14
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
15
Analysing REMES based ES
REMES model of component behavior
ProCom component
Attribute Framework
  • Managing and integrating properties
  • Each ProCom component has an attribute with a
    complex value
  • Reference to a REMES model file
  • Reference to a mapping file between ProCom and
    REMES interfaces

Page 15,
CBSE graduate course
16
Connecting ProCom and REMES
  • ProSave level
  • trigger port ? REMES interface boolean
    variable
  • data port ? REMES interface 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

17
Example2- 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 R1 or R2
  • a rod is available again after T time units

18
Example2- Temperature control system
  • Model of the architecture and behaviour
  • System modeled with 3 ProSave components
  • Each component has a behavior depicted by a REMES
    mode
  • Assume memory and cpu usage
  • Formal analysis
  • ProCom REMES ? PTA

19
Example2- Temperature control system
20
Example2- Temperature control system
21
Example2- Temperature control system Analysis
in Uppaal
Just for illustration!
22
Questions ???
23
REMES tool-chain
24
REMES tool-chain
  • 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 for
    formal analysis and UppaalLite editor

CBSE graduate course
25
(No Transcript)
26
REMES editor
27
(No Transcript)
28
REMES language elements
?

?
  • Composite mode ?
  • Compartments ? for declaration variables,
    resources, constants

29
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)
  • .

30
REMES language elements
?

?
?
?
  • Input and output ?
  • Init-, entry-, exit-, write points (local exit
    points not presented here)

31
REMES language elements

?
?
?
?
?
?
  • Control flow
  • Edges with guards and actions ?
  • Conditional connectors ?

32
Introduction to Lab2
33
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 the REMES editor

34
Expected Output
  • Same system as for Lab1
  • Archive files only (no folder) named
    Lab2_X_Y.zip where X_Yfirst student
    name_second student name
  • 1 report explaining your design choices
  • The Project folder for your system
  • Individual work/ group of two students
  • And nothing else!
  • Do not copy solutions from others !

35
Deadline
  • Thursday 21 February 2013 2359 (FIRM Deadline!)
  • If you submit your work late, you fail one
    submission opportunity
  • Remember
  • Lab2 needs to be aproved for passing the course

36
The assignment
  • In 2 exercices
  • Modelling behavior of simple Touch-Lamp system
  • Modeling behavior of an abstracted version of a
    Baking Conveyor System

37
Exercise 1- Touch Lamp System
  • Lamp has two modes of light operation
  • Dim 1 touch
  • Bright 2 successive touches within 15 sec

38
Exercise 2- Industrial Baking Conveyor System
  • Main parts
  • Oven
  • Conveyor Belt
  • Orchestrator

39
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
40
Exercise 1 and 2- What do 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 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

41
Questions ???
Write a Comment
User Comments (0)
About PowerShow.com