Skip to content

ucsd-cse230/02-while

Repository files navigation

02-While: Monadic State and Parsing (300 points)

Overview

The overall objective of this assignment is to get some experience using the State monad and Parser Combinators.

The assignment is in the following files that you will modify

Finally, there are aTest.hs has some sample tests to be used
to check your assignments before submitting.

You should only modify the parts of the files which say:

error "fill this in"

with suitable Haskell implementations.

You are free to write and use any helper functions.

Instructions

Assignment Testing and Evaluation

Most of the points, will be awarded automatically, by evaluating your functions against a given test suite.

Tests.hs contains a very small suite of tests which gives you a flavor of of these tests. When you run

$ make test

Your last lines should have

All N tests passed (...)
OVERALL SCORE = ... / ...

or

K out of N tests failed
OVERALL SCORE = ... / ...

If your output does not have one of the above your code will receive a zero

If for some problem, you cannot get the code to compile, leave it as is with the error "fill me in" with your partial solution enclosed below as a comment.

The other lines will give you a readout for each test. You are encouraged to try to understand the testing code, but you will not be graded on this.

Submission Instructions

To submit your code by running make turnin or alternately

$ make turnin

Collaborators

As before please add the name of any collaborator in the file COLLABORATORS.md

Problem 1: Fold (60 Points)

Fill in the missing code in Fold.hs

Problem 2: An Evaluator for WHILE (160 points)

Fill in the missing code in Eval.hs

Problem 3: A Parser for WHILE (80 points)

Fill in the missing code in Parse.hs

Releases

No releases published

Packages

No packages published