Repository navigation
feat: analysis manager - #8
Merged
Merged
Conversation
ScopeTable, ImportTable and SymbolTable are the results; the ScopeAnalysis, ImportAnalysis and SymbolAnalysis names are reserved for the analyses the manager will expose, as in the architecture document. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Acceptance tests for the Analysis Manager: registry with declarative dependencies, lazy module and function granularity, shared cached results, transformation invalidation, and the semantic tables and PyIR as first analyses. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Analyses are classes with a name, a version and declarative requires, computed lazily at module or function granularity by an AnalysisManager that caches and shares results, rejects undeclared dependencies and cycles, and invalidates what a TransformationPass does not preserve. The semantic tables and PyIR are the first registered analyses; lower_module runs through the manager. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
7 tasks done
Declare coretrace_python as first-party for ruff's isort so import order no longer depends on whether a package already exists on disk when tests are written before their implementation. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the Analysis Manager of
docs/architecture.md(§8 Analysis Manager, §9 Analysis DAG, §10 Lazy Evaluation, §11 Cache, §12 Invalidation).test: define analysis manager behavior), implementation follows in this PR.coretrace_python.analysis:Analysis[R]andFunctionAnalysis[R]base classes withname,versionand declarativerequires;AnalysisManagerwith a registry, cycle detection, lazy evaluation at module and function granularity, an in-memory cache andTransformationPassinvalidation driven bypreserves.ScopeAnalysis,ImportAnalysis,SymbolAnalysis(results renamed toScopeTable,ImportTable,SymbolTable).PyIRAnalysislowers one function on demand;ModuleIRAnalysisassembles the module. The CLI runs through the manager.Not in this PR: the persistent cache keyed by IR fingerprint and plugin/API version (§11), which belongs to Phase 10.
Closes #7
🤖 Generated with Claude Code