Docsity

COSC 4780 Homework 10: Understanding Commands and Boolexp - Prof. James L. Caldwell, Assignments of Computer Science

Toggle sidebar
bg1
HW 10 Prof. Caldwell
Due: 17 February 2009 COSC 4780
Write meaning of command and meaning of boolexp based on the definitions given in figure 1.7
(pg. 14 of Schmidt).
Recall, I said in class that an alternative meaning for while commands to the one given in the
book is as follows:
[[while Edo Cod :comm]](s) = if([[E:boolexp]](s),[[C;while Edo Cod:comm]](s), s)
Use the code given on the course web-page to implement your function. Examine that code,
especially meaning of intexp to see how the types and operations of the semantic domains given
in Fig 1.6 (pg 13 Schmidt) have been translated into ML. In particular, use the ML if ... then
.. else ... construct and do not write your own. Why?
1

Partial preview of the text

Download COSC 4780 Homework 10: Understanding Commands and Boolexp - Prof. James L. Caldwell and more Assignments Computer Science in PDF only on Docsity!

HW 10 Prof. Caldwell Due: 17 February 2009 COSC 4780

Write meaning of command and meaning of boolexp based on the definitions given in figure 1. (pg. 14 of Schmidt). Recall, I said in class that an alternative meaning for while commands to the one given in the book is as follows:

[while E do C od : comm] = if([E: boolexp], [C ; while E do C od: comm], s)

Use the code given on the course web-page to implement your function. Examine that code, especially meaning of intexp to see how the types and operations of the semantic domains given in Fig 1.6 (pg 13 Schmidt) have been translated into ML. In particular, use the ML if ... then .. else ... construct and do not write your own. Why?