Appendix A Entity and Reference Kinds

prevnext

Ada Reference Kinds


This section lists the general categories of Ada reference kinds (and inverse relations) and the specific kind literal names associated with them.

Ada Association and Associationby Kinds

Reference KIND FULlName Reference Kind LITERAL name Scope (entity performing reference Entity being referenced
Ada Association Udb_adaAssociation main param
Ada Associationby Udb_adaAssociationby param main

Association and Associationby reference kinds indicate a reference to a formal parameter in a named parameter association.

 procedure main is
 begin
    some_proc(param => 5);
 end;

Ada Call and Callby Kinds

Reference KIND FULlName Reference Kind LITERAL name Scope (entity performing reference Entity being referenced
Ada Call Udb_adaCall main some_proc
Ada Callby Udb_adaCallby some_proc main

Call and Callby reference kinds indicate an invocation of a subprogram or entry.

 procedure main is
 begin
    some_proc(5);
 end;
 

Ada Child and Parent Kinds

Reference KIND FULlName Reference Kind LITERAL name Scope (entity performing reference Entity being referenced
Ada Child Libunit Udb_adaChildLibunit parent_pack child_pack
Ada Parent Libunit Udb_adaParentLibunit child_pack parent_pack

Child and Parent Libunits references indicate that an entity is a child library unit of another entity.

 package parent_pack is
     ...
 end;
 package parent_pack.child_pack is
    ...
 end;
 

Ada Declare and Declarein Kinds

Reference KIND FULlName Reference Kind LITERAL name Scope (entity performing reference Entity being referenced
Ada Declare Udb_adaDeclare some_pack some_obj
Ada Declarein Udb_adaDeclarein some_obj some_pack
Ada Body Declare Udb_adaDeclareBody some_pack some_proc
Ada Body Declarein Udb_adaDeclareinBody some_proc some_pack
Ada Formal Declare Udb_adaDeclareFormal gen_pack item
Ada Formal Declarein Udb_adaDeclareinFormal item gen_pack
Ada Incomplete Declare Udb_adaDeclareIncomplete some_pack item
Ada Incomplete Declarein Udb_adaDeclareinIncomplete item some_pack
Ada Instance Declare Udb_adaDeclareInstance some_proc my_pack
Ada Instance Declarein Udb_adaDeclareinInstance my_pack some_proc
Ada Private Declare Udb_adaDeclarePrivate line 2: some_pack
line 4: some_pack
line 2: t line 4: t
Ada Private Declarein Udb_adaDeclareinPrivate line 2: t
line 4: t
line 2: some_pack
line 4: some_pack
Ada Spec Declare Udb_adaDeclareSpec some_pack some_proc
Ada Spec Declarein Udb_adaDeclareinSpec some_proc some_pack
Ada Stub Declare Udb_adaDeclareStub some_pack some_proc
Ada Stub Declarein Udb_adaDeclareinStub some_proc some_pack

Declare and Declarein reference kinds indicate that an entity declares a non program unit entity.

 package some_pack is
    some_obj : integer;
 end;
 

Body Declare and Body Declarein reference kinds indicate that an entity declares a program unit body.

 package body some_pack is
    procedure some_proc is
    begin
       null;
    end;
 end;
 

Spec Declare and Spec Declarein reference kinds indicate that an entity declares a program unit spec.

 package some_pack is
    procedure some_proc;
 end;
 

Formal Declare and Formal Declarein reference kinds indicate that an entity declares a generic formal parameter.

 generic
    type item is private;
 package gen_pack is
    ...
 end;
 

Incomplete Declare and Incomplete Declarein reference kinds indicate that an entity declares an incomplete type.

 package some_pack is
 type item;
    ...
 end;
 

Instance Declare and Instance Declarein reference kinds indicate that an entity declares an instance of a generic.

 generic
 package gen_pack is
    ...
 end;
 
 with gen_pack;
 procedure some_proc is
    package my_pack is new gen_pack;
 begin
    null;
 end;
 

Private Declare and Private Declarein reference kinds indicate a declaration of a private type that occurs in the private part of a package specification.

  1   package some_pack is
  2      type t is private;
  3   private
  4      type t is new integer;
  5   end;
 

Stub Declare and Stub Declarein reference kinds indicate that an entity declares a program unit stub.

 package body some_pack is
    procedure some_proc is separate;
 end;

Ada Derive and Derivefrom Kinds

Reference KIND FULlName Reference Kind LITERAL name Scope (entity performing reference Entity being referenced
Ada Derive Udb_adaTypeDerive some_proc some_pack
Ada Derivefrom Udb_adaTypeDerivefrom some_pack some_proc

Derive and Derivefrom reference kinds indicate the parent type for a derived type.

 package some_pack is
    type some_type is range 1..10;
    type derived_type is new some_type;
 end;
 

Ada Dot and Dotby Kinds

Reference KIND FULlName Reference Kind LITERAL name Scope (entity performing reference Entity being referenced
Ada Dot Udb_adaDot some_proc some_pack
Ada Dotby Udb_adaDotby some_pack some_proc

Dot and Dotby reference kinds indicate a reference to an entity as a prefix in an expanded name.

 package some_pack is
    a : integer;
 end;
 with some_pack;
 procedure some_proc is
 begin
    some_pack.a := 5;
 end;

Ada End and Endby Kinds

Reference KIND FULlName Reference Kind LITERAL name Scope (entity performing reference Entity being referenced
Ada End Udb_adaEnd some_pack some_pack
Ada Endby Udb_adaEndby some_pack some_pack

End and Endby reference kinds indicate a reference to an entity in its end statement.

 package some_pack is
    ...
 end some_pack;

Ada Handle and Handleby Kinds

Reference KIND FULlName Reference Kind LITERAL name Scope (entity performing reference Entity being referenced
Udb_adaHandle Udb_adaHandle some_proc some_exception
Udb_adaHandleby Udb_adaHandleby some_exception some_proc

Handle and Handleby reference kinds indicate a reference to an exception entity in an exception handler.

 procedure some_proc is
 begin
   ...
 exception
    when some_exception =>
 	   ...
 end;
 

Ada Instance and Instanceof Kinds

Reference KIND FULlName Reference Kind LITERAL name Scope (entity performing reference Entity being referenced
Ada Instance Udb_adaInstance my_pack gen_pack
Ada Instanceof Udb_adaInstanceof gen_pack my_pack
Ada Instance Copy Udb_adaInstanceCopy my_pack.nested_proc gen_pack.nested_proc
Ada Instanceof Copy Udb_adaInstanceofCopy gen_pack.nested_proc my_pack.nested_proc

Instance and Instanceof references indicates that an instantiated entity is an instance of a generic entity.

 generic
 package gen_pack is
    ...
 end;
 with gen_pack;
 procedure some_proc is
    package my_pack is new gen_pack;
 begin
    ...
 end;
 

Instance Copy and Instanceof Copy references indicates that an entity was created as a copy of an entity in a generic package.

At the point of an instantiation, a copy of each entity declared inside the generic is created. These entities are linked to the cooresponding entity in the generic with an "instanceof copy" relation.

 generic
 package gen_pack is
    procedure nested_proc;
 end;
 with gen_pack;
 procedure some_proc is
    package my_pack is new gen_pack;
 begin
    my_pack.nested_proc;
 end;
 

Ada Raise and Raiseby Kinds

Reference KIND FULlName Reference Kind LITERAL name Scope (entity performing reference Entity being referenced
Ada Raise Udb_adaRaise some_proc some_exception
Ada Raiseby Udb_adaRaiseby some_exception some_proc

Raise and Raiseby reference kinds indicate a program unit explicitly raised an exception.

 procedure some_proc is
 begin
    raise some_exception;
 end;
 

Ada Ref and Refby Kinds

Reference KIND FULlName Reference Kind LITERAL name Scope (entity performing reference Entity being referenced
Ada Ref Udb_adaRef array_type some_type
Ada Refby Udb_adaRefby some_type array_type

Ref and Refby kind reference kinds indicate a reference to an entity that does not fall under any other catagory.

All occurances of an entity name have an associated reference. If the reference is not one of the other kinds described, it will be of type Udb_adaRef. Examples are the use of a type name in an array bounds declaration, and the use of an entity in a representation clause.

 package some_pack is
    type some_type is 1..10;
    type array_type is array(some_type) of integer;
 end;
 

Ada Rename and Renameby Kinds

Reference KIND FULlName Reference Kind LITERAL name Scope (entity performing reference Entity being referenced
Ada Rename Udb_adaRename sp some_pack
Ada Renameby Udb_adaRenameby some_pack sp

Rename and Renameby reference kinds indicate an entity is a renaming declaration of another entity.

 package some_pack is
    ...
 end;
 with some_pack;
 procedure some_proc is
    package sp renames some_pack;
 begin
    ...
 end;
 

Ada Root and Rootin Kinds

Reference KIND FULlName Reference Kind LITERAL name Scope (entity performing reference Entity being referenced
Ada Root Udb_adaRoot some_file.ada some_pack
Ada Rootin Udb_adaRootin some_pack some_file.ada

Root and Rootin reference kinds indicate that an entity is a library unit or library unit body in a file. There is a "root" link from a file entity to each library unit and library unit body declared in the file.

 file some_file.ada contains
    package some_pack is
       ...
    end;
 

Ada Separatefrom and Separate Kinds

Reference KIND FULlName Reference Kind LITERAL name Scope (entity performing reference Entity being referenced
Ada Separatefrom Udb_adaSeparatefrom some_proc some_pack
Ada Separate Udb_adaSeparate some_pack some_proc

Separatefrom and Separate reference kinds indicate that a program unit entity is declared as separate from another program unit.

 separate(some_pack)
 procedure some_proc is
 begin
   ...
 end;
 

Ada Set and Setby Kinds

Reference KIND FULlName Reference Kind LITERAL name Scope (entity performing reference Entity being referenced
Ada Set Udb_adaSet some_proc some_object
Ada Setby Udb_adaSetby some_object some_proc

Set and Setby reference kinds indicate that a program unit assigns a value to an object.

 procedure some_proc is
    some_object : integer;
 begin
    some_object := 0;
 end;

Ada Subtype and Ada Subtypefrom Kinds

Reference KIND FULlName Reference Kind LITERAL name Scope (entity performing reference Entity being referenced
Ada Subtype Udb_adaTypeSubtype some_type some_subtype
Ada Subtypefrom Udb_adaTypeSubtypefrom some_subtype some_type

Subtype and Subtypefrom reference kinds indicate the parent type for a subtype.

 package some_pack is
    type some_type is range 1..10;
    subtype some_subtype is some_type range 1..5;
 end;
 

Ada Typed and Typedby Kinds

Reference KIND FULlName Reference Kind LITERAL name Scope (entity performing reference Entity being referenced
Ada Typed Udb_adaTyped some_type some_object
Ada Typedby Udb_adaTypedby some_object some_type
Ada Typed Implicit Udb_adaTypedImplicit integer gen_func
Ada Typedby Implicit Udb_adaTypedbyImplicit gen_func integer

Typed and Typedby reference kinds indicate that an object or component is of the specified type or that a function returns returns the specified type.

 package some_pack is
    type some_type is range 1..10;
    some_object : some_type;
 end;
 

Typed Implicit and Typedby Implicit reference kinds is used to specify the type of an entity where the entity type is not explicitly declared. Specifically, enumeration literals, types of instantiated functions, and loop parameters use this relation.

 generic
    type t is private;
 function gen_func return t;
 with gen_func;
 procedure some_proc is
    function my_func is new gen_func(integer);
 begin
    ...
 end;
 

Ada Use and Useby Kinds

Reference KIND FULlName Reference Kind LITERAL name Scope (entity performing reference Entity being referenced
Ada Use Udb_adaUse ex 1: some_proc ex 2: some_proc ex 1: some_object ex 2: some_task
Ada Useby Udb_adaUseby ex 1: some_object ex 2: some_task ex 1: some_proc ex 2: some_proc

Use and Useby reference kinds indicate the read of an object, or use of a task or protected object in an expanded name.

Example 1:

 package some_pack is
    some_object : integer;
 end;
 with some_pack;
 procedure some_proc is
    local_object : integer;
 begin
    local_object := some_object;
 end;
 

Example 2:

 procedure some_proc is
    task some_task is
 	   entry e;
    end;
  begin
 	 some_task.e;
  end;

Ada Usepackage and Usepackageby Kinds

Reference KIND FULlName Reference Kind LITERAL name Scope (entity performing reference Entity being referenced
Ada Usepackage Udb_adaUsePackage some_proc some_pack
Ada Usepackageby Udb_adaUsePackageby some_pack some_proc

Usepackage and Usepackageby reference kinds indicate a reference to a package in a use clause.

 package some_pack is
    ...
 end;
 with some_pack; use some_pack;
 procedure some_proc is
 begin
    ...
 end;

Ada UseType and UseTypeby Kinds

Reference KIND FULlName Reference Kind LITERAL name Scope (entity performing reference Entity being referenced
Ada Usetype Udb_adaUseType some_proc some_type
Ada Usetypeby Udb_adaUseTypeby some_type some_proc

Usetype and Usetypeby reference kinds indicate a reference to a type in a use type clause.

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

Ada With and Withby Kinds

Reference KIND FULlName Reference Kind LITERAL name Scope (entity performing reference Entity being referenced
Ada With Udb_adaWith some_proc some_pack
Ada Withby Udb_adaWithby some_pack some_proc
Ada With Needed Udb_adaWithNeeded some_proc some_pack
Ada Withby Needed Udb_adaWithbyNeeded some_pack some_proc
Ada Withaccess Udb_adaWithAccess some_proc some_pack
Ada Withaccessby Udb_adaWithAccessby some_pack some_proc

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 Udb_adaWithNeeded.

 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 reference kinds indicate a reference to a program unit in with clause, when the with is needed. In cases where the with is not acutally needed, the reference kind is Udb_adaWith.

 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;
 

prevnext


Scientific Toolworks, Inc.
http://www.scitools.com
Voice: (802) 763-2995
Fax: (802) 763-3066
support@scitools.com
sales@scitools.com