Principles of Programming Languages - S16

CSE 340

Project 1

Project 1 is due 1/22/16 on or before 11:59:59pm MST.

Part 1 (5 points)

Sign up for the course mailing list. Please provide your ASURITE ID number when you register so that we can give you credit for signing up.

Part 2 (95 points)

The goal of this project is to get your CSE 340 assignment enviornment installed and configured. This will save you many hours of grief in the future.

Part 2.1

Read the document cse340_s16_programming_projects.pdf carefully and follow the instructions in that guide to install CentOS 6.7 on a virtual machine.

Note: this document applies to all programming projects in this course, so read it carefully and familiarize yourself with the automated grading system described in the document.

Part 2.2

Register for the course submission website at: https://cse340.fulton.asu.edu/cse340/

You should use this website to submit all programming assignments in this course. If you run into problems using this website, send an email to our amazing webmaster Mohsen Zohrevandi mzohreva@asu.edu, the TA for the other 340 section, and ask for help. Let Mohsen know that you are in my section.

Part 2.3

After finishing part 2.1, download secret.h and secret_64bit.o (or secret_32bit.o) depending on the installed CentOS architecture. Then, copy the following code in a new text file and change the number on line 5 to match your ASU Id:

1
2
3
4
5
6
7
#include "secret.h"

int main()
{
    secret_function("1234567890"); // TODO: replace the number with your ASU Id
    return 0;
}

Save this file with name project1.c in the same folder as secret.h. Then open a terminal window to compile and link the program with the following command:

gcc secret_64bit.o project1.c

If running on a 32-bit architecture, use secret_32bit.o instead of secret_64bit.o.

If all goes well, you should have an executable file named a.out. Execute it with the following command:

./a.out > p1_output.txt

Submit the resulting file p1_output.txt in the course submission website.

Credit

This project description was created by Mohsen Zohrevandi, and is used with permission.