1 / 25

A Context Analysis Method for Constructing Reliable Embedded Systems

MISE 200 8. A Context Analysis Method for Constructing Reliable Embedded Systems. Naoyasu Ubayashi , Toshiki Seto , Hirotoshi Kanagawa, Susumu Taniguchi, and Jun Yoshida (Kyushu Institute of Technology) Takeshi Sumi and Masayuki Hirayama (Toshiba) May 11, 2007.

holli
Download Presentation

A Context Analysis Method for Constructing Reliable Embedded Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MISE 2008 A Context Analysis Methodfor Constructing Reliable Embedded Systems NaoyasuUbayashi, ToshikiSeto, Hirotoshi Kanagawa, Susumu Taniguchi, and Jun Yoshida (Kyushu Institute of Technology) Takeshi Sumi and Masayuki Hirayama (Toshiba) May 11, 2007

  2. Contexts in embedded systems • Unexpected behavior might emerge in a system if a developer does not recognize any possible conflicting combinations between the system and contexts. • It is difficult to decide the boundary of contexts that should be taken into account: which contexts should be included as the targets of requirements analysis. • Many embedded systems not only affect their contexts through actuators but also are affected by their contexts through sensors. • However, requirements analysis is mainly conducted from the viewpoint of system functions, and contexts are only roughly analyzed. Association ? Boundary ? Embedded System Frame Problem ! Actuator Sensor Contexts

  3. Today’s my talk • CAMEmb is a systematic approach to • exploring context boundary avoiding the frame problem, • verifying whether requirements can be satisfied under the expected contexts, • changing requirements or context boundary if not satisfied. • We propose a context-dependent requirements analysis method called CAMEmb (Context Analysis Method for Embedded systems). UML Profile for Context Analysis Formal Methods ( VDM++ )

  4. Outline • Motivation • CAMEmb • MDD based on CAMEmb • Conclusions and Future work

  5. 1. Motivation

  6. Example: an electric pot However, faults may occur if the expected contexts are changed. ---for example, the circumstance of the low air pressure pot thermostat liquid water level sensor context heater system Boil: () ==> () Boil() == while thermostat.GetTemperature() < 100.0 do heater.On(); • 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.

  7. Should air pressure be taken into account ? Boundary Non trivial ! • This depends on user requirements. • However, it is important to check the consistency if we decide that air pressure must be taken into account. • It is also important to check the impact when air pressure is included in the expected contexts. Air Pressure Air Pressure ? ? pot thermostat Liquid water level sensor system heater context

  8. Problems to be tackled • The boundary of contexts should be determined from user requirements. • We must take into account the influence that occurs in the cooperation among a target system and contexts within the boundary. • We must also detect defects by recognizing any possible conflicting combinations among the system and contexts. Systematic way for context analysis

  9. 2. CAMEmb Context Analysis Method for Embedded systems

  10. CAMEmb Overview UML Profile for Context Analysis Formal Methods ( VDM++ )

  11. Context modeling UML profile for context analysis Steps for exploring boundary Contexts that do not change the values are ignored ! The frame problem is avoided ! Context elements (value object) observed or controlled directly by a sensor or an actuator are extracted. Impact factors that affect the states (values) of these context elements are extracted using guide words. Factor that determines the upper limit Sensor cannot observe original data Factor related to a specific value Initial Boundary Final Boundary

  12. Translation to VDM++

  13. VDM++ Specification class Software instance variables heater : Heater; thermostat : Thermostat; liquid_level_sensor: LiquidLevelSensor; operations public Setup: RealWorld ==> () Setup(realworld) == (heater := new Heater(); heater.Setup(realworld); thermostat := new Thermostat(); thermostat.Setup(realworld); liquid_level_sensor:= new LiquidLevelSensor(); liquid_level_sensor.Setup(realworld); ); public Boil: () ==> () Boil() == while thermostat.GetTemperature() <= 100.0 and liquid_level_sensor.IsOn() = true do heater.On() pre liquid_level_sensor.IsOn() = true post liquid_level_sensor.IsOn() = true; end Software Constraints From user requirements (water should not be empty)

  14. Context Validation Formal Methods ( VDM++ ) Lightweight Formal Methods

  15. VDM++ test execution Specification can be validated by VDM++ test execution System Specification Context A Normal Air pressure CONTEXT-atmospheric-air-pressureplace-normal CONTEXT-liquid-water Context B Low Air Pressure CONTEXT-atmospheric-air-pressureplace-low CONTEXT-liquid-water

  16. Results of test execution Error ! We must reconsider whether air pressure should be included in the expected contexts.

  17. Requirements refinement Boundary Model-based testing based on lightweight formal methods is effective for exploring context boundary and refining requirements. Air Pressure Air Pressure Reconsider Hardware Requirements Out of Scope pot Fixed to 1.0 ATM thermistor Liquid water level sensor system heater context

  18. 3. MDD based on CAMEmb

  19. AspectM metamodel AspectM model DSL construction using AspectM Meta level reify modify the AspectM metamodel protocols extension point MMAP Editing-time structural reflection Base level reflect introduce a new kind of domain-specific model element new model element [Ubayashi 2007]

  20. Model editor for CAMEmb Context model of a line trace car

  21. Model transformation Analysis Model Design Model Code Context Model Java System Model Total code size: 223 LOC Automatic generated code size: 174 LOC 78 %

  22. 4. Conclusions and Future work

  23. Conclusions • A context-dependent requirements analysis method is proposed. • Our approach is a new kind of MDD that explicitly takes into account the existence of contexts.

  24. Future work --- CAMEmb and Problem Frame • In problem frames, relations between a machine (a system to be developed) and the real-world are explicitly described. • We are now exploring the possibility of integrating CAMEmbwith problem frames. • We found that there was the similarity between our UML profile and frame patterns.

  25. Context analysis with problem frames Required Behavior Frame Control Machine Controlled Domain Required Behavior Trace Controller (TC) AA Body (BD) a r Line Trace On if ground color is black b Transformation Frame Output AA Line Position (LP) Transformation Machine X X 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} c Line recognition Controller (LC) AA Light Sensor (LS) Input d

More Related