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

Use type given by quint to build lambda bodies #2856

Merged
merged 3 commits into from
Mar 8, 2024

Conversation

bugarela
Copy link
Collaborator

@bugarela bugarela commented Mar 8, 2024

Hello :octocat:

Fixes informalsystems/quint#1393

The issue happened because we were only using the types given by Quint in the type map to annotate parameters, but not the result type of lambdas. This way, there was a mismatch in variable names on Apalache type inference (used for the body) and Quint type inference (used for the parameters).

This PR ensures that we always use Quint types.

  • Tests added for any new code
  • Ran make fmt-fix (or had formatting run automatically on all files edited)
  • Documentation added for any new functionality
  • Entries added to ./unreleased/ for any new functionality

@bugarela bugarela requested a review from shonfeder as a code owner March 8, 2024 21:33
@shonfeder
Copy link
Contributor

This PR ensures that we always use Quint types.

Just to be clear: we have always been using quint types, it's just a matter of where we were sourcing those types from.

Copy link
Contributor

@shonfeder shonfeder left a comment

Choose a reason for hiding this comment

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

LGTM!

Great work debugging and fixing here! That test is much more readable than what we were looking at before :D

.unreleased/bug-fixes/quint-lambda-types-conversion.md Outdated Show resolved Hide resolved
Co-authored-by: Shon Feder <shon@informal.systems>
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.90%. Comparing base (811b480) to head (ffc2437).

❗ Current head ffc2437 differs from pull request most recent head 3dac602. Consider uploading reports for the commit 3dac602 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2856      +/-   ##
==========================================
+ Coverage   78.89%   78.90%   +0.01%     
==========================================
  Files         467      467              
  Lines       15956    15959       +3     
  Branches     2625     2631       +6     
==========================================
+ Hits        12588    12592       +4     
+ Misses       3368     3367       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bugarela bugarela enabled auto-merge March 8, 2024 21:51
@bugarela bugarela merged commit dd1fef9 into main Mar 8, 2024
10 checks passed
@apalache-bot apalache-bot mentioned this pull request Mar 11, 2024
This was referenced Mar 18, 2024
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.

Apalache is inferring overly general types for operators with polymorphic types
3 participants