CS 3520 Assignment 5: Concurrency and laziness
due Wednesday, October 28 at 11:55 pm
Digital logic simulation
Complete Exercise 9 in §4.11 of CTM (page 341). Create an 8-bit adder and test it with a series of 8-bit additions.
Hamming problem
Complete Exercise 17 in §4.11 of CTM (pages 342–343).
Sieve of Eratosthenes
In §4.3.2 of CTM (page 260), the Sieve of Eratosthenes is presented. However, this is not a faithful implementation of the sieve, as described in the following paper:
Section 3 of the paper gives an implementation of the sieve in Haskell, with improvements given in later sections of the paper. Rewrite this solution in Oz. You should implement the version given in §3. You can skip the extension described in §3.1 (using
a priority queue), but you should extend it to use the 2357
wheel described in §3.2.
Note that §3.4.6 of CTM describes the implementation of a tree
data structure, which §3.7.2 extends into a dictionary data
structure (similar to the Map of the Haskell implementation).
What to turn in
Write all of your functions in a single file and submit it via
Moodle. Include {Browse} calls to test each function and
demonstrate that it works. Also include comments telling what works
and what doesn’t, and explaining anything complicated or obscure.



