Midterm project

The goal of this midterm project is to give you a chance to reflect on what you have been exposed to in this course since the beginning of the semester, conceptually, practically, and methodologically.

Expectations

You are expected:

  • to work in groups, as you did for the weekly handins, to solve and to program, and
  • to write an individual report from scratch and using your own words.
Vigfus: To solve and to program.
Halcyon: This is so cool!

The individual report

Your report should include

  • an anonymous front page with title and date (because this time, <hopeful>there will be graders to help</hopeful>),
  • a second page with a table of contents, and
  • from the third page and onward,
    • an introduction,
    • a series of sections and subsections reflecting the structure of the project, and
    • a conclusion where you assess what you did and reflect on how you did it and the perspective your assessment and reflection provide.

Pages should be numbered, and the narrative should be spell checked.

An inspiring (and not necessarily humorous, just on topic) quote (e.g., from Dijkstra) or three would be welcome.

Throughout, remember to embrace the structure where the computation is described informally (textually), where it is accounted for with a unit-test function, where it is specified inductively, where this inductive specification is mirrored into a structurally recursive function, and where the implementation is verified to pass the unit tests – unit tests whose significance (e.g., code coverage) and limitations (e.g., fake functions) should be scrutinized.

About describing your programs: of course you should not paraphrase the code, because what is the point of that.

A request

Please send one email per group to the lecturer, including

  • the names / student IDs / email addresses of all the students in the group, and
  • the map between each student’s name and the Canvas identifier under which they uploaded their individual report.

If you have added something personal to the common code, be it extra tests, an independent solution, or the solution to an optional exercise, please identify them as such in the .ml files and in your report.

Oh, and of course

  • each .ml file should load seamlessly (using #use) when starting OCaml afresh; and
  • each .ml file should only contain global declarations (i.e., let ... = ...;;).

A miscellany of recursive programs from Week 06

The underlying determinism of OCaml

  • Question 2: in which order are a function and an argument evaluated in an application?
  • Question 3: in which order were the components of a tuple evaluated when this tuple is constructed?
  • Question 4: applying a curried function vs. applying an uncurried function
  • Question 5: function applications vs. let expressions
  • Question 6: in which order are the definienses evaluated in a let expression?
  • Question 7: function applications vs. let expressions, continued
  • Question 8: in which order are conjuncts evaluated in a Boolean conjunction?
  • Question 9: determining the validity of a handful of simplifications
  • Question 10: determining the equivalence of let expressions involving impure expressions
  • Question 11: determining the equivalence of let expressions involving pure expressions
  • Question 12: strict vs. non-strict functions

Palindromes, string concatenation, and string reversal

Cracking polynomial functions

Version

Regrouped (and thus relabeled) a couple of questions [21 Feb 2021]

Completed [21 Feb 2021]

Initialized (the actual content of the midterm project is forthcoming) [20 Feb 2021]