with constraints

1 view
Skip to first unread message

Anonymer

unread,
Dec 13, 2010, 12:16:37 PM12/13/10
to byu-cs-330-Fall-2010
I'm not sure the way I think constraint generation goes for with is
correct. Here's an example with its constraints:

[1](with ([3]x [2]5) [4] [6](+ [7]1 [5]x) )

[1] = [4]
[2] = num
[3] = [2]
[4] = [6]
[6] = num
[7] = num
[5] = num
[5] = [3]

I seem to remember something about with being done "inside out." If
the above is incorrect, please show me how it should be done.

Jay McCarthy

unread,
Dec 13, 2010, 12:20:32 PM12/13/10
to byu-cs-330...@googlegroups.com
[3] is not an expression, so it should not be labeled.

[3] = [2] would just be [x] = [2]

Also, [5] = [3] is obviously wrong because expression 5 has no information about other parts of the program. Instead it would be [5] = [x].

Other than that, looks good.

Jay
--
Jay McCarthy <j...@cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93
Reply all
Reply to author
Forward
0 new messages