You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to byu-cs-330-Winter-2011
My partner and I are having a really tough time figuring out how to
even start writing the alpha-vary function. We thought through a few
ways to do it, but we realized they would not work with nested
expressions and what not. Does anyone have any pointers on how to
write that function?
Any help would be great!
Thanks
Bryan Morse
unread,
Apr 8, 2011, 4:57:32 PM4/8/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to byu-cs-330-...@googlegroups.com
Write function to recursively traverse the AST (like interp or type-check). Have it take an additional parameter that acts like an environment (again, like interp or type-check), only this time rather than binding identifiers to values (like interp) or identifiers to types (like type-check), it should bind variables to the unique variable names you're binding things to. Have it traverse from the root and on the way back out of the recursion rebuild the new tree (like parse).