diff --git a/testdata/parser/positive/15.pdl b/testdata/parser/positive/15.pdl new file mode 100644 index 0000000000000000000000000000000000000000..8c4ceabd007701e0e5089e763fbaa866d7b56e7d --- /dev/null +++ b/testdata/parser/positive/15.pdl @@ -0,0 +1,28 @@ +#version + +import std.reo; + +composite main(out c) { + channel ao -> ai; + channel bo -> bi; + channel axo -> axi; + channel zo -> zi; + new sync(ai, bo); + new replicator(bi, {axo, c}); + new consensus({axi, zi}, ao); + new generator(zo); +} + +primitive generator(out z) { + while (true) { + synchronous (msg x) { + if (x == null) { + put(z, x); + assert !fires(x); + } else { + put(z, x); + assert fires(x); + } + } + } +}