CS 5510 Homework 1

Due: Monday, August 31st, 2009 9:40am

Important: Your code may be shown to the entire class (along with programs from several others) during Monday's lecture.

Part 1 – Create Handin Account

After installing cs5510-handin.plt as described in the course web page, select the Manage CS 5510 Handin... menu item from DrScheme's File menu. Change to the New User panel, and pick a username and password. (Use your real name and real Utah student ID, so that we can connect your homework submissions with you.)

You will have to install cs5510-handin.plt for DrScheme on each different filesystem that you use to get a Handin button. However, after creating a handin account once from any machine, you can use DrScheme's Handin button on any other machine.

Part 2 – String-Processing Language

Using a programming language of your choice, implement an interepreter for a little language of string operations. Your interpreted language must include

Also, it must allow arbitrary expressions for the arguments of operations, so that multiple operations can be applied in an expression.

Pick your own syntax and input method; document them in comments and with test cases. Chose a syntax that minimizes parsing effort for your interpreter.

For example, using a fully-parenthesized infix notation where & is the concatenation operator and @ is the rest-after operator, for the program

  (("hello" & " ") & "world")

the interpreter should produce

  "hello world"

and for the program

  (("hello" @ "l") & ("a world" @ "a"))

the interpreter should produce

  "lo world"

and for the program

  (("a lot" @ ("hello" @ "l")) & "!")

the interpreter should produce

  "t!"

Submit your interpreter as a single file using the Handin button in DrScheme (even if you use a programming language other than Scheme). The Handin button submits whatever file you have opened in DrScheme. Of course, when you click Handin, provide the username and password that you chose for part 1.

After submitting, you can confirm your submission through the web-based status server:

https://rains.cs.utah.edu:7980/servlets/status.ss

Submitting a plain-text file turns it into a DrScheme-format file, so use DrScheme to read a file that you download from the status server.


Last update: Thursday, December 3rd, 2009
mflatt@cs.utah.edu