SlideShare a Scribd company logo
Using Formal Methods in
Industrial Software Development
European SEPG Conference
London, June 2005
Robert van Lieshout, Quality Manager
Robert.vanLieshout@imtech.nl

1
“Quality through Commitment and Creativity”

2
Engineering and Mathematics
Every branch of Engineering uses Mathematics for
Specification, Design and Verification
Mechanical Engineering => Differential Equations
Structural Engineering => Finite Element Analysis
Circuit Engineering => Boolean Algebra, etc

Except Software Engineering
Originally a specialization within Mathematics!
Most Software is specified and designed without using
mathematics
Software specifications and designs cannot be verified before
implementation
Software testing must find specification, design and
implementation errors
3
Presentation Outline

Formal Methods – then and now
I-Mathic – an overview
Applying I-Mathic – some results
Benefits and Drawbacks
Current status

4
Formal Methods

Then and now

5
Formal Methods – Then ...

Formal Methods have promised much and
delivered little:
The solution is often more complicated than the problem
Formal specifications use difficult notations and
require extensive mathematical background
Critical Stakeholders - Business Analysts, Domain
Experts and Customers - cannot understand the
formal specifications
Critical Stakeholders excluded from the process

6
Formal Methods – Now

Growing interest in Formal Methods
See: http://www.fmeurope.org/
Several methods with different objectives
Proof of selected properties, rather than full
correctness proof

Tool support and computing power have:
Reduced laboriousness
Improved user-friendliness (sometimes)
Made it less time consuming
7
The I-Mathic Formal Method

An overview

8
I-Mathic Principles

Design Principle
Developers can and should strive to produce
software that is nearly error free when entering
testing

Testing Principle
The purpose of testing is quality measurement and
not an attempt to “test in” quality

9
I-Mathic – Origins

Used a small part of Cleanroom Sw. Eng.
Sequence Enumeration

Developed tool support
Excel template with VB automation
Scripts for visualisation
Scripts for code & test generation

Linked it with CSP
CSP: Communicating Sequential Processes
Tools to check the CSP model
10
I-Mathic – Overview

11
Applying I-Mathic

Some results

12
Example Project – Assembléon AX
1..20 Pick & Place Robots

PP

PP

PP

…

PP

PP

Run in

Run out

Transport system containing PCB’s
13
Example Project – AX Kernel
AX Kernel

GUI intf
(29 states)

Process Ctrl
Glue intf
(11 states)
‘Glue’

TERM

GPE

PPC

GPE

TC

GPE

SVS

GPE

UTL
Monitor

GPE intf
(17 states)
Module intf
(10 states)
14
Example Sequence Enumeration (fragment)
0:<>
1 Cl.rqStartProduction
2 Cl.rqPauseProduction
3 Cl.rqRecover
4 Srv.ntErrorOccured
5 Srv.ntProductionStarted
6 Srv.ntProductionPaused
7 Mod.ntErrorOccured
8 Mod.ntProductionStarted
9 Mod.ntProductionPaused
1:<Cl.rqStartProduction>
10 Cl.rqStartProduction
11 Cl.rqPauseProduction
12 Cl.rqRecover
13 Srv.ntErrorOccured
14 Srv.ntProductionStarted
15 Srv.ntProductionPaused
16 Mod.ntErrorOccured
17 Mod.ntProductionStarted
18 Mod.ntProductionPaused

Mod.rqStartProduction
Illegal
Illegal
Illegal
Illegal
Illegal
Illegal
Illegal
Illegal

1
-

Illegal
Illegal
Illegal
Illegal
Illegal
Illegal
Cl.ntErrorOccured
Srv.rqStartProduction
Illegal

16
17
-

IDLE
GPE.Req1
GPE.Req2
GPE.Req3
GPE.Req1
GPE.Req2
GPE.Req3
MOD.Req1
MOD.Req2
MOD.Req3
STARTING_MOD
D0
D0
D0
GPE.Req1
GPE.Req2
GPE.Req3
Module in ERROR
MOD.Req1
Module in RUN state MOD.Req2
MOD.Req3

The Component Function is complete
Maps every possible input sequence to response

The Component is the right system
Every transition rule justified, full requirements tracing
Derived requirements fill the gaps
15
Results – Model Checking
Model checker explores all state combinations of the CSP
model ensuring that:
Model is deterministic
Model implements interface according to
specification
There are no deadlocks
Finite queue size is sufficient
Queues are never full (processes behave freely)

16
Results – Project Performance
Size and Effort
A

B

C

194

38

20

3000

1240

390

16050

10715

4690

Effort (man days)

112

81,5

38,5

Productivity (eLocs/man day)

143

131

122

A

B

C

During Internal verification

5

7

5

During Acceptance

0

0

0

Post Release

3

3

0

0.2

0.3

0.0

States
Transitions
Code Size (eLocs)

Defects

Post Release Defects per 1000 eLoc

17
Example – Quick Scan
Used to model part of an existing system
System Characteristics:
Data driven multi-media application
Multi-threaded components
“Mature software”
Approach:
Reverse-engineered models for a few scenario’s
with help from domain expert
Ran model checks
18
Example – Quick Scan
Scope:
2 interfaces & 1 implementation modelled
Interface 1: 5 states, 12 transitions
Interface 2: 10 states, 39 transitions
Implementation: 6 states, 44 transitions
Result:
Potential deadlock detected
Several undocumented requirements revealed
Total effort spent: <12 man days
Including customer effort & writing report
19
Applying I-Mathic

Benefits and Drawbacks

20
Benefits

Encourages interaction with stakeholders
Sufficiently understandable
Consistent and complete requirements

Few defects
Deadlock free; No race conditions
Simple defects, easy to solve

High productivity
Partly due to code generation
Partly due to reduced test effort
21
Drawbacks

Limited integration with other methods
and tools
I-Mathic is a very different approach

Requires abstract thinking and discipline
which not all software engineers have!

22
How does it scale?

Current data is on relatively small projects
Expected to scale well, considering the
integration effort and defects
Maybe next year we’ll know?

23
I-Mathic

Current Status

24
Current status

Mandated for use in in-house projects
Quick Scan
Support for multi-threaded components
Regular additions to toolset
E.g. context sensitive menu’s

Ongoing development:
Research together with Dutch universities

25
References

Cleanroom Software Engineering
Mills, H.; Dyer, M.; & Linger, R.
IEEE Software, September 1987

Communicating Sequential Processes
Hoare, C.A.R.
Prentice Hall, April 1985
ISBN: 0131532715

26
Thank you
Any questions?
Robert van Lieshout
Robert.vanLieshout@imtech.nl
www.imtechict.nl

27

More Related Content

PPTX
#1 formal methods – introduction for software engineering
PPT
Formal meth
PPT
Formal Method for Avionics Software Verification
PPTX
formal verification
PPS
Formal Methods
PPT
Classic Formal Methods Model Checking
PDF
Formal Verification
PDF
Learn Bug Reporting Techniques
#1 formal methods – introduction for software engineering
Formal meth
Formal Method for Avionics Software Verification
formal verification
Formal Methods
Classic Formal Methods Model Checking
Formal Verification
Learn Bug Reporting Techniques

What's hot (20)

PDF
Software Testing Techniques: An Overview
PPTX
unit testing and debugging
PPTX
Introduction to formal methods
PDF
Intro to Software Engineering - Software Testing
PPTX
H testing and debugging
PDF
Model Checking History
PPTX
Structural and functional testing
PPT
Taxonomy for bugs
PPT
SECh1920
PPTX
WHITE BOX & BLACK BOX TESTING IN DATABASE
PPS
Testing techniques
PPT
Software coding and testing
PPTX
White box & Black box testing
PPT
testing
PPT
Black Box Testing
PPTX
Different techniques-of-software-testing
PPTX
Test design techniques
PPTX
Unit 3 Control Flow Testing
PPTX
Introduction to White box testing
PPT
Software Testing
Software Testing Techniques: An Overview
unit testing and debugging
Introduction to formal methods
Intro to Software Engineering - Software Testing
H testing and debugging
Model Checking History
Structural and functional testing
Taxonomy for bugs
SECh1920
WHITE BOX & BLACK BOX TESTING IN DATABASE
Testing techniques
Software coding and testing
White box & Black box testing
testing
Black Box Testing
Different techniques-of-software-testing
Test design techniques
Unit 3 Control Flow Testing
Introduction to White box testing
Software Testing
Ad

Viewers also liked (6)

PPTX
Formal methods 1 - introduction
PDF
Industrial use of formal methods
PPTX
Formal Methods lecture 01
PPT
Formal Specification in Software Engineering SE9
PPTX
Software quality
PPTX
List of Software Development Model and Methods
Formal methods 1 - introduction
Industrial use of formal methods
Formal Methods lecture 01
Formal Specification in Software Engineering SE9
Software quality
List of Software Development Model and Methods
Ad

Similar to Using formal methods in Industrial Software Development (20)

PPT
Software Development Process and Models.ppt
PPTX
RPA_EC_2Cre_Chapter 03-Process Methodologies.pptx
PPT
Waterfall model
PPTX
Machine Learning in Software Engineering
PDF
Presentation Verification & Validation
PDF
SE-Lecture01[3629105 advanced software ].PDF
PPT
Metrics
PDF
Making Model-Driven Verification Practical and Scalable: Experiences and Less...
PPT
System Development Life Cycle Overview.ppt
PPT
CS2006Ch02A.ppt dfxgbfdcgbhfcdhbfdcbfdcgfdg
PPT
Software Process Models
PPT
I07 Simulation
PPT
I07 Simulation
PPTX
LECTURE 155662355366589625633022333.pptx
PDF
Mathematical Modeling using MATLAB, by U.M. Sundar Senior Application Enginee...
PDF
Measuring Productivity from Model-Based Development
PDF
Software_effort_estimation for Software engineering.pdf
PPTX
Aspiring Minds | Automata
PPT
software project management.lpu.slide.ansh.gupta
PPT
Mps intro
Software Development Process and Models.ppt
RPA_EC_2Cre_Chapter 03-Process Methodologies.pptx
Waterfall model
Machine Learning in Software Engineering
Presentation Verification & Validation
SE-Lecture01[3629105 advanced software ].PDF
Metrics
Making Model-Driven Verification Practical and Scalable: Experiences and Less...
System Development Life Cycle Overview.ppt
CS2006Ch02A.ppt dfxgbfdcgbhfcdhbfdcbfdcgfdg
Software Process Models
I07 Simulation
I07 Simulation
LECTURE 155662355366589625633022333.pptx
Mathematical Modeling using MATLAB, by U.M. Sundar Senior Application Enginee...
Measuring Productivity from Model-Based Development
Software_effort_estimation for Software engineering.pdf
Aspiring Minds | Automata
software project management.lpu.slide.ansh.gupta
Mps intro

Recently uploaded (20)

PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
KodekX | Application Modernization Development
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Encapsulation theory and applications.pdf
PPTX
Cloud computing and distributed systems.
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
DOCX
The AUB Centre for AI in Media Proposal.docx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Empathic Computing: Creating Shared Understanding
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Approach and Philosophy of On baking technology
PPTX
Programs and apps: productivity, graphics, security and other tools
PPT
Teaching material agriculture food technology
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
KodekX | Application Modernization Development
Building Integrated photovoltaic BIPV_UPV.pdf
Encapsulation theory and applications.pdf
Cloud computing and distributed systems.
MYSQL Presentation for SQL database connectivity
Understanding_Digital_Forensics_Presentation.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Per capita expenditure prediction using model stacking based on satellite ima...
The AUB Centre for AI in Media Proposal.docx
“AI and Expert System Decision Support & Business Intelligence Systems”
Empathic Computing: Creating Shared Understanding
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
The Rise and Fall of 3GPP – Time for a Sabbatical?
Approach and Philosophy of On baking technology
Programs and apps: productivity, graphics, security and other tools
Teaching material agriculture food technology
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...

Using formal methods in Industrial Software Development

  • 1. Using Formal Methods in Industrial Software Development European SEPG Conference London, June 2005 Robert van Lieshout, Quality Manager Robert.vanLieshout@imtech.nl 1
  • 2. “Quality through Commitment and Creativity” 2
  • 3. Engineering and Mathematics Every branch of Engineering uses Mathematics for Specification, Design and Verification Mechanical Engineering => Differential Equations Structural Engineering => Finite Element Analysis Circuit Engineering => Boolean Algebra, etc Except Software Engineering Originally a specialization within Mathematics! Most Software is specified and designed without using mathematics Software specifications and designs cannot be verified before implementation Software testing must find specification, design and implementation errors 3
  • 4. Presentation Outline Formal Methods – then and now I-Mathic – an overview Applying I-Mathic – some results Benefits and Drawbacks Current status 4
  • 6. Formal Methods – Then ... Formal Methods have promised much and delivered little: The solution is often more complicated than the problem Formal specifications use difficult notations and require extensive mathematical background Critical Stakeholders - Business Analysts, Domain Experts and Customers - cannot understand the formal specifications Critical Stakeholders excluded from the process 6
  • 7. Formal Methods – Now Growing interest in Formal Methods See: http://www.fmeurope.org/ Several methods with different objectives Proof of selected properties, rather than full correctness proof Tool support and computing power have: Reduced laboriousness Improved user-friendliness (sometimes) Made it less time consuming 7
  • 8. The I-Mathic Formal Method An overview 8
  • 9. I-Mathic Principles Design Principle Developers can and should strive to produce software that is nearly error free when entering testing Testing Principle The purpose of testing is quality measurement and not an attempt to “test in” quality 9
  • 10. I-Mathic – Origins Used a small part of Cleanroom Sw. Eng. Sequence Enumeration Developed tool support Excel template with VB automation Scripts for visualisation Scripts for code & test generation Linked it with CSP CSP: Communicating Sequential Processes Tools to check the CSP model 10
  • 13. Example Project – Assembléon AX 1..20 Pick & Place Robots PP PP PP … PP PP Run in Run out Transport system containing PCB’s 13
  • 14. Example Project – AX Kernel AX Kernel GUI intf (29 states) Process Ctrl Glue intf (11 states) ‘Glue’ TERM GPE PPC GPE TC GPE SVS GPE UTL Monitor GPE intf (17 states) Module intf (10 states) 14
  • 15. Example Sequence Enumeration (fragment) 0:<> 1 Cl.rqStartProduction 2 Cl.rqPauseProduction 3 Cl.rqRecover 4 Srv.ntErrorOccured 5 Srv.ntProductionStarted 6 Srv.ntProductionPaused 7 Mod.ntErrorOccured 8 Mod.ntProductionStarted 9 Mod.ntProductionPaused 1:<Cl.rqStartProduction> 10 Cl.rqStartProduction 11 Cl.rqPauseProduction 12 Cl.rqRecover 13 Srv.ntErrorOccured 14 Srv.ntProductionStarted 15 Srv.ntProductionPaused 16 Mod.ntErrorOccured 17 Mod.ntProductionStarted 18 Mod.ntProductionPaused Mod.rqStartProduction Illegal Illegal Illegal Illegal Illegal Illegal Illegal Illegal 1 - Illegal Illegal Illegal Illegal Illegal Illegal Cl.ntErrorOccured Srv.rqStartProduction Illegal 16 17 - IDLE GPE.Req1 GPE.Req2 GPE.Req3 GPE.Req1 GPE.Req2 GPE.Req3 MOD.Req1 MOD.Req2 MOD.Req3 STARTING_MOD D0 D0 D0 GPE.Req1 GPE.Req2 GPE.Req3 Module in ERROR MOD.Req1 Module in RUN state MOD.Req2 MOD.Req3 The Component Function is complete Maps every possible input sequence to response The Component is the right system Every transition rule justified, full requirements tracing Derived requirements fill the gaps 15
  • 16. Results – Model Checking Model checker explores all state combinations of the CSP model ensuring that: Model is deterministic Model implements interface according to specification There are no deadlocks Finite queue size is sufficient Queues are never full (processes behave freely) 16
  • 17. Results – Project Performance Size and Effort A B C 194 38 20 3000 1240 390 16050 10715 4690 Effort (man days) 112 81,5 38,5 Productivity (eLocs/man day) 143 131 122 A B C During Internal verification 5 7 5 During Acceptance 0 0 0 Post Release 3 3 0 0.2 0.3 0.0 States Transitions Code Size (eLocs) Defects Post Release Defects per 1000 eLoc 17
  • 18. Example – Quick Scan Used to model part of an existing system System Characteristics: Data driven multi-media application Multi-threaded components “Mature software” Approach: Reverse-engineered models for a few scenario’s with help from domain expert Ran model checks 18
  • 19. Example – Quick Scan Scope: 2 interfaces & 1 implementation modelled Interface 1: 5 states, 12 transitions Interface 2: 10 states, 39 transitions Implementation: 6 states, 44 transitions Result: Potential deadlock detected Several undocumented requirements revealed Total effort spent: <12 man days Including customer effort & writing report 19
  • 21. Benefits Encourages interaction with stakeholders Sufficiently understandable Consistent and complete requirements Few defects Deadlock free; No race conditions Simple defects, easy to solve High productivity Partly due to code generation Partly due to reduced test effort 21
  • 22. Drawbacks Limited integration with other methods and tools I-Mathic is a very different approach Requires abstract thinking and discipline which not all software engineers have! 22
  • 23. How does it scale? Current data is on relatively small projects Expected to scale well, considering the integration effort and defects Maybe next year we’ll know? 23
  • 25. Current status Mandated for use in in-house projects Quick Scan Support for multi-threaded components Regular additions to toolset E.g. context sensitive menu’s Ongoing development: Research together with Dutch universities 25
  • 26. References Cleanroom Software Engineering Mills, H.; Dyer, M.; & Linger, R. IEEE Software, September 1987 Communicating Sequential Processes Hoare, C.A.R. Prentice Hall, April 1985 ISBN: 0131532715 26
  • 27. Thank you Any questions? Robert van Lieshout Robert.vanLieshout@imtech.nl www.imtechict.nl 27