Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for channels in Goose translator #63

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lredlin
Copy link
Collaborator

@lredlin lredlin commented Feb 23, 2025

This adds support to the translator for channels by converting channel code directly to the translated channel model. I still need to add range for loops, select statements and the import statement for the channel model but this should give basic support.

This requires mit-pdos/perennial#185 for translated Gooselang code to compile.

@lredlin lredlin force-pushed the channel_translation branch 4 times, most recently from 302ad0b to 8a60589 Compare March 2, 2025 00:03
lredlin added 2 commits March 1, 2025 19:34
To make this work, I had to split the current prelude.v into "base_prelude" and "translated_prelude", where "base_prelude" will contain the current prelude and "translated_prelude" will include the channel model as well as any future features that are modeled as goose compatible go code.
This is compiling in perennial and wasn't too difficult but the range for loop and select statement logic will be more of a challenge to get to work.

Things still to be done for this:
1. Range for loops
2. Select statements
3. Automatically add import for the channel model .v file if a channel is in a file
@lredlin lredlin force-pushed the channel_translation branch from 8a60589 to 57fccf0 Compare March 2, 2025 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant