CS Behind the Curtain (CS195 2003S)
Primary:
[Front Door]
[Current]
[Glance]
-
[Blurb]
[Disabilities]
[Honesty]
[Instructions]
[Links]
[Search]
[Syllabus]
Groupings:
[EBoards]
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Outlines]
[Readings]
[Reference]
ECA:
[About]
[Grades]
[Quizzes]
[Submit Work]
[Change Password]
[Reset Password]
Misc:
[Walker/Fall 2001]
[SamR]
Back to Reading Lines (2). On to Reading Gries.
Held: Wednesday, 2 April 2003
Summary: Today we consider an interesting new form of conditional and the formal definition of that form of conditional.
Related Pages:
Due
Notes:
Overview:
if guard1 -> S1 | guard2 -> S2 | guard3 -> S3 ... | guardn -> Sn fi
if x >= y -> m := x | y >= x -> m := y fi
wp(if G1 | G2 ... | Gn fi, P) =
(for all 1 <= i <= n, domain(Gi))
and (exists 1 <= i <= n, Gi)
and (forall 1 <= i <= n, Gi => wp(Si, P)
guess := a[1]; i := 2; while (i <= n) if guess < a[i] -> guess,i := a[i],i+1 | guess > a[i] -> i := i+1 fi eliwh
if guess < a[i] -> guess,i := a[i],i+1 | guess > a[i] -> i := i+1 fi
Suppose (Q => (for all i Bi)) and (for all i, Q and B => wp(Si, P)). Then Q => wp(if-statement, P).
Back to Reading Lines (2). On to Reading Gries.
Primary:
[Front Door]
[Current]
[Glance]
-
[Blurb]
[Disabilities]
[Honesty]
[Instructions]
[Links]
[Search]
[Syllabus]
Groupings:
[EBoards]
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Outlines]
[Readings]
[Reference]
ECA:
[About]
[Grades]
[Quizzes]
[Submit Work]
[Change Password]
[Reset Password]
Misc:
[Walker/Fall 2001]
[SamR]
Disclaimer:
I usually create these pages on the fly
, which means that I rarely
proofread them and they may contain bad grammar and incorrect details.
It also means that I tend to update them regularly (see the history for
more details). Feel free to contact me with any suggestions for changes.
This document was generated by
Siteweaver on Fri May 2 14:20:53 2003.
The source to the document was last modified on Mon Jan 20 12:41:05 2003.
This document may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CS195/2003S/Outlines/outline.35.html
.
You may wish to
validate this document's HTML
;
;
Check with Bobby