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

12 lines
388 B
Plaintext

// The reasoning sublanguage used as values: FORALL, EXISTS, SUM, and a set written by rule.
// EXPECT: TRUE
// EXPECT: FALSE
// EXPECT: 15
// EXPECT: 3
DECLARE L : LIST OF INTEGER
L <- [1, 2, 3, 4, 5]
OUTPUT FORALL K IN [0, LENGTH(L)) : L[K] > 0
OUTPUT EXISTS K IN [0, LENGTH(L)) : L[K] > 10
OUTPUT SUM K IN [0, LENGTH(L)) : L[K]
OUTPUT LENGTH({ K IN [0, LENGTH(L)) : L[K] MOD 2 == 1 })