Static Analysis by Abstract Interpretation Collecting Types of Python Programs

Abstract : Software bugs are costly: they can have disastrous consequences on critical systems, but also on more common applications such as Web servers. It is thus interesting to possess tools helping developers detect those bugs before they ship software into production. The most common approach to avoid those errors is to use testing, which is inefficient: tests are usually written by hand, taking time, and they cover a few executions of a program, but not all of them. The approach I undertook during this internship is to design a static analyzer by abstract interpretation for Python. Static analyzers are programs that automatically analyze an input program and report errors this input program may contain (given a certain class of errors the static analyzer may detect). In particular, if a static analyzer is sound and reports no error on a given input, we know that this program does not contain any error from the class the static analyzer is able to discover. Abstract interpretation is a theory formalizing links between a precise but costly semantics with some computable, approximated counterpart, thus guiding the design and implementation of sound static analyzers. State of the art static analyzers include Julia (analyzing Java), Astrée and Sparrow (for C software). Those are only analyzing statically typed languages. There are no mature static analyzers available for dynamic languages such as JavaScript and Python, although a few static analyses have already been developed and implemented. During this internship, I developed a static analysis of Python programs collecting the types of each variable, and possible type error exceptions. Python is a popular programming language, especially used in teaching and in the scientific community, well-known for its powerful syntax. Major software projects written in Python include the Django web framework and the SageMath computer algebra system. Python is an object-oriented dynamic language, where every value is an object. Python's dynamism means that undeclared variables, type incompatibilities, \dots\, are exceptions detected at runtime.
Type de document :
Rapport
[Intership report] LIP6 - Laboratoire d'Informatique de Paris 6. 2018
Liste complète des métadonnées

https://hal.archives-ouvertes.fr/hal-01869049
Contributeur : Raphaël Monat <>
Soumis le : jeudi 6 septembre 2018 - 11:04:11
Dernière modification le : samedi 16 mars 2019 - 02:01:50
Document(s) archivé(s) le : vendredi 7 décembre 2018 - 14:30:42

Fichier

monat.pdf
Fichiers produits par l'(les) auteur(s)

Identifiants

  • HAL Id : hal-01869049, version 1

Citation

Raphaël Monat. Static Analysis by Abstract Interpretation Collecting Types of Python Programs. [Intership report] LIP6 - Laboratoire d'Informatique de Paris 6. 2018. 〈hal-01869049〉

Partager

Métriques

Consultations de la notice

95

Téléchargements de fichiers

56