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

Self-deadlock



BOOL a, b:
SEQ
  a := FALSE
  b := FALSE
  WHILE TRUE
    ALT
      INT v1:
      a & c1 ? v1
        SKIP
      INT v2:
      b & c2 ? v2
        SKIP

Does KRoC detect this error at compile-time?

SPoC sees it at run-time. It writes "Deadlock, #no stopped processes"
to stderr on return from Scheduler, in main.

Isn't it "required" to handle this by the compiler or at run-time
already when the ALT is set up?

--

By the way: SPoC now is underway to work with Microsoft Visual C++.
VC++ displays the occam sources, it understands "#line" in the
generated C sources. 

-- 
Oyvind
(------------------------------------------------------------------(
)       Oyvind Teig )          oyvind.teig@xxxxxxxxxxxx ) Tel: +47 )
( Navia Maritime AS (          oyvind.teig@xxxxxxxxxxxx ( 73581268 (
)    div. Autronica )                                   ) Fax: +47 )
(    7005 Trondheim (           http://www.autronica.no ( 73919320 (
)            Norway )                                   )          )
(------------------------------------------------------------------(
)                    http://www.autronica.no/pub/tech/rd/index.htm )
(------------------------------------------------------------------(