comp.lang.ada
 help / color / mirror / Atom feed
* Ada 2012, ASIS and AdaControl
@ 2012-02-17 13:17 Yannick Duchêne (Hibou57)
  2012-02-17 13:19 ` Yannick Duchêne (Hibou57)
  2012-02-17 22:03 ` J-P. Rosen
  0 siblings, 2 replies; 4+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2012-02-17 13:17 UTC (permalink / raw)


Hi people out there,

I get into troubles with AdaControl many times I use an Ada 2012  
construct, like this one (just a short real example):

    pragma Assert (for all D in Digit_Type => Digit (Digit_Image (D)) = D);

Running AdaControl on the package body containing the above, ends with  
this:

    AdaCtl version: 1.13r8 with ASIS 2.0.R for GNAT 4.7.0 20111119  
(experimental)
    ASIS error: ASIS.EXCEPTIONS.ASIS_FAILED
    In rule  : STYLE
    For unit : IPV4.BYTES.IMAGES
    Status   : NOT_IMPLEMENTED_ERROR
    Diagnosis: Not Implemented Query:

That's frustrating, do I have to forget about AdaControl (which I like a  
lot) or about the Ada 2012 construct (which I like as much) which make it  
failed? How do you, people, deal with this? The above Assert statement act  
as much as documentation as an opportunity for a real check. I could  
comment it out, but would lose any relevance. Comments are nice, but  
checked self‑explained expressions are far better. That's obviously not  
critical, but that's a lot of frustrations, and I get it every time.

I am also wondering if this is due to ASIS‑for‑GNAT implementation or to  
the actual status of the ASIS standard (a long time I did use it, so I'm  
aware of how it currently go). This may be the most relevant question here.

-- 
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University



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

* Re: Ada 2012, ASIS and AdaControl
  2012-02-17 13:17 Ada 2012, ASIS and AdaControl Yannick Duchêne (Hibou57)
@ 2012-02-17 13:19 ` Yannick Duchêne (Hibou57)
  2012-02-17 22:03 ` J-P. Rosen
  1 sibling, 0 replies; 4+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2012-02-17 13:19 UTC (permalink / raw)


Le Fri, 17 Feb 2012 14:17:50 +0100, Yannick Duchêne (Hibou57)  
<yannick_duchene@yahoo.fr> a écrit:
> (a long time I did use it, so I'm  aware of how it currently go)
Please, read “(a long time I did not use it, so I'm  not aware of how it  
currently go)”.


-- 
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University



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

* Re: Ada 2012, ASIS and AdaControl
  2012-02-17 13:17 Ada 2012, ASIS and AdaControl Yannick Duchêne (Hibou57)
  2012-02-17 13:19 ` Yannick Duchêne (Hibou57)
@ 2012-02-17 22:03 ` J-P. Rosen
  2012-02-17 22:18   ` Yannick Duchêne (Hibou57)
  1 sibling, 1 reply; 4+ messages in thread
From: J-P. Rosen @ 2012-02-17 22:03 UTC (permalink / raw)


Le 17/02/2012 14:17, Yannick Duchêne (Hibou57) a écrit :
> I get into troubles with AdaControl many times I use an Ada 2012
> construct, like this one (just a short real example):
> 
>    pragma Assert (for all D in Digit_Type => Digit (Digit_Image (D)) = D);
> 
> Running AdaControl on the package body containing the above, ends with
> this:
> 
>    AdaCtl version: 1.13r8 with ASIS 2.0.R for GNAT 4.7.0 20111119
> (experimental)
>    ASIS error: ASIS.EXCEPTIONS.ASIS_FAILED
>    In rule  : STYLE
>    For unit : IPV4.BYTES.IMAGES
>    Status   : NOT_IMPLEMENTED_ERROR
>    Diagnosis: Not Implemented Query:
> 
> That's frustrating, do I have to forget about AdaControl (which I like a
> lot) or about the Ada 2012 construct (which I like as much) which make
> it failed?
I'd just say: be patient. Features get implemented in the compiler, then
there is support in ASIS, and then these can be used by AdaControl.
Moreover, you are apparently using the FSF version of Gnat, which is
lagging behind Adacore's one.

If you send me the complete error context (with options -dx), I can tell
you which function is not yet implemented, and whether it is available
with the latest version of GnatPro (a lot of  Ada 2012 was implemented
recently).
-- 
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00
http://www.adalog.fr



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

* Re: Ada 2012, ASIS and AdaControl
  2012-02-17 22:03 ` J-P. Rosen
@ 2012-02-17 22:18   ` Yannick Duchêne (Hibou57)
  0 siblings, 0 replies; 4+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2012-02-17 22:18 UTC (permalink / raw)


Le Fri, 17 Feb 2012 23:03:00 +0100, J-P. Rosen <rosen@adalog.fr> a écrit:
> If you send me the complete error context (with options -dx), I can tell
> you which function is not yet implemented, and whether it is available
> with the latest version of GnatPro (a lot of  Ada 2012 was implemented
> recently).
Okay, will send this tomorrow (that's a sample very short package to be  
posted on a forum, to present both Ada 2012 and AdaControl).

For the time, I've removed the "-r" option from the script invoking  
adactl, and check file by file, commenting and uncommenting the constructs  
which make it fails. I prefer the recursive check, this cause obvious  
troubles in such circumstance.

-- 
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University



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

end of thread, other threads:[~2012-02-17 22:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-17 13:17 Ada 2012, ASIS and AdaControl Yannick Duchêne (Hibou57)
2012-02-17 13:19 ` Yannick Duchêne (Hibou57)
2012-02-17 22:03 ` J-P. Rosen
2012-02-17 22:18   ` Yannick Duchêne (Hibou57)

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