Using aps2scala collection attributes (as opposed to collection globals) are not scheduled correctly:
with "tiny";
module TINY_COLL[T :: var TINY[]] extends T
begin
type Integers := SET[Integer];
collection attribute Wood.sum : Integer :> 0, (+);
pragma synthesized(sum);
match ?l=leaf(?x) begin
l.sum :> x;
end;
match ?b=branch(?x,?y) begin
b.sum :> x.sum;
b.sum :> y.sum;
end;
match ?p=root(?b) begin
end;
end;
Not only is only one of the collection assignments activated (as can be seen below), but the generated code uses "set/assign" rather than something that collects multiple values.
Furthermore, even collection globals are not statically scheduled correctly if there are multiple collection assignments (e.g. from test-coll.aps):
match ?l=leaf(?x) begin
sum :> x;
leaves :> {x};
+ sum :> 10;
end;
NB: dynamic scheduling works correctly in both cases.
Using
aps2scalacollection attributes (as opposed to collection globals) are not scheduled correctly:Not only is only one of the collection assignments activated (as can be seen below), but the generated code uses "set/assign" rather than something that collects multiple values.
Furthermore, even collection globals are not statically scheduled correctly if there are multiple collection assignments (e.g. from test-coll.aps):
NB: dynamic scheduling works correctly in both cases.