-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce -N switch to not use hidden implications
If GAP is normally called then this patch only causes - that the kernel list HIDDEN_IMPS is visible from GAP level - that two debugging functions are available - WriteFilterRanks(filename); - WriteMethodOverview(filename); Furthermore a command line switch -N is introduced. When gap is called with this -N then: - no hidden implications are installed anymore - RankFilter only uses proper implications - InstallMethod uses only proper implication during its check if the installation fits to one declaration. When it does not find an appropriate declaration then it does not run into an error but only prints a line of useful information. (This allows to systematically either add explicit filter implications or change the filters in some method installations until these messages disappear.) This patch should be safe to be merged into master. Actual changes in filter implications will be provided in separate patches.
- Loading branch information
1 parent
f5c015f
commit f7d12b1
Showing
8 changed files
with
372 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
############################################################################## | ||
## operdebug.g Frank Lübeck | ||
## | ||
## Non-documented utilities to write out infos about all methods of all | ||
## operations with location and rank, and to write out all filters by name | ||
## and their rank. These can be useful to debug larger changes that influence | ||
## the ranking of filters and methods. | ||
## | ||
BIND_GLOBAL("WriteMethodOverview", function(fname) | ||
local name, sline, f; | ||
name := function(f) | ||
local path, ls, s; | ||
path := FilenameFunc(f); | ||
if path=fail then | ||
return NameFunction(f); | ||
fi; | ||
for s in GAPInfo.RootPaths do | ||
ls := Length(s); | ||
if Length(path) >= ls and path{[1..ls]}=s then | ||
return path{[ls+1..Length(path)]}; | ||
fi; | ||
od; | ||
return path; | ||
end; | ||
sline := function(f) | ||
local n; | ||
n := StartlineFunc(f); | ||
if n=fail then | ||
return "\c"; | ||
fi; | ||
return Concatenation(":",String(n),"\c"); | ||
end; | ||
f := function() | ||
local nam, m, s, op, i, j; | ||
for op in OPERATIONS do | ||
nam := NameFunction(op); | ||
for i in [0..6] do | ||
m := METHODS_OPERATION(op, i); | ||
s := 4+i; | ||
for j in [1..Length(m)/s] do | ||
Print(nam,";\c",i,";", | ||
name(m[j*s-2]), | ||
sline(m[j*s-2]),";\c", | ||
m[j*s-1],"\n"); | ||
od; | ||
od; | ||
od; | ||
end; | ||
PrintTo1(fname, f); | ||
end); | ||
|
||
BIND_GLOBAL("WriteFilterRanks", function(fname) | ||
local f; | ||
f := function() | ||
local nams, rks, n, i; | ||
nams := List(FILTERS, NameFunction); | ||
rks := List(FILTERS, RankFilter); | ||
SortParallel(nams, rks); | ||
for i in [1..Length(nams)] do | ||
n := SubstitutionSublist(nams[i],"CategoryCollections","CC"); | ||
if Length(n) > 75 then | ||
n := Concatenation(n{[1..30]},"...",n{[Length(n)-29..Length(n)]}); | ||
fi; | ||
Print(n,";",rks[i],"\n"); | ||
od; | ||
end; | ||
PrintTo1(fname, f); | ||
end); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.