Skip to content

Conversation

@ssyram
Copy link
Contributor

@ssyram ssyram commented Sep 23, 2025

This PR enhanced the name-matcher mechanism to work also for the mono codes. The key is that when the newly added match_mono switch is on, the program now tries to extract out the generics stored within the name and match against this generics. This is a key component to ensure the migration to mono LLBC as in AeneasVerif/eurydice#275 .

Notable issue: now there is a discrepency between the parsers in Rust and OCaml. More concretely, the string used in Eurydice, that: core::slice::index::{core::ops::index::Index<[@T], @I>}::index<'_, @, core::ops::range::Range<usize>, [@]> cannot be recognised by Pattern::parse in Rust.

@ssyram ssyram changed the title Mono Name atcher Mono Name-Matcher Sep 23, 2025
@Nadrieril
Copy link
Member

For the name matcher tests, could you please use the existing rust-name-matcher-tests.rs and ml-name-matcher-tests.rs as much as possible instead of rolling your own logic.

Is there any reason to set match_mono to false? I think having it always true is what users would expect.

@ssyram
Copy link
Contributor Author

ssyram commented Sep 29, 2025

I don't know about why mono did not work. I assumed this might be some dedicated design... So in order not to break the existing usage, I kept the existing codes using false while only in Eurydice use true.

For the test, will try.

@Nadrieril
Copy link
Member

Nadrieril commented Sep 29, 2025

That wasn't a design choice, just something not yet implemented. Please remove that option and make the name matchers always work wirh monomorphized names.

@ssyram
Copy link
Contributor Author

ssyram commented Sep 29, 2025

Yes, will do.

@ssyram
Copy link
Contributor Author

ssyram commented Oct 2, 2025

Should have fixed all stuff. Also, I was surprised that in the ML version, the wildcard pattern was not supported. New example added for this case and the wildcard pattern is now supported.

@ssyram ssyram force-pushed the mono-name-matcher branch from 2cf1670 to bdbe53d Compare October 2, 2025 13:25
@Nadrieril Nadrieril force-pushed the mono-name-matcher branch 2 times, most recently from b3f9b4e to 339e709 Compare October 3, 2025 15:06
@Nadrieril Nadrieril added this pull request to the merge queue Oct 3, 2025
Merged via the queue into AeneasVerif:main with commit cf0caa5 Oct 3, 2025
13 of 14 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