You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just noticed that Semigroups (ab)uses EvalString quite a bit (I found 51 hits with grep). This is a function I'd recommend to never use, except for interactive debugging.
One place it is used in Semigroups is this:
for _IsXSemigroup in["IsFpSemigroup",
"IsFpMonoid",
"IsNTPMatrixSemigroup",
"IsMaxPlusMatrixSemigroup",
"IsMinPlusMatrixSemigroup",
"IsTropicalMaxPlusMatrixSemigroup",
"IsTropicalMinPlusMatrixSemigroup",
"IsProjectiveMaxPlusMatrixSemigroup",
"IsIntegerMatrixSemigroup",
"IsReesMatrixSemigroup",
"IsReesZeroMatrixSemigroup"]do
InstallMethod(TrivialSemigroupCons,
Concatenation("for ", _IsXSemigroup, " and an integer"),
[EvalString(_IsXSemigroup), IsInt],
function(filter, deg)
local n;
n := Maximum(deg, 1);
return AsSemigroup(filter,
TrivialSemigroupCons(IsTransformationSemigroup, deg));
end);
od;
Here, a much better replacement is to use ValueGlobal(_IsXSemigroup). It should even be faster.
Another case is gap/tools/utils.gi, which does EvalString(Concatenation("IsBound(", name, ")")) . I suspect that there, you can get aways with using IsBoundGlobal(name) instead.
This leaves the tests, where your use of EvalString seems OK.
The text was updated successfully, but these errors were encountered:
I just noticed that Semigroups (ab)uses
EvalString
quite a bit (I found 51 hits with grep). This is a function I'd recommend to never use, except for interactive debugging.One place it is used in Semigroups is this:
Here, a much better replacement is to use
ValueGlobal(_IsXSemigroup)
. It should even be faster.Another case is
gap/tools/utils.gi
, which doesEvalString(Concatenation("IsBound(", name, ")"))
. I suspect that there, you can get aways with usingIsBoundGlobal(name)
instead.This leaves the tests, where your use of
EvalString
seems OK.The text was updated successfully, but these errors were encountered: