Skip to content

feat: import and symbol analysis - #6

Merged
SizzleUnrlsd merged 2 commits into
mainfrom
feat/semantic-symbols
Sep 3, 2026
Merged

SizzleUnrlsd merged 2 commits into
mainfrom
feat/semantic-symbols

Conversation

@SizzleUnrlsd

Copy link
Copy Markdown
Contributor

Summary

Finishes Phase 2 of docs/architecture.md (§4.2 ImportAnalysis, §4.3 SymbolAnalysis).

  • Acceptance tests first (test: define import and symbol analysis behavior), implementation follows in this PR.
  • Source layer knows each module's dotted name, derived from enclosing __init__.py packages.
  • ImportAnalysis collects bindings per scope (module and function level), resolves relative imports against the module name, and records wildcard imports instead of aborting.
  • SymbolAnalysis resolves any name in any scope to a canonical SymbolId through scope rules, imports and closures; builtins become python.builtins.<name>.
  • SymbolId accepts any namespace (flask.request.args, django.http.HttpRequest.GET).
  • Lowering resolves names through SymbolAnalysis: builtins, function-level and relative imports now emit symbol @....

Closes #5

🤖 Generated with Claude Code

SizzleUnrlsd and others added 2 commits September 3, 2026 06:04
Acceptance tests for the rest of Phase 2: module names in the source layer,
per-scope import bindings with relative imports and recorded wildcards, and a
SymbolAnalysis resolving names through scopes, imports and builtins.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Source files carry their dotted module name so relative imports resolve
statically. ImportAnalysis collects bindings per scope and records wildcard
imports instead of aborting. SymbolAnalysis resolves any name through scopes,
imports and builtins, and lowering emits canonical symbols from it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@SizzleUnrlsd SizzleUnrlsd mentioned this pull request Sep 3, 2026
6 tasks done
@SizzleUnrlsd SizzleUnrlsd self-assigned this Sep 3, 2026
@SizzleUnrlsd
SizzleUnrlsd merged commit 329bbd8 into main Sep 3, 2026
6 checks passed
@SizzleUnrlsd
SizzleUnrlsd deleted the feat/semantic-symbols branch September 3, 2026 04:10
SizzleUnrlsd added a commit that referenced this pull request Sep 3, 2026
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.

Complete semantic layer and lexical scopes

1 participant