Repository navigation
Rebuilt and extended analysis for unarchival - #75
Merged
Merged
Conversation
The analysis of the ICSE 2021 paper, ported to run on Python 3.12 to 3.15 with the small fixes that the port needed, on uv, ruff and one CI workflow. The micro-benchmark is checked against real executions (micro-benchmark/validate.py), and the ground-truth edges that the check found wrong are corrected; the cases that this analysis fails are listed as strict expected failures. This commit is the "original PyCG" of the evaluation, the tag baseline-original-engine. The commits after it replace the analysis. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The settings of the project for the redesigned PyCG: pyproject.toml and the lock file, the Makefile's lint and test targets, the CI workflow (lint and tests on Python 3.12 to 3.15, also on pushes to dev), and AGENTS.md, which states the rules of the project for contributors and agents. This commit starts a series of six that replaces the 2021 analysis with the redesigned one; the tree builds and its tests pass at the end of the series. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
docs/design.md is the specification of the analysis: the five ideas, every rule with its limits, why the result does not depend on the solver's order and why the solve ends, and the open problems. docs/format.md specifies the JSON document that PyCG writes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A new analysis for Python 3.12 and later, fully static: it never imports or runs the analysed code. It follows the values of a program (functions, classes, instances, containers) through an assignment graph solved to a fixpoint, models classes with their MROs, descriptors and decorators, reports the calls that the interpreter makes (iteration, context managers, operators, subscripts, await), and names calls into code outside the package through type stubs. One setting, the cap on the objects kept per value. The output is one deterministic JSON document; pycg-view renders it as one HTML page. It scales to large packages: the records of an attribute access through an instance are made only once the class can answer, the node of an instance attribute at its first write, and the parameter nodes of a stubbed call when a rule first reads them. None of this changes a result; a reference test compares the solve, round by round, with one that makes every record at once. The 2021 analysis is the tag baseline-original-engine. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each case is a small program with the call graph that Python has when it runs; micro-benchmark/validate.py checks a case against a real run. The cases cover the language up to Python 3.15. The duplicate tree micro-benchmark-key-errs goes. tools/generate_stubs.py builds the stub data that the analysis reads. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Unit tests of the analysis through its public entry points, the micro-benchmark run against its expected call graphs, properties of the solver (order independence, termination), and the tests of the viewer and of the benchmark's tools. tests/known_failures.txt lists the cases that the analysis does not handle, each with its cause, as strict expected failures; tests/triage.py regenerates it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The archive notice goes. The README says what the analysis resolves, how to install PyCG from a checkout (this version is not on PyPI yet), how to use it, and where the evaluation is (vitsalis/pycg-evaluation). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
vitsalis
approved these changes
Nov 15, 2026
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.
No description provided.