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

Alter AST to Support Set/Stream Policies And Rule Out Hierarchical EDF Policies #55

Open
KabirSamsi opened this issue Aug 5, 2024 · 0 comments
Assignees

Comments

@KabirSamsi
Copy link
Contributor

KabirSamsi commented Aug 5, 2024

Per our discussion in #51, we should reduce any lack of clarity in popping order with EDFs. Instead, we need to modify our language's AST such that the EDF and FIFO (possibly SJN, discus later) policies interpolate only between leaves, rather than between internal subtrees.

Add an operator Union : clss list -> clss to the DSL, which merges a set classes together.

@KabirSamsi KabirSamsi self-assigned this Aug 5, 2024
KabirSamsi added a commit that referenced this issue Nov 6, 2024
### Background

#55 discusses a need for a modified AST that distinguishes between
**set-to-stream** and **stream-to-stream** policies, and furthermore
distinguishes between **sets** and **streams**. Within that, we discuss
the need for a `Union` operator, which effectively 'merges several
classes into one'. This is critical in the construction of Set-to-Stream
transformers, to allow such polices to arbitrate independent of queue
distinctions.

### Overview

My work on the type system in #63 allowed us to realize that we could
turn typechecking into essentially an abstraction, and have our `set`
and `stream` types inferred at parsing-time itself – that is to say,
with a tweak to the AST and extending it to the parser as well. That's
the first part part of the PR, which entails adding in the `Union`
constructor to the AST, and partitioning it into the `set` and `stream`
types.

### Caveat And Explanation

@polybeandip and I discussed how far we thought this change should
extend. On one hand, modifying `Ast.t` contractually requires us to
modify `Policy.t`. An alternative, though, is to simply establish a
correspondence `Ast.t -> Policy.t`. For simplicity and to preserve the
work done in `control`, we have kept `Policy.t` in its original form,
and adapted that correspondence.

In turn, this required modifying almost all of our programs such that
they would be syntactically correct w.rt. the new AST structure and
parsing mechanisms. In addition, a few extra 'reversions' to allow for
parsed programs to be correctly evaluated in `control`.

---------

Co-authored-by: grp loaner <grploaner@users-MacBook-Air.local>
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

No branches or pull requests

1 participant