public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Daniel Berlin <dan@dberlin.org>
To: Gabriel Dos Reis <gdr@codesourcery.com>
Cc: Richard Kenner <kenner@vlsi1.ultra.nyu.edu>, <pcarlini@unitus.it>,
	<gcc@gcc.gnu.org>
Subject: Re: g++ and aliasing bools
Date: Fri, 25 Jan 2002 07:17:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.44.0201250801100.29019-100000@dberlin.org> (raw)
In-Reply-To: <fllmem6gs2.fsf@jambon.cmla.ens-cachan.fr>

On 25 Jan 2002, Gabriel Dos Reis wrote:

> kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes:
> 
> [...]
> 
> | I am very much against the idea of defining a change to be "correct" if
> | it doesn't cause any regression test failures.  You have to be able to make
> | an argument that a change is correct independently and the regression tests
> | serve as a debugger of (among other things) that proof.
> 
> I completely agree with Kenner and Mark.  Given, current ABIs
> supported by g++, aliasing detection is a very subtle issue and we
> should resist from the temptation of not proving that our algorithms
> are correct;
Aliasing is very hard to reason about formally, because no matter what you 
do, you start running into the undecidability issue.
In fact, in papers on static type determination for C++ (Do a search on 
researchindex.org), i've yet to see a *single* formal proof of any kind 
offered that they are correct.  They make statements about what language 
features they support, but never *why* or even prove that they support 
them.
It is simply assumed they are conservative enough.
If you think i'm going to write a formal proof that our aliasing for C 
structs, and thus, for the restricted case we are trying to make gcc 
handle for C++, you would be incorrect. I have neither the time, nor the 
inclination. It has nothing to do with whether i value correctness for 
speed, and everything to do with the fact that i'm not going to get myself 
into the kind of time I see something like that taking.
It's, IMHO, not something that as mark claims, is reasonably enough 
defined to do such a thing. If it was, others would have done it before.  
Mark's claim that if the underlying algorithm is easy, reasoning about it 
should be, is also not quite right.
Take Fermat's theorem, for instance.
So IMHO, that ends the discussion of trying to improve g++ TBAA 
for me.
I'm happy to let you guys require that someone formally reason about this 
stuff (I don't think it'll ever happen, but hey, i'm young and 
idealistic. Oh, wait...). It's just not gonna be me.

>  simply because correctness should come first, speed later.Of course.
> That doesn't mean I'm against any effort to improve alias analysis in
> g++, I'm simply against a change which doesn't consider correctness as
> serious issue.
What the heck is that supposed to mean?
Nobody has said correctness is not a serious issue.
I just don't think for simple cases, that it's a particularly *hard* 
issue.
Which is why we are talking about handling cases where what we have are 
effectively C  structs in C++ (IE nothing that inherits from anything 
else), which we handle properly for C already.
*Anything* is better than nothing, which is what we have now.
Formally proving things about simple C++ class aliasing, however, is not 
something i'm going to attempt.
So it'll have to wait for someone else.

Back to bugzilla work,
Dan

  parent reply	other threads:[~2002-01-25 13:23 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-24 15:30 Richard Kenner
2002-01-25  2:16 ` Gabriel Dos Reis
2002-01-25  3:04   ` Paolo Carlini
2002-01-25  4:17     ` Gabriel Dos Reis
2002-01-25  4:35       ` Paolo Carlini
2002-01-25  6:34         ` Daniel Berlin
2002-01-25  7:17   ` Daniel Berlin [this message]
2002-01-25 13:57     ` Gabriel Dos Reis
2002-01-25 14:47       ` Tim Hollebeek
  -- strict thread matches above, loose matches on Subject: below --
2002-01-25 14:49 mike stump
2002-01-25 12:23 Robert Dewar
2002-01-25 13:29 ` Joe Buck
2002-01-25 12:06 mike stump
2002-01-25  9:13 Robert Dewar
2002-01-25  8:55 Robert Dewar
2002-01-25  9:21 ` Daniel Berlin
2002-01-25 10:00   ` Daniel Berlin
2002-01-25 10:54     ` Paolo Carlini
2002-01-25 11:37       ` Daniel Berlin
2002-01-25 11:45       ` David Edelsohn
2002-01-25 11:53         ` Joe Buck
2002-01-25 12:09           ` Mark Mitchell
2002-01-25 12:28             ` Paolo Carlini
2002-01-25 13:49               ` Mark Mitchell
2002-01-25 14:19                 ` Joe Buck
2002-01-25 14:21                   ` Mark Mitchell
2002-01-25 15:41                     ` Neil Booth
2002-01-25 16:04                       ` Joe Buck
2002-01-25 17:37                         ` Paolo Carlini
2002-01-25 18:10                         ` Daniel Berlin
2002-01-27  5:11                         ` Mark Mitchell
2002-01-27  5:34                           ` Daniel Berlin
2002-01-28 10:39                             ` Joe Buck
2002-01-28 10:51                               ` Joe Buck
2002-01-28 15:59                               ` Mark Mitchell
2002-01-28 17:11                                 ` Daniel Berlin
2002-01-28 17:28                                   ` Joe Buck
2002-01-28 18:14                                     ` Daniel Berlin
2002-01-28 17:18                                 ` Joe Buck
2002-01-28 18:05                                   ` Mark Mitchell
2002-01-28 18:50                                     ` Joe Buck
2002-01-28 19:33                                       ` Mark Mitchell
2002-01-28 17:40                                         ` Daniel Berlin
2002-01-28 21:55                                           ` Daniel Berlin
2002-01-28 22:02                                         ` Alexandre Oliva
2002-01-28 22:12                                           ` Mark Mitchell
2002-01-25 13:07             ` Joe Buck
2002-01-25 15:43               ` Daniel Berlin
2002-01-25 16:03                 ` Joe Buck
2002-01-25 15:13             ` Daniel Berlin
2002-01-25 12:10           ` Paolo Carlini
2002-01-25 13:16             ` Joe Buck
2002-01-25 15:23             ` Daniel Berlin
2002-01-25 12:05         ` Mark Mitchell
2002-01-25 22:14           ` Daniel Berlin
2002-01-26  3:46             ` Mark Mitchell
2002-01-25  8:35 Robert Dewar
2002-01-25  8:54 ` Daniel Berlin
2002-01-25  8:33 Richard Kenner
2002-01-25  8:32 Robert Dewar
2002-01-25  8:53 ` Daniel Berlin
2002-01-25  9:39 ` Joe Buck
2002-01-25  8:28 Robert Dewar
2002-01-25  8:49 ` Daniel Berlin
2002-01-25  7:51 Robert Dewar
2002-01-25  8:18 ` Daniel Berlin
2002-01-25  8:20   ` Daniel Berlin
2002-01-25  7:38 Robert Dewar
2002-01-25  8:11 ` Daniel Berlin
2002-01-25 14:09   ` Gabriel Dos Reis
2002-01-25  7:30 Richard Kenner
2002-01-25  7:30 Richard Kenner
2002-01-25  7:33 ` Daniel Berlin
2002-01-25 15:43   ` Daniel Berlin
2002-01-25  7:23 Richard Kenner
2002-01-25  7:24 ` Daniel Berlin
2002-01-25  7:05 Richard Kenner
2002-01-25  8:59 ` Paolo Carlini
2002-01-24 16:09 Richard Kenner
2002-01-23 17:56 Dan Nicolaescu
2002-01-23 18:27 ` Daniel Berlin
2002-01-23 18:48   ` Dan Nicolaescu
2002-01-23 19:16     ` Daniel Berlin
2002-01-24 14:15     ` Mark Mitchell
2002-01-24 14:16       ` Daniel Berlin
2002-01-24 14:27         ` Mark Mitchell
2002-01-24 14:35           ` Daniel Berlin
2002-01-24 15:06             ` Mark Mitchell
2002-01-24 15:08             ` Paolo Carlini
2002-01-24 15:18       ` Dan Nicolaescu
2002-01-24 15:36         ` Mark Mitchell
2002-01-25  2:25           ` Daniel Berlin
2002-01-25 15:48           ` Dan Nicolaescu
2002-01-25 20:22             ` Joe Buck
2002-01-25 23:59               ` Daniel Berlin
2002-01-27 17:04               ` Dan Nicolaescu
2002-01-27 17:59                 ` Paolo Carlini

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=Pine.LNX.4.44.0201250801100.29019-100000@dberlin.org \
    --to=dan@dberlin.org \
    --cc=gcc@gcc.gnu.org \
    --cc=gdr@codesourcery.com \
    --cc=kenner@vlsi1.ultra.nyu.edu \
    --cc=pcarlini@unitus.it \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).