Skip to content

Conversation

@MikaelMayer
Copy link
Member

Fixes #5802

Description

Multiset iteration was implemented in the runtime but not imported to the Dafny-to-Rust code generator. Moreover, it did not iterate elements with multiplicity, which might be needed.
This PR adds support for multiset bounded pools so that multisets can be used in quantifiers and comprehensions.

How has this been tested?

A test in the runtime verifies the multiplicity, and I updated an existing test to test the enumeration in quantifiers and comprehensions.

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

Copy link
Contributor

@ssomayyajula ssomayyajula left a comment

Choose a reason for hiding this comment

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

Approved, almost identical to set bounded pools.

@MikaelMayer MikaelMayer enabled auto-merge (squash) October 1, 2024 17:53
@MikaelMayer MikaelMayer merged commit d978d55 into master Oct 1, 2024
22 checks passed
@MikaelMayer MikaelMayer deleted the fix-5802-multiset-bounded-pool branch October 1, 2024 18:05
MikaelMayer added a commit that referenced this pull request Oct 1, 2024
…or (#5803)

Fixes #5802

### Description
Multiset iteration was implemented in the runtime but not imported to
the Dafny-to-Rust code generator. Moreover, it did not iterate elements
with multiplicity, which might be needed.
This PR adds support for multiset bounded pools so that multisets can be
used in quantifiers and comprehensions.

### How has this been tested?
A test in the runtime verifies the multiplicity, and I updated an
existing test to test the enumeration in quantifiers and comprehensions.

<small>By submitting this pull request, I confirm that my contribution
is made under the terms of the [MIT
license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
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.

Dafny-to-Rust: Multiset bounded pool not supported

2 participants