Skip to content

Test: Regression test for Pulse fn extraction with .fsti interface#574

Merged
gebner merged 1 commit intomainfrom
nik_testcase_for_extraction_with_interfaces
Feb 28, 2026
Merged

Test: Regression test for Pulse fn extraction with .fsti interface#574
gebner merged 1 commit intomainfrom
nik_testcase_for_extraction_with_interfaces

Conversation

@nikswamy
Copy link
Copy Markdown
Contributor

@nikswamy nikswamy commented Feb 27, 2026

Adds a minimal test case that verifies Pulse fn declarations in .fsti interface files are correctly extracted to C via KaRaMeL. Previously, such functions were silently dropped due to the interleaver not recognizing DeclToBeDesugared as an interface declaration (fixed in FStarC.ToSyntax.Interleave.fst).

The test defines:

  • pure_add: a pure function (control — always worked)
  • pulse_read_ref: a Pulse fn reading a ref (was dropped, now extracted)

Both must appear in the generated .c file.

The .c.expected file is checked against actual KaRaMeL output by mk/test.mk's automatic diff mechanism.

NS: Yes, this indeed fails without the F* PR FStarLang/FStar#4110

Adds a minimal test case that verifies Pulse fn declarations in .fsti interface
files are correctly extracted to C via KaRaMeL. Previously, such functions were
silently dropped due to the interleaver not recognizing DeclToBeDesugared as an
interface declaration (fixed in FStarC.ToSyntax.Interleave.fst).

The test defines:
- pure_add: a pure function (control — always worked)
- pulse_read_ref: a Pulse fn reading a ref (was dropped, now extracted)

Both must appear in the generated .c file. The .c.expected file is checked
against actual KaRaMeL output by mk/test.mk's automatic diff mechanism.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@gebner gebner force-pushed the nik_testcase_for_extraction_with_interfaces branch from dbeb478 to 09b73ec Compare February 28, 2026 00:35
@gebner gebner merged commit 29e3219 into main Feb 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants