You can use one handwritten 8.5x11 notes sheet. Please put your name on your sheet, and we will be collecting them at the end of the exam. Good Luck!
Let x = Ref 3 In Let cx = @x In !cxevals to 3, while
Let x = Ref 3 In Let cx = @x In cx := 3does not compute to any value (it gets stuck). Note that
Let x = Ref 3 In Let cx = @x In x:= 4; !cxwill not get stuck, creating a const reference only makes that reference immutable, but the underlying cell is still mutable; this expression returns 4. Note that dereference ! in these examples is overloaded to work on either normal references or const references. The type for a const reference to a value with type tau is tau ConstRef.
Let techie = ... In Let disarmer = ... In Let techie1 = Create(techie, 2) In Let techie2 = Create(techie, 2) In Let a_disarmer = Create(disarmer, (techie1, techie2)) In a_disarmer <- 'ready 0;;