COMP20352: Software Engineering 2 (2007-2008)
In this course unit, we will build on the overall picture of software engineering presented in COMP20341 by focussing on issues of software quality, and software correctness in particular. No matter how quickly or cheaply a piece of software can be developed, if it does not meet the needs of the users for whom it was intended then the time and money spent on it have been wasted. However, achieving correctness of software can be very expensive. Since resources are typically limited, software developers must tailor their software quality efforts to the needs of each specific project. For some systems, such as tourist information web pages, it is not worthwhile to spend a lot of time on preventing and correcting defects, whereas for others, such as software to manage radiography equipment, the consequences of defects in the delivered system are much more serious and much more effort must be devoted to ensuring correctness of the software. Therefore, a spectrum of approaches to ensuring software quality must be considered.
We will present a range of approaches to ensuring software quality, starting with informal approaches, which are relatively cheap but give few guarantees, and continuing to highly formal techniques which are expensive but which can provide proofs of correctness.
Be aware of a range of informal techniques for the detection and correction of defects software, and be able to apply them to simple examples. (A, B)
Be aware of the opportunities for prevention of defects during software development, and have an understanding of their strengths and limitations. (A, B)
Know and understand the principles of Design by Contract. (A)
Know current language support for Design by Contract. (A)
Be able to apply Design by Contract in practice to a simple example. (B)
Appreciate the possible role of formality in the software development process (A)
Have a knowledge and understanding of the Z specification method, and be able to create simple program specifications using Z. (A)
Be able to effectively use the ZTC tool in the construction of simple program specifications. (C)
Assessment of Learning outcomesAll learning outcomes are assessed by the laboratory work. Learning outcomes 1, 2, 3, 4, 6 and 7 are also assessed by examination.
Contribution to Programme Learning OutcomesA1, A2, A4, B1, B2, C6, D2, D6
Informal Software Quality assurance  - Taught by SME
Approaches to defect detection and prevention, including formal technical review, software process improvement and further software verification techniques.
Design by Contract  - Taught by KKL
Principles of Design by Contract. Software reliability. Contracts as obligations and benefits. Pre/post-conditions for methods. Class invariants Practice of Design of Contract. Language support for assertions and verification. Static versus dynamic checking of contracts. Survey of state-of-the-practice.
Guest lecture 
See course unit web site for details.
System Specification - taught by JTL
This will follow Currie: the lectures will particularly attempt to reinforce the underlying mathematics, which is skimmed somewhat by Currie. The book is deceptively thin, which can give a false impression of the subject matter. In fact, most of the solid understanding gained from the book is obtained by attempting its exercises, rather than merely reading its text. The students are seriously encouraged to try the exercises as the course proceeds, and compare their answers with those in the book. The exam will assume that most exercises have been tried, and all lectures have been attended.
Sets and types 
Z specification structure 
Example: Badminton club 
Example: Video shop 
Example: Project allocation 
Example: Timetabling system 
Example: Genealogical database 
Supplementary TextTitle: Software Quality Assurance: from Theory to Implementation
Author: D. Galin
Publisher: Pearson Education Ltd
This text gives good background on informal approaches to software quality.
Supplementary TextTitle: Software engineering: a practitioner`s approach (8th edition)
Author: Pressman, Roger S.
Publisher: McGraw Hill
Chapters 13, 14, 20 & 26 give good background on informal approaches to software quality assurance.