comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@gnat.com (Robert Dewar)
Subject: Re: System.Address'Size - not a static integer expression?
Date: 19 Apr 2002 19:26:50 -0700
Date: 2002-04-20T02:26:50+00:00	[thread overview]
Message-ID: <5ee5b646.0204191826.e43c400@posting.google.com> (raw)
In-Reply-To: 3CC03241.883A6E33@despammed.com

Wes Groleau <wesgroleau@despammed.com> wrote in message news:<3CC03241.883A6E33@despammed.com>...

> Now that is entirely possible.  They are not opposites
> in the RM, but they are opposites in general use.

Yes, but this general use is fuzzy, since as I pointed out
before, the notion of "known-at-compile-time" is recursively
undecidable. Furthermore, I am not aware of the
specific term static having been used in the context of
any previous language.

It's unusual for a language to give semantic significance
to this notion. In most languages, the compiler is free
to evaluate or not evaluate any expression at compile time
as it pleases.

This is also true in Ada, but a recognized *subset* of
compile time evaluable cases is identified as part of the
language. This allows many things to be checked at compile
time (e.g. completeness of case statements) without having
to limit the case tags to literal constants.

Inevitably, the class of static expressions identified in
the RM *must* be a subset of the expressions that can be
evaluated at compile time. This is not a recognition of
practical necessity, it is a mathematical theorem that can
easily be proved by analogy to the halting problem.

Of course a good Ada compiler will go well beyond this minimal subset
and evaluate many more expressions at compile time, but it is *NOT*
allowed to consider these
to be static in the formal sense.



  reply	other threads:[~2002-04-20  2:26 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-06 17:57 System.Address'Size - not a static integer expression? Vadim Godunko
2002-03-07  1:21 ` Robert Dewar
2002-03-07 13:56   ` Wes Groleau
2002-03-08 18:34     ` FGD
2002-03-08 19:07       ` Larry Kilgallen
2002-03-08 19:43       ` Wes Groleau
2002-04-08  4:57         ` Robert Dewar
2002-04-08 15:17           ` Wes Groleau
2002-04-10  1:54             ` Robert Dewar
2002-04-10 17:41               ` Wes Groleau
2002-04-10 18:29                 ` Darren New
2002-04-12 20:20                 ` Robert Dewar
2002-04-12 21:10                   ` Wes Groleau
2002-04-14 19:59                     ` Robert Dewar
2002-04-14 20:01                     ` Robert Dewar
2002-04-15 15:13                       ` Wes Groleau
2002-04-15 19:57                         ` Randy Brukardt
2002-04-17  3:22                           ` Robert Dewar
2002-04-17  3:11                         ` Robert Dewar
2002-04-17 18:27                           ` Wes Groleau
2002-04-19 14:06                             ` Robert Dewar
2002-04-19 15:05                               ` Wes Groleau
2002-04-20  2:26                                 ` Robert Dewar [this message]
2002-04-20  5:11                                 ` Robert Dewar
2002-04-20 16:50                                   ` Darren New
2002-04-22  9:20                                   ` Ole-Hjalmar Kristensen
2002-04-22 13:24                                     ` Robert Dewar
2002-04-22 13:59                                       ` Ole-Hjalmar Kristensen
2002-04-22 13:34                                     ` Robert Dewar
2002-04-22 14:02                                       ` Ole-Hjalmar Kristensen
2002-04-22 16:11                                         ` Jean-Pierre Rosen
2002-04-22 23:57                                         ` Robert Dewar
2002-04-08  0:43 ` Nick Roberts
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox