CS 525V (S02) : Introduction
to Computer-Aided Verification
Homework 3: Modeling Software with SMV
The Problem
Consider a software system for managing circulation of books at a
library. The system tracks books and patrons. Books may be checked
in or checked out. If a book is checked out, it may also be on
request by other patrons. When the book is returned, the software
automatically checks it out to the next patron waiting for the book.
For each patron, the system keeps track of which books they have
checked out and which they have on request.
The library system needs to satisfy the following properties:
- If a patron requests a book, the book is eventually checked out to
that patron.
- The data on books and patrons is always consistent: that is, a
book shows as checked out to a patron if and only if that patron's
record indicates that the book is checked out to them. The same
relationship must hold for request information.
Exercises
The goal of this assignment is for you to explore how well-suited
SMV is to modeling and verifying more realistic software systems.
- (15 pts) Model the library system in SMV. Document your model
with a description of the modules you created, what they capture, and
what information flows between the modules.
- (10 pts) What modeling decisions did you have to make? For
example, if you had to limit the model in ways that you would not have
had to limit an implementation of this system, explain what those
limits are and why you need them. Your answer should point to ways in
which software implementations differ from software models.
- (5 pts) Verify the two desired properties of the library system.
- (10 pts) Discuss what aspects of the system/requirements were
easy to model with SMV and which were difficult. Illustrate your
conclusions with specific examples from your model. Propose general
conclusions about what aspects of software systems are easy or hard to
model with SMV.