assign_06 - CS-536 spring 2010 Assignment

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS-536 spring 2010 Assignment #6------------------------------------------------------------Due date April 24 2010Question 1.Consider the earliest meeting time UNITY program.1a. Construct and formally prove partial correctness of a deterministic sequential program by showing that your program is a refinement of the UNITY program.Consider the earliest deterministic sequential program with 4 people. F1, F2, F3, F4.Program:r:=0 ; old-r := -1;while old-r r do;old-r := r;r:= f1(r)r:= f2(r)r:= f3(r)r:= f4(r)endFormal proof of partial correctness: The state transformation that the program is going through is f1 f2 f3 f4 f1 f2 f 3 f4 This is a branch of the computation tree of the UNITY program. Since the UNITY program is partially correct, a branch in the tree is also partially correct. 1b. Prove partial correctness directly :CINV: { u: 0<= u< r: !com(u) ^ r>=0}Proof:a)CINV before loop- { u: 0<= u< r: !com(u) ^ r>=0}Substitute r=0. The set is empty and its true for an empty setb){ u: 0<= u< r: !com(u) ^ r>=0}Substitute r:= f1(r)u: 0<= u<f1(r): !com(u) ^ f1(r)>=0u: 0<= u<f1(r): !...
View Full Document

This note was uploaded on 05/04/2011 for the course CS 536 taught by Professor Cs536 during the Spring '08 term at Illinois Tech.

Page1 / 5

assign_06 - CS-536 spring 2010 Assignment

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online