-
Notifications
You must be signed in to change notification settings - Fork 161
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
Add kernel helper IS_FILTER, other tweaks #2732
Conversation
src/opers.h
Outdated
OPER(oper)->enabled = INTOBJ_INT(x); | ||
Obj val = CONST_OPER(oper)->enabled; | ||
Int v = val ? INT_INTOBJ(val) : 0; | ||
OPER(oper)->enabled = INTOBJ_INT(v | 1); |
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.
So, this abuses enabled
as a bit array. Since it now stores two bits (not just one), perhaps we should rename it. But I couldn't think of a good name -- my only idea, flags
, already is used by another field in struct OperBag
...
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.
other ideas include properties
(could be misunderstood), bits
or bitlist
(not very descriptive), options
(not really options); they're all bad in some way.
With bits
one could work with some macros, maybe.
Actually I screwed up |
428eb82
to
3ac67d6
Compare
Codecov Report
@@ Coverage Diff @@
## master #2732 +/- ##
==========================================
+ Coverage 75.78% 75.78% +<.01%
==========================================
Files 479 479
Lines 241455 241473 +18
==========================================
+ Hits 182991 183011 +20
+ Misses 58464 58462 -2
|
This code was accepted by GAP and silently treated as the same if it was using HasEvalCertainRows; but this will change in a future GAP release. For details see <gap-system/gap#2732>
This code was accepted by GAP and silently treated as the same as in the fixed versions; but this will change in a future GAP release. For details see <gap-system/gap#2732>
This code was accepted by GAP and silently treated as the same as in the fixed versions; but this will change in a future GAP release. For details see <gap-system/gap#2732>
Not a fan of the name |
Updated. Turns out that tests were failing due to an actual bug revealed by this PR: InstallMethod( \=, "xorbs with canonicalRepresentativeDeterminator",
IsIdenticalObj,
[IsExternalOrbit and CanEasilyDetermineCanonicalRepresentativeExternalSet,
IsExternalOrbit and CanEasilyDetermineCanonicalRepresentativeExternalSet],
0,
... Which GAP silently accepted; the resulting filter then was I already found similar problems in some packages:
@alex-konovalov perhaps you could run package tests against this PR before we merge it? It might reveal additional similar bugs in further packages. |
IsDirectSumOfModules is not a property or attribute that can be set to true or false due to a later computation; rather, it can only be set when creating an object via a special constructor. That suggests it should simply be a filter, not an attribute. This makes qpa compatible with this upcoming GAP change: <gap-system/gap#2732>
These "attributes" only take true/false values, and have no methods, strongly suggesting that they should be filters instead. This fixes a conflict with a future GAP release, which will reject AND-filters where one ore more of the "filters" involved actually is no filter (which includes properties), but rather just an operation or attribute. See also gap-system/gap#2732 for some technical details
Since this breaks various packages, there are two options:
Option 2 is a bit more work, but it has the advantage that it reduces the likelihood of new instances of this broken behavior being introduced. OTOH, I am not sure how big the likelihood for that is... |
If 2 isn't too much work, it quite appeals, because it also means this doesn't get lost. |
This is the full list of packages where problems occur (some of they may be cause by dependencies): - homalgtocas, io_forhomalg, linearalgebraforcap, localizeringforhomalg, matricesforhomalg, modulepresentationsforcap, modules, qpa, ringsforhomalg, sco, simpcomp, toricvarieties, xmodalg. Perhaps simpcomp is not yet looked at. |
... and not a new and-filter composing the original filter with itself.
3ac67d6
to
dde536e
Compare
I rebased this, and for now dropped the commit which tightened the rules for AND-ing filters. Hence this PR could be merged now. I'll put the removed commit into a new PR and/or will make a PR which just produces a warning for "bad" and-filters. |
@alex-konovalov as far as I could tell, all those packages fail due to one of homalg, qpa or xmodalg. The latter two already merged the fixes, so it's mainly waiting for @mohamed-barakat or @sebasguts to merge the homalg fix and release that. |
This code was accepted by GAP and silently treated as the same as in the fixed versions; but this will change in a future GAP release. For details see <gap-system/gap#2732>
In particular, before this PR, we get this:
Note that Center is an attribute, not a filter.
With this PR:
In addition, argument validation for
and
differed slightly between interpreter and executor, which this PR also fixes.I am on the fence whether this should be considered relevant for the release notes. On the one hand, probably nobody ever noticed these quirks. On the other, this is a change in what kind of inputs GAP accepts...