-- T_ParActionsComm.tex
--
-- This example is to test what happens if we have a communication between two
-- actions inside a basic process.
--
-- JCircus is creating a button for channel c in the gui because it does not
-- recognize that there is a simple synchronisation involving c. The additional 
-- environments that deal with multi-sync only recognize parallelism in the 
-- level of processes.
--
--------------------------------------------------------------------------------

--ADAPTADO AO LATEX DO NOVO PARSER (CZT 1.5.0), MAS SE LIGAR QUE ESSA
ESPECIFICAÇÃO TEVE ALGUMAS COISAS BIZARRAS (como o parêntese antes do circbegin, e tal)

\begin{zed}
  Color ::= blue | red
\end{zed}  

\begin{circus}
    \circchannel c: Color
\end{circus}  

\begin{circus}  
    \circprocess Proc \circdef %(
    \circbegin
\end{circus}

    \begin{circusaction}
        A \circdef c?x \then \Skip
    \end{circusaction}     

    \begin{circusaction}
        B \circdef c!blue \then \Skip
    \end{circusaction}

\begin{circusaction}
     \circspot A \lpar \{ \} 
      | \lchanset c \rchanset 
      %| \lchanset c \rchanset 
      | \{ \} \rpar B
%\circend
%) 
\end{circusaction}

\begin{circus}
\circend
\end{circus}

\begin{circus}
\circprocess ParActionsCommP 
\circdef Proc
\circhide \lchanset c \rchanset
\end{circus}