Skip to content

Add RFun support#4

Draft
Leridon wants to merge 20 commits into
masterfrom
rfun
Draft

Add RFun support#4
Leridon wants to merge 20 commits into
masterfrom
rfun

Conversation

@Leridon

@Leridon Leridon commented Jun 26, 2026

Copy link
Copy Markdown
Owner

This pull request adds support for the reversible RFun language by Michael K. Thomsen (and collaborators).

Why?

Even though RFun and HSSA are superficially wildly different languages, they share many basic concepts that are inherent to reversible computing. Implementing a Translator illustrates these common concepts.

Completed Features

  • Parsing of RFun programs with rfun.parse
  • Translating RFun programs to HSSA with rfun.translate

Open Points

  • This branch also contains significant internal changes to the CLI, which are not yet fully backwards compatible with the master branch.
  • No automated testing of RFun has been integrated into the test suite yet.
  • RFun programs are not typechecked and ill-typed programs either fail during code generation or at runtime.
  • The current implementation produces a gigantic amount of code, which is mostly due to the code generator sticking to a simple translation scheme to keep interfaces consistent, even when shortcuts could be taken. With targeted inlining, constant propagation, and control flow simplification, I estimate that the amount of code can be reduced by 80% or even more.

@Leridon Leridon added the feature New feature label Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant