Newsgroups: comp.sys.transputer
From: dbc@ecs.soton.ac.uk (Bryan Carpenter)
Subject: Re: OCCAM3 (was :- Revision of occam 2 Reference Manual)
Organization: Electronics and Computer Science, University of Southampton
Date: 15 Aug 94 15:53:24 GMT
Message-ID: <dbc.776966004@caesar>

In <CuKtDx.J59@info.bris.ac.uk> des@pact.srf.ac.uk (David Shepherd) writes:

>[...]

>Something like

>	(exp = exp) ---> TRUE

>is no longer valid as the expression could be non-deterministic.

>N.b., this rule was already "flawed" when the purity of occam-1
>was diluted by the introduction of errors in evaluations in occam-2
>as the process

>	IF
>	  (exp = exp)
>	    P

>can behave as P or STOP depending on whether the evaluation of
>exp produces an error. Also with functions it can behave as 
>ZERO (? right name for WHILE TRUE SKIP ?) if exp comes from
>a non terminating function evaluation.

I don't know about occam transformation rules.  But in the CSP book
(p189) Hoare has a ``definedeness'' predicate on expressions.  If an
expression is undefined, a conditional or assignment process involving
it is identified with CHAOS.

He only gives one example of an undefined expression (divide by zero).
But it seems obvious to treat the result of any function which fails to
return as being undefined in this sense.  I suppose you can do the same
for a call to a function which *does* return, but with a non-deterministic
result.

So, if you need this idea of a bad expression anyway, and if *any* bad
expression turns a process that uses it into CHAOS, it doesn't seem to
matter much what went on inside the function---whether it was a
sequential bad process or a concurrent bad processes.

>[...]

Bryan


