• No results found

Real Time Developer Studio. Emmanuel Gaudin

N/A
N/A
Protected

Academic year: 2021

Share "Real Time Developer Studio. Emmanuel Gaudin"

Copied!
50
0
0

Loading.... (view fulltext now)

Full text

(1)

Real Time Developer Studio

Emmanuel Gaudin

(2)

PragmaDev

Dedicated to the development of a

modelling tool

for the development of

Event driven software.

• French SME,

(3)
(4)

References

• Universities : ENST, Polytechnica Bucarest, Telecom Beijing…

(5)

Long term investment

Source code access in case of failure:

• Economical

• Technical • Strategic

Possible audit of the code • Possible third party take over

(6)

Philosophy

Develop a

modelling

tool

based on the

(7)

Target segment

• Decomposed in tasks running concurrently • Communicating • Synchronizing

hardware

OS-RTOS-Scheduler

Application

Module 1 Module 2 Module 3

Message queue dr iv er dr iv er Semaphore

Event driven systems

(8)

Issues

“The software content is doubling about

every two years. The sheer volume is making it increasingly difficult for QA and test teams to keep up with traditional tools and processes.”

Wind River Market Survey of Device Software

Testing Trends and Quality Concerns in the Embedded Industry - June 2010.

Never forget the 1:10:100 rule

Source: James Martin study “Software development costs only comprise a

portion of the total cost of software ownership. However, the development process itself has a

significant impact on total cost of ownership.”

Total Cost of Ownership: Development is (only) Job One by Daniel D. Galorath - June 2008.

(9)

What modelling can solve

Focus first on the

What

(Req) instead

of focusing on the

How

(code),

Modelling is about

Communication

and

Documentation,

Legibility

of large systems gets critical.

Would you build a house without

drawing detailed plans ?

Get control over

productivity

,

(10)

Requirements for a good

modeling language

• The abstract model must be platform independant, as its name states.

• The abstract model must be translatable to an implementation platform.

• For that purpose, the abstract model is based on a virtual machine offering:

• Some basic services

(11)

Existing modelling languages

SDL

Specification and Description Language is an ITU-T standard.

• Event oriented,

• Used by ETSI to standardize telecommunication protocols,

• Formal (complete and non-ambiguous).

UML

Unified Modeling Language is an OMG standard.

• Can be used to represent any type of systems,

• Informal.

SysML System Modelling Language

AADL Architecture Analysis Description Language

MARTE profile Modeling and Analysis of Real-Time and Embedded systems

Z.109 UML profile based on SDL

Lustre / Esterel Synchronous programming languages for the development of complex reactive systems

MATLAB MAtrix LABoratory

Autosar AUTomotive Open System Architecture

(12)

Modelling languages positioning

S tati c v er ifi c ati on Dy nam ic v er ifi c ati on

Dynamic verification is best at identifying defects because requirements are usually dynamics

Requirements

Analysis Architecture

SysML UML AADL SDL MARTE Specification Design Matlab Async SW Sync SW Generic Generic HW/SW HW/SW URN

(13)

No real time specificity in UML

• UML 1.x is too generic to describe the dynamics of the model,

• UML 2.x introduced domain specific profiles,

• Lots of tools defined proprietary profiles,

• Users spend more defining their profile thatn their system,

(14)

SDL: the perfect picture

• SDL graphical abstraction (architecture, communication, behavior, services) fits the needs.

• SDL being formal, it is possible to simulate the model.

• SDL being formal, partial or full code generation is possible.

• SDL being object oriented, software components are reusable.

• System are globally asynchronous (GALS) so SDL can be used at

system level.

• SDL has the characteristics to describe a good PIM.

• SDL is recognized by certification authorities (European Aviation Safety Agency Certification Memorandum, ETSI, ESA)

(15)

SDL: the figures

• C code: 35 to 50 mistakes per 1000 lines

• SDL code: 8 mistakes per 1000 lines

• Development time is globally reduced by 35%

• Reduced up to 50% in the left branch of the V cycle

• Less gain on the right side of the V because of the gap with technical reality

(16)

SDL: design problems

• All existing software modules (RTOS, drivers, legacy code) provide C APIs, not SDL,

• Some classical real time concepts are not present in SDL such as pointers and semaphores,

• SDL syntax is not suited for design.

Integration with legacy code is difficult,

Integration with COTS components is tricky (driver or RTOS),

Developers are frustrated,

(17)

An intermediate solution: SDL-RT

• Keep UML diagrams at high level during analysis and requirements

• Keep the SDL graphical abstraction (architecture, communication,

behavior).

• Introduce C data types and syntax instead of SDL’s.

• Remove SDL concepts having no practical implementation.

• Extend SDL to deal with uncovered real time concepts (interrupts,

semaphores). Analysis Specification Design Real time SDL-RT

UML

SDL

C

C++

(18)

SDL-RT

SDL-RT is:

• Generalization of SDL to all applications running on top of a RTOS,

• Available from http://www.sdl-rt.org for free,

• Legible,

• Standardized by ITU-T in December 2012 as part of SDL (Z.104),

(19)

• Specification and Description Language, l’ITU-T standard intended to write the detailed specifications of the protocols in order to make sure they will interoperate.

• Major updater every 4 years since 1976.

• Major releases:

• SDL 1988: First mature version

• SDL 1992: Object orientation

• SDL 2000: UML alignment

• SDL 2010: C types support in Z.104

• Anual conference

• SDL Forum (http://www.sdl-forum.org/)

• SAM workshop (satellite event of Models)

• 11 commercial tools, 10 public domain tools.

(20)

Views: Library of components

Relations

between static

classes (C++)

and dynamic

classes (SDL)

(21)

Views: Architecture and

communication

(22)

Views: Behavior and Data

SDL abstract

data types

or

SDL-RT

C/C++ data

types.

Process A

(23)

Views: Operating system services

A semaphore take

A timer is started

When the timer goes off

A semaphore give

(24)

Views: Distributed systems

Physical

deployment

(25)

Model views

Library of components

System architecture

Interface definitions

Application deployment

Real time concepts

(26)

MSC: dynamic view

Message Sequence Chart

• Vertical lines represent a task, the environment or a

semaphore,

• Arrows represent message exchanges, semaphore manipulations or timers.

Can be used:

• As specification

(27)

RTDS: supported languages

UML C C++

Analysis

Specification

Design

SDL-RT SDL Z.100

Informal Fully formal Semi formal Testing

(28)

RTDS: supported languages

Informal modelling for requirements: UML

• Edition

• C++ stubs generation

Semi-formal modelling for design: SDL-RT

• Edition

• Syntaxic et semantics checking • Code generation

• Graphical debugging

Fully formal modelling for specification: SDL Z.100

• Edition

• Syntaxic et semantics checking • Simulation

• Verification

• Code generation • Graphical debugging • Test

(29)

Model

simulator

A graphical debugger for fully formal models

and TTCN-3 test cases

• Set breakpoints and step in the model,

(30)

Code generation

• C++ skeleton for static classes

• C or C++ for dynamic classes

• Generated code is legible

• Generation profile wizard

• The code is:

• Integrated with: FreeRTOS, VxWorks, OSE, OSE Epsilon, CMX RTX, Nucleus, uiTRON, Posix, ThreadX, and Win32,

• Provided with an scheduler,

• Royalty free,

(31)

Debugging architecture

The Model debugger relies on a traditional C debugger or cross debugger to provide graphical debugging.

C code generator Text editor MSC tracer Model editor Model debugger compiler C debugger RTOS Model External C/C++ Generated C code Binary

Real Time Developer Studio tools

Third party tools

Source code Binary code • MinGW • Tornado • Tasking • gdb • XRAY • Multi cible socket

(32)

Model debugger

Debug in the model:

• Breakpoints, stepping, in the SDL/RT diagrams or in the generated C files, • Dynamic MSC traces, • Connecting an external tool is possible through a socket.

Relies on the target semantic: processor and RTOS.

(33)

Debug features

• Switch between

• Model

(34)

Graphical traces

Execution traces: • States, • Events, • Semaphores, • Timers.

Trace level configuration Display of system time

MSC Diff allows to check:

• Conformity,

(35)

Model coverage

• Graphical model coverage analysis

(36)

Prototyping interface

 Connects automatically to the simulator or the debugger.  Knows about the model inputs and outputs.

(37)

Documentation generation

 Logical publications (state, transition, partition, diagram)

 Comments preceeding or following the publication

 Styles for paragraphs

 Styles for characters

 Export format  RTF  OpenDocument  HTML  SGML  Exported elements

 Texts with publications

 Index entries

(38)

Documentation generation

A document

(39)

Standard testing language

• Relies on basic services

• Messages

• Procedures

• Timers

• Parallel execution

• Based on TTCN-3 international standard:

• Data types definitions or ASN.1,

• Templates definitions,

• Test cases,

• Verdict,

(40)

TTCN-3 support

• Textual language

• Simulator with Test manager

• C++ code generator

• TTCN-3 to MSC generation

• MSC to TTCN-3 generation

• TTCN-3 generation from a

property on the model (Verimag)

• TTCN-3 generation based on model coverage (to come)

(41)

Continuous integration

Specification Validation testing Simulation Simulation Execution Execution Design Implementation Integration testing Unit testing

(42)

Model checking

• Partnership with Verimag on IF technology. • Exhaustive simulation, • Observers, • Test generation. • RTDS feature • Export to IF, • Execute a script • Generate an MSC feedback.

(43)

Implementation

IF compiler socket translate to file executable Python script executes SDL Model Property Test case Analysis Observer TTCN MSC IF

State file Transition

file Error file

Resulting scenario

(44)

Reference testing

Specification Validation testing Design Implementation Integration testing Unit testing Requirements Use cases Reference scenarios Properties Simulation Execution Execution

(45)

Upcoming collaboration

• Common lab with French Nuclear Research Agency (CEA):

• Symbolic technology: Diversity.

• Generate a minimum number of test cases covering all

transitions.

• SDL -> XLIA -> TTCN-3

• Export FIACRE:

• CADP.

(46)

Property Sequence Chart

• PRESTO european project:

• Functional property verification.

• Non functional property verification.

(47)

ESA Taste framework integration

Event driven AADL RTDS Scade Matlab E nc odeur s / D éc odeur s E nc odeur s / D éc odeur s ASN.1 ASN.1 Ada ASN.1 E nc odeur s / D éc odeur s Control law Control law Generic

(48)

Model generation

• From comments in legacy code

• Includes architecture information

/* _PRAGMADEV_START*/ /* _PRAGMADEV_TASK_START */ i = 0; j = 0; /* _PRAGMADEV_TASK_END */ /* _PRAGMADEV_NEXTSTATE Idle*/ /* _PRAGMADEV_STATE Idle*/ /* _PRAGMADEV_INPUT Error(); */ /* _PRAGMADEV_NEXTSTATE ErrorState*/ /* _PRAGMADEV_INPUT Valueof(coor); */ /* _PRAGMADEV_DECISION coor == 3 */ if ( coor == 3 ) /* _PRAGMADEV_BRANCH true */ /* _PRAGMADEV_TASK_START */ {x = 5;} /* _PRAGMADEV_TASK_END */ /* _PRAGMADEV_NEXTSTATE Idle*/ /* _PRAGMADEV_BRANCH false */ else /* _PRAGMADEV_TASK_START */ {x = 7;} /* _PRAGMADEV_TASK_END */ /* _PRAGMADEV_NEXTSTATE Idle*/ /* _PRAGMADEV_ENDDECISION */ /* _PRAGMADEV_ENDSTATE*/ /* _PRAGMADEV_STATE ErrorState*/ /* _PRAGMADEV_INPUT End(); */ /* _PRAGMADEV_STOP */ /* _PRAGMADEV_ENDSTATE*/

(49)

Project management

 Textual storage format, graphical diff tool, and an

automatic merge tool provide a consistent integration with configuration management tools.

 Single diagrams can be exported as PNG, JPEG, PS, and HTML.

 Full documentation of the model can be generated.

 Traceability information and Reqtify integration.

 System requirements:

 Solaris,

 Windows,

 Linux.

(50)

Conclusion

 Three levels of modelling:

 Informal,  Semi-formal,  Formal.  Tools to:  Document,  Simulate,  Validate,  Test.

 Based on international standards.

References

Related documents

By this we mean that the wages of university staff that serve as a base of economic impact studies cannot be simply connected to first, second and third mission

Given the location of the bidding generators, their supply curves, the transmission constraint set by the TSO and the forecast demand in each zone, the MO solves the problem of

Figure 8: Coheregrams Showing Time Varying Coherence Between Nodes in the Wireless Network from Figure 5, due to a mobile node 1. Link/Routing changes are observed at 14 seconds

The controls included are: a firm characteristics, such as total assets, current assets, inventories, sales, a second-order polynomial in the age of the firm since founding, ATECO

Q.29 - If a network were to provide access to the full-length programs you like to watch online as well as on air, how would this impact your impression of this network. Would you

Participation based upon informed synthesis of reading material (assigned as well as other retrieved information by the students from relevant publications) is

Table 1: Mean ultrasonographic measurements of cross sectional area at various levels of the median nerve in both carpal tunnel syndrome patients and controls... Neurology Asia

On target zones does not include shots saved that were