-
Notifications
You must be signed in to change notification settings - Fork 19
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
Tests fail with current GAP master #277
Comments
Perhaps the wrong NrColumns method is being selected? Bad ranking of methods in packages was often hidden in older GAP versions due to a bug / misdesign in GAP, and the "first bad commit" you link fixed that, thus uncovering a load of bugs in packages, which we subsequently fixed by submitting PRs to those packages. But we mostly focused on testing released versions of packages.... |
incidentally, I wonder if my PR #273 miGht be relevant |
The error still persists with PR #273 tested against GAP 4.10dev-2239-geeb470f (latest commit). I now believe that there is an error with the new GAP ranking: For some reason this method for Eval https://github.com/homalg-project/homalg_project/blob/master/MatricesForHomalg/gap/Tools.gi#L1191 is ranked higher than this one https://github.com/homalg-project/homalg_project/blob/master/MatricesForHomalg/gap/Tools.gi#L1272 @fingolfin: Any idea why? |
@mohamed-barakat I noticed you applied a fix, but that fix just replaces one instable hack with another, and may very well break again. Indeed, looking at the two competing methods, one has rank One way to resolve this here would be to replace the static rank adjustments with dynamic ones, using a no-arg function which returns a suitable rank adjustment, and which GAP calls again each time re-ranking happens. Then one can use something like this for the second method: {} -> RankFilter(IsHomalgMatrix and IsOne and HasNrRows and HasNrColumns)
- RankFilter(IsHomalgMatrix and IsZero and HasNrRows and HasNrColumns)
+ 10 This feature is however only available in GAP 4.11; to write code that also works in older GAP versions, one needs to be a bit creative, e.g.:
That said, I wonder why homalg is using method dispatch there at all... Method dispatch is best suited for applications where it does not matter (other than in terms of performance) which of a list of given applicable methods are applied. If this is not the case here, I'd argue that you would be best of not using method dispatch, and instead e.g. merge the two methods into one (resp. turn them into two helper functions, then add a single method which basically calls either of the two helpers as appropriate). |
…ster" This reverts commit 8d91417 now that homalg-project#277 is fixed.
Thanks for the hint @fingolfin, I will reopen the issue. |
Can this issue be closed? |
increased priority of Eval method for zero matrices
…ster" This reverts commit 8d91417 now that homalg-project#277 is fixed.
Steps to reproduce (taken from the package
Modules
):Expected result:
Actual result:
The first bad commit is gap-system/gap@1762043. The issue can also be triggered as follows:
The text was updated successfully, but these errors were encountered: