[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Process Placement in Occam 2.1



Kai,

On 11/03/2006 14:24, Koehne Kai wrote:
I have a specific question concerning the Occam 2.1 standard. The question is if this is legal occam: SEQ
  PROCESSOR 1              -- PROCESSOR outside PLACED PAR!!
    SKIP
  SKIP

My belief is that it is not; it doesn't really make sense. The compiler would have to invent a baton-passing event (which you could yourself, of course, to achieve the effect), and that is contrary to the WYSIWIG philosophy of occam. The configuration language for deploying occam programs was a bit of a bolt-on; PLACED PAR is the only component that intrudes into the language proper.

The BNF grammar that is part of the standard allows it:
parallel = ...
                | placedpar
placedpar = PLACED PAR
                    { placedbar }
                | PLACED PAR replicator
                    placedpar
                | PROCESSOR expression
                    process
process = ...
                | parallel
                | ...

That just looks like laziness in drawing up the grammar, avoiding repeating the constructor forms in both "outer" and "nested" context. I don't have a copy to hand; does it treat the productions for IF and ALT differently?

Best,
--
M