naoyasu ubayashi (kyushu university, japan) yasutaka kamei(kyushu university, japan)

28
A Context Analysis Method for Embedded Systems --- Exploring a Requirement Boundary between a System and Its Context Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei (Kyushu University, Japan) Masayuki Hirayama (Nihon University, Japan) Tetsuo Tamai (University of Tokyo, Japan) September 1, 2011

Upload: alan-schroeder

Post on 04-Jan-2016

38 views

Category:

Documents


3 download

DESCRIPTION

A Context Analysis Method for Embedded Systems --- Exploring a Requirement Boundary between a System and Its Context. Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan) Masayuki Hirayama(Nihon University, Japan) - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

A Context Analysis Method for Embedded Systems--- Exploring a Requirement Boundary between a System and Its Context

Naoyasu Ubayashi (Kyushu University, Japan)Yasutaka Kamei (Kyushu University, Japan)Masayuki Hirayama (Nihon University, Japan)Tetsuo Tamai (University of Tokyo, Japan)

September 1, 2011

Page 2: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

2

Overview -- Motivation

Many embedded systems not only affect their context through actuators but also are affected by their context through sensors.

It is important to provide a context analysis method for constructing reliable embedded systems.

Context

Boundary ?

EmbeddedSystem

Actuator

Sensor

FrameProblem !

However, it is difficult to decide the boundary of the context that should be taken into account: which context element should be included as the targets of requirements analysis.

Page 3: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

3

Our approach

CAMEmb (Context Analysis Method for Embedded systems)

Only the value-context elements are extracted as the associated context elements. We can explore only a sequence of context

elements affecting the data value observed or controlled by sensors/actuators.

Other context elements not affecting the system observation and control are not taken into account because these context elements do not affect the system behavior.

Page 4: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

Contribution 1:CAMEmb

Guide Words for Context Analysis

4

Page 5: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

Contribution 2:Model transformation

5

ContextAnalysis Model

SystemAnalysisModel

Java

RequirementsAnalysis Model Design Model Code

Model-Driven Requirements Engineering

Page 6: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

6

Outline

Motivation

CAMEmb

CAMEmb-based MDD

Discussion

Conclusions

Page 7: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

Motivation

7

Page 8: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

Example: an electric pot

8

water level sensor

heater

thermostat liquid

context

system

pot

The pot controls the water temperature by turning on or off the heater.

The pot changes its mode to the heat-retaining mode when the temperature becomes 100 Celsius.

The pot observes the volume from the water level.

Boil: () ==> ()Boil() == while thermostat.GetTemperature() < 100 do heater.On();

However, faults may occurbecause the expected context is not clear.

---for example, the circumstance of the low air pressure. * Boiling point is below 100 Celsius. * Water evaporates and finally its volume will be empty. * There may be climbers who use a pot up on high mountains where the air pressure is low.

Requirements

Should air pressure be taken into account ?

Context Boundary

Air PressureAir Pressure

Inside Outside

?

Page 9: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

Problems to be tackled

The boundary of the context should be determined from stakeholders’ requirements. If we consider climbers as customers of the pot,

we have to admit that we failed in eliciting requirements.

It is not easy to define the context boundary even if the target users of the system are determined. A developer will be faced with the frame

problem because there are unlimited context elements in the real world.

9

McCarthy, J. and Hayes, P. J.: Some Philosophical Problems from the Standpoint of Artificial Intelligence, Machine Intelligence, 4, pp.463-502, 1969.

Page 10: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

10

Our approach

We provide a systematic way to relax the frame problem by providing the followings. CAMEmb

procedure for exploring the context boundary. validation method for detecting the conflicts

between system and its context. CAMEmb-based MDD (Model-Driven

Development) tool support for transforming system and

context models into the design model that takes into account the influence of the context within the explored boundary.

Page 11: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

CAMEmbContext Analysis Method for Embedded systems

11

Page 12: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

12

CAMEmb Overview

Formal Methods( VDM++ )

UML Profile for Context Analysis

+Guide Words

CAMEmb is applied after system requirements analysis

Page 13: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

Context analysis using guide words

Guide Words for Context Analysis

Leveson, N. G.: Safeware: System Safety and Computers,Addison-Wesley Publishing Company, 1995.

13

Page 14: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

Step 1:Extract directly observed or controlled context elements

14

Class<<Sensor>><<Actuator>><<Context>>

SystemAnalysisModel

ContextAnalysisValue-context element

(value object)

UML Profilefor

Context Analysis

Association<<Observe>><<Control>>

Page 15: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

Step 2 [Initial boundary]: Extract indirectly observed or controlled context elements

15

Guide word

The initial context boundary is an ideal boundary in which system'sobserving and controlling are not affected by other factors.

Association<<Transfer>>

Page 16: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

Step 3 [intermediate boundary]:Extract impact factors using guide words

16

Guide word

Association<<Affect>>

Context elements that do not change the values are

ignored !The frame problem can

be avoided !

Page 17: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

Step 4 [Final boundary]:Determine the context boundary

17

Guide word

Association<<Affect>>

Focus onvalue-context elements

Page 18: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

CAMEmb-based MDDModel-Driven Requirements Engineering for Context Analysis

18

Page 19: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

CAMEmbModeler

19

Context model of a line trace car

•Model Editor•Model Compiler•Code Generator

DSL for Context Analysis

Ubayashi, N., Otsubo, G., Noda, K., and Yoshida, J.:An Extensible Aspect-oriented Modeling Environment, CAiSE 2009, pp.17-31, 2009.

Page 20: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

Model Compiler + Code Generator

20

ContextAnalysis Model

SystemAnalysisModel

Java

RequirementsAnalysis Model Design Model Code

Model-Driven Requirements Engineering

Page 21: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

Mapping betweencontext model and design model

21

Context AnalysisModel

Design Model(Module structure)

Recognition Goal (logical)

Initial context boundary

Sensed Data(physical)

logical

physical

RecognitionPath

SensorThe context elements in a context model show the process of context recognition.

Line-position recognition path:

Light Sensor -> Reflected Light (light volume) -> Ground Color (black or white) -> On or outside a line

We can obtain a design structure by reversing the recognition path.

The top module of the design hierarchy corresponds to a context element existing within the initial context boundary.

The context boundary determinesthe design structure.

Page 22: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

Discussion

22

Page 23: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

23

Problem frames

A context diagram in the problem frames approach describes problem domains, a machine, and connections among them.

The notion of context in CAMEmb corresponds to the real world in the problem frame.

Jackson, M: Problem Frame: Analyzing and Structuring Software Development Problems,Addison-Wesley, 2001.

Page 24: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

Context analysis with problem frames

24

TraceController( TC)

AABody( BD)

LineTrace

C

a: TC! { Right, Left} BD! { Line detected, Linemissed}b: LP! { On, Off}c: LC! { Ground Color}d: LS! { Reflected Light}r: BD! { Run, Return to Course}

r

b

ControlMachine

ControlledDomain

RequiredBehavior

AALight

Sensor( LS)X

Line recognitionController

(LC)

AALine

Position( LP)X

TransformationMachine

Output

Input

Required Behavior Frame

Transformation Frame

c

a

d

On if ground color is black

Page 25: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

CAMEmb vs. Problem frames

We consider that it is effective to apply CAMEmb after problem analysis is done.

The problem frames approach is strong in analysing problems in the real world.

CAMEmb provides a systematic way for determining the context boundary and refining the real world model cut off by the boundary into a design model.

25

Page 26: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

Conclusions

26

Page 27: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

27

Conclusions

We proposed CAMEmb, a context-dependent requirements analysis method.

The idea of value-context elements and guide words plays an important role.

We believe that the essential idea of CAMEmb can be applied to other kinds of context such as security.

As the next step, we plan to apply CAMEmb to such an application domain.

Page 28: Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei(Kyushu University, Japan)

28

Thank you for your attention.