!ASIS Issue #018
!topic Inconsistent subsets in ASIS 95
!reference ASIS95
!from Sergey Rybin 96-09-18
!keywords inconsistent consistent subsets unit
!discussion

1. ASIS is ill-defined for the situations when ASIS should process
   inconsistent unit sets (there are two kinds of these situations:
   semantic dependencies between compilation units, and semantic queries
   for elements, when the enclosing unit of the argument element is
   inconsistent with the enclosing unit of the result argument. During
   the technical discussion at the next to last ASISWG meeting in Florida
   we agreed, that Asis_Failed should be raised for the second situation -
   it would be nice to have this statement in the ASIS definition).
 
   The only statement related to processing inconsistent unit sets I
   have found in ASIS 95 is (just preceding the Semantic_Dependence_Order
   query in the Asis.Compilation_Units package):
 
--|AN Application Note:
--|AN
--|AN To properly determine unit consistency, use one of the two semantic
--|AN dependence queries: Elaboration_Order or Semantic_Dependence_Order.
--|AN These queries return a value of the type Relationship, which contains
--|AN lists of consistent, inconsistent, missing and circular units.
--|AN
--|AN For these two queries, the existence of units in one or more of the
--|AN inconsistent, missing, or circular units list means that the consistent
--|AN unit list may not be complete.
--|AN
--|AN Applications that do not check for inconsistent, missing, or circular
--|AN units before using the consistent list might not operate as expected.
--|AN
 
   Have I missed something important? If I have not, I would say, that
   it is too general and should be said in some more details.
 
 
2. I would suggest to add a new exception to the existing set of the ASIS
   exceptions (Asis_Inconsistent_Unit_Set??) for the situation when ASIS
   cannot provide any meaningful answer for a query because of some
   inconsistency between units needed to be accessed when processing
   the query.
 
   I would also explicitly indicate the situations when this exception
   may (should?) be raised. I think, the example with the
   Corresponding_Parent_Declaration query is on of such situations.

!resolution  Accepted, with Modification.
!date 96-12-03
!Notes

The term "consistency" in ASIS does not mean the same thing that it
does in Ada 95 (10.1.4(5)).  It was thought that perhaps we could use
the term "coherent" or somthing similar.

ASIS currently doesn't allow "versions" of Ada source, either.

Some discussion concerning this appears in ASIS version 2.0.K in
section 2.5.4.2 (of the draft Working Draft) and as Rationale section
D.4.2.  We duplicated some of the commentary from section 2.5.4.2 of
the ASIS document in their respective subprograms' commentary in
sections 3 through 23, making appropriate changes, such as "Semantic
queries across compilation unit boundaries may raise ASIS_FAILED if
the units are inconsistent with respect to each other."
