Shaoying Liu Department of Computer Science

Slides:



Advertisements
Similar presentations
© Fachgebiet Softwaretechnik, Heinz Nixdorf Institut, Universität Paderborn 2.4 The Z Notation [Reference: M. Spivey: The Z Notation, Prentice Hall]
Advertisements

PZ03D Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ03D - Program verification Programming Language Design.
Lecture # 2 : Process Models
The design process IACT 403 IACT 931 CSCI 324 Human Computer Interface Lecturer:Gene Awyzio Room:3.117 Phone:
SEP1 - 1 Introduction to Software Engineering Processes SWENET SEP1 Module Developed with support from the National Science Foundation.
LIFE CYCLE MODELS FORMAL TRANSFORMATION
Software Modeling SWE5441 Lecture 3 Eng. Mohammed Timraz
Software system modeling
Background information Formal verification methods based on theorem proving techniques and model­checking –to prove the absence of errors (in the formal.
ISBN Chapter 3 Describing Syntax and Semantics.
CS 355 – Programming Languages
The Z Specification Language
SD3049 Formal Methods Module Leader Dr Aaron Kans Module website
Formal Methods in Software Engineering Credit Hours: 3+0 By: Qaisar Javaid Assistant Professor Formal Methods in Software Engineering1.
Formal Methods of Systems Specification Logical Specification of Hard- and Software Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt.
Formal Methods: Z CS 415, Software Engineering II Mark Ardis, Rose-Hulman Institute March 18, 2003.
SE curriculum in CC2001 made by IEEE and ACM: Overview and Ideas for Our Work Katerina Zdravkova Institute of Informatics
Refinements in Z Shmuel Katz The Technion Formal Specifications of Complex Systems (CS236368)
©Ian Sommerville 2000Software Engineering, 6/e, Chapter 91 Formal Specification l Techniques for the unambiguous specification of software.
IMS5024 Week 61 IMS 5024 Object orientation (1). IMS5024 Week 62 Content Individual assignment date Group assignment What is object orientation? n Place.
Describing Syntax and Semantics
School of Computer ScienceG53FSP Formal Specification1 Dr. Rong Qu Introduction to Formal Specification
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 10 Slide 1 Formal Specification.
Chapter 1 The Systems Development Environment Modern Systems Analysis and Design Sixth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 10 Slide 1 Critical Systems Specification 3 Formal Specification.
Chapter 1 The Systems Development Environment
Data Structures and Programming.  John Edgar2.
Chapter 2 The process Process, Methods, and Tools
Chapter 1 The Systems Development Environment
-Nikhil Bhatia 28 th October What is RUP? Central Elements of RUP Project Lifecycle Phases Six Engineering Disciplines Three Supporting Disciplines.
Software Models (Cont.) 9/22/2015ICS 413 – Software Engineering1 -Component-based software engineering -Formal Development Model.
Course: Software Engineering © Alessandra RussoUnit 1 - Introduction, slide Number 1 Unit 1: Introduction Course: C525 Software Engineering Lecturer: Alessandra.
A Z Approach in Validating ORA-SS Data Models Scott Uk-Jin Lee Jing Sun Gillian Dobbie Yuan Fang Li.
Invariant Based Programming in Education Tutorial, FM’08 Linda Mannila
HCI in Software Process Material from Authors of Human Computer Interaction Alan Dix, et al.
Overview of Formal Methods. Topics Introduction and terminology FM and Software Engineering Applications of FM Propositional and Predicate Logic Program.
Faculty of Computer & Information Software Engineering Third year
Chapter 25 Formal Methods Formal methods Specify program using math Develop program using math Prove program matches specification using.
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
School of Computing and Mathematics, University of Huddersfield CIA2326: Week 11 LECTURE: Formal Specification TUTORIAL/PRACTICAL: Finish off last weeks.
Information Systems Engineering. Lecture Outline Information Systems Architecture Information System Architecture components Information Engineering Phases.
UHD::3320::CH121 DESIGN PHASE Chapter 12. UHD::3320::CH122 Design Phase Two Aspects –Actions which operate on data –Data on which actions operate Two.
Requirements Engineering Methods for Requirements Engineering Lecture-30.
Verification of behavioural elements of UML models using B Truong, Ninh-Thuan and Souquieres, Jeanine In Proceedings of the 2005 ACM Symposium on.
SD3049 Formal Methods. Formal Methods Module Leader Dr Aaron Kans
ISBN Chapter 3 Describing Semantics.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Safety-Critical Systems 4 Formal Methods / Modelling
Software Development Problem Analysis and Specification Design Implementation (Coding) Testing, Execution and Debugging Maintenance.
Formal Methods in SE Software Verification Using Formal Methods By: Qaisar Javaid, Assistant Professor Formal Methods1.
Software Engineering 2 -Prakash Shrestha.
RE-ENGINEERING AND DOMAIN ANALYSIS BY- NISHANTH TIRUVAIPATI.
Formal Verification. Background Information Formal verification methods based on theorem proving techniques and model­checking –To prove the absence of.
Lectures 2 & 3: Software Process Models Neelam Gupta.
1 “B is a method for specifying, designing, and coding software systems.” J.R. Abrial, The B-Book, Cambridge University Press.
CSC3315 (Spring 2009)1 CSC 3315 Languages & Compilers Hamid Harroud School of Science and Engineering, Akhawayn University
Formal Methods. What Are Formal Methods Formal methods refers to a variety of mathematical modeling techniques that are applicable to computer system.
Requirement Specification SRS document is a contract between the development team and the customer How do we communicate the Requirements to others? Firm.
Comparison of ZOOM with other Formal Methodologies Hsiu-Chien Jing SE690 Initial Presentation School of CTI, DePaul University Supervised by Dr. Jia October,
Formal Specification.
How does it work? What is it made of? What is it made of?
Software Engineering Lecture 8
Formal Techniques (CS340 © John C. Knight 2004)
Principles of Computing – UFCFA Lecture-1
Designing Software for Ease of Extension and Contraction
B (The language of B-Method )
Logical architecture refinement
Principles of Computing – UFCFA Week 1
Presentation transcript:

Formal Engineering Methods for Software Development --An Introduction to SOFL-- Shaoying Liu Department of Computer Science Faculty of Computer and Information Sciences Hosei University Email: sliu@k.hosei.ac.jp URL: http://cis.k.hosei.ac.jp/~sliu/ fdh

2006年 4月9日の 朝日新聞

Textbook and References The textbook: “Formal Engineering for Industrial Software Development Using the SOFL Method”, by Shaoying Liu, Springer-Verlag, 2004, ISBN 3-540-20602-7

1. Introduction Problems in software development Formal methods for the problems Challenges to formal methods Formal engineering methods for the challenges SOFL: a specific formal engineering method

1.1 Problems in software development Specification Program S P Construct What to do 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?

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.”

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.”

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).

A possible solution to these problems: Formal Methods!!!

1.2 Formal methods for the problems What is formal methods? Formal methods = Formal Specification + Refinement Formal Verification Set theory, logics, algebra, etc.

Formal methods can also be understood as the following three components: Formal notation (or language) for writing specifications. Logical calculus for formal verification (or proof) Method for developing software systems.

Refinement Specification Implementation Verification From the abstract to the concrete Refinement Specification Implementation How to do it What to do Verification Check the correctness

Testing Requirements analysis Formal Specification Design Coding Validation Formal Specification Verification Design Verification Coding Testing

The question of our interest is: How to write a formal specification? Many formal notations have been developed for writing formal specifications and the most commonly used ones include VDM, Z, and B.

The most commonly used formal methods VDM-SL (Vienna Development Method – Specification Language), IBM Research Laboratory in Vienna References: “Systematic Software Development Using VDM’’, by Cliff B. Jones, 2nd edition, Prentice Hall,1990. (2) “Modelling Systems”, by John Fitzgerald and Peter Gorm Larsen, Cambridge University Press,1998.

Operation specification: OperationName(input)output ext State variables pre preconiditon post postcondition Example: Add(x : nat) y : nat ext rd z : nat /*z is an external variable */ pre true post y > x + z

Operations are organized into modules: module A local variables declarations invariant declarations operation specification1; operation specification2; … operation specificationn; end

(2) Z, PRG (Programming Research Group), the University of Oxford, UK References: “The Z Notation”, by J.M. Spivey, Prentice Hall, 1989. (2) “Using Z: Specification, Refinement, and Proof’’, by Jim Woodcock and Jim Davies, Prentice Hall, 1996.

declaration age: N predicate age > 0 A Z specification is composed of a set of schemas and possibly their sequential compositions. A schema can be used to define global variables, state variables, and operations. Axiomatic schema for defining global variables: declaration age: N predicate age > 0

A schema for defining state variables: BirthdayBook Known: P NAME birthday: NAME → DATE known = dom birthday

A schema for defining an operation: AddBirthday △BirthdayBook name?: NAME date?: DATE name? ∉ known birthday’ = birthday ∪{name? → date?}

Jean-Raymond Abrial, France References: (3) B-Method, Jean-Raymond Abrial, France References: (1) “The B-Book: Assigning Programs to Meanings”, by J-R Abrial, Cambridge University Press,1996, A B specification is composed of a set of related abstract machines. Each abstract machine is a module that contains a set of operation definitions. Each operation is defined using pre- and postconditions.

1.3 Challenges to formal methods Formal specifications of large-scale and complex software systems can be difficult to write, to read, and to understand for many engineers in industry. Communications between clients and developers via formal specifications can be difficult. Modifications of formal specifications for consistency during a project can be time-consuming and costly. Formal verification is difficult to perform and is not cost-effective for the assurance of program correctness. The tool support does not necessarily reduce the difficulty of using formal methods.

1.4 Formal engineering methods for the challenges Formal Engineering Methods (FEM) provide a way to integrate Formal Methods into the entire software development process to achieve rigor (methodology), comprehensibility (human), and tool supportability (tool) of software process.

Application of Formal Methods in Software Engineering

The difference between FM and FEM FM answers the question: what should we do and why? FEM answers the question: what can we do and how?

1.5 SOFL: a specific formal engineering method SOFL stands for Structured Object-oriented Formal Language Started at the University of Manchester, UK in 1989. Completed at Hiroshima City University. Finalized at Hosei University in 2000.

SOFL = Language + Method + Process As a language, SOFL supports proper combination of graphical and formal notations for constructability, comprehensibility, and maintainability. As a method, SOFL adopts formal specification for developing systems, and specification-based inspection and testing for verification and validation. It also combines the structured method and object-oriented method for software development. As a process, SOFL adopts both evolution and refinement, and emphasizes the paradigm of first specification and then incremental implementation.

A general structure of a SOFL specification

Component Architecture

Exercise 1 1.Answer the following questions. a.What is software life cycle? b.What is the problem with informal approaches to software development? c.What are formal methods? d.What are the major features of formal engineering methods? e.What is SOFL? 2.Explain the role of specification in software development. 3.Give an example of using a method similar to formal methods to build other kinds of systems rather than software systems.