* ASIS exception with AdaCtl v1.19r10
@ 2018-10-12 8:23 Markus Schöpflin
2018-10-12 12:25 ` J-P. Rosen
2018-10-12 12:50 ` J-P. Rosen
0 siblings, 2 replies; 6+ messages in thread
From: Markus Schöpflin @ 2018-10-12 8:23 UTC (permalink / raw)
Given the following simple test program:
---%<---
procedure TEST
is
package A is
type T is new FLOAT;
end A;
function F return A.T'BASE
is
begin
return 0.0;
end F;
begin
null;
end TEST;
-->%---
Checking this program with AdaCtl gives the following exception:
---%<---
> adactl -l "check style(no_closing_name)" test
============= Phase: Processing =============
AdaCtl version: 1.19r10 with ASIS 2.0.R for GNAT Pro 7.4.2 (20160527)
ASIS error: ASIS.EXCEPTIONS.ASIS_INAPPROPRIATE_ELEMENT
In rule: STYLE
For unit: TEST
Status : VALUE_ERROR
Diagnosis: Inappropriate Element Kind in
Asis.Expressions.Corresponding_Name_Declaration (A_SELECTED_COMPONENT)
called in Actual procedure for Pre_Operation
with the argument : A_FUNCTION_BODY_DECLARATION
located in TEST (body, Unit_Id = 2, Context_Id = 1)
text position : test.adb:7:4
Nodes:
Node : 2315 - N_SUBPROGRAM_BODY
R_Node : 2315 - N_SUBPROGRAM_BODY
Node_Field_1 : 0 - N_EMPTY
Node_Field_2 : 0 - N_EMPTY
Rel_Sloc : 65
obtained from the tree test.adt (Tree_Id = 1)
called in Asis.Iterator.Traverse_Element
with the argument : A_FUNCTION_BODY_DECLARATION
located in TEST (body, Unit_Id = 2, Context_Id = 1)
text position : test.adb:7:4
Nodes:
Node : 2315 - N_SUBPROGRAM_BODY
R_Node : 2315 - N_SUBPROGRAM_BODY
Node_Field_1 : 0 - N_EMPTY
Node_Field_2 : 0 - N_EMPTY
Rel_Sloc : 65
obtained from the tree test.adt (Tree_Id = 1)
called in Actual procedure for Pre_Operation
with the argument : A_PROCEDURE_BODY_DECLARATION
located in TEST (body, Unit_Id = 2, Context_Id = 1)
text position : test.adb:1:1
Nodes:
Node : 2279 - N_SUBPROGRAM_BODY
R_Node : 2279 - N_SUBPROGRAM_BODY
Node_Field_1 : 0 - N_EMPTY
Node_Field_2 : 0 - N_EMPTY
Rel_Sloc :-10
obtained from the tree test.adt (Tree_Id = 1)
called in Asis.Iterator.Traverse_Element
with the argument : A_PROCEDURE_BODY_DECLARATION
located in TEST (body, Unit_Id = 2, Context_Id = 1)
text position : test.adb:1:1
Nodes:
Node : 2279 - N_SUBPROGRAM_BODY
R_Node : 2279 - N_SUBPROGRAM_BODY
Node_Field_1 : 0 - N_EMPTY
Node_Field_2 : 0 - N_EMPTY
Rel_Sloc :-10
obtained from the tree test.adt (Tree_Id = 1)
-->%---
Is there anything wrong with my test, or am I facing an error in either the
ASIS implementation or AdaCtl here?
--
Markus
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ASIS exception with AdaCtl v1.19r10
2018-10-12 8:23 ASIS exception with AdaCtl v1.19r10 Markus Schöpflin
@ 2018-10-12 12:25 ` J-P. Rosen
2018-10-12 12:37 ` Markus Schöpflin
2018-10-12 12:50 ` J-P. Rosen
1 sibling, 1 reply; 6+ messages in thread
From: J-P. Rosen @ 2018-10-12 12:25 UTC (permalink / raw)
Le 12/10/2018 à 10:23, Markus Schöpflin a écrit :
> Given the following simple test program:
>
> [example snipped]
>
> Is there anything wrong with my test, or am I facing an error in either
> the ASIS implementation or AdaCtl here?
>
Excellent occasion to remind everybody that there is a bug tracking
system for AdaControl at https://sourceforge.net/p/adacontrol/tickets/
By all means, please report any issue you may have!
As for this particular case, I'll have a look at it. Please write to me
directly if you want a personalized answer, since you anonymized your
address.
(Hmmm... BTW GnatPRO 7.4.2 is quite old, did you try with a more recent
one?)
--
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] 6+ messages in thread
* Re: ASIS exception with AdaCtl v1.19r10
2018-10-12 12:25 ` J-P. Rosen
@ 2018-10-12 12:37 ` Markus Schöpflin
0 siblings, 0 replies; 6+ messages in thread
From: Markus Schöpflin @ 2018-10-12 12:37 UTC (permalink / raw)
On 10/12/18 2:25 PM, J-P. Rosen wrote:
> Le 12/10/2018 à 10:23, Markus Schöpflin a écrit :
>> Given the following simple test program:
>>
>> [example snipped]
>>
>> Is there anything wrong with my test, or am I facing an error in either
>> the ASIS implementation or AdaCtl here?
>>
>
> Excellent occasion to remind everybody that there is a bug tracking
> system for AdaControl at https://sourceforge.net/p/adacontrol/tickets/
>
> By all means, please report any issue you may have!
I will, once I'm convinced that AdaControl is at fault here. As I'm not sure
whether the ASIS library or AdaControl is the culprit, I decided to ask here
first.
> As for this particular case, I'll have a look at it. Please write to me
> directly if you want a personalized answer, since you anonymized your
> address.
Thanks. Will do.
> (Hmmm... BTW GnatPRO 7.4.2 is quite old, did you try with a more recent
> one?)
Not yet, will do, thanks for the hint. (BTW, GNAT Pro 7.4.2 has been released
somewhen in summer 2016, that's only two years ago. Not what I would consider
old, at least not for an Ada compiler.)
Markus
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ASIS exception with AdaCtl v1.19r10
2018-10-12 8:23 ASIS exception with AdaCtl v1.19r10 Markus Schöpflin
2018-10-12 12:25 ` J-P. Rosen
@ 2018-10-12 12:50 ` J-P. Rosen
2018-10-12 13:25 ` Markus Schöpflin
1 sibling, 1 reply; 6+ messages in thread
From: J-P. Rosen @ 2018-10-12 12:50 UTC (permalink / raw)
This is fixed now in the wavefront version of AdaControl.
Simple reproducer, easy to fix... Thanks.
Strange, it seems that nobody ever used a selected name with a 'BASE
attribute before...
--
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] 6+ messages in thread
* Re: ASIS exception with AdaCtl v1.19r10
2018-10-12 12:50 ` J-P. Rosen
@ 2018-10-12 13:25 ` Markus Schöpflin
2018-10-12 13:35 ` J-P. Rosen
0 siblings, 1 reply; 6+ messages in thread
From: Markus Schöpflin @ 2018-10-12 13:25 UTC (permalink / raw)
On 10/12/18 2:50 PM, J-P. Rosen wrote:
> This is fixed now in the wavefront version of AdaControl.
That was fast, thanks. So my other post has become obsolete. Will the GIT
repository over at Sourceforge contain the fix?
> Simple reproducer, easy to fix... Thanks.
Just for the sake of completeness: I tried with GNAT Pro 18.2 and got the same
error as with GNAT Pro 7.4.2.
[...]
Thanks again,
Markus
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ASIS exception with AdaCtl v1.19r10
2018-10-12 13:25 ` Markus Schöpflin
@ 2018-10-12 13:35 ` J-P. Rosen
0 siblings, 0 replies; 6+ messages in thread
From: J-P. Rosen @ 2018-10-12 13:35 UTC (permalink / raw)
Le 12/10/2018 à 15:25, Markus Schöpflin a écrit :
> That was fast, thanks. So my other post has become obsolete. Will the
> GIT repository over at Sourceforge contain the fix?
I don't update the Sourceforge very frequently, especially because I
like to be able to cancel or rework my local GIT tree, and you can't do
that anymore once you have pushed something.
Of course, supported users have beta versions as soon as they ask for...
--
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] 6+ messages in thread
end of thread, other threads:[~2018-10-12 13:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-12 8:23 ASIS exception with AdaCtl v1.19r10 Markus Schöpflin
2018-10-12 12:25 ` J-P. Rosen
2018-10-12 12:37 ` Markus Schöpflin
2018-10-12 12:50 ` J-P. Rosen
2018-10-12 13:25 ` Markus Schöpflin
2018-10-12 13:35 ` J-P. Rosen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox