Formal Methods in Software Engineering “And they made their lives bitter with hard bondage … all their service … was with rigour.” Ex 1:14.

Slides:



Advertisements
Similar presentations
Software Process Model
Advertisements

IT Requirements Capture Process. Motivation for this seminar Discovering system requirements is hard. Formally testing use case conformance is hard. We.
ISBN Chapter 3 Describing Syntax and Semantics.
1 Semantic Description of Programming languages. 2 Static versus Dynamic Semantics n Static Semantics represents legal forms of programs that cannot be.
CS 355 – Programming Languages
Formal Methods in Software Engineering Credit Hours: 3+0 By: Qaisar Javaid Assistant Professor Formal Methods in Software Engineering1.
Formal Methods: Z CS 415, Software Engineering II Mark Ardis, Rose-Hulman Institute March 18, 2003.
Train Control Language Teaching Computers Interlocking By: J. Endresen, E. Carlson, T. Moen1, K. J. Alme, Haugen, G. K. Olsen & A. Svendsen Synthesizing.
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.
Formal Methods. Importance of high quality software ● Software has increasingly significant in our everyday activities - manages our bank accounts - pays.
1 Specifying Object Interfaces. 2 Major tasks in this stage: --are there any missing attributes or operations? --how can we reduce coupling, make interface.
Detail Design Extending UML and Object Design. Object Design.
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.
Developed by Robert Olson Chapter 28 Formal Methods.
©Ian Sommerville 2000Software Engineering, 6/e, Chapter 91 Formal Specification l Techniques for the unambiguous specification of software.
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.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 10 Slide 1 Formal Specification.
MCA –Software Engineering Kantipur City College. Topics include  Formal Methods Concept  Formal Specification Language Test plan creation Test-case.
10 December, 2013 Katrin Heinze, Bundesbank CEN/WS XBRL CWA1: DPM Meta model CWA1Page 1.
SEG4110 – Advanced Software Engineering and Reengineering TOPIC E Object Constraint Language (OCL)
Formal Methods 1. Software Engineering and Formal Methods  Every software engineering methodology is based on a recommended development process  proceeding.
1 These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
Formal Methods CIS 376 Bruce R. Maxim UM-Dearborn.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 9 Slide 1 Formal Specification l Techniques for the unambiguous specification of software.
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.
Overview of Formal Methods. Topics Introduction and terminology FM and Software Engineering Applications of FM Propositional and Predicate Logic Program.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
WXGE6103 Software Engineering Process and Practice Formal Specification.
Chapter 25 Formal Methods Formal methods Specify program using math Develop program using math Prove program matches specification using.
UNIT VI Advanced software Engineering 1. Software Quality Definition: Software Quality is conformance to 1. Explicitly stated functional and performance.
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.
CS551 - Lecture 8 1 CS551 Modelling with Objects (Chap. 3 of UML) Yugi Lee STB #555 (816)
Cleanroom Software Engineering Getting it right the first time.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Software Development Overview CPSC 315 – Programming Studio Spring 2013.
Deriving Operational Software Specification from System Goals Xin Bai EEL 5881 Course Fall, 2003.
CSC 480 Software Engineering Design by Contract. Detail Design Road Map Begin with architectural models  Class model: domain classes  Overall state.
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 Credit Hours: 3+0 By: Qaisar Javaid Assistant Professor.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
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.
Requirements Engineering Methods for Requirements Engineering Lecture-31.
Software Engineering I. Introduction to Software Engineering Software models Formal Specification using ASML (Abstract State Machines Language) Software.
Software Development Process CS 360 Lecture 3. Software Process The software process is a structured set of activities required to develop a software.
CSC3315 (Spring 2009)1 CSC 3315 Languages & Compilers Hamid Harroud School of Science and Engineering, Akhawayn University
Course: Software Engineering – Design I IntroductionSlide Number 1 What is a specification Description of a (computer) system, which:  is precise;  defines.
Interpreting the Object Constraint Presented by: Ed Kausmeyer.
Object Design More Design Patterns Object Constraint Language Object Design Specifying Interfaces Review Exam 2 CEN 4010 Class 18 – 11/03.
A UML-Based Pattern Specification Technique Presented by Chin-Yi Tsai IEEE TRANSACTION ON SOFTWARE ENGINEERING, VOL. 30, NO. 3, MARCH 2004 Robert B. France,
Chapter 25 Formal Methods. BASIC CONCEPTS A method is formal if it has a sound mathematical basis, typically given by a formal specification language.
A framework that describes the activities performed at each stage of a software development project. A life-cycle or a software process is the organisational.
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 11b: Component-Level Design Software Engineering: A Practitioner’s Approach, 6/e Chapter.
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini IX. System Models (III)
Software Engineering Lecture 20: Formal Methods. Today’s Topics l What are Formal Methods? l Formal Specification States, Operations, Pre- and Post-Conditions.
Formal Specification.
VDM: Vienna Development Method
Specifying Object Interfaces
Chapter 28 Formal Modeling and Verification
Semantics In Text: Chapter 3.
Formal Methods in Software Engineering 1
Information system analysis and design
Presentation transcript:

Formal Methods in Software Engineering “And they made their lives bitter with hard bondage … all their service … was with rigour.” Ex 1:14

A Spectrum of Methods Less Formal More Formal Cleanroom OCL and Z Traditional Models: Waterfall, Spiral, Incremental Agile Methods: FDD and SCRUM

Characteristics of Formal Methods Well-defined specification language Typically based on set-theoretical concepts Specifies by indicating operational conditions: pre-conditions, post-conditions, and invariants Composed of three components: syntax, semantics, and relations (operational statements) Emphasis on verification Of program correctness Of completeness of description Of refinements to different abstractions Testing De-emphasized

Advantages of Formal Methods Consistency (fewer contradictions) Precision (less ambiguity) Completeness (extent of definitions more clearly defined, so all cases handled) Descriptive Uniformity (less mixture among levels of detail)

Set Theoretical Foundation for Formal Methods See Section 28.3 Set Operators: , ∩, \, and x Logic Operators: and, or, not, implication Sequences:, head, tail, front, last, concatenation See Examples for Block Handler: pgs 775 and (section ) OCL Notation Summary (Table28.1), pg 785 Z Notation Summary (Table 28.2), pg 789

Block Handler Example: Constraints No block will be marked as both free and used All the sets of blocks in the queue are subsets of currently used blocks No elements of the queue contain the same block numbers The collection of used and free blocks make up the total collection of all blocks There are no duplicates among the free blocks There are no duplicates among the used blocks

OCL Example: Block Handler Context BlockHandler inv: (used->intersection(free))-> isEmpty() Context BlockHandler inv: blockQ->forAll(aBlockSet | used->includesAll(aBlockSet)) Context BlockHandler inv: allBlocks = used->union(free) Context BlockHandler::remove() pre: blockQ->size() > 0 post: used = – AND free = first()) AND blockQ = Block Queue Free Used released

Z Example: Block Handler used, free: powerSet BLOCKS blockQ: seq powerSet BLOCKS used ∩ free = Ø used U free = allBlocks forAll i: dom blockQ : blockQ i subset used forAll i, j: dom blockQ : i ≠ j → blockQ i ∩ blockQ j = Ø removes(): Pre: #blockQ > 0 Post: used’=used–head blockQ AND free’=free U head blockQ AND blockQ’=tail blockQ Block Queue Free Used released

Additional Points of Emphasis Why completeness is difficult to achieve (pg 771) Controversy over formal methods (pg 771) Areas in which formal methods may apply (pg 770 – “Why is it important”) Area in which formal methods are difficult to apply (pg 792)