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

Introduce syntax for specifying max number of pending events on delayed connections and actions #163

Open
erlingrj opened this issue Dec 11, 2024 · 3 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@erlingrj
Copy link
Collaborator

erlingrj commented Dec 11, 2024

In reactor-uc we statically allocate all events which means that there is a bound on the number of outstanding events that can be buffered for each action and eached delayed/physical connection.

We need a syntax for specifying these bounds.

Proposal 1 for Actions: Change LF syntax

reactor R {
  logical action a(0, 10 msec, defer, 15) // We add it as an LF argument together with a policy
}

Proposal 2 for Actions: Use annotation

reactor R {
  @num_events=15
   logical action a(0, 10 msec)

  @buffer=15
   logical action a(0, 10 msec)
   
   @max_pending_events=15
   logical action a(0, 10 msec)
}

Proposals 3 for connections: Change LF syntax

src.out -> sink.in after 100 msec buffer 15
src.out -> sink.in after 100 msec pending 15
src.out -> sink.in after 100 msec allocate 15

Proposals 4 for connections: Use annotations

@num_events=15
src.out -> sink.in after 100 msec

@buffer=15
src.out -> sink.in after 100 msec

@max_pending_events=15
src.out -> sink.in after 100 msec

@erlingrj erlingrj added question Further information is requested help wanted Extra attention is needed labels Dec 11, 2024
@erlingrj
Copy link
Collaborator Author

@tanneberger what do you think?

@edwardalee
Copy link
Collaborator

Without a strong preference, I like:

   @max_pending_events=15
   logical action a(0, 10 msec)

and

@buffer=15
src.out -> sink.in after 100 msec

@erlingrj
Copy link
Collaborator Author

Thanks, I also realize that we need a "policy" for buffer overflows, either we "drop" the event, or we "replace" an existing. We might also need to specify which event to replace, I think either you want to replace to earliest event, the last event, or the event with the closest tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants