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

DSL interface for high-level modules and BCB implementation #102

Merged
merged 9 commits into from
Jun 27, 2022

Commits on Jun 27, 2022

  1. Implement DSL modules

    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.
    xosmig committed Jun 27, 2022
    Configuration menu
    Copy the full SHA
    88a31c8 View commit details
    Browse the repository at this point in the history
  2. Replace UponEvent with RegisterEventHandler in DSL modules

    The new interface is less user-friendly, but more type-safe.
    xosmig committed Jun 27, 2022
    Configuration menu
    Copy the full SHA
    ee176d5 View commit details
    Browse the repository at this point in the history
  3. Add unit tests for dslmodule

    xosmig committed Jun 27, 2022
    Configuration menu
    Copy the full SHA
    28ee2e1 View commit details
    Browse the repository at this point in the history
  4. Cosmetic fixes

    xosmig committed Jun 27, 2022
    Configuration menu
    Copy the full SHA
    79b988d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e9dd607 View commit details
    Browse the repository at this point in the history
  6. Pass context by reference

    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.
    xosmig committed Jun 27, 2022
    Configuration menu
    Copy the full SHA
    555b6de View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3c67c31 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    32720cb View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    fe11b42 View commit details
    Browse the repository at this point in the history