CS 341 - Survey of Programming Languages
Fourth Hour Homework: Language Design

Due: Various dates.  See below.

Note: This work is to be done in pairs.  Each pair will submit one assignment.  Although you may divide the work, both team members should be able to present/describe their partner's work upon request. 

Language Design Phase 1

 Due: Thursday 10/19 at the beginning of class #15

As our Fourth Hour project for the semester, you will be designing your own high level programming language and implementing an interpreter for it using JavaCC.  As a first step you need to work through your design thoughts concretely by writing example implementations using your proposed language.

Implement all 6 algorithms of Homework #1 using your proposed language.  You should at this point have working examples in a number of languages, so the challenge should not be algorithmic.  Rather, you will be focused on the design of your language.

To submit this homework, email or physically submit your code to me directly. 

Language Design Phase 2

 Due: 11/7 at the beginning of class #20

  1. Create source files in your language for the maximum and factorial problems of Homework #1.  Call these maximum.txt and factorial.txt.
  2. Implement an interpreter for your language that can, using the JavaCC command "javacc MyLang.jj" and the java compiler command "javac MyLang.java", create a Java executable that can interpret a source code file <src> and input file <in> as follows: "java MyLang <src>  <  <in>", where <src> is one of the source code files of step 1.
  3. Submit your interpreter and source code from the directory containing them using the command "submit341 ld1".

Language Design Phase 3

 Due: 11/16 at the beginning of class #23

  1. Create additional source files in your language for the unique and quicksort problems of Homework #1.  Call these unique.txt and quicksort.txt.
  2. Implement an interpreter for your language that can, using the JavaCC command "javacc MyLang.jj" and the java compiler command "javac MyLang.java", create a Java executable that can interpret a source code file <src> and input file <in> as follows: "java MyLang <src>  <  <in>", where <src> is one of the source code files of step 1.  All source code files of phase 2 and phase 3 should function correctly.
  3. Submit your interpreter and source code from the directory containing them using the command "submit341 ld2".

Language Design Phase 4

 Due: 11/30 at the beginning of class #26

  1. Create additional source files in your language for the binary search tree and breadth-first search problems of Homework #1.  Call these binary-search-tree.txt and breadth-first-search.txt.
  2. Implement an interpreter for your language that can, using the JavaCC command "javacc MyLang.jj" and the java compiler command "javac MyLang.java", create a Java executable that can interpret a source code file <src> and input file <in> as follows: "java MyLang <src>  <  <in>", where <src> is one of the source code files of step 1.  All source code files of phases 2, 3, and 4 should function correctly.
  3. Submit your interpreter and source code from the directory containing them using the command "submit341 ld3".

Note that, for phases 3 and 4, you'll include the source code for problems of previous phases.