Open cabelshrestha opened 7 years ago
I guess the ball's in your court on this one too?
have added and pushed code that syntactically accepts it - but there is no checking and it is not yet added to the parse tree.
This is now in the AST - the AltStat has init(), expr(), and incr() just like the for statement as well as a predicate isReplicated() that returns true if it is a replicated alt. The syntax is:
[pri] alt [(init ; expr; incr)] {
}
What is a replicated ALT?
So, in occam:
is the same as:
there are two problems:
how does this work at runtime? can it work like we do with the replicate par: at runtime we just build the alt object by running the loop (what happened if it never terminates?)
so something like:
problem, as usual is that what can appear between ( and ) is VERY general.
here is version of dining philosophers code that should not deadlock after replicated ALT is added: phil2.pj.txt
matt