Starkiller: A Static Type Inferencer and Compiler for Python

Starkiller is a type inferencer and compiler for the dynamic language Python designed to generate fast native code. It analyzes Python source programs and converts them into equivalent C++ programs. Starkiller’s type inference algorithm is based on the Cartesian Product Algorithm but has been significantly modified to support a radically different language. It includes an External Type Description Language that enables extension authors to document how their foreign code extensions interact with Python. This enables Starkiller to analyze Python code that interacts with foreign code written in C, C++, or Fortran. The type inference algorithm also handles data polymorphism in addition to parametric polymorphism, thus improving precision. Starkiller supports the entire Python language except for dynamic code insertion features such as eval and dynamic module loading. While the system is not yet complete, early numeric benchmarks show that Starkiller compiled code performs almost as well as hand made C code and substantially better than alternative Python compilers. Thesis Supervisor: Jonathan Bachrach Title: Research Scientist

[1]  Kent L. Beck,et al.  Extreme programming explained - embrace change , 1990 .

[2]  Priti Shankar,et al.  The Compiler Design Handbook: Optimizations and Machine Code Generation , 2002, The Compiler Design Handbook.

[3]  Xavier Leroy,et al.  The effectiveness of type-based unboxing , 1997 .

[4]  Ralph E. Griswold,et al.  The Icon programming language , 1983 .

[5]  Fred P. Brooks,et al.  The Mythical Man-Month , 1975, Reliable Software.

[6]  Lutz Prechelt,et al.  An Empirical Comparison of Seven Programming Languages , 2000, Computer.

[7]  Jonathan Bachrach Partial Dispatch : Optimizing Dynamically-Dispatched Multimethod Calls with Compile-Time Types and Runtime Feedback , 1999 .

[8]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[9]  Clemens A. Szyperski,et al.  Iteration abstraction in Sather , 1996, TOPL.

[10]  John Aycock Converting Python Virtual Machine Code to C , 1998 .

[11]  Tom DeMarco,et al.  Peopleware: Productive Projects and Teams , 1987 .

[12]  Luca Cardelli,et al.  Basic Polymorphic Typechecking , 1987, Sci. Comput. Program..

[13]  Songtao Xia,et al.  Towards array bound check elimination in Java TM virtual machine language , 1999, CASCON.

[14]  Olin Shivers,et al.  The semantics of Scheme control-flow analysis , 1991, PEPM '91.

[15]  Olivier Zendra,et al.  Efficient dynamic dispatch without virtual function tables: the SmallEiffel compiler , 1997, OOPSLA '97.

[16]  Ole Agesen,et al.  Concrete type inference: delivering object-oriented applications , 1995 .

[17]  Eric Kidd,et al.  Efficient Compression of Generic Function Dispatch Tables , 2001 .

[18]  Andrew Shalit,et al.  The Dylan Reference Manual: The Definitive Guide to the New Object-Oriented Dynamic Language , 1996 .

[19]  Bruce Sterling,et al.  The Hacker Crackdown: Law and Disorder on the Electronic Frontier , 1992 .

[20]  David Gay,et al.  Fast Escape Analysis and Stack Allocation for Object-Based Programs , 2000, CC.

[21]  Peter Thiemann,et al.  Unboxed values and polymorphic typing revisited , 1995, FPCA '95.

[22]  Michael Wolfe,et al.  Elimination of redundant array subscript range checks , 1995, PLDI '95.

[23]  Hans-Juergen Boehm,et al.  Garbage collection in an uncooperative environment , 1988, Softw. Pract. Exp..

[24]  Rajiv Gupta,et al.  Optimizing array bound checks using flow analysis , 1993, LOPL.

[25]  Armin Rigo,et al.  Representation-based just-in-time specialization and the psyco prototype for python , 2004, PEPM '04.

[26]  장훈,et al.  [서평]「Computer Organization and Design, The Hardware/Software Interface」 , 1997 .

[27]  Jean Goubault-Larrecq,et al.  Generalized Boxings, Congruences and Partial Inlining , 1994, SAS.

[28]  R. D. Valentine,et al.  The Intel Pentium M processor: Microarchitecture and performance , 2003 .

[29]  Jong-Deok Choi,et al.  Escape analysis for Java , 1999, OOPSLA '99.

[30]  Herbert Klaeren,et al.  Eliminating range checks using static single assignment form , 1996 .

[31]  K. Beck,et al.  Extreme Programming Explained , 2002 .

[32]  Donald J. Patterson,et al.  Computer organization and design: the hardware-software interface (appendix a , 1993 .

[33]  Jim Hugunin Python and Java: The Best of Both Worlds , 1997 .

[34]  Daniel G. Bobrow,et al.  Common Lisp Object System Specification X2JI3 Document 88-002R , 1988 .