Formal Methods.

Slides:



Advertisements
Similar presentations
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Advertisements

Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 Software Engineering September 12, 2001 Capturing.
LIFE CYCLE MODELS FORMAL TRANSFORMATION
Ch 3 System Development Environment
Software Processes Coherent sets of activities for specifying, designing, implementing and testing software systems.
Software system modeling
Requirement Analysis and Specification Mr. Manoj Kumar Kar.
CLEANROOM SOFTWARE ENGINEERING
Formal Methods in Software Engineering Credit Hours: 3+0 By: Qaisar Javaid Assistant Professor Formal Methods in Software Engineering1.
Software Testing and Quality Assurance
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 8 Slide 1 System models.
Copyright © 2006 Software Quality Research Laboratory DANSE Software Quality Assurance Tom Swain Software Quality Research Laboratory University of Tennessee.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
Lecture 3: Requirements Modeling Intro Professor Aditya Ghose Director, Decision Systems Lab School of IT and Computer Science University of Wollongong.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
School of Computer ScienceG53FSP Formal Specification1 Dr. Rong Qu Introduction to Formal Specification
1 Software Testing and Quality Assurance Lecture 1 Software Verification & Validation.
Software Engineering Tools and Methods Presented by: Mohammad Enamur Rashid( ) Mohammad Rashim Uddin( ) Masud Ur Rahman( )
S R S S ystem R equirements S pecification Specifying the Specifications.
Chapter 1 The Systems Development Environment
Software Integration and Documenting
Formal Methods 1. Software Engineering and Formal Methods  Every software engineering methodology is based on a recommended development process  proceeding.
Software Testing Verification and validation planning Software inspections Software Inspection vs. Testing Automated static analysis Cleanroom software.
The Software Development Life Cycle: An Overview
S/W Project Management
UML - Development Process 1 Software Development Process Using UML (2)
Copyright by Dr. Clarence Lau, IVE(TY)
CLEANROOM SOFTWARE ENGINEERING.
Requirements Expression and Modelling
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
Chapter 4 System Models A description of the various models that can be used to specify software systems.
System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed.
Software Models (Cont.) 9/22/2015ICS 413 – Software Engineering1 -Component-based software engineering -Formal Development Model.
©Ian Sommerville 2000, Mejia-Alvarez 2009 Slide 1 Software Processes l Coherent sets of activities for specifying, designing, implementing and testing.
Instructor: Peter Clarke
Software Design: An Introduction by David Budgen Presented by Shane Marcus EEL 6883 – Spring 2007 Presented by Shane Marcus EEL 6883 – Spring 2007.
Mathematical Modeling and Formal Specification Languages CIS 376 Bruce R. Maxim UM-Dearborn.
Introduction to Formal Methods Based on Jeannette M. Wing. A Specifier's Introduction to Formal Methods. IEEE Computer, 23(9):8-24, September,
Overview of Formal Methods. Topics Introduction and terminology FM and Software Engineering Applications of FM Propositional and Predicate Logic Program.
Chapter 7 System models.
Lecture 7: Requirements Engineering
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Software Verification, Validation and Testing.
Software Engineering, 8th edition Chapter 8 1 Courtesy: ©Ian Somerville 2006 April 06 th, 2009 Lecture # 13 System models.
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Chapter 19 Verification and Validation.
1 What is OO Design? OO Design is a process of invention, where developers create the abstractions necessary to meet the system’s requirements OO Design.
Requirements Specification. Welcome to Software Engineering: “Requirements Specification” “Requirements Specification”  Verb?  Noun?  “Specification”
1 Software Requirements l Specifying system functionality and constraints l Chapters 5 and 6 ++
Anton Krbaťa Ján Budáč  Verification: "Are we building the product right ?„  Validation: "Are we building the right product ?"
Formal Methods in SE Software Verification Using Formal Methods By: Qaisar Javaid, Assistant Professor Formal Methods1.
1 Chapter 8 Building the Analysis Model (1) Analysis Concepts and Principles.
Requirement Engineering. Recap Elaboration Behavioral Modeling State Diagram Sequence Diagram Negotiation.
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
Requirements Analysis
Duminda WijesekeraSWSE 623: Introduction1 Introduction to Formal and Semi- formal Methods Based on A Specifier's Introduction to Formal Methods (J. Wing)
Requirements Engineering Methods for Requirements Engineering Lecture-31.
21/1/ Analysis - Model of real-world situation - What ? System Design - Overall architecture (sub-systems) Object Design - Refinement of Design.
Requirement Specification SRS document is a contract between the development team and the customer How do we communicate the Requirements to others? Firm.
 System Requirement Specification and System Planning.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
Engineering, 7th edition. Chapter 8 Slide 1 System models.
An Overview of Requirements Engineering Tools and Methodologies*
Modern Systems Analysis and Design Third Edition
System Requirements Specification
Modern Systems Analysis and Design Third Edition
Modern Systems Analysis and Design Third Edition
Department of Computer Science Abdul Wali Khan University Mardan
Software system modeling
Presentation transcript:

Formal Methods

Software Engineering and Formal Methods Every software engineering methodology is based on a recommended development process Proceeding through several phases: Requirements, Specification, Design Coding, Unit Testing Integration and System Testing, Maintenance Formal methods can Be a foundation for designing safety critical systems Be a foundation for describing complex systems Provide support for program development

What are Formal Methods? Techniques and tools based on mathematics and formal logic Can assume various forms and levels of rigor Informal Low Medium High

Why Consider Formal Methods? The development of a formal specification provides insights and an understanding of the software requirements and software design Clarify customers’ requirements Reveal and remove ambiguity, inconsistency and incompleteness Facilitate communication of requirement or design Provides a basis for an elegant software design Traceability System-level requirements should be traceable to subsystems or components

Formal Methods Concepts Formal Specification Methods Formal proofs Model checking Abstraction Formal specification

Formal Specification The translation of non-mathematical description (diagrams, table, natural language) into a formal specification language It represents a concise description of high-level behavior and properties of a system Well-defined language semantics support formal deduction about the specification

Type of Formal Specifications Model Oriented: Construct a model of the system behavior using mathematical objects like sets, sequences etc. Statecharts, SCR, VDM, Z Petri Nets, CCS, CSP, Automata theoretic models Property Oriented: Use a set of necessary properties to describe system behavior, such as axioms, rules etc. Algebraic semantics Temporal logic models

Formal Proofs Proof is an essential part of specification Proofs are constructed as a series of small steps, each of which is justified using a small set of rules Proofs can be done manually, but usually constructed with some automated assistance

Model Checking A technique relies on building a finite model of a system and checking that a desired property holds in that model Two general approaches Temporal model checking Automaton model checking Use model checkers SMV

Abstraction Representation of the program using a smaller model Allows you to focus on the most important central properties and characteristics Getting the right level of abstraction is very important in a specification

Mathematical Models Abstract representations of a system using mathematical entities and concepts Model should captures the essential characteristics of the system while ignoring irrelevant details Model can be analyzed using mathematical reasoning to prove system properties or derive new behaviors Two types Continuous models Discrete models

Formal Specification Process Model Clarify requirements and high level design Articulate implicit assumptions Identify undocumented or unexpected assumptions Expose defects Identify exceptions Evaluate test coverage

Cleanroom Software Development Spend a lot of effort "up-front" to prevent defects Formal specification Incremental development Statistical methods to ensure reliability

Cleanroom Process Formal specification using a state transition model Structured programming - limited control and abstraction constructs are used Program resembles state machine Static verification using rigorous inspections Mathematical arguments Statistical testing of the system reliability

Cleanroom Process

Cleanroom Process Incremental development Allows freezing of requirements, so formal work can proceed Work on critical functionality in early revisions, so it receives the most testing

Cleanroom Process Specification team Develop and maintain system specification Development team Develop and verify (mathematically) the software The software is not executed or even compiled during this process Certification team Develop set of statistical tests to exercise the software after development Reliability growth models used to determine when reliability is acceptable

Test Results Successful in the field Few errors Not more expensive than other processes Generally workable Higher quality code resulted

Benefits of Formal Specifications Higher level of rigor leads to better problem understanding Defects are uncovered that would be missed using traditional specification methods Allows earlier defect identification Formal specification language semantics allow checks for self-consistency Enables the use of formal proofs to establish fundamental system properties and invariants

Limitations to Formal Methods Requires a sound mathematical knowledge of the developer Different aspects of a design may be represented by different formal specification methods Useful for consistency checks, but formal methods cannot guarantee the completeness of a specifications For the majority of systems does not offer significant cost or quality advantages over others

Review

What We learned … Fundamental requirements engineering concepts Requirements engineering processes Requirements engineering techniques

Requirements Engineering Concepts Requirements – define what a system is required to do and the constraints under which it is required to operate Requirements engineering – all activities involved in discovering, documenting, and maintaining a set of requirements for a computer-based system The term engineering implies that systematic and repeatable techniques (based on Best Practices) should be used The first step in system development Include Functional requirements Non-functional requirements Stakeholders Software engineers, system end-users, managers of system end-users, external regulators, domain experts

Requirements Engineering Processes

Requirements Engineering Processes IBM Rational RequisitPro for requirements documentation and management SRS template for final specification

Requirements Engineering Techniques Process of requirements engineering (RE) is usually guided by a requirements method Requirement methods are systematic ways of producing system models System models are important bridges between the analysis and the design process Types Structured analysis Object-oriented analysis

Requirements Engineering Techniques Data flow modeling One of the most popular structured methods DFD provides a description of a system based on modeling the transformational processes of a system, the collections (stores) of data that the system manipulates, and the flows of data between the processes, stores and the outside world. The DFD describes the functional viewpoint of the system e.g. it describes the system in terms of its operation (tasks) Conducted hierarchically

Requirements Engineering Techniques Object-oriented approach Integrate data and functions Use case diagrams Activity diagrams Class diagrams Sequence diagrams Collaboration diagrams State diagrams

Requirements Engineering Techniques Non-functional requirements Define the overall qualities or attributes of the resulting system Examples of NFR include safety, security, usability, reliability and performance requirements Classification Product requirements Process requirements External requirements Derive NFRs Concern decomposition Goal-based Formal methods in requirements engineering