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

What's hot (20)

PDF
Software Testing Techniques: An Overview
QA InfoTech
 
PPTX
unit testing and debugging
KarthigaGunasekaran1
 
PPTX
Introduction to formal methods
Inzemamul Haque
 
PDF
Intro to Software Engineering - Software Testing
Radu_Negulescu
 
PPTX
H testing and debugging
missstevenson01
 
PDF
Model Checking History
Anit Thapaliya
 
PPTX
Structural and functional testing
Himanshu
 
PPT
Taxonomy for bugs
Harika Krupal
 
PPT
SECh1920
Joe Christensen
 
PPTX
WHITE BOX & BLACK BOX TESTING IN DATABASE
Salman Memon
 
PPS
Testing techniques
RaginiRohatgi
 
PPT
Software coding and testing
Sandeep Kumar Nayak
 
PPTX
White box & Black box testing
NitishMhaske1
 
PPT
testing
Rashmi Deoli
 
PPT
Black Box Testing
Nivetha Padmanaban
 
PPTX
Different techniques-of-software-testing
pooja deshmukh
 
PPTX
Test design techniques
Mohamed Elshenawy
 
PPTX
Unit 3 Control Flow Testing
ravikhimani
 
PPTX
Introduction to White box testing
Aliaa Monier Ismaail
 
PPT
Software Testing
Kiran Kumar
 
Software Testing Techniques: An Overview
QA InfoTech
 
unit testing and debugging
KarthigaGunasekaran1
 
Introduction to formal methods
Inzemamul Haque
 
Intro to Software Engineering - Software Testing
Radu_Negulescu
 
H testing and debugging
missstevenson01
 
Model Checking History
Anit Thapaliya
 
Structural and functional testing
Himanshu
 
Taxonomy for bugs
Harika Krupal
 
SECh1920
Joe Christensen
 
WHITE BOX & BLACK BOX TESTING IN DATABASE
Salman Memon
 
Testing techniques
RaginiRohatgi
 
Software coding and testing
Sandeep Kumar Nayak
 
White box & Black box testing
NitishMhaske1
 
testing
Rashmi Deoli
 
Black Box Testing
Nivetha Padmanaban
 
Different techniques-of-software-testing
pooja deshmukh
 
Test design techniques
Mohamed Elshenawy
 
Unit 3 Control Flow Testing
ravikhimani
 
Introduction to White box testing
Aliaa Monier Ismaail
 
Software Testing
Kiran Kumar
 

Viewers also liked (6)

PPTX
Formal methods 1 - introduction
Vlad Patryshev
 
PDF
Industrial use of formal methods
Jonathan Bowen
 
PPTX
Formal Methods lecture 01
Sidra Ashraf
 
PPT
Formal Specification in Software Engineering SE9
koolkampus
 
PPTX
Software quality
Sara Mehmood
 
PPTX
List of Software Development Model and Methods
Riant Soft
 
Formal methods 1 - introduction
Vlad Patryshev
 
Industrial use of formal methods
Jonathan Bowen
 
Formal Methods lecture 01
Sidra Ashraf
 
Formal Specification in Software Engineering SE9
koolkampus
 
Software quality
Sara Mehmood
 
List of Software Development Model and Methods
Riant Soft
 
Ad

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

PPTX
Software Testing 1/5
Damian T. Gordon
 
PPTX
Statistical test based model in software engineering
yashpurohit2020
 
DOC
Student copybca sem3-se
anilmanu2001
 
PPTX
Software Testing_A_mmmmmmmmmmmmmmmmmmmmm
IwannatelluAstorylas
 
PDF
Unit 1 sepm cleanroom engineering
KanchanPatil34
 
PPT
SE-CyclomaticComplexityand Testing.ppt
vishal choudhary
 
PPTX
Software Development and Quality
Herwig Habenbacher
 
PPTX
Unit 4- Testing.pptx
LSURYAPRAKASHREDDY
 
PPTX
Cleanroom montaser hamza iraq2016
montaser185
 
PPTX
Software Engineering by Pankaj Jalote
Golda Margret Sheeba J
 
PDF
software engineering unit 3 chapter1-190805164730.pdf
SomnathMule5
 
PDF
Software systems engineering PRINCIPLES
Ivano Malavolta
 
PPT
Software requirement verification & validation
Abdul Basit
 
PPTX
Software testing methods
Homa Pourmohammadi
 
PPT
Software engineering
Rohan Bhatkar
 
PPT
Software testing & its technology
Hasam Panezai
 
PDF
Empirical Software Engineering And Verification International Summer Schools ...
qrrfzwkfe4665
 
PPT
Chapter 8 - Software Testing.ppt
GentaSahuri2
 
PPT
Cnpm bkdn
Ankit yadav
 
PPTX
SOFTWARE_ENGINEERING_UNIT_I_ROGER S PRESSMAN_A PRACTIONAR'S APPROACH.pptx
Jeeva Dharshini K
 
Software Testing 1/5
Damian T. Gordon
 
Statistical test based model in software engineering
yashpurohit2020
 
Student copybca sem3-se
anilmanu2001
 
Software Testing_A_mmmmmmmmmmmmmmmmmmmmm
IwannatelluAstorylas
 
Unit 1 sepm cleanroom engineering
KanchanPatil34
 
SE-CyclomaticComplexityand Testing.ppt
vishal choudhary
 
Software Development and Quality
Herwig Habenbacher
 
Unit 4- Testing.pptx
LSURYAPRAKASHREDDY
 
Cleanroom montaser hamza iraq2016
montaser185
 
Software Engineering by Pankaj Jalote
Golda Margret Sheeba J
 
software engineering unit 3 chapter1-190805164730.pdf
SomnathMule5
 
Software systems engineering PRINCIPLES
Ivano Malavolta
 
Software requirement verification & validation
Abdul Basit
 
Software testing methods
Homa Pourmohammadi
 
Software engineering
Rohan Bhatkar
 
Software testing & its technology
Hasam Panezai
 
Empirical Software Engineering And Verification International Summer Schools ...
qrrfzwkfe4665
 
Chapter 8 - Software Testing.ppt
GentaSahuri2
 
Cnpm bkdn
Ankit yadav
 
SOFTWARE_ENGINEERING_UNIT_I_ROGER S PRESSMAN_A PRACTIONAR'S APPROACH.pptx
Jeeva Dharshini K
 
Ad

Recently uploaded (20)

PDF
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
PDF
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Complete Network Protection with Real-Time Security
L4RGINDIA
 
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
July Patch Tuesday
Ivanti
 
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Complete Network Protection with Real-Time Security
L4RGINDIA
 

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 [email protected] 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 [email protected] www.imtechict.nl 27