1.2 KiB
#Lab 7: Reasoning About Correctness
CSci 2041: Advanced Programming Principles, Spring 2017
Due: This work is due before you leave lab today.
In lab today your TAs will present you with some sample OCaml functions and also a property that you will be asked to prove a property of the functions.
You will be given about 10 minutes to work on this problem before the solution is discussed and explained.
Create a directory called Lab_07
and in the directory create a
file named lab_07.txt
that is a text file the contains both the
sample functions given to your lab and also the proof of the property
that you are asked to prove.
Your text file must contain well-marked answers to the following questions:
- What is the induction principle for the type of data used in the sample functions?
- What is the property that you are asked to prove?
- What is the "base case" that you need to prove?
- What is the "inductive case" that you are asked to prove?
- What is the "inductive hypothesis" that you can use in proving the inductive case?
These are questions that you may be asked to answer on the quiz on Wednesday.
Commit and push this file before you leave lab today.