What postcondition should we use?
20 likes | 123 Vues
What postcondition should we use?. (define drawing- munge (lambda (thingy) (drawing- h shift thingy (drawing-width thingy ))))) The result is the same width as thingy The result overlaps thingy The result is below thingy The result is immediately to the right of thingy
What postcondition should we use?
E N D
Presentation Transcript
What postcondition should we use? (define drawing-munge (lambda (thingy) (drawing-hshift thingy (drawing-width thingy))))) • The result is the same width as thingy • The result overlaps thingy • The result is below thingy • The result is immediately to the right of thingy • A and D
What preconditions should we use? (define drawing-munge (lambda (amt thingy) (drawing-hshift (drawing-vscaleamt thingy) thingy))) • amtmust be a number • (real? amt) is #t • thingy must be a real number • (drawing? thingy) is #t • None of the above