You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--verdict fails on proofs bend checks in 0.06 s; the kernel copies terms without sharing, and running out of fuel is reported as a mismatch #1593
bend tests/proof/kernel_copy_shared.bend --verdict
What happened
SOME PROOFS FAIL
In doubles:
out of fuel
Sorry - this is a mismatch between the TypeScript implementation, and the formalized BendTT kernel. Your proofs may or may not be correct, and we cannot validate them yet. This will be addressed in a future update. Meanwhile, feel free to open an issue to report this bug.
bend checks this file in 0.06 s; --verdict runs out of fuel on it. Both sides name a value twice, n levels deep. bend shares that value, so its cost grows linearly with n. The BendTT kernel copies it each time instead, so its cost doubles with every level:
n
bend --check-only
--verdict
16
0.06 s
0.34 s, checks
20
0.07 s
4.2 s, checks
22
0.06 s
8.8 s, out of fuel
60
0.06 s
—
Nothing warns about this until --verdict runs. I ran into it proving an ARM64 trap handler correct by running its machine code symbolically: a state where each step reads the previous one. Written the obvious way, the kernel got 5 steps in before using 13 GB. The 80-step paths ended up cut into 154 segments of at most 8 steps, joined by a composition lemma, and the full kernel check took about 7 minutes (demos/hypervisor/SPEC.md §14 on my fork's hypervisor branch).
Possible fixes: the kernel evaluates a copied argument once and reuses it, or bend warns when a definition's unshared size would exceed the kernel's fuel. (#1535 already made the "out of fuel" reason visible; thanks.)
A test for it: main...GunnarZarncke:bend:kernel-copies-unshared. Its program prints its #| line on every lane, so gates/test.ts passes it, and gates/safe.ts should classify it as a false reject.
Closing as a duplicate of #1193 (same cause: the kernel copies a shared value at every use). I've moved the repro, scaling table, test branch and fix ideas over there. Thanks!
Activity
GunnarZarncke commentedon Oct 15, 2026
bend checks this file in 0.06 s; --verdict runs out of fuel on it. Both sides name a value twice, n levels deep. bend shares that value, so its cost grows linearly with n. The BendTT kernel copies it each time instead, so its cost doubles with every level:
Nothing warns about this until --verdict runs. I ran into it proving an ARM64 trap handler correct by running its machine code symbolically: a state where each step reads the previous one. Written the obvious way, the kernel got 5 steps in before using 13 GB. The 80-step paths ended up cut into 154 segments of at most 8 steps, joined by a composition lemma, and the full kernel check took about 7 minutes (demos/hypervisor/SPEC.md §14 on my fork's hypervisor branch).
Possible fixes: the kernel evaluates a copied argument once and reuses it, or bend warns when a definition's unshared size would exceed the kernel's fuel. (#1535 already made the "out of fuel" reason visible; thanks.)
A test for it: main...GunnarZarncke:bend:kernel-copies-unshared. Its program prints its #| line on every lane, so gates/test.ts passes it, and gates/safe.ts should classify it as a false reject.
Lorenzobattistela commentedon Oct 16, 2026
Closing as a duplicate of #1193 (same cause: the kernel copies a shared value at every use). I've moved the repro, scaling table, test branch and fix ideas over there. Thanks!