[mercury-users] Request for comments on this code

Peter Schachte schachte at csse.unimelb.edu.au
Mon Jul 10 18:18:48 AEST 2006


On Mon, Jul 10, 2006 at 05:48:02PM +1000, Mark Brown wrote:
> On 10-Jul-2006, Peter Schachte <schachte at csse.unimelb.edu.au> wrote:
> > Being pure should mean the program
> > behaves deterministically, and clock doesn't.
> 
> Sure it does!  It just gets a different IO state as input every time it
> is called, and the output is determined from that.

So the other processes running on the same machine are part of the IO
state?  And the number of CPUs, the state of the caches, the number of
other processes on the same machine?  How about thermal fluctuations
that may cause the CPU to speed up or slow down?  The entire history
of the universe is part of the state of the world?  That seems pretty
ugly to me, semantically.

And anyway you still have the problem that if you consider time as
part of the state of the world, and you make the philosphically
dubious assumption that goals make time pass, then *every* Mercury
predicate can affect the state of the world, and so really should
thread an IO state.

Wouldn't it be a lot easier to just make getting the cpu time impure?

-- 
Peter Schachte              What we are looking at is good and evil, right
schachte at cs.mu.OZ.AU        and wrong. A new world order!
www.cs.mu.oz.au/~schachte/      -- George Bush 
Phone: +61 3 8344 1338      
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at csse.unimelb.edu.au
administrative address: owner-mercury-users at csse.unimelb.edu.au
unsubscribe: Address: mercury-users-request at csse.unimelb.edu.au Message: unsubscribe
subscribe:   Address: mercury-users-request at csse.unimelb.edu.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list