A Multilanguage Static Analysis of Python Programs with Native C Extensions

Autor: Antoine Miné, Abdelraouf Ouadjaout, Raphaël Monat
Přispěvatelé: Monat, Raphaël, Modular Open Platform for Static Analysis - MOPSA - - H20202016-06-01 - 2021-05-31 - 681393 - VALID, Algorithmes, Programmes et Résolution (APR), LIP6, Sorbonne Université (SU)-Centre National de la Recherche Scientifique (CNRS)-Sorbonne Université (SU)-Centre National de la Recherche Scientifique (CNRS), Institut Universitaire de France (IUF), Ministère de l'Education nationale, de l’Enseignement supérieur et de la Recherche (M.E.N.E.S.R.), European Project: 681393,H2020,ERC-2015-CoG,MOPSA(2016)
Jazyk: angličtina
Rok vydání: 2021
Předmět:
Zdroj: Static Analysis Symposium (SAS)
Static Analysis Symposium (SAS), Oct 2021, Chicago, Illinois, United States
Static Analysis ISBN: 9783030888053
SAS
Static Analysis-28th International Symposium, SAS 2021
Lecture Notes in Computer Science
Lecture Notes in Computer Science-Static Analysis
ISSN: 0302-9743
1611-3349
Popis: International audience; 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.
Databáze: OpenAIRE