📖
A Multilanguage Static Analysis of Python Programs with Native C Extensions
Raphaël Monat, Abdelraouf Ouadjaout, Antoine Miné

A Multilanguage Static Analysis of Python Programs with Native C Extensions

Science & Mathematics Published 2021 Verification Pending

Overview & Synopsis

Modern programs are increasingly multilanguage, to benefit from each programming language's advantages and to reuse libraries. For example, developers may want to combine high-level Python code with low-level, performance-oriented C code. In fact, one in five of the 200 most downloaded Python libraries available on GitHub contains C code. Static analyzers tend to focus on a single language and may use stubs to model the behavior of foreign function calls. However, stubs are costly to implement and undermine the soundness of analyzers. In this work, we design a static analyzer by abstract interpretation that can handle Python programs calling C extensions. It analyses directly and fully automatically both the Python and the C source codes. It reports runtime errors that may happen in Python, in C, and at the interface. We implemented our analysis in a modular fashion: it reuses off-the-shelf C and Python analyses written in the same analyzer. This approach allows sharing between abstract domains of different languages. Our analyzer can tackle tests of real-world libraries a few thousand lines of C and Python long in a few minutes.

Indexed from repository: HAL Open Science (hal.science)
Loading document from verified source...
Keyboard Shortcuts: ← / → for pages • + / - for zoom • 0 to fit width Powered by Mozilla PDF.js v3.11

Document Information

Document Title A Multilanguage Static Analysis of Python Programs with Native C Extensions
Author / Organization Raphaël Monat, Abdelraouf Ouadjaout, Antoine Miné
Subject & Discipline Multidisciplinary Academic Open Research
Categories Science & Mathematics
Publication Year 2021
License / Rights Open Access / Creative Commons
Resource Verification Listed PDF (Verification Pending)
Original Host Website HAL Open Science (hal.science)
File Format application/pdf (Portable Document Format)
Language EN
Catalog ID DOC-221272
Original Source Link Visit Source Page on hal.science »