Skip to content

Conversation

@celinval
Copy link
Contributor

@celinval celinval commented Sep 5, 2024

Previously, Kani was not able to resolve methods that belong to primitive types, which would not allow users to specify primitive types as stub target, neither for contracts.

Thus, extend the name resolution to be able to convert a type expression into a Ty for primitive types, and add a new method to search for function implementation for primitive types.

I also moved the type resolution logic to its own module to make it a bit cleaner.

Resolves #2646

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

@celinval celinval requested a review from a team as a code owner September 5, 2024 21:22
@github-actions github-actions bot added the Z-EndToEndBenchCI Tag a PR to run benchmark CI label Sep 5, 2024
Copy link
Contributor

@carolynzech carolynzech left a comment

Choose a reason for hiding this comment

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

Nice! You may want to add tests for the other PrimitiveIdent variants (bool and floats) for the sake of being exhaustive, but if you're confident enough that the logic is the same then I'm good either way.

@celinval celinval enabled auto-merge September 6, 2024 18:18
@celinval celinval added this pull request to the merge queue Sep 6, 2024
Merged via the queue into model-checking:main with commit 6f8ca94 Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Z-EndToEndBenchCI Tag a PR to run benchmark CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Ability to stub out function on primitive types (such as [T])

2 participants