CISC108 Lecture Notes - Lecture 4: Boundary Value Problem, Complex Instruction Set Computing
Document Summary
The how to design functions (htdf) recipe is a design method that enables systematic design of functions. We will use this recipe throughout the term, although we will enhance it as we go to solve more complex problems. The htdf recipe consists of the following steps: signature, purpose, and stub, de ne examples, wrap each in check%expect, template and inventory, code the function body, test and debug until correct. Note: each of these steps build on the ones that precede it. The signature helps write the purpose, the stub, and the check-expects; it also helps code the body. The purpose helps write the check-expects and code the body. The check-expects help to code the body as well as to test the complete design: it is sometimes helpful to do the steps in a different order. Sometimes it is easier to write examples rst, then do signature and purpose.