Scope

This note describe how to present code submitted as part of a homework of this class (CS 568, Functional Logic Programming, Fall 2017).

  1. Identify each problem/question of the homework, including problems for which you do not submit a solution. If you state why you do not submit a solution, such as lack of time or lack of knowledge, I may give you extra time and/or hints. You may still get some points.
  2. In English, perhaps as a comment, enumerate and describe the elements of the problem and their relationships. The description should be precise enough to determine the solution (not necessarily how to compute it).
  3. Use expressive names for your types. Introduce "type" declarations that capture the elements of the problem.
  4. Include a 1-2 line comment before each function that both describes the behavior of the function and provides an example of what it computes. E.g.,
      -- find the maximum of the arguments, e.g,  max 5 7 returns 7
      max :: Int -> Int -> Int
      max x y ...
    
  5. Include unit testing for most functions. Ideally, there are 2 kinds of tests. Some very simple cases to help understanding the behavior of the function. And some cases that an incorrect function should fail. In other words, these cases should directly check the requirements. Include a trace of the execution of your tests.
  6. You may feel that some question of the homework is stupid. You are welcome to say so and why. You can extend and expand any question in any direction. However, you should answer the stupid question as well and keep your extensions and expansions separated so I can grade the stupid answer (sorry, I mean the answer to the stupid question) independently.
  7. Program code is printed out, not handwritten.
example.