Skip to content

✨ Quality: Replace Source §3 Non-Det with the amb interpreter from 4.3.3#1155

Open
andoan16 wants to merge 1 commit intosource-academy:masterfrom
andoan16:contribai/improve/quality/replace-source-3-non-det-with-the-amb-in
Open

✨ Quality: Replace Source §3 Non-Det with the amb interpreter from 4.3.3#1155
andoan16 wants to merge 1 commit intosource-academy:masterfrom
andoan16:contribai/improve/quality/replace-source-3-non-det-with-the-amb-in

Conversation

@andoan16
Copy link
Copy Markdown

Problem

The subsection 4.3.1 currently uses Source §3 Non-Det as the execution engine for its examples. This engine is broken (causes "Maximum call stack size exceeded"). The fix is to change all code snippets to use the amb interpreter defined in 4.3.3, loaded via the repl module. This means:

Severity: critical
File: xml/chapter4/section3/subsection1.xml

Solution

The subsection 4.3.1 currently uses Source §3 Non-Det as the execution engine for its examples. This engine is broken (causes "Maximum call stack size exceeded"). The fix is to change all code snippets to use the amb interpreter defined in 4.3.3, loaded via the repl module. This means:

Changes

  • xml/chapter4/section3/subsection1.xml (modified)

Testing

  • Existing tests pass
  • Manual review completed
  • No new warnings/errors introduced

Closes #990

The subsection 4.3.1 currently uses Source §3 Non-Det as the execution engine for its examples. This engine is broken (causes "Maximum call stack size exceeded"). The fix is to change all code snippets to use the amb interpreter defined in 4.3.3, loaded via the `repl` module. This means:

Affected files: subsection1.xml

Signed-off-by: andoan16 <33853760+andoan16@users.noreply.github.com>
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates snippet metadata in xml/chapter4/section3/subsection1.xml, changing the chapter reference from 3 to 4 and the variant from 'non-det' to 'amb'. While the applied changes are correct, several additional instances of the old metadata were missed later in the file and should be updated to ensure the migration is complete.

<LATEXINLINE>$e_i$</LATEXINLINE> <QUOTE>ambiguously.</QUOTE> For example,
the expression
<SNIPPET CHAP="3" VARIANT="non-det">
<SNIPPET CHAP="4" VARIANT="amb">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The goal of this pull request is to replace all instances of the Source §3 Non-Det engine, but it seems several instances were missed in this file.

I found other occurrences of <SNIPPET CHAP="3" VARIANT="non-det"> that should also be changed to <SNIPPET CHAP="4" VARIANT="amb"> on the following lines:

  • 197
  • 436
  • 469
  • 500
  • 533
  • 561 (note: this tag has a POSTPADDING="no" attribute that should be preserved)
  • 629 (note: this tag has a POSTPADDING="no" attribute that should be preserved)
  • 737 (note: this tag has a POSTPADDING="no" attribute that should be preserved)

Please apply the same fix to all occurrences to fully resolve the issue described in the pull request.

@RichDom2185 RichDom2185 requested a review from martin-henz March 28, 2026 18:45
Copy link
Copy Markdown
Member

@RichDom2185 RichDom2185 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refer to Gemini's comments above.


Note: While we are open to entirely AI-generated PRs, please indicate as such clearly. Don't just make us infer it from the branch name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace Source §3 Non-Det in SICP JS 4.3.1 and 4.3.2 by the interpreter from SICP JS 4.3.3

2 participants