scopecomplete
Scopecomplete is a term used in programming language theory to describe a property of a program or language in which every identifier reference encountered during execution can be resolved to a binding within the accessible scope at that point. In practice, scopecomplete means that after applying the language's scope rules—such as lexical or static scoping, plus modules or namespaces—the set of declarations available in the environment provides a unique, well-defined binding for each reference.
Formal notion: A program is scopecomplete if for every reference r to an identifier id at position
Significance: Scopecomplete is used in discussions of compiler correctness and optimizations that assume stable binding, such
Examples: In a nested function scenario, a reference inside an inner function to a variable declared in
See also: lexical scoping, static scoping, closures, symbol table, name binding, program analysis.