Discussion:
[Scheme-reports] Possible error in latest available draft of R7RS
Thorben Hasenpusch
2015-02-25 13:52:08 UTC
Permalink
Hello all!

While looking over the formal semantics paragraph of the latest draft of R7RS,
I might have spotted at least 2 possible bugs.

1. In the definition of the auxiliary function ‘cons’:
The anonymous function passed to ‘twoarg’ has its parameters ‘k’ and ‘w’ switched;
As it currently stands, the form of the function being passed to twoarg is E -> E -> K -> P -> C,
however ‘twoarg’ takes a function of the form E -> E -> P -> K -> C.

2. In the definition of ‘list’ and ‘tievalsrest’:
List is defined to take a parameter w ϵ P, however it never applies it to itself nor to ‘cons’, which also needs a parameter ϵ P.
Moreover, ‘tievalsrest’ uses ‘list’ in its definition, but doesn’t pass an argument ϵ P to it. In fact, it doesn’t even get a suitable parameter passed to.

I didn’t see those issues listed in the errata, so I thought it would be best to post them to this list.

A nice day to you all,

Thorben Hasenpusch
Alex Shinn
2015-02-27 03:50:09 UTC
Permalink
Hi Thorben,

On Wed, Feb 25, 2015 at 10:52 PM, Thorben Hasenpusch <
Post by Thorben Hasenpusch
Hello all!
While looking over the formal semantics paragraph of the latest draft of R7RS,
I might have spotted at least 2 possible bugs.
The anonymous function passed to ‘twoarg’ has its parameters ‘k’ and ‘w’
switched;
As it currently stands, the form of the function being passed to twoarg is
E -> E -> K -> P -> C,
however ‘twoarg’ takes a function of the form E -> E -> P -> K -> C.
This and several other issues with the formal semantics were
pointed out by William Cushing.
[http://www.mail-archive.com/scheme-***@scheme-reports.org/msg04217.html
]

I had let this slip my plate, but need to double check and all
these to the errata.
Post by Thorben Hasenpusch
List is defined to take a parameter w ϵ P, however it never applies it to
itself nor to ‘cons’, which also needs a parameter ϵ P.
Moreover, ‘tievalsrest’ uses ‘list’ in its definition, but doesn’t pass an
argument ϵ P to it. In fact, it doesn’t even get a suitable parameter
passed to.
William also pointed out the issue with `list', though missed that
`tievalsrest' is calling list.

Thank you for the report! I'll reply again when I've updated the errata.
--
Alex
Loading...