The need for formal methods and other introductory comments - PowerPoint PPT Presentation

About This Presentation
Title:

The need for formal methods and other introductory comments

Description:

Ch 1 and 2 of Potter Sinclair and Till. 11/12/09. SWE 623. 2. The Importance of Specification ... Specifications can be used as contractual agreements of what ... – PowerPoint PPT presentation

Number of Views:11
Avg rating:3.0/5.0
Slides: 13
Provided by: csG6
Learn more at: https://cs.gmu.edu
Category:

less

Transcript and Presenter's Notes

Title: The need for formal methods and other introductory comments


1
The need for formal methodsand other
introductory comments
  • Covering
  • Ch 1 and 2 of Potter Sinclair and Till

2
The Importance of Specification
  • Specifications can be used as contractual
    agreements of what the software is supposed to
    do.
  • Must say what without saying how.
  • Need to be precise and detailed but without
    resorting to implementations.

3
Need for Abstraction
  • Because specification has to avoid implementation
    details, relevant aspects of the design need to
    be abstracted.
  • Hence need to select a notation that provides
    enough details but is not too cumbersome.

4
Notation
  • Select the Z specification language based on
  • Set theory (is again based on logic)
  • Logic
  • Plan
  • Introduce them informally (as stated in Ch 2 of
    PST) and,
  • Discuss them more formally(as in Ch 1 and 2 of HR)

5
Set Theory
  • Set collection of items
  • Ex 1,2,3, SWE-620, INFS-612
  • set of all prime numbers PRIME (say)
  • Set-membership relation
  • 3, 17 e PRIME and
  • SWE-623 \e SWE-620, INFS-612

6
Set Operators
  • Intersection A/\B
  • Elements in both A and B
  • Union AUB
  • Elements in A or B
  • Difference A\B
  • Elements in A but not B
  • Comprehension xeAf(x)
  • Elements of A satisfying f
  • Power-set P(A)
  • The set of all subsets of A

7
Some Examples
  • EU Belgium, France, Denmark
  • NATO Belgium,France,Canada
  • EU/\NATO Belgium,France
  • EU U NATO Belgium,France,Denmark,Canada
  • EU \ NATO Denmark
  • P(EU) Belgium,France,Denmark,
    Belgium,France,Belgium,Denmark, ..

8
Set Comparisons
  • A is a subset of B A ( B
  • Meaning every element of A is an element of B.
  • A B if and only if A ( B and B ( A
  • That means A and B have same elements

9
Empty/Universal Sets and Complements
  • Universal set U
  • Consists of all elements under discourse
  • Empty set f
  • Subset of U with no elements
  • Complement Ac
  • U \ A elements not in A.

10
Some Laws of Set Theory
  • A/\(B u C) (A/\B) u (A /\ C)
  • A u (B/\C) (A u B) /\ (A u C)
  • (A u B)c Ac /\ Bc
  • A /\ f A
  • A /\ U U
  • Can be shown with a simple logical arguments

11
Sample Proof of A/\ f f
  • Need to show, that for every element x e U
  • If x e A /\ f then x e f
  • If x e f then x e A /\ f
  • Suppose x e f.
  • Then x e A /\ f
  • As x e f and
  • false gt any statement

Suppose x e A /\ f. Then x e A and x e f.
Thus x e f.
12
The Need for Logical Reasoning
  • As we saw simple proofs use logic.
  • Hence we need to
  • know what proofs are and
  • How to produce proofs.
  • So we study Logic
  • Prepositional
  • To reason about ands ors and nots.
  • Predicate
  • To reason about properties of individuals and
    classes.
Write a Comment
User Comments (0)
About PowerShow.com