DOC PREVIEW
UD CISC 672 - Programming Assignment I

This preview shows page 1 out of 2 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CISC 471 / 672 Advanced Compiler Construction Fall 2011Programming Assignment IDue: September 12The purpose of this assignment is ensure that you have a solid knowledge and understanding of thesyntax and semantics of the Cool language. In addition, you will learn how to read and understand alanguage specification in order to be able to implement the language as specified. Lastly, you should gainsome appreciation for the task of test case generation, in order to adequately test a software application,in our case, to test a compiler.This assignment will not be done with a partner; you should turn in your own individual work. Thisis a fairly straightforward assignment and most students shouldn’t find it too time-consuming; however,we are giving you about a week to work on it. Don’t wait until the day before to start!This assignment basically asks you to write some Cool programs. Cool is the language you will beimplementing this semester. Cool shares many similarities with C/C++/Java but keep in mind that notall features exactly match. Our hope is that using familiar syntax will make things easier for you, butyou’ll need to keep on your toes where it is different as well.NOTE: CISC471 students only need to write programs 1 and 2. CISC672 studentsneed to write all three programs.Tasks1. Read the Cool language manual, Sections 1 – 10, which explains the programming language “COOL”.The Cool manual is on the course web page. Reading these sections is necessary for the followingtasks, as well as for future assignments.2. Program Number 1: Write a 100-200 line Cool program that is object-oriented, and tests a largenumber of the features (syntactic as well as semantic) of the Cool language. Your first program shouldnot be a trivial program, but one that does something useful. You could write a program that playssome game, works as a calculator, or implements a data structure or common algorithm, or performssome other useful task. You could look though a C++ or Java book, choose an exercise, and implementit in Cool.Program Number 2: Write a 50-100 line program that is Cool-like, but contains several lexical orsyntax errors. The program should look at first glance like a legal Cool program, but in fact, containserrors that the first two phases of a compiler should catch. This program does not need to do anythinguseful, but serve as a test program for a Cool compiler.Program Number 3 (CIS672 Only): Write a 100-200 line Cool program that is object-oriented, andfocuses on testing a specific significant feature of Cool as thoroughly as possible. An example mightbe to test combinations of control flow, or different kinds of parameter passing. The test programshould include simple, basic test segments as well as push the limit of what is allowed by Cool for thatfeature(s). This program does not need to do anything useful, but serve as a test program for a Coolcompiler.3. Compile your programs using the complete Cool compiler provided to you, and described in the CoolManual. You should execute your translated Cool programs using the spim interpreter provided topage 1 of 2CISC 471 / 672 Advanced Compiler Construction Fall 2011you and also explained in the Cool manual. Be sure that your Cool programs are thoroughly testedand run to your specifications.4. Write documentation that describes how to compile and run your Cool programs easily, lists thefeatures of Cool that are “covered” or included in each Cool program, and explains what each Coolprogram is supposed to be performing. Be sure to include internal documentation in each programas you would any program that you are writing for someone else to follow the logic. Describe theintended input/ouput of each program. Be sure to describe any limitations of your Cool programs, interms of kinds of inputs they can take, so the TA does not try those inputs.5. Write 2 test cases (preferably file input) for each Cool program. Each test case should be a legal inputand the expected output from running your program with that input.Project Submission:Send all your files to the via email to the TA.Evaluation Criteria:Your grade on this assignment will be based on:Program 1: 30 points (CISC471) or 15 points (CISC672)___Performs a useful task___Well-written in terms of structure___Creativity of design___Good program structure___Passes various input tests___Uses a lot of the features of Cool, especially OOP.Program 2: 30 points___Looks Cool-like overall___Contains a few lexical/syntax errors - some not so obviousProgram 3: 15 points (CISC672 only)___Thoroughly tests the specified feature___Fairly significant feature to test___Passes various input tests20 pts Documentation___Internal___External10 pts Test cases___Effective at exercising much of the Cool program___Provided input with expected output10 pts Ease of compile/run/test for the TA___Easy for the TA to compile and test with given inputspage 2 of


View Full Document

UD CISC 672 - Programming Assignment I

Documents in this Course
Syllabus

Syllabus

18 pages

Load more
Download Programming Assignment I
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Programming Assignment I and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Programming Assignment I 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?