Question: ( definec foo ( x y :nat z :tl ) :int ( cond ( ( zp x ) ( * y 2 ) ) (

(definec foo (x y :nat z :tl) :int
(cond ((zp x)(* y 2))
((zp y)(* x 2))
(( x y)(foo y x z))
((oddp (len z))(* y 4))
(( y x)(* x 4))
((oddp (- x y))-15)
((evenp (- x y))24)
(t 43)))
; Part 1
; These are some warmup exercises.
; Exercise 2.11
;Exhibit a set of tests with minimal cardinality that obtains
;maximal expression coverage for foo.
(check= XXX XXX)
XXX
( definec foo ( x y :nat z :tl ) :int ( cond ( (

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!