1 / 20

Formal Methods

Formal Methods. Software has increasingly significant in our everyday activities - manages our bank accounts - pays our salaries - controls aircraft we fly in - regulates power generation and distribution - controls our communication - etc. Importance of high quality software.

kateb
Download Presentation

Formal Methods

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Formal Methods

  2. Software has increasingly significant in our everyday activities - manages our bank accounts - pays our salaries - controls aircraft we fly in - regulates power generation and distribution - controls our communication - etc Importance of high quality software

  3. Characteristics of high quality software (some) - easy to use - efficient - correct - many more .... Importance of high quality software

  4. Requirement analysis : determine user needs Specification : describe precisely what the role of the software will be Design : determine how to realize the software, and devise overall organization Implementation : formulate the algorithms and program Verification : certify that the program meet the specification Maintenance : perform ongoing changes and corrections after the software is in use Typical software cycle

  5. Precision in the specification of software

  6. The interpretation of natural languages The manipulation of specifications Why formal methods

  7. Ambiguity - multiple meaning and interpretation - inferred from surrounding text eg. The program will take a sequence of numbers and return a sorted list. What is wrong with this? Natural Language Specification

  8. Incompleteness and vagueness - be specific eg. how many numbers do we input? When is the sorted output? Natural Language Specification

  9. Contradiction - may contain statements at odds with each other eg. When the retrieve function is activated the beta file will be locked and no other access allowed. The retrieve function is activated by pressing the F1 function. Natural Language Specification

  10. Formal specifications allow precise interpretation; there is therefore no possibility of arguments about what has been specified Formal methods allow systems to be defined in abstract terms; in particular developers can look at what a system is to do before becoming bogged down in detail as to how it is to be accomplished A formal methodology demands attention to issues of completeness and consistency, therefore reducing the chances of overlooking certain areas or situations which could cause errors or bugs The use of formal methodology allows the progressive refinement of an abstract specification into a concrete specification uisng well-defined rules. This lead to the possibility of generating programs from formal specifications automatically Using formal descriptions it is possible to detect deviations of a program from its original specification. Advantages of formal methods

  11. Formal methods can guarantee that software is perfect; do you think so? Question?

  12. For a formal methodology to be complete it must be able to fulfil the following requirements: Specification : it must be possible to state what a program is meant to do in a formal precise way Verification: given the specification and a program obtained, it should be possible to prove using formal mathematical methods that the program does what the specification states Requirements of a Formal System

  13. After-the-fact verification Formal development process requirement Pre- design Detailed design code Formal spec

  14. parallel Formal development process requirement High-level formal spec Pre- design Detailed design low-level Formal spec code

  15. Integrated Formal development process requirement Formal pre-design specification Formal Detailed design spec code

  16. Set theory - membership of a set - subset - powerset -operation on a set - cardinality - cartesian products Concepts used

  17. Types - predefined basic type - user defined types - compound types - product types - enumerated types sequences Concepts used

  18. Formal Logic - propositional logic - law of equivalence - tautologies - predicate logic - quantification Concepts used

  19. Relationships and functions - function - operations on function - total function, partial function - injective, surjective, bijective functions Concepts used

More Related