Closed ricardobonna closed 6 years ago
@ugeorge: I suggest you let Ricardo demonstrate the SADF library and the CSDF library for you and then you can hopefully accept the pull request. The next step is then to add routines for automatic testing.
Sure, I'll check it out tomorrow and think of a minimal CI strategy. @ricardobonna, thanks for the great work!
@ricardobonna : could you please explain why the return type of the kernels (and other functions functions) of multiple outputs is list of tuple of list? The first list seems redundant, am I wrong?
For example, please explain the type signature of kernel12SADF? Or for that matter the signature of the output decoder function passed to detector11SADF, why does it have to yield [y]
instead of y
?
Based on your own examples, that list seems to be redundant, as it is always a singleton.
That is a fair point, but the answer is that it is a necessary redundancy. The thing is that we are using maps and zipwiths in process constructors that yield more than one output (maps and zipwiths yield only one output). On Monday I can explain better, but for now, I would suggest you take a look at the SDF library actors with more than one output (say, actor12SDF).
And the thing about the detector11SADF yielding [y] instead of y is because the token rate of the kernel's output may be bigger than one. Say in some scenario, my kernel's output token rate is 2, then I need a function that returns [y1, y2]. That's why the list! Again, take a look at the SDF library because everything I did, I tried to mimic the SDF library because It would be better for the ForSyDe community to have everything coded with the same style.
We can discuss it better on Monday.
Hur hur, this does not mean that SDF is perfect :smile: . As @ingo-sander said, you must question everything. Take a look at forsyde-atom's SDF.comb22. That redundancy is certainly not necessary. That reminds me, I should check it out and if confirmed, I need to open an issue regarding the current SDF.
As for the detector yield... do I understand correct that you can yield multiple tokens? Then where is the production rate specified? detector11SDF specifies only a consumption rate, so I assume that the production rate is always 1. If this is not the case please take care of this.
I guess you are right. It would be better if we got rid of these outer square brackets. I'm already taking care of it. Just be aware that we may need to change the SDF library and all the examples in the examples repository. And maybe we should check the untimed MoC as well as the dataflow MoC, as they may have the same issue.
As for the detector yield... I can explain it better on Monday. And if you still think it is going to be an issue, I will come up with a solution. Don't worry!
There are a few aspects here.
Continue the good discussion, which will lead to an even better understanding!
I remember thinking about this when I first implemented Atom, and @ingo-sander , if you remember, I was discussing in particular the role of "unzips" in ForSyDe process networks. I will try to look a bit into it and to refresh my memory, but I cannot promise anything before Monday.
@ricardobonna please check the issue with the production rate of the detectors. You may use wiki page of your own fork or the Slack channel to explain your solution. Support your solution with reference(s) to the SADF paper.
Hej Ingo and George,
I have finished the SADF Library and I'm pretty sure it's working beautifully. Here is the pull request. Let me know if you need something changed before accepting.