-
Notifications
You must be signed in to change notification settings - Fork 14
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
DSL interface for high-level modules and BCB implementation #102
Merged
Commits on Jun 27, 2022
-
The high-level goal is to make it possible to implement distributed protocols in mir with a syntax that is very close to the standard pseudocode notations as well as to separate the protocol logic from the boilerplate. The way it is done is basically by creating a domain-specific language inside go. The motivating example can be found in pkg/bcb/bcbmodule.go. The core implementation is in pkg/dsl/dslmodule.go. The rest is mostly boilerplate and auxiliary functions.
Configuration menu - View commit details
-
Copy full SHA for 88a31c8 - Browse repository at this point
Copy the full SHA 88a31c8View commit details -
Replace UponEvent with RegisterEventHandler in DSL modules
The new interface is less user-friendly, but more type-safe.
Configuration menu - View commit details
-
Copy full SHA for ee176d5 - Browse repository at this point
Copy the full SHA ee176d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 28ee2e1 - Browse repository at this point
Copy the full SHA 28ee2e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 79b988d - Browse repository at this point
Copy the full SHA 79b988dView commit details -
Configuration menu - View commit details
-
Copy full SHA for e9dd607 - Browse repository at this point
Copy the full SHA e9dd607View commit details -
The goal is to prevent the programmer from making a bug where they pass the context by value when they send a request, but accept it by reference in the handler (or vice versa). This would make the handler not match the response event. This modification does not completely eradicate the issue, but makes it much harder to make such a mistake.
Configuration menu - View commit details
-
Copy full SHA for 555b6de - Browse repository at this point
Copy the full SHA 555b6deView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c67c31 - Browse repository at this point
Copy the full SHA 3c67c31View commit details -
Configuration menu - View commit details
-
Copy full SHA for 32720cb - Browse repository at this point
Copy the full SHA 32720cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for fe11b42 - Browse repository at this point
Copy the full SHA fe11b42View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.