!ASIS Issue #033 !topic Corresponding_Declaration and Corresponding_Body !reference ASIS 95-15.26 !from Jesper Jorgensen 97-02-09 !keywords Corresponding_Declaration Corresponding_Body !discussion I miss to see the usefuleness of being able to locate a declaration in another context. How should the body and declaration be related?. If there is a compilation unit body X in some context and a compilation unit specification X in some other context, they might be totally unrelated, just accidentally having the same name. If they are unrelated, how should ASIS be able to locate some inner unit? I think that only searching in the same context makes sense. What is the intended use of the other possibility? !resolution Accepted, with Modifications. !date !Notes The following rationale for queries with an additional Context parameter appears in Annex D.4.8, titled "Queries with Additional Context Parameter". Several queries, including Corresponding_Declaration and Corresponding_Body, are overloaded with an additional parameter, Context. The additional queries are there for flexibility and power, should an ASIS implementation be able to take advantage of it. Some ASIS implementations may be able to support multiple open Contexts at the same time. Tools that would make use of more than one Context could be severely limited if they do not have the control provided by the Context parameter. An example of such a tool would be one that compared two contexts, identifying units appearing in both and ensuring their semantic dependent units were consistent, perhaps for some configuration management purpose. The Corresponding_Declaration in a different context should always be the declaration upon which the body depends semantically in that context, not just an unrelated declaration of the same name. ASIS implementations that only allow one open Context can implement these pairs of queries in tandem, with one simply calling the other and providing the current Context as a parameter. See also Issue #054.