comp.lang.ada
 help / color / mirror / Atom feed
From: info@midoan.com
Subject: Re: Ada extension information
Date: Sat, 30 May 2009 03:13:50 -0700 (PDT)
Date: 2009-05-30T03:13:50-07:00	[thread overview]
Message-ID: <e6a5f1a3-b712-4c43-aa60-e721383eb5c1@h28g2000yqd.googlegroups.com> (raw)
In-Reply-To: S05Ul.299730$4m1.68755@bgtnsc05-news.ops.worldnet.att.net

On May 30, 8:13 am, a...@anon.org (anon) wrote:
> The problem is, those extra routines that make use of the "C like conditional
> compiling statements" are define in the body and referenced in the private
> sections of "Ada.Text_IO" and "Ada.Wide_Text_IO" packages. The comments
> state that they are for a sub-package "Ada.Text_IO.Wide_Text_IO" that is not
> present in the source. In scanning all 2850 plus files in the 2009 GNAT, the
> only references to this sub-package is in comments from the following 3 files:
>
>   Ada.Text_IO
>   Ada.Wide_Text_IO
> and
>   System.WCh_WtS
>
> So, why are these routines in the two Text IO packages, and where is that
> child package "Ada.Text_IO.Wide_Text_IO"?  
>
> Now, if these routines are defined and reference only with-in the package
> they are defined, then why are these routines references in the specification
> private area, they should be at the top of the body, hidden from the
> specification side. Keeping the Ada Text packages more precise to the Ada
> language, instead of junking it up with references that are not used outside
> ofthat package.  
>
> Or is this somewhat of an advance copy of 2010/2011 version of
> Ada.Text_IO and a new "Ada.Text_IO.Wide_Text_IO" package.
>
> And there is no reference in the documentation of the "C like conditional
> compiling statements".
>
> From RM 1.1.3 "Conformity of an Implementation with the Standard"
>
>     6  Contain no variations except those explicitly permitted by this
>        International Standard, or those that are impossible or
>        impractical to avoid given the implementation's execution
>        environment;
>
>     7  Specify all such variations in the manner prescribed by this
>        International Standard.
>
> No True Ada programmer wants "Language extensions" without references.  
> And most would prefer some simple references that is stated with-in the RM,
> not just hinted to by the RM, like having a RM section on what type
> "conditional compiling statements" would be acceptable with a few examples.
>
> So where is the documentation that is requred by RM 1.1.3 ( 7 ). Plus,
> I have not found where "conditional compiling statements" are allow
> in Ada RM 1.1.3 ( 6 ). And in some cases "conditional compiling
> statements" kills the need for generic package.
>
> Plus, there is another Adacore pragma ( sample located in body of
> Ada.Sequential_IO ). This seams to bypass the requirement to use
> "-gnatX".
>
>       pragma Extensions_Allowed ( On | Off ) ;
>
> with no documentation in the GNAT Documentation User's Guide ( GNAT_UGN )
> or the GNAT Reference Manual ( GNAT_RM ).
>
> Plus, if Adacore want to extend Ada, they normally use a child package
> with-in the GNAT package structure to test the idea before forcing the
> changes into the the Ada package structure.
>
> And finally what other changes have been made and how to disable them. Aka
> to turn off all "conditional expressions"? And for that reason the "C like
> conditional compiling statements" should never be in the core Ada or core
> System packages that are define in the RM.
>
> In <d784432e-fa9d-4bc9-b849-ecb2208af...@c9g2000yqm.googlegroups.com>, i...@midoan.com writes:
> >Hello,
> >a-textio.adb released with GNAT 2009 GPL for windows, contains:
>
> >Item :=
> >              (if not Is_Start_Of_Encoding (Character'Val (ch),
> >File.WC_Method)
> >               then Character'Val (ch)
> >               else Get_Upper_Half_Char_Immed (Character'Val (ch),
> >File));
>
> >which is easy enough to understand but is not standard Ada.
>
> >GNAT 2009 tells me :
>
> >try.adb:5:09: conditional expression is an Ada extension
> >try.adb:5:09: use -gnatX switch to compile this unit
>
> >http://www.adacore.com/2009/03/29/NF-63-I317-009-gnat/discusses
> >this.
>
> >Is it not jumping the gun a little to use these extensions to document
> >standard libraries before they become official, or even documented?
>
> >More specifically where are these Ada extensions formally documented?
> >(Ada Conformity Assessment Authority seem to have discussion about
> >this up to 15th March 2009 !)
>
> >PS In the meantime Mika is broken if you use a-textio as distributed
> >with GNAT GPL  2009.
>
> >Sincerely,
> >http://www.midoan.com
>
>

Just to clarify what Mika, our test data generator, uniquely it
appears, does. During test data generation, and only if the user's
code uses standrad libraries, Mika analyses the standard libraries and
uses that information to simulate their behaviour. We believe that
this approach is more accurate, repeatable and thorough than other
alternatives such as writing manual stubs for them. It also offers the
possibility of generating more interesting tests that cover the CFG of
the standard libraries (not to test the standard libraries, but rather
to generate tests that are borderline and that may not be expected by
the developers).


It therefore makes our job easier if the libraries are written in
standard Ada. The fact that they are close to it is already a great
help for us: althought we cannot analyse everything, things left in
code during development (but would probably be removed in the final
version) such as usages of textio do not have to removed; the code
does not have to be modified.

We released a minor update yesterday, and Mika can now parse
conditional expressions in standard libraries.

Regards,
Midoan



      reply	other threads:[~2009-05-30 10:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-28 18:26 Ada extension information info
2009-05-28 18:30 ` Martin
2009-05-30  0:25   ` Randy Brukardt
2009-05-28 21:22 ` Georg Bauhaus
2009-05-28 21:31   ` Georg Bauhaus
2009-05-28 22:06   ` Adam Beneschan
2009-05-30  7:13 ` anon
2009-05-30 10:13   ` info [this message]
replies disabled

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