Skip to content

Document Phase 1 imperative syntax in docs and editors#985

Merged
jsiek merged 2 commits into
mainfrom
claude/gifted-noyce-199dbf
Jun 17, 2026
Merged

Document Phase 1 imperative syntax in docs and editors#985
jsiek merged 2 commits into
mainfrom
claude/gifted-noyce-199dbf

Conversation

@jsiek

@jsiek jsiek commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Summary

Addresses #969 (Phase 1j) for the imperative syntax that has actually
been implemented so far (proc, observer, object, mutable array
[T]!, frame expressions). Items covering syntax not yet parsed —
resource declarations, emp/**/|->, imperative statements,
invariant/loop annotations, and call labels — are deliberately left
for future PRs that follow Phases 1d/1e/1h/1i.

The experimental imperative surface lives on its own page rather
than being interleaved into the main reference, so the alphabetized
Reference.md doesn't grow entries that say "parser-only, not
implemented yet."

Test plan

  • python3.13 gh_pages/scripts/reference_grammar.py — passes
    (Checked 158 reference grammar rule(s) across both pages)
  • python3.13 gh_pages/scripts/keywords.py — passes silently
  • python3.13 test-deduce.py --equiv — passes
  • python3.13 test-deduce.py --site — passes; the new
    doc_imperative-reference.pf entangled file contains the
    object_example snippet and validates
  • python3.13 test-deduce.py --parser — passes
  • make static — ruff + mypy pass
  • emacs --batch -L editor/emacs ... ert-run-tests-batch-and-exit
    — 31/31 pass

Claude session — fallback UUID: 1552166f-f28b-4846-a53d-8e5ee710f6be

🤖 Generated with Claude Code

jsiek and others added 2 commits June 17, 2026 12:13
Updates docs and editor highlighting for the imperative syntax that
already parses (proc, observer, object, mutable array `[T]\!`, frame
expressions). Wires #854 into the imperative-verification-plan as the
tracking issue, adds concise Reference.md entries for the new
declarations plus a Frame Expression section, lists the new
statements in SyntaxGrammar.md with the parser/AST-only caveat, and
teaches the emacs and vscode highlighters about the imperative
keywords.

Reference grammar entries are validated by gh_pages/scripts/
reference_grammar.py against Deduce.lark. Items in #969 covering
syntax that has not been implemented yet (resource declarations,
`emp`/`**`/`|->`, imperative statements, invariant/loop annotations,
call labels) are deliberately not addressed here — they will follow
once Phases 1d/1e/1h/1i land.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Splits the imperative documentation out of Reference.md into a new
gh_pages/doc/ImperativeReference.md so the main reference doesn't
grow entries for features that are parser-only today. Reference.md
keeps a single pointer at the top; SyntaxGrammar.md's main statement
list returns to the original ten entries with a paragraph linking to
the experimental page.

- gh_pages/doc/ImperativeReference.md: new page with Frame
  Expression, Object, Observer, Procedure, and a cross-link to the
  Type grammar for `[T]\!`.
- gh_pages/doc/Reference.md: TOC pointer to the new page; previously
  inlined sections and TOC entries removed.
- gh_pages/doc/SyntaxGrammar.md: restored to ten core statements
  plus a single paragraph pointing at the new page.
- gh_pages/scripts/convert.py: register `ImperativeReference` in the
  html/title/description/deduce-code dicts so the site converter
  builds it and extracts its `.deduce^#` snippets.
- gh_pages/scripts/reference_grammar.py: walk both Reference.md and
  ImperativeReference.md instead of only the former.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@jsiek jsiek merged commit 378ddbe into main Jun 17, 2026
9 checks passed
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.

1 participant