Automatically Generating an Abstract Interpretation-Based Optimizer from a DSL (SPLASH SRC Practice)

Abstract

Just-in-Time (JIT) compilers can gain information at run time that are not available to Ahead-of-Time (AOT) compilers. As such, abstract interpretation baseline JIT compilers are common in many dynamic language implementations. Yet the reference implementation of Python — CPython, has largely avoided implementing a baseline JIT compiler, likely due to the prohibitive maintenance costs associated with one. This paper implements an abstract-interpretation based optimizer for CPython bytecode that is easy to maintain and less error-prone by automatically generating the optimizer from a pre-existing Domain Specific Language (DSL) — reusing the same DSL used to specify the interpreter. The key insight presented in this paper is that the very same DSL used to generate a concrete interpreter can also generate an abstract interpreter, providing multiple benefits such as being less error-prone and greater extensibility. The proposed abstract interpreter has been accepted into CPython 3.13 and forms a part of its experimental JIT compiler.

Date
Oct 8, 2024 3:00 PM — 4:00 PM
Event
Weekly Talk
Location
COM3-02-59 - Meeting Rm 20
Ken Jin
Ken Jin
Undergraduate

Working on making CPython faster for his FYP.