Lune

FSE2022顶会

DynaPyt: a dynamic analysis framework for Python

Aryaz Eghbali, Michael Pradel

摘要

Python is a widely used programming language that powers important application domains such as machine learning, data analysis, and web applications. For many programs in these domains it is consequential to analyze aspects like security and performance, and with Python's dynamic nature, it is crucial to be able to dynamically analyze Python programs. However, existing tools and frameworks do not provide the means to implement dynamic analyses easily and practitioners resort to implementing an ad-hoc dynamic analysis for their own use case. This work presents DynaPyt, the first general-purpose framework for heavy-weight dynamic analysis of Python programs. Compared to existing tools for other programming languages, our framework provides a wider range of analysis hooks arranged in a hierarchical structure, which allows developers to concisely implement analyses. DynaPyt features selective instrumentation and execution modification as well. We evaluate our framework on test suites of 9 popular open-source Python projects, 1,268,545 lines of code in total, and show that it, by and large, preserves the semantics of the original execution. The running time of DynaPyt is between 1.2x and 16x times the original execution time, which is in line with similar frameworks designed for other languages, and 5.6%-88.6% faster than analyses using a built-in tracing API offered by Python. We also implement multiple analyses, show the simplicity of implementing them and some potential use cases of DynaPyt. Among the analyses implemented are: an analysis to detect a memory blow up in Pytorch programs, a taint analysis to detect SQL injections, and an analysis to warn about a runtime performance anti-pattern.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 12 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • DyPyBench: A Benchmark of Executable Python Software 引用了 The evolution of type annotations in python: an empirical study
  • DyPyBench: A Benchmark of Executable Python Software 引用了 LExecutor: Learning-Guided Execution
  • DyPyBench: A Benchmark of Executable Python Software 引用了 PyCG: Practical Call Graph Generation in Python
  • SelfPiCo: Self-Guided Partial Code Execution with LLMs 引用了 LExecutor: Learning-Guided Execution
  • You Name It, I Run It: An LLM Agent to Execute Tests of Arbitrary Projects 引用了 DyPyBench: A Benchmark of Executable Python Software
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper12

  1. The evolution of type annotations in python: an empirical studyLuca Di Grazia, Michael PradelFSE 2022 · 29 次引用
  2. You Name It, I Run It: An LLM Agent to Execute Tests of Arbitrary ProjectsIslem Bouzenia, Michael PradelISSTA 2025 · 17 次引用
  3. LExecutor: Learning-Guided ExecutionBeatriz Souza, Michael PradelFSE 2023 · 16 次引用
  4. DyPyBench: A Benchmark of Executable Python SoftwareIslem Bouzenia, Bajaj Piyush Krishan, Michael PradelFSE 2024 · 8 次引用
  5. SelfPiCo: Self-Guided Partial Code Execution with LLMsZhipeng Xue, Zhipeng Gao, Shaohua Wang, Xing Hu 等ISSTA 2024 · 8 次引用

它引用的 Paper2

  1. PyNose: A Test Smell Detector For PythonTongjie Wang, Yaroslav Golubev, Oleg Smirnov, Jiawei Li 等ASE 2021 · 44 次引用
  2. PyCG: Practical Call Graph Generation in PythonVitalis Salis, Thodoris Sotiropoulos, Panos Louridas, Diomidis Spinellis 等ICSE 2021

相关 Paper

  1. DyLin: A Dynamic Linter for PythonAryaz Eghbali, Felix Burk, Michael PradelFSE 2025 · 1 次引用
  2. HARP: holistic analysis for refactoring Python-based analytics programsWeijie Zhou, Yue Zhao, Guoqiang Zhang, Xipeng ShenICSE 2020 · 10 次引用
  3. SelectiveTaint: Efficient Data Flow Tracking With Static Binary RewritingSanchuan Chen, Zhiqiang Lin, Yinqian ZhangUSENIX Security 2021 · 45 次引用
  4. SlipCover: Near Zero-Overhead Code Coverage for PythonJuan Altmayer Pizzorno, Emery D. BergerISSTA 2023 · 11 次引用
  5. Speculative Automated Refactoring of Imperative Deep Learning Programs to Graph ExecutionRaffi Khatchadourian, Tatiana Castro Vélez, Mehdi Bagherzadeh, Nan Jia 等ASE 2025 · 1 次引用
黄昏的海面,两侧是细线勾勒的悬崖