Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: 沈胜宇 <syshen@nudt.edu.cn>
To: "Florent Monnier" <monnier.florent@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] equivalent checking of ocaml program?
Date: Mon, 30 Sep 2013 08:26:46 +0800 (GMT+08:00)	[thread overview]
Message-ID: <1d5abd41.7b2.1416c429ca3.Coremail.syshen@nudt.edu.cn> (raw)
In-Reply-To: <CAE1DttDXwTT2C5oPt-daQzoXqXkGNXrLnR=x4GjY5p54BOybfQ@mail.gmail.com>

I dont think approach based on testing is a good solution, although I have used it for a long time.
This appraoch miss many conner case, which leads to error long after modification and cost lots of time in debugging.

For the halting problem, I also dont think it can prevent us from solving equivalent problem. Some undecidable problem, such as termination checking, have been studied by bryon cook for a long time, and it can check termination successfully for many programs. of course, it is not complete, but most program written manually have some fixed pattern, not totally random.

for checking equivalent of ocaml program, most of my modification to my program also have some fixed pattern, for example, using hash table indexing to replace list searching. I think smt can solve it easily. May be I need to solve it by my self?

Shen


> -----原始邮件-----
> 发件人: "Florent Monnier" <monnier.florent@gmail.com>
> 发送时间: 2013-09-30 00:19:29 (星期一)
> 收件人: "沈胜宇" <syshen@nudt.edu.cn>
> 抄送: caml-list@inria.fr
> 主题: Re: [Caml-list] equivalent checking of ocaml program?
> 
> 2013/09/29, Robert Jakob wrote:
> > Well, the typical approach is to write a test suite before refactoring
> > and ensure that the test suite runs without errors before and after the
> > refactoring.
> >
> > To be sure that the program really behaves like before, you need to
> > have a good (whatever this means) test suite.
> 
> It may also be recommanded to keep the simple code next to the optimised one.
> It can be useful for many reasons. For example for the tests (compare
> them), you can also use it as a failsafe alternative if the optimised
> version fails. For the people who will try to read and understand your
> code in the future (one of them might be you).
> 
> -- 
> bp.


  reply	other threads:[~2013-09-30  0:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-29 10:59 沈胜宇
2013-09-29 11:14 ` David Allsopp
2013-09-29 12:26 ` mukesh tiwari
2013-09-29 14:56 ` Robert Jakob
2013-09-29 16:19   ` Florent Monnier
2013-09-30  0:26     ` 沈胜宇 [this message]
2013-09-30 14:53       ` Goswin von Brederlow
2013-09-30 15:49         ` Gabriel Scherer
2013-10-08 13:27           ` Robert Jakob
2013-10-08 15:29             ` Gabriel Scherer

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=1d5abd41.7b2.1416c429ca3.Coremail.syshen@nudt.edu.cn \
    --to=syshen@nudt.edu.cn \
    --cc=caml-list@inria.fr \
    --cc=monnier.florent@gmail.com \
    /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