Breaking the Dependency Chaos: A Constraint-Driven Python Dependency Resolution Strategy with Selective LLM Imputation
- URL: http://arxiv.org/abs/2605.11772v1
- Date: Tue, 12 May 2026 08:42:37 GMT
- Title: Breaking the Dependency Chaos: A Constraint-Driven Python Dependency Resolution Strategy with Selective LLM Imputation
- Abstract summary: Dependency resolution is the task of selecting package versions that can be installed together without conflicts.<n>Recent work, such as LLMM, tackles this problem by using large language models to infer Python and package versions from code.<n>We present SMT-LLM, a hybrid system that replaces a version guessing with formal constraint solving.
- Score: 1.0832844764942349
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Dependency resolution is the task of selecting package versions that can be installed together without conflicts. It accounts for a significant share of build failures in modern software projects. In the Python ecosystem, this task is especially challenging due to Python 2/3 incompatibilities, deprecated packages, and widespread missing metadata. Recent work, such as PLLM, tackles this problem by using large language models (LLMs) to infer Python and package versions from code and iteratively repairing them based on build errors. We present SMT-LLM, a hybrid system that replaces LLM-only version guessing with formal constraint solving. SMT-LLM uses deterministic import extraction and Python version detection via abstract syntax tree (AST) analysis, the vermin tool to infer minimum Python versions, and a five-tier import-to-package resolver that queries PyPI before any LLM call. We construct a constraint graph from PyPI metadata and LLM-imputed dependencies for packages with missing metadata, then solve for consistent version assignments using a Z3 satisfiability modulo theories (SMT) solver. On the HG2.9K benchmark using Gemma2:9B (10 GB VRAM), SMT-LLM resolves 83.6% of snippets compared to PLLM's 54.8%, while reducing median resolution time from 151.5 s to 23.9 s (6.3x faster) and average LLM calls from ~24.9 to 2.26 per snippet (11x reduction).
Related papers
- SMTpip: Interpreter-Aware SMT-Based Dependency Conflict Resolution for Restoring Python Source-Code Executability [5.10290711045049]
We present SMTpip, an interpreter-aware environment inference technique for improving the executability of Python source-code artifacts.<n>SMTpip constructs a dependency knowledge graph using metadata stored in the Python Package Index (PyPI) that hosts millions of package releases.<n> Empirical evaluation on multiple datasets from open-source Python projects shows that SMTpip achieves substantial speedups.
arXiv Detail & Related papers (2026-08-16T18:22:59Z) - Formalize, Don't Optimize: The Heuristic Trap in LLM-Generated Combinatorial Solvers [52.23061619664667]
Large Language Models (LLMs) struggle to solve complex problems through direct reasoning, so recent neuro-symbolic systems increasingly use them to synthesize executable solvers.<n>We introduce CP-SynC-XL, a benchmark of 100 problems (4,577 instances), and evaluate three solver--construction paradigms: native algorithmic search (Python), constraint modeling through a Python solver API (Python + OR-Tools), and declarative constraint modeling.
arXiv Detail & Related papers (2026-05-12T17:15:45Z) - Correct Code, Vulnerable Dependencies: A Large Scale Measurement Study of LLM-Specified Library Versions [52.50730821321986]
We present the first large-scale measurement study of version-level risk in large language models (LLMs)<n>We evaluate 10 LLMs on PinTrace, a curated benchmark of 1,000 Stack Overflow programming tasks.<n>Our findings reveal LLM version selection as a first-class, previously overlooked risk surface in LLM-based development.
arXiv Detail & Related papers (2026-05-07T13:52:59Z) - MEMRES: A Memory-Augmented Resolver with Confidence Cascade for Agentic Python Dependency Resolution [1.6376585841690154]
MEMRES is an agentic system for Python dependency resolution.<n>On HG2.9K using Gemma-2 9B (10 GB VRAM) MEMRES resolves 2503 snippets of 2890 snippets.
arXiv Detail & Related papers (2026-04-18T09:52:45Z) - PyTrim: A Practical Tool for Reducing Python Dependency Bloat [4.121942353083345]
Dependency bloat is a persistent challenge in Python projects.<n>We introduce PYTRIM, an end-to-end system to automate this process.<n> PYTRIM eliminates unused imports and package declarations across a variety of file types.
arXiv Detail & Related papers (2025-10-01T08:58:55Z) - The Last Dependency Crusade: Solving Python Dependency Conflicts with LLMs [10.800983456810165]
This paper investigates the use of Large Language Models (LLMs) to automatically repair dependency issues in Python programs.<n>We propose HGM (pronounced "plum"), a novel retrieval-augmented generation (RAG) approach that iteratively infers missing or incorrect dependencies.
arXiv Detail & Related papers (2025-01-27T16:45:34Z) - SWE-Fixer: Training Open-Source LLMs for Effective and Efficient GitHub Issue Resolution [56.9361004704428]
Large Language Models (LLMs) have demonstrated remarkable proficiency across a variety of complex tasks.<n>SWE-Fixer is a novel open-source framework designed to effectively and efficiently resolve GitHub issues.<n>We assess our approach on the SWE-Bench Lite and Verified benchmarks, achieving competitive performance among open-source models.
arXiv Detail & Related papers (2025-01-09T07:54:24Z) - PyPulse: A Python Library for Biosignal Imputation [58.35269251730328]
We introduce PyPulse, a Python package for imputation of biosignals in both clinical and wearable sensor settings.<n>PyPulse's framework provides a modular and extendable framework with high ease-of-use for a broad userbase, including non-machine-learning bioresearchers.<n>We released PyPulse under the MIT License on Github and PyPI.
arXiv Detail & Related papers (2024-12-09T11:00:55Z) - DADApy: Distance-based Analysis of DAta-manifolds in Python [51.37841707191944]
DADApy is a python software package for analysing and characterising high-dimensional data.
It provides methods for estimating the intrinsic dimension and the probability density, for performing density-based clustering and for comparing different distance metrics.
arXiv Detail & Related papers (2022-05-04T08:41:59Z) - PyHHMM: A Python Library for Heterogeneous Hidden Markov Models [63.01207205641885]
PyHHMM is an object-oriented Python implementation of Heterogeneous-Hidden Markov Models (HHMMs)
PyHHMM emphasizes features not supported in similar available frameworks: a heterogeneous observation model, missing data inference, different model order selection criterias, and semi-supervised training.
PyHHMM relies on the numpy, scipy, scikit-learn, and seaborn Python packages, and is distributed under the Apache-2.0 License.
arXiv Detail & Related papers (2022-01-12T07:32:36Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.