[racket] the type of range

From: Eric Dobson (eric.n.dobson at gmail.com)
Date: Tue Jul 15 22:04:02 EDT 2014

The issue with random testing is that it can only catch for bugs in
programs that can be generated. We currently have a small set of
primitives as allowed functions, and they are only numeric ones. Thus
we cannot currently generate programs with lists which would be
required for adding range. This is likely easy to do but just hasn't
been done yet.

On Tue, Jul 15, 2014 at 6:45 PM, Robby Findler
<robby at eecs.northwestern.edu> wrote:
> Shouldn't random testing have found at least some of these?
>
> Robby
>
> On Tue, Jul 15, 2014 at 8:37 PM, Alexander D. Knauth
> <alexander at knauth.org> wrote:
>> The type of range is this:
>>> (case->
>>>  (-> Nonpositive-Integer Null)
>> Why isn’t this (-> Nonpositive-Real Null) ?
>>>  (-> One (List One))
>> This is wrong, because (range 1) produces ‘(0), not ‘(1).
>> It should be (-> One (List Zero)).
>>>  (-> Byte (Listof Byte))
>>>  (-> Index (Listof Index))
>>>  (-> Fixnum (Listof Fixnum))
>> Why isn’t this (-> Fixnum (Listof Nonnegative-Fixnum)) ?
>> And why isn’t there a (-> Integer (Listof Nonnegative-Integer)) case in here?
>>>  (-> Real (Listof Integer))
>> Why isn’t this (-> Real (Listof Nonnegative-Integer)) ?
>>
>>>  (->* (Positive-Integer Byte) (Integer) (Listof Positive-Byte))
>>>  (->* (Nonnegative-Integer Byte) (Integer) (Listof Byte))
>>>  (->* (Positive-Integer Index) (Integer) (Listof Positive-Index))
>>>  (->* (Nonnegative-Integer Index) (Integer) (Listof Index))
>>>  (->* (Nonnegative-Integer Nonnegative-Fixnum)
>>>       (Integer)
>>>       (Listof Nonnegative-Fixnum))
>>>  (->* (Positive-Integer Fixnum) (Nonnegative-Integer) (Listof Positive-Fixnum))
>>>  (->* (Nonnegative-Integer Fixnum)
>>>       (Nonnegative-Integer)
>>>       (Listof Nonnegative-Fixnum))
>>>  (->* (Nonnegative-Integer Nonnegative-Integer)
>>>       (Integer)
>>>       (Listof Nonnegative-Integer))
>>>  (->* (Positive-Integer Integer)
>>>       (Nonnegative-Integer)
>>>       (Listof Positive-Integer))
>>>  (->* (Nonnegative-Integer Integer)
>>>       (Nonnegative-Integer)
>>>       (Listof Nonnegative-Integer))
>>>  (->* (Integer Real) (Integer) (Listof Integer))
>>>  (->* (Exact-Rational Real) (Exact-Rational) (Listof Exact-Rational))
>>>  (->* (Flonum Real) (Flonum) (Listof Flonum))
>>>  (->* (Single-Flonum Real) (Single-Flonum) (Listof Single-Flonum))
>>>  (->* (Inexact-Real Real) (Inexact-Real) (Listof Inexact-Real))
>>>  (->* (Real Real) (Real) (Listof Real)))
>>
>>
>> ____________________
>>   Racket Users list:
>>   http://lists.racket-lang.org/users
>
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users


Posted on the users mailing list.