Files
pplus-library/pseudo/prover/foreach-empty.pseudo
T
alexm 568474d52f
Test (in pplus-core) / in-core (push) Failing after 28m44s
Initial commit
2026-11-12 22:23:48 -05:00

14 lines
360 B
Plaintext

// The way out of a FOR EACH loop includes the case of no pass at all. A
// checker that kept "X is in Xs" on the way out held FALSE after looping over
// an empty list, and proved anything, even 1 == 2.
// MUST-NOT-PROVE: assert@12
DECLARE Xs : LIST OF INTEGER
DECLARE S : INTEGER
Xs <- []
S <- 0
FOR EACH X IN Xs
S <- S + X
NEXT X
ASSERT 1 == 2
OUTPUT S