Purpose: practice refining a model to determine the correct pre-conditions for operations
This is a team homework assignment. All work must be done by the team members together. All team members should understand all work submitted. If you have concerns about your own understanding or that of your teammates, please let me know. I want everyone to learn all they can in this course!
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.