Skip to content

Regression tests for #4485 and #4487 (fixed by #4515) - #4606

Merged
nikswamy merged 1 commit into
masterfrom
_regression_4485_4487
Sep 26, 2026
Merged

nikswamy merged 1 commit into
masterfrom
_regression_4485_4487

Conversation

@nikswamy

Copy link
Copy Markdown
Contributor

This adds regression tests for two soundness bugs in the VC simplifier. Neither reproduces on current master: both were fixed by #4515.

Since #4515, a computation type carries only a result type, and its specification is a refinement of that type.

Tests

  • tests/bug-reports/closed/Bug4485.fst: the nonempty and exists repros, a bool variant, and the issue's three controls (an inhabited arrow type, an empty one given by a refinement of its result type, and a vacuously inhabited one), all as expect_failure. It also includes two definitions that must be accepted: witness_gives_false, and a witness that the vacuous type is inhabited.
  • tests/bug-reports/closed/Bug4487.fst:
    • the ==> and <==> repros, both inline and through type abbreviations, as expect_failure;
    • the effect-name control, as expect_failure;
    • the issue's proof of False, with the false implication as a hypothesis;
    • the control comparing an arrow type with an identical one, which must be accepted.

Checked:

Fixes #4485
Fixes #4487

Both soundness bugs in the VC simplifier no longer reproduce, since #4515
made a computation type carry only a result type, with its specification
as a refinement of it:

- #4485: clearly_inhabited judged an arrow inhabited from its result type,
  ignoring the postcondition. `unit -> Pure int True (fun _ -> False)` is
  now `unit -> r:int{False}`, whose result type is not clearly inhabited.
- #4487: term_eq compared computation types by effect and result type,
  ignoring their effect arguments. Two arrows differing only in their
  postcondition now differ in their (refined) result types.

The tests include the issues' repros, as expect_failure, and their
controls. They fail on a build that predates #4515.

Fixes #4485
Fixes #4487

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 35922588-addf-481a-aac9-a6e3d6713e84
@nikswamy
nikswamy enabled auto-merge September 26, 2026 06:03
@nikswamy
nikswamy added this pull request to the merge queue Sep 26, 2026
Merged via the queue into master with commit 92cc1fb Sep 26, 2026
3 checks passed
@nikswamy
nikswamy deleted the _regression_4485_4487 branch September 26, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant