Files
@ a3c92705eeee
Branch filter:
Location: CSY/reowolf/testdata/parser/positive/18.pdl - annotation
a3c92705eeee
559 B
text/plain
bugfix: native component branch forks that clash are MERGED rather than overwritten. Avoids race condition where (1) branch x ends and submits a solution, (2) branch y is created, has same predicate as x and overwrites it, but has a subset of its messages, (3) round ends in success but branch x is gone, so no suitable native branch is found
1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 | #version 100
import std.reo;
composite main() {}
primitive main1(in a, out c) {
int x = 0;
int y = 0;
msg z = null;
msg w = null;
x = 1;
y = 1;
while (true) {
synchronous {
if (x > 0 && fires(a)) {
z = get(a);
x--;
}
if (w != null && fires(c)) {
put(c, w);
w = null;
y++;
}
}
synchronous {
assert !fires(a) && !fires(c);
if (z != null && y > 0) {
w = z;
z = null;
y--;
x++;
}
}
}
}
composite main2(in a, out c) {
channel xo -> xi;
new fifo(a, xo, null);
new fifo(xi, c, null);
}
|