[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable stubbing and function contracts for primitive types #3496

Merged
merged 6 commits into from
Sep 6, 2024

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-BenchCI 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 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
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Z-BenchCI 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