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

Implement Subsetlist and covers_precise #1412

Merged

Conversation

matteonu
Copy link
Contributor

This PR adds new functionality to the Subset class

  • Subsetlist is a new Subset that acts as a wrapper of existing subset types. It is essentially a list of Subset objects. The union of two Subsetlists is just the list concatenation.
  • covers_precise() implements a set cover operation on Subsets of type Range and Indices. If it returns true the first input subset definitely covers the second input subset. Therefore it also takes steps into account.

@tbennun
Copy link
Collaborator

tbennun commented Oct 30, 2023

Thank you for the contribution. Before reviewing the PR, I have a minor naming comment: perhaps UnionSubset is a better name?

matteonussbauemer added 2 commits October 31, 2023 12:44
(cherry picked from commit e75e782)
(cherry picked from commit 1301c3a)
@matteonu
Copy link
Contributor Author

Thank you for the contribution. Before reviewing the PR, I have a minor naming comment: perhaps UnionSubset is a better name?

I renamed it SubsetUnion now instead of UnionSubset (I switched the two words in my head somehow). I hope this works too. If not, I can change it again of course.

@matteonu
Copy link
Contributor Author

Seems like subset_intersects_test.py fails in the build pipeline but I cannot reproduce it locally for some reason.

@tbennun
Copy link
Collaborator

tbennun commented Oct 31, 2023

It looks like DaCe is still installing SymPy 1.9, and that might be the reason: https://github.com/spcl/dace/actions/runs/6706005794/job/18223680540?pr=1412#step:4:521

Maybe try changing setup.py to reflect that (sympy >= 1.9)

Copy link
Contributor

@acalotoiu acalotoiu left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution! Please make it clear what all the tests are testing.

@matteonu matteonu force-pushed the implement-SubsetList-and-covers_precise branch from c0b4264 to 1e83e71 Compare November 1, 2023 21:49
@matteonu
Copy link
Contributor Author

matteonu commented Nov 1, 2023

Now the test should work.

@matteonu
Copy link
Contributor Author

matteonu commented Nov 2, 2023

Now the test should work.
It seems like I forgot to set the sympy version back to 1.9 in the requirements.txt. I fixed it now.

@matteonu matteonu force-pushed the implement-SubsetList-and-covers_precise branch from 862eea9 to ab11b20 Compare November 2, 2023 18:07
Copy link
Contributor

@acalotoiu acalotoiu left a comment

Choose a reason for hiding this comment

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

LGTM now! Thank you!

@acalotoiu acalotoiu merged commit 9a0eafd into spcl:master Nov 3, 2023
9 checks passed
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.

None yet

3 participants