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

18 lines
471 B
Plaintext

// The first label matches every X, so ISqrt(X) in the second label is never
// called. The checker kept its ENSURE (0 <= RESULT <= X) as a fact anyway.
// CALL: P(-1)
// MUST-NOT-PROVE: assert@16
FUNCTION ISqrt(N : INTEGER) RETURNS INTEGER
REQUIRE N >= 0
ENSURE RESULT >= 0 AND RESULT <= N
RETURN 0
ENDFUNCTION
PROCEDURE P(X : INTEGER)
CASE OF X
X, ISqrt(X) : OUTPUT "a"
OTHERWISE : OUTPUT "b"
ENDCASE
ASSERT X >= 0
ENDPROCEDURE