Skip to content

Conversation

@MikaelMayer
Copy link
Member

@MikaelMayer MikaelMayer commented Jul 10, 2025

Summary

This PR fixes issue #6304 where set extensionality axioms could not be applied when sets were assigned using havoc operations.

Problem

When a set variable is assigned using havoc (e.g., ), the definite assignment tracker was being marked after the havoc operation. However, for set extensionality axioms to work properly, the type's where clause needs to be assumed before the havoc operation.

This caused issue #6305. There are surely other issues as well that this PR fixes, but we will discover this later.

Solution

The fix ensures that for havoc assignments to variables with definite assignment tracking, the definite assignment tracker is marked before the havoc operation. This allows:

  1. The where clause to be properly assumed during the havoc
  2. Set extensionality axioms to be applied correctly
  3. Proper verification of set equality based on membership equivalence

Changes

  • ProcessRhss: Added pre-processing to mark definite assignment trackers before havoc operations
  • ProcessUpdateAssignRhss: Handle multi-assignment cases
  • Variable declarations: Handle havoc assignments in variable declarations
  • LHS builder: Updated logic to avoid double-marking definite assignment trackers

Testing

Added integration test that demonstrates the fix working for both subset and equality assertions with havoc-assigned sets.

Fixes #6304

- Mark definite assignment tracker BEFORE havoc for variables with definite assignment tracking
- This ensures where clauses are properly assumed during havoc operations
- Enables set extensionality axioms to work correctly with havoc assignments
- Fixes issue #6304

Changes:
- ProcessRhss: Pre-mark definite assignment trackers for havoc assignments
- ProcessUpdateAssignRhss: Handle multi-assignment cases
- Variable declarations: Handle havoc assignments in var declarations
- LHS builder: Avoid double-marking definite assignment trackers
@MikaelMayer
Copy link
Member Author

After investigation, it appears that the issue this PR was intended to fix may not exist in the current codebase. Testing shows that set extensionality with havoc assignments works correctly on the current master branch. The CI failures were likely due to the complexity of the changes rather than the core issue. Closing this PR as the problem may have been resolved by other changes or may not have been a real issue.

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.

Set extensionality cannot be proved because type of local variables is not assumed.

1 participant