a3 - } (c) { x = 1 } if ( y = x ) then y := x else y := x {...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE 755, Assignment #3 Due: May 12, ’06. 1. (6 points). Which of the following are operationally valid and which invalid? Provide brief justifica- tions for your answers (for the invalid ones your justification must include an example that demon- strates the invalidity of the result): (a) { x = 1 } y := x { x = 1 } (b) { z = 1 ( z > 0 x = z ) } y := x { x = y = z
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } (c) { x = 1 } if ( y = x ) then y := x else y := x { y = 1 } (d) { true } while x < do x := x-1 { x = 0 } 2. (4 points). Derive the following using the axioms and rules of inference we have seen: (a) { x = 1 } y := x { x > } (b) { z = 1 ( z > x = z ) } y := x { x = y = z } 1...
View Full Document

Ask a homework question - tutors are online