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

Re: Nondeterminism (was: Formal semantics for C)



On 25-Dec-2001, Viktor Kuncak <vkuncak@mit.edu> wrote:
> It also seems to me that nondeterminism allows us to use
> languages with side effects without fixing an evaluation
> model.  I have impression that functional languages try to
> avoid such nondeterminism.  Is this because it is general
> hard to reason about such semantics?

Yes.

> Having nondeterminism is nice because it gives us more flexibility in
> program refinement.

Yes.  It's a trade-off.  More nondeterminism gives the compiler more
freedom to optimize the program, but can make it harder for programmers
to reason about their code.

Different languages allow differing amounts of nondeterminism,
depending on how the language designers weighed up this trade-off.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.