comp.lang.ada
 help / color / mirror / Atom feed
* Asis.Text.Character_Position : inconsistency ?
@ 2010-11-07  8:04 Yannick Duchêne (Hibou57)
  2010-11-07 12:34 ` Simon Wright
  2010-11-09 14:18 ` Vadim Godunko
  0 siblings, 2 replies; 9+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2010-11-07  8:04 UTC (permalink / raw)


Hello Ada writers,

I was trying to patch AdaControl ( http://www.adalog.fr/adacontrol2.htm )  
so that it can build with Gela-ASIS. This is an interesting process of  
little refactorisation, as Gela-ASIS is clearly design so that it make no  
reference at all to a specific compiler implementation (it do so defining  
an Implementation_Defined_Type from which other discrete types are  
derived). After a first attempt I restarted again and felt something was  
wrong as I could not get something coherent about types.

Prior note: I do not own a copy of the ISO ASIS reference, so I cannot  
tell who of TenDRA or ISO is right or wrong.

What disturbs me, if I believe (as I feel it is) that Gela-ASIS heavily  
stick on the ASIS standard: Asis.Text defines two types,  
Character_Position and Line_Number. Character_Position is derived from  
ASIS_Natural, which in turn is derived from ASIS_Integer, which, the  
latter, is implementation defined.

Also, Asis defines a type Asis.Program_Text, which is not implementation  
defined, and which is explicitly an unconstrained subtype of the Ada's  
type Standard.Wide_String.

Shouldn't be Asis.Text.Character_Position be defined so that is can be  
used as an index in Asis.Program_Text ? This would imply  
Character_Position would be a derived from Standard.Positive, and due to  
the way Character_Position is derived, as explained above, this would  
imply the root implementation defined type, should be instead, at least  
derived from Positive or an ancestor type of Positive.

Which is wrong ? TenDRA with Gela-ASIS or the ASIS ISO reference (which I  
do not own, so I cannot check).

Comments and lightings welcome from any one owning a copy of the ASIS  
reference, so that I can figure if I should primarily patch Gela-ASIS or  
AdaControl.

With thanks



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

end of thread, other threads:[~2010-11-12 19:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-07  8:04 Asis.Text.Character_Position : inconsistency ? Yannick Duchêne (Hibou57)
2010-11-07 12:34 ` Simon Wright
2010-11-07 19:03   ` Yannick Duchêne (Hibou57)
2010-11-07 19:18     ` Simon Wright
2010-11-07 19:35       ` J-P. Rosen
2010-11-12 19:35         ` Randy Brukardt
2010-11-07 19:20     ` Simon Wright
2010-11-07 20:44       ` Yannick Duchêne (Hibou57)
2010-11-09 14:18 ` Vadim Godunko

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