publicwhile
Publicwhile is a hypothetical programming construct used in discussions of program semantics and formal verification. In this concept, a while loop is annotated with a visibility modifier indicating that the loop's invariants, guards, and observable effects are part of the program's public contract and must be verifiable by external observers.
Origin and terminology: The term emerges in academic discourse about transparent computation and auditable software, particularly
Semantics and design: A publicwhile loop differs from a standard while by mandating explicit public invariants
Usage and benefits: Publicwhile is used in theoretical models and teaching to illustrate the relationship between
Limitations: It introduces overhead for invariant maintenance, limits privacy, and depends on language support and verification
See also: formal verification, loop invariant, auditable software, smart contract verification.