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

Arbitrary sequencing of processes #27

Open
np opened this issue Dec 15, 2015 · 1 comment
Open

Arbitrary sequencing of processes #27

np opened this issue Dec 15, 2015 · 1 comment

Comments

@np
Copy link
Owner

np commented Dec 15, 2015

Notice that this is implemented now. This remains a place holder for discussions around this topic.

Typically right-nested sequencing is preferable since we can clearly scope the newly introduced channels and variables.

However in several we break this rule, for instance fwd and @ can be sequenced and they might expand into a process which cannot be right-nested. Another cause is slice which has a sub-process and should have a sequential continuation. As in this example:

rotate_seq =
  \(A : Type)
   (n : Int)->
   proc(i : [: ?A ^(1 + n) :], o : [: !A ^(n + 1) :])
   i[:iL, iH^n:]
   o[:oL^n, oH:]
   recv iL (xL : A).
   (slice (iH, oL) n as _
      fwd(?A)(iH, oL)).
   send oH xL
@np np added the enhancement label Dec 15, 2015
np added a commit that referenced this issue Dec 15, 2015
@np
Copy link
Owner Author

np commented Dec 15, 2015

The reason I want to keep this in the tracker for a while is that the scopes are not completely satisfactory.

Notice first that (recv c (x : Int)). send d x is accepted.

These are not:

  • @(proc(c) recv c (x : Int))(c). send d x
  • (slice (c) 1 as _ (recv c (x : Int))). send d x

While they both reduce to the example above.

This raises the question of a potential output telescope for processes.

np added a commit that referenced this issue Dec 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant