Models of Software Systems
Fall 2002

Class Meetings

Tuesday & Thursday, 10:30-11:50 AM, in Newell-Simon 3002.

Instructor

Professor David Garlan <garlan@cs.cmu.edu>
WeH 8115 (x8-5056)
Office Hours:  Mon 9:30 - 10:30 a.m.
Secretary:  Margaret Weigand, WeH 8120 (x8-2568)

Teaching Assistants

Jung Soo Kim <jungsoo@cmu.edu>
WeH 5320A
Office Hours:  Half hour after class, Wed 12:30 - 1:30 p.m., or by appointment

Dawn McLaughlin <dawnm@andrew.cmu.edu>
BH 143
Office Hours:  Half hour after class, Tue 12:30 - 1:30 p.m., or by appointment

Objectives

Scientific foundations for software engineering depend on the use of precise, abstract models and logics for characterizing and reasoning about properties of software systems. There are a number of basic models and logics that over time have proven to be particularly important and pervasive in the study of software sys-tems. This course is concerned with that body of knowledge. It considers many of the standard models for representing sequential and concurrent systems, such as state machines, algebras and traces. It shows how different logics can be used to specify properties of software systems, such as functional correctness, dead-lock freedom, and internal consistency. Concepts such as composition mechanisms, abstraction relations, invariants, non-determinism, and inductive and denotational descriptions are recurrent themes throughout the course.

By the end of the course you should be able to understand the strengths and weaknesses of certain models and logics, including state machines, algebraic and trace models, and temporal logics. You should be able to apply this understanding to select and describe abstract formal models for certain classes of systems. Fur-ther, you should be able to reason formally about the elementary properties of modeled systems.

Organization

Lectures. Classes meet Tuesday & Thursday, 10:30-11:50 AM, in Newell-Simon 3002.

Communication. We will be using the CMU Blackboard system this year for distributing most course materials, providing a general course bulletin board, and keeping track of student email addresses. In addition you can use:

Office Hours: The instructor and the TAs have weekly office hours, listed on the staff information page.
Email: We welcome email about the course at any time.
Readings. Most lectures will have a reading assignment that we expect you to complete before you come to class. Many of the reading assignments will be drawn from the required textbooks for the course:

Using Z: Specification, Refinement, and Proof, by Woodcock and Davies [WD96], and
Concurrency: State Models and Java Programs, by Magee and Kramer [MK99].
Additionally, the course has an optional reference book: The Z Notation: A Reference Manual, Second Edition, by J. M. Spivey (available on the web through http://spivey.oriel.ox.ac.uk/~mike/zrm). Some readings are in the form of handouts to supplement some lectures; other additional readings are technical papers. These will be made available as needed throughout the course. Finally, for supplementary detail, there are a number of additional books noted in References section.

Homework Assignments. The course is organized around (roughly) weekly homework assignments and a set of four projects. The purpose of the assignments and projects is to give you practice in using the models, logics, and tools of the course. We encourage you to discuss your homework with other stu-dents, but the final write-up must be your own work.

To give you the most opportunities to learn from the homework assignments, we will allow you to redo problems that didn't receive a passing grade. A redone homework must be turned in at the class following the one on which it is handed back. Problems done correctly the first time will be given more weight in the final grade.

Projects. We will be assigning four small projects that are designed to give you a chance to apply the ideas of the course to semi-realistic case studies. Each project will be completed by a team. Team members are expected to participate equally in the projects. We will distribute a team member ranking evaluation at the end of the semester.

On-line materials. Most of the course materials will be available electronically via the Blackboard System. You will find copies of the lecture slides, handouts, homework, and some readings. It will be your responsibility to make copies of these to bring to class or to use for homework. We will make sure that the lecture slides are available from the web site by noon on the day of the lecture.

To access these materials point your favorite web browser to: http://www.cmu.edu/blackboard/ and then click on CMU Users.

There is also a class afs directory: /afs/cs/academic/class/17651-f01. We may use this to store certain documents that can?t be stored on the Blackboard System.

The course texts have web sites. These are:

Using Z: http://softeng.comlab.ox.ac.uk/usingz/
Concurrency: State Models and Java Programs: http://www-dse.doc.ic.ac.uk/concurrency/
The Z Notation: http://spivey.oriel.ox.ac.uk/~mike/zrm/

PhD Option. Students taking the course for PhD credit will be required to complete a course project. This project is described in separate handout.

Exams. There will be a (take-home) mid-term (handed out Tuesday, October 15, due back Thursday, October 17) and a formal (in-class) final examination. Both exams will be open-book.

Grading

The course grade will be determined as a combination of five factors: homework assignments (30%), projects (30%), midterm exam (15%), and final exam (25%). The final grade may be adjusted up or down by instructor judgement, taking into account factors such as class participation, peer evaluations, and overall effort.

Schedule

Lecture
Date
Topic
Subtopic
Readings
Homework
1 Tue, 08/27 Introduction Course Info:  What's a model? Handout 1  
2 Thu, 08/29 Foundations Logic WL88 1-2.4, 3.1-3.3, Ch. 1 HW1
3 Tue, 09/03   Proof Techniques 1 WL88 2.5, 3.4, 3.5; 2, 3, 4 (skim) HW2
- Thu, 09/05   No Class    
4 Tue, 09/10   Sets, Relations, Functions 5, 6, 7, 8  
5 Thu, 09/12   Proof Techniques II, Sequences 9.1-4, 10.1-2; Handouts 4, 5 HW3
6 Thu, 09/17  State Machines Basic Concepts Handout 6  
7 Thu, 09/19   Variations Handout 7 HW4
8 Tue, 09/24   Reasoning about State Machines Handout 8  
9 Thu, 09/26   State Machine Lab Handout 11 HW5
10 Tue, 10/01 Z Introduction to Z Spi89 pp. 40-44 Lab 1
11 Thu, 10/03   Z Techniques Handout 10, 11.1-2, skim 11.3-4, 12.1-3 HW6
12 Tue, 10/08   Z Lab Handout 12  
13 Thu, 10/10   Examples HP99, Handout 9  
14 Tue, 10/15   Abstraction Part A
Abstraction Part B
16.1, Handout 13 HW6 Redos
Midterm Out
15 Thu, 10/17 Concurrency Introduction to Concurrency AS83, Handout 14 Midterm Due
16 Tue, 10/22   Concurrent State Machines MK99 Ch. 1-3, Handout 15 HW7, Lab 2
17 Thu, 10/24   Modelling Techniques MK99 Ch. 4-5 HW8
18 Tue, 10/29   Reasoning about Concurrency MK99 Ch. 6-7  
19 Thu, 10/31   FSP Lab   HW9
20 Tue, 11/05 Temporal Logic Linear Temporal Logic Kat96 Lab3
21 Thu, 11/07   Branching-time TL BBF01, Ch. 2, pp. 27-58  
22 Tue, 11/12 Model Checking SMV Introduction BBF01, Ch. 2, pp. 27-58  
23 Thu, 11/14   SMV Examples SMV00 pp. 1-9, BBF01 Ch. 12, pp. 131-138 HW11
24 Tue, 11/19   Modeling Checking Lab TBD  
25 Thu, 11/21 Other Concurrency Introduction to Petri Nets Pet77 HW12
26 Tue, 11/26   Reasoning about Petri Nets Jen91 Lab 4
- Thu, 11/28   No Class    
27 Tue, 12/03   State Charts, Sequence Diagrams, and UML-RT Ha87, RCB99 HW13
28 Thu, 12/05   Review for Final    

References

[AS83] "Concepts and Notations for Concurrent Programming," Andrews and Schneider. Computing Surveys, Vol. 15, No. 1, March 1983.

[BBF01] "Systems and Software Verification: Model Checking Techniques and Tools." B. Berard, M. Bi-doit, and A. Finkel. Springer Verlag, 2001, Ch. 2, pp. 27-58 and Ch. 12, pp. 131-138.

[Ha87] "Statecharts: a visual formalism for complex systems." D. Harel. Science of Computer Pro-gramming, 8:231-274, 1987. [WD96]

[HP99] "FAA En Route Resectorization - A Formal Specification." V.J. Harvey, and P.R.H Place. Unpublished manuscript, September 1999.

[Jen91] "Coloured Petri Nets: A High Level Language for System Design and Analysis." K. Jensen. In High-level Petri Nets: Theory and Application. K. Jensen and G. Rozenberg (eds.) Springer-Verlag, 1991.

[Kat96] "Temporal Logic" Draft version of chapter from book in preparation. 1996.

[MK99] Concurrency: State Models and Java Programs. J. Magee and J. Kramer. Wiley, 1999.

[Pet77] "Petri Nets." J. L. Peterson. ACM Computing Surveys, Sept 1977.

[WD96] Using Z: Specification, Refinement, and Proof. J. Woodcock and J. Davies. Prentice-Hall In-ternational, 1996.

[RCB99] "UML Walkthrough." J. Rumbaugh, I. Jacobson, and G. Booch. In The Unified Modeling Language Reference Manual. Addison Wesley, 1999, pp. 25-39.

[Spi89] "An Introduction to Z and Formal Specification", J. M. Spivey. SW Eng Journal, pages 40-50, January 1989.

[WL88] Software Engineering Mathematics. J. Woodcock and M. Loomis, Addison-Wesley 1988.
 

Supplemental Sources

[Dil90] Z: An Introduction to Formal Methods. Antoni Diller. Wiley, 1990.

[GH93] Larch: Languages and Tools for Formal Specification. Guttag and Horning. Springer-Verlag, 1993.

[GS95] A Logical Approach to Discrete Math. D. Gries and F.B. Schneider. Springer-Verlag, 1993.

[Ho85] Communicating Sequential Processes. C.A.R. Hoare. Prentice-Hall International, 1985.

[Ja97] The Way of Z: Practical Programming with Formal Methods. J. Jacky. Cambridge, 1997.

[MP91] The Temporal Logic of Reactive and Concurrent Systems Specification. Z. Manna and A. Pnueli. Springer-Verlag, 1991. Covers linear temporal logic. The relevant sections are 3.0-3.4.

[PST] An Introduction to Formal Specification and Z, Second Edition. Potter, Sinclair, and Till. Prentice-Hall International, 1996.

[Sch00] Concurrent and Real-time Systems: The CSP Approach. Steve Schneider. Wiley, 2000.

[WD96] Using Z: Specification, Refinement, and Proof. J. Woodcock and J. Davies. Prentice Hall 1996.

[Wo92] Software Development with Z: A Practical Approach to Formal Methods in Software Engineer-ing. J. B. Wordsworth. Addison-Wesley, 1992.

[ZRM] The Z Notation: A Reference Manual. J. M. Spivey. Prentice-Hall International, 1989. Available from http://spivey.oriel.ox.ac.uk/~mike/zrm/.



Updated:  14-Jan-02