Purpose: practice designing Alloy models using the Event signature style
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!
For this assignment you’ll be modeling the mailbox structure of an email client. Assume fixed mailboxes for incoming mail, outgoing mail, drafts of messages, previously sent mail, and deleted mail. Additional custom mailboxes may be arranged in a hierarchy. The beginning of a model for this system is given in hw06.als.
As in section 6.2.4 in the book, we’ll use events to model the email client, rather than operation predicates. The partial model hw06.als gives a few example events. For this part, your task is to complete the constraints for the following events:
Create – begins a new message in the Drafts mailbox
Send – Sends a message that is in the Outbox, files it in the Sent mailbox
FileMessage – moves a message from one mailbox to another (besides Outbox, Sent, and Drafts)
TrashMessage – moves a message to the Trash
Rearrange – moves one custom mailbox into another
Use the provided showEvent and showTrace commands to experiment with your events as you develop them. You should use Magic Layout, but that will hide the SpecialMailbox instances. To make them visible:
Events, but turn Show on for pre and post under Events.
CustomMailboxesOK and MessagesOK by calling the appropriate (provided) predicates. Check that your model satisfies all the assertions, adding any necessary conditions to your events.