software engineering lecture 4 n.
Skip this Video
Loading SlideShow in 5 Seconds..
Software Engineering Lecture 4 PowerPoint Presentation
Download Presentation
Software Engineering Lecture 4

Loading in 2 Seconds...

play fullscreen
1 / 8

Software Engineering Lecture 4 - PowerPoint PPT Presentation

  • Uploaded on

Software Engineering Lecture 4. Vladimir Safonov , Professor, head of laboratory St. Petersburg University Email: WWW: The role of the programming paradigms under consideration.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'Software Engineering Lecture 4' - pisces

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
software engineering lecture 4

SoftwareEngineeringLecture 4

Vladimir Safonov,

Professor, head of laboratory

St. Petersburg University



the role of the programming paradigms under consideration
The role of the programming paradigms under consideration
  • Structured programming – systematic design and development of (mainly) the control flow parts (statements)
  • Stepwise refinement – convenient top-down technique of rapid application prototyping
  • Modular programming – systematicprogram decomposition into relatively independent parts (modules)
  • Also of great importance aretechniques for design and development of data types and structures

(C) Vladimir O. Safonov, 2004

abstract data types adt
Abstract Data Types (ADT)
  • Founders (1970s):

- Sir Tony Hoare: Oxford University , MSR;

- Prof. Barbara Liskov: Massachusetts Institute of Technology

- Prof. David Parnas (U.S. and Canadian universities)

  • Basic principles

- Type = concrete representation+ set of abstract operations

- Direct access to concrete representation is not allowed

- Handling values (or objects) of the typeT is possible only via its abstract operationsP1, … Pn, so the type T is encapsulated

  • ADT can be regarded as a kind of modularity (name and set of operations – interface; concrete representation and bodies of operations – implementations
  • Before ADTsimilar approach was applied topredefined (primitive) types: VAR i: INTEGER; BEGIN … i := i+1; … END

(C) Vladimir O. Safonov, 2004

adt specifics
ADT specifics
  • “Types are not sets” (F. Morris)
  • Encapsulation
  • Formal specification of ADT semantics necessary
  • R. Floyd’s – C.A.R. Hoare’s method: P { S } Q
  • Denotational semanticsof ADT (D. Scott, J. Donahue): program is a transformer of predicates the kind:P(X1, … Xn),

whereXi – set of variables

  • Algebraic specification of ADT (theADJ group, lead – prof. J.A. Goguen, the author of OBJ specification language): type – multi-sorted algebra; S1, … Sk – sorts (carrier); P1, …, Pm – operations (signature); semantics – set of equates of the kind:T1 = T2 where T1 and T2 - terms

(C) Vladimir O. Safonov, 2004

adt advantages
ADT advantages
  • Modularity
  • Increasing reliability
  • Formal specification and verification of ADT
  • ADT libraries and reusability

(C) Vladimir O. Safonov, 2004

adt issues and how to solve them
ADT issues and how to solve them
  • “ADT are non-efficient” (each abstract operation is a routine!) -> using macros and inline routines; program optimization (the task of the compiler rather than user)
  • “ADT are too complicated” (it seems simpler to code “from scratch” and to write explicitly something like:

P^.X [index]^.Y := something )

-> such “coding technique” leads to buggy and non-readable programs. ADT is a comfortable technique of abstraction from details:

SetMyProp(P, something);

(C) Vladimir O. Safonov, 2004

adt languages
ADT languages
  • FORTRAN & PASCAL  - predefined types are regarded as ADT with infix:X+Y or functional:SIN(X) style of operations
  • CLU (B. Liskov) – the first ADT language; played outstanding partin all subsequent development ofprogramming languages – M.I.T., 1974
  • ALPHARD (M. Shaw, Carnegie-Mellon Univ.) – the“competitive project” toCLU; based on similar ideas, butHoare-style specification and verification added to the language
  • Ada (package, task); Modula-3 (interface); Java, C# … -

contain elements of ADT concept

(C) Vladimir O. Safonov, 2004

references and home task to lecture 4
References and home task to lecture 4
  • Please read the following papers and get acquainted to their approached to ADT:
  • Liskov B, Guttag J. Using abstractions and specifications in program development. – Addison-Wesley, 1986
  • Hoare, C.A.R. Proof of correctness of data representation (article, 1972)

(C) Vladimir O. Safonov, 2004