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

core: Implement and use ConstraintContext #2700

Merged
merged 11 commits into from
Jun 10, 2024
Merged

Conversation

PapyChacal
Copy link
Collaborator

Just define ConstraintContext to encapsulate the constraint variables used in verification and inference.
Also, define a default value for this argument in verification, to verify with an empty context.

@PapyChacal PapyChacal added the core xDSL core (ir, textual format, ...) label Jun 9, 2024
@PapyChacal PapyChacal self-assigned this Jun 9, 2024
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@PapyChacal PapyChacal changed the base branch from main to emilien/entry-args June 9, 2024 10:32
Copy link

codecov bot commented Jun 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.87%. Comparing base (dff9ea4) to head (6898caf).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2700      +/-   ##
==========================================
+ Coverage   89.86%   89.87%   +0.01%     
==========================================
  Files         367      367              
  Lines       47373    47401      +28     
  Branches     7213     7223      +10     
==========================================
+ Hits        42570    42600      +30     
+ Misses       3695     3693       -2     
  Partials     1108     1108              

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

@PapyChacal PapyChacal marked this pull request as ready for review June 9, 2024 11:26
Copy link
Collaborator

@math-fehr math-fehr left a comment

Choose a reason for hiding this comment

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

Nice!
One thing I'm kind of disagreeing on though, is allowing to call verify without the ConstraintContext.
I would say it is the role of the caller to define a ConstraintContext, not the constraint. What do you think?

@PapyChacal
Copy link
Collaborator Author

Nice! One thing I'm kind of disagreeing on though, is allowing to call verify without the ConstraintContext. I would say it is the role of the caller to define a ConstraintContext, not the constraint. What do you think?

Sure, I can just revert that, here are my cents:

  • The caller can define one if they want to, but doesn't have to worry about it everytime
  • Basically all the erased , {}s would become , ConstraintContext()s, including an extra import. I just think it brings much noise to undesired places, e.g. the docs introducing constraints as a whole.

I want to insist on I can just revert 😋 I see this as bikeshedding, so please first just confirm you want it reverted, and let's continue the discussion separately from the feature 🙂 This is one small piece amongst quite a few small pieces, that will yield very nice expressivity to IRDL, which is what I'm after rather than the API

Base automatically changed from emilien/entry-args to main June 10, 2024 11:07
PapyChacal and others added 3 commits June 10, 2024 12:07
Co-authored-by: Fehr Mathieu <mathieu.fehr@gmail.com>
Co-authored-by: Fehr Mathieu <mathieu.fehr@gmail.com>
@PapyChacal
Copy link
Collaborator Author

As discussed in a quick call, I'll revert the default argument thing!

@PapyChacal PapyChacal merged commit 31cbdd2 into main Jun 10, 2024
9 checks passed
@PapyChacal PapyChacal deleted the emilien/constraint-context branch June 10, 2024 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core xDSL core (ir, textual format, ...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants