{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

assign_06

# assign_06 - CS-536 spring 2010 Assignment#6-Due date –...

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

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

View Full Document
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)>=0¥u: 0<= u<f1(r): !...
View Full Document

{[ snackBarMessage ]}

### Page1 / 5

assign_06 - CS-536 spring 2010 Assignment#6-Due date –...

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

View Full Document
Ask a homework question - tutors are online