Skip to content

[codex] Consolidate statement phase dispatch#533

Draft
jsiek wants to merge 1 commit into
mainfrom
issue-474-statement-dispatchers
Draft

[codex] Consolidate statement phase dispatch#533
jsiek wants to merge 1 commit into
mainfrom
issue-474-statement-dispatchers

Conversation

@jsiek
Copy link
Copy Markdown
Owner

@jsiek jsiek commented May 14, 2026

Summary

  • add a shared statement-kind registry for the proof-checking lifecycle phases
  • route process_declaration_visibility, process_declaration, type_check_stmt, collect_env, and check_proofs through common dispatch helpers
  • add unit coverage that the statement phases share the same registry

Validation

  • python3 -m py_compile proof_checker.py
  • pytest test/unit
  • python3 test-deduce.py

Codex session

Raw URI: codex://threads/019e2580-8773-76c0-99bb-44f4a1d0eaa6

open 'codex://threads/019e2580-8773-76c0-99bb-44f4a1d0eaa6'

@jsiek
Copy link
Copy Markdown
Owner Author

jsiek commented May 14, 2026

I'm not so sure I like this refactoring. It increases code size with a marginal benefit.

@jsiek
Copy link
Copy Markdown
Owner Author

jsiek commented May 14, 2026

Instead of a dispatch table I'm leaning towards doing the object-oriented thing and making them methods of the AST classes.

@jsiek jsiek marked this pull request as draft May 14, 2026 14:19
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