Robert Dewar wrote: > > Yoav posted a large program and one problem mentioned is that controlled > types can only be declared at the library level. THis is correct, GNAT > is giving you a correct diagnostic. Controlled types are tagged types, > and tagged types must be extended at the same level as their parents. > > As for the other "problem", no idea! Please post short concise examples, > CLA is not the place to post large chunks of code and ask "what's wrong?" > > You might also want to follow the GNAT directions and send GNAT > questions to report@gnat.com, although there too, you need to make > an effort to provide a concise example of your question rather than > just dumping your whole program! I've taken Robert's reply into consideration and since he gave me the answer for the controlled problem I now post a small spec-only example for the compile time error of gnat regarding dispatching of abstract routine. in the following example , I try to define an ADT , set, which can be implemented in various ways and a routine , convert, to convert between two such implementations. The problem is that gnat does not know how to dispatch the 'unit' function call in 'convert' body. any ideas ? I guess the problem is that the signature of the routine (except the returned type) does not contain any derivation of the set class. But I think that the compiler can deduce which routine to call by the type expected by the unit routine to return . So here it is...