Software Engineering Lecture 8

Slides:



Advertisements
Similar presentations
Formal techniques for getting software right: some old ideas and some new tools Applied Formal Methods Research Group David Lightfoot:
Advertisements

© Fachgebiet Softwaretechnik, Heinz Nixdorf Institut, Universität Paderborn 2.4 The Z Notation [Reference: M. Spivey: The Z Notation, Prentice Hall]
Carlos D. Rivera February 28, 2007 Design-by-Contract.
An Abstract Interpretation Framework for Refactoring P. Cousot, NYU, ENS, CNRS, INRIA R. Cousot, ENS, CNRS, INRIA F. Logozzo, M. Barnett, Microsoft Research.
Computing Fundamentals 2 Introduction to CafeOBJ Lecturer: Patrick Browne Lecture Room: K408 Lab Room: A308 Based on work by: Nakamura Masaki, João Pascoal.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
An Introduction to the Model Verifier verds Wenhui Zhang September 15 th, 2010.
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 11.
Extended DEVSML as a Model Transformation Intermediary to Make UML Diagrams Executable Jianpeng Hu Dept. of Computer Science and Engineering Shanghai Jiao.
August Moscow meeting1August Moscow meeting1August Moscow meeting11 Deductive tools in insertion modeling verification A.Letichevsky.
Fall Semantics Juan Carlos Guzmán CS 3123 Programming Languages Concepts Southern Polytechnic State University.
Shaoying Liu Department of Computer Science
Formal Methods: Z CS 415, Software Engineering II Mark Ardis, Rose-Hulman Institute March 18, 2003.
Software Engineering COMP 201
Train Control Language Teaching Computers Interlocking By: J. Endresen, E. Carlson, T. Moen1, K. J. Alme, Haugen, G. K. Olsen & A. Svendsen Synthesizing.
Knowledge and Systems Research Group, University of Huddersfield B vs OCL: Comparing Specification Languages for Planning Domains Diane Kitchin, Lee McCluskey,
Discrete Mathematics Lecture 4 Harper Langston New York University.
Vienna Development Method SIM5104. one of the longest-established Formal Methods for the development of computer- based systemsFormal Methods Originating.
PSUCS322 HM 1 Languages and Compiler Design II Formal Semantics Material provided by Prof. Jingke Li Stolen with pride and modified by Herb Mayer PSU Spring.
Basic Definitions Data Structures: Data Structures: A data structure is a systematic way of organizing and accessing data. Or, It’s the logical relationship.
School of Computer ScienceG53FSP Formal Specification1 Dr. Rong Qu Introduction to Formal Specification
Program Analysis Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
MCA –Software Engineering Kantipur City College. Topics include  Formal Methods Concept  Formal Specification Language Test plan creation Test-case.
1 A Introduction to Data Structures and Algorithm Analysis Data Structures Asst. Professor Kiran Soni.
University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec17 1 Lecture 17: Formal Modeling Methods Formal Modeling Techniques.
Requirements Expression and Modelling
LDK R Logics for Data and Knowledge Representation Modeling First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia.
Introduction to Formal Methods Based on Jeannette M. Wing. A Specifier's Introduction to Formal Methods. IEEE Computer, 23(9):8-24, September,
Prepared By Ms.R.K.Dharme Head Computer Department.
111 Protocols CS 4311 Wirfs Brock et al., Designing Object-Oriented Software, Prentice Hall, (Chapter 8) Meyer, B., Applying design by contract,
Modeling and simulation of systems Model building Slovak University of Technology Faculty of Material Science and Technology in Trnava.
Software Engineering Lecture 1 Vladimir Safonov, Professor, head of laboratory St. Petersburg University WWW:
ECE 8443 – Pattern Recognition ECE 3163 – Signals and Systems Objectives: Definition of a System Examples Causality Linearity Time Invariance Resources:
Requirements Engineering Methods for Requirements Engineering Lecture-30.
Requirements Specification. Welcome to Software Engineering: “Requirements Specification” “Requirements Specification”  Verb?  Noun?  “Specification”
Program Analysis and Verification Spring 2014 Program Analysis and Verification Lecture 4: Axiomatic Semantics I Roman Manevich Ben-Gurion University.
Data Structures and Algorithms Dr. Tehseen Zia Assistant Professor Dept. Computer Science and IT University of Sargodha Lecture 1.
Page 1 Adapted after Dr. Menezes Recurrence 1 …..
Software Engineering Lecture 6 Vladimir Safonov, Professor, head of laboratory St. Petersburg University WWW:
Software Engineering Lecture 2 Vladimir Safonov, Professor, head of laboratory St. Petersburg University WWW:
Program Analysis and Verification Spring 2015 Program Analysis and Verification Lecture 4: Axiomatic Semantics I Roman Manevich Ben-Gurion University.
Software Engineering Modern Approaches Eric Braude and Michael Bernstein 1.
Requirements Engineering Methods for Requirements Engineering Lecture-31.
Daniel Amyot, University of Ottawa Based on Powerpoint slides by Gunter Mussbacher (2009) with material from: Jo Atlee, Dan Berry (both University of Waterloo);
UniTesK Test Suite Architecture Igor Bourdonov Alexander Kossatchev Victor Kuliamin Alexander Petrenko.
Formal Methods. What Are Formal Methods Formal methods refers to a variety of mathematical modeling techniques that are applicable to computer system.
Prof. I. J. Chung Data Structure #1 Professor I. J. Chung.
Data Structures Dr. Abd El-Aziz Ahmed Assistant Professor Institute of Statistical Studies and Research, Cairo University Springer 2015 DS.
Code: BCA302 Data Structures with C Prof.(Dr.) Monalisa Banerjee By.
Software Engineering Lecture 4 Vladimir Safonov, Professor, head of laboratory St. Petersburg University WWW:
Introduction toData structures and Algorithms
Requirements Specification
Automatic Test Generation
Lecture 3: Incompletely Specified Functions and K Maps
Software Engineering Lecture 7
Introduction to Formal Methods
Introduction to formal languages and automata
State Space Representation
Principles of Computing – UFCFA Lecture-1
Lecture 3: Incompletely Specified Functions and K Maps
Generic Language Technology (2IS15) Dynamic Semantics
State Space Analysis UNIT-V.
Dynamic Modeling Lecture # 37.
Protocols CS 4311 Wirfs Brock et al., Designing Object-Oriented Software, Prentice Hall, (Chapter 8) Meyer, B., Applying design by contract, Computer,
Department of Computer Science Abdul Wali Khan University Mardan
Motivation for Language Specification
Principles of Computing – UFCFA Week 1
Basic Concepts of Algorithm
Motivation for Language Specification
UNIT-II CHAPTER-4 SOFTWARE REQUIREMENT DEFINITION
Presentation transcript:

Software Engineering Lecture 8 Vladimir Safonov, Professor, head of laboratory St. Petersburg University Email: v_o_safonov@mail.ru WWW: http://user.rol.ru/~vsafonov Язык программирования Java. Лекция 1

Program specification Specification – the stage of software lifecycle, to follow by the requirements & goals stage Specification – a formalized, external, precise and complete description of the task to be solved by the program or its part in question Simply: specification is WHAT, rather than HOW Typical element of specification is a mathematical formula, e.g., fact(n) = 1 * 2 * … * n Implementation of an algorithm, data representation, etc. are not elements of specification Complete specification: taking into account all the alternatives, e.g., n = 0 for fact(n): fact(0) = 1 (C) Vladimir O. Safonov, 2004

Specification techniques Natural language HIPO diagrams (Hierarchical Input-Process-Output) Decision tables Program calculus (operator schemas) by R. Floyd – C.A.R. Hoare: P {S} Q A{S}B, B{T}C |- A{S;T} C Denotational semantics (D. Scott, J.Donahue at al.): program is a transformer of predicates: P(x1, … xn) -> Q(x1, …, xn), where xi – free (global) variables Vienna Definition Method (VDM; IBM Research): program – system of mutually related finite-state automata Algebraic (G.A. Goguen et al.): program – a collection of ADT, each of them specified as multi-sorted algebra Petri nets – specifying asynchronous programs and computing systems (see: Kotov V. E. Petri nets.: Nauka, 1986) (C) Vladimir O. Safonov, 2004

Specification languages VDM – specification using the concept of finite automaton (Ollongren A. Defining programming languages by interpretive automata. – Prentice Hall, 1977) OBJ, CLEAR, SDL, LARCH – algebraic specification languages (please see OBJ description in J.A. Goguen’s papers) CIP/L (“Wide Spectrum Multi-Layered Language) – Technical University, Munich, 1979 References to VDM, Z, LARCH – please see: I. Sommerville’s textbook (C) Vladimir O. Safonov, 2004

OBJ3 (Prof. G. A. Goguen). Example (1/2) ftp://www. cs. ucsd OBJ3 (Prof. G. A. Goguen). Example (1/2) ftp://www.cs.ucsd.edu/pub/fac/goguen/obj3/ University of California, San Diego obj NAT is sort Nat . op 0 : -> Nat . op s_ : Nat -> Nat [prec 1] . endo obj NATOPS is pr NAT . op 1 : -> Nat . eq 1 = s 0 .  op _+_ : Nat Nat -> Nat [assoc comm prec 3] . vars M N : Nat . eq M + 0 = M . eq M + s N = s(M + N) . (C) Vladimir O. Safonov, 2004

OBJ3: Example (2/2) op _*_ : Nat Nat -> Nat [assoc comm prec 2] . eq M * 0 = 0 . eq M * s N = M * N + M .  op _**_ : Nat Nat -> Nat [prec 4] . eq M ** 0 = 1 . eq M ** s N = (M ** N) * M .  op _-_ : Nat Nat -> Nat . eq M - 0 = M . eq 0 - M = 0 . eq s M - s N = M - N . [ SKIP … ]   [lemma1] cq (N * N)**(M %2) = N ** M if even M . [lemma2] cq N *(N **(M - s 0)) = N ** M if pos M . endo (C) Vladimir O. Safonov, 2004

A monograph on OBJ and algebraic specifications (C) Vladimir O. Safonov, 2004

Other approaches to specification B Liskov. CLU (M.I.T.): GCD = proc (int M, N) signals (overflow) requires N > 0; effects GCD(M, N) = greatest common divisor of M, N - ср. с “Design-by-Contract” (Dr. B. Meyer, Eiffel) M. Shaw. ALPHARD (Carnegie-Mellon Univ.) ADT specifications (forms) – by R. Floyd, C.A.R. Hoare. For each ADT, the pre- & post-conditions for each abstract operation, and also abstract invariant and concrete invariant are indicated – a predicate to hold on the abstract (concrete) data items participating in the ADT definition: e.g., SP > 0 (C) Vladimir O. Safonov, 2004

Automated program synthesis by specification (E. Tougu, S.S. Lavrov) Task formulation: Given a specification of the application domain D (as a collection of equates) and a specification of the pre- and post-conditions: Pre {S} Post Goal: authoated synthesis of the program S Tools intended to solve similar tasks (U.S.S.R): - PRIZ -> NUT (E. Tougu; please see his monograph: Conceptual programming, Moscow, Science Publishers, 1984) - SPORA (S. Lavrov; automated program synthesis system with the specification language DESCARTES, 1980s) (C) Vladimir O. Safonov, 2004

References Agafonov V.N. Program specification. Concepts and their organization. – Novosibirsk: Science Publishers, 1988 Mathematical logic in programming. - Moscow: World Publishers, 1991 Requirements and Specifications on Program Development. - Moscow, World Publishers, 1984 (C) Vladimir O. Safonov, 2004