Evaluating Context Descriptions and Property Definition Patterns for Software Formal … ·...

61
1 Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9, 2009 Philippe Dhaussy 1 , Pierre-Yves Pillain 1 , Stephen Creff 1 , Amine Raji 1 , Yves Le Traon 2 , Benoit Baudry 3 1 : Lab. LISyC-DTN, ENSIETA, BREST 2 : Université du Luxembourg 3 : Equipe Triskell, RENNES [email protected] www.ensieta.fr/dtn Evaluating Context Descriptions and Property Definition Patterns for Software Formal Validation

Transcript of Evaluating Context Descriptions and Property Definition Patterns for Software Formal … ·...

Page 1: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

1Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Philippe Dhaussy 1, Pierre-Yves Pillain 1, Stephen Creff 1, Amine Raji 1,

Yves Le Traon 2, Benoit Baudry 3

1 : Lab. LISyC-DTN, ENSIETA, BREST

2 : Université du Luxembourg

3 : Equipe Triskell, RENNES

[email protected]/dtn

Evaluating Context Descriptions and Property Definition Patterns for Software Formal Validation

Page 2: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

2Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Air TrafficControl Center

AFN –CPDLC –

ADS

Position - Time

Work is in progressFirst experience feedback with our industrial partners

ATC (Air Traffic Control) needs Aircraft-Groundcommunications ATC Data-Link applications

An example of case study

Page 3: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

3Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

The AFN Model • AFN (Aircraft Facilities

Notification) is an ATC Data-Link application– Allows pilot to send to

ATC Center its identifier (Logon)

– Then, ground may use other applications

– Can change control from one ATC Center to another (Contact ADvisory procedure -CAD)

Agcm

AFN Logon

AFN

Mgr

AFN

Cad

Atc Hmim

ADS

CPDLC

Afn

ATC

Sysm MiddleWare

AFN User Model : SDL Model3 processes13400 lines (96 states, 107 transitions)

Page 4: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

4Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

• Motivation

• Proposition

• Context and requirement modeling (CDL)

• Experimentation : toolset (OBP) and results

• Discussion and future work

Evaluating Context Descriptions and Property Definition Patterns

Page 5: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

5Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Motivation : Integration of formal methods in the engineering processes

Many barriers

Difficulty to formalize the requirements

Semantic gap between

• the system to be validated

• the formal model needed for the validation.

FormalizationRequirements

Checker

(static &

dynamic

analysis)DesignModel

FormalModel

Page 6: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

6Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Barrier : Formal property expression

Formal properties

High expressiveness, but not easily readable Not easy to handle by the engineers in industrial proj ects.

Temporal logic formula (as LTL or CTL) : not acceptab le in industry.

FormalizationRequirements

Checker

(static &

dynamic

analysis)DesignModel

FormalModel

Page 7: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

7Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Barrier : Formal property expression

Formal properties

RequirementsChecker

(static &

dynamic

analysis)

Properties : often related to specific use cases

Not necessary to verify them over all the environment scenarios.

We want to identify these contexts.

Use cases Context

Formalization

DesignModel

FormalModel

Page 8: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

8Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Integration of formal methods into engineering processes

Refinem

ent

…. C

ontinuum …

.

MDE : a great opportunity to implement a continuum from design model to code.

DesignModel

DesignModel

Page 9: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

9Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Feedback

Is MDE a great opportunity to implement a continuum from design model + requirements to diagnostics ?

…… Continuum ……

How to exploit intensively model transformations ?

Ckecker

Integration of formal methods into engineering processes

FormalModel

DesignModel

DesignModel

Page 10: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

10Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Context expression

In reality, useful information :

very often implicit

disseminated in several

documents

Contexts : to well-defined operational phases

initialization, reconfiguration, degraded modes, error scenarios, etc.

Context

Model to be

Validated

Page 11: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

11Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Context expression

S_CP-REQ-4On receipt of a MsgFieldMask message from the COMM_WT, the WT_IOS shall set the WT_State to ‘STANDBY’ and transmit the EvtTechnicalStateIosmessage to the ECDP_DP with the following parameters:equipmentId = equipmentId of the WT_IOSroleId = roleId of the WT_IOSstate = STANDBYIf the requested WT_State is OPERATIONAL, the WT_IOS shall transmit the MsgControlNetworkmessage to the COMM_WT with the following parameters:orderIdcommand = ‘READY’End Requirement

Understanding of these documents : not easy,implicit link

Page 12: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

12Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Context expression

Model : tightly synchronized with its

environment.

Circumvent the combinatorial explosion

Context(scenarios)

Method to support the formal specification of these c ontexts

Formalization

Model to be

Validated

Page 13: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

13Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

A strong hypothesis

The proof relevance : based on a strong hypothesis :

It is possible to specify the sets of bounded

behaviors in a complete way.

Not formally justified

The essential idea :

The designer can correctly develop a software only

if he knows the constraints of its use.

It is particularly true in embedded system domain.

Page 14: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

14Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Pragmatic approach for integration in engineering processes

Adoption of a pragmatic approach.

Currently, we focus on :

• a formalization of use cases (contexts) and requirements

• a construction of a methodology for model validation

without changing in deep their practices.

Page 15: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

15Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

• Motivation

• Proposition

• Context and requirement modeling (CDL)

• Experimentation : toolset (OBP) and results

• Discussion and future work

Evaluating Context Descriptions and Property Definition Patterns

Page 16: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

16Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Context Description Language (CDL)

Description of the environmental context : difficult task.

Context Description Language (CDL) :

• to specify the context with scenarios and temporal pro perties

• to link each property to a limited scope of the syst em behavior.

Properties

Context(scenarios)

Model to be

Validated

Page 17: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

17Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Verification principles

Composition

Based on a composition of the context, a set of req uirements and

the model to be validated.

Context

(scenario)

Same abstraction

level

Property …

Property 3Property 2

Property 1

Model to be

Validated

Page 18: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

18Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Verification principles : Composition

Verdict

Simulator,Model-checker

Reachabilityanalysis

LabeledTransitionSystem(LTS)

Model to be

Validated

Before the composition, each property is transformed into an observer automaton.

Page 19: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

19Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Observers

Observes the behavior of another entity or program

Observer

Model Observerreachability

AnalysisVerdict||

• Represent properties to be validated on a model. • Not intrusive.• Observer and model : IF2 language [Verimag]

:(

reject

Model to be

validated

Page 20: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

20Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Verification principles

Identification of many contexts.

Validation with a set of CDL models

Model to be

Validated

Page 21: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

21Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

• Motivation

• Proposition

• Context and requirement modeling (CDL)

• Experimentation : toolset (OBP) and results

• Discussion and future work

Evaluating Context Descriptions and Property Definition Patterns

Page 22: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

22Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

CDL (Context Description Language)

Those entities are running in parallel.

CDL : DSL prototype, based on UML 2 [Whittle’s UCC] Description of the behavior of actors of the environm ent.

Actors

described by activity and sequence diagrams

Page 23: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

23Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

CDL : hierarchically constructed in 3 levels

Level 1

Level 2

Level 3

Level 3

Page 24: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

24Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Industrial projects :

Requirements :

• not associated to

the entire lifecycle of software

• only to specific

steps in its lifecycle.

Context – properties linkingS_CP-REQ-6

During initialization procedure, the S_CP shall associate a generic equipment identifiers to one or several role in the system (MainSensor, OtherSensor, IFF, Actuator, ...). It shall also associate an identifier to each console.The S_CP shall send an evtEquipmentRolemessage, in preparation mode, for each connected generic equipment, to each connected console.Initialization procedure shall end successfully, when the S_CP has set all the generic equipment identifiers and all console identifiers and all evtEquipmentRole message have been sent.

End

S_CP-REQ-2Once initialization is achieved, the S_CP shall send to each console an evtCurrentMission with curMission set to IDLE, to set current mission to idle, followed by an evtCurrentActivity with curActivity to LOGIN and status to TRUE to activate login.

End

Page 25: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

25Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Link• properties • specific context

Context – properties linkingS_CP-REQ-6

During initialization procedure, the S_CP shall associate a generic equipment identifiers to one or several role in the system (MainSensor, OtherSensor, IFF, Actuator, ...). It shall also associate an identifier to each console.The S_CP shall send an evtEquipmentRolemessage, in preparation mode, for each connected generic equipment, to each connected console.Initialization procedure shall end successfully, when the S_CP has set all the generic equipment identifiers and all console identifiers and all evtEquipmentRole message have been sent.

End

S_CP-REQ-2Once initialization is achieved, the S_CP shall send to each console an evtCurrentMission with curMission set to IDLE, to set current mission to idle, followed by an evtCurrentActivity with curActivity to LOGIN and status to TRUE to activate login.

End

Context

Page 26: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

26Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Context – properties linking

S_CP-REQ1

S_CP-REQ9

S_CP-REQ4

S_CP-REQ12S_CP-REQ7

S_CP-REQ5

S_CP-REQ4

S_CP-REQ2

S_CP-REQ7

The originality of CDL : ability to link each property to a context diagram(Level 1 or 2)

Page 27: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

27Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Observer activation

CDL

P<< property >>

Observer

:(

Implemented mechanism to allow the observers to beactivated during the execution of a activity diagram.

Added transitions for synchronization with the context.

Page 28: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

28Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Observer activation

CDL

P<< property >>

Observer

:(start Turn on

Page 29: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

29Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Observer activation

CDL

P<< property >>

Observer

:(stop

Turn off

Page 30: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

30Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Context – properties linking : benefits

The benefits are :

• to explicit the conditions under which a given

property is checked.

• Easier property specification

Page 31: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

31Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Requirement formalization

S_CP-REQ-6During initialization procedure, the S_CP shall associate a generic equipment identifiers to one or several role in the system (MainSensor, OtherSensor, IFF, Actuator, ...). It shall also associate an identifier to each console.The S_CP shall send an evtEquipmentRolemessage, in preparation mode, for each connected generic equipment, to each connected console.Initialization procedure shall end successfully, when the S_CP has set all the generic equipment identifiers and all console identifiers and all evtEquipmentRolemessage have been sent.End

Extracted from industrialdocumentation.

Textual requirement

� ambiguous and complex.

Page 32: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

32Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Requirement decomposition

S_CP-REQ-6-1During initialization procedure, the S_CP shall associate an identifier to NC console (IHM), before dMax_cons time units.

S_CP-REQ-6-2

After initialization, in preparation mode, the S_CP shall shall send an evtEquipmentRole for each

connected generic equipment, to each connected console, before dMax_dev time units.

S_CP-REQ-6-3

Each device returns a statusRole message to S_CP before dMax_ack time units.

S_CP-REQ-6-4

The S_CP shall send an notifyRole message for each connected generic device, to each

connected console. Initialization procedure shall end successfully, when the S_CP has set all the

generic device identifiers and all console identifiers and all notifyRole messages have been sent.

After a discussion with industrial partners, we had to rewrite it :

� to decompose in a set of requirements.

� to formalize them.

Page 33: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

33Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Property formalization with definition patterns

Property S_CP-REQ-6-1;

AN exactly one occurrence of chgt_state_S_CP

end

eventually leads-to [ 0 .. dmax_cons [

ALL combinedexactly one occurrence of send_1_consexactly one occurrence of send_2_cons

end

chgt_state_S_CP may never occurone of send_1_cons cannot occur before the first one of chgt_state_S_CPone of send_2_cons cannot occur before the first one of chgt_state_S_CPrepeatability : true

Pattern-based approach.

[ Dwyer, Cheng]

S_CP-REQ-6-1During initialization procedure, the S_CP shall associate an identifier to NC console (IHM), before dMax_constime units.

Response, Precedence, Absence, Existence

Page 34: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

34Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Property definition pattern : detectable events

Detectable events : transmissions or receptions, actions, model state ch anges.

Property S_CP-REQ-6-1;

AN exactly one occurrence of chgt_state_S_CP

end

eventually leads-to [ 0 .. dmax_cons [

ALL combinedexactly one occurrence of send_1_consexactly one occurrence of send_2_cons

end

chgt_state_S_CP may never occurone of send_1_cons cannot occur before the first one of chgt_state_S_CPone of send_2_cons cannot occur before the first one of chgt_state_S_CPrepeatability : true

Page 35: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

35Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Possibility of handling sets of events, ordered or not ordered.

Property S_CP-REQ-6-1;

AN exactly one occurrence of chgt_state_S_CP

end

eventually leads-to [ 0 .. dmax_cons [

ALL combinedexactly one occurrence of send_1_consexactly one occurrence of send_2_cons

end

chgt_state_S_CP may never occurone of send_1_cons cannot occur before the first one of chgt_state_S_CPone of send_2_cons cannot occur before the first one of chgt_state_S_CPrepeatability : true

AN : an eventALL : all the events

Property definition pattern : sets of events

Page 36: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

36Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Enrichment with Options using annotations [Smith et al.]To produce distinct variations on a property pattern.

Property S_CP-REQ-6-1;

AN exactly one occurrence of chgt_state_S_CP

end

eventually leads-to [ 0 .. dmax_cons [

ALL combinedexactly one occurrence of send_1_consexactly one occurrence of send_2_cons

end

chgt_state_S_CP may never occurone of send_1_cons cannot occur before the first one of chgt_state_S_CPone of send_2_cons cannot occur before the first one of chgt_state_S_CPrepeatability : true

Property definition pattern : options

Pre-arity, Post-arity, Immediacy,Precedence, Nullity, Repeatability

Page 37: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

37Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Transformation into an observer automaton

Each property is transformed into an observer automaton (reject node)Safety and bounded liveness properties.

Accessibility analysis :

Checking on the global LTS if a rejectstate is reached

Pty S_CP-REQ-6-1

S_CP

Page 38: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

38Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

• Motivation

• Proposition

• Context and requirement modeling (CDL)

• Experimentation : toolset (OBP) and results

• Discussion and future work

Evaluating Context Descriptions and Property Definition Patterns

Page 39: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

39Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Academic

Simulator

IFx

(Verimag)

Toolset : Observer-Based Prover

Proof results

OBP takes as input the model to be validated and eac h CDL model.

Connection to an existing academic simulator IFx (wit h IF2 language)

OBP : Eclipse Plugin, EPL license, available on : http://gforge.enseeiht.fr/projects/obp

IF2 program

LTS

Model to be

Validated

Page 40: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

40Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Generation of context paths

UnfoldingInterleaving

Partionning

From CDL diagrams :

Generation of a set of

context path automata.

Each path :

one environment run

one possible

interaction between

model and context

Page 41: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

41Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

IFx

Observer-Based Prover

Each path is transformed in IF2 codeand composed with a set of observers and the model.

Observer automata

One context path (IF2)

Labelled

Transition

System

Proof results

Model

to be

Validated

Page 42: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

42Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Generation, simulation, accessibility analysis

Proof return

dataLabelled

Transition

System

observer automata

OBP_VERIF

OBP_CDLAcademic

Simulator

( IFx)

CDL Model

Link editorModel to be

Validated

a context path

Page 43: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

43Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Methodology : process

Page 44: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

44Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

For each component :• requirement documents

Use cases,

Requirements ( natural language)

• component executable model (UML or SDL).

• translated in IF2 models (manually or semi-automatically)

Some industrial experiments results

Several industrial software components of embedded systems.

Page 45: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

45Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

• At different abstraction levels

• extraction of requirements corresponding to the model

abstraction level.

• Rewritten into a set of several properties

• Decomposition

• Pattern-based rewriting consequently to discussion wi th

industrial partners.

Some industrial experiments results

In industrial documents, requirements :

Page 46: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

46Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Some industrial experiments results

181/703(26%)

62/151(41%)

15/188(8%)

34/85(40%)

40/136(29%)

19/94(20%)

11/49(22%)

Non-provable properties

94/703(13%)

48/151(32%)

18/188(10%)

2/85(2%)

24/136(18%)

2/94(2%)

0/49(0%)

Non-computable properties

428/703(61%)

41/151(27%)

155/188(82%)

49/85(58%)

72/136(53%)

73/94(78%)

38/49(78%)

Provable properties

AverageCS6

(Partner2 )CS5

(Partner2 )CS4

(Partner1 )CS3

(Partner1 )CS2

(Partner1 )CS1

(Partner1 )

Number of properties translated from requirements.Three categories of properties. (For confidential reasons, company and system names are not mentioned in this presentation)

Page 47: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

47Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Some industrial experiments results

Captured with our patterns, translated into observe rs

181/703(26%)

62/151(41%)

15/188(8%)

34/85(40%)

40/136(29%)

19/94(20%)

11/49(22%)

Non-provable properties

94/703(13%)

48/151(32%)

18/188(10%)

2/85(2%)

24/136(18%)

2/94(2%)

0/49(0%)

Non-computable properties

428/703(61%)

41/151(27%)

155/188(82%)

49/85(58%)

72/136(53%)

73/94(78%)

38/49(78%)

Provable properties

AverageCS6

(Partner2 )CS5

(Partner2 )CS4

(Partner1 )CS3

(Partner1 )CS2

(Partner1 )CS1

(Partner1 )

Page 48: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

48Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Some industrial experiments results

Captured with our patterns but not translated into a n observer (unbounded liveness)

181/703(26%)

62/151(41%)

15/188(8%)

34/85(40%)

40/136(29%)

19/94(20%)

11/49(22%)

Non-provable properties

94/703(13%)

48/151(32%)

18/188(10%)

2/85(2%)

24/136(18%)

2/94(2%)

0/49(0%)

Non-computable properties

428/703(61%)

41/151(27%)

155/188(82%)

49/85(58%)

72/136(53%)

73/94(78%)

38/49(78%)

Provable properties

AverageCS6

(Partner2 )CS5

(Partner2 )CS4

(Partner1 )CS3

(Partner1 )CS2

(Partner1 )CS1

(Partner1 )

Page 49: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

49Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Some industrial experiments results

Not captured with our patterns. (example : undetectable events for the observer)

181/703(26%)

62/151(41%)

15/188(8%)

34/85(40%)

40/136(29%)

19/94(20%)

11/49(22%)

Non-provable properties

94/703(13%)

48/151(32%)

18/188(10%)

2/85(2%)

24/136(18%)

2/94(2%)

0/49(0%)

Non-computable properties

428/703(61%)

41/151(27%)

155/188(82%)

49/85(58%)

72/136(53%)

73/94(78%)

38/49(78%)

Provable properties

AverageCS6

(Partner2 )CS5

(Partner2 )CS4

(Partner1 )CS3

(Partner1 )CS2

(Partner1 )CS1

(Partner1 )

Page 50: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

50Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Some industrial experiments results

For the CS5 component :the percentage (82%) of provable properties : very high. Most of properties : written with a good property pattern matching.

181/703(26%)

62/151(41%)

15/188(8%)

34/85(40%)

40/136(29%)

19/94(20%)

11/49(22%)

Non-provable properties

94/703(13%)

48/151(32%)

18/188(10%)

2/85(2%)

24/136(18%)

2/94(2%)

0/49(0%)

Non-computable properties

428/703(61%)

41/151(27%)

155/188(82%)

49/85(58%)

72/136(53%)

73/94(78%)

38/49(78%)

Provable properties

AverageCS6

(Partner2 )CS5

(Partner2 )CS4

(Partner1 )CS3

(Partner1 )CS2

(Partner1 )CS1

(Partner1 )

Page 51: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

51Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Some industrial experiments results

For the CS6 component : the percentage (27%) is very low.difficult to re-write the properties from specification documentation. much time to interpret properties with our partners to formalizethem with our patterns.

181/703(26%)

62/151(41%)

15/188(8%)

34/85(40%)

40/136(29%)

19/94(20%)

11/49(22%)

Non-provable properties

94/703(13%)

48/151(32%)

18/188(10%)

2/85(2%)

24/136(18%)

2/94(2%)

0/49(0%)

Non-computable properties

428/703(61%)

41/151(27%)

155/188(82%)

49/85(58%)

72/136(53%)

73/94(78%)

38/49(78%)

Provable properties

AverageCS6

(Partner2 )CS5

(Partner2 )CS4

(Partner1 )CS3

(Partner1 )CS2

(Partner1 )CS1

(Partner1 )

Page 52: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

52Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Some industrial experiments results

181/703(26%)

62/151(41%)

15/188(8%)

34/85(40%)

40/136(29%)

19/94(20%)

11/49(22%)

Non-provable properties

94/703(13%)

48/151(32%)

18/188(10%)

2/85(2%)

24/136(18%)

2/94(2%)

0/49(0%)

Non-computable properties

428/703(61%)

41/151(27%)

155/188(82%)

49/85(58%)

72/136(53%)

73/94(78%)

38/49(78%)

Provable properties

AverageCS6

(Partner2 )CS5

(Partner2 )CS4

(Partner1 )CS3

(Partner1 )CS2

(Partner1 )CS1

(Partner1 )

About forty properties have been formally verified

2 errors : detected in CS5 and CS6

Page 53: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

53Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Approach benefits

• Requirements often partially described.

• CDL : formalization of contexts and properties.

• Contribution to overcome the combinatorial explosion

• Motivation of the partners for a more formal approach to express their requirements.

• Better appropriation of formal verification process by p artners.

• Help to structure and formalize their specification.

Page 54: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

54Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Difficulties

Major difficulties are :

• Scenarios : lack of complete and coherent descripti on

-> Many discussions with experts required

-> Long discussions for understanding and capture i n a model

Page 55: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

55Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Difficulties

• Requirements : difficulty to formalize them into fo rmal properties.

-> Different abstraction levels.-> Several interpretations.-> Some refer to an applicable configuration, operational phase or history without defining it.

• Complexity : CDL programming / path set complexity.

Page 56: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

56Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

System / Software level

S_CP-REQ-4On receipt of a MsgFieldMaskmessage from the COMM_WT, the WT_IOS shall set the WT_State to ‘STANDBY’ and transmit the EvtTechnicalStateIos message to the S_CP with the following parameters:equipmentId = equipmentId of the WT_IOSroleId = roleId of the WT_IOSstate = STANDBYIf the requested WT_State is OPERATIONAL, the WT_IOS shall transmit the MsgControlNetworkmessage to the COMM_WT with the following parameters:orderIdcommand = ‘READY’End Requirement

Textual requirement

Systemlevel

property

Systemlevel

property

Thalespattern

CDLpattern

Formalization

ImplementationData

(refinement)

For software engineers : easy CDL modelingSystem engineers : don’t want formalize at the CDL level (too low abstraction level)Currently, we are working on definition of specific patterns at higher abstraction level.Needed transformations to generate CDL properties from these specific patterns.

Page 57: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

57Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

System / Software level

Property S_CP_REQ_6_1_3

(S_CP is in state INITIALIZATION)exactly one occurrences of

receive equipmentRoles () from IOS leads to

(ECDP_DP is in state INITIALIZATION)

For each HMI : exactly one occurrences of send process (evtEquipmentRole) to

HMI

equipmentRoles must occur

one of process cannot occur beforethe first one of equipmentRoles

hight levelOperator

An example of property conformed to specific patternwith higher level operator

Page 58: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

58Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

• Motivation

• Proposition

• Context and requirement modeling (CDL)

• Experimentation : toolset (OBP) and results

• Conclusion and future work

Evaluating Context Descriptions and Property Definition Patterns

Page 59: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

59Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Work in progress.

AcademicEvaluating CDL prototype on industrial contextExecution of proofsStudy of concepts and a methodologyCDL concepts can be implemented in another language

IndustrialExperimentations : rich in teaching

Contribution for a formal validation methodology

UsersAppropriation of formal verification process by partners

Not trivial activity

Conclusion

Page 60: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

60Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Future works

AcademicPath set reduction : equivalencePattern improvementImprove diagnostics readability

IndustrialNeed of formal validation expertise capitalizationMethodology of CDL models design

UsersMethodology and guidelines

Page 61: Evaluating Context Descriptions and Property Definition Patterns for Software Formal … · Evaluating Context Descriptions and Property Definition Patterns, MODELS’09 October 4-9,

61Evaluating Context Descriptions and Property Defini tion Patterns, MODELS’09 October 4-9, 2009

Thank for your attention