protected boolean isWellDefined ( ) { int size = references . size ( ) ; if ( size == 0 ) { return false ; } // If this is a declaration that does not instantiate the variable, // it's not well-defined. Reference init = getInitializingReference ( ) ; if ( init == null ) { return false ; } checkState ( references . get ( 0 ) . isDeclaration ( ) ) ; BasicBlock initBlock = init . getBasicBlock ( ) ; for ( int i = 1 ; i < size ; i ++ ) { if ( ! initBlock . provablyExecutesBefore ( references . get ( i ) . getBasicBlock ( ) ) ) { return false ; } } return true ; }
Determines if the variable for this reference collection is well - defined . A variable is well - defined if we can prove at compile - time that it s assigned a value before it s used .