Jonathan S. Shapiro wrote:
>>From a safety perspective, I believe that the following constraints are
> sufficient to ensure safety:
> 
>   1. Field p must be properly initialized to a non-null pointer
>      before it is used.
> 
>   2. The object pointer must not escape from the constructor
>      until all such type safety constraints are satisified.
>      In particular this constrains exception values.
> 
> First, does everyone agree that these conditions are sufficient?
> 
> Second, do we believe that we can specify an algorithm for checking this
> property so that it can be statically determined at source level whether
> a program is well-formed w.r.t. type safety?

The following paper addresses the issue of having no-null types in an
object language, especially about issues with construction, when
objects are not fully constructed, but available.

Manuel Fähndrich and Rustan Leino, ``Declaring and Checking Non-Null
Types in an Object-Oriented Language,'' Proc. 18th ACM Conference on
Object-Oriented Programming Systems, Languages, and Applications,
Anaheim, CA, October 2003.
http://research.microsoft.com/~maf/Papers/non-null.pdf

I have not yet fully read the paper. It might also turn out to be an
overkill for the particular problem currently at hand.

Swaroop.
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to