Purpose: practice refining a model to determine the correct pre-conditions for operations
Do exercise A.2.2 in Appendix A of the text. Some extra guidance:
hw04_1.als in the HW4 folder of your Subversion working copy.
inv, in your model describing each constraint.
inv[b] and not inv[b].
add and del.
Use your counterexamples generated in part (d) to decide what additional constraints you need to add.
Note: When Jackson says “constraints on the prestates” he means constraints on b.addr, n, and t, but not on b'. It would be easy (in Alloy) to just say that the invariant must hold for b', but we're trying to discover what preconditions we would need if we actually implemented an address book.
Justify your choice of scope for this part by adding a comment above each check command.