Comments and copyedits Wolfgang Corcoran-Mathe (12 Oct 2023 04:30 UTC)
Re: Comments and copyedits Marc Nieper-Wißkirchen (12 Oct 2023 07:39 UTC)
Re: Comments and copyedits Arthur A. Gleckler (12 Oct 2023 14:23 UTC)
Re: Comments and copyedits Marc Nieper-Wißkirchen (12 Oct 2023 14:36 UTC)
Re: Comments and copyedits Wolfgang Corcoran-Mathe (13 Oct 2023 02:39 UTC)

Comments and copyedits Wolfgang Corcoran-Mathe 12 Oct 2023 04:30 UTC

Hi Marc,

Thanks for your work on CFG. I've been hoping for something like
this ever since I read Olin's _Anatomy_ paper.

First of all, the included tests pass without warnings. It might
be nice to mention in the README that you need to init and update
the srfi-213 submodule to run the code.

My comments below are mostly superficial, since I haven't yet
absorbed the CFG formal semantics. I apologize in advance for
any mistakes or other obtuseness, and for taking so long to look
at this SRFI.

For the record, line numbers in this email refer to the text of
srfi-242.html as of commit d4fd6166ab31b0dd0537a63964dc2aebbe6eddf0.

# General comments

The names 'labels' and 'label*' do not indicate that 'labels' binds
dynamic labels and 'label*' static.

The informal description of 'permute' in sec. 3.2 seems to contradict
itself. The first paragraph says that "control passes to the CFG
block described by the first <cfg term>". This seems to imply
a fixed sequence. But later, we have "the sequencing of the two
'bind' CFG terms [in the example] is not determined", which seems
to agree with the formal semantics.

Why do some of the primitive (sec. 4.7) and derived (sec. 4.8) CFG
terms have the same names but different syntax? This is confusing
and makes it harder to use the document as a reference.

# Problems with examples

Running the example beginning on srfi-242.html:294
causes an "invalid let-values left-hand side" error in Chez Scheme.

The first example of 'execute' (beginning on line 335) returns (2 5),
not (3 6).

The example of 'execute' beginning on srfi-242.html:451 returns 1,
not 4.

The example beginning on srfi-242.html:639 causes an error, because
*x* is applied (on line 643).

I had a hard time understanding the example beginning on
srfi-242.html:662. Maybe it could be clarified a bit, or at least
discussed. For one thing, why is the 'label*' block wrapped in a
'label' block with no bindings?

# Copyedits

srfi-242.html:358: Read "more than one clause" for "more than
<cfg term>".

srfi-242.html:373: Read "it stands out that the" for "it stands out
the"

srfi-242.html:435--436: Read "and in (+ x 3)" for "and the (+ x 3)".

srfi-242.html:490: "an execute CFG game"?

srfi-242.html:585: For "<body cfg>" read "<cfg term>".

srfi-242.html:611: For "when call" read "when called".

srfi-242.html:689: For "are" read "is".

srfi-242.html:691--692: Weird grammar. I'd replace ", using ..." with
a period followed by "CFG macros are expanded by the usual Scheme
expansion algorithm."

srfi-242.html:837: For "a CFG locations" read "CFG locations".

srfi-242.html:883: Lower-case "<Cfg term>" and "<Result expression>".

srfi-242.html:998: Lower-case "Label*".

srfi-242.html:1049: Brackets around "cfg term".

srfi-242.html:1053, 1068, 1071, and several other lines: Delete <var>
tags around "CFG block".

srfi-242.html:1310: For "cfg block" read "CFG block" and delete
surrounding <var> tags.

srfi-242.html:1313: Brackets, <code>, and <span class="token"> tags
for "cfg term".

srfi-242.html:1372--1373: Brackets around "cfg keyword".

Regards,

--
Wolfgang Corcoran-Mathe  <xxxxxx@sigwinch.xyz>