COMP 412, Fall 2018 Lab 1: A Front End for ILOC
|
|
- Andrew Martin
- 5 years ago
- Views:
Transcription
1 COMP 412, Lab 1: A Front End for ILOC Due date: Submit to: Friday, September 7, 2018 at 11:59 PM comp412code@rice.edu Please report suspected typographical errors to the class Piazza site. We will issue corrections as needed. This document is version 2. See the change log on the last page for details. Table of Contents 1. Introduction 1 2. Overview of the Problem 2 3. Code Specifications 3 4. Code Submission Requirements 6 5. Code Grading Rubric 7 6. Honor Code Policy 7 7. The ILOC Subset 8 8. Intermediate Representations 9 1. Introduction In this programming assignment, you will create a front end that is, a scanner and a parser for the intermediate representation, ILOC, that will be used as input in the next two assignments in COMP 412: a local register allocator and an instruction scheduler. Your program will take, as input, a program written in ILOC. It will determine whether or not the input is a syntactically correct ILOC program. The output that your front end produces will depend on the specific options specified on the command line that invoked it. In a general sense, the front end should check the input code for validity. If the input program contains errors, your front end should find as many errors as possible and report each of them to the user. If the input program does not contain errors, your front end should report that the input file was a valid ILOC program and it should build an internal representation for the input program that is suitable for use in the subsequent assignments. You will reuse the code that you write for this assignment in both the local register allocator and the instruction scheduler. Therefore, you should take care to make it correct, robust, and efficient. You do not want to spend time in the later assignments fixing work that you should have done in the first assignment. The work product of this assignment will be an archive, in the form of Unix tar file. The tar file will contain (1) the source code for your front end, (2) a makefile that performs any necessary compilation and linking, and (3) a README file that describes the contents of the tar file and how to use them. Grading is largely automated; thus, if these files do not conform to the specifications, the grading tools may not properly evaluate your submission.
2 Your front end will be tested and evaluated on Rice s CLEAR systems. Anything that you develop for this assignment or submit for this assignment should work on CLEAR. You are responsible for testing your code, makefile, and directions on CLEAR. The teaching assistants are not expected to fix incompatibilities in your submission. 2. Overview of the Problem You will build a front end that is, a scanner and a parser that will take, as input, a single basic-block 1 written in the ILOC subset described in 7. The scanner will break the input stream into a series of individual words. ILOC has a particularly simple syntax, and a small set of word types. Lecture 2 in the course discusses, specifically, how to scan ILOC. The scanner produced, as output, a stream of classified words represented as tokens: a pair <category,lexeme> where category is the kind of word and lexeme is the specific word. The scanner should be incremental; that is, the parser will call it on demand and it will produce the next word in the input stream. In the next two labs, you will test your code s performance (that is, the running time of your code) at scale. It is critical that your scanner and parser efficiently handle input programs with at least more than 100,000 lines of input. A batch scanner that is, one that scans the entire program before returning its first token is likely to break or run slowly on reasonably large files. The parser will examine the stream of tokens produced by the scanner, break them into operations, and check the syntax of each operation. Lecture 3 in the course discusses how to parse ILOC. The simple structure of ILOC allows the parser to perform detailed syntax checking based largely on the opcode for the operation. As the parser checks each operation, it will build a representation for that operation, for later use in subsequent compiler passes specifically, in your local register allocator and your instruction scheduler. Section 8 describes the representation that we recommend, based on our experience. You must decide the details of the representation used in your front end. Remember that your register allocator and instruction scheduler will re-use the code and data structures from this assignment, unless you choose to re-implement them. 3. Code Specifications The COMP 412 teaching assistants will use a script to grade Lab 1 code submissions. You must adhere to the following interface specifications to ensure that your front end works correctly with the script that the teaching assistants will use to grade it. Name: The executable version of your front end must be named 412fe. Behavior: Your front end must work in four distinct modes, as controlled by flags and parameters on the command line. Your front-end must check the correctness of the command-line arguments. It should respond to an incorrect command-line option by 1 A basic block is a maximal-length sequence of straight-line (i.e., branch-free) code. An ILOC basic block consists of a sequence of operations drawn from the set of operations shown in the table on page 8. COMP 412 2
3 printing a reasonable error message and then printing the list of valid options specified for the -h command-line flag. Output from 412fe must be printed to the standard output stream (stdout). All error messages must be printed to the standard error stream (stderr) Command-Line Syntax: Your implementation of 412fe must support the following command-line options: 412fe -h 412fe -s <file name> 412fe -p <file name> 412fe -r <file name> When a h flag is detected, 412fe must produce a list of valid command-line arguments that includes a description of all command-line arguments required for Lab 1 as well as any additional command-line arguments supported by your 412fe implementation. 412fe is not required to process command-line arguments that appear after the h flag. When a -s flag is detected, 412fe should read the file specified by <file name> and print, to the standard output stream, a list of the tokens that the scanner found. For each token, it should print the line number, the token s type (or syntactic category), and its spelling (or lexeme). When a -p flag is detected, 412fe should read the file specified by <file name>, scan it and parse it, build the intermediate representation, and report either success or report all of the errors that it finds in the input file. When a -r flag is detected, 412fe should read the file specified by <file name>, scan it, parse it, build the intermediate representation, and print out the information in the intermediate representation (in an appropriately human readable format). These four command-line flags are intended to be exclusive; that is, your front end only needs to handle one of these flags in any given invocation. It the user invokes your front end with multiple command-line flags, it should politely report the error and implement the highest priority flag. Priority is, from highest to lowest, -h, -r, -p, and -s. If no command-line flag is specified, the front end will behave as if it had received the flag -p. (That is, -p is the default behavior.) The reference implementation supports these same four flags. Input file: The input file specified in the command line will contain a single basic block of ILOC code, written in the subset described in 7 of this document. Your front end should scan and parse each line, checking them against the ILOC syntax specification. If your program cannot read the input file, or if it discovers that the code in the file is not valid ILOC, it should produce an informative error message that includes the line number in the input file where the error occurs and a brief description of the problem. COMP 412 3
4 The message should be sufficiently descriptive to allow a reasonable programmer to identify and fix the error. Your front end should find as many errors as possible in the input file; that is, it should continue scanning and parsing after it finds an error. Once it finds an error in a given line, it may skip to the end of that line to avoid multiple error messages for a single line. Scanning the input: COMP 412 is a course about the implementation of programming languages. Thus, you must write your own code to scan the input. You may not use formatted I/O, regular expression libraries, or other pattern-matching software, unless you write them yourself. Your scanner should process the input one character at a time. It may read one or more lines into a buffer and then process the buffer one character at a time. (See the discussion of double buffering in of the textbook.) Character-by-character algorithms lend some clarity to the scanner. They can be significantly more efficient 2 than calls to generalized pattern-matching libraries or formatted I/O routines. Makefile & Shell Script: Lab 1 submissions written in languages that require a compilation step, such as C, C++, or Java, must include a makefile. 3 If your submission is written in a language that does not require compilation, such as Python, your submission does not need to include a makefile. The makefile must produce an executable named 412fe. If your submission is written in a language in which it is not possible to create a standalone executable and rename it to 412fe, such as Python or Java, then you must submit an executable shell script named 412fe that correctly accepts the required command-line arguments and invokes the program. For example, a front end written in Python and named lab1.py could include an executable shell script named 412fe that contained the following instructions: #!/bin/bash python lab1.py $@ Similarly, a project written Java with a jar file named lab1.jar or a class named lab1.class that contains the main function could provide, respectively, one of the following two executable shell scripts named 412alloc: #!/bin/bash java -jar lab1.jar $@ #!/bin/bash java lab1 $@ 2 Again, remember that your scanner and parser will be used in the next two assignments, where your code will be evaluated, in part, on the speed with which it processes successively larger files. Those programs are expected to handle large files correctly, gracefully, and efficiently. The timing tests for those labs include a file with 128,000 lines of ILOC. 3 If you prefer to use another build manager that is available on CLEAR to create your executable, you may invoke that build manager from your makefile. The makefile, however, is the interface that the grading scripts will expect and will test. COMP 412 4
5 Warning: There are significant differences between language implementations and tool implementations across different platforms, including Linux, Windows, and Mac OS X. Your code will be tested and graded on the CLEAR systems (log in to ssh.clear.rice.edu). In recent years, students have encountered a number of bugs that they found baffling when they ported code from their laptops to CLEAR. Examples include differences between language implementations, differences in handling end-of-line characters, and incompatibility in archive files and shell scripts. It is essential that you test your code on CLEAR early in the process, so that you can avoid the last-minute panic of discovering that your code does not work. Equally important, you should write a makefile early in the process and discover how to create and learn how to use tar files. Several students in prior years have missed the submission deadline because they could not construct a working makefile or build a correct tar file. To ensure that such a script is executable on a Linux system such as CLEAR, for either Python or Java, you must set its file permissions appropriately. In the directory where your script resides, execute the command: chmod a+x 412fe To avoid problems related to the translation of carriage return and line feed between Windows systems and Linux, we recommend that you write your shell script and makefile on CLEAR rather than on a Windows system. CLEAR: Your code and makefile/shell script must compile, run, execute, and produce correct output on Rice s CLEAR systems. CLEAR (Curricular Linux Rice) provides a fairly standard Linux environment. Your netid should allow you to log into the CLEAR systems and use them. You can ssh to ssh.clear.rice.edu, which will connect you to one of the systems. This interface attempts to spread the load across the servers. The login notice will show the current load by server. (You can login to a specific server by specifying its name in your ssh command.) Programming Language: You may use any programming language available on CLEAR, except for Perl. Your goal should be to use a language that is available on CLEAR, in which you are comfortable programming, for which you have decent debugging tools, and with which you can reuse code in the second and third assignments. This freedom is not a call for language virtuosity; it is a bad idea to decide to learn a new language for your COMP 412 labs. If you do, and it does not work out well, you will be forced to reimplement your front end during the limited time allowed to build the local register allocator. If you decide to develop code on your laptop, as most students do, be sure to check that the version of the software on your laptop is the same as the version that is supported on CLEAR. Minor differences between implementations can cause last minute panics when a program that runs fine on your laptop produces incorrect results on CLEAR. The best practice is to regularly test your code in the environment where it will be graded, on CLEAR. README File: Your tar file must contain a README file that contains directions for building and invoking your program. (Note that Linux has a case-sensitive file system, COMP 412 5
6 so README must be in all capital letters.) Include a description of all command-line options that your code supports, including any that you added beyond the four required flags. To work with the grading scripts, the first two lines of your README file must be in the following format: //NAME: <your name> //NETID: <your NetID> Notice that that there are no spaces after the slashes, and that the keywords NAME and NETID are in all capital letters. Your name should be capitalized normally. Your netid should be all lowercase letters and numbers. 4. Code Submission Requirements Due Date: Your lab is due at 11:59 PM on Friday, September 7, Individual extensions to this deadline will not be granted. Early-Submission Bonus: Code received before the due date will be awarded a bonus of three points per day up to a maximum of six points. For example, to receive six points, you must submit your code by 11:59 PM on Wednesday, September 5, Late Penalty: Submissions received after the due date will lose three points per day. Late labs will be automatically accepted until 11:59 PM on Friday, September 14, Permission from the instructors is required to submit Lab 1 after this deadline. Contact both instructors by to request permission. Late Penalty Waivers: To cover potential illness, travel, and other conflicts, we will waive up to six days of late penalties per semester when computing your final COMP 412 grade. Submission Details: Create a tar file that contains your submission, including (1) the source code for your front end, (2) your makefile and/or shell script, (3) your README file, and (4) any other files that are needed for the TAs to build and test your code. If you not created a tar file previously, you should learn how to create one before the code submission deadline. You do not want to be reading the man page ten minutes before the due date. Note that a tar file is different than a zip archive. You must submit a tar file. If your front end does not work, include in your tar file a file named STATUS that contains a brief description of the current state of the passes in your front end (complete / incomplete / not implemented, working / broken, etc.). You may include ILOC files that your lab handles correctly and ILOC files that it handles incorrectly. If you include such files, describe them in both the README and the STATUS files. Name the tar file with your Rice NetID (e.g., jed12.tar for a student with the Rice NetID jed12). the tar file as an attachment to comp412code@rice.edu before 11:59 PM on the date. Use Lab 1 as the subject line of your submission. Note: comp412code@rice.edu should only be used for submitting code since it is only monitored during periods when code is due. Questions should be posted to the course discussion site on Piazza. COMP 412 6
7 5. Code Grading Rubric The grade for this assignment accounts for 14% of the points awarded in COMP 412. Grading will be based on a 100-point scale. Those points are allocated as follows. 20 points for adherence to the Lab 1 code specifications and the submission requirements. You will lose points if the grading script cannot unpack your tar file and run the front end without manual intervention by the graders. Possible problems include the README file, the tar file, the makefile and/or shell script, and problems in the actual code. (Again, test on CLEAR.) 80 points for correct handling of the input, including recognizing and reporting success, identifying errors and reporting them, and the quality of the error messages that your front end produces. 6. Honor Code Policy Your submitted source code for the front end and your README file must consist of code and/or text that you wrote, not edited or copied versions of code and/or text written by others or in collaboration with others. You may not look at COMP 412 labs written by other people in past semesters. You may not invoke the reference implementation, or any other front end that you did not write, from your submitted code. You are welcome to collaborate with current COMP 412 students when preparing your makefile and/or shell script. You can submit a makefile and /or shell script produced in such collaborations. However, as indicated in the previous paragraph, all other code and text that you submit must be your own work, not the result of a collaborative effort. You are welcome to discuss this assignment with the COMP 412 staff and with students currently taking COMP 412. You are encouraged to use the libraries of test blocks produced by students in previous semesters. However, you may not make your COMP 412 labs available to students (other than the COMP 412 teaching assistants) in any form during or after this semester. In particular, you may not place your code anywhere on the Internet where it would be viewable by others. Design and Implementation Timeline: To produce a reasonably good front end, you need to start the implementation during the first week. By August 29, your scanner should be reading and tokenizing the input stream. At this point, you should have a driver that call the scanner repeatedly, until input is exhausted, and prints out the token stream. See the -s command-line option. By September 5, your parser should be functional and producing correct results on the test programs supplied for lab 1. It should be building the internal representation correctly. It should implement both the -p and -r command-line options. Use your final two days to clean up the output from each of the command-line options, to fix any lastminute bugs revealed by your extensive testing, and to create the README and tar files. COMP 412 7
8 7. The ILOC Subset ILOC is the assembly language for a simple abstract machine. An ILOC program consists of an ordered sequence of operations, each drawn from the following set: Syntax Meaning Latency load r1 => r2 r2 ß MEM(r1) 3 loadi x => r2 r2 ß x 1 store r1 => r2 MEM(r2) ß r1 3 add r1, r2 => r3 r3 ß r1 + r2 1 sub r1, r2 => r3 r3 ß r1 - r2 1 mult r1, r2 => r3 r3 ß r1 * r2 1 lshift r1, r2 => r3 r3 ß r1 << r2 1 rshift r1, r2 => r3 r3 ß r1 >> r2 1 output x prints MEM(x) to stdout 1 nop idle for one cycle 1 Each operation consists of a mnemonic operation code, or opcode, a series of operands, and one or more separators. The opcodes are load, loadi, store, add, sub, mult, lshift, rshift, output, and nop. The operands are either register names or constants. Register names have an initial lowercase r followed immediately by a non-negative integer. Leading zeros in the register name are not significant; thus, r017 and r17 refer to the same register. Arguments that do not begin with r, which appear as x in the table above, are non-negative integer constants in the range 0 to ILOC assumes a register-toregister memory model (see page 250 in EaC2e) with one class of registers. ILOC operations also contain commas and assignment arrows, which are composed of an equal sign followed by a greater than symbol, as shown (=>). Each ILOC operation in an input block must begin on a new line. 4 Whitespace is defined to be any combination of blanks and tabs. ILOC opcodes must be followed by whitespace. Whitespace preceding and following all other symbols is optional. Whitespace is not allowed within operation names, register names, or the assignment arrow. A double slash (//) indicates that the rest of the line is a comment and can be discarded. Empty lines may also be discarded. The syntax of ILOC is described in further detail in Section 3 of the ILOC simulator document, and, at a higher level, in Appendix A of EaC2e. (See the grammar for Operation that starts on page 726.) Note that your front end is not required to support either labels on operations or the square bracket notation used to group multiple ILOC instructions. 4 Carriage returns (CR, \r, 0x0D) and line feeds (LF, \n, 0x0A) may appear as valid characters in end-of-line sequences. COMP 412 8
9 8. Intermediate Representations Your front end must create an intermediate representation for the ILOC code that it parses. The local register allocator and the instruction scheduler will manipulate the code in that form. The reference implementation for all three assignments use a simple data structure to represent ILOC code. It consists of a record for each operation. For example, the record for an operation mult r1, r2 => r3 contains the following information: Opcode Operand 1 Operand 2 Operand 3 SR VR PR NU SR VR PR NU SR VR PR NU mult r1 r2 r3 The fields filled with a dash ( ) have values that are not yet known. They will be filled in by the local register allocator or the instruction scheduler. You may also find it useful to store the source-code line number with each operation. The largest operations, such as add and mult, have an opcode and three operands. For each operand, you will need space to store a non-negative integer either a register number (the source register or SR) or a constant value. In subsequent labs. you will also need to store, for each reference, a virtual-register name (VR), a physical-register name (PR), and a next-use location (NU). Each of those fields should be represented as an integer. To represent an entire block, the reference implementations chain together a series of these records. For example, the ILOC sequence: loadi 12 => r3 load r3 => r4 mult r3, r4 => r4 your front end might build a data structure that looks like: The records might be individually allocated as structures. They might be block allocated in large bunches (100; 1,000; or 10,000 records per bunch). They might be stored as columns of an array with an additional field for the next record. COMP 412 9
10 Additions and Corrections: 1. Fixed footnote 1 to refer to the table on page 8. It was, originally, an incomplete sentence. 2. If you are unfamiliar with handling command-line arguments, an instructor post on Piazza gives the following suggested resources: In Python: In Java: In C++ or C: COMP
COMP 412, Fall 2018 Lab 3: Instruction Scheduling
COMP 412, Lab 3: Instruction Scheduling Please report suspected typographical errors to the class Piazza site. Code Due date: 11/20/2018 Tutorial #1 Date: tba Submit to: comp412code@rice.edu Time: tba
More informationProgramming Standards: You must conform to good programming/documentation standards. Some specifics:
CS3114 (Spring 2011) PROGRAMMING ASSIGNMENT #3 Due Thursday, April 7 @ 11:00 PM for 100 points Early bonus date: Wednesday, April 6 @ 11:00 PM for a 10 point bonus Initial Schedule due Thursday, March
More informationThe ILOC Simulator User Documentation
The ILOC Simulator User Documentation COMP 412, Fall 2015 Documentation for Lab 1 The ILOC instruction set is taken from the book, Engineering A Compiler, published by the Elsevier Morgan-Kaufmann [1].
More informationLocal Register Allocation (critical content for Lab 2) Comp 412
Updated After Tutorial COMP 412 FALL 2018 Local Register Allocation (critical content for Lab 2) Comp 412 source code IR Front End Optimizer Back End IR target code Copyright 2018, Keith D. Cooper & Linda
More informationCS /534 Compiler Construction University of Massachusetts Lowell
CS 91.406/534 Compiler Construction University of Massachusetts Lowell Professor Li Xu Fall 2004 Lab Project 2: Parser and Type Checker for NOTHING Due: Sunday, November 14, 2004, 11:59 PM 1 Introduction
More informationImportant Project Dates
Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Fall 2002 Handout 4 Project Overview Wednesday, September 4 This is an overview of the course project
More informationProgramming Assignment III
Programming Assignment III First Due Date: (Grammar) See online schedule (submission dated midnight). Second Due Date: (Complete) See online schedule (submission dated midnight). Purpose: This project
More informationCS143 Handout 05 Summer 2011 June 22, 2011 Programming Project 1: Lexical Analysis
CS143 Handout 05 Summer 2011 June 22, 2011 Programming Project 1: Lexical Analysis Handout written by Julie Zelenski with edits by Keith Schwarz. The Goal In the first programming project, you will get
More informationCS 314 Principles of Programming Languages Fall 2017 A Compiler and Optimizer for tinyl Due date: Monday, October 23, 11:59pm
CS 314 Principles of Programming Languages Fall 2017 A Compiler and Optimizer for tinyl Due date: Monday, October 23, 11:59pm THIS IS NOT A GROUP PROJECT! You may talk about the project and possible solutions
More informationImportant Project Dates
Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Spring 2010 Handout Project Overview Tuesday, Feb 2 This is an overview of the course project and
More informationLab 3, Tutorial 1 Comp 412
COMP 412 FALL 2018 Lab 3, Tutorial 1 Comp 412 source code IR IR Front End Optimizer Back End target code Copyright 2018, Keith D. Cooper, Linda Torczon & Zoran Budimlić, all rights reserved. Students enrolled
More informationCS164: Programming Assignment 2 Dlex Lexer Generator and Decaf Lexer
CS164: Programming Assignment 2 Dlex Lexer Generator and Decaf Lexer Assigned: Thursday, September 16, 2004 Due: Tuesday, September 28, 2004, at 11:59pm September 16, 2004 1 Introduction Overview In this
More informationThe ILOC Simulator User Documentation
The ILOC Simulator User Documentation Spring 2015 Semester The ILOC instruction set is taken from the book, Engineering A Compiler, published by the Morgan- Kaufmann imprint of Elsevier [1]. The simulator
More information3. When you process a largest recent earthquake query, you should print out:
CS3114 (Fall 2013) PROGRAMMING ASSIGNMENT #1 Due Wednesday, September 18 @ 11:00 PM for 100 points Due Tuesday, September 17 @ 11:00 PM for 10 point bonus Updated: 9/11/2013 Assignment: This is the first
More informationThe ILOC Simulator User Documentation
The ILOC Simulator User Documentation Comp 506, Spring 2017 The ILOC instruction set is taken from the book, Engineering A Compiler, published by the Morgan- Kaufmann imprint of Elsevier [1]. The simulator
More informationCOMP 3500 Introduction to Operating Systems Project 5 Virtual Memory Manager
COMP 3500 Introduction to Operating Systems Project 5 Virtual Memory Manager Points Possible: 100 Submission via Canvas No collaboration among groups. Students in one group should NOT share any project
More informationProject 2: CPU Scheduling Simulator
Project 2: CPU Scheduling Simulator CSCI 442, Spring 2017 Assigned Date: March 2, 2017 Intermediate Deliverable 1 Due: March 10, 2017 @ 11:59pm Intermediate Deliverable 2 Due: March 24, 2017 @ 11:59pm
More informationCSE4305: Compilers for Algorithmic Languages CSE5317: Design and Construction of Compilers
CSE4305: Compilers for Algorithmic Languages CSE5317: Design and Construction of Compilers Leonidas Fegaras CSE 5317/4305 L1: Course Organization and Introduction 1 General Course Information Instructor:
More informationGeneral Course Information. Catalogue Description. Objectives
General Course Information CSE4305: Compilers for Algorithmic Languages CSE5317: Design and Construction of Compilers Instructor: Leonidas Fegaras Office: ERB 653 (Engineering Research Bldg) Phone: (817)
More informationCSE Theory of Computing Spring 2018 Project 2-Finite Automata
CSE 30151 Theory of Computing Spring 2018 Project 2-Finite Automata Version 2 Contents 1 Overview 2 1.1 Updates................................................ 2 2 Valid Options 2 2.1 Project Options............................................
More information15-411/ Compiler Design
15-411/15-611 Compiler Design Jan Hoffmann Fall 2016 http://www.cs.cmu.edu/~janh/courses/411/16 Teaching Staff Instructor: Jan Hoffmann Office hours: Tue 10:30am-noon Thu 1:00pm-2:30pm at GHC 9105 Teaching
More informationDecaf PP2: Syntax Analysis
Decaf PP2: Syntax Analysis Date Assigned: 10/10/2013 Date Due: 10/25/2013 11:59pm 1 Goal In this programming project, you will extend the Decaf compiler to handle the syntax analysis phase, the second
More informationAbout the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Compiler Design
i About the Tutorial A compiler translates the codes written in one language to some other language without changing the meaning of the program. It is also expected that a compiler should make the target
More informationCSE4305: Compilers for Algorithmic Languages CSE5317: Design and Construction of Compilers
CSE4305: Compilers for Algorithmic Languages CSE5317: Design and Construction of Compilers Leonidas Fegaras CSE 5317/4305 L1: Course Organization and Introduction 1 General Course Information Instructor:
More informationCSE Theory of Computing Spring 2018 Project 2-Finite Automata
CSE 30151 Theory of Computing Spring 2018 Project 2-Finite Automata Version 1 Contents 1 Overview 2 2 Valid Options 2 2.1 Project Options.................................. 2 2.2 Platform Options.................................
More informationCS 2704 Project 2: Elevator Simulation Fall 1999
Elevator Simulation Consider an elevator system, similar to the one on McBryde Hall. At any given time, there may be zero or more elevators in operation. Each operating elevator will be on a particular
More informationCOMP 321: Introduction to Computer Systems
Assigned: 1/18/18, Due: 2/1/18, 11:55 PM Important: This project must be done individually. Be sure to carefully read the course policies for assignments (including the honor code policy) on the assignments
More informationCS3114 (Fall 2013) PROGRAMMING ASSIGNMENT #2 Due Tuesday, October 11:00 PM for 100 points Due Monday, October 11:00 PM for 10 point bonus
CS3114 (Fall 2013) PROGRAMMING ASSIGNMENT #2 Due Tuesday, October 15 @ 11:00 PM for 100 points Due Monday, October 14 @ 11:00 PM for 10 point bonus Updated: 10/10/2013 Assignment: This project continues
More informationCS 553 Compiler Construction Fall 2009 Project #1 Adding doubles to MiniJava Due September 8, 2009
CS 553 Compiler Construction Fall 2009 Project #1 Adding doubles to MiniJava Due September 8, 2009 In this assignment you will extend the MiniJava language and compiler to enable the double data type.
More informationCS 4240: Compilers and Interpreters Project Phase 1: Scanner and Parser Due Date: October 4 th 2015 (11:59 pm) (via T-square)
CS 4240: Compilers and Interpreters Project Phase 1: Scanner and Parser Due Date: October 4 th 2015 (11:59 pm) (via T-square) Introduction This semester, through a project split into 3 phases, we are going
More informationCS 2704 Project 3 Spring 2000
Maze Crawler For this project, you will be designing and then implementing a prototype for a simple game. The moves in the game will be specified by a list of commands given in a text input file. There
More informationCS 426 Fall Machine Problem 1. Machine Problem 1. CS 426 Compiler Construction Fall Semester 2017
CS 426 Fall 2017 1 Machine Problem 1 Machine Problem 1 CS 426 Compiler Construction Fall Semester 2017 Handed Out: September 6, 2017. Due: September 21, 2017, 5:00 p.m. The machine problems for this semester
More informationCSSE2002/7023 The University of Queensland
CSSE2002 / CSSE7023 Semester 1, 2016 Assignment 1 Goal: The goal of this assignment is to gain practical experience with data abstraction, unit testing and using the Java class libraries (the Java 8 SE
More informationCS Programming Languages Fall Homework #2
CS 345 - Programming Languages Fall 2010 Homework #2 Due: 2pm CDT (in class), September 30, 2010 Collaboration policy This assignment can be done in teams at most two students. Any cheating (e.g., submitting
More informationJim Lambers ENERGY 211 / CME 211 Autumn Quarter Programming Project 4
Jim Lambers ENERGY 211 / CME 211 Autumn Quarter 2008-09 Programming Project 4 This project is due at 11:59pm on Friday, October 31. 1 Introduction In this project, you will do the following: 1. Implement
More informationCS 2604 Minor Project 1 DRAFT Fall 2000
RPN Calculator For this project, you will design and implement a simple integer calculator, which interprets reverse Polish notation (RPN) expressions. There is no graphical interface. Calculator input
More informationAssignment 4. Overview. Prof. Stewart Weiss. CSci 335 Software Design and Analysis III Assignment 4
Overview This assignment combines several dierent data abstractions and algorithms that we have covered in class, including priority queues, on-line disjoint set operations, hashing, and sorting. The project
More informationProgramming Assignment I Due Thursday, October 7, 2010 at 11:59pm
Programming Assignment I Due Thursday, October 7, 2010 at 11:59pm 1 Overview of the Programming Project Programming assignments I IV will direct you to design and build a compiler for Cool. Each assignment
More informationSoftware Tools for Lab 1
Software Tools for Lab 1 We have built a number of tools to help you build and debug Lab 1 An ILOC Simulator Essentially, an interpreter for Lab 1 ILOC Matches the Lab 1 specs Single functional unit, latencies
More informationHands on Assignment 1
Hands on Assignment 1 CSci 2021-10, Fall 2018. Released Sept 10, 2018. Due Sept 24, 2018 at 11:55 PM Introduction Your task for this assignment is to build a command-line spell-checking program. You may
More informationCS 1803 Pair Homework 4 Greedy Scheduler (Part I) Due: Wednesday, September 29th, before 6 PM Out of 100 points
CS 1803 Pair Homework 4 Greedy Scheduler (Part I) Due: Wednesday, September 29th, before 6 PM Out of 100 points Files to submit: 1. HW4.py This is a PAIR PROGRAMMING Assignment: Work with your partner!
More information1 The Var Shell (vsh)
CS 470G Project 1 The Var Shell Due Date: February 7, 2011 In this assignment, you will write a shell that allows the user to interactively execute Unix programs. Your shell, called the Var Shell (vsh),
More informationEECE.2160: ECE Application Programming Spring 2019
Course Meetings Section 201: MWF 8-8:50, Kitson 305 Section 202: MWF 12-12:50, Kitson 305 Course Website Main page: http://mjgeiger.github.io/eece2160/sp19/ Schedule: http://mjgeiger.github.io/eece2160/sp19/schedule.htm
More informationFull file at
Java Programming: From Problem Analysis to Program Design, 3 rd Edition 2-1 Chapter 2 Basic Elements of Java At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class
More informationThe Compiler s Front End (viewed from a lab 1 persepc2ve) Comp 412 COMP 412 FALL Chapter 1 & 2 in EaC2e. target code
COMP 412 FALL 2017 The Compiler s Front End (viewed from a lab 1 persepc2ve) Comp 412 source code IR Front End OpOmizer Back End IR target code Copyright 2017, Keith D. Cooper & Linda Torczon, all rights
More informationAssignment 1: Communicating with Programs
Assignment 1: Communicating with Programs EC602 Design by Software Fall 2018 Contents 1 Introduction 2 1.1 Assignment Goals........................... 2 1.2 Group Size.............................. 2 1.3
More informationCSE Theory of Computing Fall 2017 Project 1-SAT Solving
CSE 30151 Theory of Computing Fall 2017 Project 1-SAT Solving Version 3: Sept. 21, 2017 The purpose of this project is to gain an understanding of one of the most central problems of computing: Boolean
More informationBIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE, Pilani Pilani Campus Instruction Division
SECOND SEMESTER 2015-2016 Course Handout (Part II) Date:23-01-2017 In addition to part I (General Handout for all courses appended to the time table) this portion gives further specific details regarding
More informationCS 6353 Compiler Construction Project Assignments
CS 6353 Compiler Construction Project Assignments In this project, you need to implement a compiler for a language defined in this handout. The programming language you need to use is C or C++ (and the
More informationChapter 2 Basic Elements of C++
C++ Programming: From Problem Analysis to Program Design, Fifth Edition 2-1 Chapter 2 Basic Elements of C++ At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class Discussion
More informationECE573 Introduction to Compilers & Translators
ECE573 Introduction to Compilers & Translators Tentative Syllabus Fall 2005 Tu/Th 9:00-10:15 AM, EE 115 Instructor Prof. R. Eigenmann Tel 49-41741 Email eigenman@ecn Office EE334C Office Hours Tu 10:15-11:30
More informationCourse Syllabus. Course Information
Course Syllabus Course Information Course: MIS 6V99 Special Topics Programming for Data Science Section: 5U1 Term: Summer 2017 Meets: Friday, 6:00 pm to 10:00 pm, JSOM 2.106 Note: Beginning Fall 2017,
More informationCS 2316 Individual Homework 4 Greedy Scheduler (Part I) Due: Wednesday, September 18th, before 11:55 PM Out of 100 points
CS 2316 Individual Homework 4 Greedy Scheduler (Part I) Due: Wednesday, September 18th, before 11:55 PM Out of 100 points Files to submit: 1. HW4.py This is an INDIVIDUAL assignment! Collaboration at a
More informationLab #1 Installing a System Due Friday, September 6, 2002
Lab #1 Installing a System Due Friday, September 6, 2002 Name: Lab Time: Grade: /10 The Steps of Installing a System Today you will install a software package. Implementing a software system is only part
More informationCS 553 Compiler Construction Fall 2007 Project #1 Adding floats to MiniJava Due August 31, 2005
CS 553 Compiler Construction Fall 2007 Project #1 Adding floats to MiniJava Due August 31, 2005 In this assignment you will extend the MiniJava language and compiler to enable the float data type. The
More informationCompilers for Modern Architectures Course Syllabus, Spring 2015
Compilers for Modern Architectures Course Syllabus, Spring 2015 Instructor: Dr. Rafael Ubal Email: ubal@ece.neu.edu Office: 140 The Fenway, 3rd floor (see detailed directions below) Phone: 617-373-3895
More informationCS4120/4121/5120/5121 Spring /6 Programming Assignment 4
CS4120/4121/5120/5121 Spring 2016 Programming Assignment 4 Intermediate Code Generation Due: Friday March 18, 11:59pm This programming assignment requires you to implement an IR generator for the Xi programming
More informationCS 2704 Project 1 Spring 2001
Robot Tank Simulation We've all seen various remote-controlled toys, from miniature racecars to artificial pets. For this project you will implement a simulated robotic tank. The tank will respond to simple
More informationA Simple Syntax-Directed Translator
Chapter 2 A Simple Syntax-Directed Translator 1-1 Introduction The analysis phase of a compiler breaks up a source program into constituent pieces and produces an internal representation for it, called
More informationA simple syntax-directed
Syntax-directed is a grammaroriented compiling technique Programming languages: Syntax: what its programs look like? Semantic: what its programs mean? 1 A simple syntax-directed Lexical Syntax Character
More informationCosc 242 Assignment. Due: 4pm Friday September 15 th 2017
Cosc 242 Assignment Due: 4pm Friday September 15 th 2017 Group work For this assignment we require you to work in groups of three people. You may select your own group and inform us of your choice via
More informationProgramming Assignment HW4: CPU Scheduling v03/17/19 6 PM Deadline March 28th, 2019, 8 PM. Late deadline with penalty March 29th, 2019, 8 PM
CS 370: OPERATING SYSTEMS SPRING 2019 Department of Computer Science URL: http://www.cs.colostate.edu/~cs370 Colorado State University INSTRUCTOR: Yashwant Malaiya Programming Assignment HW4: CPU Scheduling
More informationCS 6353 Compiler Construction Project Assignments
CS 6353 Compiler Construction Project Assignments In this project, you need to implement a compiler for a language defined in this handout. The programming language you need to use is C or C++ (and the
More informationIntermediate Representations
COMP 506 Rice University Spring 2018 Intermediate Representations source code IR Front End Optimizer Back End IR target code Copyright 2018, Keith D. Cooper & Linda Torczon, all rights reserved. Students
More informationCMPSCI 187 / Spring 2015 Sorting Kata
Due on Thursday, April 30, 8:30 a.m Marc Liberatore and John Ridgway Morrill I N375 Section 01 @ 10:00 Section 02 @ 08:30 1 Contents Overview 3 Learning Goals.................................................
More informationCSE4305: Compilers for Algorithmic Languages CSE5317: Design and Construction of Compilers
CSE4305: Compilers for Algorithmic Languages CSE5317: Design and Construction of Compilers Leonidas Fegaras CSE 5317/4305 L1: Course Organization and Introduction 1 General Course Information Instructor:
More informationCS131 Compilers: Programming Assignment 2 Due Tuesday, April 4, 2017 at 11:59pm
CS131 Compilers: Programming Assignment 2 Due Tuesday, April 4, 2017 at 11:59pm Fu Song 1 Policy on plagiarism These are individual homework. While you may discuss the ideas and algorithms or share the
More informationCS1110 Lab 1 (Jan 27-28, 2015)
CS1110 Lab 1 (Jan 27-28, 2015) First Name: Last Name: NetID: Completing this lab assignment is very important and you must have a CS 1110 course consultant tell CMS that you did the work. (Correctness
More informationCS415 Compilers. Lexical Analysis
CS415 Compilers Lexical Analysis These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University Lecture 7 1 Announcements First project and second homework
More informationCpSc 1111 Lab 9 2-D Arrays
CpSc 1111 Lab 9 2-D Arrays Overview This week, you will gain some experience with 2-dimensional arrays, using loops to do the following: initialize a 2-D array with data from an input file print out the
More informationCompiler Design: Lab 3 Fall 2009
15-411 Compiler Design: Lab 3 Fall 2009 Instructor: Frank Pfenning TAs: Ruy Ley-Wild and Miguel Silva Test Programs Due: 11:59pm, Thursday, October 8, 2009 Compilers Due: 11:59pm, Thursday, October 15,
More informationCOMP 401 COURSE OVERVIEW
COMP 401 COURSE OVERVIEW Instructor: Prasun Dewan (FB 150, help401@cs.unc.edu) Course page: http://www.cs.unc.edu/~dewan/comp401/current/ COURSE PAGE Linked from my home page (google my name to find it)
More informationCS 361S - Network Security and Privacy Spring Project #2
CS 361S - Network Security and Privacy Spring 2014 Project #2 Part 1 due: 11am CDT, March 25, 2014 Part 2 due: 11am CDT, April 3, 2014 Submission instructions Follow the submission instructions in the
More informationFinal Programming Project
Due Thursday, Dec. 7, at 5:00 pm Logistics This assignment should be completed in groups of 3. This is not optional -- you are not allowed to complete it on your own, or in groups of any other size. I
More informationCS 241 Data Organization using C
CS 241 Data Organization using C Fall 2018 Instructor Name: Dr. Marie Vasek Contact: Private message me on the course Piazza page. Office: Farris 2120 Office Hours: Tuesday 2-4pm and Thursday 9:30-11am
More informationCSE 401/M501 18au Midterm Exam 11/2/18. Name ID #
Name ID # There are 7 questions worth a total of 100 points. Please budget your time so you get to all of the questions. Keep your answers brief and to the point. The exam is closed books, closed notes,
More informationASSIGNMENT TWO: PHONE BOOK
ASSIGNMENT TWO: PHONE BOOK ADVANCED PROGRAMMING TECHNIQUES SEMESTER 1, 2017 SUMMARY In this assignment, you will use your C programming skills to create a phone book. The phone book loads its entries from
More informationa f b e c d Figure 1 Figure 2 Figure 3
CS2604 Fall 2001 PROGRAMMING ASSIGNMENT #4: Maze Generator Due Wednesday, December 5 @ 11:00 PM for 125 points Early bonus date: Tuesday, December 4 @ 11:00 PM for 13 point bonus Late date: Thursday, December
More informationECE Introduction to Compilers and Translation Engineering
ECE 46800 Introduction to Compilers and Translation Engineering Instructor: Xiaokang Qiu Teaching Assistants: Chris Wright Office: EE 334C Office: EE 207 Fall 2018 Course Information Phone: 765-494-9987
More informationProgramming Project 1: Lexical Analyzer (Scanner)
CS 331 Compilers Fall 2017 Programming Project 1: Lexical Analyzer (Scanner) Prof. Szajda Due Thursday, September 21, 11:59:59 pm 1 Overview of the Programming Project Programming projects I IV will direct
More informationProject #1: Tracing, System Calls, and Processes
Project #1: Tracing, System Calls, and Processes Objectives In this project, you will learn about system calls, process control and several different techniques for tracing and instrumenting process behaviors.
More informationCS 3030 Scripting Languages Syllabus
General Information CS 3030 Scripting Languages Semester: Summer 2013 Textbook: Location: Instructor Info: Website: None. We will use freely available resources from the Internet. Online Ted Cowan tedcowan@weber.edu
More informationCS : Programming for Non-majors, Fall 2018 Programming Project #2: Census Due by 10:20am Wednesday September
CS 1313 010: Programming for Non-majors, Fall 2018 Programming Project #2: Census Due by 10:20am Wednesday September 19 2018 This second assignment will introduce you to designing, developing, testing
More informationCS 2604 Minor Project 1 Summer 2000
RPN Calculator For this project, you will design and implement a simple integer calculator, which interprets reverse Polish notation (RPN) expressions. There is no graphical interface. Calculator input
More informationCreating a Shell or Command Interperter Program CSCI411 Lab
Creating a Shell or Command Interperter Program CSCI411 Lab Adapted from Linux Kernel Projects by Gary Nutt and Operating Systems by Tannenbaum Exercise Goal: You will learn how to write a LINUX shell
More informationCMPSCI 187 / Spring 2015 Hangman
CMPSCI 187 / Spring 2015 Hangman Due on February 12, 2015, 8:30 a.m. Marc Liberatore and John Ridgway Morrill I N375 Section 01 @ 10:00 Section 02 @ 08:30 1 CMPSCI 187 / Spring 2015 Hangman Contents Overview
More informationProgramming Assignment IV Due Thursday, November 18th, 2010 at 11:59 PM
Programming Assignment IV Due Thursday, November 18th, 2010 at 11:59 PM 1 Introduction In this assignment, you will implement a code generator for Cool. When successfully completed, you will have a fully
More informationCMPSCI 187 / Spring 2015 Postfix Expression Evaluator
CMPSCI 187 / Spring 2015 Postfix Expression Evaluator Due on Thursday, 05 March, 8:30 a.m. Marc Liberatore and John Ridgway Morrill I N375 Section 01 @ 10:00 Section 02 @ 08:30 1 CMPSCI 187 / Spring 2015
More informationProgramming Assignment I Due Thursday, October 9, 2008 at 11:59pm
Programming Assignment I Due Thursday, October 9, 2008 at 11:59pm 1 Overview Programming assignments I IV will direct you to design and build a compiler for Cool. Each assignment will cover one component
More informationIntroduction. Overview and Getting Started. CS 161 Computer Security Lab 1 Buffer Overflows v.01 Due Date: September 17, 2012 by 11:59pm
Dawn Song Fall 2012 CS 161 Computer Security Lab 1 Buffer Overflows v.01 Due Date: September 17, 2012 by 11:59pm Introduction In this lab, you will get a hands-on approach to circumventing user permissions
More informationThe ILOC Virtual Machine (Lab 1 Background Material) Comp 412
COMP 12 FALL 20 The ILOC Virtual Machine (Lab 1 Background Material) Comp 12 source code IR Front End OpMmizer Back End IR target code Copyright 20, Keith D. Cooper & Linda Torczon, all rights reserved.
More informationAssignment Tutorial.
Assignment Tutorial rudolf.lam@mail.mcgill.ca What we are looking at today Overview Demo Why Motivation for this lecture on assignment How The way the assignment is run What The components of the assignment
More informationCOP4530 Data Structures, Algorithms and Generic Programming Recitation 3 Date: January 20 & 22, 2009
COP4530 Data Structures, Algorithms and Generic Programming Recitation 3 Date: January 20 & 22, 2009 Lab objectives: 1) Quiz 2) Set up SSH to run external programs. 3) Learn how to use the DDD debuger.
More informationTips from the experts: How to waste a lot of time on this assignment
Com S 227 Spring 2018 Assignment 1 100 points Due Date: Friday, September 14, 11:59 pm (midnight) Late deadline (25% penalty): Monday, September 17, 11:59 pm General information This assignment is to be
More informationCSC209. Software Tools and Systems Programming. https://mcs.utm.utoronto.ca/~209
CSC209 Software Tools and Systems Programming https://mcs.utm.utoronto.ca/~209 What is this Course About? Software Tools Using them Building them Systems Programming Quirks of C The file system System
More informationCSE Theory of Computing Fall 2017 Project 3: K-tape Turing Machine
CSE 30151 Theory of Computing Fall 2017 Project 3: K-tape Turing Machine Version 1: Oct. 23, 2017 1 Overview The goal of this project is to have each student understand at a deep level the functioning
More informationCS415 Compilers Overview of the Course. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University
CS415 Compilers Overview of the Course These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University Critical Facts Welcome to CS415 Compilers Topics in the
More informationProject 4: Implementing Malloc Introduction & Problem statement
Project 4 (75 points) Assigned: February 14, 2014 Due: March 4, 2014, 11:59 PM CS-3013, Operating Systems C-Term 2014 Project 4: Implementing Malloc Introduction & Problem statement As C programmers, we
More informationThe Linux Command Line: A Complete Introduction, 1 st ed., by William E. Shotts, Jr., No Starch Press, 2012.
Department of Mathematics and Computer Science Adelphi University Fall 2018 0145-275-001 Operating Systems Practicum Dr. R. M. Siegfried 407 Science (516)877-4482 http://home.adelphi.edu/~siegfried/cs271
More informationPointer Casts and Data Accesses
C Programming Pointer Casts and Data Accesses For this assignment, you will implement a C function similar to printf(). While implementing the function you will encounter pointers, strings, and bit-wise
More information