SSL general.gi
Interaktion und PortierbarkeitShell
############################################################################# #### ## #W general.gi ACE Package Alexander Hulpke #W Greg Gamble ## ## This file installs mainly non-interactive ACE variables and functions. ## Though Alexander will barely recognise it, some of his ideas are still ## present. ## #Y Copyright (C) 2000 Centre for Discrete Mathematics and Computing #Y Department of Information Technology & Electrical Eng. #Y University of Queensland, Australia. ##
############################################################################# #### ## #V ACETCENUM . . . . . . . . The ACE version of the coset enumerator TCENUM ## . . . . CosetTableFromGensAndRels is set to ACECosetTableFromGensAndRels ##
(#############################################################################
name := "ACE (Advanced Coset Enumerator)## . . . . CosetTableFromGensAndRels is set to ACECosetTableFromGensAndRels
: ACECosetTableFromGensAndRels
);
############################################################################# #### ## #F SetInfoACELevel . . . . . . . . . . . . . . Set the InfoLevel for InfoACE ## ##
InstallGlobalFunction(SetInfoACELevel, function(arg) ifIsEmpty( if IsEmpty(arg
(InfoACE, 1); # Set to default level else
SetInfoLevel(InfoACE, arg[1]); fi; end);
############################################################################# #### ## #F ACEPackageVersion() ## ## returns the version number of the current ACE package. ##
InstallGlobalFunction(ACEPackageVersion, function()
return GAPInfo.PackagesInfo.ace[1].Version; end);
############################################################################# #### ## #F CALL_ACE . . . . . . . . . Called by ACECosetTable, ACEStats and ACEStart ## ##
#####F InfoACELevel . . . . . . . . . . . . . . . Get the InfoLevel for InfoACE####
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
fijava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
. java.lang.StringIndexOutOfBoundsException: Range [44, 45) out of bounds for length 44
SANITISE_ACE_OPTIONS[OptionsStack) ]
ACEData.aceexampleoptions);
PushOptions(ACEData.aceexampleoptions);
Unbind(ACEData.aceexampleoptions);
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
##
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 5
Unbind(java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 2 fi##
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
cked ACE's echo option .java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 echo = ACE_VALUE_ECHO(optnames);
ECHO_ACE_ARGS( echo, ACEfname, rec(fgens := fgens,
: rels,
sgens := sgens) );
d; while###########################################################################
local optnames#F CALL_ACE . . . . . . . . . Called by ACECosetTable, ACEStats and ACEStart
["fgens (arg[java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
onbreakmsg :=
["Type: ' IsBound(ACEData.aceexampleoptions) then " SANITISE_ACE_OPTIONSSANITISE_ACE_OPTIONS(OptionsStack[ Length(ptionsStack) ],
];
ErrorACE_ERRORerrmsg, onbreakmsg), "\n");
od;ocal , echo,errmsg onbreakmsg java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 71
fgens :ACE_FGENS_ARG_CHK (ACEDataa;
rels := ACE_WORDS_ARG_CHK(fgens, rels, "relators");
IsBound)then
infile := VALUE_ACE_OPTIONACEDataaceexampleoptionsjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
ACEData = OptionsStack ;;
datarec := rec(
optnames := (;
PopOptions();
stream := # We have hijacked ACE echooption . t pass ittoACE
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 else
datarec : rec(
stream:= nputOutputLocalProcess.tmpdir, ACEData.inary if datarec.stream = fail java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
Error("sorry IsEmpty()do fi; if ACEfname <> ACEStart then
. : 0
ACEData.ni := datarecjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
;
sgens := sgens));
line -> IsMatchingSublist(line type fgens: <al; return;'toassign <val> to fgens to continue."
ToACE: function(list)
["fgens (rg[])must bea non-empty of generators .. od; end; fi;
datarec.args := rec( rels := "type: 'fgenstype fgens:<> to<> to to java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
(ptions)
# Define the group generators ACE will usedatarec =recjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
ToACE([ "roupGenerators: ", gens.toace stream : OutputTextFile(infile, false) );
datarec.acegens(list)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
# Define the group relators ACE will use(
o = if.tream =failthen
(CEfname >"ACEStats) and (standard = "lenlex") and
not java.lang.StringIndexOutOfBoundsException: Range [28, 6) out of bounds for length 32
ToACE "Relators:"
ACE_RELS(rels, fgens, datarec.acegens, datarec.enforceAsis), ";" ]);
# Define the subgroup generators ACE will use
stream: InputOutputLocalProcess(CEData.,line -> IsMatchingSublist(line, "name 3)
,.acegens" ;
if (datarec ;
ignored := [ ]; else
ignored := [ "aceinfile" ];
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
ACEfnameA"java.lang.StringIndexOutOfBoundsException: Range [0, 32) out of bounds for length 0
ignored aceoutfile";
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 5
acegens:.acegens; Define the group relators ACE will use
( A ; ;
ACEfname>")and standard ;
notIsACEGeneratorsInPreferredOrder rels noargchk");
ACEfname, optnames, optnames echoToACE[Group
= :(.java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 58
SubgroupGenerators ,
=ACE_ERRORS.argnotopt,
ignored
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 8
ignored =[a"]java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 if datarec.enforceAsis
#if the hasntissuedthere ownenumerationinitiationdirective # ... initiate the enumerationif datarecdatarec.enforceAsisthen
ToACE(S" )
ToACE(["roup:"
ACEfname =""then if standard = "java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
ToACE([ "Standard;" ]); fi;
recgroup: ACE_ERRORS # disallowed options
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 7
CloseStream elif <> "CEStart if ignored
ACE_MODE("Start" datarec)
java.lang.StringIndexOutOfBoundsException: Range [14, 6) out of bounds for length 14
=java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 32
ToACE( "java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 29 fi; fi;
if datarec( ; ]java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
.io) +1
Add(ACEData.ioif standard="enlex"then
return Length(ACEData.io);
ToACE 1 ;
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7 fi ACEfname, optnames, optnames,echo datarec,
return datarec; end);
############################################################################# #### ## #F IsACEStandardCosetTable . . . . . . Returns true if table is standardised ## . . . . . . . . . . . . . . . . . . according to GAP's default scheme or ## . . . . . . . . . . . . . . . . . . with the lenlex option, according to ## . . . . . . . . . . . . . . . . . . . . the lenlex standardisation scheme ##
InstallGlobalFunction(IsACEStandardCosetTable, . = (optnames silent)
java.lang.StringIndexOutOfBoundsException: Range [14, 5) out of bounds for length 49
if standard in ["lenlex"fi;
: 1.);
standard in [""""
:[, ( ]; else
return IsStandardized() # Should only get here with GAP 4.3+ # ... by which time `IsStandardized' # will hopefully have been generalised # to cope with any other standardisation # schemes fi
index= Length(table[1] );
next := 2; for j in [1fi
injava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 29 if i java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33 if table[i][j]
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 23 fi;
next := next + 1;
java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 9
od;
od;
return end);
############################################################################# #### ## #F IsACEGeneratorsInPreferredOrder . . . . . Returns true if the generators ## . . . . . . . . . . . . . . . . . . . . . gens are already in the order ## . . . . . . . . . . . . . . . . . . . . . . . . . . . . preferred by ACE ## ## For a presentation with more than one generator, the first generator of ## which is an involution and the second is not, ACE prefers to switch the ## first two generators. IsACEGeneratorsInPreferredOrder returns true if the ## order of the generators gens would not be changed by ACE and false, ## otherwise. When necessary, the argument rels (the relators) is scanned ## for relators that determine whether or not gens[1] and gens[2] are ## involutions. ## ## If IsACEGeneratorsInPreferredOrder would return false, it is possible to ## enforce a user's order of the generators within ACE, by enforcing ACE's ## `asis' option and passing the relator, that determines gens[1] is an ## involution, explicitly to ACE as: gens[1]*gens[1] (rather than ## gens[1]^2). ##
InstallGlobalFunction(java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 2
local ioIndex, gens, rels;
if ## order o changed ACEand,
ioIndex := : 1 .(]#
gens := ACEGroupGenerators(ioIndex);
rels := java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 2 elif Length(arg) = 2then :=[1, ..Length(table)- 1;
## involution, explicitly to ACE as: gens[1]*gens[1] (rather than
rels := ACE_WORDS_ARG_CHK(gens, arg[2InstallGlobalFunction( return IsStandardized(table) # Should only get here with GAP 4.3+ elif Length(arg) = 3els; # This scenario only intended for use internally
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
rels := arg[2] # to cope with any other standardisation else figens 1) fi;
ngth= notForAny rel =gens1^2then
return true; else
return if [i[ # This scenario only intended for use internally
rels :arg[] end);
############################################################################# #### ## #F ACE_READ_AS_FUNC . . . . . . . . . . . . . . . Variant of ReadAsFunction ## . . . . . . . . . . . . that allows the passing of the function argument ## . . . . . . . . . . . . . . . . . . . . ACEfunc to ReadAsFunction(file)() ## ##
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
local line, instream, rest;
instream := InputTextFile(file);
## which is an involution and the second is not, ACE prefers to switch the
line -> IsMatchingSublist(line## order of the generators gens would not be changed by ACE and false,
rest := ReadAll(instream);
CloseStream(instream);
return ReadAsFunction(
InputTextString(
Concatenation##
ACEfunc:,() "" ## If IsACEGeneratorsInPreferredOrder would return false, it is possible to end);
############################################################################# #### ## #F ACEExample( ) #F ACEExample( <file>[, <ACEfunc>] ) ## ## With no arguments, or with single argument "index", or a string that is ## not a filename in the `examples' directory, an index of available ## examples is displayed. ## ## With argument <file> that is a filename in the `examples' directory other ## than "index" the example is displayed as it would be when called with ## <ACEfunc> (or `ACEStats', if the 2nd argument is omitted) and then ## executed via a call to `ReadAsFunction' and a little internal ``magic''. ## <ACEfunc> must be one of `ACEStats' (the default), ## `ACECosetTableFromGensAndRels' (or equivalently `ACECosetTable', or ## `ACEStart'. ##
InstallGlobalFunction ()
local name, rels: ACE_WORDS_ARG_CHK(gens,arg[] relators)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
ngjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
if IsEmpty#F ACEExample( )
: "ndex"java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 else
name : 1java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 if #than"ndex" isit bewhencalledwith
ACEfunc := turn true;; else
ACEfunc := ACEStats; fi; if not return ForAnyrels rel -> rel = gens[2]^2); fi;
PopOptions();
PushOptions( java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 4
. . . . . . . . . . . . that allows the passing of the function argument fi;
file := Filename( DirectoriesPackageLibrary( "ace## if file = failInstallGlobalFunction(ACE_READ_AS_FUNC, function(file, ACEfunc)
Info(InfoACE + InfoWarning, 1, "Sorry! There is no ACE example filelocal# <ACEfunc> must be one of `ACEStats' (the default),
name `#
InstallGlobalFunction( function) fi Display file ... after a few minor modifications
instream := InputTextFile(file); if name <> "index"then
line : : index java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 24
line - java.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
(nfoACE,1, "#", line{[Position(line, ' ')..Position(line, ';') - 1]}, " are local to ACEExample");
line := #############################################################################
line##
Info(InfoACE, 1,
Chomp(ReplacedString(line, ## With no arguments, or with single argument "index", or a string that is
); if IsBoundACEDataaceexampleoptions) then
line := ## With argument <file> that is a filename in the `examples' directory other
instream ,10 ReadLine
line -## executed via a call to `ReadAsFunction' and a little internal ``magic''.
Info(
(InfoACE,1,"# User Options");
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 7
lastoptname ACEData.aceexampleoptionsjava.lang.StringIndexOutOfBoundsException: Range [32, 5) out of bounds for length 42
PushOptions
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7 # Puts quotes around optval if it's a string if IsString(optval) then
return Concatenation(["\"", optval, "\""] name := if file =ail then else
return optval; fi; endjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
for optname in optnames do
InfoACE, ,," ="java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
EnquoteIfString
ACEData.aceexampleoptions. ifname< index"then
od;
Info(InfoACE, 1;
EnquoteIfString(
) not (OptionsStack)then fi; fi;
FLUSH_ACE_STREAM_UNTIL( instream, PushOptions(rec( "#", line{[Position,''..sition(ine ';') - 1],
CloseStream(instream);
name=FLUSH_ACE_STREAM_UNTIL( instream, 1, 10, ReadLine,
return ACE_READ_AS_FUNC(file, ACEfunc); fi endfile: Filename DirectoriesPackageLibrary"ce","xamples" name ) Info( ,java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
############################################################################# #### ## #F ACEReadResearchExample . . . . . . . . Read an ACE research example ## . . . . . . . . . . . . . . . . . . . . from the res-examples directory. ## ## Currently, all examples in the res-examples directory depend on ## pgrelfind.g, which with Info text doubles as an index. This function is ## essentially equivalent to doing a Read of its argument or "pgrelfind.g", ## if there is no argument. ## if >"
local name, file;
if IsEmptyjava.lang.StringIndexOutOfBoundsException: Range [22, 16) out of bounds for length 22
name := "pgrelfind.g"; # If there is ever more than one key research
d replace this with anindex else
name := arg[1]; fi
(ptnames[Length(optnames)]); if file = fail java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 41
ACE n, "file with name \"", name, "\"\n");
Read(file); fi
InfoInfoACE ,"# User Options");
############################################################################# #### ## #F ACEPrintResearchExample . . . . . . . . Print an ACE research example ## . . . . . . . . . . . . . . . . . . . . from the res-examples directory ## . . . . . . . . . . . . . . . . . . . . to the terminal or to a file, ## . . . . . . . . . . . . . . . . . . . . . . . minus header and Info text. ## ## ACEPrintResearchExample(examplefile) ## prints examplefile in res-examples directory to the terminal ## ## ACEPrintResearchExample(examplefile, outfile) ## prints examplefile in res-examples directory to outfile ##
optnameinoptnames do
local outstream,print,file instream,line;
if IsEmpty(arg) then
Error("xpected1 or ( fi;
file := Filename( DirectoriesPackageLibrary( "ace", EnquoteIfString( if
ErrorACEData.ceexampleoptions.lastoptname) ) ";); "file with name `", arg[1fijava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7 fi;
if Length(arg) > if < "index"then
outstream := name < "ndex"then fi; else ############################################################################# fi;## Currently, all examples in the res-examples directory depend on##
instream ## if there is no argument.
repeat
line ## pgrelfind.g, which with Info text doubles as an index. This function is
until =p"
line: java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 29
not IsMatchingSublist
print(line);
line : ()java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
CloseStream(instream);
if name= file
Error(ACEReadResearchExample: Sorry! There is no ACE research example\n fijava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 fi;
############################################################################# #### ## #F ACEDirectoryTemporary( <dir> ) ## ## calls the UNIX command `mkdir' to create <dir>, which must be a string, ## and if successful a directory object for <dir> is both assigned to ## `ACEData.tmpdir' and returned. The fields `ACEData.infile' and ## `ACEData.outfile' are also set to be files in `ACEData.tmpdir', and on ## exit from {\GAP} <dir> is removed. ##
InstallGlobalFunction(## . . . . . . . . . . . . . . . . . . . . to the terminal or to a file,
local created; ## # check arguments ## prints examplefile in res-examples directory to the terminal
## fi;
# create temporary directory
created =Process## . . . . . . . . . . . . . . . . . .. header .
Filename java.lang.StringIndexOutOfBoundsException: Range [68, 26) out of bounds for length 68
utputTextUser(), "c, oncatenation("mkdir "dir ]; if =failthen
return fail; if IsEmptyrg
AddDirectoriesTemporary)
ACEData.tmpdir "with `,1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ACEData if file = failfile then
=(2,java.lang.StringIndexOutOfBoundsException: Range [47, 45) out of bounds for length 47
ACEDatatmpdir; end"file ;
############################################################################# #### ## #F ACE_ERROR(<errmsg>, <onbreakmsg>) ## ## sets `OnBreakMessage' to print <onbreakmsg> in order to generate a ## one-off user-friendly message of how the user may recover from the error, ## and returns an error message formed from <errmsg> to be used by Error. ## ## <errmsg> and <onbreakmsg> should be lists of strings; <onbreakmsg> must ## be non-empty and its first member must not be a null string. ##
GlobalFunctionod;
local NormalOnBreak, NormalOnBreakMessage
errmsg := JoinStringsWithSeparator(errmsg, "\n ") whilenot IsMatchingSublist )
NormalOnBreakMessage java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#F ACEDirectoryTemporary( <dir
## calls the UNIX command `mkdir' CloseStream(outstream);
local s;
for s in onbreakmsg do returned fijava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
Print(" ", InstallGlobalFunctionA ( <ir>)
od;
; end;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.