Papers for

python software developers

Papers whose findings have a practical use for this group, as judged from the abstract. Open a paper to read what it means in practice.

Orion tool detects software regressions in pull requests for Python projects

Behavioral Regression Detection for Pull Requests via Structured Oracles

Abstract: Software regressions are unintended behavioral changes introduced by code modifications and are hard to detect at pull-request (PR) level. Existing methods rely on incomplete tests or directly analyze PRs via LLMs, lacking structured behavioral reasoning and explicit oracles. We present ORION, a staged framework for PR-level regression detection. ORION extracts PR intent and identifies impacted functions via AST-based impact analysis, then synthesizes function-level structured behavioral oracles encoding preserved/changed behaviors, setup constraints and control-flow hints from PR intent, static risk signals and code changes. Guided by these oracles, ORION generates executable tests, conducts oracle-coverage-guided augmentation and static repair, and differentially runs tests on pre- and post-change code. It classifies PRs with deterministic rules and constrained LLM reasoning. We build RegBench-Py, the first Python PR regression benchmark with 154 verified real-world PRs. ORION achieves F1-scores of 0.6125 (DeepSeek-Chat-V3.2) and 0.5578 (Claude-4.5-haiku), outperforming baselines including Testora, Codex and Claude Code. Compared with PatchGuru, ORION supports broader multi-function PRs while remaining competitive on single-function cases. On 1,459 merged PRs, ORION finds 9 reproducible regression candidates, 8 confirmed by maintainers. It takes ~15 minutes per PR, showing practicality for CI/CD screening.

Mon 26 OctSoftware Engineering
The gist
Software changes sometimes cause accidental errors called regressions that are hard to spot before merging code updates. The authors designed Orion, a tool that carefully checks code changes in pull requests by creating detailed tests that look for behavior changes. Orion uses smart analysis to understand which parts of the code might be affected and generates tests following rules derived from the change's intent. They tested Orion on a set of real Python code updates and found it better at finding regressions than other tools, showing it could help developers catch errors early.
Open → 2610.35223v1

AegisAsync detects risks in Python async programs with symbolic simulation

AegisAsync: Symbolic Async-Event Simulation for Risks in Python Asynchronous Programs

Abstract: Security and robustness risks in Python async programs depend on event order, object identity, and execution after exceptions or cancellation. Detecting these risks requires connecting related operations across function calls and tracking their effects along execution paths. We present AegisAsync, a bytecode-based analysis of Python async risks for CPython 3.10-3.14. Its Async Event Transition Graph combines bytecode control flow, resolved calls, async events, and symbolic object relations. Bounded path-local simulation tracks event order and object states and explores cancellation at await suspensions. Six detector plugins evaluate the resulting traces and states to produce candidates with supporting witnesses. On AsyncBench, our benchmark of 180 labeled risks, AegisAsync detects all labeled risks with zero false positives on each of the five versions. Across five path budgets on 2,500 PyPI package versions, source review confirms 457 of 910 AegisAsync candidate records (50.2%), representing 457 unique bugs; across three flake8-async samples, 70 of 2,187 review judgments are confirmed (3.2%). By submission, 166 PoCs reproduce AegisAsync findings, and we have reported 157 bugs to developers, of which 16 have been confirmed and fixed.

Tue 13 OctCryptography and Security
The gist
Python programs that run many tasks at once can have tricky bugs that depend on the order things happen and how objects are used. The authors created AegisAsync, a tool that watches the program’s tiny steps and simulates possible futures to find bugs related to unexpected event orders, cancellations, or errors. It carefully tracks function calls and object states to spot problems. Tested on real Python packages and benchmarks, AegisAsync found hundreds of real bugs, some of which were confirmed and fixed.
Open → 2610.18831v1

Shaker shows no advantage over rerunning flaky tests in python projects

Evaluating Shaker for Flaky Test Detection in Python Projects

Abstract: Flaky tests pass or fail non-deterministically on unchanged code, eroding trust in test suites and inflating the cost of every failure. Shaker detects them by injecting resource contention (CPU, memory, and I/O stress) to amplify non-determinism caused by concurrent execution, and was reported to detect 95% of the flaky tests in a Java and Android benchmark against 37.5% for plain re-execution (ReRun). We present the first empirical evaluation of Shaker for Python. Drawing non-order-dependent flaky tests from the ground-truth dataset of Gruber et al., we compare Shaker against a budget-matched ReRun baseline in a paired design, giving both techniques the same number of test executions: Each of 137 tests is run 100 times under each. As configured for Java and Android, Shaker provides no statistically significant detection advantage over plain re-execution (37.2% vs. 35.8%; McNemar exact p = 0.84). Two findings explain why. First, fewer than half of the ground-truth flaky tests reproduce as flaky at all on independent hardware under either technique, and most of the tests that fail to reproduce never diverge once across 100 runs. Second, the tests that do reproduce are dominated by flakiness from network interactions and randomness rather than the concurrency Shaker targets. Beyond the tool, this exposes a broader hazard for the field: reusing a flaky-test ground truth across execution environments silently converts genuine flaky tests into apparent true negatives, deflating any tool's measured recall.

Tue 22 SeptSoftware Engineering
The gist
Flaky tests sometimes pass and sometimes fail even when nothing changes, which causes confusion and extra work for developers. The authors looked at a tool called Shaker, which was good at finding flaky tests in Java but did not work better than simply running tests multiple times in Python projects. They found that many flaky tests don’t show flaky behavior consistently on different computers, and when they do, it’s mostly due to networking or randomness, not the concurrency problems Shaker tries to detect. This means tools evaluated on flaky tests from other setups might seem less effective than they really are.
Open → 2609.25528v1

Tool automatically converts loops into faster array operations in numpy

Vectorizer: Vectorizing NumPy Programs with Shape-Guided Rewrite

Abstract: NumPy is a widely used Python library for numerical scientific computing, known for its declarative APIs and its optimized implementations. However, writing efficient NumPy programs, which often entails using vectorized array operations instead of explicit Python loops, may not be straightforward. This can be difficult for programmers who are accustomed to imperative array traversal, especially when vectorized API invocations require careful reasoning about shapes, broadcasting, and advanced indexing. This paper presents a rewrite-based approach for vectorizing Numpy programs with explicit loops over array data. Our approach vectorizes loops from the inside out, using array shapes and dataflow analysis to guide a source-to-source transformation that replaces loop bodies with vectorized statements. Following a set of rewrite rules that are correct by construction, our approach is consistently fast. We have implemented the approach as a tool called Vectorizer and evaluated it on 150 benchmarks collected from prior work and Stack Overflow. The evaluation shows that Vectorizer vectorizes 142 of the 150 benchmarks directly and 2 more after minor changes to the original benchmarks, with only 0.53 seconds on average to rewrite each one. The resulting programs are, on average, 74.83x faster than the original loop-based implementations.

Tue 8 SeptComputation and LanguageSoftware Engineering
The gist
Writing fast programs with NumPy, a popular tool for number crunching in Python, usually means avoiding explicit loops and using special array operations instead. These array operations are tricky for many programmers because they require careful thinking about how arrays fit together by shape and how data moves between them. The authors created a tool called Vectorizer that automatically rewrites slow loop-based code into fast array operations by analyzing shapes and data flow. This rewriting makes the programs run much faster without needing the programmer to do the complicated work themselves.
Open → 2609.08088v1