JuliaDynamics / ResumableFunctions.jl

C# style generators a.k.a. semi-coroutines for Julia.
Other
156 stars 18 forks source link

Use JuliaLowering.jl for a cleaner way to transform resumable functions to finite state machines [$1600] #99

Open Krastanov opened 1 month ago

Krastanov commented 1 month ago

This software transform annotated julia functions into finite state machines that can be paused and re-entered. The issue tracker has many reports of edge cases related to unsupported syntax or bugs due to loss of scope information. PR #92 even attempts to fix some of these issues, but it is too limited and ad-hoc.

JuliaLowering.jl is itself only experimental these days, but it should have enough capabilities for solving most of the issues depicted here.

To claim this bounty, "simply" fix all these issues ;) (or fix many or the related issues)

Required skills: Deep understanding of Julia macros, syntax, and lowering.

Reviewer: Stefan Krastanov

Duration: 3 months

Payout procedure:

The Funding for these bounties comes from the National Science Foundation and from the NSF Center for Quantum Networks. The payouts are managed by the NumFOCUS foundation and processed in bulk once every two months. If you live in a country in which NumFOCUS can make payments, you can participate in this bounty program.

Click here for more details about the bug bounty program.

Bug bounty logistic details (click to expand) To claim exclusive time to work on this bounty either post a comment here or message [skrastanov@umass.edu](mailto:skrastanov@umass.edu) with: - your name - github username - **(optional)** a brief list of previous pertinent projects you have engaged in Currently the project is claimed by `no one` until `...`. If you want to, you can work on this project without making a claim, however claims are encouraged to give you and other contributors peace of mind. Whoever has made a claim takes precedence when solutions are considered. You can always propose your own funded project, if you would like to contribute something of value that is not yet covered by an official bounty.
thofma commented 1 month ago

Since JuliaLowering.jl is not registered, I wonder how you envisioned a solution using JuliaLowering.jl?

Krastanov commented 1 month ago

Yeah, if this gets completed, it will not be merged for a while (especially given that there is not even a stability guarantee from the nonpublished JuliaLowering).

As long as there is a branch on which a test runner that uses Pkg.add("https://github.com/c42f/JuliaLowering.jl#some_commit_sha") succeeds (and all of the bugs related to the current ad-hoc way of creating state machines are squashed) this would be counted as a completed bounty.

It would be lovely if the bounty winner comes around to help in actually merging this in a couple of years (when JuliaLowering is actually out), but that would not be a requirement.

Krastanov commented 1 month ago

Also, FYI, I have not explored JuliaLowering much by myself. I know it already has most of the necessary features, but I have not checked for what is missing. It is possible that JuliaLowering itself will need additional work for this bounty to be done.

Krastanov commented 1 month ago

This JuliaLowering issue describes most of the necessary steps though: https://github.com/c42f/JuliaLowering.jl/issues/2