مقاله‌ی دسترسی آزاد

Type inference for Python programming language

دانلود متن کاملرایگان، با حساب کاربری؛ ثبت نام با گوگل چند ثانیه است

چکیده(به انگلیسی؛ چکیده‌ی فارسی در دسترس نیست)

The article presents type inference for programs written in Python programming language. At first, type inference algorithms for parametric polymorphism that were described in the scientific literature are reviewed. The algorithms evolved from “basic” algorithm (also known as Palsberg — Schwartzbach algorithm) to Cartesian product algorithm (CPA). It was shown that CPA is both precise and efficient, however it has to be modified to be used on Python code. Afterwards, we present a new algorithm (a modification of CPA) for Python. It is shown how type inference module using the new algorithm analyses various Python language structures: constants (literals), basic Python collections, variable names, assignments, function and class definitions, attribute and index expressions. It is also shown how the algorithm deals with external (non-Python) functions using special annotations that specify output types depending on input types of the function. Afterwards, the results of work on the prototype (module that implements described type inference algorithm) are presented. The paper is concluded by an overview of possible future work directions such as generating a defect trace, i.e. description that specifies how expression got its incorrect types.

اسناد مشابه

  • Type Inference for Programming Languages: A Constraint Logic Programming Approach

    سند علمی۲۰۰۴Sandra Alves, Mário Florido

    In this paper we present an application of Constraint Logic Programming to the design and implementation of type inference algorithms for programming languages. We present implementations in Prolog and Constraint Handling Rules (CHR) of several algorithms which belong to the stat

  • Usage of the Python Programming Language in the CMS Experiment

    سند علمی۲۰۰۹R. Wilkinson, B. Hegner

    Being a highly dynamic language and allowing reliable programming with quick turnarounds, Python is a widely used programming language in CMS. Most of the tools used in workflow management and the GRID interface tools are written in this language. Also most of the tools used in t

  • Usage of the Python programming language in the CMS experiment

    مقاله‌ی دسترسی آزاد۲۰۱۰Journal of Physics: Conference SeriesRWilkinson, BHegner, C DJones

    Being a highly dynamic language and allowing reliable programming with quick turnarounds, Python is a widely used programming language in CMS. Most of the tools used in workflow management and the GRID interface tools are written in this language. Also most of the tools used in t

  • The Python programming language as an alternative tool for solving tasks of the Unified State Exam in informatics

    مقاله‌ی دسترسی آزاد۲۰۲۳??????????? ? ?????['V. K. Markelov', 'O. A. Zavyalova', '']

    Programming is the basis of the content line "Algorithms and programming", which is studied throughout the entire school course of informatics, therefore programming tasks are one of the thematic blocks of the Unified State Exam (USE) in informatics. In particular, one of the edu

  • A Tested Semantics for the Python Programming Language

    سند علمی۲۰۱۳Joe Gibbs Politz, Alejandro Martinez, Matthew Milano, Daniel Patterson

    We present a small-step operational semantics for the Python programming language. We present both a core language for Python, suitable for tools and proofs, and a translation process for converting Python source to this core. We have tested the composition of translation and eva

  • On the performance of the Python programming language for serial and parallel scientific computations

    سند علمی۲۰۰۵Scientific ProgrammingXing Cai, Hans Petter Langtangen, Halvard Moe

    This article addresses the performance of scientific applications that use the Python programming language. First, we investigate several techniques for improving the computational efficiency of serial Python codes. Then, we discuss the basic programming techniques in Python for