pyssa: An Executable, Source-Oriented, Stable Intermediate Representation for Python

I have published pyssa on Zenodo:

pyssa is an experiment in designing an intermediate representation for Python that tries to avoid a common tradeoff in Python tooling.

Today, Python analysis and transformation workflows are often pushed toward one of two input formats:

  • Python AST, which preserves source structure well and is relatively stable, but does not directly present executable control flow.
  • Python bytecode, which is executable, but does not preserve source in the way many source-oriented tools want and also inherits implementation details that are not always desirable as the basis for analysis and transformation.

pyssa takes a different path. It lowers Python source into a region-based, explicit control-flow IR that remains close to the source program while also being directly executable.

What the current prototype already does

The current prototype already supports:

  • lowering from Python source;
  • execution through an interpreter; and
  • validation against CPython for a substantial subset of Python.

My goal is to explore whether this kind of IR can become a more stable substrate for future Python program analysis and transformation workflows.

Why I find this direction interesting

For Python tooling, source fidelity and executability are both useful, but they are often available only in separate representations. I am interested in the space between them:

  • something more executable than ASTs,
  • more source-oriented than bytecode,
  • and more stable than representations tied too closely to changing interpreter internals.

That is the design space pyssa is trying to explore.

This Zenodo record archives a concise documentation snapshot of the project. The actively developed prototype remains on GitHub.

Citation

1
2
3
4
5
6
7
8
9
10
11
@misc{wu_2026_19601901,
author = {Wu, Jifeng},
title = {pyssa: An Executable, Source-Oriented, Stable
Intermediate Representation for Python
},
month = apr,
year = 2026,
publisher = {Zenodo},
doi = {10.5281/zenodo.19601901},
url = {https://doi.org/10.5281/zenodo.19601901},
}

pyssa: An Executable, Source-Oriented, Stable Intermediate Representation for Python
https://jifengwu2k.github.io/2026/04/16/pyssa-An-Executable-Source-Oriented-Stable-Intermediate-Representation-for-Python/
Author
Jifeng Wu
Posted on
April 16, 2026
Licensed under