You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is closely related to #190. Since this issue grew to be quite extensive, I figured it would be best to break certain aspects down into a separate issue.
So while discussing the issue in #190 we often said that there is no use-case for referencing individual ports and that we should always connect entire banks and/or multi ports. However, as it turns out there is at least one use-case... meet the All-Pairs Shortest Path (APSP) benchmark from the Savina suite. The benchmark essentially consists of a grid of workers, where each worker solves a part of the problem and sends updates to its neighbors. A grid of 4x4 workers looks like this:
where each of the rectangle represents a worker actor/reactor and each worker is connected to its neighbors.
So how can such a grid be build in Lingua Franca elegantly? Of course, all the workers can be placed in a bank, but then there is no way to draw individual connections. Even if there would be such a mechanism, listing all the connections explicitly is not a real solution.
In order to solve this issues properly, I think we would need an expressive syntax in LF. But I don't think that's the way to go, as we will only get more problems (similar to the parameterized widths). Maybe it is a good alternative to use the expressiveness of our target languages instead. We could expose the connection mechanism in a callable function and allow drawing of connection in a startup mutation. Saroush also proposed, that the target code could generate an adjacency matrix, that then is respected while creating reactions.
The text was updated successfully, but these errors were encountered:
Yes, this could be another higher-order pattern similar to the ScatterGather example. It could be realized today in a manner similar to ScatterGather, but a better approach would be to first abstract what ScatterGather does into an API. Today, ScatterGather reaches directly into the guts of the C implementation.
Yes, a higher level function could help to solve this. It just should be general enough so that various connection patterns and not just a plain grid can be created. I am not sure how this could be achieved. I think you are right, and we should take small steps and find a general solution for ScatterGather first.
Closing this. #406 proves that our current connection syntax is sufficient for covering all benchmarks from the Savina suite that do not support mutations.
This issue is closely related to #190. Since this issue grew to be quite extensive, I figured it would be best to break certain aspects down into a separate issue.
So while discussing the issue in #190 we often said that there is no use-case for referencing individual ports and that we should always connect entire banks and/or multi ports. However, as it turns out there is at least one use-case... meet the All-Pairs Shortest Path (APSP) benchmark from the Savina suite. The benchmark essentially consists of a grid of workers, where each worker solves a part of the problem and sends updates to its neighbors. A grid of 4x4 workers looks like this:
![rect834](https://user-images.githubusercontent.com/6460123/92093725-f440ef00-edd3-11ea-9201-3773f3ded328.png)
where each of the rectangle represents a worker actor/reactor and each worker is connected to its neighbors.
So how can such a grid be build in Lingua Franca elegantly? Of course, all the workers can be placed in a bank, but then there is no way to draw individual connections. Even if there would be such a mechanism, listing all the connections explicitly is not a real solution.
In order to solve this issues properly, I think we would need an expressive syntax in LF. But I don't think that's the way to go, as we will only get more problems (similar to the parameterized widths). Maybe it is a good alternative to use the expressiveness of our target languages instead. We could expose the connection mechanism in a callable function and allow drawing of connection in a startup mutation. Saroush also proposed, that the target code could generate an adjacency matrix, that then is respected while creating reactions.
The text was updated successfully, but these errors were encountered: