Newsgroups: comp.sys.transputer
From: des@pact.srf.ac.uk (David Shepherd)
Subject: Re: OCCAM3 (was :- Revision of occam 2 Reference Manual)
Organization: University of Bristol, England
Date: Mon, 15 Aug 1994 12:29:57 GMT
Message-ID: <CuKtDx.J59@info.bris.ac.uk>

Bryan Carpenter (dbc@ecs.soton.ac.uk) wrote:
: In <JBS.94Aug13134411@client41.comlab> jbs@client41.comlab (Bryan Scattergood) writes:
: >I've always thought that the reason for this was fairly simple: functions
: >should be deterministic.  If you allow PAR inside a function (or indeed
: >any VALOF) then it may not be deterministic any more and lots of the
: >nice rewrite rules for occam stop working.

: Well, I can write a deterministic function involving PAR (easily), and
: I can also do lots of stupid things without using PAR (even more
: easily).  In practise I can even make a non-deterministic function
: without using PAR, by reading an uninitialised variable.

: Which rewrite rules stop working, out of interest?

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.

--
David Shepherd,  INMOS ltd, 1000 Aztec West, Almondsbury, Bristol BS12 4SQ
email:	des@inmos.co.uk
tel:	+44 (0)454 611 638
[n.b. this message from account at SRF/PACT - please email to inmos.co.uk]

