Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
CE304 Assignment 4 Martin C. Henson March 20, 2013 This is individual work. Please refer to guidelines on cheating in the Departmental UG handbook. The following link is useful: http://www.essex.ac.uk/plagiarism/ Deadline: to be submitted electronically by 11:59:59 on Tuesday, 23 April 2013 Please refer to the UG handbook for the rules regarding late submission. The work will be returned within 21 days of submission This homework covers learning outcome learning outcomes “6. Write state-based specifications.” and “7. Prove elementary properties of state-based specifications.” A cooker has two hot plates controlled by two controls. Each control is either on or off. In order to prevent overheating, it is not permitted for both hot plates to be on at the same time. Stage 1. Specify the state (local state) for a single hot plate. Provide the introduction rule for this. You should use the type: CON T ROL = On | Of f in this schema. Stage 2. Specify an operation (local operation) to turn the single hot plate on. PLEASE NOTE: you DON’T have to worry about checking that the hot plate is off before it’s switched on – (unless you want to! – the first three stages are supposed to be as easy as possible. You will make life harder in stages 4 and 5 if you include a precondition at this stage!). Provide the introduction rule for this. Stage 3. Specify the cooker state (global state). Provide the introduction rule for this. Again, this uses the type CONTROL. Remember that at least one of the hot plates needs to be off in any valid state. Stage 4. Specify a linking operation schema (Φ) connecting the single hot plate state to the cooker state. This schema should take an input that determines 1 which hot plate is to be turned on. Use the type: P LAT E = One | T wo to represent the two possible hot plates. On the basis of this, the schema should link the local state change to the correct part of the global state change. Provide the introduction rule for this. Stage 5. Promote the local operation to form a global operation that turns on one of the two hot plates (at least when the other one is off). Provide the introduction rule. 2