Developed by Robert Olson Chapter 28 Formal Methods.

Slides:



Advertisements
Similar presentations
Software Requirements
Advertisements

Relational Algebra, Join and QBE Yong Choi School of Business CSUB, Bakersfield.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
The Engineering Design of Systems: Models and Methods
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.
Analytical Methods in CS (CIS 505)
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.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6 The Relational Algebra and Relational Calculus.
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.
CSC 2300 Data Structures & Algorithms January 16, 2007 Chapter 1. Introduction.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Requirements engineering l The process of establishing the services that the.
Rosen 1.6. Approaches to Proofs Membership tables (similar to truth tables) Convert to a problem in propositional logic, prove, then convert back Use.
This section will discuss the symbolism and concepts of set theory
Relational Model Session 6 Course Name: Database System Year : 2012.
Formal Methods CIS 376 Bruce R. Maxim UM-Dearborn.
Classical Sets and Fuzzy Sets
1 COSC 4406 Software Engineering COSC 4406 Software Engineering Haibin Zhu, Ph.D. Dept. of Computer Science and mathematics, Nipissing University, 100.
Math 3121 Abstract Algebra I Section 0: Sets. The axiomatic approach to Mathematics The notion of definition - from the text: "It is impossible to define.
DBSQL 3-1 Copyright © Genetic Computer School 2009 Chapter 3 Relational Database Model.
Chapter 3 The Relational Model. 2 Chapter 3 - Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between.
Model-Based Specification CIS 376 Bruce R. Maxim UM-Dearborn.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 6 The Relational Algebra.
Mathematical Preliminaries (Hein 1.1 and 1.2) Sets are collections in which order of elements and duplication of elements do not matter. – {1,a,1,1} =
1 Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 1 Adaptation to this.
Mathematical Preliminaries. Sets Functions Relations Graphs Proof Techniques.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Chapter 7 Review Important Terms, Symbols, Concepts 7.1. Logic A proposition is a statement (not a question.
Database Concepts. Data :Collection of facts in raw form. Information : Organized and Processed data is information. Database : A Collection of data files.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
CompSci 102 Discrete Math for Computer Science
L To identify the services that the customer requires from a system and the constraints under which it operates and is developed.
Formal Methods in Software Engineering “And they made their lives bitter with hard bondage … all their service … was with rigour.” Ex 1:14.
Naïve Set Theory. Basic Definitions Naïve set theory is the non-axiomatic treatment of set theory. In the axiomatic treatment, which we will only allude.
1 Introduction to Abstract Mathematics Sets Section 2.1 Basic Notions of Sets Section 2.2 Operations with sets Section 2.3 Indexed Sets Instructor: Hayk.
Mathematical Preliminaries
Formal Methods in SE Software Verification Using Formal Methods By: Qaisar Javaid, Assistant Professor Formal Methods1.
Software Engineering 2 -Prakash Shrestha.
THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.
Chapter 2 With Question/Answer Animations. Section 2.1.
Review 2 Basic Definitions Set - Collection of objects, usually denoted by capital letter Member, element - Object in a set, usually denoted by lower.
Requirements Engineering Methods for Requirements Engineering Lecture-31.
Chapter 3 The Relational Model. Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between mathematical.
Chapter 25 Formal Methods. BASIC CONCEPTS A method is formal if it has a sound mathematical basis, typically given by a formal specification language.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Function Hubert Chan (Chapter 2.1, 2.2) [O1 Abstract Concepts]
Module 2: Intro to Relational Model
Formal Modeling Concepts
Chapter 2: Intro to Relational Model
Function Hubert Chan (Chapter 2.1, 2.2) [O1 Abstract Concepts]
Chapter 2: Intro to Relational Model
Chapter 2: Intro to Relational Model
Chapter 2: Intro to Relational Model
Chapter 2: Intro to Relational Model
Set-Builder Notation.
Mathematical Background 1
Mathematical Background 1
Algebra 1 Section 5.2.
Chapter 2: Intro to Relational Model
Chapter 7 Logic, Sets, and Counting
Chapter 2: Intro to Relational Model
Example of a Relation attributes (or columns) tuples (or rows)
Chapter 2: Intro to Relational Model
Chapter 2: Intro to Relational Model
Lecture Sets 2.2 Set Operations.
Classical Sets and Fuzzy Sets
Terminology and Symbols
Presentation transcript:

Developed by Robert Olson Chapter 28 Formal Methods

Developed by Robert Olson Formal Methods The purpose of formal methods are to assist with project specification. These are not widely used in the industry.

Developed by Robert Olson Definition A method is formal if it has a sound mathematical basis, typically given by a formal specification of language.

Developed by Robert Olson Desired Properties Consistency Completeness Lack of amiguity

Developed by Robert Olson Problems of Informal Methods Contradictions Ambiguities Vagueness Incompleteness Mixed levels of abstraction

Developed by Robert Olson Formal Method Concepts Symbol Table Block Handler

Developed by Robert Olson Symbol Table Data invariant State Operation

Developed by Robert Olson Block Handler All 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 numbers The collection of used and unused blocks 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 duplicate block numbers

Developed by Robert Olson Set Operators # operator returns cardinality: #(a, b, c) = 3 ε operator signals membership: x ε X c operator signals set membership: A c B ∩ operator signals intersection: A ∩ B U operator signals union: A U B X operator signals Cartesian Product: A x B P operator signals power set: P{1,2,3}

Developed by Robert Olson Logic Operators ^ = and V = or ~, `, ‘, ⌐ = not => = implies Hardware failure

Developed by Robert Olson Sequences A sequence is a mathematical structure that models the fact that its elements are ordered. Sequences differ from sets since duplication is allowed.

Developed by Robert Olson Huh? Block Handler Example Define set A as all the blocks in the system #A = number of blocks in the system Define set B as all the unused blocks in the system and set C as all the used blocks A = {B, C} #B < #A B c A

Developed by Robert Olson OCL: Object Constraint Language x,yObtain property y of object x c->f()Apply built in function f to collection c itself. and/or/=/ Standard meanings p implies qIf p then q. Always true if q is true or p is false

Developed by Robert Olson Sample OCL Operations C = {1, 2, 3, 4, 5} C1= {1, 3, 5} C2= {0, 6, 7} c -> size()= 5 c -> isEmpty()= false c -> includesAll(C1)= true c -> excludesAll(C2)= true

Developed by Robert Olson Sample OCL Operations cont. C1 -> intersection(C2)= θ C1 -> union(C2)= {0,1,3,5,6,7} C -> first()= 1 C -> last()= 5 C -> find(x:x ε C and x<4)= {1, 2, 3}

Developed by Robert Olson Z Specification Language S : P XS is declared as a set of Xs x ε Sx is a member of S. S c TS is a subset of T S U TThe union of S and T P ^ QP and Q P => QP implies Q

Developed by Robert Olson Z Specification Language F:X >+> Yf is declared as a partial injection from X to Y dom FThe domain of f ran FThe range of f {x} ∆ FA function like f, except that x is removed from its domain

Developed by Robert Olson Problems with Formal Methods Complicated & Confusing Special Training Expensive Difficult to understand for those who aren’t trained

Developed by Robert Olson Ten Commandments Thou shalt choose the appropriate notation. Thou shalt formalize, but not overformalize. Thou shalt estimate costs. Thou shalt have a formal methods guru on call. Thou shalt not abandon thy traditional developmental methods.

Developed by Robert Olson Ten Commandments cont. Thou shalt document sufficiently. Thou shalt not compromise thy quality standards. Thou shalt not be dogmatic. Thou shalt test, test, and test again. Thou shalt reuse.