RUS  ENG
Full version
JOURNALS // Vestnik of Astrakhan State Technical University. Series: Management, Computer Sciences and Informatics // Archive

Vestn. Astrakhan State Technical Univ. Ser. Management, Computer Sciences and Informatics, 2013 Number 2, Pages 66–74 (Mi vagtu273)

COMPUTER SOFTWARE AND COMPUTING EQUIPMENT

Extraction of data types in dynamic programming languages for static analysis with universal class representation

M. V. Zubov, A. N. Pustygin, E. V. Startsev

Chelyabinsk State University

Abstract: The approach, which allows extraction of information about types of class fields for object-oriented programming languages with dynamic typing, is introduced. Python is selected as a target language. Such languages doesn't provide this information, but it helps to improve universal class-level intermediate representation of the source code. Using the data on the types the more effective analysis can be made, for example, it makes possible to create aggregation relationships on the class diagram. To get types of fields the “duck typing” approach is offered; it is used in Python during the runtime. The mathematical model is created to verify this approach and to describe typing algorithm. This model doesn't limit the certain algorithm in searching the field “candidates”. The dynamic analysis based method is introduced for testing the main approach efficiency. The realized algorithm together with the method has been verified with the leading large open-source Python projects.

Keywords: static analysis, dynamic typing, dynamic analysis, object-oriented programming, Python.

UDC: 004.41
BBK: 32.973.26-018.2

Received: 03.04.2013



© Steklov Math. Inst. of RAS, 2024