Lecture 1 (FM).ppt

Download Report

Transcript Lecture 1 (FM).ppt

Formal Methods in
Software Engineering
Credit Hours: 3+0
By: Qaisar Javaid
Assistant Professor
1
Formal Methods in Software Engineering
Introduction

Qaisar Javaid


Assistant Professor & Head
Have more than 10 Research Publications

Area of Interest





2
Software Engineering
Software Testing & QA
Computer Networks & Security
Formal Methods
Usability Engineering
Formal Methods in Software Engineering
Instructor’s Introduction

PhD Computer Science (Thesis Submitted)

MS Computer Science

MBA-Telecom Management

BS Computer Science

Microsoft Certified Trainer (MCT)

Cisco Certified Academy Instructor (CCAI)
Instructor’s Introduction
Cisco Certifications

Cisco Certified Internet Expert (CCIE)
Cisco Systems USA

Cisco Certified Network Professional
(Cisco Systems USA)

Cisco Certified Design Professional
(Cisco Systems USA)

Cisco Certified Security Specialist
(Cisco Systems USA)
Instructor’s Introduction
Microsoft Certifications

Microsoft Certified System Engineer (MCSE)
Microsoft Systems USA

Microsoft Certified Database Administrator (MCDBA)
Microsoft Systems USA

Microsoft Certified System Administrator
Microsoft Systems USA

Microsoft Certified Solution Developer
Microsoft Systems USA
Instructor’s Experience

Operations Manager (Key Solutions)


Manager Networks (BTC)


2005-2006
Assistant Professor (CIIT, Islamabad Campus)


2004-2005
Project Manager (International Islamic University)


2003-2004
2006-2007
Head Cisco Networking & Assistant Professor (IIUI)

2007-to date
Grading Policy
7
Area of Course
Weight
Quizzes
10
Assignments
10
Mid Term Exam 1
20
Mid Term Exam 2
20
Final Exam
40
Total
100
Formal Methods in Software Engineering
Your Role

You will actively participate in the class

Contribute links and any other interesting material you
think will help yourself or other students

Recall, I am one person

You are many and will likely discover resources that
I have not encountered
8
Formal Methods in Software Engineering
Text Book & Reference Books
Text Book


Using Z Specification, Refinement, and Proof


Logic and Discrete Mathematics: A Computer Science Perspective


9
Grassmann and Tremblay, (Prentice Hall).
Formal Specification and Documentation using Z: A Case Study Approach


Jim Woodcock and Jim Davies
Jonathan Bowen
Reference Books

The Logic Book , Merrie Bergmann, (McGraw-Hill).

Discrete Mathematics for Computing, John Munro, (Thomas Nelson)
Formal Methods in Software Engineering
Problems in software development
Specification
Program
Construct
S
What to do
P
How to do it
How to ensure that S is not ambiguous so that it can be correctly understood by
all the people involved?
How can S be effectively used for inspecting and testing P?
How can software tools effectively support the analysis of S, transformation from
S to P, and verification of P against S?
10
Formal Methods in Software Engineering
An example of informal specification:
“A software system for an Automated Teller Machine
(ATM) needs to provide services on various accounts.
The services include operations on current account,
operations on savings account, transferring money
between accounts, managing foreign currency account,
and change password. The operations on a current or
savings account include deposit, withdraw, show balance,
and print out transaction records.”
11
Formal Methods in Software Engineering
A better way to write the same specification:
“A software system for an automated teller machine (ATM) needs to provide
services on various accounts.
The services include
①
operations on current account
②
operations on savings account
③
transferring money between accounts
④
managing foreign currency account,
⑤
change password.
The operations on a current or savings account include
①
deposit
②
withdraw
③
show balance
④
print out transaction records.”
12
Formal Methods in Software Engineering
The major problems with informal specifications:




Informal specifications are likely to be ambiguous, which is likely to
cause misinterpretations.
Informal specifications are difficult to be used for inspection and
testing of programs because of the big gap between the functional
descriptions in the specifications and the program structures.
Informal specifications are difficult to be analyzed for their
consistency and validity.
Information specifications are difficult to be supported by software
tools in their analysis, transformation, and management (e.g., search,
change, reuse).
13
Formal Methods in Software Engineering
A possible solution to these problems:
Formal Methods!!!
14
Formal Methods in Software Engineering
Formal methods for the problems
What is formal methods?
Formal methods = Formal Specification
+
Refinement
+
Formal Verification
15
Set theory, logics, algebra, etc.
Formal Methods in Software Engineering
What are Formal Methods?

Definition
Mathematically based techniques for the specification,
development and verification of software and hardware
systems.
Can determine if:
 Specifications are satisfied.
 Implementation of a system is correct.
 Proving properties of a system.
16
Formal Methods in Software Engineering
What are Formal Methods?

Formal Language Specification Formal Methods centred
around a notation known as a formal specification language.
Formal Semantics



Mathematical base allows precise notions.
Unambiguous.
Allows consistency, correctness, specification and implementation to be
expressed.
Increase Human Understanding of Specified System.
&
Allow the possibility of formal reasoning and development.
17
Formal Methods in Software Engineering
Three Levels of Formal Methods
LEVEL 0
1. Requirements Only
2. No Analysis/Proof
3. Cost effective
Formal Specification
LEVEL 1
Formal Verification
LEVEL 2
Theorem Provers
18
1. Produce a
program in a more
formal manner
2. Use proofs of properties or
refinements from formal
specification
3. Costly
1. Use theorem prover
2. Fully formal machinechecked proofs.
3. Expensive, hard and
often costly
4. Formally prove the entire
system.
Formal Methods in Software Engineering
Thanks
19
Formal Methods in Software Engineering