SlideShare una empresa de Scribd logo
1 de 26
Formal Method
Lecture # 3
Umber Noureen Abbas
Lecturer
Department of Computer Science
10/27/2022
Computer Science Department,
University of Sahiwal
1
Software
• Computer software, or simply software, is a
collection of data or computer instructions
that tell the computer how to work.
• It is used not only to provide applications on
our PC, but also to control many systems
around us.
• Often the software is integrated into a
mechanical or electronic system (called
embedded software).
10/27/2022
Computer Science Department,
University of Sahiwal
2
High Integrity Software
• Software that has a higher expectation of
correctness called as high integrity software.
• This expectation of correctness is closely
linked to the risks inherent in software failure.
• Therefore, the development of high integrity
software demands greater resources than the
development of a ‘regular’ software product.
10/27/2022
Computer Science Department,
University of Sahiwal
3
Critical Software
• The term critical software applies to software
that cause danger while failure.
• Critical software can further be categorized
depending upon the types of danger imposed
by failure.
– business critical software
– mission critical software
– safety critical software
10/27/2022
Computer Science Department,
University of Sahiwal
4
Business Critical Software
• Failure could adversely affect the economic
success of an enterprise;
• Examples include
– Software used to control a bank’s ATM
transactions
– software aimed at providing security for sensitive
information.
10/27/2022
Computer Science Department,
University of Sahiwal
5
Mission Critical Software
• Failure could impair the goal of the given
mission;
• Examples
– Satellite Operation
– Rocket Launch Systems.
10/27/2022
Computer Science Department,
University of Sahiwal
6
Safety Critical Software
• It could result in harm to people, property or
the environment;
• Examples include
– Medical software
– Air traffic control software.
10/27/2022
Computer Science Department,
University of Sahiwal
7
The Importance of the Specification
• When a software contains an ‘error’ we mean
it does not behave as expected.
• There could be two reasons for this;
– either the software does not conform to its
specification
– there are errors or omissions in the original
specification
10/27/2022
Computer Science Department,
University of Sahiwal
8
Do you know?
• The crash of the European Ariane5 rocket,
because of a software failure
– Rocket took 10 years and 7 billion dollars to
develop
• Radiation overdose in medical equipment
– failed to detect the radiation overdose and causes
death of several patients
10/27/2022
Computer Science Department,
University of Sahiwal
9
Testing
• is the process of locate these software errors.
• Testing involves running a program with a set
of inputs and comparing the actual outputs
from the program against the expected
outputs (as defined in the specification).
10/27/2022
Computer Science Department,
University of Sahiwal
10
Testing limitation
• Testing cannot take place until some
implementation is available.
• Testing can only help to uncover errors – it
cannot guarantee the absence of them.
• Testing is always carried out with respect to
specification. If the specification is ambiguous,
test/software will fail always.
10/27/2022
Computer Science Department,
University of Sahiwal
11
Mechanism for Formal methods
Ambiguities in the specification and the limitations of
testing can result in errors in the final application
10/27/2022
Computer Science Department,
University of Sahiwal
12
Formal Specification
• There are two important aspects to an object:
• The information
– that it holds (referred to as its attributes)
• The things
– it can do (referred to as its methods or
operations).
10/27/2022
Computer Science Department,
University of Sahiwal
13
Class Diagram
a typical UML class diagram
specifying a BankAccount class.
10/27/2022
Computer Science Department,
University of Sahiwal
14
Method (withdraw)
• receives a requested amount to withdraw
from the bank account
– if there are sufficient funds in the account, meets
the request.
– Returns a boolean value indicating success or
failure of the attempt to withdraw money from
the account.
10/27/2022
Computer Science Department,
University of Sahiwal
15
Formal Methods
• Constitute a branch of software engineering
that incorporates the use of mathematics for
software development.
• A formal method provides a formal language
in which to express the initial specification and
all future design steps towards the final
program.
10/27/2022
Computer Science Department,
University of Sahiwal
16
Formal Approach
10/27/2022
Computer Science Department,
University of Sahiwal
17
Cont.
• A formal method is more than just a
specification language for recording these
transformations
• It also includes a proof system
– for demonstrating that each transformation
preserves the formal meaning captured in the
previous step
– guaranteeing the correctness of a statement and
relies upon mathematical logic
10/27/2022
Computer Science Department,
University of Sahiwal
18
Advantages of FM
• Formal specifications can help considerably in
generating suitable test cases.
• the ability to analyse a specification
• increasing confidence that the specification
accurately captures the real system requirements
• initial specification can be checked
mathematically
• Proofs can help uncover design errors as soon as
they are made, rather than having to wait for
testing of the final implementation
10/27/2022
Computer Science Department,
University of Sahiwal
19
Method of Specification
• Many formal methods approaches have been
established but these two are principal
approaches
– Algebraic
– model-based
10/27/2022
Computer Science Department,
University of Sahiwal
20
Classifying Leading FMs
Algebraic Model-based
Sequential
systems
• Larch • Vienna Development
Method (VDM)
• Z
• B
Concurrent
Systems
• Calculus of
Communicating
Systems (CCS)
• OBJ
• Prototype Verification
System (PVS)
• Communicating
Sequential Processes
(CSP)
10/27/2022
Computer Science Department,
University of Sahiwal
21
VDM (Vienna development Method)
• VDM specification corresponds closely to the
notion of a class in an object-oriented
methodology
• a lightweight approach
– At first; informal specification of software using
the UML class notation
– formal specification for a UML class in the form of
a VDM specification
10/27/2022
Computer Science Department,
University of Sahiwal
22
A Lightweight Approach
10/27/2022
Computer Science Department,
University of Sahiwal
23
Cont.
• we will examine the data types
– natural numbers
– sets and sequences
• and demonstrate their use through example
specifications.
10/27/2022
Computer Science Department,
University of Sahiwal
24
Questions
Any Question Please?
You can contact me at: umber@uosahiwal.edu.pk
Your Query will be answered within one working day.
10/27/2022
Computer Science Department,
University of Sahiwal
25
Thanks
10/27/2022
Computer Science Department,
University of Sahiwal
26

Más contenido relacionado

Similar a Formal Method

05_SoftwareTesting.pdf student of comuter
05_SoftwareTesting.pdf student of comuter05_SoftwareTesting.pdf student of comuter
05_SoftwareTesting.pdf student of comuterabdulghaffarfrotan20
 
Self-adaptation Challenges for Cloud-based Applications (Feedback Computing 2...
Self-adaptation Challenges for Cloud-based Applications (Feedback Computing 2...Self-adaptation Challenges for Cloud-based Applications (Feedback Computing 2...
Self-adaptation Challenges for Cloud-based Applications (Feedback Computing 2...Soodeh Farokhi
 
“Scrumbear” framework for solving traditional scrum model problems
“Scrumbear” framework for solving traditional scrum model problems“Scrumbear” framework for solving traditional scrum model problems
“Scrumbear” framework for solving traditional scrum model problemsjournalBEEI
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentIJERD Editor
 
Towards formulating dynamic model for predicting defects in system testing us...
Towards formulating dynamic model for predicting defects in system testing us...Towards formulating dynamic model for predicting defects in system testing us...
Towards formulating dynamic model for predicting defects in system testing us...Journal Papers
 
Reliable software in a continuous integration/continuous deployment (CI/CD) e...
Reliable software in a continuous integration/continuous deployment (CI/CD) e...Reliable software in a continuous integration/continuous deployment (CI/CD) e...
Reliable software in a continuous integration/continuous deployment (CI/CD) e...Ann Marie Neufelder
 
Clone of an organization
Clone of an organizationClone of an organization
Clone of an organizationIRJET Journal
 
Software Engineering- Engineering Practice
Software Engineering- Engineering PracticeSoftware Engineering- Engineering Practice
Software Engineering- Engineering PracticeTrinity Dwarka
 
Software Process Models
 Software Process Models  Software Process Models
Software Process Models MohsinAli773
 
Digital Security by Design: ISCF Digital Security by Design Research Projects...
Digital Security by Design: ISCF Digital Security by Design Research Projects...Digital Security by Design: ISCF Digital Security by Design Research Projects...
Digital Security by Design: ISCF Digital Security by Design Research Projects...KTN
 
Lean for Competitive Advantage and Customer Delight
Lean for Competitive Advantage and Customer DelightLean for Competitive Advantage and Customer Delight
Lean for Competitive Advantage and Customer DelightLean India Summit
 
Isita_Pal_Resume_(1)
Isita_Pal_Resume_(1)Isita_Pal_Resume_(1)
Isita_Pal_Resume_(1)Isita Pal
 
IRJET- Development Operations for Continuous Delivery
IRJET- Development Operations for Continuous DeliveryIRJET- Development Operations for Continuous Delivery
IRJET- Development Operations for Continuous DeliveryIRJET Journal
 
Proposed an Integrated Model to Detect The Defect in Software Development Pro...
Proposed an Integrated Model to Detect The Defect in Software Development Pro...Proposed an Integrated Model to Detect The Defect in Software Development Pro...
Proposed an Integrated Model to Detect The Defect in Software Development Pro...Waqas Tariq
 
Alumni Record System
Alumni Record SystemAlumni Record System
Alumni Record SystemIRJET Journal
 

Similar a Formal Method (20)

05_SoftwareTesting.pdf student of comuter
05_SoftwareTesting.pdf student of comuter05_SoftwareTesting.pdf student of comuter
05_SoftwareTesting.pdf student of comuter
 
Self-adaptation Challenges for Cloud-based Applications (Feedback Computing 2...
Self-adaptation Challenges for Cloud-based Applications (Feedback Computing 2...Self-adaptation Challenges for Cloud-based Applications (Feedback Computing 2...
Self-adaptation Challenges for Cloud-based Applications (Feedback Computing 2...
 
Ijetcas14 545
Ijetcas14 545Ijetcas14 545
Ijetcas14 545
 
“Scrumbear” framework for solving traditional scrum model problems
“Scrumbear” framework for solving traditional scrum model problems“Scrumbear” framework for solving traditional scrum model problems
“Scrumbear” framework for solving traditional scrum model problems
 
Waterfall model
Waterfall modelWaterfall model
Waterfall model
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and Development
 
Towards formulating dynamic model for predicting defects in system testing us...
Towards formulating dynamic model for predicting defects in system testing us...Towards formulating dynamic model for predicting defects in system testing us...
Towards formulating dynamic model for predicting defects in system testing us...
 
Reliable software in a continuous integration/continuous deployment (CI/CD) e...
Reliable software in a continuous integration/continuous deployment (CI/CD) e...Reliable software in a continuous integration/continuous deployment (CI/CD) e...
Reliable software in a continuous integration/continuous deployment (CI/CD) e...
 
2-models.pptx
2-models.pptx2-models.pptx
2-models.pptx
 
Clone of an organization
Clone of an organizationClone of an organization
Clone of an organization
 
Software Engineering- Engineering Practice
Software Engineering- Engineering PracticeSoftware Engineering- Engineering Practice
Software Engineering- Engineering Practice
 
Software Process Models
 Software Process Models  Software Process Models
Software Process Models
 
SPM 3.pdf
SPM 3.pdfSPM 3.pdf
SPM 3.pdf
 
Digital Security by Design: ISCF Digital Security by Design Research Projects...
Digital Security by Design: ISCF Digital Security by Design Research Projects...Digital Security by Design: ISCF Digital Security by Design Research Projects...
Digital Security by Design: ISCF Digital Security by Design Research Projects...
 
Lean for Competitive Advantage and Customer Delight
Lean for Competitive Advantage and Customer DelightLean for Competitive Advantage and Customer Delight
Lean for Competitive Advantage and Customer Delight
 
Isita_Pal_Resume_(1)
Isita_Pal_Resume_(1)Isita_Pal_Resume_(1)
Isita_Pal_Resume_(1)
 
IRJET- Development Operations for Continuous Delivery
IRJET- Development Operations for Continuous DeliveryIRJET- Development Operations for Continuous Delivery
IRJET- Development Operations for Continuous Delivery
 
Sdpl1
Sdpl1Sdpl1
Sdpl1
 
Proposed an Integrated Model to Detect The Defect in Software Development Pro...
Proposed an Integrated Model to Detect The Defect in Software Development Pro...Proposed an Integrated Model to Detect The Defect in Software Development Pro...
Proposed an Integrated Model to Detect The Defect in Software Development Pro...
 
Alumni Record System
Alumni Record SystemAlumni Record System
Alumni Record System
 

Último

Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
An introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxAn introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxPurva Nikam
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction managementMariconPadriquez1
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 

Último (20)

POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
An introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxAn introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptx
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction management
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 

Formal Method

  • 1. Formal Method Lecture # 3 Umber Noureen Abbas Lecturer Department of Computer Science 10/27/2022 Computer Science Department, University of Sahiwal 1
  • 2. Software • Computer software, or simply software, is a collection of data or computer instructions that tell the computer how to work. • It is used not only to provide applications on our PC, but also to control many systems around us. • Often the software is integrated into a mechanical or electronic system (called embedded software). 10/27/2022 Computer Science Department, University of Sahiwal 2
  • 3. High Integrity Software • Software that has a higher expectation of correctness called as high integrity software. • This expectation of correctness is closely linked to the risks inherent in software failure. • Therefore, the development of high integrity software demands greater resources than the development of a ‘regular’ software product. 10/27/2022 Computer Science Department, University of Sahiwal 3
  • 4. Critical Software • The term critical software applies to software that cause danger while failure. • Critical software can further be categorized depending upon the types of danger imposed by failure. – business critical software – mission critical software – safety critical software 10/27/2022 Computer Science Department, University of Sahiwal 4
  • 5. Business Critical Software • Failure could adversely affect the economic success of an enterprise; • Examples include – Software used to control a bank’s ATM transactions – software aimed at providing security for sensitive information. 10/27/2022 Computer Science Department, University of Sahiwal 5
  • 6. Mission Critical Software • Failure could impair the goal of the given mission; • Examples – Satellite Operation – Rocket Launch Systems. 10/27/2022 Computer Science Department, University of Sahiwal 6
  • 7. Safety Critical Software • It could result in harm to people, property or the environment; • Examples include – Medical software – Air traffic control software. 10/27/2022 Computer Science Department, University of Sahiwal 7
  • 8. The Importance of the Specification • When a software contains an ‘error’ we mean it does not behave as expected. • There could be two reasons for this; – either the software does not conform to its specification – there are errors or omissions in the original specification 10/27/2022 Computer Science Department, University of Sahiwal 8
  • 9. Do you know? • The crash of the European Ariane5 rocket, because of a software failure – Rocket took 10 years and 7 billion dollars to develop • Radiation overdose in medical equipment – failed to detect the radiation overdose and causes death of several patients 10/27/2022 Computer Science Department, University of Sahiwal 9
  • 10. Testing • is the process of locate these software errors. • Testing involves running a program with a set of inputs and comparing the actual outputs from the program against the expected outputs (as defined in the specification). 10/27/2022 Computer Science Department, University of Sahiwal 10
  • 11. Testing limitation • Testing cannot take place until some implementation is available. • Testing can only help to uncover errors – it cannot guarantee the absence of them. • Testing is always carried out with respect to specification. If the specification is ambiguous, test/software will fail always. 10/27/2022 Computer Science Department, University of Sahiwal 11
  • 12. Mechanism for Formal methods Ambiguities in the specification and the limitations of testing can result in errors in the final application 10/27/2022 Computer Science Department, University of Sahiwal 12
  • 13. Formal Specification • There are two important aspects to an object: • The information – that it holds (referred to as its attributes) • The things – it can do (referred to as its methods or operations). 10/27/2022 Computer Science Department, University of Sahiwal 13
  • 14. Class Diagram a typical UML class diagram specifying a BankAccount class. 10/27/2022 Computer Science Department, University of Sahiwal 14
  • 15. Method (withdraw) • receives a requested amount to withdraw from the bank account – if there are sufficient funds in the account, meets the request. – Returns a boolean value indicating success or failure of the attempt to withdraw money from the account. 10/27/2022 Computer Science Department, University of Sahiwal 15
  • 16. Formal Methods • Constitute a branch of software engineering that incorporates the use of mathematics for software development. • A formal method provides a formal language in which to express the initial specification and all future design steps towards the final program. 10/27/2022 Computer Science Department, University of Sahiwal 16
  • 17. Formal Approach 10/27/2022 Computer Science Department, University of Sahiwal 17
  • 18. Cont. • A formal method is more than just a specification language for recording these transformations • It also includes a proof system – for demonstrating that each transformation preserves the formal meaning captured in the previous step – guaranteeing the correctness of a statement and relies upon mathematical logic 10/27/2022 Computer Science Department, University of Sahiwal 18
  • 19. Advantages of FM • Formal specifications can help considerably in generating suitable test cases. • the ability to analyse a specification • increasing confidence that the specification accurately captures the real system requirements • initial specification can be checked mathematically • Proofs can help uncover design errors as soon as they are made, rather than having to wait for testing of the final implementation 10/27/2022 Computer Science Department, University of Sahiwal 19
  • 20. Method of Specification • Many formal methods approaches have been established but these two are principal approaches – Algebraic – model-based 10/27/2022 Computer Science Department, University of Sahiwal 20
  • 21. Classifying Leading FMs Algebraic Model-based Sequential systems • Larch • Vienna Development Method (VDM) • Z • B Concurrent Systems • Calculus of Communicating Systems (CCS) • OBJ • Prototype Verification System (PVS) • Communicating Sequential Processes (CSP) 10/27/2022 Computer Science Department, University of Sahiwal 21
  • 22. VDM (Vienna development Method) • VDM specification corresponds closely to the notion of a class in an object-oriented methodology • a lightweight approach – At first; informal specification of software using the UML class notation – formal specification for a UML class in the form of a VDM specification 10/27/2022 Computer Science Department, University of Sahiwal 22
  • 23. A Lightweight Approach 10/27/2022 Computer Science Department, University of Sahiwal 23
  • 24. Cont. • we will examine the data types – natural numbers – sets and sequences • and demonstrate their use through example specifications. 10/27/2022 Computer Science Department, University of Sahiwal 24
  • 25. Questions Any Question Please? You can contact me at: umber@uosahiwal.edu.pk Your Query will be answered within one working day. 10/27/2022 Computer Science Department, University of Sahiwal 25