[mercury-users] Request for comments on this code

Ralph Becket rafe at csse.unimelb.edu.au
Thu Jul 13 10:52:31 AEST 2006


Peter Schachte, Thursday, 13 July 2006:
> On Wed, Jul 12, 2006 at 02:50:56PM +1000, Ralph Becket wrote:
> > by labelling IO
> > operations as det we are quietly assuming a deterministic universe,
> > whereas I believe it has been proved that the universe is fundamentally
> > probabilistic.
> 
> I always thought of the determinism of a predicate as describing
> *that* predicate's behavior.  So
> 
> 	write("Hello World!", !IO)
> 
> being det should just mean that write/3 behaves deterministically, it
> shouldn't have to promise anything about the universe, any more than
> it should have to promise that you won't run out of memory or suffer a
> power failure while executing it.  It really should just describe the
> success set of the predicate given the mode.

Agreed.  My point is that in a non-deterministic universe, write("Hello,
World!") is not a function from IO states to IO states.

> The only model I know that really has a chance of working is to think
> of an IO state pair as difference list of messages we send to the
> universe.  So main/2 simply describes the IO commands the program
> executes while it's running; nothing more.  This doesn't require us to
> say anything about what the universe actually does with those
> messages.  Interestingly, it's also much closer to the Haskell view.

Yes, I agree completely.
--------------------------------------------------------------------------
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