Requirements Engineering Methods for Requirements Engineering Lecture-31.

Slides:



Advertisements
Similar presentations
1 Verification by Model Checking. 2 Part 1 : Motivation.
Advertisements

Copyright W. Howden1 Programming by Contract CSE 111 6/4/2014.
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
1 Model checking. 2 And now... the system How do we model a reactive system with an automaton ? It is convenient to model systems with Transition systems.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
LIFE CYCLE MODELS FORMAL TRANSFORMATION
Requirement Analysis and Specification Mr. Manoj Kumar Kar.
ISBN Chapter 3 Describing Syntax and Semantics.
CS 355 – Programming Languages
Formal Methods in Software Engineering Credit Hours: 3+0 By: Qaisar Javaid Assistant Professor Formal Methods in Software Engineering1.
Software Testing and Quality Assurance
Introduction to Formal Methods
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
1 Formal Methods (continued) Formal Methods: Modifying a Formal Specification.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 18 Program Correctness To treat programming.
Developed by Robert Olson Chapter 28 Formal Methods.
CS 454 Theory of Computation Sonoma State University, Fall 2011 Instructor: B. (Ravi) Ravikumar Office: 116 I Darwin Hall Original slides by Vahid and.
Chapter 1 Principles of Programming and Software Engineering.
1 Introduction to Formal Methods Introduction to Formal Methods; Preconditions, Postconditions, and Invariants Revisited; Z language Example (Pressman)
Describing Syntax and Semantics
School of Computer ScienceG53FSP Formal Specification1 Dr. Rong Qu Introduction to Formal Specification
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
MCA –Software Engineering Kantipur City College. Topics include  Formal Methods Concept  Formal Specification Language Test plan creation Test-case.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 10 Slide 1 Formal Specification.
Chapter 3 Object-Oriented Analysis of Library Management System(LMS)
Formal Methods 1. Software Engineering and Formal Methods  Every software engineering methodology is based on a recommended development process  proceeding.
Cheng/Dillon-Software Engineering: Formal Methods Model Checking.
1 These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
Overview of the Database Development Process
Formal Methods CIS 376 Bruce R. Maxim UM-Dearborn.
Software Models (Cont.) 9/22/2015ICS 413 – Software Engineering1 -Component-based software engineering -Formal Development Model.
1 COSC 4406 Software Engineering COSC 4406 Software Engineering Haibin Zhu, Ph.D. Dept. of Computer Science and mathematics, Nipissing University, 100.
Mathematical Modeling and Formal Specification Languages CIS 376 Bruce R. Maxim UM-Dearborn.
1 Program Correctness CIS 375 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.
WXGE6103 Software Engineering Process and Practice Formal Specification.
Methodology - Conceptual Database Design. 2 Design Methodology u Structured approach that uses procedures, techniques, tools, and documentation aids to.
Formal Verification Lecture 9. Formal Verification Formal verification relies on Descriptions of the properties or requirements Descriptions of systems.
1 Introduction to Formal Methods Introduction to Formal Methods; Preconditions, Postconditions, and Invariants Revisited; Z language Example (Pressman)
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Requirements Engineering Methods for Requirements Engineering Lecture-30.
Software Engineering Principles. SE Principles Principles are statements describing desirable properties of the product and process.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
Formal Methods in Software Engineering “And they made their lives bitter with hard bondage … all their service … was with rigour.” Ex 1:14.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Formal Methods.
Formal Methods in Software Engineering Credit Hours: 3+0 By: Qaisar Javaid Assistant Professor.
Formal Methods in SE Software Verification Using Formal Methods By: Qaisar Javaid, Assistant Professor Formal Methods1.
Software Engineering 2 -Prakash Shrestha.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
CSCI1600: Embedded and Real Time Software Lecture 11: Modeling IV: Concurrency Steven Reiss, Fall 2015.
CSCI1600: Embedded and Real Time Software Lecture 28: Verification I Steven Reiss, Fall 2015.
Chapter 1 Data Abstraction: The Walls CS Data Structures Mehmet H Gunes Modified from authors’ slides.
Static Techniques for V&V. Hierarchy of V&V techniques Static Analysis V&V Dynamic Techniques Model Checking Simulation Symbolic Execution Testing Informal.
Duminda WijesekeraSWSE 623: Introduction1 Introduction to Formal and Semi- formal Methods Based on A Specifier's Introduction to Formal Methods (J. Wing)
Requirement Analysis SOFTWARE ENGINEERING. What are Requirements? Expression of desired behavior Deals with objects or entities, the states they can be.
Chapter 25 Formal Methods. BASIC CONCEPTS A method is formal if it has a sound mathematical basis, typically given by a formal specification language.
IS 2620: Developing Secure Systems Formal Verification/Methods Lecture 9 March 15, 2012.
Formal Specification.
Definition CASE tools are software systems that are intended to provide automated support for routine activities in the software process such as editing.
Aspect Validation: Connecting Aspects and Formal Methods
IS 2935: Developing Secure Systems
Programming Languages 2nd edition Tucker and Noonan
Chapter 28 Formal Modeling and Verification
Department of Computer Science Abdul Wali Khan University Mardan
PPT4: Requirement analysis
Programming Languages 2nd edition Tucker and Noonan
Presentation transcript:

Requirements Engineering Methods for Requirements Engineering Lecture-31

Recap  No ideal requirements method  System models can be considerably enriched by combining different techniques  Data-flow model is based on the notion that systems can be modelled as a set of interacting functions  The object-oriented approach is based on the notion that systems can be modelled as a set of interacting objects  Formal methods are based on mathematical principles and are intended to achieve a high degree of confidence that a system will conform to its specifications

Library Management System Using Structured Method 3

Library Management System using Object Oriented Method 4

Library Management System using Formal Method 5

Today’s lecture 6  Formal methods for requirement engineering

Why we need formal methods?  Current methods of software development involves only combination of diagrams, text, tables etc.  No methods are used to test the correctness of the end result in each of stages of software development for e.g. requirement specification, design etc.  This may lead to contradictions, ambiguities, incompleteness, vagueness etc.  This may not be a good option for safety-critical or mission critical systems, where failure may have high price

Formal methods  Formal methods are mathematically based.  They are an attempt to deal with contradictions, ambiguities, vagueness, incomplete statements, and mixed levels of abstraction.  They are most valuable for systems which have:  safety concerns (e.g., airplane systems, medical devices)  security concerns

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

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.  State charts, Z  Petri Nets, 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.

Formal methods  Formal methods can be used to:  Mathematically PROVE correctness of a system  Reduce faults  Formal methods can provide:  program specification: define program is supposed to do  program verification: PROVE program does what the specification says it will do  automated theorem proving  model checking: exhaustively check all possible “states” of the model that has been developed

"Ten Commandments" of formal methods  Choose the appropriate notation  Formalize but don't over-formalize  Estimate costs  Have a formal methods "guru" on call  Do not abandon traditional development methods  Document sufficiently  Don't compromise quality standards  Do not be dogmatic  Test, test, test, ….  Reuse

Some definitions  State: A state is the stored data that a system accesses and alter.  Data Invariant: A data invariant is a condition that is true throughout the execution of the system that contains a collection of data. E.g. maximum number elements in any system, duplication not allowed in a system.

Some definitions (cont…)  Operation is defined as action that takes place in a system and reads or writes data to a state  It is associated with two type of conditions  Precondition defines whether the operation is valid or not  Postcondition defines what happens when an operation has completed its action

Example Block Handler  A common part of any operating system which handles the memory blocks  Provides free blocks of memory to new created files and regains blocks when file is removed.  It keeps tracks of free blocks or the unused blocks and the used blocks  Whenever a block is freed, it is added to the queue of unused blocks and similarly whenever a block is needed first block from the queue of unused bock is given for use.

20 “Block Handler” Unused (free) blocks Queued for entry into Unused Blocks released to queue when files deleted Used blocks

 Can we identify the states?  What are the data invariants?  What are the operations?

States  The collection of used blocks  The collection of free blocks  The queue of returned blocks

Data invariants  No block will be marked as both unused and used  All the sets of blocks held in the queue will be subsets of the collection of currently used blocks  No elements of the queue will contain the same block umbers  The collection of used blocks and blocks that are unused will be the total collection of blocks that make up files  The collection of unused blocks will have no duplicate block numbers  The collection of used blocks will have no duplication block numbers

Operations  Adding  Removing

25 Z specification: BlockHandler used,free:  BLOCKS BlockQueue: seq P BLOCKS used  free =   used  free = AllBlocks   i: dom BlockQueue. BlockQueue i  used   i,j : dom BlockQueue. i  j  BlockQueue i  BlockQueue j =  set contained in and implies “then” in intersection for all empty set intersection union sequence

RemoveBlock  BlockHandler #BlockQueue > 0, used’ = used \ head BlockQueue  free’ = free  head BlockQueue  BlockQueue’ = tail BlockQueue AddBlock  BlockHandler Ablocks? : BLOCKS Ablocks?  used, used’ = used  free’ = free  BlockQueue’ = BlockQueue ^ (Ablocks?)