Repository navigation
A specialized parameter of an empty type goes to --verdict at an opaque constant, so the kernel checks its def's body (#1186) - #1213
Closed
nicolas-abril wants to merge 1 commit into
Conversation
…ue constant, so the kernel checks its def's body (bendlang#1186) safe.ts sent a specialized parameter of a finite type out once per value, and a datatype with no constructors passed the "no constructor has fields" test vacuously: its def went out zero times, and --verdict passed a def the kernel never saw. An empty type now takes the opaque constant k~p that any other type takes: a body that never names p goes to the kernel, and one that does is out of scope (p has no model), so --verdict fails and names it. Closes bendlang#1186 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
Closing: this isn't the right fix. A The real gap is that |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1186.
Cause
In
root_colsinbend2/safe.ts, a~parameter whose type has finitely many values (aQuant, or a datatype whose constructors have no fields) makes its def go out once per value. A datatype with no constructors passed that test vacuously, so the def went out zero times. It was never emitted and never listed as out of scope, and--verdictprintedALL PROOFS CHECKfor a def the kernel never saw.Fix
An empty type no longer counts as finite (
adt.c.length > 0). It takes the opaque constantk~pthat any other type's specialized parameter takes. This follows the issue's alternative rather than marking the def out of scope, as suggested in the discussion:skipped.qv : ∀x0 : Nat -> Nat = λx0 => x0, and the verdict passes.absurd(v)) is out of scope, because the constant has no model.--verdictfails withuses: no model for uses~v. On main this case also passed silently.Checks
tests/check/spec_empty_param.bend(new) is the issue's repro. On mainskipis missing from the.bendtt; here it goes out and checks.--verdicton every test with a~parameter (73 files) gives identical output on main and on this branch.bun gates/repo.tspasses. The cluster gates (gates/test.ts,gates/safe.ts) weren't run.🤖 Generated with Claude Code