-
Notifications
You must be signed in to change notification settings - Fork 83
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 RangeVarConstraint #3261
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3261 +/- ##
==========================================
+ Coverage 89.99% 90.01% +0.01%
==========================================
Files 445 445
Lines 55749 55848 +99
Branches 5367 5371 +4
==========================================
+ Hits 50173 50271 +98
- Misses 4166 4169 +3
+ Partials 1410 1408 -2 ☔ View full report in Codecov by Sentry. |
Would be nice to get the commit attribution correct as this is still mainly @PapyChacal 's work, I just made pyright happy and put some match statements on the tests |
I edited the description, which should propagate authorship when the PR is merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great to have @math-fehr and @PapyChacal's ticks before merging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
xdsl/irdl/constraints.py
Outdated
ranges: dict[str, tuple[Attribute, ...]] = field(default_factory=dict) | ||
"""The assignment of constraint range variables.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we somehow check somewhere that the variable and range variables have different names?
Otherwise I think the can_infer
and infer
funcitons might be incorrect if someone have twice the same name for range variable and variable.
If it's too annoying to check, jsut make an issue for it, as I don't think it's actually gonna happen in practice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've put this in as the last commit, can revert it if it is deemed too messy
@superlopuh @math-fehr any thoughts on whether to keep the last commit? |
IDK, I'd rather add helpers to add and get variables on the original objects, and keep all the logic to one class, from an architecture point of view there's some dubious coupling going on there, it would nice for the unicity logic to be encapsulated. |
Sure, I'll do that |
Co-authored-by: Fehr Mathieu <mathieu.fehr@gmail.com>
d4323c1
to
67298d7
Compare
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
I removed the last commit, implemented it as @superlopuh suggested. In the process of this I rebased past the pyright changes and now had to fix some other stuff. I think this is because I generalised |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me that looks good!
Continuation of #2704
Co-authored-by: Emilien Bauer papychacal@gmail.com