Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > Ada Code > Reverse engineering legacy Ada code > Mapping information for Reverse engineering Ada > With, use and use type clause mapping for reverse engineering Ada (Ada code)
  
With, use and use type clause mapping for reverse engineering Ada (Ada code)
For each With clause in an Ada package, the Reverser creates a Dependency from the calling Modeler Package or Class to the referenced Modeler Package and Class if possible, else the name of the referenced Ada package is recorded as a tagged value of the calling Modeler Package or Class.
If the referenced Ada package is reverse engineered, the Reverser creates a Dependency from the calling Modeler Package or Class to the referenced Modeler Package or Class. The Dependency is stereotyped by the «Ada Context» stereotype, which applies the Ada With tag definition:
If the With clause is in the package specification, the tagged value of the Ada With tag definition is set to Specification.
If the With clause is in the package body, the tagged value of the Ada With tag definition is set to Body.
If the referenced Ada package is not reverse engineered, the Reverser stereotypes the calling Modeler Package or Class with the «Ada Context» stereotype, which applies the Ada_Delcaration_Dependencies and Ada_Implementation_Dependencies tag definitions:
If the With Clause is in the package specification, the tagged value of the Ada_Delcaration_Dependencies tag definition is set to the name of the referenced Ada package.
If the With Clause is in the package body, the tagged value of the Ada_Implementation_Dependencies tag definition is set to the name of the referenced Ada package.
For each Use clause in an Ada package, the Reverser creates a Dependency from the calling Modeler Package or Class to the referenced Modeler Package and Class if possible, else the name of the referenced Ada package is recorded as a tagged value of the calling Modeler Package or Class.
If the referenced Ada package is reverse engineered, the Reverser creates a Dependency from the calling Modeler Package or Class to the referenced Modeler Package or Class. The Dependency is stereotyped by the «Ada Context» stereotype, which applies the Ada Use tag definition:
If the Use clause is in the package specification, the tagged value of the Ada Use tag definition is set to Specification.
If the Use clause is in the package body, the tagged value of the Ada Use tag definition is set to Body.
If the referenced Ada package is not reverse engineered, the Reverser stereotypes the calling Modeler Package or Class with the «Ada Context» stereotype, which applies the Ada_Delcaration_Dependencies and Ada_Implementation_Dependencies tag definitions:
If the Use Clause is in the package specification, the tagged value of the Ada_Delcaration_Dependencies tag definition is set to the name of the referenced Ada package.
If the Use Clause is in the package body, the tagged value of the Ada_Implementation_Dependencies tag definition is set to the name of the referenced Ada package.
* 
Use clauses that appear in declarations, such as Task declarations, are reverse engineered with the declaration.
For each Use Type clause in an Ada Package, the Reverser stereotypes the calling Modeler Package or Class with the «Ada Context» stereotype, which applies the Ada_Delcaration_Dependencies and Ada_Implementation_Dependencies tag definitions:
If the Use Type clause is in the package specification, the tagged value of the Ada_Delcaration_Dependencies tag definition is set to the use type clause text.
If the Use Type clause is in the package body, the tagged value of the Ada_Implementation_Dependencies tag definition is set to the use type clause text.