Confused about E-id

2 views
Skip to first unread message

Nate Cerny

unread,
Apr 10, 2011, 12:01:27 AM4/10/11
to byu-cs-330-Winter-2011
I cannot figure out what e-id in the function (generate-constraints e-
id e). What does it represent?

Nate Cerny

unread,
Apr 10, 2011, 12:08:22 AM4/10/11
to byu-cs-330-Winter-2011
One more thing:
The line below the function definition says:

Returns the constraints generated by e. e-id serves as e’s label in
this list.

Does this mean that at the time the function is called that e is
associated with e-id or is this done once the function is finished to
identify it in the list of constraints?

Bryan Morse

unread,
Apr 10, 2011, 12:15:53 AM4/10/11
to byu-cs-330-...@googlegroups.com
The caller passes into generate-constraints the label (type variable) for e. generate-constraints should then use that label in generating constraints relative to that expression. If it has subexpressions, it should generate labels (and constraints) for these and call recursively call generate-constraints on them with their respective labels.
Reply all
Reply to author
Forward
0 new messages