SlideShare una empresa de Scribd logo
1 de 52
Dependable software development ,[object Object]
Software dependability ,[object Object],[object Object]
Dependability achievement ,[object Object],[object Object],[object Object],[object Object],[object Object]
Fault minimisation ,[object Object],[object Object],[object Object]
Fault removal costs a C o s t p e r e r r o r d e l e t e d F e w N u m b e r o f r e s i d u a l e r r o r s M a n y V e r y f e w
Fault-free software development ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Structured programming ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Error-prone constructs ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Error-prone constructs ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Information hiding ,[object Object],[object Object],[object Object],[object Object],[object Object]
A queue specification in Java interface Queue { public void put (Object o) ; public void remove (Object o) ; public int size () ; } //Queue
Signal declaration in Java
Reliable software processes ,[object Object],[object Object],[object Object]
Process validation activities ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Fault tolerance ,[object Object],[object Object],[object Object]
Fault tolerance actions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Approaches to fault tolerance ,[object Object],[object Object],[object Object],[object Object],[object Object]
Exception management ,[object Object],[object Object],[object Object]
Exceptions in Java class SensorFailureException extends Exception { SensorFailureException (String msg) { super (msg) ; Alarm.activate (msg) ; } } // SensorFailureException  class Sensor { int readVal () throws SensorFailureException { try { int theValue = DeviceIO.readInteger () ; if (theValue < 0) throw new SensorFailureException (&quot;Sensor failure&quot;) ; return theValue ; } catch (deviceIOException e) { throw new SensorFailureException (“ Sensor read error ”) ; } } // readVal }  // Sensor
Programming with exceptions ,[object Object],[object Object]
A temperature controller ,[object Object],[object Object],[object Object],[object Object]
Freezer controller (Java) ©Ian Sommerville 2000 Dependable Software Development Slide  class FreezerController  { Sensor tempSensor = new Sensor () ; Dial tempDial = new Dial () ; float freezerTemp = tempSensor.readVal () ; final float dangerTemp = (float) -18.0 ; final long coolingTime = (long) 200000.0 ; public void run ( )  throws InterrupedException { try { Pump.switchIt (Pump.on) ; do { if (freezerTemp > tempDial.setting ()) if (Pump.status == Pump.off) { Pump.switchIt (Pump.on) ; Thread.sleep (coolingTime) ;  } else if (Pump.status == Pump.on) Pump.switchIt (Pump.off) ; if (freezerTemp > dangerTemp) throw new FreezerTooHotException () ; freezerTemp = tempSensor.readVal () ; } while (true) ; }  // try block catch (FreezerTooHotException f) {  Alarm.activate ( ) ;  } catch (InterruptedException e) { System.out.println (“Thread exception”) ; throw  new InterruptedException ( ) ;  } } //run } // FreezerController
Fault detection ,[object Object],[object Object],[object Object]
Fault detection ,[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],Type system extension
PositiveEvenInteger ©Ian Sommerville 2000 Dependable Software Development Slide  class PositiveEvenInteger { int val = 0 ; PositiveEvenInteger (int n) throws NumericException { if (n < 0 | n%2 == 1) throw new NumericException () ; else val = n ; } // PositiveEvenInteger public void assign (int n) throws NumericException { if (n < 0 | n%2 == 1) throw new NumericException (); else val = n ; } // assign int toInteger () { return val ; } //to Integer boolean equals (PositiveEvenInteger n) { return (val == n.val) ; } // equals } //PositiveEven
Damage assessment ,[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],Damage assessment techniques
Java class with damage   assessment class RobustArray { // Checks that all the objects in an array of objects // conform to some defined constraint boolean [] checkState ; CheckableObject [] theRobustArray ; RobustArray (CheckableObject [] theArray) { checkState = new boolean [theArray.length] ; theRobustArray = theArray ; } //RobustArray public void assessDamage () throws ArrayDamagedException { boolean hasBeenDamaged = false ; for (int i= 0; i <this.theRobustArray.length ; i ++) { if (! theRobustArray [i].check ()) { checkState [i] = true ; hasBeenDamaged = true ; } else checkState [i] = false ; } if (hasBeenDamaged) throw new ArrayDamagedException () ; } //assessDamage } // RobustArray ©Ian Sommerville 2000 Dependable Software Development Slide
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fault recovery
[object Object],[object Object],[object Object],[object Object],[object Object],Forward recovery
[object Object],[object Object],Backward recovery
Safe sort procedure ,[object Object],[object Object],[object Object],[object Object]
Safe sort procedure (Java) class SafeSort { static void sort ( int [] intarray, int order ) throws SortError { int [] copy = new int [intarray.length]; // copy the input array for (int i = 0; i < intarray.length ; i++) copy [i] = intarray [i] ; try { Sort.bubblesort (intarray, intarray.length, order) ; if (order == Sort.ascending) for (int i = 0; i <= intarray.length-2 ; i++) if (intarray [i] > intarray [i+1]) throw new SortError () ; else for (int i = 0; i <= intarray.length-2 ; i++) if (intarray [i+1] > intarray [i]) throw new SortError () ; } // try block catch (SortError e ) { for (int i = 0; i < intarray.length ; i++) intarray [i] = copy [i] ; throw new SortError (&quot;Array not sorted&quot;) ; } //catch } // sort } // SafeSort ©Ian Sommerville 2000 Dependable Software Development Slide
Key points ,[object Object],[object Object],[object Object],[object Object]
Fault tolerant architecture ,[object Object],[object Object],[object Object],[object Object]
Hardware fault tolerance ,[object Object],[object Object],[object Object],[object Object]
Hardware reliability with TMR
Output selection ,[object Object],[object Object],[object Object]
Fault tolerant software architectures ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Design diversity ,[object Object],[object Object],[object Object],[object Object],[object Object]
Software analogies to TMR ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
N-version programming
Output comparison ,[object Object],[object Object]
N-version programming ,[object Object],[object Object]
Recovery blocks
Recovery blocks ,[object Object],[object Object],[object Object]
Problems with design diversity ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Specification dependency ,[object Object],[object Object],[object Object]
Is software redundancy needed? ,[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],Key points
Key points ,[object Object],[object Object],[object Object],[object Object]

Más contenido relacionado

La actualidad más candente

White Box Testing And Control Flow & Loop Testing
White Box Testing And Control Flow & Loop TestingWhite Box Testing And Control Flow & Loop Testing
White Box Testing And Control Flow & Loop Testing
Ankit Mulani
 

La actualidad más candente (20)

Software Testing Basics
Software Testing BasicsSoftware Testing Basics
Software Testing Basics
 
What Is IoT, IoT Testing And What Are Its Challenges | BugRaptors
What Is IoT, IoT Testing And What Are Its Challenges | BugRaptorsWhat Is IoT, IoT Testing And What Are Its Challenges | BugRaptors
What Is IoT, IoT Testing And What Are Its Challenges | BugRaptors
 
STM -32
STM -32STM -32
STM -32
 
Introduction to software testing
Introduction to software testingIntroduction to software testing
Introduction to software testing
 
Infographic: Importance of Performance Testing
Infographic: Importance of Performance TestingInfographic: Importance of Performance Testing
Infographic: Importance of Performance Testing
 
SOFTWARE TESTING
SOFTWARE TESTINGSOFTWARE TESTING
SOFTWARE TESTING
 
Unit Testing vs Integration Testing
Unit Testing vs Integration TestingUnit Testing vs Integration Testing
Unit Testing vs Integration Testing
 
Software testing tools (free and open source)
Software testing tools (free and open source)Software testing tools (free and open source)
Software testing tools (free and open source)
 
White Box Testing And Control Flow & Loop Testing
White Box Testing And Control Flow & Loop TestingWhite Box Testing And Control Flow & Loop Testing
White Box Testing And Control Flow & Loop Testing
 
Top Technology Trends in IoT for 2022
Top Technology Trends in IoT for 2022Top Technology Trends in IoT for 2022
Top Technology Trends in IoT for 2022
 
Structural and functional testing
Structural and functional testingStructural and functional testing
Structural and functional testing
 
Types of test tools
Types of test toolsTypes of test tools
Types of test tools
 
Software testing life cycle
Software testing life cycleSoftware testing life cycle
Software testing life cycle
 
What is Integration Testing? | Edureka
What is Integration Testing? | EdurekaWhat is Integration Testing? | Edureka
What is Integration Testing? | Edureka
 
Software testing ppt
Software testing pptSoftware testing ppt
Software testing ppt
 
Software Verification & Validation
Software Verification & ValidationSoftware Verification & Validation
Software Verification & Validation
 
Basics in software testing
Basics in software testingBasics in software testing
Basics in software testing
 
Unit 4
Unit 4Unit 4
Unit 4
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Data in Motion vs Data at Rest
Data in Motion vs Data at RestData in Motion vs Data at Rest
Data in Motion vs Data at Rest
 

Similar a Dependable Software Development in Software Engineering SE18

Code Coverage in Theory and in practice form the DO178B perspective
Code Coverage in Theory and in practice form the DO178B perspective   Code Coverage in Theory and in practice form the DO178B perspective
Code Coverage in Theory and in practice form the DO178B perspective
Engineering Software Lab
 
Fault Tolerance System
Fault Tolerance SystemFault Tolerance System
Fault Tolerance System
Ehsan Ilahi
 
Monitor(karthika)
Monitor(karthika)Monitor(karthika)
Monitor(karthika)
Nagarajan
 
Critical System Specification in Software Engineering SE17
Critical System Specification in Software Engineering SE17Critical System Specification in Software Engineering SE17
Critical System Specification in Software Engineering SE17
koolkampus
 
Ch13-Software Engineering 9
Ch13-Software Engineering 9Ch13-Software Engineering 9
Ch13-Software Engineering 9
Ian Sommerville
 
st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...
st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...
st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...
mwpeexdvjgtqujwhog
 

Similar a Dependable Software Development in Software Engineering SE18 (20)

Ch20
Ch20Ch20
Ch20
 
Software Fault Tolerance
Software Fault ToleranceSoftware Fault Tolerance
Software Fault Tolerance
 
Automating The Process For Building Reliable Software
Automating The Process For Building Reliable SoftwareAutomating The Process For Building Reliable Software
Automating The Process For Building Reliable Software
 
KYS SSD - SOMMERVILE CH13-SECURE PROGRAMMING.pptx
KYS SSD - SOMMERVILE CH13-SECURE PROGRAMMING.pptxKYS SSD - SOMMERVILE CH13-SECURE PROGRAMMING.pptx
KYS SSD - SOMMERVILE CH13-SECURE PROGRAMMING.pptx
 
Ch13.pptx
Ch13.pptxCh13.pptx
Ch13.pptx
 
Code coverage in theory and in practice form the do178 b perspective
Code coverage in theory and in practice form the do178 b perspectiveCode coverage in theory and in practice form the do178 b perspective
Code coverage in theory and in practice form the do178 b perspective
 
Code Coverage in Theory and in practice form the DO178B perspective
Code Coverage in Theory and in practice form the DO178B perspective   Code Coverage in Theory and in practice form the DO178B perspective
Code Coverage in Theory and in practice form the DO178B perspective
 
Software reliability
Software reliabilitySoftware reliability
Software reliability
 
Ch13
Ch13Ch13
Ch13
 
Fault Tolerance System
Fault Tolerance SystemFault Tolerance System
Fault Tolerance System
 
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
Parasoft .TEST, Write better C# Code Using  Data Flow Analysis Parasoft .TEST, Write better C# Code Using  Data Flow Analysis
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
 
Monitor(karthika)
Monitor(karthika)Monitor(karthika)
Monitor(karthika)
 
Different Techniques Of Debugging Selenium Based Test Scripts.pdf
Different Techniques Of Debugging Selenium Based Test Scripts.pdfDifferent Techniques Of Debugging Selenium Based Test Scripts.pdf
Different Techniques Of Debugging Selenium Based Test Scripts.pdf
 
Critical System Specification in Software Engineering SE17
Critical System Specification in Software Engineering SE17Critical System Specification in Software Engineering SE17
Critical System Specification in Software Engineering SE17
 
Ch13-Software Engineering 9
Ch13-Software Engineering 9Ch13-Software Engineering 9
Ch13-Software Engineering 9
 
Chapter 2 program-security
Chapter 2 program-securityChapter 2 program-security
Chapter 2 program-security
 
SE2018_Lec 19_ Software Testing
SE2018_Lec 19_ Software TestingSE2018_Lec 19_ Software Testing
SE2018_Lec 19_ Software Testing
 
st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...
st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...
st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...
 
Lecture 20-21
Lecture 20-21Lecture 20-21
Lecture 20-21
 
Manual testing interview questions
Manual testing interview questionsManual testing interview questions
Manual testing interview questions
 

Más de koolkampus

Local Area Networks in Data Communication DC24
Local Area Networks in Data Communication DC24Local Area Networks in Data Communication DC24
Local Area Networks in Data Communication DC24
koolkampus
 
Bit Oriented Protocols in Data Communication DC23
Bit Oriented Protocols in Data Communication DC23Bit Oriented Protocols in Data Communication DC23
Bit Oriented Protocols in Data Communication DC23
koolkampus
 
Data Link Control in Data Communication DC20
Data Link Control in Data Communication DC20Data Link Control in Data Communication DC20
Data Link Control in Data Communication DC20
koolkampus
 
Error Detection and Correction in Data Communication DC18
Error Detection and Correction in Data Communication DC18Error Detection and Correction in Data Communication DC18
Error Detection and Correction in Data Communication DC18
koolkampus
 
TDM in Data Communication DC16
TDM in Data Communication DC16TDM in Data Communication DC16
TDM in Data Communication DC16
koolkampus
 
Radio Communication Band(Data Communication) DC14
Radio Communication Band(Data Communication) DC14Radio Communication Band(Data Communication) DC14
Radio Communication Band(Data Communication) DC14
koolkampus
 
Connectors in Data Communication DC12
Connectors in Data Communication DC12Connectors in Data Communication DC12
Connectors in Data Communication DC12
koolkampus
 
Transmission of Digital Data(Data Communication) DC11
Transmission of Digital Data(Data Communication) DC11Transmission of Digital Data(Data Communication) DC11
Transmission of Digital Data(Data Communication) DC11
koolkampus
 
Analog to Digital Encoding in Data Communication DC9
Analog to Digital Encoding in Data Communication DC9Analog to Digital Encoding in Data Communication DC9
Analog to Digital Encoding in Data Communication DC9
koolkampus
 
Signal with DC Component(Data Communication) DC7
Signal with DC Component(Data Communication) DC7Signal with DC Component(Data Communication) DC7
Signal with DC Component(Data Communication) DC7
koolkampus
 
Layer Examples in Data Communication CD4
Layer Examples in Data Communication CD4Layer Examples in Data Communication CD4
Layer Examples in Data Communication CD4
koolkampus
 
OSI Model (Data Communication) DC3
OSI Model (Data Communication) DC3OSI Model (Data Communication) DC3
OSI Model (Data Communication) DC3
koolkampus
 
Basic Concepts in Data Communication DC1
Basic Concepts in Data Communication DC1Basic Concepts in Data Communication DC1
Basic Concepts in Data Communication DC1
koolkampus
 
Token Passing in Data Communication DC25
Token Passing in Data Communication DC25Token Passing in Data Communication DC25
Token Passing in Data Communication DC25
koolkampus
 
Data Link Protocols in Data Communication DC22
Data Link Protocols in Data Communication DC22Data Link Protocols in Data Communication DC22
Data Link Protocols in Data Communication DC22
koolkampus
 
Flow Control in Data Communication DC21
Flow Control in Data Communication DC21Flow Control in Data Communication DC21
Flow Control in Data Communication DC21
koolkampus
 
CRC in Data Communication DC19
CRC in Data Communication DC19CRC in Data Communication DC19
CRC in Data Communication DC19
koolkampus
 
Telephone Networn in Data Communication DC17
Telephone Networn in Data Communication DC17Telephone Networn in Data Communication DC17
Telephone Networn in Data Communication DC17
koolkampus
 
Multiplexing in Data Communication DC15
Multiplexing in Data Communication DC15Multiplexing in Data Communication DC15
Multiplexing in Data Communication DC15
koolkampus
 
Transmission Media in Data Communication DC13
Transmission Media in Data Communication DC13Transmission Media in Data Communication DC13
Transmission Media in Data Communication DC13
koolkampus
 

Más de koolkampus (20)

Local Area Networks in Data Communication DC24
Local Area Networks in Data Communication DC24Local Area Networks in Data Communication DC24
Local Area Networks in Data Communication DC24
 
Bit Oriented Protocols in Data Communication DC23
Bit Oriented Protocols in Data Communication DC23Bit Oriented Protocols in Data Communication DC23
Bit Oriented Protocols in Data Communication DC23
 
Data Link Control in Data Communication DC20
Data Link Control in Data Communication DC20Data Link Control in Data Communication DC20
Data Link Control in Data Communication DC20
 
Error Detection and Correction in Data Communication DC18
Error Detection and Correction in Data Communication DC18Error Detection and Correction in Data Communication DC18
Error Detection and Correction in Data Communication DC18
 
TDM in Data Communication DC16
TDM in Data Communication DC16TDM in Data Communication DC16
TDM in Data Communication DC16
 
Radio Communication Band(Data Communication) DC14
Radio Communication Band(Data Communication) DC14Radio Communication Band(Data Communication) DC14
Radio Communication Band(Data Communication) DC14
 
Connectors in Data Communication DC12
Connectors in Data Communication DC12Connectors in Data Communication DC12
Connectors in Data Communication DC12
 
Transmission of Digital Data(Data Communication) DC11
Transmission of Digital Data(Data Communication) DC11Transmission of Digital Data(Data Communication) DC11
Transmission of Digital Data(Data Communication) DC11
 
Analog to Digital Encoding in Data Communication DC9
Analog to Digital Encoding in Data Communication DC9Analog to Digital Encoding in Data Communication DC9
Analog to Digital Encoding in Data Communication DC9
 
Signal with DC Component(Data Communication) DC7
Signal with DC Component(Data Communication) DC7Signal with DC Component(Data Communication) DC7
Signal with DC Component(Data Communication) DC7
 
Layer Examples in Data Communication CD4
Layer Examples in Data Communication CD4Layer Examples in Data Communication CD4
Layer Examples in Data Communication CD4
 
OSI Model (Data Communication) DC3
OSI Model (Data Communication) DC3OSI Model (Data Communication) DC3
OSI Model (Data Communication) DC3
 
Basic Concepts in Data Communication DC1
Basic Concepts in Data Communication DC1Basic Concepts in Data Communication DC1
Basic Concepts in Data Communication DC1
 
Token Passing in Data Communication DC25
Token Passing in Data Communication DC25Token Passing in Data Communication DC25
Token Passing in Data Communication DC25
 
Data Link Protocols in Data Communication DC22
Data Link Protocols in Data Communication DC22Data Link Protocols in Data Communication DC22
Data Link Protocols in Data Communication DC22
 
Flow Control in Data Communication DC21
Flow Control in Data Communication DC21Flow Control in Data Communication DC21
Flow Control in Data Communication DC21
 
CRC in Data Communication DC19
CRC in Data Communication DC19CRC in Data Communication DC19
CRC in Data Communication DC19
 
Telephone Networn in Data Communication DC17
Telephone Networn in Data Communication DC17Telephone Networn in Data Communication DC17
Telephone Networn in Data Communication DC17
 
Multiplexing in Data Communication DC15
Multiplexing in Data Communication DC15Multiplexing in Data Communication DC15
Multiplexing in Data Communication DC15
 
Transmission Media in Data Communication DC13
Transmission Media in Data Communication DC13Transmission Media in Data Communication DC13
Transmission Media in Data Communication DC13
 

Último

Último (20)

A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
THE BEST IPTV in GERMANY for 2024: IPTVreel
THE BEST IPTV in  GERMANY for 2024: IPTVreelTHE BEST IPTV in  GERMANY for 2024: IPTVreel
THE BEST IPTV in GERMANY for 2024: IPTVreel
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAK
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 

Dependable Software Development in Software Engineering SE18

  • 1.
  • 2.
  • 3.
  • 4.
  • 5. Fault removal costs a C o s t p e r e r r o r d e l e t e d F e w N u m b e r o f r e s i d u a l e r r o r s M a n y V e r y f e w
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11. A queue specification in Java interface Queue { public void put (Object o) ; public void remove (Object o) ; public int size () ; } //Queue
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19. Exceptions in Java class SensorFailureException extends Exception { SensorFailureException (String msg) { super (msg) ; Alarm.activate (msg) ; } } // SensorFailureException class Sensor { int readVal () throws SensorFailureException { try { int theValue = DeviceIO.readInteger () ; if (theValue < 0) throw new SensorFailureException (&quot;Sensor failure&quot;) ; return theValue ; } catch (deviceIOException e) { throw new SensorFailureException (“ Sensor read error ”) ; } } // readVal } // Sensor
  • 20.
  • 21.
  • 22. Freezer controller (Java) ©Ian Sommerville 2000 Dependable Software Development Slide class FreezerController { Sensor tempSensor = new Sensor () ; Dial tempDial = new Dial () ; float freezerTemp = tempSensor.readVal () ; final float dangerTemp = (float) -18.0 ; final long coolingTime = (long) 200000.0 ; public void run ( ) throws InterrupedException { try { Pump.switchIt (Pump.on) ; do { if (freezerTemp > tempDial.setting ()) if (Pump.status == Pump.off) { Pump.switchIt (Pump.on) ; Thread.sleep (coolingTime) ; } else if (Pump.status == Pump.on) Pump.switchIt (Pump.off) ; if (freezerTemp > dangerTemp) throw new FreezerTooHotException () ; freezerTemp = tempSensor.readVal () ; } while (true) ; } // try block catch (FreezerTooHotException f) { Alarm.activate ( ) ; } catch (InterruptedException e) { System.out.println (“Thread exception”) ; throw new InterruptedException ( ) ; } } //run } // FreezerController
  • 23.
  • 24.
  • 25.
  • 26. PositiveEvenInteger ©Ian Sommerville 2000 Dependable Software Development Slide class PositiveEvenInteger { int val = 0 ; PositiveEvenInteger (int n) throws NumericException { if (n < 0 | n%2 == 1) throw new NumericException () ; else val = n ; } // PositiveEvenInteger public void assign (int n) throws NumericException { if (n < 0 | n%2 == 1) throw new NumericException (); else val = n ; } // assign int toInteger () { return val ; } //to Integer boolean equals (PositiveEvenInteger n) { return (val == n.val) ; } // equals } //PositiveEven
  • 27.
  • 28.
  • 29. Java class with damage assessment class RobustArray { // Checks that all the objects in an array of objects // conform to some defined constraint boolean [] checkState ; CheckableObject [] theRobustArray ; RobustArray (CheckableObject [] theArray) { checkState = new boolean [theArray.length] ; theRobustArray = theArray ; } //RobustArray public void assessDamage () throws ArrayDamagedException { boolean hasBeenDamaged = false ; for (int i= 0; i <this.theRobustArray.length ; i ++) { if (! theRobustArray [i].check ()) { checkState [i] = true ; hasBeenDamaged = true ; } else checkState [i] = false ; } if (hasBeenDamaged) throw new ArrayDamagedException () ; } //assessDamage } // RobustArray ©Ian Sommerville 2000 Dependable Software Development Slide
  • 30.
  • 31.
  • 32.
  • 33.
  • 34. Safe sort procedure (Java) class SafeSort { static void sort ( int [] intarray, int order ) throws SortError { int [] copy = new int [intarray.length]; // copy the input array for (int i = 0; i < intarray.length ; i++) copy [i] = intarray [i] ; try { Sort.bubblesort (intarray, intarray.length, order) ; if (order == Sort.ascending) for (int i = 0; i <= intarray.length-2 ; i++) if (intarray [i] > intarray [i+1]) throw new SortError () ; else for (int i = 0; i <= intarray.length-2 ; i++) if (intarray [i+1] > intarray [i]) throw new SortError () ; } // try block catch (SortError e ) { for (int i = 0; i < intarray.length ; i++) intarray [i] = copy [i] ; throw new SortError (&quot;Array not sorted&quot;) ; } //catch } // sort } // SafeSort ©Ian Sommerville 2000 Dependable Software Development Slide
  • 35.
  • 36.
  • 37.
  • 39.
  • 40.
  • 41.
  • 42.
  • 44.
  • 45.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.