Relational Representation of Python Abstract Syntax Trees

Graduate Thesis uoadl:2884402 270 Read counter

Unit:
Department of Informatics and Telecommunications
Πληροφορική
Deposit date:
2019-10-31
Year:
2019
Author:
KARYSTINOS AVGERANTONIS NIKOLAOS
Supervisors info:
Σμαραγδάκης Γιάννης, Καθηγητής, Τμήμα Πληροφορικής και Τηλεπικοινωνιών, Εθνικό και Καποδιστριακό Πανεπιστήμιο Αθηνών
Original Title:
Relational Representation of Python Abstract Syntax Trees
Languages:
English
Greek
Translated title:
Relational Representation of Python Abstract Syntax Trees
Summary:
The Python programming language enjoys wide use in many areas such as data science, web development, machine learning, etc. This makes Python an attractive target for various static analyses that aim to optimize the program or, more importantly, discover errors and security flaws. Overall, static analysis of industry-level programs written in almost any language is deemed necessary as a means of improving and maintaining the quality of increasingly sophisticated and complex software.

Fact generation is the representation of a program as a database of facts, according to a pre-defined schema (relational representation). It is an important first step to many static analyses, especially in declarative form, such as those supported by the Doop static analysis framework, which utilizes the Datalog language and a fact database to perform its analyses. The database, after its creation, allows the specification of a static program analysis as a set of (possibly recursive) queries.

In this thesis, we provide a means of transforming the AST of a Python program into an equivalent set of fact files that constitute a fact database. This provides a foundation framework, on which more complex fact generation or transformation logic can be developed. The work presented, hopefully provides a basis on which various static analyses or program transformations could be constructed for Python programs, at the AST level.
Main subject category:
Technology - Computer science
Keywords:
static program analysis, program transformation, Doop framework, Python, abstract syntax trees, fact generation
Index:
Yes
Number of index pages:
5
Contains images:
Yes
Number of references:
8
Number of pages:
43
Thesis.pdf (400 KB) Open in new window