Version 1.1 of ais/ai-00209.txt

Unformatted version of ais/ai-00209.txt version 1.1
Other versions for file ais/ai-00209.txt

!standard H.3.1 (8)          98-10-01 AI95-00209/00
!class confirmation 98-10-01
!status received 98-10-01
!priority Medium
!difficulty Easy
!subject pragma Reviewable; can objects become uninitialized?
!summary 98-10-01
!question 98-10-01
When pragma Reviewable is being used, can objects become uninitialized?
Consider the following example:
declare A : Integer := 42; B : Integer; C : Integer; begin A := C; -- C is unititialized B := A; -- Is A initialized??? end;
The error in the program above is clearly the first statement. Will it be correct to state at the reference to C, that C is "possibly unititialized" and at the reference to A, that A is "known to be initialized" (initialized once, always initialized)?
!response 98-10-01
!appendix

!topic pragma Reviewable; "known to be inititialized"
!reference AARM95-H.3.1(8);6.0
!from Sven Soerensen 98-07-03
<<reference as: 1998-15867.a Sven H. Sorensen 1998-7-6>>
!discussion

AARM95-H.3.1(8):
        For each reference to a scalar object, an identification
        of the reference as either ``known to be initialized,''
        or ``possibly uninitialized,'' independent of whether
        pragma Normalize_Scalars applies;

My question is:
Can scalar objects _become_ unitialized?

Consider the following example:

declare
   A : Integer := 42;  
   B : Integer;
   C : Integer;
begin
   A := C;  -- C is unititialized
   B := A;  -- Is A initialized???
end;

The error in the program above is clearly the first statement.
Will it be correct to state at the reference to C, that C is "possibly
unititialized" and at the reference to A, that A is "known to be
initialized" (initialized once, always initialized)?

If scalar objects can become unititialized it is, as far as I
can see, necessary to make a global analysis in order to claim
that that an object is "known to be initialized".


-- Sven

****************************************************


Questions? Ask the ACAA Technical Agent