1 Formal Methods (continued) Formal Methods: Modifying a Formal Specification.

Slides:



Advertisements
Similar presentations
Ch-11 Project Execution and Termination. System Testing This involves two different phases with two different outputs First phase is system test planning.
Advertisements

Z -Toolkit Z specification language is based on formal system: –Propositional and predicate calculus –Set theory –Relations and –Functions Thus Z offers.
Software Engineering, COMP 201 Slide 1 Automata and Formal Languages Moore and Mealy Automata Ralf Möller Hamburg Univ. of Technology based on slides by.
Using the Jumble Word Template
Formal Methods: Z CS 415, Software Engineering II Mark Ardis, Rose-Hulman Institute March 18, 2003.
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.
Exercise Exercise3.1 8 Exercise3.1 9 Exercise
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.
Case Study Oil Tanker Terminal Control System. Specification Tanker is the set of tankers Berth is the set of berths The given set is [Tanker, Berth]
Exercise Exercise Exercise Exercise
Exercise Exercise Exercise Exercise
Exercise Exercise6.1 7 Exercise6.1 8 Exercise6.1 9.
Developed by Robert Olson Chapter 28 Formal Methods.
1 Introduction to Formal Methods Introduction to Formal Methods; Preconditions, Postconditions, and Invariants Revisited; Z language Example (Pressman)
Sequences. What is sequence? A sequence is an ordered collection of objects. We use sequences to model collections in which order or multiplicity is important.
Chapter 18 Testing Conventional Applications
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.
SEG4110 – Advanced Software Engineering and Reengineering TOPIC E Object Constraint Language (OCL)
1 These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
Chapter 28 Formal Methods
1 COSC 4406 Software Engineering COSC 4406 Software Engineering Haibin Zhu, Ph.D. Dept. of Computer Science and mathematics, Nipissing University, 100.
Sequences and Series PART 1 – Notation +. Sequences and Series Examples of Sequences e.g. 1 e.g. 2 e.g. 3 A sequence is an ordered list of numbers The.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
UNIT VI Advanced software Engineering 1. Software Quality Definition: Software Quality is conformance to 1. Explicitly stated functional and performance.
ECSE Software Engineering 1I HO 5 © HY 2012 Lecture 5 Formal Methods Isn’t this really getting old?
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.
The Functions of Operating Systems Desktop PC Operating Systems.
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.
Formal Methods in Software Engineering “And they made their lives bitter with hard bondage … all their service … was with rigour.” Ex 1:14.
Main MenuExercise Set 1Exercise Set 2 Interactive Exercises Set 1 Exercise 1.1 Exercise 1.2 Exercise 1.3.
ECSE Software Engineering 1I HO 4 © HY 2012 Lecture 4 Formal Methods A Library System Specification (Continued) From Specification to Design.
SWEN 5130Requirements Engineering Algebraic Specification Slide 1 Algebraic Specification u Specifying abstract types in terms of relationships between.
Formal Methods in SE Software Verification Using Formal Methods By: Qaisar Javaid, Assistant Professor Formal Methods1.
Software Engineering 2 -Prakash Shrestha.
Queues. Like Stacks, Queues are a special type of List for storing collections of entities. Stacks are Lists where insertions (pushes) and deletions (pops)
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.
Requirements Engineering Methods for Requirements Engineering Lecture-31.
Software Process Models The slides and the material of this chapter is adopted from: 1. “Software Engineering”, by I. Somerville, 7th Ed., “Software.
Chapter 25 Formal Methods. BASIC CONCEPTS A method is formal if it has a sound mathematical basis, typically given by a formal specification language.
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.
WORKING OF SCHEDULER IN OS
OPERATING SYSTEMS CS 3502 Fall 2017
Cyclomatic Complexity
(State) Model-Based Approaches II Software Specification Lecture 36
Chapter 2 : Data Flow Diagram
FORMAL SYSTEM DEVELOPMENT METHODOLOGIES
Module: Handling Exceptions
B (The language of B-Method )
كيــف تكتـب خطـة بحـث سيئـة ؟؟
الدكتـور/ عبدالناصـر محمـد عبدالحميـد
Queue and Priority Queue Implementations
Chapter 14: Queue and Priority Queue Implementations
قـواعــــد الـبـيــانــات
Chapter 28 Formal Modeling and Verification
Function Notation “f of x” Input = x Output = f(x) = y.
Department of Computer Science
PPT4: Requirement analysis
File Organization.
Separation Logic (III)
Learning Intention I will learn about the different types of programming errors.
Social Practice of the language: Describe and share information
Modified at -
COMPUTER HISTORY, PRESENT & FUTURE. What is a Computer? A computer is a machine that can be instructed to carry out sequences of arithmetic or logical.
Perpendicular and Parallel Lines
Software Engineering Lecture #6
Body(身體) Random Slide Show Menu
Presentation transcript:

1 Formal Methods (continued) Formal Methods: Modifying a Formal Specification

2 Propositional Logic Formal methods: Allow us to "prove" properties of the system under development Here we will use the Z language to represent formal specifications Note: the example below is a specification, not a design. In the operations, for example, the specification describes the state of the system before and after the operation, it does not describe how the operation is to be carried out.

3 Additional Z Notation

4 Z Sequence Notation

5 Z example revisited (1) Example (from Pressman, Software Engineering, A Practitioner’s Approach): “Block Handler” Unused (free) blocks Queued for entry into Unused Blocks released to queue when files deleted Used blocks

6 Z example revisited (2) 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 = 

7 Z example revisited (3) 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?)

8 Modifying the example Examples: 1. Change BlockQueue to BlockStack: 2. Output size of BlockQueue in AddBlock or RemoveBlock 3. Make BlockQueue part of “free” instead of “used”

9 Modifying the example

10 Formal methods in project (exercise) Class exercise: --Describe a priority queue in Z notation --Are there operations you need which have not yet been defined in these slides on the Z notation?