CS 421: Programming Languages and Compilers

Machine Labs for Fall 2015
Topic PrairieLearn Practice Name Issued Lab Start Date Lab End Date
ML1 (OCaml 4.02.3) Pattern Matching and Recursion Practice Machine Lab 1: Pattern Matching & Recursion Tuesday, Sep 1 Wednesday, Sep 9 Friday, Sep 11
ML2 Higher-Order Functions and Continuation-Passing Style Practice Machine Lab 2: Higher-Order Functions and Continuation-Passing Style Tuesday, Sep 15 Wednesesday, Sep 23 Friday, Sep 25
ML3 A Unification-Based Type Inferencer Practice Machine Lab 3: A Unification-Based Type Inferencer Monday, Oct 5 Wednesday, Oct 14 Friday, Oct 16
ML4 A Lexer for OCaml's Type System Practice Machine Lab 4: A Lexer for OCaml's Type System (Coming Soon!) Wednesday, Oct 21 Wednesday, Oct 28 Friday, Oct 30

Signing Up for a Machine Lab

To sign up for a time slot to complete your Machine Lab, do the following:

  1. You can sign up for a time slot to complete your Machine Lab by going to https://edu.cs.illinois.edu/testcenter/.
  2. If you do not see CS 421: Programming Languages as one of your courses, you should click Add a course, and then select CS 421: Programming Languages.
  3. Once you have CS 421: Programming Languages added to your courses, select the appropriate Machine Lab that you wish to sign up for.
  4. You should now be able to select a timeslot from those available to go to the testing facility and complete your Machine Lab. Please contact the instructor if you have a conflict as defined by university policy.

Machine Lab Logistics

There are certain things to remember when you're about to go complete a machine lab:

  • The testing facility is located in the Digital Computer Laboratory (DCL), room L416.
  • You have 50 minutes to complete your Machine Lab (as per the CBTF policy).
  • You will be using PrairieLearn, an online testing suite, to obtain your starter file and submit your solutions.
  • PrairieLearn works only on Firefox and Chrome. Don't use any browser other than those.
  • You will be provided with scratch paper (which you will turn in before you leave).
  • You will be able to, like on MPs, make and test your code against the grader.
  • If you are unable to make a scheduled ML, you must make alternate arrangements with the instructor.
IMPORTANT

You must bring ONLY your iCard and optionally, a writing utensil. Your iCard will be checked and scanned at the testing facility.

You are NOT allowed to bring backpacks or electronic devices (including watches, cellular devices, etc.). There are lockers outside of the testing facility you may use (but cost $0.25 and are apparently small).

You can find more information on the procedures and policies of the Computer-Based Testing Facility here.


Working on a Machine Lab

While you are completing your Machine Lab, you will have access to the following materials:

  1. PrairieLearn
  2. The starter files we have provided you with (including files to make a grader)
  3. A text editor
  4. OCaml
  5. make

You may want to review the Guide for Doing MPs and the instructions on Interactive Debugging prior to going to the testing facility.

Instructions will be provided on each question on how to untar and complete each question. For completeness, we have included them here as well.

Instructions on Machine Lab Questions
  1. Download the starter file, located here.
  2. Untar the starter file. This can be done in one of two ways:
    • In your terminal, locate the downloaded starter file, then execute tar -zxf ml1.tar.gz.
    • Using a GUI, untar the starter file.
  3. After untarring, a directory will be created named ml$NUMBER-$QUESTION. (e.g. ml1-twoPair)
    • Within the directory are the usual files you can use to make a grader, including an extensive set of tests.
    • We reserve the right to make changes to the provided test suite or run additional tests on submitted code.
  4. Complete the problem below in ml1.ml.
    • If you need to start from scratch, you should make a copy of ml1-skeleton.ml and rename it ml1.ml.
  5. When you have finished the problem, upload the completed ml1.ml file. (Note that submitting the problem will result in your grade being 100%; the grade on PrairieLearn only indicates question completion.)