Skip to content
Snippets Groups Projects
Commit e0af1b13 authored by Markus Pfeiffer's avatar Markus Pfeiffer
Browse files

Some cleanup

In particular dump everything into a list to avoid overwriting attributes
of the same name that are defined for multiple filters
parent d089d659
No related branches found
No related tags found
No related merge requests found
...@@ -31,8 +31,8 @@ GAPAndFilterUnpack := function(t) ...@@ -31,8 +31,8 @@ GAPAndFilterUnpack := function(t)
then then
Add(res, NAME_FUNC(t)); Add(res, NAME_FUNC(t));
else else
Append(res, GAPTypeUnpack(FLAG1_FILTER(t))); Append(res, GAPAndFilterUnpack(FLAG1_FILTER(t)));
Append(res, GAPTypeUnpack(FLAG2_FILTER(t))); Append(res, GAPAndFilterUnpack(FLAG2_FILTER(t)));
fi; fi;
fi; fi;
return res; return res;
...@@ -43,7 +43,7 @@ end; ...@@ -43,7 +43,7 @@ end;
GAPTypesInfo := function() GAPTypesInfo := function()
local res, lres, i, f, ff; local res, lres, i, f, ff;
res := rec(); res := [];
for i in [1..Length(FILTERS)] do for i in [1..Length(FILTERS)] do
if IsBound(FILTERS[i]) then if IsBound(FILTERS[i]) then
...@@ -53,23 +53,26 @@ GAPTypesInfo := function() ...@@ -53,23 +53,26 @@ GAPTypesInfo := function()
lres.type := GAPFilterToFilterType(i); lres.type := GAPFilterToFilterType(i);
# if the filter is an attribute and FLAG1_FILTER of the filter # if the filter is an attribute and FLAG1_FILTER of the filter
# is not equal to it, then this is a tester. # is not equal to it, then this is a tester.
ff := TRUES_FLAGS(WITH_IMPS_FLAGS(FLAGS_FILTER(FILTERS[i])));
ff := List(ff, function(f)
if IsBound(FILTERS[f]) then
return NAME_FUNC(FILTERS[f]);
else
return "<<unknown>>";
fi;
end);
if lres.type = "GAP_Attribute" then if lres.type = "GAP_Attribute" then
if if (FLAG1_FILTER(f)) <> 0 and (FLAG1_FILTER(f) <> i) then
(FLAG1_FILTER(f)) <> 0 and (FLAG1_FILTER(f) <> i) then
lres.testerfor := NAME_FUNC(FILTERS[FLAG1_FILTER(f)]); lres.testerfor := NAME_FUNC(FILTERS[FLAG1_FILTER(f)]);
fi; fi;
lres.filters := ff;
elif lres.type = "GAP_Property" then
lres.filters := ff;
else
lres.implied := ff;
fi; fi;
lres.name := (NAME_FUNC(FILTERS[i]));
ff := TRUES_FLAGS(WITH_IMPS_FLAGS(FLAGS_FILTER(FILTERS[i]))); Add(res, lres);
lres.implied := List(ff,
function(f)
if IsBound(FILTERS[f]) then
return NAME_FUNC(FILTERS[f]);
else
return "<<unknown>>";
fi;
end);
res.(NAME_FUNC(FILTERS[i])) := lres;
fi; fi;
od; od;
for i in [1..Length(ATTRIBUTES)] do for i in [1..Length(ATTRIBUTES)] do
...@@ -77,7 +80,8 @@ GAPTypesInfo := function() ...@@ -77,7 +80,8 @@ GAPTypesInfo := function()
lres.type := "GAP_Attribute"; lres.type := "GAP_Attribute";
lres.filters := GAPAndFilterUnpack(ATTRIBUTES[i][2]); lres.filters := GAPAndFilterUnpack(ATTRIBUTES[i][2]);
res.(ATTRIBUTES[i][1]) := lres; lres.name := ATTRIBUTES[i][1];
Add(res, lres);
od; od;
return res; return res;
end; end;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment