Summary
RFC 0005's operation-limit section works the example "a" * 100000:
__mul__ is 1 function call + ceil(100000 / 256) = 392 string processing operations
Total: 393 operations
Both numbers are off by one: ceil(100000 / 256) is 391 (390 × 256 = 99,840, remainder
160 → one more unit), so the total is 1 + 391 = 392. The reference implementation agrees:
evaluate_with_metrics("'a' * 100000") reports operation_count == 392 (verified on
openjd-model 0.11.1, 0.11.2, and openjd-rs main at 1a89f3a).
The RULE is right and implementations follow it — only the worked example's arithmetic is
wrong. As written it invites an implementer to "match the example" and introduce an
off-by-one against every existing implementation.
(File location: rfcs/0005-expression-language.md, the "a" * 100000 example, currently
around line 1208.)
Summary
RFC 0005's operation-limit section works the example
"a" * 100000:Both numbers are off by one:
ceil(100000 / 256)is 391 (390 × 256 = 99,840, remainder160 → one more unit), so the total is 1 + 391 = 392. The reference implementation agrees:
evaluate_with_metrics("'a' * 100000")reportsoperation_count == 392(verified onopenjd-model0.11.1, 0.11.2, andopenjd-rsmainat1a89f3a).The RULE is right and implementations follow it — only the worked example's arithmetic is
wrong. As written it invites an implementer to "match the example" and introduce an
off-by-one against every existing implementation.
(File location:
rfcs/0005-expression-language.md, the"a" * 100000example, currentlyaround line 1208.)