20
VERTAF: An Application VERTAF: An Application Framework for Design and Framework for Design and Verification of Embedded Verification of Embedded Real-Time Software Real-Time Software Pao-Ann Hsiung, Shang-Wei Lin, Chih- Pao-Ann Hsiung, Shang-Wei Lin, Chih- Hao Tseng, Trong-Yen Lee, Jih-Ming Fu Hao Tseng, Trong-Yen Lee, Jih-Ming Fu and Win-Bin See and Win-Bin See

VERTAF: An Application Framework for Design and Verification of Embedded Real-Time Software Pao-Ann Hsiung, Shang-Wei Lin, Chih-Hao Tseng, Trong-Yen Lee,

  • View
    219

  • Download
    0

Embed Size (px)

Citation preview

Page 1: VERTAF: An Application Framework for Design and Verification of Embedded Real-Time Software Pao-Ann Hsiung, Shang-Wei Lin, Chih-Hao Tseng, Trong-Yen Lee,

VERTAF: An Application Framework for VERTAF: An Application Framework for Design and Verification of Embedded Design and Verification of Embedded

Real-Time Software Real-Time Software

Pao-Ann Hsiung, Shang-Wei Lin, Chih-Hao Tseng, Pao-Ann Hsiung, Shang-Wei Lin, Chih-Hao Tseng, Trong-Yen Lee, Jih-Ming Fu and Win-Bin SeeTrong-Yen Lee, Jih-Ming Fu and Win-Bin See

Page 2: VERTAF: An Application Framework for Design and Verification of Embedded Real-Time Software Pao-Ann Hsiung, Shang-Wei Lin, Chih-Hao Tseng, Trong-Yen Lee,

ContentsContents

IntroductionIntroduction

Design and Verification FlowDesign and Verification Flow

- UML Modeling- UML Modeling

- Real-time Software Scheduling- Real-time Software Scheduling

- Formal Verification- Formal Verification

- Component Mapping- Component Mapping

- Code generation- Code generation

VERTAF ComponentsVERTAF Components

Experimental ResultsExperimental Results

ConclusionConclusion

Page 3: VERTAF: An Application Framework for Design and Verification of Embedded Real-Time Software Pao-Ann Hsiung, Shang-Wei Lin, Chih-Hao Tseng, Trong-Yen Lee,

IntroductionIntroduction

Available applicationsAvailable applications

- poor integration of functional & non - functional - poor integration of functional & non - functional requirementsrequirements

New designNew design

- accelerate the real-time embedded software - accelerate the real-time embedded software constructionconstruction

- component reuse, formal synthesis and formal - component reuse, formal synthesis and formal verificationverification

Page 4: VERTAF: An Application Framework for Design and Verification of Embedded Real-Time Software Pao-Ann Hsiung, Shang-Wei Lin, Chih-Hao Tseng, Trong-Yen Lee,

Designing an embedded systemDesigning an embedded system

Model the classes requiredModel the classes required

Generate code based on those modelsGenerate code based on those models

For real-time systemsFor real-time systems

-temporal constraints-temporal constraints

Formal verificationFormal verification

-performance-performance

-reliability-reliability

-time constraints-time constraints

Page 5: VERTAF: An Application Framework for Design and Verification of Embedded Real-Time Software Pao-Ann Hsiung, Shang-Wei Lin, Chih-Hao Tseng, Trong-Yen Lee,

Features of this FrameworkFeatures of this Framework

Formal Modeling:Formal Modeling:

- Well-defined UML semantics- Well-defined UML semantics

Formal Synthesis:Formal Synthesis:

- Guarantees satisfaction of temporal & spatial - Guarantees satisfaction of temporal & spatial constraintsconstraints

Formal Verification:Formal Verification:

- checks if system satisfies user-given or system-defined - checks if system satisfies user-given or system-defined generic propertiesgeneric properties

Code Generation:Code Generation:

- produce efficient portable code- produce efficient portable code

Page 6: VERTAF: An Application Framework for Design and Verification of Embedded Real-Time Software Pao-Ann Hsiung, Shang-Wei Lin, Chih-Hao Tseng, Trong-Yen Lee,

Design and Verification FlowDesign and Verification Flow

Software synthesis has two phasesSoftware synthesis has two phases

- - front-end phase (m/c independent)front-end phase (m/c independent)

-- UML modeling phase-- UML modeling phase

-- Scheduling phase-- Scheduling phase

-- Formal verification phase-- Formal verification phase

- - back-end phase (m/c dependent)back-end phase (m/c dependent)

-- Component mapping phase-- Component mapping phase

-- Code generation phase-- Code generation phase

Page 7: VERTAF: An Application Framework for Design and Verification of Embedded Real-Time Software Pao-Ann Hsiung, Shang-Wei Lin, Chih-Hao Tseng, Trong-Yen Lee,
Page 8: VERTAF: An Application Framework for Design and Verification of Embedded Real-Time Software Pao-Ann Hsiung, Shang-Wei Lin, Chih-Hao Tseng, Trong-Yen Lee,

UML ModelingUML Modeling

Class DiagramsClass Diagrams

- - introduce the deployment relationshipintroduce the deployment relationship

- two types of classes- two types of classes

software classessoftware classes

--- specified from scratch by the designer--- specified from scratch by the designer

--- reuse a component from the libraries--- reuse a component from the libraries

hardware classeshardware classes

--- Supported hardware component--- Supported hardware component

Page 9: VERTAF: An Application Framework for Design and Verification of Embedded Real-Time Software Pao-Ann Hsiung, Shang-Wei Lin, Chih-Hao Tseng, Trong-Yen Lee,

Timed StatechartsTimed Statecharts

Method TypesMethod Types

- event-triggered - event-triggered

- time-triggered- time-triggered

-- deadlines, period-- deadlines, period

-- start, stop and restart-- start, stop and restart

Page 10: VERTAF: An Application Framework for Design and Verification of Embedded Real-Time Software Pao-Ann Hsiung, Shang-Wei Lin, Chih-Hao Tseng, Trong-Yen Lee,

Extended Sequence DiagramsExtended Sequence Diagrams

Used for scheduling different tasks performed by Used for scheduling different tasks performed by objectsobjects

Show how a user should use the systemShow how a user should use the system Added state-markers:Added state-markers:

- They relate the sequence diagram to the corresponding - They relate the sequence diagram to the corresponding state in the timed state chartstate in the timed state chart

Page 11: VERTAF: An Application Framework for Design and Verification of Embedded Real-Time Software Pao-Ann Hsiung, Shang-Wei Lin, Chih-Hao Tseng, Trong-Yen Lee,
Page 12: VERTAF: An Application Framework for Design and Verification of Embedded Real-Time Software Pao-Ann Hsiung, Shang-Wei Lin, Chih-Hao Tseng, Trong-Yen Lee,

SchedulingScheduling

Generate Petri nets from UML diagramsGenerate Petri nets from UML diagrams

Algorithms usedAlgorithms used

- Without RTOS ( Quasi Dynamic Scheduling) - Without RTOS ( Quasi Dynamic Scheduling)

-- Single real-time kernel -- Single real-time kernel

- With RTOS (Extended Quasi Static Scheduling)- With RTOS (Extended Quasi Static Scheduling)

-- Schedule multiple threads-- Schedule multiple threads

VERTAF uses simple RTPN/CCPN models for VERTAF uses simple RTPN/CCPN models for scheduling purposes.scheduling purposes.

Page 13: VERTAF: An Application Framework for Design and Verification of Embedded Real-Time Software Pao-Ann Hsiung, Shang-Wei Lin, Chih-Hao Tseng, Trong-Yen Lee,

Petri NetsPetri Nets

Standard Petri Net (N) : <P,T,Ø>Standard Petri Net (N) : <P,T,Ø>

RTPN: <N,RTPN: <N,χχ,,ππ>>

ππ – indicates period for RTPN – indicates period for RTPN

χχ - maps transition to worst-case execution time - maps transition to worst-case execution time and deadlineand deadline

Temporal constraints that appear in sequence Temporal constraints that appear in sequence diagramsdiagrams

- converted into guard constraints on arcs in - converted into guard constraints on arcs in generated Petri netsgenerated Petri nets

Page 14: VERTAF: An Application Framework for Design and Verification of Embedded Real-Time Software Pao-Ann Hsiung, Shang-Wei Lin, Chih-Hao Tseng, Trong-Yen Lee,

Model based verificationModel based verification

Static Analysis Static Analysis

- more suitable ( all possible executions)- more suitable ( all possible executions)

Model checkingModel checking

- if temporal property is satisfied- if temporal property is satisfied

- else show the counterexample- else show the counterexample

Verification kernel used :Verification kernel used :

- State Graph Manipulator (SGM)- State Graph Manipulator (SGM)

-- State-graph merger-- State-graph merger

-- Dead state checker-- Dead state checker

-- State-reduction techniques-- State-reduction techniques

Properties verifiedProperties verified

- Dead states, deadlocks, livelocks- Dead states, deadlocks, livelocks

Page 15: VERTAF: An Application Framework for Design and Verification of Embedded Real-Time Software Pao-Ann Hsiung, Shang-Wei Lin, Chih-Hao Tseng, Trong-Yen Lee,

Component Mapping & Code GenerationComponent Mapping & Code Generation

Automatically generate make files, header files Automatically generate make files, header files etc.etc.

Main Issue:Main Issue:

- when a software class is not deployed on any specific hardware - when a software class is not deployed on any specific hardware componentcomponent

Solution :Solution :

- display a list of available compatible device types to the user- display a list of available compatible device types to the user

Code generation ( 3-tier)Code generation ( 3-tier)

- hardware abstraction layer- hardware abstraction layer

- OS with middleware layer- OS with middleware layer

- Scheduler- Scheduler

Page 16: VERTAF: An Application Framework for Design and Verification of Embedded Real-Time Software Pao-Ann Hsiung, Shang-Wei Lin, Chih-Hao Tseng, Trong-Yen Lee,

VERTAF ComponentsVERTAF Components

Page 17: VERTAF: An Application Framework for Design and Verification of Embedded Real-Time Software Pao-Ann Hsiung, Shang-Wei Lin, Chih-Hao Tseng, Trong-Yen Lee,

Experimental ResultsExperimental Results

Two Applications:Two Applications: - Avionics- Avionics

-- 24 tasks -- 24 tasks -- 45 objects were found-- 45 objects were found -AICC (Autonomous Intelligent Cruise Controller)-AICC (Autonomous Intelligent Cruise Controller) -- 12 tasks-- 12 tasks -- 21 objects were found-- 21 objects were found

Time taken to developTime taken to develop - Avionics - Avionics -- Without VERTAF : 5 weeks-- Without VERTAF : 5 weeks -- Using VERTAF : 1 week-- Using VERTAF : 1 week - AICC- AICC -- Without VERTAF : 20 days-- Without VERTAF : 20 days -- Using VERTAF : 5 days-- Using VERTAF : 5 days

Page 18: VERTAF: An Application Framework for Design and Verification of Embedded Real-Time Software Pao-Ann Hsiung, Shang-Wei Lin, Chih-Hao Tseng, Trong-Yen Lee,

AICC Call GraphAICC Call Graph

Page 19: VERTAF: An Application Framework for Design and Verification of Embedded Real-Time Software Pao-Ann Hsiung, Shang-Wei Lin, Chih-Hao Tseng, Trong-Yen Lee,

ConclusionsConclusions

VERTAF integrates 3 different technologiesVERTAF integrates 3 different technologies

- software component reuse- software component reuse

- formal synthesis- formal synthesis

- formal verification- formal verification

New specification languages can be easily New specification languages can be easily integrated into it.integrated into it.

More advanced features like network delay, More advanced features like network delay, network protocols will be considered in future network protocols will be considered in future workwork

Page 20: VERTAF: An Application Framework for Design and Verification of Embedded Real-Time Software Pao-Ann Hsiung, Shang-Wei Lin, Chih-Hao Tseng, Trong-Yen Lee,

Thank YouThank You