Ada With and Withby Kinds

Kind Name
Entity Performing Reference
Entity Being Referenced
Ada With Body
some_proc
some_pack
Ada Withby Body
some_pack
some_proc
Ada With Spec
some_proc
some_pack
Ada Withby Spec
some_pack
some_proc
Ada With Needed Body
some_proc
some_pack
Ada Withby Needed Body
some_pack
some_proc
Ada With Needed Spec
some_proc
some_pack
Ada Withby Needed Spec
some_pack
some_proc
Ada Withaccess
some_proc
some_pack
Ada Withaccessby
some_pack
some_proc

Relations ending with Body are for withs from program unit bodies. Relations ending with Spec are for withs from program unit specs.

With and Withby reference kinds indicate a reference to a program unit in with clause, when the with is not actually needed. In cases where the with is needed, the reference kind is Ada With Needed.

package some_pack is 
   type some_type is range 1..10; 
end; 
with some_pack; 
procedure some_proc is 
begin 
   null; 
end; 

WithNeeded and WithbyNeeded indicate a reference to a program unit in with clause, when the with is needed. In cases where the with is not actually needed, the reference kind is Ada With.

package some_pack is 
   type some_type is range 1..10; 
end; 
with some_pack; 
procedure some_proc is 
   some_obj : some_pack.some_type;  -- with of some_pack 
is needed 
begin 
   null; 
end; 

Withaccess and Withaccessby reference kinds indicate that a program unit is utilizing a with link to a program unit that was not directly withed it. Typically, with links are either "With" or "WithNeeded".

These relations indicate what program unit is withed and whether or not the with clause was actually necessary. There are times however, when a compilation unit may access a withed unit even though it does not itself contain a with clause for the unit. This may occur in subunits, and in child library units. In these cases, a withaccess relation to the accessed program unit is generated.

package some_pack is 
   type some_type is range 1..10; 
end; 
with some_pack; use some_pack; 
procedure parent_proc is  
   procedure some_proc is separate; 
begin 
   null; 
end; 
separate(parent_proc) 
procedure some_proc is 
   x : some_type; 
begin 
   null; 
end; 

Scientific Toolworks, Inc.
http://www.scitools.com