-
Notifications
You must be signed in to change notification settings - Fork 1
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
Errors (or crash) #16
Comments
The error is this:
What seems to happen is that IMHO this hints at a fundamental design deficiency with the hash tables implemented in orb, resp. how they are used here: It is not sufficient to just look at the seeds of an orbit, we also must consider the action on those vectors. I've also seen other variants of this. And there are even worse things, like this:
That function should not be return 0 there, but rather So absent a strong enough type system, a purely guess based heuristic for which hash functions to use won't work. There must be a way to provide further information. A possible solution might be to audit all "recursive" calls to |
Hmm, but the bug also goes away if I use |
OK, major difference: with As a result, the orbit of the former consists of compressed vectors (well, except for the first one, which is a concern of its own sigh) while for the latter the orbits consists of uncompressed vectors (i.e., plain lists of field elements). I have a fix which changes because we end up using plain lists, they don't store the parent field; and thus in the recursion, the code initializing the orbit and hash tables initially only sees the subfield, not the full field, and thus things break down. This can be fixed by ensuring that only proper "vector obj" are used for the orbit, but for various reasons I am not sure this is realistic (plus this code is also meant to be usable together with Another fix would be to explicitly transfer this kind of information "down the line" -- e.g. by explicitly applying the hash function chosen at the top level to the next level... I'll try and see if I can make that work. BTW # Handle the special case of matrices over a finite field
# acting on vectors with OnRight or OnLines, because the
# field of the vector could be smaller than the field of the
# matrices:
if not(IsBound(re.hf)) and not(IsBound(re.forflatplainlists)) and
IsRowVector(x) and IsFFECollection(x) and
ForAll(o.gens,IsFFECollColl) then
f := FieldOfMatrixList(o.gens);
if Size(DefaultField(x)) < Size(f) then
o.ht := HTCreate(x*PrimitiveRoot(f),re);
else
o.ht := HTCreate(x,re);
fi;
else
o.ht := HTCreate(x,re);
fi; |
I think I have tracked it down (or at least one major cause for it triggering this error in the ClassicalMaximal package test suite), see gap-system/gap#5907 |
Consider this code:
Running it results in an error or even crash (depending on the
orb
version).TODO: add more details from discussion at #15
The text was updated successfully, but these errors were encountered: