pluto-ecss: A Transpiler and Runtime for PLUTO Procedure Language
The European Space Agency (ESA) uses a domain-specific language called PLUTO (ECSS-E-ST-70-32C) for spacecraft testing and operations. Ground operators write PLUTO procedures to bring up a star tracker, run parallel safety sequences, or react to on-board events. Until now, running those procedures required specialized, often proprietary, tools. Enter pluto-ecss: an open-source transpiler and runtime that converts PLUTO into readable Python, complete with a CLI, live TUI, and browser-based playground.
From GSoC Prototype to Production Tool
pluto-ecss started in 2019 as a Google Summer of Code work product. The original codebase was two .py files with a ~30-line grammar covering five constructs, a tree-walking interpreter tangled into the parser, zero tests, no CLI, and no packaging. It ran exactly one script and NameError'd on anything else. The project sat dormant for nearly seven years.
In 2026, it was revived and finished for the GitHub Finish-Up-A-Thon Challenge. The new version is a proper toolchain:
- Grammar: expanded from ~30 lines to 168 lines
- Tests: from 0 to 164 passing
- Examples: from 1 to 16
- Package LOC: ~600 to ~3,600
- CLI: none →
parse / compile / run / demo / fmt / gen - Runtimes: inline tree walker → threaded + asyncio
- Output formats: side effects only → Python (sync/async/class/no-runtime) + JSON
- Docs: one README → mkdocs site + Pygments lexer
- Playground: none → browser-based (Pyodide)
- ECSS coverage: a handful of constructs → most of Annex A.1 and A.3
How It Works
You write a PLUTO procedure and hand it to pluto-ecss. The tool parses the PLUTO source into a parse tree, then transpiles it to self-contained Python. The generated Python uses a small runtime library for concurrency, activity logging, and event handling.
Example usage:
$ pluto-ecss run examples/01_original.pluto
[ACTIVITY] Switch on Star Tracker2
[ACTIVITY] Switch on Reaction Wheel3 of AOC of Satellite
[ACTIVITY] Switch on Star Tracker1
You can also use the live playground at https://stzifkas.github.io/pluto-ecss/playground/ to compile and run PLUTO entirely in your browser via Pyodide.
Technical Details
The transpiler handles the full ECSS spec for procedures, including:
- Steps and sub-bodies (A.1.7)
- Object property requests (A.3.9.8)
- "In the context of …" clauses (A.3.9.10)
- Reporting data and save context (A.3.9.5/.25)
- Refer by (A.3.9.26/.27)
- Record/array activity arguments (A.3.9.28)
- Continuation tests with all seven actions and A.2.5 defaults (A.3.9.33)
It also provides an everyday language layer: if/case/while/for/repeat, wait until, expressions, and a runtime with concurrency primitives like parallel_until_all, wait_for_event, and watchdogs.
The grammar uses Earley parsing with keyword-priority resolution to handle PLUTO's multi-word identifiers (e.g., Star Tracker2, Reaction Wheel3 of AOC of Satellite). This was a key technical challenge—the old grammar used brittle negative-lookahead patterns that broke on common words.
The TUI Demo
The pluto-ecss demo SCRIPT command lights up a fake satellite as the procedure executes, showing component status and an activity feed:
╭──────────────── Procedure: 05_full_bringup.pluto ────────────────╮
│ EXECUTING │
╰──────────────────────────────────────────────────────────────────╯
🛰 Satellite (AOC subsystem)
Component │ Status
─────────────────────┼─────────────────
Reaction Wheel3 │ ON
Star Tracker1 │ ON
Star Tracker2 │ OFF
📡 Activity feed: ▶ Switch on Reaction Wheel3 … ⚡ Events: declared: boom
Why This Matters
For developers working in aerospace or embedded systems, pluto-ecss opens up spacecraft procedure development to standard Python tooling. You can pip install pluto-ecss and start writing and testing PLUTO procedures without expensive simulators. The generated Python can be integrated into CI/CD pipelines, version-controlled, and reviewed like any other code.
How GitHub Copilot Helped
The developer (stzifkas) credits GitHub Copilot with accelerating several parts of the project:
- Grammar keyword-priority resolution: Copilot helped reason through lexer priorities and surfaced an Earley lexer-priority bug.
- Transpiler's parse-tree walker: Copilot suggested repetitive
_stmt_*emit methods, removing most of the typing. - Runtime concurrency primitives: Copilot drafted boilerplate for threading and asyncio primitives.
However, the architectural decisions—choosing a transpiler over an interpreter, the src/ layout, multiple compile targets, and test design—were all human-led. Copilot's main impact was psychological: it turned fixing old bugs and implementing the spec into "one continuous flow" rather than three separate undertakings.
Getting Started
- Install:
pip install pluto-ecss - Docs: https://stzifkas.github.io/pluto-ecss/
- Repo: https://github.com/stzifkas/pluto-ecss
- Live playground: https://stzifkas.github.io/pluto-ecss/playground/
If you work with spacecraft testing or just enjoy well-crafted DSL transpilers, give pluto-ecss a try. Clone the repo, run the demo, and see how it handles your PLUTO scripts.




