0 CMPSCI 530/691F (630): Programming Languages
UMass logo
CMPSCI 530/691F (630)
Programming Languages
Spring 2005
Java logo SML/NJ

Programming Assignment 2


In a galaxy far, far away.... (at least far enough away from the last homework assignment) and a not so distant future,


inventor Joe is sipping a nice cup of coffee and enjoying his late night "meditate-for-a-cool-idea" session.


Suddenly, he has a miraculous revelation leading to an extremely COOL and AWESOME idea. However, to realize the idea, he needs to know the first 100 numbers in the Fibonacci sequence. Unfortunately, Joe is not a mathematician nor a programmer. So, he tells his computer he needs the first 100 numbers in the Fibonacci sequence.


Within 3 milliseconds, the computer figures out that there is no such code existing yet on Joe's planet. Basically, no one on Joe's planet is capable of wrapping their heads around implementing the algorithm.


In desperation, Joe's computer broadcasts a request message throughout the universe looking for such an alogrithm.

Luckily, a server on Earth picks up the message. The smart people of Earth have already implemented this algorithm and have been kind enough to share it with the rest of the universe.


Joe's computer downloads the program along with the universal language description of the interface, written in XML format (YES, by this time, XML has become the universal language).


Using the XML interface description, Joe's computer is able to automatically figure out how to use the program. Now, exactly 10 seconds after Joe's original request for the first 100 Fibonacci numbers, Joe's computer is able to compute the sequence and print it out. Seizing the printout, Joe runs into the invention room and completes his invention in 10 days, going down in history as the greatest inventor of his time.

Joe eventually would find the person who wrote the original code and reward him (or her) with a trillion dollars.


Now, back in the year 2005, having caught a glimpse of the future, it is your opportunity to make your mark on history and write that piece of code to put on the server. You need to:
1. Write the fibonacci code in ReduCDuce (as documented in the future HISTORY books)
2. Write the program that describes the interface to Fibonacci program in XML, also written in ReduCDuce.
3. Implement the dynamic semantics for the Fibonacci code (530 & 630)
4. Implement the dynamic semantics for the description program that outputs the XML interface description. (630)
For more details, see the questions and answers and various related documents listed here


E-mail the instructor
E-mail the TA
Last modified: Tues May 3 17:00 EST 2005