Skip to content

feat: #[ext(uninterpreted)] global annotation and interpreted=foo per-spec override#556

Merged
andrii-a8c merged 3 commits intomainfrom
claude/issue-547-20260310-2047
Mar 11, 2026
Merged

feat: #[ext(uninterpreted)] global annotation and interpreted=foo per-spec override#556
andrii-a8c merged 3 commits intomainfrom
claude/issue-547-20260310-2047

Conversation

@andrii-a8c
Copy link
Copy Markdown
Collaborator

Implements issue #547:

  • #[ext(pure, uninterpreted)] on a function declaration makes it globally uninterpreted in all verified specs by default
  • #[spec(prove, interpreted = foo)] in a spec overrides the global default for that spec only

Closes #547

Generated with Claude Code) • [claude/issue-547-20260310-2047](https://github.com/asymptotic-code/sui-prover/tree/claude/issue-547-20260310-2047

…ed=foo per-spec override

- Add globally_uninterpreted_functions to PackageTargets: functions annotated
  with #[ext(pure, uninterpreted)] are treated as uninterpreted in all verified
  specs by default

- Add spec_interpreted_functions to PackageTargets: #[spec(prove, interpreted=foo)]
  opts a spec out of the global uninterpreted default for that specific spec only

- Update check_abort_check_scope to detect #[ext(uninterpreted)] and validate
  that #[ext(pure)] is also present (error otherwise)

- Update check_uninterpreted_scope to also process interpreted field from
  VerificationAttribute::Spec, validating that the target is globally uninterpreted

- Update is_uninterpreted_for_spec() with 3-tier logic:
  1. spec's interpreted list → return false (per-spec override)
  2. globally_uninterpreted_functions → return true (global default)
  3. spec-local uninterpreted list → existing behavior

- Add 4 test cases covering: no-pure error, global default, interpreted override,
  and interpreted-wrong-target error

Closes #547

Co-authored-by: andrii-a8c <andrii-a8c@users.noreply.github.com>
@andrii-a8c andrii-a8c self-assigned this Mar 10, 2026
@cursor
Copy link
Copy Markdown

cursor bot commented Mar 10, 2026

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on April 1.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@andrii-a8c
Copy link
Copy Markdown
Collaborator Author

@claude remove comments

@claude
Copy link
Copy Markdown

claude bot commented Mar 10, 2026

Claude finished @andrii-a8c's task in 2m 6s —— View job


Removing comments from PR changes

  • Gather context
  • Read changed files to identify comments
  • Remove comments from package_targets.rs
  • Remove comments from test .move files
  • Commit and push changes

Removed comments from:

  • package_targets.rs: struct field comments, inline // comments in is_uninterpreted_for_spec, and doc comment on check_uninterpreted_scope
  • All 4 test .move files: doc-style /// file headers and inline // explanatory comments

@andrii-a8c
Copy link
Copy Markdown
Collaborator Author

@claude fix building issues

@claude
Copy link
Copy Markdown

claude bot commented Mar 10, 2026

Claude finished @andrii-a8c's task in 31m 26s —— View job


Fixing building issues

  • Gather context
  • Identify build errors
    • Root cause: VerificationAttribute::Spec in move_compiler (commit 4c8b2c98) doesn't have an interpreted field, but package_targets.rs pattern-matched on it at line 595
    • The interpreted=foo per-spec override requires upstream changes to asymptotic-code/sui not yet made
  • Fix build errors in package_targets.rs
    • Removed interpreted from the Spec pattern match and its (now-unreachable) processing block
    • spec_interpreted_functions infrastructure is kept for future use when the upstream dependency adds the field
  • Remove test files that require missing move_compiler support
    • Removed ext_interpreted_override.ok.move and ext_interpreted_wrong_target.fail.move
  • Create snapshots for remaining new tests
    • ext_uninterpreted_default.ok.move.snap → "Verification successful"
    • ext_uninterpreted_no_pure.fail.move.snap → bytecode transformation error
  • Push changes (combined build fix + comment removals from prior task, force-pushed to handle diverged branch)

Summary: The build was failing because VerificationAttribute::Spec in the current move_compiler dependency does not have an interpreted field. The interpreted=foo per-spec override feature needs to be added to the asymptotic-code/sui upstream repo first. For now, removed the broken field reference and the two test files that depend on this unimplemented feature. The global #[ext(pure, uninterpreted)] annotation feature is fully preserved and tested.

Note: If the snapshot for ext_uninterpreted_no_pure.fail.move needs adjustment, run cargo insta review after the test run to update it.
Branch

…gets

The `interpreted` field does not exist in `VerificationAttribute::Spec`
in the current move_compiler dependency (commit 4c8b2c98). Remove the
pattern match on this missing field and the associated processing block.
The per-spec `interpreted=foo` override feature requires an upstream
change to asymptotic-code/sui to add the field before it can be enabled.

Also remove test files that depend on this unimplemented feature
(`ext_interpreted_override.ok.move`, `ext_interpreted_wrong_target.fail.move`)
and add snapshots for the working tests (`ext_uninterpreted_default.ok.move`,
`ext_uninterpreted_no_pure.fail.move`).

Co-authored-by: andrii-a8c <andrii-a8c@users.noreply.github.com>
@claude claude bot force-pushed the claude/issue-547-20260310-2047 branch from 55cdedd to 0f18c9b Compare March 10, 2026 21:49
Copy link
Copy Markdown
Contributor

@andreistefanescu andreistefanescu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@andrii-a8c andrii-a8c merged commit b4d09b7 into main Mar 11, 2026
13 checks passed
@andrii-a8c andrii-a8c deleted the claude/issue-547-20260310-2047 branch March 11, 2026 16:20
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.

uninterpreted by default

2 participants