From: Christophe Raffalli <christophe.raffalli@univ-savoie.fr>
To: Diego Olivier Fernandez Pons <Diego.FERNANDEZ_PONS@etu.upmc.fr>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Re: Parameter evaluation order
Date: Fri, 26 Aug 2005 18:48:49 +0200 [thread overview]
Message-ID: <430F47F1.5020302@univ-savoie.fr> (raw)
In-Reply-To: <Pine.A41.4.44.0508261421320.528396-100000@ibm1>
Diego Olivier Fernandez Pons a écrit :
> Bonjour,
>
>
>>why should the evaluation order be specified: this is needed if you
>>want to formally reason about programs ... as far as I know.
>
>
> Could you elaborate more on this ?
>
> I see the evaluation order in Caml more as a compiler optimization
> problem that a semantic one. If I need a specific evaluation order, I
> just sequencialize my program explicitelly.
>
Let us say you want to prove a program using references ...
one possible way is to translate is automatically in a purely functional
program using a state monad ... then you need to specify the evaluation
order to define the translation of
let x = f a_1 ... a_n in
which could approximately be (x' denotes the translation of x) ans s
denotes the states holding the map table assigning values to addresses
let s,a_n = a'_n s in
let s,a_(n-1) = a'_(n-1) s in
..
let s,a_1 = a'_1 s in
let s,x = f' s a_1 ... a_n in
to define this translation, you need to know the evaluation order and it
is not reasonnable to
assume that the program you want to prove if fully sequentialized (and
if you want to force sequentialized program then you should only allow
variables as function arguments in the language definition ;-).
Remark: clearly, a good proof system should not show the monadic
translation and hide it behind the scene ... but such a system for full
ML does not exist yes (as far as I know).
next prev parent reply other threads:[~2005-08-26 16:49 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-19 22:21 "Márk S. Zoltán"
2005-08-20 9:12 ` [Caml-list] " Alain Frisch
2005-08-26 17:53 ` "Márk S. Zoltán"
2005-08-22 16:50 ` Damien Doligez
2005-08-23 7:12 ` skaller
2005-08-23 11:29 ` Damien Doligez
2005-08-23 13:34 ` Igor Pechtchanski
2005-08-23 19:52 ` Damien Doligez
2005-08-24 1:24 ` Hao-yang Wang
2005-08-24 11:33 ` [Caml-list] " Damien Doligez
2005-08-24 14:39 ` Christophe Raffalli
2005-08-24 15:47 ` Berkeley DB Joel Reymont
2005-08-24 16:08 ` [Caml-list] Re: Parameter evaluation order brogoff
2005-08-24 20:05 ` Christophe Raffalli
2005-08-24 20:25 ` brogoff
2005-08-24 20:53 ` Jon Harrop
[not found] ` <430CE193.9000805@univ-savoie.fr>
2005-08-26 9:53 ` Christophe Raffalli
2005-08-26 10:10 ` Jon Harrop
2005-08-26 12:09 ` Christophe Raffalli
2005-08-26 12:26 ` Diego Olivier Fernandez Pons
2005-08-26 16:48 ` Christophe Raffalli [this message]
2005-08-27 15:33 ` Christophe TROESTLER
2005-08-26 12:36 ` Ville-Pertti Keinonen
2005-08-26 14:17 ` Fernando Alegre
2005-08-26 17:00 ` Christophe Raffalli
2005-08-26 22:58 ` skaller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=430F47F1.5020302@univ-savoie.fr \
--to=christophe.raffalli@univ-savoie.fr \
--cc=Diego.FERNANDEZ_PONS@etu.upmc.fr \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox