EXTRACTION OF DATA TYPES IN DYNAMIC PROGRAMMING LANGUAGES FOR STATIC ANALYSIS WITH UNIVERSAL CLASS REPRESENTATION
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.