How to Implement Your Own Python DSL

Keynote
Shanghai
2:10 p.m. - 2:50 p.m.
Venue E(Integrated Building, Room 108 Lecture Hall)
  • Yan Lu A slacker who chats during work hours and only works after hours.

    Has worked on management/control systems and AI infrastructure — a do-everything engineer.

    luyan

Abstract

Using a card-game DSL written from scratch as the running example, this talk walks through the whole picture: frontend code capture, IR design and lowering, optimization passes, and backend generation.

Details

Python’s flexible syntax and metaprogramming capabilities make it ideal for hosting domain-specific languages (DSLs): they can dramatically simplify development in a specific domain, and because they are native to Python, they can seamlessly reuse the entire ecosystem. This talk teaches you how to implement a Python DSL. Using a card-game DSL written from scratch as the example, we will walk through the complete pipeline — from frontend code capture, IR design and lowering, to optimization passes and backend generation.