We analyse the conventional sum-based representation of iteration from the perspective of programmers, and show that the syntax they suggest is fundamentally not a good representation of Java-style iteration with for, while, break, and continue. We present an alternative syntax, which we call “labelled iteration”, where loops are identified using labels. The languages are analysed: we give denotational and operational semantics, adequacy proofs for both languages, and a translation function from sum-based iteration to labelled iteration.
|Name||Electronic Notes in Theoretical Computer Science |
|Conference||32nd Conference on the Mathematical Foundations of Programming Semantics(MFPS XXXII)|
|Period||23/05/16 → 26/05/16|