comp.lang.ada
 help / color / mirror / Atom feed
* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-19  2:32 Overriding discriminants perplexes GNAT 3.14p Dmitry A.Kazakov
@ 2002-09-18 16:45 ` Stephen Leake
  2002-09-19 21:34   ` Dmitry A.Kazakov
  2002-09-18 16:46 ` Mark Johnson
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 31+ messages in thread
From: Stephen Leake @ 2002-09-18 16:45 UTC (permalink / raw)


Dmitry A.Kazakov <mailbox@dmitry-kazakov.de> writes:

> Hi!
> 
> The following primitive code causes "GNAT bug detected" report:
> 
> <code snipped>
>
> This results in a bug report (crash)  under Windows.

Also with GNAT 3.15a1

> What wonders me is which sort of validation uses ACT if such bugs go
> through? 

Very thorough.

> People rightly criticize MS VC++, but the situation with Ada
> compilers isn't much better. 

Yes it is (in my experience). I've found bugs in _every_ compiler I've
ever used. At least with GNAT I have a chance of getting them fixed!
And they are in more and more obscure corners of the language as time
goes on and more testing is done. MS VC++ bugs are in the core of the
language, and they have no problem with not being standard-compliant,
and they introduce new bugs with every release.

> I judge from my experience with GNAT and Object Ada. 

GNAT is better than Object Ada

> It is a permanent battle of finding work-arounds for countless

Hmm. I have a record of all the bugs I've submitted. Total is 24, over
3 years. And that includes some Emacs Ada-mode bugs. Hardly "countless"!

> compiler bugs. Is there any good Ada compilers since DEC gone?

DEC was good. GNAT is better! And yes, I _did_ find bugs in the DEC
Ada compiler.

Compilers are _extremely_ complicated systems. It is _not_ possible to
ensure they have no bugs.

Please report your bug to report@gnat.com, following the instructions
in the GNAT BUG box. Or let me know, and I'll do it.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-19  2:32 Overriding discriminants perplexes GNAT 3.14p Dmitry A.Kazakov
  2002-09-18 16:45 ` Stephen Leake
@ 2002-09-18 16:46 ` Mark Johnson
  2002-09-19 21:34   ` Dmitry A.Kazakov
  2002-09-18 16:49 ` Frank J. Lhota
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 31+ messages in thread
From: Mark Johnson @ 2002-09-18 16:46 UTC (permalink / raw)


"Dmitry A.Kazakov" wrote:
> 
> Hi!
> The following primitive code causes "GNAT bug detected" report:
> [snip example program]
> This results in a bug report (crash)  under Windows.
> 
Hmm. I'm running GNAT on Linux. I ran gnatchop on your source and it
compiles just fine for me. I suggest you submit a bug report to ACT.

> What wonders me is which sort of validation uses ACT if such bugs go
> through? People rightly criticize MS VC++, but the situation with Ada
> compilers isn't much better. I judge from my experience with GNAT and
> Object Ada. It is a permanent battle of finding work-arounds for countless
> compiler bugs. Is there any good Ada compilers since DEC gone?
> 
Quite a bit of validation actually. My experience with a "formal
release" is a several week freeze period where their full test suite is
exercised on a variety of platforms and only critical bugs are fixed. We
brought over a couple million lines of code from VADS and Apex w/ only a
handful of compiler bugs (and far more of our own bugs...).

As a paying customer of ACT, I am pretty satisfied with both the product
and support provided. If I have some novel situation such as you do,
they provide...
 - almost immediate acknowledgment of the problem
 - a work around usually within hours
 - a version of the compiler w/ a permanent fix, usually within a day or
two - sometimes a little longer
The project has stabilized on one of the formal releases though I expect
to step up to a newer version as GPS gets through the beta process (to
get full support).

  --Mark



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-19  2:32 Overriding discriminants perplexes GNAT 3.14p Dmitry A.Kazakov
  2002-09-18 16:45 ` Stephen Leake
  2002-09-18 16:46 ` Mark Johnson
@ 2002-09-18 16:49 ` Frank J. Lhota
  2002-09-19 21:34   ` Dmitry A.Kazakov
  2002-09-18 17:17 ` Per Sandbergs
  2002-09-19  8:51 ` Thierry Lelegard
  4 siblings, 1 reply; 31+ messages in thread
From: Frank J. Lhota @ 2002-09-18 16:49 UTC (permalink / raw)


For what it's worth, ObjectAda compiles this OK.





^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-19  2:32 Overriding discriminants perplexes GNAT 3.14p Dmitry A.Kazakov
                   ` (2 preceding siblings ...)
  2002-09-18 16:49 ` Frank J. Lhota
@ 2002-09-18 17:17 ` Per Sandbergs
  2002-09-19  8:51 ` Thierry Lelegard
  4 siblings, 0 replies; 31+ messages in thread
From: Per Sandbergs @ 2002-09-18 17:17 UTC (permalink / raw)


I am using GNAT(pro) and when ever i got som problems or questions with  i
send it to ACT (the GNAT people).
And the are real fast in solving our problems (We pay them for that).

So my advice to you would be:
    Report the bug in acordance with the crash printout so that other users
may benefit from your findings.

/Regards
/Per Sandberg

"Dmitry A.Kazakov" <mailbox@dmitry-kazakov.de> wrote in message
news:ama2bm$404hu$1@ID-77047.news.dfncis.de...
> Hi!
>
> The following primitive code causes "GNAT bug detected" report:
> --------
> with Ada.Finalization; use Ada.Finalization;
>
> package Test1 is
>    type X (N : Natural) is
>       new Ada.Finalization.Limited_Controlled with private;
>    procedure Initialize (Obj : in out X);
> private
>    type X (N : Natural) is
>       new Ada.Finalization.Limited_Controlled with
>    record
>       NS : String (1..N);
>    end record;
> end Test1;
> ----------
> package body Test1 is
>    procedure Initialize (Obj : in out X) is
>    begin
>       null;
>    end Initialize;
> end Test1;
> ----------
> package Test1.Test2 is
>    type XX (M : Natural; N : Natural)  is new X with private;
>    procedure Initialize (Obj : in out XX);
> private
>    type XX (M : Natural; N : Natural)  is new X (N) with
>    record
>       MS : String (1..M);
>    end record;
> end Test1.Test2;
> ----------
> package body Test1.Test2 is
>    procedure Initialize (Obj : in out XX) is
>    begin
>       Initialize (X (Obj));
>    end Initialize;
> end Test1.Test2;
> ----------
> package Test1.Test2.Test3 is
>    type XXX is new XX (10, 20) with private;
>    procedure Initialize (Obj : in out XXX);
> private
>    type XXX is new XX (10, 20) with null record;
> end Test1.Test2.Test3;
> ----------
> package body Test1.Test2.Test3 is
>    procedure Initialize (Obj : in out XXX) is
>    begin
>       Initialize (XX (Obj));
>    end Initialize;
> end Test1.Test2.Test3;
> ----------
> 1. Unconstrained type X has a discriminant
> 2. Unconstrained XX (derived from X) has two disriminants. It overrides
the
> discriminant of X
> 3. Constrained XXX is derived from XX.
>
> This results in a bug report (crash)  under Windows.
>
> What wonders me is which sort of validation uses ACT if such bugs go
> through? People rightly criticize MS VC++, but the situation with Ada
> compilers isn't much better. I judge from my experience with GNAT and
> Object Ada. It is a permanent battle of finding work-arounds for countless
> compiler bugs. Is there any good Ada compilers since DEC gone?
>
> --
> Regards,
> Dmitry Kazakov
> www.dmitry-kazakov.de





^ permalink raw reply	[flat|nested] 31+ messages in thread

* Overriding discriminants perplexes GNAT 3.14p
@ 2002-09-19  2:32 Dmitry A.Kazakov
  2002-09-18 16:45 ` Stephen Leake
                   ` (4 more replies)
  0 siblings, 5 replies; 31+ messages in thread
From: Dmitry A.Kazakov @ 2002-09-19  2:32 UTC (permalink / raw)


Hi!

The following primitive code causes "GNAT bug detected" report:
--------
with Ada.Finalization; use Ada.Finalization;

package Test1 is
   type X (N : Natural) is
      new Ada.Finalization.Limited_Controlled with private;
   procedure Initialize (Obj : in out X);
private
   type X (N : Natural) is
      new Ada.Finalization.Limited_Controlled with
   record
      NS : String (1..N);
   end record;
end Test1;
----------
package body Test1 is
   procedure Initialize (Obj : in out X) is
   begin
      null;
   end Initialize;
end Test1;
----------
package Test1.Test2 is
   type XX (M : Natural; N : Natural)  is new X with private;
   procedure Initialize (Obj : in out XX);
private
   type XX (M : Natural; N : Natural)  is new X (N) with
   record
      MS : String (1..M);
   end record;
end Test1.Test2;
----------
package body Test1.Test2 is
   procedure Initialize (Obj : in out XX) is
   begin
      Initialize (X (Obj));
   end Initialize;
end Test1.Test2;
----------
package Test1.Test2.Test3 is
   type XXX is new XX (10, 20) with private;
   procedure Initialize (Obj : in out XXX);
private
   type XXX is new XX (10, 20) with null record;
end Test1.Test2.Test3;
----------
package body Test1.Test2.Test3 is
   procedure Initialize (Obj : in out XXX) is
   begin
      Initialize (XX (Obj));
   end Initialize;
end Test1.Test2.Test3;
----------
1. Unconstrained type X has a discriminant
2. Unconstrained XX (derived from X) has two disriminants. It overrides the 
discriminant of X
3. Constrained XXX is derived from XX.

This results in a bug report (crash)  under Windows.

What wonders me is which sort of validation uses ACT if such bugs go 
through? People rightly criticize MS VC++, but the situation with Ada 
compilers isn't much better. I judge from my experience with GNAT and 
Object Ada. It is a permanent battle of finding work-arounds for countless 
compiler bugs. Is there any good Ada compilers since DEC gone?

-- 
Regards,
Dmitry Kazakov
www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-19  2:32 Overriding discriminants perplexes GNAT 3.14p Dmitry A.Kazakov
                   ` (3 preceding siblings ...)
  2002-09-18 17:17 ` Per Sandbergs
@ 2002-09-19  8:51 ` Thierry Lelegard
  4 siblings, 0 replies; 31+ messages in thread
From: Thierry Lelegard @ 2002-09-19  8:51 UTC (permalink / raw)


> The following primitive code causes "GNAT bug detected" report:

Same problem using GNAT 3.15a on Solaris, OpenVMS, Linux, HP-UX and
Windows. Also seen with GNAT 5.00w on OpenVMS.

This problem definitely deserves a report.

> 1. Unconstrained type X has a discriminant
> 2. Unconstrained XX (derived from X) has two disriminants. It overrides the
> discriminant of X
> 3. Constrained XXX is derived from XX.

We had a lot of GNAT bugs using similar constructs. All of them
were fixed (we are a paying customer of ACT). But you got a new one.

> What wonders me is which sort of validation uses ACT if such bugs go
> through? People rightly criticize MS VC++, but the situation with Ada
> compilers isn't much better. I judge from my experience with GNAT and
> Object Ada. It is a permanent battle of finding work-arounds for countless
> compiler bugs. Is there any good Ada compilers since DEC gone?

Ah! DEC Ada! The best Ada compiler ever... No Ada95 version, sigh :-((
I have used it during 12 years and got less than 10 bugs. We have been
using GNAT for 4 years and we submitted 185 reports, 107 of them being bugs...
On the other hand, ACT support is very efficient. All bugs are fixed and
new version delivered within days.

-Thierry



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
@ 2002-09-19  9:08 Grein, Christoph
  0 siblings, 0 replies; 31+ messages in thread
From: Grein, Christoph @ 2002-09-19  9:08 UTC (permalink / raw)


From: Thierry Lelegard <thierry.lelegard@canal-plus.fr>
> Ah! DEC Ada! The best Ada compiler ever... No Ada95 version, sigh :-((
> I have used it during 12 years and got less than 10 bugs. We have been
> using GNAT for 4 years and we submitted 185 reports, 107 of them being bugs...
> On the other hand, ACT support is very efficient. All bugs are fixed and
> new version delivered within days.

A reason for this might be: More experienced Ada programmer uses more elaborate features. 
Also Ada 95 added a lot of new features.

But the discrepancy in numbers is stupendous.



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-19 21:34   ` Dmitry A.Kazakov
@ 2002-09-19 15:51     ` Stephen Leake
  2002-09-20 22:06       ` Dmitry A.Kazakov
  2002-09-19 18:22     ` Adam Beneschan
  2002-09-21 13:01     ` Simon Wright
  2 siblings, 1 reply; 31+ messages in thread
From: Stephen Leake @ 2002-09-19 15:51 UTC (permalink / raw)


Dmitry A.Kazakov <mailbox@dmitry-kazakov.de> writes:

> Stephen Leake wrote:
> 
> > Dmitry A.Kazakov <mailbox@dmitry-kazakov.de> writes:
> > 
> >> People rightly criticize MS VC++, but the situation with Ada
> >> compilers isn't much better.
> > 
> > Yes it is (in my experience). I've found bugs in _every_ compiler I've
> > ever used. At least with GNAT I have a chance of getting them fixed!
> 
> First of all there are bugs and bugs. GNAT is at least ten years old, so I 
> would expect that one could not catch it on such primitive things. What you 
> are talking about is merely a quality of support, which is a very important 
> but yet another thing. Moreover, from what Robert Dewar said before his 
> departure, it looks like excellent and thus expensive support actually 
> harms quality. ACT intentionally limits the number of GNAT users by those 
> with very deep pockets and applications which do not require all stregths 
> of Ada. Should GNAT Pro be affordable for small and medium sized projects, 
> then Ada would be applied much more wider with so terrifying ACT 
> consequence of an increasing support demand.

You are making a couple of assumptions that I find dubious.

1) More and cheaper customers = higher quality

I don't believe this, because the first consequence of more cheaper
customers is to spread your support personnel thinner, so they have
less time to write quality fixes for the bugs that get reported. 

2) ACT customers do not require all strengths of Ada. 

GNAT is the only compiler to support _all_ of the Ada Annexes. ACT
only supports code that customers demand. So I have to believe that
there is at least one ACT customers using each part of Ada. Which also
helps defeat assumption 1).

> >> I judge from my experience with GNAT and Object Ada.
> > 
> > GNAT is better than Object Ada
> 
> I wouldn't say that. From my sad experience [I was forced to create a small 
> validation site] Object Ada compiles many examples which perplexe GNAT. It 
> also makes a better code. 

Ok, it is certainly true that compilers perform differently on
different types of code; I suspect your code is in a different domain
than mine.

> The major problem with Object Ada is that it sometimes hangs and
> sometimes joyfully generates nonsense, especially when it tries to
> optimize return statements with controlled types.

That's a show stopper for me :).

> > DEC was good. GNAT is better! And yes, I _did_ find bugs in the DEC
> > Ada compiler.
> 
> Lucky one (:-)). For five years GNAT was unable to compile my program in 
> Ada 83 written for DEC Ada. [I must admit, I slightly overused generics 
> there]

Yeah, I've hit a few bugs in GNAT generics as well. Fixed now :).

> Yes *now* GNAT is better than DEC Ada that time. 

That is what I meant. Certainly the first version of GNAT (3.09?) was
pretty horrible.

> Though there is nothing comparable with LSE and DEC debugger. 

Emacs and gdb (current versions) are better than LSE and DEC debugger,
but just barely.

> But what if mismanagement and "new economy" didn't kill DEC?

Then I'd be running VMS instead of Windows, and Linux would never have
gotten started (hey, I can dream, can't I :).

> > Compilers are _extremely_ complicated systems. It is _not_ possible to
> > ensure they have no bugs.
> > 
> > Please report your bug to report@gnat.com, following the instructions
> > in the GNAT BUG box. Or let me know, and I'll do it.
> 
> It is better if you do that, because you are working with 3.15. 

Hmm. I don't want to abuse my support contract by submitting bugs that
I have not encountered in my work. I'll send this one in, but from now
on I won't make that offer.

And ACT does look at bug reports from non-customers, especially if
they are simple to reproduce (as yours is).

> Here is a pair of "gems" from my collection:

Send them in to ACT; they will get fixed in a future version.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-19 21:34   ` Dmitry A.Kazakov
@ 2002-09-19 16:17     ` Stephen Leake
  2002-09-19 20:02       ` tmoran
                         ` (2 more replies)
  0 siblings, 3 replies; 31+ messages in thread
From: Stephen Leake @ 2002-09-19 16:17 UTC (permalink / raw)


Dmitry A.Kazakov <mailbox@dmitry-kazakov.de> writes:

> I wished to get GNAT Pro, but alas it is unavailable for our targed 
> platform. So before investing a huge amount of bucks we are trying to 
> validate existing compilers with respect of our software design. The result 
> is rather disappointing. It comes to finding a language subset which more 
> than one compiler are capable to digest. Looks like a typical C-case, isn't 
> it?

Why do you need more than one compiler? Hmm, perhaps developement on
the host computer, then deliver to the target.

> Note also the situation. We must "sell" Ada to our customers while
> they in general do not want Ada [for many reasons, but mostly
> because of ignorance]. When I talk to them I point that Ada is
> portable, available, certifyed, safe, that they will be
> vendor/platform-independent. This sometimes impresses them, because
> they have had experience with the "ever-green" C. Do I lie them?

No language is _completely_ "portable, available, certified, safe".
Ada is _more_ of these than C. Say that instead.

Hmm, except "available"; I would say C is available on more processors
than Ada.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-19 21:34   ` Dmitry A.Kazakov
  2002-09-19 15:51     ` Stephen Leake
@ 2002-09-19 18:22     ` Adam Beneschan
  2002-09-20 22:06       ` Dmitry A.Kazakov
  2002-09-21 13:01     ` Simon Wright
  2 siblings, 1 reply; 31+ messages in thread
From: Adam Beneschan @ 2002-09-19 18:22 UTC (permalink / raw)


Dmitry A.Kazakov <mailbox@dmitry-kazakov.de> wrote in message news:<amc58u$4ebgo$1@ID-77047.news.dfncis.de>...

> 2. Circular requeue hangs at run-time under Linux:
> 
> package Objects is
>    protected Object1 is
>       entry Point1;
>       entry Point2;
>    end Object1;
>    protected Object2 is
>       entry Point1;
>    end Object2;
> end Objects;
> ------------
> package body Objects is
>    protected body Object1 is
>       entry Point1 when True is
>       begin
>          requeue Object2.Point1;
>       end Point1;
>       entry Point2 when True is
>       begin
>          null;
>       end Point2;
>    end Object1;
>    protected body Object2 is
>       entry Point1 when True is
>       begin
>          requeue Object1.Point2;
>       end Point1;
>    end Object2;
> end Objects;
> ------------
> with Ada.Text_IO;  use Ada.Text_IO;
> with Objects;
> 
> procedure Test is
> begin
>    Objects.Object1.Point1;
>    Put_Line ("That's OK");
> end Test;

I think GNAT's behavior is legitimate here.  Protected entry calls and
external requeues start new "protected actions" on the target
protected object (9.5.3(8), 9.5.4(11)).  Thus, when
Objects.Object1.Point1 is called, a new protected action is started on
Object1.  When this requeues to Object2.Point1, a new protected action
is started on Object2; however, the protected action on Object1 does
not complete (AI95-00148).  When Object2.Point1 then requeues to
Object1.Point2, it attempts to start a new protected action on
Object1.  However, 9.5.1(4) says that a new protected action cannot be
"started on a protected object while another protected action on the
same protected object is underway".  Thus, the requeue to
Object1.Point2 must wait until the already in-progress protected
action is completed, and that can never happen; the result is
deadlock.  Note that the second requeue is not necessarily
"queued"---see 9.5.1(18).

See also 9.5.1(8-16), which says that if a protected action performs
an external requeue on the same target object as that of a protected
action (which is what your program does, indirectly), it is a bounded
error.  Implementations may or may not detect this error; see
9.5.1(17).

In other words, it's your program that's in error here, not GNAT.

				-- Adam



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-19 16:17     ` Stephen Leake
@ 2002-09-19 20:02       ` tmoran
  2002-09-20 21:10       ` Dmitry A.Kazakov
  2002-09-21 12:56       ` Simon Wright
  2 siblings, 0 replies; 31+ messages in thread
From: tmoran @ 2002-09-19 20:02 UTC (permalink / raw)


> Why do you need more than one compiler?
  Perhaps the answer lies in another c.l.a. thread "Subject: Re: SofTech
Ada 86 Compiler":
>>I'm looking for a copy of the SofTech Ada 86 compiler, that is, their
>>compiler for the Intel 80x86 platform. Yes, I know that the compiler is no
>>longer support, and that any code developed with this compiler should be
>>moved to a more current platform. But we need to do some maintenance work on
>>a program developed with this compiler, and do it quickly. Any help you

Running code through more than one compiler is helpful in finding
non-portabilities, and sometimes one compiler will issue warnings about
your use of some construct, where another compiler is silent.

Programs supplied in source form must be able to compile on the compiler
the user has.  Claw, for instance, does not insist on anybody's specific
compiler, but compiles under the normal public versions of Apex, Gnat,
Janus, and ObjectAda.  There are a few things unspecified by Ada where we
have to supply different packages for the different compilers, and
sometimes one compiler will have a bug that needs a special workaround.
Since Claw targets the compilers users have, and not specially patched
versions some users can get, bug workarounds have to stay, typically for a
year or so, until the next corrected public release of a compiler.  Given
these circumstances, I think there is remarkably little special pieces of
code catering to specific compilers.



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-18 16:45 ` Stephen Leake
@ 2002-09-19 21:34   ` Dmitry A.Kazakov
  2002-09-19 15:51     ` Stephen Leake
                       ` (2 more replies)
  0 siblings, 3 replies; 31+ messages in thread
From: Dmitry A.Kazakov @ 2002-09-19 21:34 UTC (permalink / raw)


Stephen Leake wrote:

> Dmitry A.Kazakov <mailbox@dmitry-kazakov.de> writes:
> 
>> People rightly criticize MS VC++, but the situation with Ada
>> compilers isn't much better.
> 
> Yes it is (in my experience). I've found bugs in _every_ compiler I've
> ever used. At least with GNAT I have a chance of getting them fixed!

First of all there are bugs and bugs. GNAT is at least ten years old, so I 
would expect that one could not catch it on such primitive things. What you 
are talking about is merely a quality of support, which is a very important 
but yet another thing. Moreover, from what Robert Dewar said before his 
departure, it looks like excellent and thus expensive support actually 
harms quality. ACT intentionally limits the number of GNAT users by those 
with very deep pockets and applications which do not require all stregths 
of Ada. Should GNAT Pro be affordable for small and medium sized projects, 
then Ada would be applied much more wider with so terrifying ACT 
consequence of an increasing support demand.

> And they are in more and more obscure corners of the language as time
> goes on and more testing is done. MS VC++ bugs are in the core of the
> language, and they have no problem with not being standard-compliant,
> and they introduce new bugs with every release.
> 
>> I judge from my experience with GNAT and Object Ada.
> 
> GNAT is better than Object Ada

I wouldn't say that. From my sad experience [I was forced to create a small 
validation site] Object Ada compiles many examples which perplexe GNAT. It 
also makes a better code. The major problem with Object Ada is that it 
sometimes hangs and sometimes joyfully generates nonsense, especially when 
it tries to optimize return statements with controlled types. 

>> It is a permanent battle of finding work-arounds for countless
> 
> Hmm. I have a record of all the bugs I've submitted. Total is 24, over
> 3 years. And that includes some Emacs Ada-mode bugs. Hardly "countless"!
> 
>> compiler bugs. Is there any good Ada compilers since DEC gone?
> 
> DEC was good. GNAT is better! And yes, I _did_ find bugs in the DEC
> Ada compiler.

Lucky one (:-)). For five years GNAT was unable to compile my program in 
Ada 83 written for DEC Ada. [I must admit, I slightly overused generics 
there]

Yes *now* GNAT is better than DEC Ada that time. Though there is nothing 
comparable with LSE and DEC debugger. But what if mismanagement and "new 
economy" didn't kill DEC?

> Compilers are _extremely_ complicated systems. It is _not_ possible to
> ensure they have no bugs.
> 
> Please report your bug to report@gnat.com, following the instructions
> in the GNAT BUG box. Or let me know, and I'll do it.

It is better if you do that, because you are working with 3.15. Here is a 
pair of "gems" from my collection:

1. The requeue statement is abortable, while it should not be:
 
package Objects is
   protected Object is
      entry Point1;
      entry Point2;
   end Object;
end Objects;
------------
package body Objects is
   protected body Object is
      entry Point1 when True is
      begin
         requeue Point2;
      end Point1;
      entry Point2 when False is
      begin
         null;
      end Point2;
   end Object;
end Objects;
------------
with Ada.Text_IO;  use Ada.Text_IO;
with Objects;

procedure Test is
begin
   select
      delay 2.0;
   then abort
      Objects.Object.Point1;
   end select;
   Put_Line ("Never be here, because Point1 isn't abortable");
end Test;
-------------

2. Circular requeue hangs at run-time under Linux:

package Objects is
   protected Object1 is
      entry Point1;
      entry Point2;
   end Object1;
   protected Object2 is
      entry Point1;
   end Object2;
end Objects;
------------
package body Objects is
   protected body Object1 is
      entry Point1 when True is
      begin
         requeue Object2.Point1;
      end Point1;
      entry Point2 when True is
      begin
         null;
      end Point2;
   end Object1;
   protected body Object2 is
      entry Point1 when True is
      begin
         requeue Object1.Point2;
      end Point1;
   end Object2;
end Objects;
------------
with Ada.Text_IO;  use Ada.Text_IO;
with Objects;

procedure Test is
begin
   Objects.Object1.Point1;
   Put_Line ("That's OK");
end Test;

-- 
Regards,
Dmitry Kazakov
www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-18 16:46 ` Mark Johnson
@ 2002-09-19 21:34   ` Dmitry A.Kazakov
  2002-09-19 16:17     ` Stephen Leake
  0 siblings, 1 reply; 31+ messages in thread
From: Dmitry A.Kazakov @ 2002-09-19 21:34 UTC (permalink / raw)


Mark Johnson wrote:

> As a paying customer of ACT, I am pretty satisfied with both the product
> and support provided. If I have some novel situation such as you do,
> they provide...
>  - almost immediate acknowledgment of the problem
>  - a work around usually within hours
>  - a version of the compiler w/ a permanent fix, usually within a day or
> two - sometimes a little longer
> The project has stabilized on one of the formal releases though I expect
> to step up to a newer version as GPS gets through the beta process (to
> get full support).

I wished to get GNAT Pro, but alas it is unavailable for our targed 
platform. So before investing a huge amount of bucks we are trying to 
validate existing compilers with respect of our software design. The result 
is rather disappointing. It comes to finding a language subset which more 
than one compiler are capable to digest. Looks like a typical C-case, isn't 
it?

Note also the situation. We must "sell" Ada to our customers while they in 
general do not want Ada [for many reasons, but mostly because of 
ignorance]. When I talk to them I point that Ada is portable, available, 
certifyed, safe, that they will be vendor/platform-independent. This 
sometimes impresses them, because they have had experience with the 
"ever-green" C. Do I lie them?

-- 
Regards,
Dmitry Kazakov
www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-18 16:49 ` Frank J. Lhota
@ 2002-09-19 21:34   ` Dmitry A.Kazakov
  0 siblings, 0 replies; 31+ messages in thread
From: Dmitry A.Kazakov @ 2002-09-19 21:34 UTC (permalink / raw)


Frank J. Lhota wrote:

> For what it's worth, ObjectAda compiles this OK.

I know. I hangs on other examples and sometimes generates false code (:-().

-- 
Regards,
Dmitry Kazakov
www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-20 22:06       ` Dmitry A.Kazakov
@ 2002-09-20 12:29         ` Stephen Leake
  2002-09-22  8:43           ` Dmitry A.Kazakov
  0 siblings, 1 reply; 31+ messages in thread
From: Stephen Leake @ 2002-09-20 12:29 UTC (permalink / raw)


Dmitry A.Kazakov <mailbox@dmitry-kazakov.de> writes:

> Stephen Leake wrote:
> > You are making a couple of assumptions that I find dubious.
> > 
> > 1) More and cheaper customers = higher quality
> > 
> > I don't believe this, because the first consequence of more cheaper
> > customers is to spread your support personnel thinner, so they have
> > less time to write quality fixes for the bugs that get reported.
> 
> Consider personal PC's today and mainframes of 60's. In a long term 
> perspective cheaper products bring higher quality. This could be [and 
> usualy is] undesirable from the point of view of a product vendor. Well, 
> this is how they try to resist to, let's say, progress and then disapper.

That's only true when there are economies of scale. Intel can make
millions of identical Pentiums, and make a profit. ACT cannot make
millions of identical support responses. Remember, their business is
support to people, each of whom has unique needs.

> > 2) ACT customers do not require all strengths of Ada.
> > 
> > GNAT is the only compiler to support _all_ of the Ada Annexes. ACT
> > only supports code that customers demand.
> 
> So they dropped JGNAT. Could this happen if GNAT were widely used in web 
> applications?

Yes. It just means the JVM is not an appropriate target for web
applications. I don't do web stuff myself, but my understanding is
that the Java hype for this application is just that; hype.

The question was not "is Ada good for web applications" but "do ACT
customers use all of Ada".

> > So I have to believe that there is at least one ACT customers
> > using each part of Ada. Which also helps defeat assumption 1).
> 
> I hope so. But you should admit that a wider use of GNAT would make it 
> better.

Well, that is precisely what I am not admitting :). Paying good people
to write good code, and getting high-quality feedback from serious
users, is an excellent model for producing a quality product. That
does _not_ mean you have to have "a lot" of customers; just "enough"
customers.

MS Windows has way more users than GNAT; is it better? How about MS
VC++? 

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-20 22:06       ` Dmitry A.Kazakov
@ 2002-09-20 16:00         ` Adam Beneschan
  2002-09-22  8:43           ` Dmitry A.Kazakov
  0 siblings, 1 reply; 31+ messages in thread
From: Adam Beneschan @ 2002-09-20 16:00 UTC (permalink / raw)


Dmitry A.Kazakov <mailbox@dmitry-kazakov.de> wrote in message news:<amerh4$5b11r$2@ID-77047.news.dfncis.de>...
> Adam Beneschan wrote:

> > I think GNAT's behavior is legitimate here.  Protected entry calls and
> > external requeues start new "protected actions" on the target
> > protected object (9.5.3(8), 9.5.4(11)).  Thus, when
> > Objects.Object1.Point1 is called, a new protected action is started on
> > Object1.  When this requeues to Object2.Point1, a new protected action
> > is started on Object2; however, the protected action on Object1 does
> > not complete (AI95-00148). 
> 
> Really? 9.5.4(10) says explicitly (for an internal requeue) that the 
> ongoing action continues., but following it 9.5.4(11) keeps silence about 
> that. From which I would assume that the ongoing action is replaced by a 
> new one. If not, then a task may simultaneously perform an unlimited number 
> of protected actions! I see no sense in that, and moreover, it would make 
> external requeues almost useless.

See http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00148.TXT?rev=1.2
for the official word on the matter.

				-- Adam



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-19 16:17     ` Stephen Leake
  2002-09-19 20:02       ` tmoran
@ 2002-09-20 21:10       ` Dmitry A.Kazakov
  2002-09-21 12:56       ` Simon Wright
  2 siblings, 0 replies; 31+ messages in thread
From: Dmitry A.Kazakov @ 2002-09-20 21:10 UTC (permalink / raw)


Stephen Leake wrote:

> Dmitry A.Kazakov <mailbox@dmitry-kazakov.de> writes:
> 
>> I wished to get GNAT Pro, but alas it is unavailable for our targed
>> platform. So before investing a huge amount of bucks we are trying to
>> validate existing compilers with respect of our software design. The
>> result is rather disappointing. It comes to finding a language subset
>> which more than one compiler are capable to digest. Looks like a typical
>> C-case, isn't it?
> 
> Why do you need more than one compiler? Hmm, perhaps developement on
> the host computer, then deliver to the target.

This is exactly what we are doing.

To have more than one compiler is important to ensure portability across 
many compilers-platforms. This is one of the major requirements of our 
product. The target platforms we use have limited life time. They disappear 
after 5-7 years. So the software should be portable, and well, you never 
know which compiler will be used then.

>> Note also the situation. We must "sell" Ada to our customers while
>> they in general do not want Ada [for many reasons, but mostly
>> because of ignorance]. When I talk to them I point that Ada is
>> portable, available, certifyed, safe, that they will be
>> vendor/platform-independent. This sometimes impresses them, because
>> they have had experience with the "ever-green" C. Do I lie them?
> 
> No language is _completely_ "portable, available, certified, safe".

The language is, but its implementations? That's the problem.

> Ada is _more_ of these than C. Say that instead.

Do not forget, I must persuade customers which are extremely sceptical to 
Ada.

-- 
Regards,
Dmitry Kazakov
www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-19 15:51     ` Stephen Leake
@ 2002-09-20 22:06       ` Dmitry A.Kazakov
  2002-09-20 12:29         ` Stephen Leake
  0 siblings, 1 reply; 31+ messages in thread
From: Dmitry A.Kazakov @ 2002-09-20 22:06 UTC (permalink / raw)


Stephen Leake wrote:

> Dmitry A.Kazakov <mailbox@dmitry-kazakov.de> writes:
> 
>> Stephen Leake wrote:
>> 
>> > Dmitry A.Kazakov <mailbox@dmitry-kazakov.de> writes:
>> > 
>> >> People rightly criticize MS VC++, but the situation with Ada
>> >> compilers isn't much better.
>> > 
>> > Yes it is (in my experience). I've found bugs in _every_ compiler I've
>> > ever used. At least with GNAT I have a chance of getting them fixed!
>> 
>> First of all there are bugs and bugs. GNAT is at least ten years old, so
>> I would expect that one could not catch it on such primitive things. What
>> you are talking about is merely a quality of support, which is a very
>> important but yet another thing. Moreover, from what Robert Dewar said
>> before his departure, it looks like excellent and thus expensive support
>> actually harms quality. ACT intentionally limits the number of GNAT users
>> by those with very deep pockets and applications which do not require all
>> stregths of Ada. Should GNAT Pro be affordable for small and medium sized
>> projects, then Ada would be applied much more wider with so terrifying
>> ACT consequence of an increasing support demand.
> 
> You are making a couple of assumptions that I find dubious.
> 
> 1) More and cheaper customers = higher quality
> 
> I don't believe this, because the first consequence of more cheaper
> customers is to spread your support personnel thinner, so they have
> less time to write quality fixes for the bugs that get reported.

Consider personal PC's today and mainframes of 60's. In a long term 
perspective cheaper products bring higher quality. This could be [and 
usualy is] undesirable from the point of view of a product vendor. Well, 
this is how they try to resist to, let's say, progress and then disapper.

> 2) ACT customers do not require all strengths of Ada.
> 
> GNAT is the only compiler to support _all_ of the Ada Annexes. ACT
> only supports code that customers demand.

So they dropped JGNAT. Could this happen if GNAT were widely used in web 
applications?

> So I have to believe that
> there is at least one ACT customers using each part of Ada. Which also
> helps defeat assumption 1).

I hope so. But you should admit that a wider use of GNAT would make it 
better.

> Ok, it is certainly true that compilers perform differently on
> different types of code; I suspect your code is in a different domain
> than mine.

I have an impression that Object Ada better optimizes inlined code, but 
there are also cases where GNAT is better.

>> But what if mismanagement and "new economy" didn't kill DEC?
> 
> Then I'd be running VMS instead of Windows, and Linux would never have
> gotten started (hey, I can dream, can't I :).

A world free of UNIX! (:-))

-- 
Regards,
Dmitry Kazakov
www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-19 18:22     ` Adam Beneschan
@ 2002-09-20 22:06       ` Dmitry A.Kazakov
  2002-09-20 16:00         ` Adam Beneschan
  0 siblings, 1 reply; 31+ messages in thread
From: Dmitry A.Kazakov @ 2002-09-20 22:06 UTC (permalink / raw)


Adam Beneschan wrote:

> Dmitry A.Kazakov <mailbox@dmitry-kazakov.de> wrote in message
> news:<amc58u$4ebgo$1@ID-77047.news.dfncis.de>...
> 
>> 2. Circular requeue hangs at run-time under Linux:
>> 
>> package Objects is
>>    protected Object1 is
>>       entry Point1;
>>       entry Point2;
>>    end Object1;
>>    protected Object2 is
>>       entry Point1;
>>    end Object2;
>> end Objects;
>> ------------
>> package body Objects is
>>    protected body Object1 is
>>       entry Point1 when True is
>>       begin
>>          requeue Object2.Point1;
>>       end Point1;
>>       entry Point2 when True is
>>       begin
>>          null;
>>       end Point2;
>>    end Object1;
>>    protected body Object2 is
>>       entry Point1 when True is
>>       begin
>>          requeue Object1.Point2;
>>       end Point1;
>>    end Object2;
>> end Objects;
>> ------------
>> with Ada.Text_IO;  use Ada.Text_IO;
>> with Objects;
>> 
>> procedure Test is
>> begin
>>    Objects.Object1.Point1;
>>    Put_Line ("That's OK");
>> end Test;
> 
> I think GNAT's behavior is legitimate here.  Protected entry calls and
> external requeues start new "protected actions" on the target
> protected object (9.5.3(8), 9.5.4(11)).  Thus, when
> Objects.Object1.Point1 is called, a new protected action is started on
> Object1.  When this requeues to Object2.Point1, a new protected action
> is started on Object2; however, the protected action on Object1 does
> not complete (AI95-00148). 

Really? 9.5.4(10) says explicitly (for an internal requeue) that the 
ongoing action continues., but following it 9.5.4(11) keeps silence about 
that. From which I would assume that the ongoing action is replaced by a 
new one. If not, then a task may simultaneously perform an unlimited number 
of protected actions! I see no sense in that, and moreover, it would make 
external requeues almost useless.

-- 
Regards,
Dmitry Kazakov
www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-19 16:17     ` Stephen Leake
  2002-09-19 20:02       ` tmoran
  2002-09-20 21:10       ` Dmitry A.Kazakov
@ 2002-09-21 12:56       ` Simon Wright
  2 siblings, 0 replies; 31+ messages in thread
From: Simon Wright @ 2002-09-21 12:56 UTC (permalink / raw)


Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov> writes:

> Why do you need more than one compiler? Hmm, perhaps developement on
> the host computer, then deliver to the target.

This is what we are doing. And with GNATworks you get host and target
support (provided you can persuade your IT organisation to pay the
bill).



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-19 21:34   ` Dmitry A.Kazakov
  2002-09-19 15:51     ` Stephen Leake
  2002-09-19 18:22     ` Adam Beneschan
@ 2002-09-21 13:01     ` Simon Wright
  2 siblings, 0 replies; 31+ messages in thread
From: Simon Wright @ 2002-09-21 13:01 UTC (permalink / raw)


Dmitry A.Kazakov <mailbox@dmitry-kazakov.de> writes:

> It is better if you do that, because you are working with 3.15. Here
> is a pair of "gems" from my collection:

This behaves in the way you indicate with GCC-3.2 as well, so you
could report it on the GCC bug list as well --

http://gcc.gnu.org/cgi-bin/gnatsweb.pl



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-20 16:00         ` Adam Beneschan
@ 2002-09-22  8:43           ` Dmitry A.Kazakov
  2002-09-23 21:18             ` Adam Beneschan
  0 siblings, 1 reply; 31+ messages in thread
From: Dmitry A.Kazakov @ 2002-09-22  8:43 UTC (permalink / raw)


Adam Beneschan wrote:

> Dmitry A.Kazakov <mailbox@dmitry-kazakov.de> wrote in message
> news:<amerh4$5b11r$2@ID-77047.news.dfncis.de>...
>> Adam Beneschan wrote:
> 
>> > I think GNAT's behavior is legitimate here.  Protected entry calls and
>> > external requeues start new "protected actions" on the target
>> > protected object (9.5.3(8), 9.5.4(11)).  Thus, when
>> > Objects.Object1.Point1 is called, a new protected action is started on
>> > Object1.  When this requeues to Object2.Point1, a new protected action
>> > is started on Object2; however, the protected action on Object1 does
>> > not complete (AI95-00148).
>> 
>> Really? 9.5.4(10) says explicitly (for an internal requeue) that the
>> ongoing action continues., but following it 9.5.4(11) keeps silence about
>> that. From which I would assume that the ongoing action is replaced by a
>> new one. If not, then a task may simultaneously perform an unlimited
>> number of protected actions! I see no sense in that, and moreover, it
>> would make external requeues almost useless.
> 
> See http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00148.TXT?rev=1.2
> for the official word on the matter.

Maybe I have missed something, it is a rather lenghty document, but it only 
clarifies a rather obvious idea that an external requeue should be made in 
a safe way to avoid race condition. So the original protected action 
lingers for awhile until requeueing is done.

Does it say that the protected action continues and locks the original 
object until any consequent protected action and actions it in turn might 
invoke complete?

It would a disaster. Consider a protected object serving as a scheduler. It 
routes requests via requeue to numerous other protected objects and tasks 
that would then serve the requests. It would be simply impossible to do 
that if the scheduler would remain locked until a request is finally served 
by another object or task.

Again, IMO it would make the external requeue useless as a communication 
mechanism between protected objects. And there is no any other.

-- 
Regards,
Dmitry Kazakov
www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-20 12:29         ` Stephen Leake
@ 2002-09-22  8:43           ` Dmitry A.Kazakov
  2002-09-22 13:32             ` Georg Bauhaus
  2002-09-23 15:33             ` Stephen Leake
  0 siblings, 2 replies; 31+ messages in thread
From: Dmitry A.Kazakov @ 2002-09-22  8:43 UTC (permalink / raw)


Stephen Leake wrote:

> Dmitry A.Kazakov <mailbox@dmitry-kazakov.de> writes:
> 
>> Stephen Leake wrote:
>> > You are making a couple of assumptions that I find dubious.
>> > 
>> > 1) More and cheaper customers = higher quality
>> > 
>> > I don't believe this, because the first consequence of more cheaper
>> > customers is to spread your support personnel thinner, so they have
>> > less time to write quality fixes for the bugs that get reported.
>> 
>> Consider personal PC's today and mainframes of 60's. In a long term
>> perspective cheaper products bring higher quality. This could be [and
>> usualy is] undesirable from the point of view of a product vendor. Well,
>> this is how they try to resist to, let's say, progress and then disapper.
> 
> That's only true when there are economies of scale. Intel can make
> millions of identical Pentiums, and make a profit. ACT cannot make
> millions of identical support responses.

I suppose that when a bug has been corrected, it is out forever. (:-))

Nobody expects a premium support for a product for ~1K. It could be just 
new patches and a very formalized procedure of submitting bug reports per 
E-mail. Not much more, than any computer game usually have.

> Remember, their business is
> support to people, each of whom has unique needs.

I also remember DEC's - "we don't sell computers, we sell solutions". 
Sounds similar, but where is DEC now? People, plebs, if you want, cannot 
afford this support. But they still have to be served. And if no Ada 
compiler vendor does it, then well, this place will be occupied by someone 
else.

>> > 2) ACT customers do not require all strengths of Ada.
>> > 
>> > GNAT is the only compiler to support _all_ of the Ada Annexes. ACT
>> > only supports code that customers demand.
>> 
>> So they dropped JGNAT. Could this happen if GNAT were widely used in web
>> applications?
> 
> Yes. It just means the JVM is not an appropriate target for web
> applications. I don't do web stuff myself, but my understanding is
> that the Java hype for this application is just that; hype.

This is no matter. Is Windows an appropriate OS? Is Pentium a good CPU. Is 
C++ is a decent language? They are just good enough to make money. Do you 
really believe that people will stop making money with JVM, should they 
once wake up and discover that JVM is bad? There is demand and it will be 
satisfied this or that way. Yes, Ada could provide a better plaform than 
JVM, but to do it, one should first get into this business. And if you are 
not Microsoft you must support JVM for some lenghty period of time. And 
this is just the first very short step along a very long road.

> The question was not "is Ada good for web applications" but "do ACT
> customers use all of Ada".

If they do it, then why there are still bugs in the compiler? My point is 
that should GNAT be really widely used for multimedia, web, computer 
gaming, embedded, banking then it would have much less bugs.

>> > So I have to believe that there is at least one ACT customers
>> > using each part of Ada. Which also helps defeat assumption 1).
>> 
>> I hope so. But you should admit that a wider use of GNAT would make it
>> better.
> 
> Well, that is precisely what I am not admitting :). Paying good people
> to write good code, and getting high-quality feedback from serious
> users, is an excellent model for producing a quality product. That
> does _not_ mean you have to have "a lot" of customers; just "enough"
> customers.

I cannot resist to remind you how DEC's boss claimed that nobody would need 
to have a personal computer at home.

> MS Windows has way more users than GNAT; is it better? How about MS
> VC++?

MS ignores users because it is a monopoly which has too many of them.

-- 
Regards,
Dmitry Kazakov
www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-22  8:43           ` Dmitry A.Kazakov
@ 2002-09-22 13:32             ` Georg Bauhaus
  2002-09-23  5:41               ` Dmitry A.Kazakov
  2002-09-23 15:33             ` Stephen Leake
  1 sibling, 1 reply; 31+ messages in thread
From: Georg Bauhaus @ 2002-09-22 13:32 UTC (permalink / raw)


Dmitry A.Kazakov <mailbox@dmitry-kazakov.de> wrote:
: I suppose that when a bug has been corrected, it is out forever. (:-))
: [...]
: If they do it, then why there are still bugs in the compiler?

"The compiler" is maybe not a term that describes precisely what
a compiler might be, namely a program that may change as its
development incorporates new and better ideas, new features, different
techniques, support for language changes etc..  So a bugfix may in
priciple be removed when the part of the program that originally
contained a bug is replaced. This process may introduce new and
seemingly old bugs together with the new features.

Don't know if this is the case with GNAT, but would you say that
compilers shouldn't change when an increase in knowledge suggest
a change?

-- Georg
---
Microsoft Windows--a fresh perspective on information hiding



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-22 13:32             ` Georg Bauhaus
@ 2002-09-23  5:41               ` Dmitry A.Kazakov
  2002-09-23 12:41                 ` Georg Bauhaus
  0 siblings, 1 reply; 31+ messages in thread
From: Dmitry A.Kazakov @ 2002-09-23  5:41 UTC (permalink / raw)


Georg Bauhaus wrote:

> Dmitry A.Kazakov <mailbox@dmitry-kazakov.de> wrote:
> : I suppose that when a bug has been corrected, it is out forever. (:-))
> : [...]
> : If they do it, then why there are still bugs in the compiler?
> 
> "The compiler" is maybe not a term that describes precisely what
> a compiler might be, namely a program that may change as its
> development incorporates new and better ideas, new features, different
> techniques, support for language changes etc..  So a bugfix may in
> priciple be removed when the part of the program that originally
> contained a bug is replaced. This process may introduce new and
> seemingly old bugs together with the new features.

Right, I placed a smile there. Any bugfix bears new bugs in it. The problem 
is of course in the relation between new and old bugs.

> Don't know if this is the case with GNAT, but would you say that
> compilers shouldn't change when an increase in knowledge suggest
> a change?

Of course not. My point was simple, a wider use gives a better product. The 
bugs I saw in GNAT would be detected earlier if more software were written 
in Ada and compiled with GNAT, just a statistical observation.

-- 
Regards,
Dmitry Kazakov
www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-23  5:41               ` Dmitry A.Kazakov
@ 2002-09-23 12:41                 ` Georg Bauhaus
  2002-09-24  1:38                   ` Dmitry A.Kazakov
  0 siblings, 1 reply; 31+ messages in thread
From: Georg Bauhaus @ 2002-09-23 12:41 UTC (permalink / raw)


Dmitry A.Kazakov <mailbox@dmitry-kazakov.de> wrote:
: My point was simple, a wider use gives a better product. The 
: bugs I saw in GNAT would be detected earlier if more software were written 
: in Ada and compiled with GNAT, just a statistical observation.

Maybe. But only if a higher number of program writers uses a
higher number of all kinds of language features in different
program contexts. As a test for the statistical observation,
are the popular compilers for other languages better by the
factor of OtherLanguageProgramAuthors / Ada_Program_Authors?

-- Georg



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-22  8:43           ` Dmitry A.Kazakov
  2002-09-22 13:32             ` Georg Bauhaus
@ 2002-09-23 15:33             ` Stephen Leake
  2002-09-24  8:35               ` Dmitry A. Kazakov
  1 sibling, 1 reply; 31+ messages in thread
From: Stephen Leake @ 2002-09-23 15:33 UTC (permalink / raw)


Dmitry A.Kazakov <mailbox@dmitry-kazakov.de> writes:

> Stephen Leake wrote:
> 
> > The question was not "is Ada good for web applications" but "do ACT
> > customers use all of Ada".
> 
> If they do it, then why there are still bugs in the compiler? My point is 
> that should GNAT be really widely used for multimedia, web, computer 
> gaming, embedded, banking then it would have much less bugs.

Give me some examples to support this thesis. I don't believe it!

> >> > So I have to believe that there is at least one ACT customers
> >> > using each part of Ada. Which also helps defeat assumption 1).
> >> 
> >> I hope so. But you should admit that a wider use of GNAT would make it
> >> better.
> > 
> > Well, that is precisely what I am not admitting :). Paying good people
> > to write good code, and getting high-quality feedback from serious
> > users, is an excellent model for producing a quality product. That
> > does _not_ mean you have to have "a lot" of customers; just "enough"
> > customers.
> 
> I cannot resist to remind you how DEC's boss claimed that nobody would need 
> to have a personal computer at home.

How is that relevant?

> > MS Windows has way more users than GNAT; is it better? How about
> > MS VC++?
> 
> MS ignores users because it is a monopoly which has too many of them.

Yes. Which does not answer my question. Your thesis seems to be:

If program A has more users than program B, then program A will have
fewer bugs than program B.

I have quoted two examples (A = MS Windows, B= GNAT, A = MS VC++, B =
GNAT), that contradict this thesis. Can you quote any examples that
support it?

I suspect that DEC Ada 83 had fewer users in its heyday than GNAT has
supported customers now (anybody have any real data on this)? If true,
that also contradicts your thesis, since we agree that DEC Ada 83 had
fewer bugs than GNAT Ada 95.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-22  8:43           ` Dmitry A.Kazakov
@ 2002-09-23 21:18             ` Adam Beneschan
  2002-09-24  9:40               ` Dmitry A. Kazakov
  0 siblings, 1 reply; 31+ messages in thread
From: Adam Beneschan @ 2002-09-23 21:18 UTC (permalink / raw)


Dmitry A.Kazakov <mailbox@dmitry-kazakov.de> wrote in message news:<amil7u$6897n$1@ID-77047.news.dfncis.de>...
> Adam Beneschan wrote:

> > See http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00148.TXT?rev=1.2
> > for the official word on the matter.
> 
> Maybe I have missed something, it is a rather lenghty document, but it only 
> clarifies a rather obvious idea that an external requeue should be made in 
> a safe way to avoid race condition. So the original protected action 
> lingers for awhile until requeueing is done.

Here's what it actually says, right up front: "The requeue of a
protected entry to an entry in another protected object requires the
protected action resulting from the requeue to be completed before the
original protected action completes".

When an external requeue is made to an open entry, 9.5.4(11) says that
a protected action is started on the target object and proceeds as for
a normal entry call.  If the entry is open (as in your example code),
the protected action consists of executing the entry body and
servicing the entry queues, and then the protected action is complete
(9.5.3(8,10,18)).  If the entry is closed, the entry call (i.e. the
one caused by the requeue, in your code) is queued, and the protected
action completes.

The summary of AI-00148, which I quoted above, says that when an entry
in protected object P1 does a requeue to protected object P2, the
protected action on P2 must be completed (including, if the entry in
P2 is *open*, executing the body of that entry and processing any
other queued calls in P2 that can now execute) before the protected
action on P1 is completed.  In other words, they nest.

Note that the protected action does *not* include waiting on a queue. 
If the external requeue is to an entry whose barrier is closed, the
nested protected action queues the entry and then is complete,
allowing the protected action on the first protected object to
complete.  The protected action on the requeueing object does *not*
remain in effect indefinitely until the barrier becomes open.  It
completes as soon as the requeued entry call gets put on the queue. 
This could be the source of your misunderstanding.

> Does it say that the protected action continues and locks the original 
> object until any consequent protected action and actions it in turn might 
> invoke complete?

Yes.

> It would a disaster. Consider a protected object serving as a scheduler. It 
> routes requests via requeue to numerous other protected objects and tasks 
> that would then serve the requests. It would be simply impossible to do 
> that if the scheduler would remain locked until a request is finally served 
> by another object or task.

See above.  I have a feeling this is due to your misunderstanding of
what happens in the "protected action" when a requeue is to a closed
entry.

				-- Adam



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-23 12:41                 ` Georg Bauhaus
@ 2002-09-24  1:38                   ` Dmitry A.Kazakov
  0 siblings, 0 replies; 31+ messages in thread
From: Dmitry A.Kazakov @ 2002-09-24  1:38 UTC (permalink / raw)


Georg Bauhaus wrote:

> Dmitry A.Kazakov <mailbox@dmitry-kazakov.de> wrote:
> : My point was simple, a wider use gives a better product. The
> : bugs I saw in GNAT would be detected earlier if more software were
> : written in Ada and compiled with GNAT, just a statistical observation.
> 
> Maybe. But only if a higher number of program writers uses a
> higher number of all kinds of language features in different
> program contexts.

A wider use assumes that. Bugs in the implementation of protected objects 
indicate that nobody ever used them so that these bugs would become 
evident. One might argue this probably proves that protected objects are 
useless, but I think it is rather because of a very narrow application area 
of GNAT.

> As a test for the statistical observation,
> are the popular compilers for other languages better by the
> factor of OtherLanguageProgramAuthors / Ada_Program_Authors?

Such comparison might be illegal for many reasons. Of course a wide use 
does not imply a higher quality, somebody should remove that bugs in the 
end, but it is a requirement of that. What if I'd say that ACT should have 
more money to make GNAT better? Then you could pin me down with an argument 
that MS has lot of money and yet ships awful products!

-- 
Regards,
Dmitry Kazakov
www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-23 15:33             ` Stephen Leake
@ 2002-09-24  8:35               ` Dmitry A. Kazakov
  0 siblings, 0 replies; 31+ messages in thread
From: Dmitry A. Kazakov @ 2002-09-24  8:35 UTC (permalink / raw)


On 23 Sep 2002 11:33:32 -0400, Stephen Leake
<stephen.a.leake.1@gsfc.nasa.gov> wrote:

>Dmitry A.Kazakov <mailbox@dmitry-kazakov.de> writes:
>
>> Stephen Leake wrote:
>> 
>> > The question was not "is Ada good for web applications" but "do ACT
>> > customers use all of Ada".
>> 
>> If they do it, then why there are still bugs in the compiler? My point is 
>> that should GNAT be really widely used for multimedia, web, computer 
>> gaming, embedded, banking then it would have much less bugs.
>
>Give me some examples to support this thesis. I don't believe it!

I can't, because it is not enough used in these areas. But could you
agree that an application will not function properly if the compiler
has a bug. Or your argument is that if GNAT were used as wide as C++
then ACT would just ignore bug reports as MS does?

>> >> > So I have to believe that there is at least one ACT customers
>> >> > using each part of Ada. Which also helps defeat assumption 1).
>> >> 
>> >> I hope so. But you should admit that a wider use of GNAT would make it
>> >> better.
>> > 
>> > Well, that is precisely what I am not admitting :). Paying good people
>> > to write good code, and getting high-quality feedback from serious
>> > users, is an excellent model for producing a quality product. That
>> > does _not_ mean you have to have "a lot" of customers; just "enough"
>> > customers.
>> 
>> I cannot resist to remind you how DEC's boss claimed that nobody would need 
>> to have a personal computer at home.
>
>How is that relevant?

One should never separate customers into relevant and irrelevant. You
never know how it will turn in 10 years.

>> > MS Windows has way more users than GNAT; is it better? How about
>> > MS VC++?
>> 
>> MS ignores users because it is a monopoly which has too many of them.
>
>Yes. Which does not answer my question. Your thesis seems to be:
>
>If program A has more users than program B, then program A will have
>fewer bugs than program B.

Required, not implied!

Your argument is that for testing a program one does not need many
tests, it is enough to have all "good" tests. It is of course true.
The only technical problem is how to find that "good" tests. So what
makes you so sure, that paying GNAT users are "good" and only "good"
ones to detect and report all bugs? How one could prove that? Should
GNAT have no bugs a "bad" user (like me) be able to detect, then I
would agree with this argument. But it seems to be not so.

>I have quoted two examples (A = MS Windows, B= GNAT, A = MS VC++, B =
>GNAT), that contradict this thesis. Can you quote any examples that
>support it?

Linux is much better than it was before. Even in a pathalogical case
of MS VC++, if you compare VC++ 1.52 and VC++ 6.0 you will discover an
amazing progress (maybe because the starting point was so low. (:-))

>I suspect that DEC Ada 83 had fewer users in its heyday than GNAT has
>supported customers now (anybody have any real data on this)? If true,
>that also contradicts your thesis, since we agree that DEC Ada 83 had
>fewer bugs than GNAT Ada 95.

Come on, there are lots of other factors. Ada 83 is much smaller than
Ada 95, DEC targetted only one, very stable and highly integrated
platform, and so on and so forth.

---
Regards,
Dmitry Kazakov
www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: Overriding discriminants perplexes GNAT 3.14p
  2002-09-23 21:18             ` Adam Beneschan
@ 2002-09-24  9:40               ` Dmitry A. Kazakov
  0 siblings, 0 replies; 31+ messages in thread
From: Dmitry A. Kazakov @ 2002-09-24  9:40 UTC (permalink / raw)


On 23 Sep 2002 14:18:08 -0700, adam@irvine.com (Adam Beneschan) wrote:

>Dmitry A.Kazakov <mailbox@dmitry-kazakov.de> wrote in message news:<amil7u$6897n$1@ID-77047.news.dfncis.de>...
>> Adam Beneschan wrote:
>
>> > See http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00148.TXT?rev=1.2
>> > for the official word on the matter.
>> 
>> Maybe I have missed something, it is a rather lenghty document, but it only 
>> clarifies a rather obvious idea that an external requeue should be made in 
>> a safe way to avoid race condition. So the original protected action 
>> lingers for awhile until requeueing is done.
>
>Here's what it actually says, right up front: "The requeue of a
>protected entry to an entry in another protected object requires the
>protected action resulting from the requeue to be completed before the
>original protected action completes".
>
>When an external requeue is made to an open entry, 9.5.4(11) says that
>a protected action is started on the target object and proceeds as for
>a normal entry call.  If the entry is open (as in your example code),
>the protected action consists of executing the entry body and
>servicing the entry queues, and then the protected action is complete
>(9.5.3(8,10,18)).  If the entry is closed, the entry call (i.e. the
>one caused by the requeue, in your code) is queued, and the protected
>action completes.
>
>The summary of AI-00148, which I quoted above, says that when an entry
>in protected object P1 does a requeue to protected object P2, the
>protected action on P2 must be completed (including, if the entry in
>P2 is *open*, executing the body of that entry and processing any
>other queued calls in P2 that can now execute) before the protected
>action on P1 is completed.  In other words, they nest.
>
>Note that the protected action does *not* include waiting on a queue. 
>If the external requeue is to an entry whose barrier is closed, the
>nested protected action queues the entry and then is complete,
>allowing the protected action on the first protected object to
>complete.  The protected action on the requeueing object does *not*
>remain in effect indefinitely until the barrier becomes open.  It
>completes as soon as the requeued entry call gets put on the queue. 
>This could be the source of your misunderstanding.
>
>> Does it say that the protected action continues and locks the original 
>> object until any consequent protected action and actions it in turn might 
>> invoke complete?
>
>Yes.
>
>> It would a disaster. Consider a protected object serving as a scheduler. It 
>> routes requests via requeue to numerous other protected objects and tasks 
>> that would then serve the requests. It would be simply impossible to do 
>> that if the scheduler would remain locked until a request is finally served 
>> by another object or task.
>
>See above.  I have a feeling this is due to your misunderstanding of
>what happens in the "protected action" when a requeue is to a closed
>entry.

According to your description the scheduler indeed will be *locked* if
the entry serving the request is *open* when a requeue to it is made.
If the entry is closed then it will not. [It seems that it will not be
locked if the entry is of a task]. An excellent pitfall!

Then whether a circular requeue is a bounded error or not depends
exclusively on the state of barriers! And there is no other way than a
requeue to influence the barries of another object from a protected
action. Even better!

---
Regards,
Dmitry Kazakov
www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2002-09-24  9:40 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-19  2:32 Overriding discriminants perplexes GNAT 3.14p Dmitry A.Kazakov
2002-09-18 16:45 ` Stephen Leake
2002-09-19 21:34   ` Dmitry A.Kazakov
2002-09-19 15:51     ` Stephen Leake
2002-09-20 22:06       ` Dmitry A.Kazakov
2002-09-20 12:29         ` Stephen Leake
2002-09-22  8:43           ` Dmitry A.Kazakov
2002-09-22 13:32             ` Georg Bauhaus
2002-09-23  5:41               ` Dmitry A.Kazakov
2002-09-23 12:41                 ` Georg Bauhaus
2002-09-24  1:38                   ` Dmitry A.Kazakov
2002-09-23 15:33             ` Stephen Leake
2002-09-24  8:35               ` Dmitry A. Kazakov
2002-09-19 18:22     ` Adam Beneschan
2002-09-20 22:06       ` Dmitry A.Kazakov
2002-09-20 16:00         ` Adam Beneschan
2002-09-22  8:43           ` Dmitry A.Kazakov
2002-09-23 21:18             ` Adam Beneschan
2002-09-24  9:40               ` Dmitry A. Kazakov
2002-09-21 13:01     ` Simon Wright
2002-09-18 16:46 ` Mark Johnson
2002-09-19 21:34   ` Dmitry A.Kazakov
2002-09-19 16:17     ` Stephen Leake
2002-09-19 20:02       ` tmoran
2002-09-20 21:10       ` Dmitry A.Kazakov
2002-09-21 12:56       ` Simon Wright
2002-09-18 16:49 ` Frank J. Lhota
2002-09-19 21:34   ` Dmitry A.Kazakov
2002-09-18 17:17 ` Per Sandbergs
2002-09-19  8:51 ` Thierry Lelegard
  -- strict thread matches above, loose matches on Subject: below --
2002-09-19  9:08 Grein, Christoph

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