From 9369465fe4562a0ed163055f53bfef9c4c8aa9be Mon Sep 17 00:00:00 2001 From: gap Date: Thu, 16 Oct 1997 10:41:03 +0000 Subject: [PATCH] Commit v4.beta2 --- alpha/checkout | 43 ++ alpha/checkvar | 43 ++ alpha/compile | 29 + alpha/doit | 57 ++ alpha/readtest | 36 + alpha/setvar | 54 ++ alpha/tarit | 40 + beta/banner | 25 + beta/checkout | 44 ++ beta/checkvar | 48 ++ beta/compile | 33 + beta/doit | 68 ++ beta/readtest | 38 + beta/setvar | 58 ++ beta/tarit | 35 + beta/texdoc | 25 + dev/TODO | 4 - dev/gap5.txt | 81 +- dev/lists.txt | 101 ++- dev/packages | 336 +++++++++ dev/refmanual | 230 ++++++ dev/road.tex | 261 +++++++ dev/saveload.tex | 221 +++++- doc/ext/foa.tex | 330 ++++++++ doc/ext/manual.tex | 9 +- doc/ext/stbchain.tex | 626 ++++++++++++---- doc/ext/weakptr.tex | 189 +++++ doc/gapmacro.tex | 23 +- doc/prg/create.tex | 54 +- doc/prg/methsel.tex | 21 +- doc/prg/objselms.tex | 12 +- doc/prg/types.tex | 33 +- doc/prg/xtndxmpl.tex | 6 +- doc/ref/domain.tex | 303 +++++++- doc/ref/group.tex | 114 ++- doc/ref/grplib.tex | 10 +- doc/ref/install.tex | 322 ++++++++ doc/ref/lists.tex | 395 ++++++++-- doc/ref/manual.tex | 18 +- doc/ref/permgrp.tex | 200 +++-- doc/ref/process.tex | 61 +- doc/ref/solvgrp.tex | 129 ++-- doc/ref/speedup.tex | 45 +- doc/tut/algvspc.tex | 42 +- doc/tut/domain.tex | 281 +++++++ doc/tut/function.tex | 9 +- doc/tut/group.tex | 15 +- doc/tut/introduc.tex | 15 +- doc/tut/manual.tex | 1 + doc/tut/migrat.tex | 6 + doc/tut/opers.tex | 15 +- doc/tut/records.tex | 8 +- etc/INSTALL | 112 +-- etc/PENDING_FIXES | 2 + grp/basic.gd | 87 --- grp/basicpcg.gi | 24 - grp/basicprm.gi | 112 +-- lib/addmagma.gi | 102 ++- lib/algebra.gi | 66 +- lib/algfp.gi | 67 +- lib/alglie.gi | 6 +- lib/algmat.gi | 16 +- lib/basis.gd | 2 + lib/clas.gd | 79 +- lib/clas.gi | 135 ++-- lib/claspcgs.gi | 207 +++-- lib/clasperm.gi | 59 +- lib/coll.gi | 18 +- lib/csetgrp.gi | 3 +- lib/csetpc.gi | 4 +- lib/ctbl.gi | 12 +- lib/ctblfuns.gd | 12 + lib/ctblfuns.gi | 97 ++- lib/ctblgrp.gi | 10 +- lib/ctblmaps.gd | 25 +- lib/ctblmaps.gi | 20 +- lib/ctblperm.gi | 23 +- lib/ctblsolv.gi | 4 +- lib/domain.gd | 88 ++- lib/factgrp.gi | 8 +- lib/ffe.gi | 15 +- lib/field.gd | 6 + lib/field.gi | 44 +- lib/fieldfin.gi | 43 ++ lib/files.gd | 73 +- lib/files.gi | 159 ++++ lib/filter.g | 4 +- lib/frattext.gd | 2 +- lib/frattext.gi | 2 +- lib/frattfree.gd | 2 +- lib/frattfree.gi | 2 +- lib/ghom.gd | 33 +- lib/ghom.gi | 78 +- lib/ghompcgs.gi | 4 +- lib/ghomperm.gi | 26 +- lib/gpprmsya.gd | 95 +++ lib/gpprmsya.gi | 613 +++++++++++++++ lib/gprdpc.gi | 2 +- lib/grp.gd | 361 +++++---- lib/grp.gi | 587 ++++++++------- lib/grpffmat.gi | 2 +- lib/grpfp.gd | 23 + lib/grpfp.gi | 402 +++++++++- lib/grplatt.gd | 12 +- lib/grplatt.gi | 36 - lib/grpnice.gd | 132 +++- lib/grpnice.gi | 288 ++++--- lib/grppc.gi | 10 +- lib/grppcatr.gi | 7 +- lib/grppcaut.gi | 4 +- lib/grppcext.gd | 2 +- lib/grppcext.gi | 2 +- lib/grppcfp.gd | 2 +- lib/grppcfp.gi | 5 +- lib/grppclat.gd | 1 - lib/grppclat.gi | 85 ++- lib/grppcnrm.gi | 2 +- lib/grpperm.gd | 8 +- lib/grpperm.gi | 89 ++- lib/grpprmcs.gi | 13 +- lib/grpreps.gd | 2 +- lib/grpreps.gi | 2 +- lib/help.g | 41 +- lib/init.g | 103 ++- lib/integer.gi | 16 +- lib/list.gd | 29 +- lib/list.gi | 26 +- lib/magma.gd | 32 +- lib/magma.gi | 174 ++++- lib/mapphomo.gi | 20 +- lib/mapping.gd | 6 +- lib/mapping.gi | 25 +- lib/matrix.gi | 53 +- lib/modfree.gi | 18 +- lib/module.gd | 2 +- lib/module.gi | 44 +- lib/monoid.gd | 9 +- lib/monoid.gi | 53 +- lib/morpheus.gd | 2 +- lib/morpheus.gi | 155 +++- lib/object.gi | 7 + lib/oper.g | 12 +- lib/oprt.gd | 739 ++++++++++++++---- lib/oprt.gi | 273 +------ lib/oprtpcgs.gi | 27 +- lib/oprtperm.gi | 406 +++++++++- lib/partitio.gi | 105 ++- lib/pcgs.gd | 9 + lib/pcgs.gi | 28 + lib/pcgscomp.gi | 9 +- lib/pcgsnice.gi | 10 +- lib/pcgspcg.gi | 43 ++ lib/pcgsperm.gi | 13 +- lib/pcgsspec.gi | 41 +- lib/process.gd | 31 +- lib/read1.g | 2 + lib/read3.g | 10 +- lib/read5.g | 4 +- lib/ring.gd | 30 +- lib/ring.gi | 7 - lib/rwspcgrp.gi | 3 - lib/semigrp.gd | 2 +- lib/semigrp.gi | 33 +- lib/sgpres.gi | 3 +- lib/stbc.gd | 4 - lib/stbcbckt.gi | 125 +++- lib/streams.gd | 16 + lib/streams.gi | 26 + lib/string.gi | 10 + lib/tietze.gd | 28 - lib/tietze.gi | 497 +----------- lib/twocohom.gd | 2 +- lib/twocohom.gi | 2 +- lib/type.g | 3 + lib/version.g | 2 +- lib/vspc.gi | 7 +- lib/vspcmat.gi | 17 +- lib/vspcrow.gi | 166 ++--- lib/wpobj.g | 22 + lib/wpobj.gd | 61 ++ lib/wpobj.gi | 143 ++++ lib/zmodnz.gi | 67 +- prim/primitiv.gd | 11 +- prim/primitiv.gi | 18 +- small/idgroup.g | 2 +- small/idlib/id01.6 | 2 +- small/idlib/id02.4 | 2 +- small/idlib/id03.2 | 2 +- small/idlib/id03.6 | 2 +- small/idlib/id04.0 | 2 +- small/idlib/id04.8 | 2 +- small/idlib/id05.4 | 2 +- small/idlib/id05.6 | 2 +- small/idlib/id06.0 | 2 +- small/idlib/id06.4 | 2 +- small/idlib/id064.c | 2 +- small/idlib/id07.2 | 2 +- small/idlib/id08.0 | 2 +- small/idlib/id08.1 | 2 +- small/idlib/id08.4 | 2 +- small/idlib/id08.8 | 2 +- small/idlib/id09.0 | 2 +- small/idlib/id09.6 | 2 +- small/idlib/id10.0 | 2 +- small/idlib/id10.4 | 2 +- small/idlib/id10.8 | 2 +- small/idlib/id100.0 | 2 +- small/idlib/id11.2 | 2 +- small/idlib/id12.0 | 2 +- small/idlib/id12.6 | 2 +- small/idlib/id12.8 | 2 +- small/idlib/id128.e | 2 +- small/idlib/id128c.a | 2 +- small/idlib/id128c.b | 2 +- small/idlib/id128ca.d | 2 +- small/idlib/id128d.a | 2 +- small/idlib/id128d.b | 2 +- small/idlib/id128da.b | 2 +- small/idlib/id128da.c | 2 +- small/idlib/id128da.d | 2 +- small/idlib/id128db.d | 2 +- small/idlib/id128db.f | 2 +- small/idlib/id128db.i | 2 +- small/idlib/id128db.k | 2 +- small/idlib/id128db.o | 2 +- small/idlib/id128db.s | 2 +- small/idlib/id128db.w | 2 +- small/idlib/id128e.b | 2 +- small/idlib/id13.2 | 2 +- small/idlib/id13.5 | 2 +- small/idlib/id13.6 | 2 +- small/idlib/id14.0 | 2 +- small/idlib/id14.4 | 2 +- small/idlib/id15.0 | 2 +- small/idlib/id15.2 | 2 +- small/idlib/id15.6 | 2 +- small/idlib/id16.0 | 2 +- small/idlib/id16.2 | 2 +- small/idlib/id16.8 | 2 +- small/idlib/id17.6 | 2 +- small/idlib/id18.0 | 2 +- small/idlib/id18.4 | 2 +- small/idlib/id18.9 | 2 +- small/idlib/id19.2 | 2 +- small/idlib/id19.6 | 2 +- small/idlib/id19.8 | 2 +- small/idlib/id192.d | 2 +- small/idlib/id192.e | 2 +- small/idlib/id192.f | 2 +- small/idlib/id192.g | 2 +- small/idlib/id192.i | 2 +- small/idlib/id192g.b | 2 +- small/idlib/id192g.d | 2 +- small/idlib/id192i.b | 2 +- small/idlib/id192i.c | 2 +- small/idlib/id20.0 | 2 +- small/idlib/id20.4 | 2 +- small/idlib/id20.8 | 2 +- small/idlib/id21.0 | 2 +- small/idlib/id21.6 | 2 +- small/idlib/id22.0 | 2 +- small/idlib/id22.4 | 2 +- small/idlib/id22.5 | 2 +- small/idlib/id22.8 | 2 +- small/idlib/id23.2 | 2 +- small/idlib/id23.4 | 2 +- small/idlib/id24.0 | 2 +- small/idlib/id24.3 | 2 +- small/idlib/id24.8 | 2 +- small/idlib/id25.0 | 2 +- small/idlib/id25.2 | 2 +- small/idlib/id26.0 | 2 +- small/idlib/id26.4 | 2 +- small/idlib/id27.0 | 2 +- small/idlib/id27.2 | 2 +- small/idlib/id27.6 | 2 +- small/idlib/id28.0 | 2 +- small/idlib/id28.8 | 2 +- small/idlib/id288.d | 2 +- small/idlib/id288.e | 2 +- small/idlib/id288.g | 2 +- small/idlib/id288.h | 2 +- small/idlib/id288.j | 2 +- small/idlib/id288.l | 2 +- small/idlib/id288.v | 2 +- small/idlib/id288j.c | 2 +- small/idlib/id288l.c | 2 +- small/idlib/id29.4 | 2 +- small/idlib/id29.6 | 2 +- small/idlib/id29.7 | 2 +- small/idlib/id30.0 | 2 +- small/idlib/id30.4 | 2 +- small/idlib/id30.6 | 2 +- small/idlib/id30.8 | 2 +- small/idlib/id31.2 | 2 +- small/idlib/id31.5 | 2 +- small/idlib/id32.0 | 2 +- small/idlib/id32.4 | 2 +- small/idlib/id32.8 | 2 +- small/idlib/id320.c | 2 +- small/idlib/id320.f | 2 +- small/idlib/id320.i | 2 +- small/idlib/id320h.c | 2 +- small/idlib/id320h.d | 2 +- small/idlib/id320h.f | 2 +- small/idlib/id320i.c | 2 +- small/idlib/id320i.d | 2 +- small/idlib/id33.0 | 2 +- small/idlib/id33.6 | 2 +- small/idlib/id34.0 | 2 +- small/idlib/id34.2 | 2 +- small/idlib/id34.4 | 2 +- small/idlib/id34.8 | 2 +- small/idlib/id35.0 | 2 +- small/idlib/id35.1 | 2 +- small/idlib/id35.2 | 2 +- small/idlib/id36.0 | 2 +- small/idlib/id36.4 | 2 +- small/idlib/id36.8 | 2 +- small/idlib/id37.2 | 2 +- small/idlib/id37.5 | 2 +- small/idlib/id37.6 | 2 +- small/idlib/id37.8 | 2 +- small/idlib/id38.0 | 2 +- small/idlib/id38.4 | 2 +- small/idlib/id384.b | 2 +- small/idlib/id384.e | 2 +- small/idlib/id384.f | 2 +- small/idlib/id384.g | 2 +- small/idlib/id384.h | 2 +- small/idlib/id384.k | 2 +- small/idlib/id384.p | 2 +- small/idlib/id384.q | 2 +- small/idlib/id384.r | 2 +- small/idlib/id384.s | 2 +- small/idlib/id384.t | 2 +- small/idlib/id384a.b | 2 +- small/idlib/id384a.e | 2 +- small/idlib/id384ac.b | 2 +- small/idlib/id384d.b | 2 +- small/idlib/id384d.c | 2 +- small/idlib/id384db.d | 2 +- small/idlib/id384e.b | 2 +- small/idlib/id384f.a | 2 +- small/idlib/id384f.b | 2 +- small/idlib/id384fa.b | 2 +- small/idlib/id384fa.d | 2 +- small/idlib/id384fa.e | 2 +- small/idlib/id384fb.d | 2 +- small/idlib/id384fb.e | 2 +- small/idlib/id384fb.i | 2 +- small/idlib/id384fb.j | 2 +- small/idlib/id384fb.p | 2 +- small/idlib/id384fb.t | 2 +- small/idlib/id384fb.y | 2 +- small/idlib/id384g.b | 2 +- small/idlib/id384g.c | 2 +- small/idlib/id384g.d | 2 +- small/idlib/id384gb.a | 2 +- small/idlib/id384gb.c | 2 +- small/idlib/id384gb.e | 2 +- small/idlib/id384gb.f | 2 +- small/idlib/id384gb.h | 2 +- small/idlib/id384gb.j | 2 +- small/idlib/id384gb.m | 2 +- small/idlib/id384gb.n | 2 +- small/idlib/id384gb.q | 2 +- small/idlib/id384gb.r | 2 +- small/idlib/id384gb.u | 2 +- small/idlib/id384gb.x | 2 +- small/idlib/id384gb.y | 2 +- small/idlib/id384gba.b | 2 +- small/idlib/id384gba.c | 2 +- small/idlib/id384gba.d | 2 +- small/idlib/id384gba.f | 2 +- small/idlib/id384gba.j | 2 +- small/idlib/id384gd.g | 2 +- small/idlib/id384gd.q | 2 +- small/idlib/id384gda.e | 2 +- small/idlib/id384gda.n | 2 +- small/idlib/id384gda.s | 2 +- small/idlib/id384gda.x | 2 +- small/idlib/id384h.d | 2 +- small/idlib/id384i.b | 2 +- small/idlib/id384i.c | 2 +- small/idlib/id384i.d | 2 +- small/idlib/id384i.e | 2 +- small/idlib/id384i.f | 2 +- small/idlib/id384ib.a | 2 +- small/idlib/id384ib.b | 2 +- small/idlib/id384ib.d | 2 +- small/idlib/id384ib.e | 2 +- small/idlib/id384ib.g | 2 +- small/idlib/id384ib.h | 2 +- small/idlib/id384ib.k | 2 +- small/idlib/id384ib.m | 2 +- small/idlib/id384ib.o | 2 +- small/idlib/id384ib.p | 2 +- small/idlib/id384ib.t | 2 +- small/idlib/id384ib.v | 2 +- small/idlib/id384ib.x | 2 +- small/idlib/id384ib.y | 2 +- small/idlib/id384iba.b | 2 +- small/idlib/id384iba.f | 2 +- small/idlib/id384iba.l | 2 +- small/idlib/id384iba.m | 2 +- small/idlib/id384iba.o | 2 +- small/idlib/id384ibb.aj | 2 +- small/idlib/id384ibb.k | 2 +- small/idlib/id384ibb.n | 2 +- small/idlib/id384ibb.w | 2 +- small/idlib/id384ibb.x | 2 +- small/idlib/id384ibb.y | 2 +- small/idlib/id384ibe.aa | 2 +- small/idlib/id384ibe.g | 2 +- small/idlib/id384ibe.q | 2 +- small/idlib/id384ibe.r | 2 +- small/idlib/id384ibe.w | 2 +- small/idlib/id384ibh.ag | 2 +- small/idlib/id384ibh.bh | 2 +- small/idlib/id384ibh.r | 2 +- small/idlib/id384ibm.ac | 2 +- small/idlib/id384ic.b | 2 +- small/idlib/id384ic.c | 2 +- small/idlib/id384ic.f | 2 +- small/idlib/id384ic.i | 2 +- small/idlib/id384ic.r | 2 +- small/idlib/id384ic.z | 2 +- small/idlib/id384ica.d | 2 +- small/idlib/id384ica.g | 2 +- small/idlib/id384id.f | 2 +- small/idlib/id384id.i | 2 +- small/idlib/id384id.k | 2 +- small/idlib/id384id.l | 2 +- small/idlib/id384id.o | 2 +- small/idlib/id384id.u | 2 +- small/idlib/id384id.v | 2 +- small/idlib/id384id.w | 2 +- small/idlib/id384id.z | 2 +- small/idlib/id384ida.e | 2 +- small/idlib/id384ida.f | 2 +- small/idlib/id384ida.k | 2 +- small/idlib/id384ida.l | 2 +- small/idlib/id384ida.r | 2 +- small/idlib/id384ida.u | 2 +- small/idlib/id384ida.v | 2 +- small/idlib/id384idb.c | 2 +- small/idlib/id384idb.k | 2 +- small/idlib/id384idb.l | 2 +- small/idlib/id384idb.s | 2 +- small/idlib/id384idb.t | 2 +- small/idlib/id384idb.y | 2 +- small/idlib/id384idb.z | 2 +- small/idlib/id384idc.h | 2 +- small/idlib/id384idc.i | 2 +- small/idlib/id384idc.o | 2 +- small/idlib/id384idc.q | 2 +- small/idlib/id384idc.r | 2 +- small/idlib/id384idc.t | 2 +- small/idlib/id384idc.y | 2 +- small/idlib/id384idc.z | 2 +- small/idlib/id384idd.g | 2 +- small/idlib/id384idd.h | 2 +- small/idlib/id384idd.p | 2 +- small/idlib/id384idd.u | 2 +- small/idlib/id384idd.v | 2 +- small/idlib/id384ide.c | 2 +- small/idlib/id384ide.k | 2 +- small/idlib/id384ide.l | 2 +- small/idlib/id384ide.z | 2 +- small/idlib/id384k.b | 2 +- small/idlib/id384k.c | 2 +- small/idlib/id384k.d | 2 +- small/idlib/id384k.e | 2 +- small/idlib/id384kc.n | 2 +- small/idlib/id39.0 | 2 +- small/idlib/id39.2 | 2 +- small/idlib/id39.6 | 2 +- small/idlib/id40.0 | 2 +- small/idlib/id40.5 | 2 +- small/idlib/id40.8 | 2 +- small/idlib/id41.4 | 2 +- small/idlib/id41.6 | 2 +- small/idlib/id42.0 | 2 +- small/idlib/id42.4 | 2 +- small/idlib/id43.2 | 2 +- small/idlib/id432.f | 2 +- small/idlib/id432.i | 2 +- small/idlib/id432.j | 2 +- small/idlib/id432.k | 2 +- small/idlib/id432.m | 2 +- small/idlib/id432.o | 2 +- small/idlib/id44.0 | 2 +- small/idlib/id44.1 | 2 +- small/idlib/id44.4 | 2 +- small/idlib/id44.8 | 2 +- small/idlib/id448.c | 2 +- small/idlib/id448.e | 2 +- small/idlib/id448.f | 2 +- small/idlib/id448.i | 2 +- small/idlib/id448h.b | 2 +- small/idlib/id448h.d | 2 +- small/idlib/id448i.b | 2 +- small/idlib/id448i.c | 2 +- small/idlib/id45.0 | 2 +- small/idlib/id45.6 | 2 +- small/idlib/id45.9 | 2 +- small/idlib/id46.0 | 2 +- small/idlib/id46.2 | 2 +- small/idlib/id46.4 | 2 +- small/idlib/id46.8 | 2 +- small/idlib/id47.2 | 2 +- small/idlib/id47.6 | 2 +- small/idlib/id48.0 | 2 +- small/idlib/id48.4 | 2 +- small/idlib/id48.6 | 2 +- small/idlib/id48.8 | 2 +- small/idlib/id480.g | 2 +- small/idlib/id480.i | 2 +- small/idlib/id480.k | 2 +- small/idlib/id480.l | 2 +- small/idlib/id480.n | 2 +- small/idlib/id480.p | 2 +- small/idlib/id480.s | 2 +- small/idlib/id480p.g | 2 +- small/idlib/id480s.g | 2 +- small/idlib/id486.d | 2 +- small/idlib/id49.0 | 2 +- small/idlib/id49.2 | 2 +- small/idlib/id49.5 | 2 +- small/idlib/id49.6 | 2 +- small/idlib/id50.0 | 2 +- small/idlib/id50.4 | 2 +- small/idlib/id51.0 | 2 +- small/idlib/id51.3 | 2 +- small/idlib/id51.6 | 2 +- small/idlib/id52.0 | 2 +- small/idlib/id52.2 | 2 +- small/idlib/id52.5 | 2 +- small/idlib/id52.8 | 2 +- small/idlib/id53.2 | 2 +- small/idlib/id53.6 | 2 +- small/idlib/id54.0 | 2 +- small/idlib/id54.4 | 2 +- small/idlib/id54.6 | 2 +- small/idlib/id55.0 | 2 +- small/idlib/id55.2 | 2 +- small/idlib/id55.8 | 2 +- small/idlib/id56.0 | 2 +- small/idlib/id56.4 | 2 +- small/idlib/id56.7 | 2 +- small/idlib/id56.8 | 2 +- small/idlib/id57.0 | 2 +- small/idlib/id57.2 | 2 +- small/idlib/id57.6 | 2 +- small/idlib/id576.b | 2 +- small/idlib/id576.d | 2 +- small/idlib/id576.e | 2 +- small/idlib/id576.f | 2 +- small/idlib/id576.g | 2 +- small/idlib/id576.j | 2 +- small/idlib/id576.k | 2 +- small/idlib/id576.l | 2 +- small/idlib/id576.o | 2 +- small/idlib/id576.y | 2 +- small/idlib/id576a.d | 2 +- small/idlib/id576a.e | 2 +- small/idlib/id576a.m | 2 +- small/idlib/id576a.p | 2 +- small/idlib/id576ae.d | 2 +- small/idlib/id576d.b | 2 +- small/idlib/id576h.b | 2 +- small/idlib/id576h.c | 2 +- small/idlib/id576j.c | 2 +- small/idlib/id576j.h | 2 +- small/idlib/id576k.b | 2 +- small/idlib/id576l.c | 2 +- small/idlib/id576l.d | 2 +- small/idlib/id576l.h | 2 +- small/idlib/id576l.j | 2 +- small/idlib/id576l.m | 2 +- small/idlib/id576lc.c | 2 +- small/idlib/id576lc.g | 2 +- small/idlib/id576lc.n | 2 +- small/idlib/id576lc.p | 2 +- small/idlib/id576lca.d | 2 +- small/idlib/id576lca.h | 2 +- small/idlib/id576lca.n | 2 +- small/idlib/id576lca.q | 2 +- small/idlib/id576lcb.v | 2 +- small/idlib/id576o.b | 2 +- small/idlib/id576o.c | 2 +- small/idlib/id576o.d | 2 +- small/idlib/id576o.g | 2 +- small/idlib/id576o.h | 2 +- small/idlib/id576o.i | 2 +- small/idlib/id576od.f | 2 +- small/idlib/id58.0 | 2 +- small/idlib/id58.4 | 2 +- small/idlib/id58.5 | 2 +- small/idlib/id58.8 | 2 +- small/idlib/id59.2 | 2 +- small/idlib/id59.4 | 2 +- small/idlib/id60.0 | 2 +- small/idlib/id60.8 | 2 +- small/idlib/id61.2 | 2 +- small/idlib/id61.6 | 2 +- small/idlib/id62.0 | 2 +- small/idlib/id62.1 | 2 +- small/idlib/id62.4 | 2 +- small/idlib/id62.5 | 2 +- small/idlib/id624.l | 2 +- small/idlib/id63.0 | 2 +- small/idlib/id63.2 | 2 +- small/idlib/id63.6 | 2 +- small/idlib/id64.0 | 2 +- small/idlib/id64.4 | 2 +- small/idlib/id64.8 | 2 +- small/idlib/id640.b | 2 +- small/idlib/id640.e | 2 +- small/idlib/id640.f | 2 +- small/idlib/id640.g | 2 +- small/idlib/id640.h | 2 +- small/idlib/id640.k | 2 +- small/idlib/id640.p | 2 +- small/idlib/id640c.a | 2 +- small/idlib/id640c.b | 2 +- small/idlib/id640ca.d | 2 +- small/idlib/id640e.a | 2 +- small/idlib/id640e.b | 2 +- small/idlib/id640ea.b | 2 +- small/idlib/id640ea.c | 2 +- small/idlib/id640ea.d | 2 +- small/idlib/id640eb.d | 2 +- small/idlib/id640eb.f | 2 +- small/idlib/id640eb.i | 2 +- small/idlib/id640eb.k | 2 +- small/idlib/id640eb.o | 2 +- small/idlib/id640eb.s | 2 +- small/idlib/id640eb.w | 2 +- small/idlib/id640f.c | 2 +- small/idlib/id640f.f | 2 +- small/idlib/id640g.c | 2 +- small/idlib/id640h.c | 2 +- small/idlib/id640h.d | 2 +- small/idlib/id640h.f | 2 +- small/idlib/id640hc.a | 2 +- small/idlib/id640hc.b | 2 +- small/idlib/id640hc.d | 2 +- small/idlib/id640hc.f | 2 +- small/idlib/id640hc.j | 2 +- small/idlib/id640hc.m | 2 +- small/idlib/id640hc.o | 2 +- small/idlib/id640hc.q | 2 +- small/idlib/id640hc.s | 2 +- small/idlib/id640hc.v | 2 +- small/idlib/id640hc.y | 2 +- small/idlib/id640hca.b | 2 +- small/idlib/id640hca.f | 2 +- small/idlib/id640hca.h | 2 +- small/idlib/id640hca.i | 2 +- small/idlib/id640hca.k | 2 +- small/idlib/id640hca.m | 2 +- small/idlib/id640hca.q | 2 +- small/idlib/id640hca.u | 2 +- small/idlib/id640hd.b | 2 +- small/idlib/id640hd.c | 2 +- small/idlib/id640hd.f | 2 +- small/idlib/id640hd.s | 2 +- small/idlib/id640hf.n | 2 +- small/idlib/id640hf.t | 2 +- small/idlib/id640hfa.w | 2 +- small/idlib/id640hfb.e | 2 +- small/idlib/id640hfb.o | 2 +- small/idlib/id640hfb.y | 2 +- small/idlib/id640j.c | 2 +- small/idlib/id640j.d | 2 +- small/idlib/id640j.f | 2 +- small/idlib/id640j.g | 2 +- small/idlib/id640j.h | 2 +- small/idlib/id640jc.a | 2 +- small/idlib/id640jc.b | 2 +- small/idlib/id640jc.c | 2 +- small/idlib/id640jc.e | 2 +- small/idlib/id640jc.h | 2 +- small/idlib/id640jc.j | 2 +- small/idlib/id640jc.l | 2 +- small/idlib/id640jc.o | 2 +- small/idlib/id640jc.u | 2 +- small/idlib/id640jc.y | 2 +- small/idlib/id640jca.a | 2 +- small/idlib/id640jca.d | 2 +- small/idlib/id640jca.f | 2 +- small/idlib/id640jca.j | 2 +- small/idlib/id640jca.l | 2 +- small/idlib/id640jca.m | 2 +- small/idlib/id640jca.n | 2 +- small/idlib/id640jca.o | 2 +- small/idlib/id640jca.p | 2 +- small/idlib/id640jcb.aj | 2 +- small/idlib/id640jcb.k | 2 +- small/idlib/id640jcb.n | 2 +- small/idlib/id640jcb.w | 2 +- small/idlib/id640jcb.x | 2 +- small/idlib/id640jcb.y | 2 +- small/idlib/id640jch.aa | 2 +- small/idlib/id640jch.g | 2 +- small/idlib/id640jch.q | 2 +- small/idlib/id640jch.r | 2 +- small/idlib/id640jch.w | 2 +- small/idlib/id640jcj.ag | 2 +- small/idlib/id640jcj.bh | 2 +- small/idlib/id640jcj.r | 2 +- small/idlib/id640jcu.ac | 2 +- small/idlib/id640jd.a | 2 +- small/idlib/id640jd.d | 2 +- small/idlib/id640jd.f | 2 +- small/idlib/id640jd.j | 2 +- small/idlib/id640jd.o | 2 +- small/idlib/id640jda.f | 2 +- small/idlib/id640jda.x | 2 +- small/idlib/id640jdb.c | 2 +- small/idlib/id640jdb.h | 2 +- small/idlib/id640jf.b | 2 +- small/idlib/id640jf.n | 2 +- small/idlib/id640jf.u | 2 +- small/idlib/id640jf.x | 2 +- small/idlib/id640jfa.a | 2 +- small/idlib/id640jfa.e | 2 +- small/idlib/id640jfa.f | 2 +- small/idlib/id640jfa.n | 2 +- small/idlib/id640jfa.o | 2 +- small/idlib/id640jfa.v | 2 +- small/idlib/id640jfb.d | 2 +- small/idlib/id640jfb.j | 2 +- small/idlib/id640jfb.m | 2 +- small/idlib/id640jfb.p | 2 +- small/idlib/id640jfb.w | 2 +- small/idlib/id640jfc.c | 2 +- small/idlib/id640jfc.j | 2 +- small/idlib/id640jfc.p | 2 +- small/idlib/id640jfc.v | 2 +- small/idlib/id640jfd.c | 2 +- small/idlib/id640jfd.d | 2 +- small/idlib/id640jfd.i | 2 +- small/idlib/id640jfd.p | 2 +- small/idlib/id640jfd.w | 2 +- small/idlib/id640jfd.y | 2 +- small/idlib/id640jfe.a | 2 +- small/idlib/id640jfe.h | 2 +- small/idlib/id640jfe.i | 2 +- small/idlib/id640jfe.n | 2 +- small/idlib/id640jfe.u | 2 +- small/idlib/id640jfe.z | 2 +- small/idlib/id640jff.a | 2 +- small/idlib/id640jff.g | 2 +- small/idlib/id640jff.k | 2 +- small/idlib/id640jff.l | 2 +- small/idlib/id640jff.v | 2 +- small/idlib/id640jfg.b | 2 +- small/idlib/id640jfg.e | 2 +- small/idlib/id640jfg.o | 2 +- small/idlib/id640jfg.y | 2 +- small/idlib/id640k.b | 2 +- small/idlib/id640k.d | 2 +- small/idlib/id640k.e | 2 +- small/idlib/id640k.f | 2 +- small/idlib/id640kb.h | 2 +- small/idlib/id640kd.x | 2 +- small/idlib/id648.f | 2 +- small/idlib/id648.h | 2 +- small/idlib/id648.i | 2 +- small/idlib/id648.k | 2 +- small/idlib/id648.l | 2 +- small/idlib/id648.p | 2 +- small/idlib/id65.0 | 2 +- small/idlib/id65.6 | 2 +- small/idlib/id66.0 | 2 +- small/idlib/id66.4 | 2 +- small/idlib/id66.6 | 2 +- small/idlib/id67.2 | 2 +- small/idlib/id67.5 | 2 +- small/idlib/id67.6 | 2 +- small/idlib/id672.e | 2 +- small/idlib/id672.h | 2 +- small/idlib/id672.i | 2 +- small/idlib/id672.n | 2 +- small/idlib/id672.q | 2 +- small/idlib/id672.t | 2 +- small/idlib/id672q.e | 2 +- small/idlib/id672t.e | 2 +- small/idlib/id68.0 | 2 +- small/idlib/id68.4 | 2 +- small/idlib/id68.6 | 2 +- small/idlib/id68.8 | 2 +- small/idlib/id69.0 | 2 +- small/idlib/id69.3 | 2 +- small/idlib/id69.6 | 2 +- small/idlib/id70.0 | 2 +- small/idlib/id70.2 | 2 +- small/idlib/id70.4 | 2 +- small/idlib/id70.8 | 2 +- small/idlib/id704.c | 2 +- small/idlib/id704.d | 2 +- small/idlib/id704.g | 2 +- small/idlib/id704.i | 2 +- small/idlib/id704h.b | 2 +- small/idlib/id704h.d | 2 +- small/idlib/id704i.b | 2 +- small/idlib/id704i.c | 2 +- small/idlib/id71.2 | 2 +- small/idlib/id71.4 | 2 +- small/idlib/id72.0 | 2 +- small/idlib/id72.6 | 2 +- small/idlib/id72.8 | 2 +- small/idlib/id72.9 | 2 +- small/idlib/id720.o | 2 +- small/idlib/id720.q | 2 +- small/idlib/id720.t | 2 +- small/idlib/id720.w | 2 +- small/idlib/id720.y | 2 +- small/idlib/id729c.b | 2 +- small/idlib/id729d.b | 2 +- small/idlib/id729db.b | 2 +- small/idlib/id73.2 | 2 +- small/idlib/id73.5 | 2 +- small/idlib/id73.6 | 2 +- small/idlib/id73.8 | 2 +- small/idlib/id74.0 | 2 +- small/idlib/id74.4 | 2 +- small/idlib/id74.8 | 2 +- small/idlib/id75.0 | 2 +- small/idlib/id75.2 | 2 +- small/idlib/id75.6 | 2 +- small/idlib/id76.0 | 2 +- small/idlib/id76.5 | 2 +- small/idlib/id77.0 | 2 +- small/idlib/id77.4 | 2 +- small/idlib/id77.6 | 2 +- small/idlib/id78.0 | 2 +- small/idlib/id78.3 | 2 +- small/idlib/id78.4 | 2 +- small/idlib/id79.2 | 2 +- small/idlib/id79.8 | 2 +- small/idlib/id80.0 | 2 +- small/idlib/id80.4 | 2 +- small/idlib/id80.8 | 2 +- small/idlib/id800.f | 2 +- small/idlib/id800.h | 2 +- small/idlib/id800.i | 2 +- small/idlib/id800.k | 2 +- small/idlib/id800.m | 2 +- small/idlib/id800k.c | 2 +- small/idlib/id800m.c | 2 +- small/idlib/id800m.f | 2 +- small/idlib/id81.0 | 2 +- small/idlib/id81.2 | 2 +- small/idlib/id81.6 | 2 +- small/idlib/id81.9 | 2 +- small/idlib/id82.0 | 2 +- small/idlib/id82.4 | 2 +- small/idlib/id82.5 | 2 +- small/idlib/id82.8 | 2 +- small/idlib/id83.2 | 2 +- small/idlib/id83.6 | 2 +- small/idlib/id83.7 | 2 +- small/idlib/id832.c | 2 +- small/idlib/id832.g | 2 +- small/idlib/id832.i | 2 +- small/idlib/id832h.c | 2 +- small/idlib/id832h.d | 2 +- small/idlib/id832h.f | 2 +- small/idlib/id832i.c | 2 +- small/idlib/id832i.d | 2 +- small/idlib/id84.0 | 2 +- small/idlib/id84.6 | 2 +- small/idlib/id84.8 | 2 +- small/idlib/id85.0 | 2 +- small/idlib/id85.2 | 2 +- small/idlib/id85.5 | 2 +- small/idlib/id85.6 | 2 +- small/idlib/id85.8 | 2 +- small/idlib/id86.0 | 2 +- small/idlib/id86.4 | 2 +- small/idlib/id86.8 | 2 +- small/idlib/id864.b | 2 +- small/idlib/id864.d | 2 +- small/idlib/id864.e | 2 +- small/idlib/id864.g | 2 +- small/idlib/id864.h | 2 +- small/idlib/id864.j | 2 +- small/idlib/id864.l | 2 +- small/idlib/id864.m | 2 +- small/idlib/id864.o | 2 +- small/idlib/id864.p | 2 +- small/idlib/id864.r | 2 +- small/idlib/id864.v | 2 +- small/idlib/id864a.b | 2 +- small/idlib/id864a.e | 2 +- small/idlib/id864a.m | 2 +- small/idlib/id864ae.a | 2 +- small/idlib/id864ak.a | 2 +- small/idlib/id864ak.b | 2 +- small/idlib/id864b.b | 2 +- small/idlib/id864b.c | 2 +- small/idlib/id864j.a | 2 +- small/idlib/id864m.b | 2 +- small/idlib/id864m.d | 2 +- small/idlib/id864o.b | 2 +- small/idlib/id864o.h | 2 +- small/idlib/id864r.b | 2 +- small/idlib/id864r.e | 2 +- small/idlib/id864r.g | 2 +- small/idlib/id864r.k | 2 +- small/idlib/id87.0 | 2 +- small/idlib/id87.2 | 2 +- small/idlib/id87.5 | 2 +- small/idlib/id87.6 | 2 +- small/idlib/id88.0 | 2 +- small/idlib/id88.2 | 2 +- small/idlib/id88.4 | 2 +- small/idlib/id88.8 | 2 +- small/idlib/id89.1 | 2 +- small/idlib/id89.6 | 2 +- small/idlib/id896.b | 2 +- small/idlib/id896.e | 2 +- small/idlib/id896.f | 2 +- small/idlib/id896.g | 2 +- small/idlib/id896.h | 2 +- small/idlib/id896.l | 2 +- small/idlib/id896c.a | 2 +- small/idlib/id896c.b | 2 +- small/idlib/id896ca.d | 2 +- small/idlib/id896e.b | 2 +- small/idlib/id896e.c | 2 +- small/idlib/id896eb.b | 2 +- small/idlib/id896eb.c | 2 +- small/idlib/id896eb.d | 2 +- small/idlib/id896ec.d | 2 +- small/idlib/id896ec.f | 2 +- small/idlib/id896ec.i | 2 +- small/idlib/id896ec.k | 2 +- small/idlib/id896ec.o | 2 +- small/idlib/id896ec.t | 2 +- small/idlib/id896ec.x | 2 +- small/idlib/id896f.b | 2 +- small/idlib/id896g.b | 2 +- small/idlib/id896h.b | 2 +- small/idlib/id896h.c | 2 +- small/idlib/id896h.d | 2 +- small/idlib/id896hb.a | 2 +- small/idlib/id896hb.b | 2 +- small/idlib/id896hb.c | 2 +- small/idlib/id896hb.e | 2 +- small/idlib/id896hb.k | 2 +- small/idlib/id896hb.m | 2 +- small/idlib/id896hb.n | 2 +- small/idlib/id896hb.q | 2 +- small/idlib/id896hb.s | 2 +- small/idlib/id896hb.v | 2 +- small/idlib/id896hb.x | 2 +- small/idlib/id896hb.y | 2 +- small/idlib/id896hba.a | 2 +- small/idlib/id896hba.b | 2 +- small/idlib/id896hba.d | 2 +- small/idlib/id896hba.g | 2 +- small/idlib/id896hba.i | 2 +- small/idlib/id896hba.j | 2 +- small/idlib/id896hd.l | 2 +- small/idlib/id896hd.n | 2 +- small/idlib/id896hda.j | 2 +- small/idlib/id896hda.k | 2 +- small/idlib/id896hda.s | 2 +- small/idlib/id896hda.z | 2 +- small/idlib/id896j.b | 2 +- small/idlib/id896j.c | 2 +- small/idlib/id896j.d | 2 +- small/idlib/id896j.e | 2 +- small/idlib/id896j.f | 2 +- small/idlib/id896jb.a | 2 +- small/idlib/id896jb.b | 2 +- small/idlib/id896jb.c | 2 +- small/idlib/id896jb.d | 2 +- small/idlib/id896jb.i | 2 +- small/idlib/id896jb.j | 2 +- small/idlib/id896jb.k | 2 +- small/idlib/id896jb.l | 2 +- small/idlib/id896jb.r | 2 +- small/idlib/id896jb.s | 2 +- small/idlib/id896jb.t | 2 +- small/idlib/id896jb.u | 2 +- small/idlib/id896jba.a | 2 +- small/idlib/id896jba.b | 2 +- small/idlib/id896jba.c | 2 +- small/idlib/id896jba.f | 2 +- small/idlib/id896jba.l | 2 +- small/idlib/id896jba.m | 2 +- small/idlib/id896jba.o | 2 +- small/idlib/id896jbb.aj | 2 +- small/idlib/id896jbb.k | 2 +- small/idlib/id896jbb.n | 2 +- small/idlib/id896jbb.w | 2 +- small/idlib/id896jbb.x | 2 +- small/idlib/id896jbb.y | 2 +- small/idlib/id896jbi.aa | 2 +- small/idlib/id896jbi.g | 2 +- small/idlib/id896jbi.q | 2 +- small/idlib/id896jbi.r | 2 +- small/idlib/id896jbi.w | 2 +- small/idlib/id896jbj.ag | 2 +- small/idlib/id896jbj.bh | 2 +- small/idlib/id896jbj.r | 2 +- small/idlib/id896jbr.ac | 2 +- small/idlib/id896jc.a | 2 +- small/idlib/id896jc.f | 2 +- small/idlib/id896jc.i | 2 +- small/idlib/id896jc.l | 2 +- small/idlib/id896jc.u | 2 +- small/idlib/id896jca.d | 2 +- small/idlib/id896jca.f | 2 +- small/idlib/id896jca.h | 2 +- small/idlib/id896jd.b | 2 +- small/idlib/id896jd.l | 2 +- small/idlib/id896jd.n | 2 +- small/idlib/id896jd.s | 2 +- small/idlib/id896jd.u | 2 +- small/idlib/id896jd.x | 2 +- small/idlib/id896jd.z | 2 +- small/idlib/id896jda.c | 2 +- small/idlib/id896jda.h | 2 +- small/idlib/id896jda.n | 2 +- small/idlib/id896jda.r | 2 +- small/idlib/id896jda.u | 2 +- small/idlib/id896jda.y | 2 +- small/idlib/id896jda.z | 2 +- small/idlib/id896jdb.f | 2 +- small/idlib/id896jdb.k | 2 +- small/idlib/id896jdb.o | 2 +- small/idlib/id896jdb.t | 2 +- small/idlib/id896jdb.w | 2 +- small/idlib/id896jdb.y | 2 +- small/idlib/id896jdc.d | 2 +- small/idlib/id896jdc.h | 2 +- small/idlib/id896jdc.l | 2 +- small/idlib/id896jdc.o | 2 +- small/idlib/id896jdc.t | 2 +- small/idlib/id896jdc.u | 2 +- small/idlib/id896jdc.w | 2 +- small/idlib/id896jdd.b | 2 +- small/idlib/id896jdd.g | 2 +- small/idlib/id896jdd.k | 2 +- small/idlib/id896jdd.o | 2 +- small/idlib/id896jdd.q | 2 +- small/idlib/id896jdd.r | 2 +- small/idlib/id896jdd.u | 2 +- small/idlib/id896jdd.z | 2 +- small/idlib/id896jde.h | 2 +- small/idlib/id896jde.k | 2 +- small/idlib/id896jde.m | 2 +- small/idlib/id896jde.x | 2 +- small/idlib/id896jdf.f | 2 +- small/idlib/id896l.b | 2 +- small/idlib/id896l.c | 2 +- small/idlib/id896l.d | 2 +- small/idlib/id896l.e | 2 +- small/idlib/id896lca.a | 2 +- small/idlib/id90.0 | 2 +- small/idlib/id90.4 | 2 +- small/idlib/id91.0 | 2 +- small/idlib/id91.2 | 2 +- small/idlib/id91.8 | 2 +- small/idlib/id92.0 | 2 +- small/idlib/id92.4 | 2 +- small/idlib/id92.8 | 2 +- small/idlib/id93.0 | 2 +- small/idlib/id93.6 | 2 +- small/idlib/id94.0 | 2 +- small/idlib/id94.4 | 2 +- small/idlib/id94.5 | 2 +- small/idlib/id94.8 | 2 +- small/idlib/id95.0 | 2 +- small/idlib/id95.2 | 2 +- small/idlib/id95.4 | 2 +- small/idlib/id96.0 | 2 +- small/idlib/id96.6 | 2 +- small/idlib/id96.8 | 2 +- small/idlib/id960.e | 2 +- small/idlib/id960.h | 2 +- small/idlib/id960.i | 2 +- small/idlib/id960.j | 2 +- small/idlib/id960.l | 2 +- small/idlib/id960.m | 2 +- small/idlib/id960.p | 2 +- small/idlib/id960.q | 2 +- small/idlib/id960.r | 2 +- small/idlib/id960.t | 2 +- small/idlib/id960.x | 2 +- small/idlib/id960a.o | 2 +- small/idlib/id960a.q | 2 +- small/idlib/id960a.u | 2 +- small/idlib/id960l.a | 2 +- small/idlib/id960l.c | 2 +- small/idlib/id960o.b | 2 +- small/idlib/id960o.c | 2 +- small/idlib/id960o.d | 2 +- small/idlib/id960p.a | 2 +- small/idlib/id960p.b | 2 +- small/idlib/id960q.c | 2 +- small/idlib/id960q.d | 2 +- small/idlib/id960q.f | 2 +- small/idlib/id960q.k | 2 +- small/idlib/id960r.b | 2 +- small/idlib/id960r.c | 2 +- small/idlib/id960t.c | 2 +- small/idlib/id960t.d | 2 +- small/idlib/id960t.e | 2 +- small/idlib/id960t.f | 2 +- small/idlib/id960t.j | 2 +- small/idlib/id960t.l | 2 +- small/idlib/id960t.u | 2 +- small/idlib/id960tf.w | 2 +- small/idlib/id960tfa.z | 2 +- small/idlib/id960tfb.j | 2 +- small/idlib/id960tfb.t | 2 +- small/idlib/id960tfd.w | 2 +- small/idlib/id960tfd.y | 2 +- small/idlib/id960tfe.i | 2 +- small/idlib/id960tff.d | 2 +- small/idlib/id960tff.k | 2 +- small/idlib/id960tff.o | 2 +- small/idlib/id960tfg.q | 2 +- small/idlib/id960tfh.f | 2 +- small/idlib/id960tfi.k | 2 +- small/idlib/id960tfj.r | 2 +- small/idlib/id960tfk.c | 2 +- small/idlib/id960tfk.g | 2 +- small/idlib/id960x.c | 2 +- small/idlib/id960x.d | 2 +- small/idlib/id960x.e | 2 +- small/idlib/id960x.f | 2 +- small/idlib/id960x.g | 2 +- small/idlib/id960x.i | 2 +- small/idlib/id960x.j | 2 +- small/idlib/id97.2 | 2 +- small/idlib/id97.5 | 2 +- small/idlib/id97.6 | 2 +- small/idlib/id972.b | 2 +- small/idlib/id972.d | 2 +- small/idlib/id972.e | 2 +- small/idlib/id972.f | 2 +- small/idlib/id972.g | 2 +- small/idlib/id972.h | 2 +- small/idlib/id972.l | 2 +- small/idlib/id972.p | 2 +- small/idlib/id98.0 | 2 +- small/idlib/id98.4 | 2 +- small/idlib/id98.8 | 2 +- small/idlib/id99.0 | 2 +- small/idlib/id99.2 | 2 +- small/idlib/id99.6 | 2 +- small/idlib/id99.9 | 2 +- small/small.gd | 2 +- src/Makefile | 726 ++++++++++-------- src/ariths.c | 229 +++--- src/ariths.h | 18 +- src/blister.c | 1217 +++++++++++++++++------------- src/blister.h | 63 +- src/bool.c | 209 ++++-- src/bool.h | 85 +-- src/calls.c | 427 ++++++++--- src/calls.h | 65 +- src/code.c | 127 +++- src/code.h | 18 +- src/compiled.c | 385 ---------- src/compiled.h | 144 ++-- src/compiler.c | 85 ++- src/compiler.h | 25 +- src/compstat.c | 4 +- src/compstat.h | 2 +- src/costab.c | 240 +++--- src/costab.h | 24 +- src/cyclotom.c | 210 ++++-- src/cyclotom.h | 37 +- src/dt.c | 225 +++--- src/dt.h | 43 +- src/dteval.c | 458 ++++++------ src/dteval.h | 42 +- src/exprs.c | 92 ++- src/exprs.h | 38 +- src/finfield.c | 190 +++-- src/finfield.h | 34 +- src/funcs.c | 198 +++-- src/funcs.h | 36 +- src/gap.c | 1347 +++++++++++++++++++-------------- src/gap.h | 166 ++++- src/gasman.c | 531 +++++++++++-- src/gasman.h | 93 ++- src/gvars.c | 327 +++++--- src/gvars.h | 136 +++- src/integer.c | 336 ++++++--- src/integer.h | 34 +- src/intrprtr.c | 170 ++--- src/intrprtr.h | 35 +- src/listfunc.c | 253 ++++--- src/listfunc.h | 36 +- src/listoper.c | 248 +++--- src/listoper.h | 43 +- src/lists.c | 766 +++++++++++++++---- src/lists.h | 224 +++++- src/objcftl.c | 186 +++-- src/objcftl.h | 42 +- src/objects.c | 787 +++++++------------ src/objects.h | 48 +- src/objfgelm.c | 465 ++++++------ src/objfgelm.h | 23 +- src/objpcgel.c | 246 +++--- src/objpcgel.h | 26 +- src/objscoll.c | 253 ++++--- src/objscoll.h | 26 +- src/opers.c | 672 +++++++++-------- src/opers.h | 51 +- src/permutat.c | 383 +++++++--- src/permutat.h | 43 +- src/plist.c | 1426 ++++++++++++++++++++++++++++------- src/plist.h | 39 +- src/precord.c | 224 ++++-- src/precord.h | 37 +- src/range.c | 272 +++++-- src/range.h | 56 +- src/rational.c | 136 +++- src/rational.h | 32 +- src/read.c | 75 +- src/read.h | 18 +- src/records.c | 194 +++-- src/records.h | 33 +- src/saveload.c | 673 ++++++++++++++++- src/saveload.h | 73 +- src/scanner.c | 47 +- src/scanner.h | 31 +- src/sctable.c | 91 ++- src/sctable.h | 26 +- src/set.c | 365 +++++---- src/set.h | 32 +- src/stats.c | 125 ++-- src/stats.h | 35 +- src/streams.c | 392 +++++----- src/streams.h | 20 +- src/string.c | 738 ++++++++++++------ src/string.h | 94 ++- src/sysfiles.c | 190 ++--- src/sysfiles.h | 8 +- src/system.c | 377 ++++++---- src/system.h | 41 +- src/tietze.c | 1575 +++++++++++++++++++++++++++++++++++++++ src/tietze.h | 55 ++ src/vars.c | 175 +++-- src/vars.h | 33 +- src/vector.c | 75 +- src/vector.h | 34 +- src/weakptr.c | 626 ++++++++++++++++ src/weakptr.h | 57 ++ tbl/clmelab.tbl | 15 +- tbl/ctadmin.tbi | 12 +- tbl/ctbalter.tbl | 55 ++ tbl/ctoalter.tbl | 38 + tbl/ctocliff.tbl | 81 ++ tbl/ctoline1.tbl | 3 + tbl/ctomathi.tbl | 6 +- tbl/ctomaxi1.tbl | 183 ++++- tbl/ctomisc1.tbl | 44 +- tbl/ctomisc6.tbl | 8 +- tbl/ctonews.tbl | 32 +- tbl/ctounit1.tbl | 6 +- tbl/ctprimar.tbl | 94 ++- trans/trans.grp | 2 +- tst/algsc.tst | 6 +- tst/grpmat.tst | 10 +- tst/grppc.tst | 12 + tst/grpperm.tst | 35 + tst/mapping.tst | 6 + tst/modfree.tst | 2 +- tst/morpheus.tst | 5 + tst/testall.g | 36 +- tst/vspcmat.tst | 6 + tst/weakptr.tst | 64 ++ tst/zmodnz.tst | 7 +- 1286 files changed, 27079 insertions(+), 11631 deletions(-) create mode 100755 alpha/checkout create mode 100755 alpha/checkvar create mode 100755 alpha/compile create mode 100755 alpha/doit create mode 100755 alpha/readtest create mode 100755 alpha/setvar create mode 100755 alpha/tarit create mode 100644 beta/banner create mode 100755 beta/checkout create mode 100755 beta/checkvar create mode 100755 beta/compile create mode 100755 beta/doit create mode 100755 beta/readtest create mode 100755 beta/setvar create mode 100755 beta/tarit create mode 100755 beta/texdoc create mode 100644 dev/packages create mode 100644 dev/refmanual create mode 100644 dev/road.tex create mode 100644 doc/ext/foa.tex create mode 100644 doc/ext/weakptr.tex create mode 100644 doc/ref/install.tex create mode 100644 doc/tut/domain.tex create mode 100644 etc/PENDING_FIXES create mode 100644 lib/gpprmsya.gd create mode 100644 lib/gpprmsya.gi create mode 100644 lib/wpobj.g create mode 100644 lib/wpobj.gd create mode 100644 lib/wpobj.gi delete mode 100644 src/compiled.c create mode 100644 src/tietze.c create mode 100644 src/tietze.h create mode 100644 src/weakptr.c create mode 100644 src/weakptr.h create mode 100644 tst/grpperm.tst create mode 100644 tst/weakptr.tst diff --git a/alpha/checkout b/alpha/checkout new file mode 100755 index 0000000000..1f6895d635 --- /dev/null +++ b/alpha/checkout @@ -0,0 +1,43 @@ +#!/bin/sh +############################################################################# +## +#W checkout Frank Celler +## +## this shell script checks out the next version of the alpha release +## +if [ -z "$BINDIR" ]; then + echo "PANIC: you must set 'BINDIR'" + exit 1 +fi +if ${BINDIR}/checkvar; then echo; else + exit 1 +fi + + +# create an alpha directory +cd ${ALPHAROOT} +rm -rf alpha + + +# checkout the files +echo "$0: checking out version $VERSION of $DATE" +cvs -Q checkout -D "$DATE" -d alpha GAP/4.0 +if [ \! -d alpha ]; then + echo "PANIC: cvs did not create an alpha directory" + exit 1 +fi + + +# and add a tag +echo "$0: tagging version $VERSION of $DATE" +cvs -Q tag -F -D "$DATE" "ALPHA$VERSION" + + +# set the version +chmod 644 alpha/lib/version.g +echo "VERSION := \"Alpha $VERSION\";" > alpha/lib/version.g +echo "DATE := \"$DATE\";" >> alpha/lib/version.g + + +# that's it +exit 0 diff --git a/alpha/checkvar b/alpha/checkvar new file mode 100755 index 0000000000..911b6aff78 --- /dev/null +++ b/alpha/checkvar @@ -0,0 +1,43 @@ +#!/bin/sh +############################################################################# +## +#W checkvar Frank Celler +## +## this shell script checks the variables +## +if [ -z "$CVSROOT" ]; then + echo "PANIC: you must set 'CVSROOT'" + exit 1 +fi + +if [ -z "$ALPHAROOT" ]; then + echo "PANIC: you must set 'ALPHAROOT'" + exit 1 +fi + +if [ -z "$VERSION" ]; then + echo "PANIC: you must set 'VERSION'" + exit 1 +fi + +if [ -z "$DATE" ]; then + echo "PANIC: you must set 'DATE'" + exit 1 +fi + +if [ -z "$MAKETARGET" ]; then + echo "PANIC: you must set 'MAKETARGET'" + exit 1 +fi + +if [ -z "$GAPEXEC" ]; then + echo "PANIC: you must set 'GAPEXEC'" + exit 1 +fi + +if [ -z "$TARDIR" ]; then + echo "PANIC: you must set 'TARDIR'" + exit 1 +fi + +exit 0 diff --git a/alpha/compile b/alpha/compile new file mode 100755 index 0000000000..3caf0bedfc --- /dev/null +++ b/alpha/compile @@ -0,0 +1,29 @@ +#!/bin/sh +############################################################################# +## +#W compile Frank Celler +## +## this shell script compiles the next version of the alpha release +## +if [ -z "$BINDIR" ]; then + echo "PANIC: you must set 'BINDIR'" + exit 1 +fi +if ${BINDIR}/checkvar; then echo; else + exit 1 +fi + + +# go into the source directoy and compile +cd ${ALPHAROOT}/alpha/src +echo "$0: compiling version $VERSION of $DATE for $MAKETARGET" +make ${MAKETARGET} + + +# check that a executable has been created +if [ \! -x ${GAPEXEC} ]; then + echo "PANIC: no executable '${GAPEXEC}' has been created" + exit 1 +fi + +exit 0 diff --git a/alpha/doit b/alpha/doit new file mode 100755 index 0000000000..7b907a9d04 --- /dev/null +++ b/alpha/doit @@ -0,0 +1,57 @@ +#!/bin/sh +############################################################################# +## +#W doit Frank Celler +## +## this shell script set the environment and then calls to various programs +## to extract the current version, compile it, run the test file, and tar +## everything up +## +. `dirname $0`/setvar + +# checkout the new version +echo "======================================================================" +echo +if ${BINDIR}/checkout; then echo; else + echo "PANIC: cannot checkout the next version" + exit 1 +fi + + +# compile the new version +echo +echo "======================================================================" +echo +if ${BINDIR}/compile; then echo; else + echo "PANIC: cannot compile the next version" + exit 1 +fi + + +# run the test files the new version +echo +echo "======================================================================" +echo +if ${BINDIR}/readtest; then echo; else + echo "PANIC: cannot run the test files" + exit 1 +fi + + +# tar the new version +echo +echo "======================================================================" +echo +if ${BINDIR}/tarit; then echo; else + echo "PANIC: cannot tar the next version" + exit 1 +fi + +echo +echo "======================================================================" +echo + +echo $VERSION > ${ALPHAROOT}/VERSION + +exit 0 + diff --git a/alpha/readtest b/alpha/readtest new file mode 100755 index 0000000000..361a53d1f8 --- /dev/null +++ b/alpha/readtest @@ -0,0 +1,36 @@ +#!/bin/sh +############################################################################# +## +#W compile Frank Celler +## +## this shell script reads the test files +## +if [ -z "$BINDIR" ]; then + echo "PANIC: you must set 'BINDIR'" + exit 1 +fi +if ${BINDIR}/checkvar; then echo; else + exit 1 +fi + + +# go into the test directoy and start gap +cd ${ALPHAROOT}/alpha/tst +touch gap.core +chmod 000 gap.core +echo "$0: testing version $VERSION of $DATE" +for file in *.tst; do + echo "+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +" + echo "$0: testing file '$file'" + echo "Print(\"\\n\"); ReadTest(\"$file\");" | \ + ${GAPEXEC} \ + -l ${ALPHAROOT}/alpha -r -b -m 10m +done + +# do a "testall.g" +echo "+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +" +echo "$0: testing all" +echo "Print(\"\\n\"); Read(\"testall.g\");" | \ + ${GAPEXEC} -l ${ALPHAROOT}/alpha -r -b -M -N -m 16m + +exit 0 diff --git a/alpha/setvar b/alpha/setvar new file mode 100755 index 0000000000..2965dadaa2 --- /dev/null +++ b/alpha/setvar @@ -0,0 +1,54 @@ +#!/bin/sh +############################################################################# +## +#W setvar Frank Celler +## +## this shell script sets the variables +## +PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin + +# where does the CVS directory live +CVSROOT=:pserver:gap@cvs-gap.dcs.st-and.ac.uk:/gap/CVS + + +# where does the alpha directory live +ALPHAROOT=/usd/gap/4.alpha +if [ \! -d ${ALPHAROOT} ]; then + echo "PANIC: directory '${ALPHAROOT}' does not exists" + exit 1 +fi + + +# executable +MAKETARGET=i386-ibm-freebsd-gcc2 +GAPEXEC=${ALPHAROOT}/alpha/bin/i386-ibm-freebsd-gcc2/gap + +# what is *this moment* +DATE=`date +"%D %T %Z"` + + +# what is the next version +if [ \! -f ${ALPHAROOT}/VERSION ]; then + echo "PANIC: cannot find the version file '${ALPHAROOT}/VERSION'" + exit 1 +fi +OLD_VERSION=`cat ${ALPHAROOT}/VERSION` +if [ -z ${OLD_VERSION} ]; then + echo "PANIC: version file '${ALPHAROOT}/VERSION' is corrupted'" + exit 1 +fi +VERSION=`expr ${OLD_VERSION} + 1` + + +# binary directory +BINDIR=${ALPHAROOT}/bin + + +# the tar directory +TARDIR=/usd/gap4 + + +# export these variables +export CVSROOT ALPHAROOT VERSION BINDIR DATE GAPEXEC MAKETARGET TARDIR + + diff --git a/alpha/tarit b/alpha/tarit new file mode 100755 index 0000000000..6d46d9079f --- /dev/null +++ b/alpha/tarit @@ -0,0 +1,40 @@ +#!/bin/sh +############################################################################# +## +#W tarit Frank Celler +## +## this shell script tars up the next version of the alpha release +## +if [ -z "$BINDIR" ]; then + echo "PANIC: you must set 'BINDIR'" + exit 1 +fi +if ${BINDIR}/checkvar; then echo; else + exit 1 +fi + + +# clean the old files +cd ${TARDIR} +[ -d OLD ] || mkdir OLD +mv [a-z]*.tar.gz OLD + + +# go into the source directoy and create the tar files +cd ${ALPHAROOT} +echo "$0: taring version $VERSION of $DATE" + +tar -c -z -f ${TARDIR}/gap4a${VERSION}.tar.gz --exclude CVS \ + alpha/src alpha/lib + +tar -c -z -f ${TARDIR}/grp4a${VERSION}.tar.gz --exclude CVS \ + alpha/grp alpha/small alpha/trans alpha/prim + +tar -c -z -f ${TARDIR}/tbl4a${VERSION}.tar.gz --exclude CVS \ + alpha/tbl + +tar -c -z -f ${TARDIR}/tst4a${VERSION}.tar.gz --exclude CVS \ + alpha/tst + + +exit 0 diff --git a/beta/banner b/beta/banner new file mode 100644 index 0000000000..6cd73f091d --- /dev/null +++ b/beta/banner @@ -0,0 +1,25 @@ +P(""); +P("BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA"); +P(""); +P("This is an BETA version of GAP 4. Please do not redistribute this"); +P("version or discuss it in the GAP forum. You can get a new version and"); +P("bugfixes from"); +P(""); +P(" ftp://ftp-gap.dcs.st-and.ac.uk"); +P(""); +P("Please report bugs and problems to"); +P(""); +P(" gap-trouble@dcs.st-and.ac.uk"); +P(""); +P("quoting the Version and Date below and the machine, operation system,"); +P("and compiler used."); +P(""); +P("BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA"); +P(""); +Print("Version: ", VERSION, "\n"); +Print("Date: ", DATE, "\n"); +P(""); +P("BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA"); +P(""); +P("Loading the library, please be patient this may take a while."); +P(""); diff --git a/beta/checkout b/beta/checkout new file mode 100755 index 0000000000..bc0b6545c1 --- /dev/null +++ b/beta/checkout @@ -0,0 +1,44 @@ +#!/bin/sh +############################################################################# +## +#W checkout Frank Celler +## +## this shell script checks out the next version of the beta release +## +if [ -z "$BINDIR" ]; then + echo "PANIC: you must set 'BINDIR'" + exit 1 +fi +if ${BINDIR}/checkvar; then echo; else + exit 1 +fi + + +# create an beta directory +cd ${BETAROOT} +rm -rf ${BETANAME} + + +# checkout the files +echo "$0: checking out version $VERSION of $DATE" +cvs -Q export -D "$DATE" -d $BETANAME GAP/4.0 +if [ \! -d ${BETANAME} ]; then + echo "PANIC: cvs did not create an beta directory" + exit 1 +fi + + +# and add a tag +echo "$0: tagging version $VERSION of $DATE" +cvs tag -F -D "$DATE" "GAP4B$VERSION" + + +# set the version +chmod 644 $BETANAME/lib/version.g +echo "VERSION := \"Beta $VERSION\";" > beta/lib/version.g +echo "DATE := \"$DATE\";" >> ${BETANAME}/lib/version.g +cat $BINDIR/banner >> ${BETANAME}/lib/version.g + + +# that's it +exit 0 diff --git a/beta/checkvar b/beta/checkvar new file mode 100755 index 0000000000..e43bdaaaab --- /dev/null +++ b/beta/checkvar @@ -0,0 +1,48 @@ +#!/bin/sh +############################################################################# +## +#W checkvar Frank Celler +## +## this shell script checks the variables +## +if [ -z "$CVSROOT" ]; then + echo "PANIC: you must set 'CVSROOT'" + exit 1 +fi + +if [ -z "$BETAROOT" ]; then + echo "PANIC: you must set 'BETAROOT'" + exit 1 +fi + +if [ -z "$BETANAME" ]; then + echo "PANIC: you must set 'BETANAME'" + exit 1 +fi + +if [ -z "$VERSION" ]; then + echo "PANIC: you must set 'VERSION'" + exit 1 +fi + +if [ -z "$DATE" ]; then + echo "PANIC: you must set 'DATE'" + exit 1 +fi + +if [ -z "$MAKETARGET" ]; then + echo "PANIC: you must set 'MAKETARGET'" + exit 1 +fi + +if [ -z "$GAPEXEC" ]; then + echo "PANIC: you must set 'GAPEXEC'" + exit 1 +fi + +if [ -z "$TARDIR" ]; then + echo "PANIC: you must set 'TARDIR'" + exit 1 +fi + +exit 0 diff --git a/beta/compile b/beta/compile new file mode 100755 index 0000000000..e544dd56d0 --- /dev/null +++ b/beta/compile @@ -0,0 +1,33 @@ +#!/bin/sh +############################################################################# +## +#W compile Frank Celler +## +## this shell script compiles the next version of the betbeta release +## +if [ -z "$BINDIR" ]; then + echo "PANIC: you must set 'BINDIR'" + exit 1 +fi +if ${BINDIR}/checkvar; then echo; else + exit 1 +fi + + +# go into the source directoy and compile +cd ${BETAROOT}/${BETANAME}/src +echo "$0: compiling version $VERSION of $DATE for $MAKETARGET" +make ${MAKETARGET} + + +# check that a executable has been created +if [ \! -x ${GAPEXEC} ]; then + echo "PANIC: no executable '${GAPEXEC}' has been created" + exit 1 +fi + +echo "=============================================================" +echo "Creating completion files" +echo "CreateCompletionFiles();quit;" | ${GAPEXEC} -l ${BETAROOT}/${BETANAME} -N + +exit 0 diff --git a/beta/doit b/beta/doit new file mode 100755 index 0000000000..0b29572052 --- /dev/null +++ b/beta/doit @@ -0,0 +1,68 @@ +#!/bin/sh +############################################################################# +## +#W doit Frank Celler +## +## this shell script set the environment and then calls to various programs +## to extract the current version, compile it, run the test file, and tar +## everything up +## +. `dirname $0`/setvar + + +# checkout the new version +echo "======================================================================" +echo +if ${BINDIR}/checkout; then echo; else + echo "PANIC: cannot checkout the next version" + exit 1 +fi + + +# compile the new version +echo +echo "======================================================================" +echo +if ${BINDIR}/compile; then echo; else + echo "PANIC: cannot compile the next version" + exit 1 +fi + + +# TeX documentation +echo +echo "======================================================================" +echo +if ${BINDIR}/texdoc; then echo; else + echo "PANIC: cannot TeX the documentation" + exit 1 +fi + + +# run the test files the new version +echo +echo "======================================================================" +echo +if ${BINDIR}/readtest; then echo; else + echo "PANIC: cannot run the test files" + exit 1 +fi + + +# tar the new version +echo +echo "======================================================================" +echo +if ${BINDIR}/tarit; then echo; else + echo "PANIC: cannot tar the next version" + exit 1 +fi + +echo +echo "======================================================================" +echo + +echo $VERSION > ${BETAROOT}/VERSION + +exit 0 + diff --git a/beta/readtest b/beta/readtest new file mode 100755 index 0000000000..8770f92904 --- /dev/null +++ b/beta/readtest @@ -0,0 +1,38 @@ +#!/bin/sh +############################################################################# +## +#W compile Frank Celler +## +## this shell script reads the test files +## +if [ -z "$BINDIR" ]; then + echo "PANIC: you must set 'BINDIR'" + exit 1 +fi +if ${BINDIR}/checkvar; then echo; else + exit 1 +fi + + +# go into the test directoy and start gap +cd ${BETAROOT}/${BETANAME}/tst +touch gap.core +chmod 000 gap.core +echo "$0: testing version $VERSION of $DATE" +for file in *.tst; do + echo "+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +" + echo "$0: testing file '$file'" + echo "Print(\"\\n\"); ReadTest(\"$file\");" | \ + ${GAPEXEC} \ + -l ${BETAROOT}/${BETANAME} -r -b -m 10m +done + +rm -rf gap.core + +# do a "testall.g" +echo "+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +" +echo "$0: testing all" +echo "Print(\"\\n\"); Read(\"testall.g\");" | \ + ${GAPEXEC} -l ${BETAROOT}/${BETANAME} -r -b -M -N -m 16m + +exit 0 diff --git a/beta/setvar b/beta/setvar new file mode 100755 index 0000000000..1e9964937b --- /dev/null +++ b/beta/setvar @@ -0,0 +1,58 @@ +#!/bin/sh +############################################################################# +## +#W setvar Frank Celler +## +## this shell script sets the variables +## +PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin + +# where does the CVS directory live +CVSROOT="/gap/CVS" +# :pserver:gap@cvs-gap.dcs.st-and.ac.uk:/gap/CVS + + +# where does the beta directory live +BETAROOT=/scratch/gap4beta +if [ \! -d ${BETAROOT} ]; then + echo "PANIC: directory '${BETAROOT}' does not exists" + exit 1 +fi + + +# executable +MAKETARGET=i386-ibm-linux-gcc2 + +# what is *this moment* +DATE=`date +"%D %T %Z"` + + +# what is the next version +if [ \! -f ${BETAROOT}/VERSION ]; then + echo "PANIC: cannot find the version file '${BETAROOT}/VERSION'" + exit 1 +fi +OLD_VERSION=`cat ${BETAROOT}/VERSION` +if [ -z ${OLD_VERSION} ]; then + echo "PANIC: version file '${BETAROOT}/VERSION' is corrupted'" + exit 1 +fi +VERSION=`expr ${OLD_VERSION} + 1` + +# where does the beta directory live +BETANAME="gap4b$VERSION" +GAPEXEC=${BETAROOT}/${BETANAME}/bin/i386-ibm-linux-gcc2/gap + + +# binary directory +BINDIR=/gap/4.0/beta + + +# the tar directory +TARDIR=/scratch + + +# export these variables +export CVSROOT BETAROOT VERSION BINDIR DATE GAPEXEC MAKETARGET TARDIR BETANAME + + diff --git a/beta/tarit b/beta/tarit new file mode 100755 index 0000000000..231965133d --- /dev/null +++ b/beta/tarit @@ -0,0 +1,35 @@ +#!/bin/sh +############################################################################# +## +#W tarit Frank Celler +## +## this shell script tars up the next version of the beta release +## +if [ -z "$BINDIR" ]; then + echo "PANIC: you must set 'BINDIR'" + exit 1 +fi +if ${BINDIR}/checkvar; then echo; else + exit 1 +fi + + +# clean the old files +cd ${TARDIR} +[ -d OLD ] || mkdir OLD +mv [a-z]*.tar.gz OLD + + +# go into the source directoy and create the tar files +echo "$0: taring version $VERSION of $DATE" + +(cd $BETAROOT; +tar -c -z -f ${TARDIR}/gap4b${VERSION}.tar.gz --exclude CVS \ + --exclude .cvsignore ${BETANAME}/src ${BETANAME}/lib ${BETANAME}/grp \ + ${BETANAME}/small ${BETANAME}/trans ${BETANAME}/prim ${BETANAME}/tbl \ + ${BETANAME}/tst ${BETANAME}/bin/gap.sh ${BETANAME}/etc; +tar -c -z -f ${TARDIR}/doc4b${VERSION}.tar.gz --exclude CVS \ + --exclude .cvsignore ${BETANAME}/doc +) + +exit 0 diff --git a/beta/texdoc b/beta/texdoc new file mode 100755 index 0000000000..a878a63aa9 --- /dev/null +++ b/beta/texdoc @@ -0,0 +1,25 @@ +#!/bin/sh +############################################################################# +## +#W texdoc Alexander Hulpke +## +## this shell script TeXs the next version of the beta release +## +if [ -z "$BINDIR" ]; then + echo "PANIC: you must set 'BINDIR'" + exit 1 +fi +if ${BINDIR}/checkvar; then echo; else + exit 1 +fi + + +# go into the source directoy and compile +cd ${BETAROOT}/${BETANAME}/doc +echo "TeXing documentation" +(cd ext; tex manual; tex manual; tex manual; dvips manual) +(cd prg; tex manual; tex manual; tex manual; dvips manual) +(cd ref; tex manual; tex manual; tex manual; dvips manual) +(cd tut; tex manual; tex manual; tex manual; dvips manual) + +exit 0 diff --git a/dev/TODO b/dev/TODO index b1da68de23..03e3b27547 100644 --- a/dev/TODO +++ b/dev/TODO @@ -1,4 +1,3 @@ -============================================================================= From: Frank.Celler@Math.RWTH-Aachen.de Date: Fri, 13 Dec 96 10:43 MET Subject: SUMMARY: immediate methods @@ -88,6 +87,3 @@ they are easy to fix). Steve, you looked at "blist.c" for 64 bits, so this is already dealt with (?). mfg Frank - - - diff --git a/dev/gap5.txt b/dev/gap5.txt index b081e5f146..ed129a44fb 100644 --- a/dev/gap5.txt +++ b/dev/gap5.txt @@ -3,89 +3,10 @@ This is a list of features which should eventually become part of GAP. Table Of Contents ----------------- -1) Weak pointers +1) Was weak pointer objects, now implemented 2) Finalise methods ------------------------------------------------------------------------------ - -1) Weak pointers ----------------- - -1.1) Definition ---------------- - -A weak pointer is a pointer $P$ pointing to an object $O$ such that -object $O$ is *not* kept alive by $P$, that is to say, if there is no -reference to object $O$ by an ordinary pointer than $O$ can be -collected. In this case the pointer $P$ has to updated in such a way -that it no longer points to object $O$. - -1.2) Possible Implementation ----------------------------- - -The following subsections describe possible implementations of weak -pointers in GAP 4. The interface could be implement as - -'w := WeakPointerObject()' - -create a weak pointer object. - -'w[1] := ' - -weak pointer to . - -'w[1]' - -return . - -'IsBound(w[1])' - -check if is still alive. - -1.2.1) List of weak pointers ----------------------------- - -Assuming that there are not too many weak pointers it is possible to -keep a global list $L$ of them. The garbage collection has to proceed as -follows: - -a) mark all objects alive which can be reached from the global bags - but ignore all references from weak pointer objects and from $L$. - -b) run through the list $L$ of weak pointer. If the weak pointer is - garbage, remove it from the list. If the object pointed to by - the weak pointer if garbage, unbind it from the weak pointer. - -c) collect the garbage. - -Care has to be taken that weak pointers are allocated in clusters, -otherwise the swapper will run amok. - - -1.2.2) Weak pointers for component objects ------------------------------------------- - -Assuming that there are quite a lot of weak pointers one could -restrict weak pointer to only point to component objects forcing an -extra slot 'POINTED_TO_BY' to point back to the weak pointer. In case -that more than one weak pointer is allowed for an object the weak -pointers must be some sort of linked list. The garbage collection has -to proceed as follows: - -a) mark all objects alive which can be reached from the global bags - but ignore all references from weak pointer objects. - -b) run through the list of garbage and check of the component objects - occuring have a 'POINTED_TO_BY'. In this case update the weak - pointer. - -c) collect the garbage. - -The slot 'POINTED_TO_BY' should be the first one in an component object -in order to avoid searching for the component. - - ----------------------------------------------------------------------------- 2) Finalise methods diff --git a/dev/lists.txt b/dev/lists.txt index 836cf7f7d3..c1358661fc 100644 --- a/dev/lists.txt +++ b/dev/lists.txt @@ -17,7 +17,7 @@ a dense list, which is mutable T_PLIST_DENSE_NHOM ------------------ -a dense list, which is immutable and not homogeneous +a dense list, which contains immutables and is not homogeneous T_PLIST_EMPTY ------------- @@ -25,32 +25,32 @@ a list of length zero T_PLIST_HOM ----------- -a dense list, which is immutable and homogeneous and not a table +a dense list, which contains immutable and is homogeneous and not a table T_PLIST_HOM_NSORT ----------------- -a dense list, which is immutable and homogeneous and not a table and +a dense list, which contains immutable and is homogeneous and not a table and is known to be unsorted. NSORT means that the list is not strictly sorted. T_PLIST_HOM_SSORT ----------------- -a dense list, which is immutable and homogeneous and not a table and +a dense list, which contains immutable and is homogeneous and not a table and is known to be strictly sorted T_PLIST_TAB ----------- -a dense list, which is immutable and homogeneous and a table; a table +a dense list, which contains immutable and is homogeneous and a table; a table is a list of lists of equal lengths which not empty T_PLIST_TAB_NSORT ----------------- -a dense list, which is immutable and homogeneous and a table and +a dense list, which contains immutable and is homogeneous and a table and is known to be unsorted T_PLIST_TAB_SSORT ----------------- -a dense list, which is immutable and homogeneous and a table and +a dense list, which contains immutable and is homogeneous and a table and is known to be strictly sorted T_PLIST_CYC @@ -358,3 +358,90 @@ vector.c ( PLIST_CYC - PLIST_CYC_SORT ) * T_MAT_CYC = ProdVectorMatrix + +List Packages +------------- + +IS_listtype_REP( ) +-------------------------- +return true if is of "listtype" + + +IsListtype( ) +-------------------- +return true if could be converted into "listtype" + + +IsListtypeConv( ) +------------------------ +return true if could be converted into "listtype". Convert in this +case + + +ConvListtype( ) +---------------------- +convert into "listtype". If does not pass "IsListtype" +anything can happen. + + +ClearFiltsTNums[ ] +------------------------- +contains the type number corresponding to without any +filters set. + + +SetFiltListTNums[ ][ ] +------------------------------------ +set filter number for an object of type number by encoding +it into the type number. + + +ResetFiltListTNums[ ][ ] +-------------------------------------- +reset filter number for an object of type number by encoding +it into the type number. + + +HasFiltListTNums[ ][ ] +------------------------------------ +check filter number for an object of type number . + + +SET_FILT_LIST( , ) +------------------------------- +encode "set filter" in tnum of + + +RESET_FILT_LIST( , ) +--------------------------------- +encode "reset filter" in tnum of + + +HAS_FILT_LIST( , ) +------------------------------- +check if filter is known for + + +filter numbers +-------------- +FN_IS_MUTABLE: mutable list +FN_IS_EMPTY: empty list +FN_IS_SSORT: strictly sorted +FN_IS_NSORT: not strictly sorted +FN_IS_DENSE: dense +FN_IS_NDENSE: not dense +FN_IS_HOMOG: homogeneous +FN_IS_NHOMOG: not homogeneous +FN_IS_TABLE: table + + +PLIST TNums +----------- +EMPTY: empty list +SSORT: dense, homogeneous, strictly sorted +NSORT: dense, not empty, homogeneous, not sorted +DENSE: dense +NDENSE: not dense, not empty +HOMOG: dense, homogeneous +NHOM: dense, not empty, not homogeneous +TAB: dense, not empty, homogeneous, table diff --git a/dev/packages b/dev/packages new file mode 100644 index 0000000000..a71ec65614 --- /dev/null +++ b/dev/packages @@ -0,0 +1,336 @@ +Packages +======== + +Essentials (GAP4 can't run sensibly without them, all .g files) + arith.gd + arith.gi + assert.gd + assert.gi + boolean.g + coll.gd + coll.gi + combinat.gi + cyclotom.g + domain.gd + domain.gi + fampred.g + ffe.g + files.gd + files.gi + filter.g + flag.g + function.g + hash.gd + hash.gi + help.g + info.gd + info.gi + init.g + kernel.g + list.g + list.gd + list.gi + listcoef.gd + listcoef.gi + methsel.g + methwhy.g + object.gd + object.gi + oper.g + package.g + permutat.g + process.gd + process.gi + profile.g + read*.g + record.g + set.g + word.gd + word.gi + wordass.gd + wordass.gi + wordrep.gi + streams.gd + streams.gi + string.g + string.gi + tuples.gd + tuples.gi + type.g + unknown.gd + unknown.gi + version.g + *.co + +Algebra Bootstrap (Definitions for basic algebraic domains. The methods +contained are not deep) + addcoset.gd + addcoset.gi + addmagma.gd + addmagma.gi + extaset.gd + extlset.gd + extrset.gd + extuset.gd + field.gd + field.gi + grptbl.gd + grptbl.gi + magma.gd + magma.gi + mgmfree.gi + mgmring.gd + mgmring.gi + modfree.gi + module.gd + module.gi + modulmat.gi + modulrow.gi + monofree.gi + monoid.gd + monoid.gi + ring.gd + ring.gi + semigrp.gd + semigrp.gi + smgrpfre.gi + +Algebras (probably later split) + algebra.gd + algebra.gi + algfp.gd + algfp.gi + alghom.gd + alghom.gi + alglie.gd + alglie.gi + algliess.gi + algmat.gi + algsc.gd + algsc.gi + liefam.gd + liefam.gi + +Abstract Groups (several independent subpackages are possible) + clas.gd + clas.gi + csetgrp.gd + csetgrp.gi + ctblgrp.gd + ctblgrp.gi + factgrp.gd + factgrp.gi (probably split off permutation part) + gprd.gd + gprd.gi + gprdpc.gi + gprdperm.gi + grp.gd + grp.gi + grpcompl.gi (or PcGroups ?) + grplatt.gd + grplatt.gi + grpnice.gd + grpnice.gi + morpheus.gd + morpheus.gi + oprt.gd + oprt.gi + oprtglat.gd + oprtglat.gi + +PermGroups + clasperm.gi + csetperm.gi + grpperm.gd + grpperm.gi + grpprmcs.gd + grpprmcs.gi + oprtperm.gi + partitio.gi (renaming, confusion with general 'partitions') + stbc.gd + stbc.gi + stbcbckt.gd + stbcbckt.gi + stbcrand.gi + pcgsperm.gd + pcgsperm.gi + +FpGroup + grpfp.gd + grpfp.gi + grpfree.gi + sgpres.gd + sgpres.gi + tietze.gd + tietze.gi + +PcGroups (functions for groups using a Pcgs) + claspcgs.gi + csetpc.gi + ctblpc.gi + ctblsolv.gi + frattext.gd + frattext.gi + frattfree.gd + frattfree.gi + grppc.gd + grppc.gi + grppcatr.gi + grppcaut.gi + grppccom.gd + grppccom.gi + grppcext.gd + grppcext.gi + grppcfp.gd + grppcfp.gi + grppcint.gi + grppclat.gd + grppclat.gi + grppcnrm.gd + grppcnrm.gi + grppcprp.gi + grppcrep.gd + grppcrep.gi + grpreps.gd + grpreps.gi + onecohom.gd + onecohom.gi + oprtpcgs.gi + twocohom.gd + twocohom.gi + +Pcgs (functions to compute/modify &c. a pcgs) + + pcgs.gd + pcgs.gi + pcgscomp.gi + pcgsind.gd + pcgsind.gi + pcgsmodu.gd + pcgsmodu.gi + pcgsnice.gi + pcgspcg.gd + pcgspcg.gi + pcgsspec.gd + pcgsspec.gi + +Rewriting systems (strong interaction with Pcgs) + dt.g (Why is it not dt.gi ?) + rws.gd + rws.gi + rwsdt.gi + rwsgrp.gd + rwsgrp.gi + rwspcclt.gd + rwspcclt.gi + rwspcftl.gi + rwspcgrp.gd + rwspcgrp.gi + rwspcsng.gi + +Matrix groups (relation to matrix algebras) + grpffmat.gd + grpffmat.gi + grpmat.gd + grpmat.gi + meataxe.gi + +Character Tables basic (elementary functions and constructions) + ctbl.gd + ctbl.gi + ctblchar.gd + ctblchar.gi + ctblfuns.gd + ctblfuns.gi + ctbllatt.gd + ctbllatt.gi + ctblmaps.gd + ctblmaps.gi + ctblmoli.gd + ctblmoli.gi + ctblmono.gd + ctblmono.gi + ctblperm.gi + ctblpope.gd + ctblpope.gi + ctblsymm.gd + ctblsymm.gi + +Character Tables Advanced (advanced methods to construct character tables) + +Finite fields + ffe.gd + ffe.gi + fieldfin.gi + polyconw.gd + polyconw.gi + zmodnz.gd + zmodnz.gi + +Number Theory + algfld.gd + algfld.gi + cyclotom.gd + cyclotom.gi + fldabnum.gd + fldabnum.gi + gaussian.gi + integer.gd + integer.gi + numtheor.gd + numtheor.gi + padics.gd (or are they essentials ?) + padics.gi + rational.gi + +Mappings (Functions also interact heavily with the areas for hich they +implement mappings. Still, they have so much in common to deserve an own +class.) + ghom.gd + ghom.gi + ghompcgs.gd + ghompcgs.gi + ghomperm.gd + ghomperm.gi + mapphomo.gd + mapphomo.gi + mapping.gd + mapping.gi + mapprep.gi + +Vectorspaces, Z-Modules (we might want to split Z-Modules off) + basis.gd + basis.gi + basismut.gd + basismut.gi + lattice.gd + lattice.gi + matrix.gd (as some of these routines are used at a lot of places, we + matrix.gi probably want to move it to the 'Essentials' category?) + rvecempt.gd + rvecempt.gi + vspc.gd + vspc.gi + vspchom.gd + vspchom.gi + vspcmat.gi + vspcrow.gi + +Polynomials + polyfinf.gi + polyrat.gd + polyrat.gi + ratfun.gd + ratfun.gi + ratfunul.gi + ringpoly.gd + ringpoly.gi + upoly.gd + upoly.gi + +Compatibility: + compat3a.g + compat3b.g + compat3c.g + compat3d.g + overload.g diff --git a/dev/refmanual b/dev/refmanual new file mode 100644 index 0000000000..0ff634fb80 --- /dev/null +++ b/dev/refmanual @@ -0,0 +1,230 @@ +General process: +================ + +The idea is to store reference documentation as far as possible in the +GAP code. As the GAP code (for practical, conceptual, historical or +whatever) reasons keeps information separate that we want to keep together +for the manual (for example, which filters may imply 'IsFinite'), it seems +to be reasonable to access the manual files not sequantially but via a data +base built from them. (Otherwise we would have to read the full source +probably a few thousand times.) +This data base is internal and still to be specified. + +The actual manual builder then takes 'skeleton' files that contain the +manual outline and fills these from the data base, producing a TeX file for +the manual. These skeleton files may contain further manual content that +would not reasonable fit into the GAP library. + + + .g, .gd, .gi files .msk files (manual skeleton) + \ / + \Database builder / + \ / + V / + Database / + \ / + \ / + V V + Manual builder + | + V + .tex files (for the reference manual) + +We did see no reason not to make .msk files also TeXable (though without the +converter they would just print an outline), therefore the manual builder +will basically just replace information placeholders with the actual +information. + +As an example consider the following declaration in a .gd file: + +############################################################################# +## +#C IsPiffle() +## +## The subcategory of woffles consisting of all piffles. A piffle is a +## woffle that can be borked. +## +IsPiffle := NewCategory("IsPiffle",IsWoffle); + + +Then the skeleton: + + +\Declaration{IsPiffle} +\beginexample +gap> 1+1; +\endexample +\Implications + + +would be converted to TeX code that outputs something like: + + +IsPiffle() C + +The subcategory of woffles consisting of all piffles. A piffle is a +woffle that can be borked. + +gap> 1+1; + +Implies: IsWoffle +(and probably further stuff). + +Information pieces: +=================== + +By generous extrapolation of this example the following information pieces +are imaginable: + +1. Formal file header, containing version number and 'this file + implements ..' line +2. Header Text (like in 'mapping.gd') that explains the general setup. + We may allow several header texts in one file, allowing to give heder + texts to different sections of code. +3. Declarations in the comment (the #A, #C #P &c. lines) +4. Explanatory comment in a ## function/declaration header +5. Declaration lines. (Assignements of 'NewWhatever') +6. Implementation lines (Install(Other)Method +7. Implication lines (InstallTrueMethod &c.) + +All this information will be fetched from the library files and be put into +the data base. (To make it not unhandily large, it might be a good idea to +store text not explicitly, but as 'filename, linerange', because it usually +will be accessed only once.) + +Sometimes this information can be split further apart, sometimes information +is only sensible in context with other information. The commands available +in the skeleton files therefore access this information in different style. + +Skeleton files: +=============== + +Each skeleton file will produce one TeX file. The Skeleton file contains the +TeX text for that TeX file and some special commands that will be replaced +by information fetched from the data base. Information in square brackets is +not compulsory + +\FileHeader[nr]{file} +The (nr-th) header text of the given file (type 2). +(A file may have several header texts, see below.) + +\Declaration{gizmo} + may be an operation, category, representation ,... +This creates a section for the gizmo. This section consists of the following +information: +- The declaration from the comment (information 3) +- Requirements to the arguments (from information 5) +- Explanatory text in the comment header (information 4) + +A letter (CRPAO...) is printed to indicate whether it is a category, property +or whatsoever. + +If the gizmo is an operation (thus also attribute, property) or +operation args, the explanatory text consists of the text from the 'gd' +file, followed by the (selected by #+, see below) 'gi' files. +?? should we guarantee anything about order ?? make it choosable ?? + +If the gizmo is an OperationArgs, the header may contain #D lines that give +argument restrictions (like the argflags list in NewOperation). These will +be dealt with like the argflags in NewOperation. + +If a method for this operation is installed by 'InstallOtherMethod' and has +comment text (#+ selection) and has a declaration (#M line) this declaration +line will be added to the initial declaration lines (see multiple +declarations below). In this case situation the string NUMBER in the text +part will be replaced by the ordinal indicating the position of the +declaration line in the declaration lines. (This allows text in the form: +'The NUMBER usage is ...') + +If the gizmo is a property or an attribute letters S and T will be printed, +if setter and tester are installed under the standard names. (they will be +indexed under there full names however) + +For attributes, it will print M if the attribute is mutable. + +The following commands will work for the last gizmo declared: + +\Implications[lev] +(Only sensible for categories &c.) + (defaulting to 1) is an integer interpreted binary: +1 List all categories &c. implied by the gizmo +2 List everything that implies gizmo +4 List everything that may follow from gizmo (if other gizmoes are set as +well) (information 7) +8 List everything that may (together with other things) may imply gizmo +(information 7) + +\Methods +(Only sensible for operations) +Lists all argument tuple requirements for which methods are installed. + +Multiple Declarations: +---------------------- + +A Declaration may declare multiple uses: Either in the 'gd' file multiple +uses are declared one by one or 'gi' files install other methods that have a +declaration header and comment text (see above). In this case, all +declarations are given (first the ones from the 'gd' file, then the oned +from the 'gi' files). +(Duplicate lines, originating from 'InstallOtherMethod' headers, are +ignored. + +\RequireVersion{filename}{version} + +Issue an error if file is not at least . + +At some point we might want to introduce further commands like %texonly ore +%htmlonly to permit to obtain the html files also directly from the skeleton +files, but this does not seem to be urgent. + +Lines starting with %% are comments that should go to the TeX file, they are +copied with the initial %% replaced by %. Other comment lines will be +removed. + +Formal TeXability: +------------------ + +A skeleton file alone should be TeXable (and then basically just print the +information therin), this requires a suitable header and footer. They can be +separated by a %header and %footer line. They will be stripped off by the +converter and be replaced by suitable manual header files. + +GAP Files: +========== + +It seemed to us that information is most best kept in .gd files, but there +were enough exception to this rule to persuade us to consider also the other +files. (One reason for this is to permit to print information about the +actual methods installed, for example if - though the operation is general +- only methods for a very restricted set of parameters are installed.) + +To limit the information printed in the manual (there might be - for +whatever reason - hideous comments, declarations or method installements +in the library that should not get into the manual, the following scheme is +used: + +Text in a 'gd' file that starts with '#-' is not printed. + +Text in a 'gi' and 'g' file that starts with '#+' is printed (otherwise it +is ignored) + +Notes and ToDo statements (#N and #T) are generally ignored. + +Each header text in a file is introduced by a '#' comment (where is a +number) in the first +line, this permits to have several header texts in a file. + +A text block ends if either the commented area ends or a new text block +(#) explicitly is started. + +Text in text blocks is stripped of the initial comment characters (#) and +all leading spaces and the put into the TeX file. + +Getting started: +================ + +We will try to provide a converter as soon as possible. Until then, the best +strategy for documenting is probably to document the 'gd' files (as already +done for example for 'mapping.gd'). + + diff --git a/dev/road.tex b/dev/road.tex new file mode 100644 index 0000000000..54c4ddc757 --- /dev/null +++ b/dev/road.tex @@ -0,0 +1,261 @@ +\documentclass[12pt]{article} +\usepackage{a4wide} +\newcommand{\GAP}{\textsf{GAP}} +\newcommand{\bd}{\begin{description}} +\newcommand{\ed}{\end{description}} +\parindent=0pt +\parskip=\medskipamount +\title{The Road to \GAP\ 4.1 (and points beyond)} +\author{Steve Linton} +\begin{document} +\maketitle +\section{Introduction} + +The purpose of this document is to identify all the remaining tasks +which must be performed before we can release \GAP\ version 4.1, so +that we can allocate, schedule and monitor them. It also includes some +ideas about developments not essential to 4.1, but which might be +nice, or which we might consider for release in +subsequent versions. + +At this stage I am not considering tasks at the level of detail of +``fix bug x'' or the tasks involved in the actual release. + +This document is based on discussions with Werner Nickel, Alexander +Hulpke, Frank Celler, Thomas Breuer, Volkmar Felsch and Joachim +Neub\"user in September 1997. + +\section{Kernel tasks required for 4.1} + +\bd +\item[Save/load workspace] partly implemented (SL), must be finished by 4.1 (SL to do). +\item[Fast vecffe arithmetic] in hand now (FC/TB) as part of a general overhaul of lists +in the kernel +\item[DOS and Mac ports] Must be done. Some code exists, but +interaction with streams etc will need work. Problems with some PC compilers. +\ed + +\section{Library Packaging} + +The library is now provisionally divided into packages: +\bd +\item[Essentials] Core things needed to keep \GAP\ running +\item[Algebra bootstrap] Definitions and naive methods for basic +algebraic domains +\item[Algebras] Lie, associative and generic algebras, includes ELIAS +\item[Abstract Groups] General methods, includes Morpheus +\item[PermGroups] Includes things like external sets +\item[FpGroups] Includes Tietze +\item[PcGroups] Groups using a PCGS +\item[Pcgs] computing and manipulating a Pcgs -- probably includes pQ +and nq +\item[Rewriting Systems] The boundaries around here aren't quite +settled +\item[Matrix Groups] +\item[Character Tables basic] The electronic ATLAS +\item[Character Tables advanced] Interactive Character Table +Construction +\item[Finite Fields] Some things are in ``essentials'' +\item[Number Theory] +\item[Mappings] +\item[Vectorspaces] +\item[Polynomials] +\item[Tables of Marks] +\item[Compatibility] +\item[Data libraries] possibly one package per library +\ed + +At this stage this is a purely administrative division. + +Someone should be assigned to oversee the maintenance of each package, +even in the run-up to 4.1, and surely afterwards. Many packages should +not need more than maintenance before 4.1. + +\section{Library Tasks Required for 4.1} + +\bd +\item[Quotient Algorithms] At a minimum, we need effective abelian +quotient and p-quotient code. As a last resort, a port of the +\texttt{anupq} package would do instead of a \GAP\ pq. At least an +architecture for, and preferably implementations of, nq and soluble +quotient would be nice. +\item[Tables of marks] Thomas Merkwitz is doing something here. As +with character tables, there is code to access and handle completed +tables, and there is code for interactively constructing them. The +latter is less urgent. +\item[Character Tables] The remaining work here is in hand. Thomas +Breuer will do it. +\item[2 and 3 group libraries] Frank Celler agreed to do this. At +least some of this is incorporated in Bettina's small groups library. +\item[Crystallographic Groups library] +\item[Transitive Groups degrees 24 --31] If Alexander is happy to +release them +\item[Factorization over number fields] Alexander is doing +\item[Character degrees code for solvable groups] +\item[Clifford matrices code] does this fall into the ``Character +tables'' work above +\item[Galois group determination] Alexander has plans for this +\item[General FP Group algorithms] Volkmar Felsch is working on +this. There is a lot to do, because of new concepts. +He will identify a suitable stopping point for 4.1. +\ed + +\section{Share Packages} + +Not, obviously entirely within our control. Clearly, we would like all +share packages upgraded to \GAP\ 4, but some are more important, +because they are central to some people's use of \GAP. In many cases, +functionality could be improved using \GAP\ 4 features. Maintainers +should probably be encouraged to port first and then improve in most +cases, in the interest of getting a \GAP\ 4 version out as soon as possible. + +A list of \GAP\ 3 share packages, and what I know about their status: + +\bd +\item[anupq] High priority. Single external program, so should be easy. +\item[anusq] Single external program, so should be easy. +\item[autag] Bettina is working in this area. Code exists in the \GAP +4 library, but may need final installation and tidying up. +\item[chevie] Medium Priority. Jean Michel and Frank L\"ubeck are certainly interested +in porting this +\item[cohomolo] +\item[cryst] +\item[dce] +\item[gliss] In hand, I think. +\item[grape] High Priority. Len plans to do it after Christmas. Not +hard unless it is extended +\item[grim] Not hard +\item[guava] Medium Priority -- could be a problem (no maintainers) +\item[kbmag] Medium Priority -- shouldn't be a problem +\item[matrix] High Priority +\item[meataxe] Medium Priority unless kernel vecffe arithmetic is fast +enough. TB estimates it would take him 1 week +\item[monoid] Medium Priority (perhaps even absorb into the library) +\item[nq] Medium Priority unless we have a \GAP\ nq by 4.1. +\item[pcqa] Medium Priority +\item[sisyphos] +\item[specht] +\item[ve] Medium Priority +\item[xgap] See below +\item[xmod] In hand +\ed + +There are a couple of rumored forthcoming packages, such as the LBFM +sq. + +\subsection{xgap} + +This breaks into several pieces. The core xgap functionality and the +low-level \GAP\ functions to access it should be easily ported, and +should be done before \GAP\ 4.1. This may, in fact, already work. + +There are various applications using xgap, to display and explore +subgroup lattices, tables of marks, submodule lattices and other +things. These need more thought: (a) because they may need to change +to match new concepts in the library and (b) because they grew up +rather haphazardly and should be organized better. This is not a key +priority for \GAP\ 4.1. + +A Windows version exists, which worked under Windows NT 3.5, but has +stopped working under 4.0. Again not a 4.1 priority, but it must be +sorted eventually. + + +\section{Documentation} + +There are four books in the current \GAP\ 4 manual. One or two books +of substantial worked examples may be added (not a 4.1 priority). + +\bd +\item[Users Tutorial] Some additional material is really needed here: +naming conventions \texttt{As} and \texttt{Is}, \texttt{Of} and +\texttt{By}, for example; some aspects of domains, possibly +more. Perhaps someone should be appointed ``editor'' and charged with +working out what is needed and then procuring and integrating it. + +\item[Users Reference] The scheme for building this from skeleton +files and comments in the sources was basically agreed. This gives one +(rather urgent) task to implement that scheme and one task for each +package, to actually write (or convert from \GAP\ 3) the +documentation. Accuracy and completeness are more important here than +beautiful English composition. + +\item[Programming Tutorial] A slightly lower priority than the user +documentation, but again an editor should be appointed. Use of the +compiler should be covered. Porting guidelines should be included. + +\item[Programming Reference] This is essentially the same job as the +Users reference, but for certain parts of the ``Essentials'' +package. Complicated by the rather elaborate rules that sometimes have +to be followed. The compiler interface should be documented. + +\ed + +\section{Kernel Issues not Essential for 4.1} +\bd + +\item[A careful look at the break loop and debugging] There are still +a few bits of unexpected behaviour here, and more debugging support +could be added. +\item[Portability of compiled code] Some C compilers choke on the +output of the \GAP\ compiler. Can we avoid this? +\item[Windows NT Port] This will become increasingly necessary. See +also discussion of XGAP. +\item[Use of Autoconf or similar] This should simplify \GAP\ porting +and installation, especially if the C share packages can be made to +work with it as well. +\item[Making GASMAN malloc tolerant] This basically means enabling +operation with a non-contiguous workspace. There are a few issues. It +would simplify various other things though. +\item[Kernel support for marshalling] Marshalling is gathering all the +``pieces'' of an object for saving, loading, sending across the net, +etc. The problem is to avoid every object picking up the whole +library. +\item[Possible RPM package] .rpm and .deb packages would simplify +installation on popular flavours of Linux. +\item[Threads] Probably a \GAP 5 issue. Eventually a threaded kernel +would be nice. +\item[User Interface] Again a long-term issue, but there are a lot of +things that could be done here. +\ed + +\section{Library Issues not essential for 4.1} + +\bd +\item[Expression DAGs] an efficient representation for words in some +contexts +\item[Data libraries] New features in \GAP\ 4 might allow better and +more uniform presentation of data libraries +\item[FpGroups] This is a general area in need of review and update +\item[Beyond Lie algebras] A possible extension in the direction of +Kac-Moody algebras, quantum groups and related concepts would be of +considerable interest +\item[(Transformation) Semigroups] There is a scope for a lot of +library development here. +\item[MOC and meataxe] It is planned to try and incorporate most or +all of the functionality of MOC (somewhat urgent as it is very old +code) and the meataxe into \GAP. +\ed +\section{Schedule} + +Frank will provisionally come to St Andrews in November (before I go +to Japan). Our goal at that time is to have the 4.1 kernel complete apart +form bug fixes, and (conceivably) additional algebraic functionality +moved into the kernel from elsewhere. + +Also by that time, it should be possible to finish nearly all the +essential library tasks, except perhaps the quotient algorithms +development. + +Ideally beta 3 around Christmas should have the kernel and library +ready apart from bug fixes. Quotients is the most likely problem area here. + +At this point it \emph{may} be appropriate to split off a 4.2 branch for +technical developments and merge in bug fixes from the 4.1 branch +after the release. + +After that, there remains only documentation and key share packages, +plus any problems that arise. These will determine when 4.1 can +be released. + +\end{document} diff --git a/dev/saveload.tex b/dev/saveload.tex index 9c29115c75..35eef6bb0a 100644 --- a/dev/saveload.tex +++ b/dev/saveload.tex @@ -10,6 +10,8 @@ sent me some notes on saving and loading workspaces, which make up appendix A. +\textbf{Notes in bold describe updates and decisions, September 1997}. + \section{What to Aim For} It would be nice to save a workspace so that it can be used across GAP @@ -19,15 +21,9 @@ \section{What to Aim For} We aim, then, to allow saving and restoring from the outermost GAP prompt, creating a binary file that can be read back into another GAP -session on a CPU of the same word length using the same kernel and -libraries. There are still some issues, mainly arising from the -compiler. What happens if the kernel into which we load has more or -fewer compiled files loaded (dynamically or statically) than the one -from which we saved? What if it has the same loaded modules, but in a -different order? +session on a CPU of the same word length \textbf{(and possible the +same byte-sex)} using the same kernel and libraries. -Frank and I discussed these issues today, and believe that we have -resolved them. \section{Saving Bags} @@ -35,9 +31,10 @@ \section{Saving Bags} be written out and read in a way that depends on its GASMAN type alone. The main implication of this is that we must be able to distinguish Bags from pointers into the kernel from binary data. To -work across 32 bit or 64 bit architectures, we have, within binary +work across 32 bit or 64 bit architectures, we would have, within binary data, to distinguish bytestreams from wordstreams (and possibly also -shortstreams) and bitstreams. +shortstreams) and bitstreams. \textbf{At present we do not do this, +but we should detect when the architectures are incompatible.} There are a few possible problem cases: @@ -49,12 +46,24 @@ \section{Saving Bags} with loading?). If this were extended to marking and copying then the ban on Bags could actually be lifted. An alternative is to split \verb|T_DATAOBJ| into types for word-sequences, short-sequences, -byte-sequences and bit-streams. +byte-sequences and bit-streams, or to store this information somewhere in +the type. + +\textbf{Resolving this is postponed.} + +\item{String Literals in Function Bodies} \textbf{These should be +saved byte-wise, while everything (?) else is saved UInt wise (since a +Stat and an Expr are UInts). Once again a byte-sex problem. Resolution +is easy but tedious -- parse the body properly and save each statement +or expression according to its type} + \item{Functions} The body field of function bags is used for a few different purposes (for example by Operations and by Getter/Setter -functions for flags) and in some cases may not be a bag. Operations -are also the same type as functions, but longer. The proposed solution -here is to give all these objects different GASMAN types. +functions for flags) and in some cases may not be a bag +\textbf{Actually no, it's always a bag}. Operations are also the same +type as functions, but longer. \textbf{This can be solved in the +saving and loading methods for} \verb|T_FUNCTION|, \textbf{by looking +at the length} \end{description} \section{Links Between the Kernel and Workspace} @@ -66,40 +75,63 @@ \subsection{Kernel to Workspace} If a kernel includes significant numbers of compiled files, then it contains a lot of bag identifiers stored in kernel variables. Most of these are created by \verb|InitCopyGVar| or -\verb|InitFopyGVar|. Incidentally, we -observed that these do not need to be roots for marking live bags in -garbage collection, or before saving, as the bags they point to are -always reachable from the global variables bag. After loading a saved -workspace, however, we need to reset all these pointers to point to -the proper objects in the loaded workspace. The best way to do this -seems to be for \verb|InitCopyGVar| to store the name of the global -variable and the address of the C pointer in a kernel table. After -loading, this table can be used to find the bags to which these -pointers should point. No data need be saved to support this. If the -saved workspace does not contain a global variable of which the kernel -is trying to keep a copy it is created, unbound. +\verb|InitFopyGVar|. Incidentally, we observed that these do not need +to be roots for marking live bags in garbage collection, or before +saving, as the bags they point to are always reachable from the global +variables bag. After loading a saved workspace, however, we need to +reset all these pointers to point to the proper objects in the loaded +workspace. The best way to do this seems to be for +\verb|InitCopyGVar| to store the name of the global variable and the +address of the C pointer in a kernel table. \textbf{This is done. It +requires a change in specification for InitCopyGVar to take the GVar +name (as a kernel string) rather than the number}. After loading, this +table can be used to find the bags to which these pointers should +point. No data need be saved to support this. If the saved workspace +does not contain a global variable of which the kernel is trying to +keep a copy it is created, unbound. \textbf{This is done by +RestoreCopyFopyInfo} The other case are pointers established with \verb|InitGlobal| which can point to any bag. In this case, \verb|InitGlobal| should take an extra argument, a C string, which will be stored in the globals table -already kept by GASMAN. The saved workspace will contain these -strings, and numbers of the bags to which the corresponding C globals -should point. The pointers from the kernel can thus be restored -following a load. The strings are there to match things up nicely. If -the saved workspace contains too many or too few entries in this table -then this is probably a fatal error, if they are simply in the wrong -order, it should probably be a warning. +already kept by GASMAN. \textbf{Also done}. The saved workspace will +contain these strings, and numbers of the bags (or the immediate +integer or FFE values) to which the corresponding C globals should +point. The pointers from the kernel can thus be restored following a +load. The strings are there to match things up nicely. If the saved +workspace contains too many or too few entries in this table then this +is probably a fatal error, if they are simply in the wrong order, it +should probably be a warning. \subsection{Workspace to Kernel} The only place this can happen, we believe, is in function handlers. All function handlers will have to be declared in the kernel, giving an identifying string, as for globals, and recorded in -a kernel table. Order of declaration is not a reliable identifier +a kernel table. \textbf{This is done}. Order of declaration is not a reliable identifier here, because compiled library files may be loaded in different orders. In debug mode, all handler installations should check that the handler has been declared. +\textbf{In fact it happens in one other place. In the lists of Copies +and Fopies, pointers to kernel variables are stored in Plists instead +of Bag IDs. Since this information does not need to be saved, we +delete it with RemoveCopyFopyInfo before the garbage collection that +precedes saving, and restore it with RestoreCopyFopyInfo afterwards.} + +\textbf{Since there is a small risk of a bag containing this data not +being deleted by a garbage collection (GASMAN is conservative) we must +do something with a bag containing bad subbags. We warn about it and write +zeros.} + +\subsection{Subtler Links} + +\textbf{A likely source of further problems is data located in the +workspace, but describing the state of the kernel. An example was the +LoadedModuleInfo list, now moved into the kernel. Such data needs to +be preserved across a load (by being stashed in the kernel or +otherwise) or reconstructed afterwards.} + \subsection{Workspace to World} A problem arises with objects in the saved workspace which refer to @@ -111,17 +143,25 @@ \subsection{Workspace to World} that the binaries path and GAP root path survive across a load. This cannot cause any problems worse than those caused by files being deleted or moved behind the systems back, which should, at least, -produce graceful failure. +produce graceful failure. \textbf{Frank is looking at this} Open streams are more troublesome, and, initially, we should simply -refuse to save a workspace containing them. +refuse to save a workspace containing them. \textbf{Frank will provide +a way to detect that such things exist before starting a save}. + \subsection{Interaction with the Compiler} -If the loading kernel is missing any compiled files that were present -in the saving kernel this will be noticed because there will be -handlers needed by the library and not present in the kernel. This is -a fatal error. +{\bf The saved workspace will contain a record of all the compiled +modules that were linked at the time of saving. These will be stored +relative to the GAP root. For modules loaded from +absolute pathnames (ie user-compiled modules) the pathname will be +saved. + +At the start of the loading process, the system will try to load all +of these modules. Failure prevents loading the workspace (perhaps the +user is prompted for an alternative path \TeX\ style).} + If the loading kernel includes compiled versions of library files that had been loaded into the saved workspace, then the uncompiled version @@ -153,6 +193,106 @@ \subsection{Grander Schemes -- Not for 4.1} of Common LISP's ``packages''. This might provide a framework for a clearer split between the system library and the users variations. +\section{Revised Saving and Loading Procedure} + +All of this section is new and should be thought of as bold. + +\subsection{Saving} + +\begin{enumerate} +\item Check validity of path +\item Call RemoveCopyFopyInfo +\item Full garbage collection +\item Walk the heap, numbering bags in their link words +\item Sort the kernel handlers table by address +\item Write file header including: +\begin{itemize} +\item A magic number so that the file can be recognised as a GAP +workspace +\item Full details -- version, architecture, etc of the saving system +\item Word length and a string to allow byte-sex to be determined. +\item Number of loaded modules, bags, globals +\item Total bag size +\end{itemize} +\item Write the relative or full pathnames of all linked +compiled modules +\item Write the cookies and the bag numbers corresponding to, all +globals (but not Copy/Fopys). +\item Write all bags, using Tnum based dispatching to: +\begin{itemize} +\item Record data as itself, using SaveByte, SaveShort, etc. +\item Record immediate objects as themselves +\item Record bag ids by the number of the bag identified (found in the +link word), shifted left 2, to allow for immediate data +\item Replace bad bag ids by zero +\item Record handlers by the associated cookie +\end{itemize} +\item Perhaps write a checksum +\item Close the file +\item Clean up the bags +\item Call RestoreCopyFopyInfo +\end{enumerate} + + +\subsection{Loading} + +This happens in GAP initialization. + +\begin{enumerate} +\item Get GAP sufficiently started up to: +\begin{itemize} +\item Have all globals, handlers and Copy/Fopy locations registered +\item Be able to load/link compiled modules enough to get \emph{their} +globals, handlers and Copy/Fopy locations registered +\item Be able to do whatever is necessary with streams and so on +\item Be able to use GASMAN +\end{itemize} +Frank will provide a way to do this. Essentially by running the usual +InitXxx() sequence, but with a global variable set to indicate the +status. +\item Open the saved workspace +\item Check the magic numbers, byte-sex check, GAP version, etc. +\item Check that the heap is large enough. +\item Read the list of loaded modules and try to load/link them enough +to get their globals, Copy/Fopy locations and handlers. Failure is +a fatal error. +\item Sort the list of handlers by cookie +\item Sort the list of globals by cookie +\item For each saved global: +\begin{itemize} +\item Look up the cookie to find an address. A failure is a fatal error. +\item Store the id of the appropriate bag at that address. Note that +this can be recovered from the bag number only, since all +masterpointers are the same size. +\item Note in the table that that particular global has been loaded +\end{itemize} +\item Check that every global has been given a value. If not, a fatal error. +\item Read the saved bags and write them over everything on the heap +dispatching based on the saved tnum. +\begin{itemize} +\item Recovering data unchanged +\item Replacing bag numbers by bagids (once again, these are +determined directly by the numbers) +\item Recovering immediate objects unchanged +\item looking up handler cookies in the table. A failure is a fatal +error +\end{itemize} +\item Close the file +\item Call RestoreCopyFopyInfo +\item Possibly some magic to correct file and directory names to be +relative to the new GAP root and executables path. +\item Somehow set the record straight about loaded compiled modules +\item Do any remaining steps of GAP startup, noting that there is no +need to do the remaining parts of module initialization, or to read +init.g or .gaprc. +\item Pray devoutly +\end{enumerate} + + + + + +\begin{small} \section*{Appendix A\\ Martin's Message} @@ -309,6 +449,7 @@ \section*{Appendix A\\ Martin's Message} maybe do some additional magic before returning \end{verbatim} +\end{small} \end{document} diff --git a/doc/ext/foa.tex b/doc/ext/foa.tex new file mode 100644 index 0000000000..4d347687e1 --- /dev/null +++ b/doc/ext/foa.tex @@ -0,0 +1,330 @@ +\Chapter{Function-Operation-Attribute Triples} + +{\GAP} is eager to maintain information that it has gathered about an +object, possibly by lengthy calculcations. The most important mechanism +for information maintenance is the automatic storage and look-up that +takes place for *attributes*; and this was already mentioned in +section~"tut:Attributes" in the tutorial. In this chapter we will +describe further mechanisms that allow storage of results that are not +values of attributes. + +\index{FOA triples}% +The idea which is common to all sections is that certain operations, +which are not themselves attributes, have an attribute associated with +them. To automatically delegate tasks to the attribute, {\GAP} knows, in +addition to the *operation* and the *attributes* also an ordinary +*function*, which is ``wrapped around'' the other two. This ``wrapper +function'' is called by the user and decides whether to call the +operation or the attribute or possibly both. The whole +*f*unction-*o*peration-*a*ttribute triple (or *FOA triple*) is set up by +a single {\GAP} command which writes the wrapper function and already +installs some methods, e.g., for the attribute to fall back on the +operation. The idea is then that subsequent methods, which perform the +actual computation, are installed only for the operation, whereas the +wrapper function remains unaltered, and in general no additional methods +for the attribute are required either. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{Key-dependent operations} + +There are several functions which require as first argument a domain, +e.g., a group, and as second argument something much simpler, e.g., a +prime. `SylowSubgroup' is an example. Since its value depends on two +arguments, it cannot be an attribute, yet one would like to store the +Sylow subgroups once they have been computed. The idea is to store them +in a list, which is then regarded as an attribute of the group, called +`ComputedSylowSubgroups'. The name implies that the value of this +attribute changes in the course of a {\GAP} session, whenever a +newly-computed Sylow subgroup is put into the list. Therefore, this is a +*mutable attribute*. + +The list contains primes in its odd positions and +`ComputedSylowSubgroups( )[ ]' holds the value of +`SylowSubgroup( ,

)' if `

= ComputedSylowSubgroups( )[ + - 1 ]'. The pairs are sorted in increasing order of

. This list +is automatically maintained by the function `SylowSubgroup', which calls +the operation `SylowSubgroupOp( ,

)' to do the real work, if the +prime

cannot be found in the list. + +The same mechanism works for other functions as well, e.g, for `PCore', +but also for `HallSubgroup', where the second argument is not a prime but +a set of primes. + +\>KeyDependentFOA( , , , ) + +To set up the three objects `SylowSubgroup', `SylowSubgroupOp' and +`ComputedSylowSubgroups' together, the declaration file ``lib/grp.gd'' +contains the following code: +\begintt + tmp := KeyDependentFOA( "SylowSubgroup", + IsGroup, IsPosRat and IsInt, "prime" ); + SylowSubgroup := tmp[1]; + SylowSubgroupOp := tmp[2]; + ComputedSylowSubgroups := tmp[3]; +\endtt +The second and third argument to `KeyDependentFOA', namely and + specify the required filters for the first resp.\ second +argument of the operation `SylowSubgroupOp', which are needed when this +operation is created with `NewOperation' (see "NewOperation"). +is also the required filter for the corresponding attribute +`ComputedSylowSubgroups'. The fourth argument is a function to +which the second argument

of `SylowSubgroup( ,

)' will be +passed. This function can perform tests on

and raise an error if +appropriate. If, as in our example, has the value `"prime"', +it is silently replaced with a function that tests whether

is a +prime. +\beginexample + gap> s4 := Group((1,2,3,4),(1,2));; + gap> SylowSubgroup( s4, 5 );; ComputedSylowSubgroups( s4 ); + [ 5, Group( [ ], ... ) ] + gap> SylowSubgroup( s4, 2 );; ComputedSylowSubgroups( s4 ); + [ 2, Group( [ (3,4), (1,2), (1,3)(2,4) ], ... ), 5, + Group( [ ], ... ) ] +|_ + gap> SylowSubgroup( s4, 6 ); + Error SylowSubgroup:

must be a prime at + Error( name, ":

must be a prime" ); + Entering break read-eval-print loop, you can 'quit;' to quit to outer \ + loop, + or you can return to continue + brk> quit; +\endexample +Thus the prime test need not be repeated in the methods which are +installed to do the real work. They are installed only in +`SylowSubgroupOp', whereas the function `SylowSubgroup' and the attribute +`ComputedSylowSubgroups' remain as they were made by `KeyDependentFOA'. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{In parent attributes} + +This section described how you can add new ``in parent attributes'' (see +"ref:Subdomains and parents" in the reference manual). As an example, we +describe how `Index' and its related functions are implemented. + +There is a function `Index', an operation `IndexOp' and an attribute +`IndexInParent'. They are created together as shown below and after they +have been created, methods need be installed only for `IndexOp'. In the +creation process, `IndexInParent' alread gets one method installed +(besides the system getter), namely `D -> IndexOp( Parent( D ), D )'. + +The function `Index' takes any number of arguments and proceeds as +follows: +\beginlist +\item{$\bullet$} + If it is called with exactly two arguments and , and if + `HasParent( )' and `IsIdentical( , Parent( ) )', the + tester `HasIndexInParent( )' is consulted. + \itemitem{$\circ$} + If the tester returns `true', `IndexInParent( )' is called + (which will then hopefully choose the system getter) and the result + returned. + \itemitem{$\circ$} + If the tester returns `false', `IndexOp' is called in the obvious way + and the result is passed to the setter `SetIndexInParent' (which will + hopefully store it). The result is also returned. +\item{$\bullet$} + Otherwise, `IndexOp' is called with the same arguments that `Index' was + called with (which can be more or less than two, because there may be + method installed for a different number of arguments with + `InstallOtherMethod', see "InstallOtherMethod"). The result is + returned. +\endlist + +\>InParentFOA( , , , NewAttribute \| % + NewProperty ) + +To set up these three objects together, the declaration file +``lib/grp.gd'' contains the following code: +\begintt + tmp:= InParentFOA( "Index", IsGroup, IsGroup, NewAttribute ); + Index := tmp[1]; + IndexOp := tmp[2]; + IndexInParent := tmp[3]; + SetIndexInParent := Setter( IndexInParent ); + HasIndexInParent := Tester( IndexInParent ); +\endtt +The second and third argument to `InParentFOA', namely and + specify the required filters for the first resp.\ second +argument of the operation `IndexOp', which are needed when this operation +is created with `NewOperation' (see "NewOperation"). is also +the required filter for the corresponding attribute `IndexInParent( +)' Note that `HasParent' is *not* required of , because even without a +parent set, `Parent( )' is legal, meaning itself. + +For property testing functions, such as `IsNormal', the `NewAttribute' is +replaced by `NewProperty'. After these assignments, methods are only +installed for `IndexOp'. `Index' must and `IndexInParent' should remain +as it is. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{Operation functions} + +Section~"ref:Operation functions!for groups" of the reference manual +explains that certain operations like `Orbits( , , )' can +also be applied to external sets, for which they can be interpreted as +attributes. Moreover, they can also be interpreted as attributes of a +permutation group, if it is acting naturally on the set of its moved +points. Thus there is an attribute `OrbitsAttr' which is automatically +invoked by `Orbits'. Since there are so many options to invoke a function +like `Orbits', there is a rather complicated interplay between that +function and the attribute on the one hand and the operation `OrbitsOp' +on the other hand. The advantage is that methods which perform the actual +computations are only installed for `OrbitsOp', and they have a very +restricted syntax. + +The definition of `OrbitsOp' says that its methods should be functions +`function( , , , , )' like `ExternalSet' when +specified via and (see "ref:External sets" in the reference +manual). All other syntax variants allowed for `Orbits' (e.g., leaving +out and ) are handled by the wrapper function, which does +the following: +\beginlist + \item{1.} + If the only argument is an external set and the attribute + tester `Tester( OrbitsAttr )( )' returns `true', the value of + that attribute is returned. + \item{2.} + If the only argument is an external set and the attribute + value is not known, the arguments are obtained as ` := + ActingDomain( )', ` := HomeEnumerator( )' and + either as `FunctionOperation( )' (if `IsExternalSetDefaultRep( + )') or as `!.funcOperation', in the latter case also + ` := !.generators' and ` := !.operators'. + \item{3.} + If and are not specified, is set to `Pcgs( + )' if `IsPcgsComputable( )' and to `GeneratorsOfGroup( )' + otherwise, and is set to . + \item{4.} + If is not specified, `OnPoints' is assigned. + \item{5.} + In the case of a natural operation of on `MovedPoints( )', if + the attribute tester `Tester( OrbitsAttr )( )' returns `true', + the value of that attribute is returned. + \item{6.} + The operation is called as ` := OrbitsOp( , , , + , )'. + \item{7.} + If an external set if it was specified, the attribute setter + is called as `Setter( OrbitsAttr )( , )'. The setter + is also called for in the natural operation case. + \item{8.} + is returned. +\endlist + +\>OrbitsishFOA( , , , NewAttribute \| NewProperty ) + +To set up the FOA triple, the declaration file ``lib/oprt.gd'' contains +the following code: +\begintt + tmp := OrbitsishFOA( "Orbits", OrbitsishReq, false, NewAttribute ); + Orbits := tmp[1]; + OrbitsOp := tmp[2]; + OrbitsAttr := tmp[3]; +\endtt +The second argument specifies the list of required filters for the +list of arguments to the operation `OrbitsOp'. The variable +`OrbitsishReq' contains the standard requirements +\begintt + OrbitsishReq := [ IsGroup, IsList, + IsList, + IsList, + IsFunction ]; +\endtt +If the third argument is `true', the function call `Orbits( + )' will --- if the attribute value is not yet known --- call the +operation as `OrbitsOp( , , , , )' rather than +as in step~6 above. This allows certain methods for the operation to make +use of `TypeObj( )', in which the types of the external subsets of + and of the external orbits in are stored. (This is used to +avoid repeated calls of `NewType' in functions like `ExternalOrbits( + )', which call `ExternalOrbit( , )' for several values +of~.) + +For property testing functions like `IsTransitive', the fourth argument +would be `NewProperty' instead of `NewAttribute'. + +\>OrbitishFO( , , , ) + +A similar mechanism is provided for operations like `Orbit', that do not +have an associated attribute, but still need a wrapper function to +standardize the arguments for the operation `OrbitOp'. The declaration +file ``lib/oprt.gd'' contains the following code: +\begintt + OrbitishReq := [ IsGroup, IsList, IsObject, + IsList, + IsList, + IsFunction ]; + + tmp := OrbitishFO( "Orbit", OrbitishReq, IsCollsElms, false ); + Orbit := tmp[1]; + OrbitOp := tmp[2]; +\endtt +The third argument is used to test the family relation between +the second and third argument of `Orbit( , , )', where +`IsCollsElms' means that must be an element of . By contrast, in +`Blocks( , , )', must be a subset of , and the +family relation is `IsIdentical'. This relation testing is necessary to +decide whether the argument was specified at all, because it is +possible to leave it out in `Orbit' (see "ref:Operation functions!for +groups" in the reference manual). Similarly, the third argument +can be left out in `Blocks', but {\GAP} treats both rules as one: It +simply checks whether only one of the arguments and is present, +and if so, a command like `Orbit( , )' calls the operation as +`OrbitOp( , , , , )' instead of `OrbitOp( , +, , , , )'. Respectively, `Blocks( , )' +leads to a call of `BlocksOp( , , , , )' instead +of `BlocksOp( , , , , , )' +because {\GAP} thinks the argument is something like the in +`Orbit', but it is really the operation domain! + +As a consequence of these rules, there must be not only methods for +`OrbitOp' with the six arguments promised in `OrbitishReq', but also +``other methods'' for only five arguments (i.e., without ), the latter +are installed with `InstallOtherMethod'. Plenty of examples are contained +in the implementation file ``lib/oprt.gi''. + +The fourth argument serves the same purpose as in the case of +`OrbitsishFOA', but it has an additional meaning, which is currently used +for the functions `Blocks' and `MaximalBlocks'. Since they depend upon an +extra argument , they cannot be regarded as attributes. However, +they are most often called without giving , meaning ``choose any +minimal resp.\ maximal block system''. In this case, their result can be +stored as the value of an attribute, and this can be passed to the +function `OrbitishFO' as fourth argument. It will then be considered by a +wrapper function call `Blocks( , , )' (i.e., without ) +in the same way `Orbits' considers `OrbitsAttr'. To set this up, the +declaration file ``lib/oprt.gd'' contains the following lines: +\begintt + BlocksAttr := NewAttribute( "BlocksAttr", IsExternalSet ); + tmp := OrbitishFO( "Blocks", + [ IsGroup, IsList, IsList, + IsList, + IsList, + IsFunction ], IsIdentical, BlocksAttr ); + Blocks := tmp[1]; + BlocksOp := tmp[2]; +\endtt +And this extraordinary FOA triple works as follows: +\beginexample + gap> s4 := Group((1,2,3,4),(1,2));; Blocks( s4, MovedPoints(s4), [1,2] ); + [ [ 1, 2, 3, 4 ] ] + gap> Tester( BlocksAttr )( s4 ); + false +|_ + gap> Blocks( s4, MovedPoints(s4) ); + [ [ 1, 2, 3, 4 ] ] + gap> Tester( BlocksAttr )( s4 ); BlocksAttr( s4 ); + true + [ [ 1, 2, 3, 4 ] ] +\endexample + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Local Variables: +% mode: text +% mode: outline-minor +% outline-regexp: "\\\\Chapter\\|\\\\Section" +% paragraph-start: "\\\\begin\\|\\\\end\\|\\$\\$\\|.*%\\|^$" +% paragraph-separate: "\\\\begin\\|\\\\end\\|\\$\\$\\|.*%\\|^$" +% fill-column: 73 +% End: +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/doc/ext/manual.tex b/doc/ext/manual.tex index 96d2eb028c..a1caa45943 100644 --- a/doc/ext/manual.tex +++ b/doc/ext/manual.tex @@ -64,7 +64,9 @@ \Chapters \Input{document} \Input{stbchain} +\Input{foa} \Input{sharepkg} +\Input{weakptr} % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -86,4 +88,9 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% -%E manual.tex . . . . . . . . . . . . . . . . . . . . . . . . ends here +%E manual.tex . . . . . . . . . . . . . . . . . . . . . . . . ends here + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: diff --git a/doc/ext/stbchain.tex b/doc/ext/stbchain.tex index ebe0b65bb5..c199978836 100644 --- a/doc/ext/stbchain.tex +++ b/doc/ext/stbchain.tex @@ -2,6 +2,10 @@ \def\labelto#1{\buildrel\lower0.8ex\hbox{$\scriptstyle #1$}\over\to}% +This chapter contains some rather technical complements to the material +handled in chapter~"ref:Permutations and Permutation Groups" of the +reference manual. + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \Section{Stabilizer chain records} @@ -108,14 +112,14 @@ \function InsertTrivialStabilizer( , ) & `InsertTrivialStabilizer' initializes the current stabilizer with - as `EmptyStabChain' did, but assigns the original to - the new `.stabilizer' component, such that a new level with + as `EmptyStabChain' did, but assigns the original to + the new `.stabilizer' component, such that a new level with trivial basic orbit (but identical `labels' and `ShallowCopy'ed - `genlabels' and `generators', see "ShallowCopy") is inserted. - These functions are recommended if really is fixed by the - generators of , because then new generators can be added and - the orbit and transversal at the same time extended with the - following function. + `genlabels' and `generators') is inserted. These functions are + recommended if really is fixed by the generators of , + because then new generators can be added and the orbit and + transversal at the same time extended with the following + function. \function AddGeneratorsExtendSchreierTree( , ) & adds the elements in to the list of generators of and @@ -145,16 +149,88 @@ of~. \enditems +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{Generalized conjugation technique} + +The command `ConjugateGroup( ,

)' (see~"ref:ConjugateGroup!for +permutation groups" in the reference manual) for a permutation group +with stabilizer chain equips its result also with a stabilizer chain, +namely with the chain of conjugate by

. Conjugating a stabilizer +chain by a permutation

means replacing all the points which appear in +the `orbit' components by their images under

and replacing every +permutation which appears in a `labels' or `transversal' component by +its conjugate $g^p$. The conjugate $g^p$ acts on the mapped points +exactly as did on the original points, i.e., $(pnt.p). g^p = +(pnt.g).p$. Since the entries in the `translabels' components are +integers pointing to positions of the `labels' list, the `translabels' +lists just have to be permuted by

for the conjugated stabilizer. Then +`generators' is reconstructed as `labels\{ genlabels \}' and +`transversal\{ orbit \}' as `labels\{ translabels\{ orbit \} \}'. + +This conjugation technique can be generalized.\index{generalized +conjugation technique} Instead of mapping points and permutations under +the same permutation

, it is sometimes desirable (e.g., in the context +of permutation group homomorphisms) to map the points with an arbitrary +mapping and the permutations with a homomorphism such that +the compatibility of the actions is still valid: $map(pnt). hom(g) = +map(pnt.g)$. (Of course the ordinary conjugation is a special case of +this, with $map(pnt) = pnt.p$ and $hom(g) = g^p$.) + +In the generalized case, the ``conjugated'' chain need not be a +stabilizer chain for the image of , since the ``preimage'' of the +stabilizer of $map(b)$ (where is a base point) need not fix , but +only fixes the preimage $map^{-1}(map(b))$ setwise. Therefore the method +can be applied only to one level and the next stabilizer must be computed +explicitly. But if is injective, we have $map(b).hom(g)=map(b) \iff +b.g=b$, and if this holds, then $g=w(g_1,\ldots,g_n)$ is a word in the +generators $g_1,\ldots,g_n$ of the stabilizer of~ and $hom(g) +\buildrel\*\over = w(hom(g_1),\ldots,hom(g_n))$ is in the ``conjugated'' +stabilizer. If, more generally, is a right inverse to a +homomorphism~$\varphi$ (i.e., $\varphi(hom(g))=g\,\forall g$), +equality~$\*$ holds modulo ${\rm Ker}\,\varphi$; in this case the +``conjugated'' chain can be made into a real stabilizer chain by +extending each level with the generators ${\rm Ker}\,\varphi$ and +appending a proper stabilizer chain of~${\rm Ker}\,\varphi$ at the end. +These special cases will occur in the algorithms for permutation group +homomorphisms (see~"ref:Homomorphisms!for permutation groups" in the +reference manual). + +To ``conjugate'' the points (i.e., `orbit') and permutations (i.e., +`labels') of the Schreier tree, a loop is set up over the `orbit' list +constructed during the orbit algorithm, and for each vertex with +unique edge $a\labelto l b$ ending at , the label is mapped with + and with . We assume that the `orbit' list was built +w.r.t.~a certain ordering of the labels, where $l'\. +This shape of the `orbit' list is guaranteed if the Schreier tree is +extended only by `AddGeneratorsExtendSchreierTree', and it is then also +guaranteed for the ``conjugated'' Schreier tree. (The ordering of the +labels cannot be read from the Schreier tree, however.) + +In the generalized case, it can happen that the edge $a\labelto l b$ +bears a label whose image is ``old'', i.e., equal to the image of an +earlier label $l'\ to the identity. + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \Section{The general backtrack algorithm with ordered partitions} +\begingroup% +\def\R{{\cal R}} \def\I{{\cal I}}% + Section "ref:Backtrack searching" in the reference manual describes how a backtrack search can be organized with ordered partitions. The purpose of this section is to document how the general backtrack algorithm is implemented in {\GAP} and which parts you have to modify if you want to write your own backtrack routines. -\medskip% +\medskip \atindex{ordered partitions!internal representation}{|indexit}% {\bsf Internal representation of ordered partitions.}\quad {\GAP} represents an ordered partition as a record with the following @@ -205,18 +281,18 @@ Then reuniting the two cells requires only the reversal of steps~2 to~4 above. The list `

.points' need not be rearranged. -\medskip% -{\bsf Functions for setting up an R-base.}\quad This subsection explains -some {\GAP} functions which are local to the library file -``lib/stbcbckt.gi'' which contains the code for backtracking in -permutation groups. They are mentioned here because you might find them +\medskip +{\bsf Functions for setting up an R-base.}\quad This subsection explains +some {\GAP} functions which are local to the library file +``lib/stbcbckt.gi'' which contains the code for backtracking in +permutation groups. They are mentioned here because you might find them helpful when you want to implement you own backtracking function based on -the partition concept. An important argument to most of the functions is -the R-base $\cal R$, which you should regard as a black box. We will tell -you how to set it up, how to maintain it and where to pass it as -argument, but it is not necessary for you to know its internal -representation. However, if you insist to learn the whole story: Here are -the record components from which an R-base is made up: +the partition concept. An important argument to most of the functions is +the R-base $\R$, which you should regard as a black box. We will tell you +how to set it up, how to maintain it and where to pass it as argument, +but it is not necessary for you to know its internal representation. +However, if you insist to learn the whole story: Here are the record +components from which an R-base is made up: \beginitems `domain' & the set $\Omega$ on which the group $G$ operates @@ -268,13 +344,15 @@ which calculates the centralizer of an element $g$ in the group $G$. (The real code is more general and has a few more subtleties.) -{\parskip 0pt \newcount\lineno% +{\newcount\lineno% \def\){\advance\lineno by1 \begingroup\obeylines\cloparen% \hbox to\manindent{\hfil $\scriptstyle\the\lineno$\enspace}}% + \)$\Pi_0$ := TrivialPartition( $\Omega$ ); -\)$\cal R$ := EmptyRBase( $G$, $\Omega$, $\Pi_0$ ); +\)$\R$ := EmptyRBase( $G$, $\Omega$, $\Pi_0$ ); \endgraf\medskip% -\)$\cal R$.nextLevel := function( $\Pi$, ) + +\)$\R$.nextLevel := function( $\Pi$, ) \)local \ $fix$, $p$, $q$, $where$; \)\quad NextRBasePoint( $\Pi$, ); \)\quad $fix$ := Fixcells( $\Pi$ ); @@ -283,22 +361,23 @@ \)\qquad $where$ := IsolatePoint( $\Pi$, $q$ ); \)\qquad if $where$ \<> false then \)\quad\qquad Add( $fix$, $q$ ); -\)\quad\qquad ProcessFixpoint( $\cal R$, $q$ ); -\)\quad\qquad AddRefinement( $\cal R$, "Centralizer", % +\)\quad\qquad ProcessFixpoint( $\R$, $q$ ); +\)\quad\qquad AddRefinement( $\R$, "Centralizer", % [ $\Pi$.cellno[ $p$ ], $q$, $where$ ] ); \)\quad\qquad if $\Pi$.lengths[ $where$ ] = 1 then \)\qquad\qquad $p$ := FixpointCellNo( $\Pi$, $where$ ); -\)\qquad\qquad ProcessFixpoint( $\cal R$, $p$ ); -\)\qquad\qquad AddRefinement( $\cal R$, "ProcessFixpoint", [ $p$, $where$ ] ); +\)\qquad\qquad ProcessFixpoint( $\R$, $p$ ); +\)\qquad\qquad AddRefinement( $\R$, "ProcessFixpoint", [ $p$, $where$ ] ); \)\quad\qquad fi; \)\qquad fi; \)\quad od; \)end; -\endgraf\medskip% +\endgraf\medskip% + \)return PartitionBacktrack( $G$, \)\qquad $c$ -> $g$ ^ $c$ = $g$, \)\qquad false, -\)\qquad $\cal R$, +\)\qquad $\R$, \)\qquad [ $\Pi_0$, $g$ ], \)\qquad $L$, $R$ ); \vadjust{\allowbreak}% @@ -311,22 +390,22 @@ )'), but we could have started with a finer partition, e.g., into unions of $g$-cycles of the same length. -2.\enspace This statement sets up the R-base in the variable $\cal R$. +2.\enspace This statement sets up the R-base in the variable $\R$. -3--21.\enspace These lines define a function `$\cal R$.nextLevel' which -is called whenever an additional member in the sequence $\Pi_0 \ge \Pi_1 -\ge\ldots$ of partitions is needed. If $\Pi_i$ does not yet contain -enough base points in one-point cells, {\GAP} will call `$\cal -R$.nextLevel( $\Pi_i$, $\cal R$ )', and this will choose a new base point -$a_{i+1}$, refine $\Pi_i$ to $\Pi_{i+1}$ (thereby *changing* the argument -$\Pi$) and store all necessary information in~$\cal R$. +3--21.\enspace These lines define a function `$\R$.nextLevel' which is +called whenever an additional member in the sequence $\Pi_0 \ge \Pi_1 +\ge\ldots$ of partitions is needed. If $\Pi_i$ does not yet contain +enough base points in one-point cells, {\GAP} will call `$\R$.nextLevel( +$\Pi_i$, $\R$ )', and this function will choose a new base point +$a_{i+1}$, refine $\Pi_i$ to $\Pi_{i+1}$ (thereby *changing* the first +argument) and store all necessary information in~$\R$. -5.\enspace This statement selects the new base point $a_{i+1}$, which is +5.\enspace This statement selects a new base point $a_{i+1}$, which is not yet in a one-point cell of $\Pi$ and still moved by the stabilizer -$G_{a_1\ldots a_i}$ of the earlier base points. If certain points of +$G_{a_1\ldots a_i}$ of the earlier base points. If certain points of $\Omega$ should are preferred as base point (e.g., because they belong to long cycles of $g$), a list of points starting with the most wanted ones, -can be given as optional third argument to `NextRBasePoint' (actually, +can be given as optional third argument to `NextRBasePoint' (actually, this is done in the real code for `Centralizer'). 6.\enspace `Fixcells( $\Pi$ )' returns the list of points in one-point @@ -349,30 +428,29 @@ base point. By contrast, the point $q$ was not chosen this way, so `ProcessFixpoint' must be called explicitly for~$q$. -13.\enspace This statement registers the function which will be used -during the backtrack search to perform the corresponding refinements on +13.\enspace This statement registers the function which will be used +during the backtrack search to perform the corresponding refinements on the ``image partition'' $\Sigma_i$ (to yield the refined $\Sigma_{i+1}$). -After choosing an image $b_{i+1}$ for the base point $a_{i+1}$, {\GAP} +After choosing an image $b_{i+1}$ for the base point $a_{i+1}$, {\GAP} will compute $\Sigma_i \wedge (\{b_{i+1}\},\Omega-\{b_{i+1}\})$ and store -this partition in `$\cal I$.partition', where $\cal I$ is a black box -similar to $\cal R$, but corresponding to the current ``image partition'' -$\Sigma_i$ (hence it is an ``R-image'' in analogy to the R-base). Then -{\GAP} will call the function `Refinements.Centralizer( $\cal R$, $\cal -I$, $\Pi$.cellno[ $p$ ], $p$, $where$ )', with the then current values of -$\cal R$ and $\cal I$, but where `$\Pi$.cellno[ $p$ ]', $p$, $where$ -still have the values they have at the time of this `AddRefinement' -command. This function call will further refine `$\cal I$.partition' to -yield $\Sigma_{i+1}$ as it is programmed in the function -`Refinements.Centralizer', which is described below. (The global variable -`Refinements' is a record which contains all refinement functions for all -backtracking procedures.) - -14--18.\enspace If the cell from which $q$ was taken out had only two -points, we now have an additional one-point cell. This condition is -checked in line~13 and if it is true, this extra fixpoint $p$ is taken -(line~15), processed like $q$ before (line~16) and is then (line~17) -passed to another refinement function `Refinements.ProcessFixpoint( $\cal -R$, $\cal I$, $p$, $where$ )', which is also described below. +this partition in `$\I$.partition', where $\I$ is a black box similar to +$\R$, but corresponding to the current ``image partition'' (hence it is +an ``R-image'' in analogy to the R-base). Then {\GAP} will call the +function `Refinements.Centralizer( $\R$, $\I$, $\Pi$.cellno[ $p$ ], $p$, +$where$ )', with the then current values of $\R$ and $\I$, but where +`$\Pi$.cellno[ $p$ ]', $p$, $where$ still have the values they have at +the time of this `AddRefinement' command. This function call will further +refine `$\I$.partition' to yield $\Sigma_{i+1}$ as it is programmed in +the function `Refinements.Centralizer', which is described below. (The +global variable `Refinements' is a record which contains all refinement +functions for all backtracking procedures.) + +14--18.\enspace If the cell from which $q$ was taken out had only two +points, we now have an additional one-point cell. This condition is +checked in line~13 and if it is true, this extra fixpoint $p$ is taken +(line~15), processed like $q$ before (line~16) and is then (line~17) +passed to another refinement function `Refinements.ProcessFixpoint( $\R$, +$\I$, $p$, $where$ )', which is also described below. 22--27.\enspace This command starts the backtrack search. Its result will be the centralizer as a subgroup of $G$. Its arguments are @@ -383,7 +461,7 @@ of a representative search (when the result would be one representative), \item{25.} the R-base, - \item{26.} a list of data, to be stored in `$\cal I$.data', which has + \item{26.} a list of data, to be stored in `$\I$.data', which has in position~1 the first member $\Sigma_0$ of the decreasing sequence of ``image partitions'' mentioned in "ref:Backtrack searching" in the reference manual. In the centralizer example, position~2 contains the @@ -396,18 +474,18 @@ advance (we have $L=R$ in the centralizer case). \endlist -\medskip% -{\bsf Refinement functions for the backtrack search.}\quad The last -subsection showed how the refinement process leading from $\Pi_i$ to -$\Pi_{i+1}$ is coded in the function `$\cal R$.nextLevel', this has to be -executed once the base point $a_{i+1}$. The analogous refinement step +\medskip +{\bsf Refinement functions for the backtrack search.}\quad The last +subsection showed how the refinement process leading from $\Pi_i$ to +$\Pi_{i+1}$ is coded in the function `$\R$.nextLevel', this has to be +executed once the base point $a_{i+1}$. The analogous refinement step from $\Sigma_i$ to $\Sigma_{i+1}$ must be performed for each choice of an -image $b_{i+1}$ for $a_{i+1}$, and it will depend on the corresponding -value of $\Sigma_i\wedge (\{b_{i+1}\}, \Omega-\{b_{i+1}\})$. But before -we can continue our centralizer example, we must, for the interested -reader, document the record components of the other black box $\cal I$, -as we did above for the R-base black box $\cal R$. Most of the components -change as {\GAP} walks up and down the levels of the search tree. +image $b_{i+1}$ for $a_{i+1}$, and it will depend on the corresponding +value of $\Sigma_i\wedge (\{b_{i+1}\}, \Omega-\{b_{i+1}\})$. But before +we can continue our centralizer example, we must, for the interested +reader, document the record components of the other black box $\I$, as we +did above for the R-base black box $\R$. Most of the components change as +{\GAP} walks up and down the levels of the search tree. \beginitems `data' & this will be mentioned below @@ -416,13 +494,13 @@ the level $i$ in the search tree of the current node $\Sigma_i$ `bimg' & - a list of images of the points in `$\cal R$.base' + a list of images of the points in `$\R$.base' `partition' & the partition $\Sigma_i$ of the current node `level' & - the stabilizer chain `$\cal R$.lev[ $i$ ]' at the current level + the stabilizer chain `$\R$.lev[ $i$ ]' at the current level `perm' & a permutation mapping `Fixcells( $\Pi_i$ )' to `Fixcells( $\Sigma_i$ @@ -430,63 +508,67 @@ `level2', `perm2' & a similar construction for the second stabilizer chain, `false' - otherwise (and `true' if `$\cal R$.level2 = true') + otherwise (and `true' if `$\R$.level2 = true') \enditems -As declared in the above code for `Centralizer', the refinement is -performed by the function `Refinement.Centralizer( $\cal R$, $\cal I$, -$\Pi$.cellno[ $p$ ], $p$, $where$ )' for a fixpoint $p$ of $\Pi= \Pi_i -\wedge (\{a_{i+1}\}, \Omega-\{a_{i+1}\})$ such that `$where$ = -$\Pi$.cellno[ $p$ ^ $g$ ]'. This function must return `false' if the -refinement is unsuccessful (e.g., because it leads to $\Sigma_{i+1}$ -having different cell sizes from $\Pi_{i+1}$) and `true' otherwise. It -looks like this. - -{\parskip 0pt \newcount\lineno% +As declared in the above code for `Centralizer', the refinement is +performed by the function `Refinement.Centralizer( $\R$, $\I$, +$\Pi$.cellno[ $p$ ], $p$, $where$ )'. The functions in the record +`Refinement' always take two additional arguments before the ones +specified in the `AddRefinement' call (in line~13 above), namely the +R-base $\R$ and the current value $\I$ of the ``R-image''. In our +example, $p$ is a fixpoint of $\Pi= \Pi_i \wedge (\{a_{i+1}\}, +\Omega-\{a_{i+1}\})$ such that `$where$ = $\Pi$.cellno[ $p$ ^ $g$ ]'. The +`Refinement' functions must return `false' if the refinement is +unsuccessful (e.g., because it leads to $\Sigma_{i+1}$ having different +cell sizes from $\Pi_{i+1}$) and `true' otherwise. Our particular +function looks like this. + +{\newcount\lineno% \def\){\advance\lineno by1 \begingroup\obeylines\cloparen% \hbox to\manindent{\hfil $\scriptstyle\the\lineno$\enspace}}% -\)Refinements.Centralizer := function( $\cal R$, $\cal I$, % - $cellno$, $p$, $where$ ) + +\)Refinements.Centralizer := function( $\R$, $\I$, $cellno$, $p$, $where$ ) \)local \ $\Sigma$, $q$; -\)\quad $\Sigma$ := $\cal I$.partition; -\)\quad $q$ := FixpointCellNo( $\Sigma$, $cellno$ ) ^ $\cal I$.data[ 2 ]; +\)\quad $\Sigma$ := $\I$.partition; +\)\quad $q$ := FixpointCellNo( $\Sigma$, $cellno$ ) ^ $\I$.data[ 2 ]; \)\quad return IsolatePoint( $\Sigma$, $q$ ) = $where$ % - and ProcessFixpoint( $\cal I$, $p$, $q$ ); + and ProcessFixpoint( $\I$, $p$, $q$ ); \)end; \vadjust{\allowbreak}% }% 3.\enspace The current value of $\Sigma_i\wedge (\{b_{i+1}\}, -\Omega-\{b_{i+1}\})$ is always found in `$\cal I$.partition'. +\Omega-\{b_{i+1}\})$ is always found in `$\I$.partition'. 4.\enspace The image of the only point in cell number `$cellno$ = -$\Pi_i$.cellno[ $p$ ]' in $\Sigma$ under `$g$ = $\cal I$.data[ 2 ]' is +$\Pi_i$.cellno[ $p$ ]' in $\Sigma$ under `$g$ = $\I$.data[ 2 ]' is calculated. 5.\enspace The function returns `true' only if the image $q$ has the same -cell number in $\Sigma$ as $p$ had in $\Pi$ (i.e., $where$) and if $q$ -can be prescribed as an image for $p$ under the coset of the stabilizer -$G_{a_1\ldots a_{i+1}}.c$ where $c\in G$ is an (already constructed) -element mapping the earlier base points $a_1,\ldots,a_{i+1}$ to the -already chosen images $b_1,\ldots,b_{i+1}$. This latter condition is -tested by `ProcessFixpoint( $\cal I$, $p$, $q$ )' which, if successful, -also does the necessary bookkeeping in $\cal I$. In analogy to the remark -about line~12 in the program above, the chosen image $b_{i+1}$ for the -base point $a_{i+1}$ has already been processed implicitly by the -function `PartitionBacktrack', and this processing includes the -construction of an element $c\in G$ which maps `Fixcells( $\Pi_i$ )' to -`Fixcells( $\Sigma_i$ )' and $a_{i+1}$ to $b_{i+1}$. By contrast, the -extra fixpoints $p$ and $q$ in $\Pi_{i+1}$ and $\Sigma_{i+1}$ were not -chosen automatically, so they require an explicit call of -`ProcessFixpoint', which replaces the element $c$ by some $c'.c$ (with -$c'\in G_{a_1\ldots a_{i+1}}$) which in addition maps $p$ to $q$, or -returns `false' if this is impossible. - -You should now be able to guess what `Refinements.ProcessFixpoint( $\cal -R$, $\cal I$, $p$, $where$ )' does: it simply returns `ProcessFixpoint( -$\cal I$, $p$, FixpointCellNo( $\cal I$.partition, $where$ ) )'. - -\medskip% +cell number in $\Sigma$ as $p$ had in $\Pi$ (i.e., $where$) and if $q$ +can be prescribed as an image for $p$ under the coset of the stabilizer +$G_{a_1\ldots a_{i+1}}.c$ where $c\in G$ is an (already constructed) +element mapping the earlier base points $a_1,\ldots,a_{i+1}$ to the +already chosen images $b_1,\ldots,b_{i+1}$. This latter condition is +tested by `ProcessFixpoint( $\I$, $p$, $q$ )' which, if successful, also +does the necessary bookkeeping in $\I$. In analogy to the remark about +line~12 in the program above, the chosen image $b_{i+1}$ for the base +point $a_{i+1}$ has already been processed implicitly by the function +`PartitionBacktrack', and this processing includes the construction of an +element $c\in G$ which maps `Fixcells( $\Pi_i$ )' to `Fixcells( +$\Sigma_i$ )' and $a_{i+1}$ to $b_{i+1}$. By contrast, the extra +fixpoints $p$ and $q$ in $\Pi_{i+1}$ and $\Sigma_{i+1}$ were not chosen +automatically, so they require an explicit call of `ProcessFixpoint', +which replaces the element $c$ by some $c'.c$ (with $c'\in G_{a_1\ldots +a_{i+1}}$) which in addition maps $p$ to $q$, or returns `false' if this +is impossible. + +You should now be able to guess what `Refinements.ProcessFixpoint( $\R$, +$\I$, $p$, $where$ )' does: it simply returns `ProcessFixpoint( $\I$, +$p$, FixpointCellNo( $\I$.partition, $where$ ) )'. + +\medskip {\bsf Summary.}\quad When you write your own backtrack functions using the partition technique, you have to supply an R-base, including a component `nextLevel', and the functions in the `Refinements' record @@ -494,32 +576,34 @@ and the additional data (for the `data' component of the ``R-image'') to `PartitionBacktrack'. -\medskip% +\medskip {\bsf Functions for meeting ordered partitions.}\quad A kind of refinement that occurs in particular in the normalizer calculation involves computing the meet of $\Pi$ (cf.\ lines~6ff.\ above) with an arbitary other partition $\Lambda$, not just with one point. To do this efficiently, {\GAP} uses the following two functions. -\>StratMeetPartition( $\cal R$, $\Pi$, $\Lambda$ \[, $g$ \] ) -\>MeetPartitionStrat( $\cal R$, $\cal I$, {$\Lambda'$} \[, {$g'$} \], % - $strat$ ) +\>StratMeetPartition( $\R$, $\Pi$, $\Lambda$ \[, $g$ \] ) +\>MeetPartitionStrat( $\R$, $\I$, {$\Lambda'$} \[, {$g'$} \], $strat$ ) \index{meet strategy}% -Such a `StratMeetPartition' command would typically appear in the -function `$\cal R$.nextLevel' (where $\Pi_i$ must be refined to -$\Pi_{i+1}$). It replaces $\Pi$ by $\Pi\wedge \Lambda$ (thereby -*changing* the argument $\Pi$) and retuns a ``meet strategy'' $strat$. -This is (for us) a black box which serves two purposes: First, it allows -{\GAP} to calculate faster the corresponding meet $\Sigma\wedge -\Lambda'$, which must then appear in a `Refinements' function called in -the descent from $\Sigma_i$ to $\Sigma_{i+1}$, because if the refinement -is successful in the first place, the intersection of a cell from the -left hand side of the $\wedge$ sign with a cell from the right hand side -must be the same in both cases (and $strat$ records which of them are -nonempty). Second, if there is a discrepancy between the behaviour -prescribed by $strat$ and the behaviour observed when refining $\Sigma$, -the refinement can immediately be abandoned. +Such a `StratMeetPartition' command would typically appear in the +function call `$\R$.nextLevel( $\Pi$, $\R$ )' (during the refinement of +$\Pi_i$ to $\Pi_{i+1}$). This command replaces $\Pi$ by $\Pi\wedge +\Lambda$ (thereby *changing* the second argument) and retuns a ``meet +strategy'' $strat$. This is (for us) a black box which serves two +purposes: First, it allows {\GAP} to calculate faster the corresponding +meet $\Sigma\wedge \Lambda'$, which must then appear in a `Refinements' +function (during the refinement of $\Sigma_i$ to $\Sigma_{i+1}$). It is +faster to compute $\Sigma\wedge \Lambda'$ with the ``meet strategy'' of +$\Pi\wedge \Lambda$ because if the refinement of $\Sigma$ is successful +at all, the intersection of a cell from the left hand side of the +$\wedge$ sign with a cell from the right hand side must have the same +size in both cases (and $strat$ records these sizes, so that only +non-empty intersections must be calculated for $\Sigma\wedge \Lambda'$). +Second, if there is a discrepancy between the behaviour prescribed by +$strat$ and the behaviour observed when refining $\Sigma$, the refinement +can immediately be abandoned. On the other hand, if you only want to meet a partition $\Pi$ with $\Lambda$ for a one-time use, without recording a strategy, you can @@ -535,15 +619,18 @@ gap> Cells( P ); [ [ 1 ], [ 5, 4 ], [ 6 ], [ 2 ], [ 3 ] ] \endexample - -{\GAP} makes use of the advantages of a ``meet strategy'' if the -refinement function in `Refinements' contains a `MeetPartitionStrat' -command where $strat$ is the ``meet strategy'' calculated by -`StratMeetPartition' before. Such a command replaces `$\cal I$.partition' -by its meet with $\Lambda'$, again changing the argument $\cal I$. The -necessary reversal of these changes when backtracking from a node (and -prescribing the next possible image for a base point) is automatically -done by the function `PartitionBacktrack'. +You can even say `StratMeetPartition( $\Pi$, $\Delta$ )' where $\Delta$ +is simple a subset of $\Omega$, it will then be interpreted as the +partition $(\Delta,\Omega-\Delta)$. + +{\GAP} makes use of the advantages of a ``meet strategy'' if the +refinement function in `Refinements' contains a `MeetPartitionStrat' +command where $strat$ is the ``meet strategy'' calculated by +`StratMeetPartition' before. Such a command replaces `$\I$.partition' by +its meet with $\Lambda'$, again changing the argument $\I$. The necessary +reversal of these changes when backtracking from a node (and prescribing +the next possible image for a base point) is automatically done by the +function `PartitionBacktrack'. In all cases, an additional argument $g$ means that the meet is to be taken not with $\Lambda$, but instead with $\Lambda.{g^{-1}}$, where @@ -555,7 +642,7 @@ [ [ 1 ], [ 5, 4 ], [ 6 ], [ 2 ], [ 3 ] ] # |$P.(1,3,6) = Q|$ \endexample -\medskip% +\medskip {\bsf Avoiding multiplication of permutations.}\quad In the description of the last subsections, the backtrack algorithm constructs an element $c\in G$ mapping the base points to the prescribed images and finally @@ -595,14 +682,14 @@ single {\GAP} function, but as a list like in lines 2--4 of the following alternative excerpt from the code for `Centralizer'. -{\parskip 0pt \newcount\lineno% +{\newcount\lineno% \def\){\advance\lineno by1 \begingroup\obeylines\cloparen% \hbox to\manindent{\hfil $\scriptstyle\the\lineno$\enspace}}% \)return PartitionBacktrack( $G$, \)\quad [ $g$, $g$, \)\qquad OnPoints, \)\qquad $c$ -> $c$!.lftObj = $c$!.rgtObj ], -\)\quad false, $\cal R$, [ $\Pi_0$, $g$ ], $L$, $R$ ); +\)\quad false, $\R$, [ $\Pi_0$, $g$ ], $L$, $R$ ); \vadjust{\allowbreak}% }% @@ -634,6 +721,253 @@ In our centralizer example, we simply have to test whether they are equal. +\endgroup% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{Stabilizer chains for automorphisms acting on enumerators}\null + +In this section we present an example in which objects we already know +(namely, automorphisms of solvable groups) are equipped with the +permutation-like operations `^' and `/' for action on positive integers. +To achieve this, we must define a new type of objects which behave like +permutations but are represented as automorphisms acting on an +enumerator. Our goal is to generalize the Schreier-Sims algorithm for +construction of a stabilizer chain to groups of such new automorphisms. + +{\bsf An operation domain for automorphisms.}\quad The idea we describe +here is due to C.~Sims. We consider a group $A$ of automorphisms of a +group $G$, given by generators, and we would like to know its order. Of +course we could follow the strategy of the Schreier-Sims algorithm +(described in "ref:Stabilizer chains" in the reference manual) for $A$ +acting on $G$. This would involve a call of `StabChainStrong( +EmptyStabChain( [ ], One( $A$ ) ), GroupGenerators( $A$ ) )' where +`StabChainStrong' is a function as the one described in the pseudo-code +below: + +\)StabChainStrong := function( $S$, $newgens$ ) +\)\quad{\rm Extend the Schreier tree of $S$ with $newgens$.} +\)\quad for $sch$ in {\rm Schreier generators} do +\)\qquad if $sch \notin S$.stabilizer then +\)\qquad\quad StabChainStrong( $S$.stabilizer, [ $sch$ ] ); +\)\qquad fi; +\)\quad od; +\)end; + \vadjust{\allowbreak}% + +The membership test `$sch \notin S$.stabilizer' can be performed because +the stabilizer chain of `$S$.stabilizer' is already correct at that +moment. We even know a base in advance, namely any generating set for +$G$. Fix such a generating set $(g_1,\ldots,g_d)$ and observe that this +base is generally very short compared to the degree $|G|$ of the +operation. The problem with the Schreier-Sims algorithm, however, is then +that the length of the first basic orbit $g_1.A$ would already have the +magnitude of $|G|$, and the basic orbits at deeper levels would not be +much shorter. For the advantage of a short base we pay the high price of +long basic orbits, since the product of the (few) basic orbit lengths +must equal $|A|$. Such long orbits make the Schreier-Sims algorithm +infeasible, so we have to look for a longer base with shorter basic +orbits. + +Assume that $G$ is solvable and choose a characteristic series with +elementary abelian factors. For the sake of simplicity we assume that $N +\< G$ is an elementary abelian characteristic subgroup with elementary +abelian factor group $G/N$. Since $N$ is characteristic, $A$ also acts as +a group of automorphisms on the factor group $G/N$, but of course not +necessarily faithfully. To retain a faithful action, we let $A$ act on +the disjoint union $G/N \mathbin{\dot\cup} G$ and choose as base +$(g_1N,\ldots,g_dN,g_1,\ldots,g_d)$. Now the first $d$ basic orbits lie +inside $G/N$ and can have length at most $[G\mathbin:N]$. Since the base +points $g_1N,\ldots, g_dN$ form a generating set for $G/N$, their +iterated stabilizer $A^{(d+1)}$ acts trivially on the factor group $G/N$, +i.e., it leaves the cosets $g_iN$ invariant. Accordingly, the next $d$ +basic orbits lie inside $g_iN$ (for $i=1,\ldots,d$) and can have length +at most~$|N|$. + +Generalizing this method to a characteristic series $G=N_0 > N_1 > \ldots +> N_l=\{1\}$ of length $l>2$, we can always find a base of length $l.d$ +such that each basic orbit is contained in a coset of a characteristic +factor, i.e. in a set of the form $g_iN_{j-1}/N_j$ (where $g_i$ is one of +the generators of $G$ and $1\le j\le l$). In particular, the length of +the basic orbits is bounded by the size of the corresponding +characteristic factors. To implement a Schreier-Sims algorithm for such a +base, we must be able to let automorphisms act on cosets of +characteristic factors $g_iN_{j-1}/N_j$, for varying $i$ and $j$. We +would like to translate each such action into an action on +$\{1,\ldots,[N_{j-1}\mathbin: N_j]\}$, because then we need not enumerate +the operation domain +$$ + G/N_1 \mathbin{\dot\cup} G/N_2 \mathbin{\dot\cup} \ldots + \mathbin{\dot\cup} G/N_l $$ +as a whole. Enumerating it as a whole would result in basic orbits like +$`orbit'\subseteq \{1001,\ldots,1100\}$ with a `transversal' list whose +first 1000 entries would be unbound, but still require 4~bytes of memory +each (see~"Stabilizer chain records"). + +Identifying each coset $g_iN_{j-1}/N_j$ into $\{1,\ldots, [N_{j-1} +\mathbin: N_j]\}$ of course means that we have to change the action of +the automorphisms on every level of the stabilizer chain. Such +flexibility is not possible with permutations because their effect on +positive integers is ``hardwired'' into them, but we can install new +operations for automorphisms. + +{\bsf Enumerators for cosets of characteristic factors.}\quad So far we +have not used the fact that the characteristic factors are elementary +abelian, but we will do so from here on. Our first task is to implement +an enumerator (see "ref:AsList and Enumerators" in the reference manual) +for a coset of a characteristic factor in a solvable group $G$. We assume +that such a coset $gN/M$ is given by +\beginlist +\item{(1)} a pcgs for the group $G$ (see "ref:Pcgs" in the reference + manual), let `$n$ = Length( $pcgs$ )'; +\item{(2)} a range `$range$ = [ $start$ .. $stop$ ]' indicating that `$N + = \langle pcgs$\{ [ $start$ .. $n$ ] \} $\rangle$' and `$M = \langle + pcgs$\{ [ $stop$ + 1 .. $n$ ] \} $\rangle$', i.e., the cosets of + `$pcgs$\{ $range$ \}' form a base for the vector space $N/M$; +\item{(3)} the representative $g$. +\endlist +We first define a new representation for such enumerators and then +construct them by simply putting these three pieces of data into a record +object. The enumerator should behave as a list of group elements +(representing cosets modulo $M$), consequently, its family will be the +family of the $pcgs$ itself. +\begintt +IsCosetSolvableFactorEnumeratorRep := NewRepresentation + ( "isCosetSolvableFactorEnumerator", IsEnumerator, + [ "pcgs", "range", "representative" ] ); + +EnumeratorCosetSolvableFactor := function( pcgs, range, g ) + return Objectify( NewKind( FamilyObj( pcgs ), + IsCosetSolvableFactorEnumeratorRep ), + rec( pcgs := pcgs, + range := range, + representative := g ) ); +end; +\endtt +The definition of the operations `Length', `\\[\\]' and `Position' is now +straightforward. The code has sometimes been abbreviated and is meant +``cum grano salis'', e.g., the declaration of the local variables has +been left out. +\begintt +InstallMethod( Length, true, [ IsCosetSolvableFactorEnumeratorRep ], 0, + enum -> Product( RelativeOrdersPcgs( enum!.pcgs ){ enum!.range } ) ); + +InstallMethod( \[\], true, [ IsCosetSolvableFactorEnumeratorRep, + IsPosRat and IsInt ], 0, + function( enum, pos ) + elm := (); + pos := pos - 1; + for i in Reversed( enum!.range ) do + p := RelativeOrderOfPcElement( enum!.pcgs, i ); + elm := enum!.pcgs[ i ] ^ ( pos mod p ) * elm; + pos := QuoInt( pos, p ); + od; + return enum!.representative * elm; +end ); + +InstallMethod( Position, true, [ IsCosetSolvableFactorEnumeratorRep, + IsObject, IsZeroCyc ], 0, + function( enum, elm, zero ) + exp := ExponentsOfPcElement( enum!.pcgs, + LeftQuotient( enum!.representative, elm ) ); + pos := 0; +|_ + for i in enum!.range do + pos := pos * RelativeOrderOfPcElement( pcgs, i ) + exp[ i ]; + od; + return pos + 1; +end ); +\endtt + +{\bsf Making automorphisms act on such enumerators.}\quad Our next task +is to make automorphisms of the solvable group `$pcgs$!.group' act on `[ +1 .. Length( $enum$ ) ]' for such an enumerator $enum$. We achieve this +by introducing a new representation of automorphisms on enumerators and +by putting the enumerator together with the automorphism into an object +which behaves like a permutation. Turning an ordinary automorphism into +such a special automorphism requires then the construction of a new +object which has the new kind. We provide an operation `PermOnEnumerator( +$model$, $aut$ )' which constructs such a new object having the same kind +as $model$, but representing the automorphism $aut$. So $aut$ can be +either an ordinary automorphism or one which already has an enumerator in +its kind, but perhaps different from the one we want (i.e. from the one +in $model$). +\begintt +IsPermOnEnumerator := NewCategory( "IsPermOnEnumerator", + IsMultiplicativeElementWithInverse and IsPerm ); + +IsPermOnEnumeratorDefaultRep := NewRepresentation + ( "IsPermOnEnumeratorDefaultRep", + IsPermOnEnumerator and IsAttributeStoringRep, + [ "perm" ] ); + +PermOnEnumerator := NewOperation( "PermOnEnumerator", + [ IsEnumerator, IsObject ] ); + +InstallMethod( PermOnEnumerator, true, + [ IsEnumerator, IsObject ], 0, + function( enum, a ) + SetFilterObj( a, IsMultiplicativeElementWithInverse ); + a := Objectify( NewKind( PermutationsOnEnumeratorsFamily, + IsPermOnEnumeratorDefaultRep ), + rec( perm := a ) ); + SetEnumerator( a, enum ); + return a; +end ); + +InstallMethod( PermOnEnumerator, true, + [ IsEnumerator, IsPermOnEnumeratorDefaultRep ], 0, + function( enum, a ) + a := Objectify( TypeObj( a ), rec( perm := a!.perm ) ); + SetEnumerator( a, enum ); + return a; +end ); +\endtt +Next we have to install new methods for the operations which calculate +the product of two automorphisms, because this product must again have +the right kind. We also have to write a function which uses the +enumerators to apply such an automorphism to positive integers. +\begintt +InstallMethod( \*, IsIdentical, + [ IsPermOnEnumeratorDefaultRep, IsPermOnEnumeratorDefaultRep ], 0, + function( a, b ) + perm := a!.perm * b!.perm; +|_ + SetIsBijective( perm, true ); + return PermOnEnumerator( Enumerator( a ), perm ); +end ); + +InstallMethod( \^, true, + [ IsPosRat and IsInt, IsPermOnEnumeratorDefaultRep ], 0, + function( p, a ) + return PositionCanonical( Enumerator( a ), + Enumerator( a )[ p ] ^ a!.perm ); +end ); +\endtt +How the corresponding methods for `$p$ / $aut$' and `$aut$ ^ $n$' look +like is obvious. + +Now we can formulate the recursive procedure `StabChainStrong' which +extends the stabilizer chain by adding in new generators $newgens$. We +content ourselves again with pseudo-code, emphasizing only the lines +which set the `EnumeratorDomainPermutation'. We assume that initially $S$ +is a stabilizer chain for the trivial subgroup with a level for each pair +$(range,g)$ characterizing an enumerator (as described above). We also +assume that the `identity' element at each level already has the kind +corresponding to that level. + +\)StabChainStrong := function( $S$, $newgens$ ) +\)\quad for $i$ in [ 1 .. Length( $newgens$ ) ] do +\)\qquad $newgens$[ $i$ ] := AutomorphismOnEnumerator( $S$.identity, % + $newgens$[ $i$ ] ); +\)\quad od; +\)\quad {\rm Extend the Schreier tree of $S$ with $newgens$.} +\)\quad for $sch$ in {\rm Schreier generators} do +\)\qquad if $sch \notin S$.stabilizer then +\)\qquad\quad StabChainStrong( $S$.stabilizer, [ $sch$ ] ); +\)\qquad fi; +\)\quad od; +\)end; + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Local Variables: % mode: text diff --git a/doc/ext/weakptr.tex b/doc/ext/weakptr.tex new file mode 100644 index 0000000000..857e312128 --- /dev/null +++ b/doc/ext/weakptr.tex @@ -0,0 +1,189 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% +%W weakptr.tex GAP documentation Steve Linton +%% +%H @(#)$Id$ +%% +%Y Copyright 1997, The GAP Project +%% +%% This file describes the use of weak pointers +%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Chapter{Weak Pointers} + +This chapter describes the use of the kernel feature of *weak pointers*. This +feature is intended for use only in {\GAP} internals, and is *not +recommended* for use in share packages, user code, or at the higher levels of +the library. + +The GASMAN garbage collector is the part of the kernel that manages memory in +the users workspace. It will normally only reclaim the storage used by an +object when the object cannot be reached as a subobject of any GAP variable, +or from any reference in the kernel. We say that any link to object a from +object \"keeps object alive\", as long as is alive. It is +occasionally convenient, however to have a link to an object which *does not +keep it alive*, and this is a weak pointer. The most common use is in +caches, and similar structures, where it is only necessary to remember how to +solve problem x as long as some other link to x exists. + +The following section "Weak Pointer Objects" describes the semantics of the +objects that contain weak pointers. Following sections describe the functions +available to manipulate them. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{Weak Pointer Objects} + +A *weak pointer object* is similar to a mutable plain list, except that it +does not keep its subobjects alive during a garbage collection. From the +{\GAP} viewpoint this means that its entries may become unbound, apparently +spontaneously, at any time. Considerable care is therefore needed in +programming with such an object. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{WeakPointerObj} + +\>WeakPointerObj( ) + +'WeakPointerObject' returns a weak pointer object which contains the same +subobjects as , that is it returns a *shallow* weak copy of . + +\begintt + gap> w := WeakPointerObj( [ 1, , [2,3], fail, rec() ] ); + WeakPointerObj( [ 1, , [ 2, 3 ], fail, rec( + )] ) + gap> GASMAN("collect"); + gap> w; + WeakPointerObj( [ 1, , , fail] ) +\endtt + +Note that 'w' has failed to keep its list and record subobjects alive during +the garbage collection. Certain subobjects, such as small integers and +elements of small finite fields, are not stored in the workspace, and so are +not subject to garbage collection, while certain other objects, such as the +Boolea values, are always reachable from global variables or the kernel and +so are never garbage collected. + +Subobjects reachable without going through a weak pointer object do not +evaporate, as in: + +\begintt + gap> l := [1,2,3];; + gap> w[1] := l;; + gap> w; + WeakPointerObj( [ [ 1, 2, 3 ], , , fail] ) + gap> GASMAN("collect"); + gap> w; + WeakPointerObj( [ , , , fail] ) +\endtt + +Note also that the global variables 'last', 'last2' and 'last3' will keep +things alive -- this can be confusing when debugging. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{Low level access functions for Weak Pointer Objects} +\index{ElmWPObj}\index{IsBoundElmWPObj}\index{UnbindElmWPObj}\index{SetElmWPObj} +\index{LengthWPObj} + +\>'SetElmWPObj(,,)' +\>'UnbindElmWPObj(,)' +\>'ElmWPObj(, )' +\>'IsBOundElmWPObj(,)' +\>'LengthWPObj()' + +The functions 'SetElmWPObj(,,)' and +'UnbindElmWPObj(,)' set and unbind entries in a weak pointer object. + +The function 'ElmWPObj(, )' returns the element at position of +the weak pointer object , if there is one, and 'fail' otherwise. A return +value of 'fail' can thus arise either because (a) the value 'fail' is stored +at position , or (b) no value is stored at position . Since 'fail' +cannot vanish in a garbage collection, these two cases can safely be +distinguished by a *subsequent* call to 'IsBoundElmWPObj(,)', which +returns 'true' if there is currently a value bound at position of +and 'false' otherwise. + +Note that it is *not* safe to write: 'if IsBoundElmWpObj(w,i) then x:= +ElmWPObj(w,i); fi;' and treat 'x' as reliably containing a value taken from +'w', as a badly timed garbage collection could leave 'x' containing 'fail'. +Instead use 'x := ElmWPObj(w,i); if x <> fail or IsBoundElmWPObj(w,i) then . +. .'. + +\begintt + gap> w := WeakPointerObj( [ 1, , [2,3], fail, rec() ] ); + WeakPointerObj( [ 1, , [ 2, 3 ], fail, rec( + )] ) + gap> SetElmWPObj(w,5,[]); + gap> w; + WeakPointerObj( [ 1, , [ 2, 3 ], fail, [ ]] ) + gap> UnbindElmWPObj(w,1); + gap> w; + WeakPointerObj( [ , , [ 2, 3 ], fail, [ ]] ) + gap> ElmWPObj(w,3); + [ 2, 3 ] + gap> ElmWPObj(w,1); + fail + gap> 2;;3;;4;;GASMAN("collect"); # clear last etc. + gap> ElmWPObj(w,3); + fail + gap> w; + WeakPointerObj( [ , , , fail, [ ]] ) + gap> ElmWPObj(w,4); + fail + gap> IsBoundElmWPObj(w,3); + false + gap> IsBoundElmWPObj(w,4); + true +\endtt + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{Accessing WP Objects as Lists} + +Weak pointer objects are members of 'ListsFamily' and the categories 'IsList' +and 'IsMutable'. Methods based on the low-level functions in the previous +section, are installed for the list access operations, enabling them to be +used as lists. However, it is *not recommended* that these be used in +programming. They are supplied mainly as a convenience for interactive +working, and may not be safe, since functions and methods for lists may +assume that after 'IsBound(w[i])' returns true, access to 'w[i]' is safe. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{Copying WP Objects} + +A 'ShallowCopy' method is installed, which makes a new weak pointer object +containing the same objects as the original. + +It is possible to apply 'StructuralCopy' to a weak pointer object, obtaining +a new weak pointer object containing copies of the objects in the original. +This *may not be safe* if a badly timed garbage collection occurs during +copying. + +Applying 'Immutable' to a weak pointer object produces an immutable plain +list containing immutable copies of the objects contained in the weak pointer +object. An immutable weak pointer object is a contradiction in terms. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{The GASMAN Interface for weak pointer objects} + +The key support for weak pointers is in 'gasman.c' and 'gasman.h'. This +document assumes familiarity with the rest of the opeation of GASMAN. A +kernel type (tnum) of bags which are intended to act as weak pointers to +their subobjects must meet three conditions. Firstly, the marking function +installed for that tnum must use 'MarkBagWeakly' to for those subbags, rather +than 'MARK_BAG'. Secondly, before any accesss to such a subbag, it must be +checked with 'IS_WEAK_DEAD_BAG'. If that returns true, then the subbag has +evaporated in a recent garbage collection and must not be accessed. Typiclly +the reference to it should be removed. Thirdly, a *sweeping function* must be +installed for that tnum which copies the bag, removing all references to dead +weakly held subbags. + +The files 'weakptr.c' and 'weakptr.h' use this interface to support weak +pointer objects. Other objects with weak behaviour could be implemented in a +similar way. + +%%% Local Variables: +%%% mode: tex +%%% TeX-master: "manual" +%%% fill-column 77 +%%% End: + \ No newline at end of file diff --git a/doc/gapmacro.tex b/doc/gapmacro.tex index 35b697b562..2a36ccdb96 100644 --- a/doc/gapmacro.tex +++ b/doc/gapmacro.tex @@ -76,17 +76,18 @@ \def\onepageout#1{{\setbox255=\vbox{#1} \hsize=\pagewidth \vsize=\pageheight \plainoutput}} \def\normaloutput{\onepageout{\unvbox255}} +\maxdeadcycles=100 % \output is called quite often \output={\normaloutput} \newbox\partialpage \newdimen\origvsize \newif\ifrigid -\def\begindoublecolumns{\origvsize=\vsize \begingroup +\def\begindoublecolumns{\global\origvsize=\vsize \begingroup \output={\global\setbox\partialpage=\vbox{\unvbox255\kern0pt}}\eject \output={\doublecolumnout} \hsize=\colwidth \dimen@=\pageheight \advance\dimen@ by-\ht\partialpage \multiply\dimen@ by2 \ifdim\dimen@<2\baselineskip \dimen@=2\baselineskip\fi \vsize=\dimen@} \def\enddoublecolumns{\output={\balancecolumns}\eject - \endgroup \pagegoal=\vsize} + \endgroup \global\vsize=\origvsize \pagegoal=\vsize} \def\doublecolumnout{\splittopskip=\topskip \splitmaxdepth=\maxdepth \setbox0=\vsplit255 to.5\vsize \setbox2=\vsplit255 to.5\vsize \onepageout\pagesofar \global\vsize=2\pageheight @@ -109,7 +110,7 @@ \setbox0=\vbox to\dimen@{\unvbox1} \setbox2=\vbox to\dimen@{\dimen2=\dp3 \unvbox3\kern-\dimen2 \vfil} \fi - \global\output={\normaloutput}\global\vsize=\origvsize \pagesofar} + \global\vsize=\origvsize \pagesofar} \catcode`@=12 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -270,11 +271,12 @@ \ifx\thechapter\normalchapter \immediate\write\secindout{C \filename\space\thechapter. \chapname}\fi \setbox0=\hbox{\inchhigh\kern-.075em \chapterno} - \setbox1=\vbox{\titlefont \advance\hsize by-\wd0 \advance\hsize by-2em - \leftskip 0pt plus 1fil \parfillskip 0pt \baselineskip 44pt\relax #1} - \line{\box0\hfil\box1}\nobreak \vskip 40pt \noindent} + \setbox1=\vbox{\titlefont \advance\hsize by-\wd0 \advance\hsize by-1em + \hyphenpenalty=10000 \linepenalty=10000 + \leftskip 0pt plus\hsize \parfillskip 0pt \baselineskip 44pt\relax #1} + \line{\box0\hfil\box1}\nobreak \vskip 40pt} -\outer\def\Section#1#2\par{\medskip \advance\secno by1 +\outer\def\Section#1#2\par{\bigbreak \advance\secno by1 \ifx\thechapter\emptychapter \edef\tempa{\the\secno} \else @@ -285,7 +287,7 @@ \ifx#2\null\else \edef\tempb{{#1}} \expandafter\doindex\tempb{|indexit}{}\fi \noindent{\baselineskip 18pt\let!=\space \mark{Section \the\secno. #1}% - \secfont \tempa \enspace #1}\par\nobreak\medskip\noindent} + \secfont \tempa \enspace #1}\par\nobreak\medskip} \def\writesecline#1\\#2{\write\tocout{\noexpand\seccontents{#1}{#2} {\the\pageno}}} @@ -307,8 +309,9 @@ \endgraf\nobreak\oporfunc#1\end}% \gdef\cloparen#1 {\endgroup \ifx\par\fpar \else% - \ifvmode \vskip -\lastskip \fi \medskip \begingroup\let\par=\fpar\fi% - \endgraf {\def\[{\moveup\lbrack}\def\]{\moveup\rbrack}\def\|{\vrule\relax}% + \ifvmode \vskip -\lastskip \fi \medskip% + \begingroup\let\par=\fpar \parskip 0pt \fi% + \endgraf{\def\[{\moveup\lbrack}\def\]{\moveup\rbrack}\def\|{\vrule\relax}% \noindent\typewriter#1'}}% \gdef\scanparen#1(#2\end{\def\tempa{#2}\ifx\tempa\empty% \def\next{\begingroup\cloparen\fmark#1 diff --git a/doc/prg/create.tex b/doc/prg/create.tex index 78fa67ca08..14096794de 100644 --- a/doc/prg/create.tex +++ b/doc/prg/create.tex @@ -20,7 +20,7 @@ and objects are created. A small example of the implementation of list objects is given -in Section~"Implementing List Objects". +in Section~"Implementing New List Objects". Section~"External Representation" introduces the external representation of objects. @@ -37,6 +37,7 @@ `NewCategory' returns a new category that has the name and is contained in the filter , see~"Filters". This means that every object in lies automatically also in . +We say also that is an implied filter of . For example, if one wants to create a category of group elements then should be `IsMultiplicativeElementWithInverses' or a @@ -81,6 +82,8 @@ `NewRepresentation' returns a new representation that has the name and is a subrepresentation of the representation . This means that every object in lies automatically also in . +We say also that is an implied filter of . + The third argument is a list either of integers or of strings. In the former case, must be `IsPositionalObjectRep' or a subrepresentation of it, and tells what positions of the objects @@ -104,15 +107,15 @@ \)NewAttribute( , , ) `NewAttribute' returns a new attribute with name . -The arguments for are expected to lie in the filter , -for example the attribute `Size' was created with second argument +The filter describes the involved filters of , +see~"Filters". +That is, the argument for is expected to lie in . +For example the attribute `Size' was created with second argument `IsDomain'. Note that a method for that does not require its argument to lie in must be installed using `InstallOtherMethod'. -For the example, there is a method for `Size' that is applicable to -lists. - - describes also the implied filters of , see~"Filters". +In other words, is not implied by . +For example, there is a method for `Size' that is applicable to lists. The optional third argument denotes the incremental rank (see~"Filters") of the tester of , the default value is 1. @@ -133,8 +136,9 @@ \)NewProperty( , , ) `NewProperty' returns a new property with name . -The arguments for are expected to lie in the filter , -and describes the implied filters of . +The filter describes the involved filters of . +As in the case of attributes, is not implied by . + The optional third argument denotes the incremental rank (see~"Filters") of the property itself, i.e. *not* of its tester, the default value is 1. @@ -176,7 +180,7 @@ one can use only the functions \>SetFilterObj( , ) -\)ResetFilterObj( , ) +\>ResetFilterObj( , ) `SetFilterObj' sets the value of for to `true', `ResetFilterObj' sets the value of for to `false'. @@ -291,7 +295,7 @@ is not in the category `IsMutable'. So one must be *very careful* when `!.' is used. -Especially, must be among the admissible component names for +In particular, must be among the admissible component names for the representation of , see~"Creating Representations". The following example shows the implementation of an iterator @@ -349,11 +353,11 @@ via `![]:= '. Note that it is possible to add entries and to change the values of -positions also if claims that it is immutable, i.e., if +positions even if claims that it is immutable, i.e., if is not in the category `IsMutable'. -So one must be *very careful* when `![]' shall be used. -Especially, must be among the admissible positions for +So one must be *very careful* when `![]' is used. +In particular, must be among the admissible positions for the representation of , see~"Creating Representations". The following example shows the implementation of an iterator @@ -397,7 +401,7 @@ \endtt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\Section{Implementing List Objects} +\Section{Implementing New List Objects} A list in {\GAP} is an object in the category `IsList'. Basic operations for lists are `Length', `\\[\\]', and `IsBound\\[\\]'. @@ -427,10 +431,11 @@ This means that it is sufficient to install methods for the new list objects only for the basic operations. -So new list objects are created as objects in the category `IsList' -for that methods for `Length', `\\[\\]', and `IsBound\\[\\]' are -installed, -and perhaps also for `\\[\\]\\:\\=' and `Unbind\\[\\]'. +So if one wants to implement new list objects then one creates them +as objects in the category `IsList', and installs methods for `Length', +`\\[\\]', and `IsBound\\[\\]'. +If the new lists shall be mutable, one needs to install also methods +for `\\[\\]\\:\\=' and `Unbind\\[\\]'. One application for this is the implementation of *enumerators* for domains. @@ -442,7 +447,7 @@ In this situation, one implements a new representation of the lists that are already available in {\GAP}, -especially the family of such a list is the same as the family of +in particular the family of such a list is the same as the family of the domain $D$. But it is also possible to implement new kinds of lists that lie in @@ -517,6 +522,11 @@ But it is *not* required that equal objects have equal external representations. +Note that if one defines a new representation of objects for which an +external representation exists already +then one *must* install a method to compute this external representation +for the objects in the new representation. + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \Section{Declaration and Implementation Part} @@ -545,7 +555,7 @@ Calls to the following functions belong to the declaration part. -`InstallTrueMethod' +`InstallTrueMethod', `NewAttribute', `NewCategory', `NewFilter', @@ -566,4 +576,4 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% -%E +%E create.tex diff --git a/doc/prg/methsel.tex b/doc/prg/methsel.tex index a2f0bc222f..1854d45128 100644 --- a/doc/prg/methsel.tex +++ b/doc/prg/methsel.tex @@ -36,7 +36,7 @@ Each call of an operation causes a suitable method to be selected and then called. -The choice of what method to select is made according to the types +The choice of which method to select is made according to the types of the arguments, the underlying mechanism is described in the following sections. @@ -47,7 +47,7 @@ Also all attributes and properties are operations. Each attribute has a special method which is called if the attribute value is already stored; -this method should of course simply return this value. +this method of course simply returns this value. As stated above, the setter of an attribute is called automatically if an attribute value has been computed. @@ -115,7 +115,7 @@ called. This rank is given by the sum of the ranks of the filters in the list , -*including implied filters*, +*including involved filters*, plus the number used in the call of `InstallMethod'. So the argument can be used to raise the priority of a method relative to other methods for . @@ -222,8 +222,8 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \Section{Logical Implications} -It may happen that a property is implied by another filter , -which is usually a meet of other properties, +It may happen that a property shall be implied by another filter +, which is usually a meet of other properties, or the meet of some properties and some categories. Such a logical implication can be installed as an immediate method for that requires and that always returns `true'. @@ -231,12 +231,17 @@ \>InstallTrueMethod( , ) +This has the effect that becomes an implied filter of , +see~"Filters". + For example, each cyclic group is abelian, each finite vector space is finite dimensional, and each division ring is integral. -The installation of the first of these implications is +The first of these implications is installed as follows. -\>InstallTrueMethod( IsCommutative, IsGroup and IsCyclic ) +\begintt + InstallTrueMethod( IsCommutative, IsGroup and IsCyclic ) +\endtt Contrary to other immediate methods, logical implications cannot be switched off. @@ -246,5 +251,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% -%E +%E methsel.tex diff --git a/doc/prg/objselms.tex b/doc/prg/objselms.tex index 7517689fbb..776e2647c9 100644 --- a/doc/prg/objselms.tex +++ b/doc/prg/objselms.tex @@ -75,13 +75,13 @@ For example, a group is closed under multiplication, taking the zeroth power of elements, and taking inverses of elements. -The operations under that a domain is closed are a subset of +The operations under which a domain is closed are a subset of the operations that the elements of a domain admit. It is possible that the elements admit more operations. For example, matrices can be multiplied and added. But addition plays no role in a group of matrices, and multiplication plays no role in a vector space of matrices. -Especially, a matrix group is not closed under addition. +In particular, a matrix group is not closed under addition. Note that the elements of a domain exist independently of this domain, usually they existed already before the domain was created. @@ -112,8 +112,8 @@ the domain is constructed, whereas properties can be found out later. For example, take a domain whose operational structure is given by closure under multiplication. -Also if it is found out that by chance also the inverses of all elements -lie in this domain, +Also if it is found out that also the inverses of all its elements +do (by chance) lie in this domain, being closed under taking inverses is not added to the operational structure. But a domain with operational structure multiplication, @@ -197,7 +197,7 @@ The subobjects of `ShallowCopy( )' are *identical* to the subobjects of . Note that the object returned by `ShallowCopy' is always a new object, -especially it is not identical with the argument , +in particular it is not identical with the argument , no matter whether is mutable or immutable. Further note that it is not possible to turn a mutable object into an @@ -225,7 +225,7 @@ Given an immutable matrix , `ShallowCopy' returns a mutable matrix whose rows are identical with the rows of , -especially the rows are immutable. +in particular the rows are immutable. To get a matrix whose rows are mutable, one can use `List( , ShallowCopy )'. diff --git a/doc/prg/types.tex b/doc/prg/types.tex index d630dde0d0..4951019c7e 100644 --- a/doc/prg/types.tex +++ b/doc/prg/types.tex @@ -156,7 +156,7 @@ is fixed. All categories are created during initialization, -especially they are not created dynamically at runtime. +in particular they are not created dynamically at runtime. The following list gives an overview of important categories of arithmetic objects. @@ -276,7 +276,7 @@ for example a mutable list of characters can be converted into a string. All representations are created during initialization, -especially they are not created dynamically at runtime. +in particular they are not created dynamically at runtime. Examples of subrepresentations of `IsPositionalObjectRep' are `IsModulusRep', @@ -309,7 +309,7 @@ For example, all groups whose order is known lie in the set of the attribute `Size'. -Obviously, the set of attributes to that an object belongs can change; +Obviously, the set of attributes to which an object belongs can change; in general, an object belongs to few attributes when it is created, and will lie in more and more attributes as their values are computed. @@ -339,7 +339,7 @@ object if the size was not yet known. All attributes are created during initialization, -especially they are not created dynamically at runtime. +in particular they are not created dynamically at runtime. Examples of attributes for multiplicative elements are `Inverse', `One', and `Order'. @@ -352,7 +352,7 @@ The properties of an object are those of its attributes whose values are `true' or `false'. -The only difference between attributes and properties is that a property +The main difference between attributes and properties is that a property defines two sets, namely the usual set of all objects for which the value is known, and the set of all objects for which the value is known to be `true'. @@ -422,22 +422,25 @@ "Creating Categories", "Creating Representations", "Creating Attributes and Properties", "Creating Other Filters". For an arbitrary filter, its rank is given by the sum of incremental -ranks of the involved simple filters. - -Note that also those filters are regarded as involved that were -explicitly notified as *implied filters* of when was -created, although an object in does not necessarily lie in all -implied filters of (again see the sections about the creation of -filters). +ranks of the *involved* simple filters (again see the sections about the +creation of filters). +Note that an object in does not necessarily lie in all involved +filters of . For example, `Size' is defined as an attribute for domains, -and `IsDomain' is an implied filter of the filter `Tester( Size )'; -But there are also methods for `Size' to compute the size of lists, +and `IsDomain' is an involved filter of the filter `Tester( Size )'; +but there are also methods for `Size' to compute the size of lists, which are not domains. \>NamesFilter( ) -returns a list of names of the implied filters of the filter . +`NamesFilter' returns a list of names of the *implied* simple filters +of the filter , these are all those simple filters such that +every object in does also lie in . +For implications between filters, see the sections "Filters", +"Logical Implications", "Creating Categories", +"Creating Representations", "Creating Attributes and Properties". + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \Section{Types} diff --git a/doc/prg/xtndxmpl.tex b/doc/prg/xtndxmpl.tex index f6e0c9cc52..6599264076 100644 --- a/doc/prg/xtndxmpl.tex +++ b/doc/prg/xtndxmpl.tex @@ -169,10 +169,10 @@ Of course we must install some methods for arithmetic and other operations if the elements are to behave as we want. -We start with a method that allows to print elements nicely. +We start with a method for printing elements nicely. \begintt - InstallMethod( ViewObj, + InstallMethod( PrintObj, "method for element in Z/nZ (ModulusRep)", true, [ IsZmodnZObj and IsModulusRep ], 0, @@ -181,7 +181,7 @@ end ); \endtt -So we installed a method for the operation `ViewObj' (first argument), +So we installed a method for the operation `PrintObj' (first argument), and we gave it a suitable information message (second argument), see~"tut:ApplicableMethod" and~"tut:Tracing Methods" for applications of this information string. diff --git a/doc/ref/domain.tex b/doc/ref/domain.tex index 6d39495bc5..ad05cd64cc 100644 --- a/doc/ref/domain.tex +++ b/doc/ref/domain.tex @@ -1,4 +1,234 @@ -\Chapter{Domains} +\Chapter{Domains and Collections} + +Since a *set* in {\GAP} is a list with additional properties (homogeneous +and sorted), {\GAP} can in this manner represent only sets which are +finite or at least readily enumerable respecting the ordering (in +particular, they must then be well-ordered). Most sets (in the +mathematical sense) are therefore represented in {\GAP} by trickier +mechanisms, e.g., groups are (initially) given by generators. The general +name for a {\GAP} object which represents a mathematical set, is +*collection*. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{Elements of domains}\null + +We have seen in the `ProjectiveSpaceTransversal' example in +section~"PositionCanonical" that a collection is sometimes intended +to represent a mathematical set other than the plain list `AsList( )' +of its elements (e.g., a projective space rather than a set of +left-normed vectors). The more natural collections, however, are those +that have an algebraic structure and can be identified with the list of +their elements. They are called *domains* in {\GAP}. + +Given a domain, you can access a list of its elements via `AsList' and +`Enumerator', as described in "AsList and Enumerators". Domain is +{\GAP}'s name for what was called a ``mathematical set'' in that section. +*To compare two domains, it is enough to compare their element lists* +(or, to be more precise, their `AsListSorted's because the ordering of +elements plays no role). This imporant rule shows why systems of +representives need not be domains: The list `[ (), (1,2) ]' is a +transversal for the right cosets of the alternating group of degree~$n$ +in the symmetric group of degree~$n$, for every $n>1$. Therefore it is +impossible to reconstruct the set of right cosets (which would include +the alternating group, and hence the degree~$n$) from the transversal. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{Property test functions} + +There are numerous functions in {\GAP} that test a collection for a +certain property. They all expect as argument a collection (and in +some cases also an element or another collection as second +argument) and return `true' if has the property (resp.~if or + have the property with respect to ) and `false' otherwise. For the +sake of uniformity, such a function is always called `Is\dots' where +\dots\ stands for an adjective or noun (with capital first letter) that +describes the property to be tested. For example, the function that tests +a group for solvability is called `IsSolvable' and the function that +tests whether two elements are conjugate in a group is called +`IsConjugate' (*not* `AreConjugate'). You should adopt this naming +convention if you write your own property testing functions. + +As a general principle, if a test function requires two arguments, then +the one comes first that is supposed to be ``greater''. So `IsSubset( +, )' tests whether is a subset of (where ``set'' means the +mathematical set described by a collection) and `IsConjugate( $G$, $x$, +$y$ )' tests whether the group elements $x$ and $y$ are conjugate in the +group $G$. + +Some of these test functions may not terminate if the given collection +has an infinite set of elements. A warning may be printed in such cases. + +The category test functions like `IsGroup( )' look similar to the +functions just discussed, but they do no actual computation: they just +check whether the argument has the corresponding filter that was +set when was created. + +We will describe property test functions for special categories (e.g., +for groups) in the corresponding chapters. There are few general tests +that are applicable to all collections, you will find them below. Their +names should already demonstrate what they test. + +\>IsFinite( ) + +The default method calls `Size' and returns `true' if the size returned +by that function is a finite number (i.e., if `Size( ) \< infinity'). +This method will not work for collections where `Size' is not applicable. +In such cases, the implementor of a new collection *must* implement +`IsFinite' for that collection, since it is, together with `AsList' (see +"AsList"), the most basic function for collections, used by most of the +default functions in the collection package. + +\>IsSubset( , )!{for domains} + + is considered a subset of if and only if the set of elements of + is as a set a subset of the set of elements of . That is, +`IsSubset' behaves as if implemented as `ForAll( AsList( ), $d$ -> $d$ +in )' (see "AsList"), except that it will also sometimes, but not +always, work for infinite collections, and that it will usually work much +faster than the above definition. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{Set functions!for domains} + +The following functions are called set functions because they are +applicable to all collections, i.e., to all mathematical sets (as were +`IsFinite' and `IsSubset' in the last section). Special categories of +domains, such as groups, often overlay the default methods described here +by more efficient functions. These specialized function are then +described in the appropriate chapters; however, if only the default +method is used, the function will not be mentioned there again. + +Whenever possible, the result of a set function applied to a domain is +returned as a domain again, rather than as a set. This is to keep with +the general idea that the output of a computation should reflect the +properties of the input. Examples, where this leads to a more concise +presentation of the result in the domain case than in the set case, are +the functions `Intersection' and `Union'. + +Functions for structured domains, such as groups, fields or rings, which +will be described in the following chapters, behave exactly like set +functions in these three aspects. They are even more obliged than set +functions to return the result as a domain, since this is the only way to +keep the algebraic structure of the objects in the computer's +representation as well as in the mathematical representation. + +\>` in '{membership test}!{for domains} + +The `in' operator tests a relation between elements and domains, whereas +the comparison functions compared objects of the same ``level''. It +returns `true' if the element , which may be an object of any type, +lies in the domain , and `false' otherwise. + +The default method computes the set of elements of the domain with the +function `AsListSorted' below and tests whether lies in this set. + +\>Size( )!{for domains} + +`Size' returns the size of the domain . If is infinite, `Size' +returns the transfinite number `infinity'. may also be a proper set +(see "Sets"), in which case the result is the length of this list. `Size' +will, however, signal an error if is a list that is not a proper set, +i.e., that is not sorted, or has holes, or contains duplicates. + +The default methods `DomainOps.Size' computes the set of elements of the +domain with the function `AsList' and returns the length of this list. + +\>Intersection( $D_1$, $D_2$, \dots\ )!{for domains} +\)Intersection( ) + +In the first form `Intersection' returns the intersection of the domains +$D_1$, $D_2$, etc. In the second form must be a list of domains +and `Intersection' returns the intersection of those domains. Each +argument or element of respectively may also be an arbitrary +list, in which case `Intersection' silently applies `Set' (see "Set") to +it first. + +The result of `Intersection' is the set of elements that lie in every of +the domains $D_1$, $D_2$, etc. The methods, however, are encouraged to +keep as much structure as possible. If $D_1$ and $D_2$ are elements of a +common category and if this category is closed under taking +intersections, then the result should be a domain lying in this category +too. So for example the intersection of permutation groups will again be +a permutation group. + +`Intersection' itself is not an operation, but a plain function which +loops over its arguments (or the list of domains or sets) and calls the +operation `Intersection2' repeatedly, passing each time only two domains. +This obviously makes the writing of methods simpler. + +The default method for `Intersection2' checks whether both domains are +infinite. If they are it signals an error. Otherwise, if one of the +domains is infinite it loops over the elements of the other domain, and +tests for each element whether it lies in the infinite domain. If both +domains are finite it computes the proper sets of elements of both and +intersects them. This default method is overlaid by more special +functions for most other domains. Those functions usually are faster and +keep the structure of the domains if possible. + +\>Union( $D_1$, $D_2$, \dots\ )!{for domains} +\)Union( ) + +Everything that was said for `Intersection' in the last paragraphs goes +similarly for `Union'. In particular, there is an operation `Union2' +which does the real work. Its default method checks whether either domain +is infinite. If one is it signals an error. If both domains are finite it +computes the proper sets of elements of both and unites them (see +"UniteSet"). + +\>Difference( , )!{for domains} + +`Difference' returns the set difference of the domains and . +Either argument may also be an arbitrary list, in which case `Difference' +silently applies `Set' (see "Set") to it first. + +The result of `Difference' is the set of elements that lie in but not +in . Note that need not be a subset of . The elements of , +however, that are not element of play no role for the result. + +The default method checks whether is infinite. If it is it signals an +error. Otherwise, it computes the proper sets of elements of and +and returns the difference of those sets (see "SubtractSet"). This +default method is currently not overlaid for any domain. + +\>Representative( ) + +`Representative' returns a representative of the domain . + +The existence of a representative, and the exact definition of what a +representative is, depends on the category of . The representative +should be an element that, within a given context, identifies the domain +. For example if is a cyclic group, its representative would be a +generator of , or if is a coset, its representative would be an +arbitrary element of the coset. + +Note that `Representative' is pretty free in choosing a representative if +there are several. It is not even guaranteed that `Representative' +returns the same representative if it is called several times for one +domain (unless an ealier representatives was stored by the associated +setter, `SetRepresentative', of course). Thus the main difference between +`Representative' and `Random' (see "Random") is that `Representative' is +free to choose a value that is cheap to compute, while `Random' must make +an effort to distribute its answers in a well-defined manner. + +The default method simply signals an error, since there is no default way +to find a representative. + +\>Random( ) + +`Random' returns a random element of the domain . The distribution of +elements returned by `Random' depends on the domain . For finite +domains all elements are usually equally likely. For infinite domains +some reasonable distribution is used. See the chapters of the various +domains to find out which distribution is being used. + +The default method for random selection computes the list of elements +using `AsList' and selects a random element of this list using +`RandomList' (see "RandomList" for a description of the pseudo random +number generator used). This default function can of course only be +applied to finite domains. + +All random functions called this way rely on the low level random number +generator provided by `RandomList' (see "RandomList"). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \Section{Information maintenance} @@ -35,7 +265,7 @@ $$ \hbox{` = and ',} $$ the contraposition of the statement is also used: $$ -\vbox{\halign{\hfil#\ &#\hfil\quad&#\ &\hfil#\ &#\hfil\cr% +\vbox{\halign{\hfil#\ &#\hfil\quad&#\ &\hfil#\ &#\hfil\cr if& `( )'& i.e.,& if& `IsGroup( )'\cr and& `( )'& i.e.,& and& `IsGroup( )'\cr and& `Tester( )( ) and not ( )'& i.e.,& and& @@ -43,13 +273,33 @@ then& `Setter( )( , false )'& i.e.,& then& `SetIsSolvableGroup( , false )'.\cr}}$$ Both implications -$$ \eqalignno{\hbox{`IsSolvableGroup( )'}& \Rightarrow - \hbox{`IsSolvableGroup( )'}\cr - \noalign{\line{and}} - \hbox{`not IsSolvableGroup( )'}& \Rightarrow - \hbox{`not IsSolvableGroup( )'}\cr} $$ +$$ +\eqalignno{\hbox +{`IsSolvableGroup( )'}& \Rightarrow +\hbox{`IsSolvableGroup( )'}\cr +\noalign{\line +{and}} +\hbox{`not IsSolvableGroup( )'}& \Rightarrow +\hbox{`not IsSolvableGroup( )'}\cr} $$ are declared by the one call of `InstallSubsetMaintainedMethod' and are exploited by the one call of `UseSubsetRelation'. +\beginexample + gap> G := Group((1,2,3,4),(1,2));; IsSolvableGroup( G ); + true + gap> U := Subgroup( G, [(1,2,3),(1,2)] );; + gap> HasIsSolvableGroup( U ); IsSolvableGroup( U ); + true # this information was passed from `G' to `U' + true +|_ + gap> HasIsNilpotentGroup( U ); IsNilpotentGroup( U ); + false + false + gap> C := NormalClosure( G, U ); + Group( [ (2,3), (1,2,3), (2,3,4) ], ... ) + gap> HasIsNilpotentGroup( C ); IsNilpotentGroup( C ); + true # this information was passed from `U' to `C' + false +\endexample \>InstallFactorMaintainedMethod( , , , % ) @@ -65,7 +315,7 @@ $$ \hbox{` = and '} $$ and means that $$ -\vbox{\halign{\hfil#\ & #\hfil\cr% +\vbox{\halign{\hfil#\ & #\hfil\cr if& `( )'\cr and& `( )'\cr and& `Tester( )( ) and not ( )'\cr @@ -117,10 +367,10 @@ i.e., as groups with parent~

. When this is the case, it will always be stated in this reference manual. -\)( , \dots\ ) {\rm vs.}\ % +\)\fmark ( , \dots\ ) {\rm vs.}\ % Sub( , \dots\ ) -\index{in parent!operations}% +\index{in parent!operations}% Here stands for a category of domains, e.g., `Group' or `Ring'. We describe the idea for groups. @@ -143,22 +393,25 @@ end; \endtt -\)InParent( ) {\rm vs.}\ ( , ) -\index{in parent!attributes}\index{in parent!properties}% +\)\fmark InParent( ) {\rm vs.}\ ( , ) -There is another use of parents: Operations which depend on two -arguments, namely two domains of the same category, can store and lookup -the result in the case where the first argument is the parent of the -second. They are then interpreted as ``in parent attributes'' of the -second argument. {\GAP} provides for each such operation, e.g., -`Normalizer( , )', an attribute, e.g., `NormalizerInParent( -)', whose default method is to call `Normalizer( Parent( ), )'. -On the other hand, the operation `Normalizer' first checks whether its -first argument is the parent of the second, and if so, calls -`NormalizerInParent'. (Of course, it has to be ensured that when this -calls `Normalizer' again, no deadlock occurs.) Since all this happens -behind the scenes, the user normally need not care about the in parent -attributes, but they will always be mentioned in this reference manual. +\index{in parent!attributes}\index{in parent!properties}% +There is another use of parents: Functions which depend on two arguments, +namely two domains of the same category, can store and lookup the result +in the case where the first argument is the parent of the second. They +are then interpreted as ``in parent attributes'' of the second argument. +{\GAP} provides for each such function, e.g., `Normalizer( , )', +an attribute, e.g., `NormalizerInParent( )', whose default method is +to call `Normalizer( Parent( ), )'. On the other hand, the +function `Normalizer' first checks whether its first argument is the +parent of the second, and if so, calls `NormalizerInParent'. \ (Of +course, it has to be ensured that when this calls `Normalizer' again, no +deadlock occurs. Actually, there is also an operation, `NormalizerOp', +for which all the methods are installed that really do the work. See +"ext:In parent attributes" in the extension manual.) \ Since all this +happens behind the scenes, the user normally need not care about the in +parent attributes, but they will always be mentioned in this reference +manual. There is one useful possibility for the user, however, which requires the knowledge of the in parent attributes: If a value is to be set in advance diff --git a/doc/ref/group.tex b/doc/ref/group.tex index d52cb4c0d6..34036c043a 100644 --- a/doc/ref/group.tex +++ b/doc/ref/group.tex @@ -121,9 +121,6 @@ Some of the following functions may not terminate if the given group is infinite, while other functions may signal an error in such cases. -The basic remarks made at the beginning of section "Set functions!for -domains" about set functions also apply to group functions. - \>AbelianInvariants( ) The default method needs a finite abelian group and it constructs for @@ -154,18 +151,27 @@ The default method needs a finite group . It returns the quotient of `Size( )' and `Size( )'. +\>IndependentGeneratorsOfAbelianGroup( ) + +If is an abelian group, it can be written as a direct product of +non-trivial cyclic groups $ = C_{n_1} \times \ldots \times C_{n_r}$, +with $n_i>1$ (not necessarily unique). +`IndependentGeneratorsOfAbelianGroup( )' chooses one such +representation and returns a list `[ $\zeta_1$, \dots, $\zeta_r$ ]' such +that $\zeta_i$ generates the $i^{\rm th}$ direct factor~$C_{n_i}$. + \>Agemo( ,

\[, \] ) \>Omega( ,

\[, \] ) -If is a

-group, `Agemo( ,

, )' returns the subgroup +If is a

-group, `Agemo( ,

, )' returns the subgroup generated by the $p^n$th powers of the elements of , and `Omega( , -

, )' returns the subgroup generated by the $p^n$th roots of the +

, )' returns the subgroup generated by the $p^n$th roots of the identity element of~. If is omitted, $=1$ is assumed. -The default method computes the subgroup of generated by the

th -powers of the generators of if is abelian. Otherwise the function -computes the normal closure of the

th powers of the representatives of -the conjugacy classes of . +The default method for `Agemo' computes the subgroup of generated by +the

th powers of the generators of if is abelian. Otherwise +the function computes the normal closure of the

th powers of the +representatives of the conjugacy classes of . \>AutomorphismGroup( ) @@ -260,7 +266,7 @@ computes the permutation character of the operation of on the cosets of . The permutation character is returned as list of integers such that the th position contains the value of the permutation character -on the th conjugacy class of (see "ConjugacyClasses!for groups"). +on the th conjugacy class of (see "Conjugacy classes!for groups"). The value of the *permutation character* of in on a class of is the number of right cosets invariant under the action of an @@ -463,19 +469,19 @@ groups". You can use the shortcut `OperationHomomorphism( , , )' for `OperationHomomorphism( ExternalSet( , , ) )'. -Since {\GAP} only deals with permutations of finite degree, the -domain~ must always be finite if these functions are to work. can -be either a proper set (see "Sets") or a domain which is represented as -described in "Domains". can be an arbitrary group, and must be -a {\GAP} function that takes two arguments (the first from , the -second from ) and returns the an element of~, namely the image of -the first argument under the second. This last argument is always -optional in operation functions, if it is not present, `( , -) = ^ ' is the default. This default function is called -`OnPoints'. Other predefined operation functions are `OnRight( , -) = * ' and `OnLeft( , ) = ^ -1 * '. In the -last function, has to be inverted in order to obtain an operation and -not an anti-operation. +Since {\GAP} only deals with permutations of finite degree, the +domain~ must always be finite if these functions are to work. can +be either a proper set (see "Sets") or a domain which is represented as +described in "Domains and Collections". can be an arbitrary group, +and must be a {\GAP} function that takes two arguments (the first +from , the second from ) and returns the an element of~, namely +the image of the first argument under the second. This last argument + is always optional in operation functions, if it is not present, +`( , ) = ^ ' is the default. This default function +is called `OnPoints'. Other predefined operation functions are `OnRight( +, ) = * ' and `OnLeft( , ) = ^ -1 * +'. In the last function, has to be inverted in order to obtain +an operation and not an anti-operation. \)ExternalSet( , , , \[, \] ) @@ -571,9 +577,9 @@ enumerates the whole~. \begintt gap> G := Group( (1,2,3), (4,5,6) );; D := [1..6];; - gap> Operation( ExternalOrbit( G, D, 4 ) ); + gap> Image( OperationHomomorphism( ExternalOrbit( G, D, 4 ) ) ); Group( [ ( 4, 5, 6) ], ... ) - gap> Operation( G, Orbit( G, D, 4 ) ); + gap> Image( OperationHomomorphism( G, Orbit( G, D, 4 ) ) ); Group( [ (1,2,3) ], ... ) \endtt This difference becomes even more peculiar if you replace `Orbit' by @@ -582,7 +588,7 @@ (as is returned by `Orbit') or a domain (as is constructed by `ExternalOrbit'). \begintt - gap> Operation( G, ExternalOrbit( G, D, 4 ) ); + gap> Image( OperationHomomorphism( G, ExternalOrbit( G, D, 4 ) ) ); Group( [ (1,2,3) ], ... ) \endtt @@ -900,6 +906,51 @@ groups), you can use `AsList( )', which simply calls `Orbit( , )'. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{Rational classes!for groups}\null + +\>RationalClass( , ) +\>GaloisGroup( )!{for rational classes} + +A rational class is, like conjugacy classes, represented as an external +set in {\GAP}, under the action of by conjugation. It is, however, +not an external orbit, because it is defined as the union of the orbits +of $^i$ as $i$ ranges over the group $P_n$ of numbers coprime to the +order $n$ of (taken modulo $n$). The numbers $i$ for which $^i$ +lies already in the ordinary conjugacy class of , form a subgroup +of~$P_n$, the so-called *Galois group* of the rational class. The *prime +residue class group* $P_n$ is obtained in {\GAP} as `Units( Integers mod + )', the unit group of a residue class ring, and `GaloisGroup( +)' returns the Galois group of the rational class as a subgroup of +this group. The following example illustrates this by decomposing a +rational class into conjugacy classes. +\beginexample + gap> a5 := Group((1,2,3),(3,4,5));; g := (1,2,3,4,5);; + gap> rcl := RationalClass( a5, g );; + gap> gal := GaloisGroup( rcl ); p5 := Parent( gal ); + Group( [ Z(5)^0, Z(5)^2 ], ... ) + Group( [ Z(5) ], ... ) +\endexample +The rational class `rcl' of `g' is the disjoint union of the conjugacy +classes of `g'$^i$ as $i$ ranges over a right transversal for `gal' +in~`p5'. +\beginexample + gap> t := AsList( RightTransversal( p5, gal ) ); + [ Z(5)^0, Z(5) ] + gap> List( t, i-> ConjugacyClass( a5, g ^ Int(i) ) ); + [ ConjugacyClass( Group( [ (1,2,3), (3,4,5) ], ... ), (1,2,3,4,5) ), + ConjugacyClass( Group( [ (1,2,3), (3,4,5) ], ... ), (1,3,5,2,4) ) ] +\endexample + +\>Enumerator( )!{for rational classes} +\>`$_1$ = $_2$'{equality test}!{for rational classes} +\>` in '{membership test}!{for rational classes} + +These functions use the Galois group the rational class and its +decomposition into conjugacy classes, as just shown. Then they reduce +their task to corresponding tasks for the conjugacy classes, that are +carried out as described above. + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \Section{Homomorphisms!for groups} @@ -1109,6 +1160,17 @@ `RepresentativeOperation', and the kernel similarly by a call of `Stabilizer'. +\>PreImagesRepresentative( , )!{for linear operation % + homomorphisms} + +If the operation homomorphism describes the natural operation of +a matrix group on a set of vectors including the standard base (a +``linear operation homomorphisms''), then a preimage of a permutation +(which is a matrix) is built directly from the images of the basis +vectors. To find these images, the permutation must be applied only to +the points representing the basis vectors, and if the resulting matrix is +not contained in `Source( )', there is no preimage at all. + % * * * \stars diff --git a/doc/ref/grplib.tex b/doc/ref/grplib.tex index a8fe64a5f5..d9bebc347e 100644 --- a/doc/ref/grplib.tex +++ b/doc/ref/grplib.tex @@ -161,17 +161,17 @@ up to isomorphism of permutation groups (i.e., up to conjugacy in the corresponding symmetric group) \beginlist + \item{$\bullet$} the non-affine primitive permutation groups of degree + $\<1000$, described in \cite{DixonMortimer88}, with generators + calculated in \cite{Theissen97}, \item{$\bullet$} all primitive permutation groups of degree $\<256$, - namely + in particular, \itemitem{$\circ$} the primitive permutation groups up to degree~50, calculated by C.~Sims, \itemitem{$\circ$} the solvable (hence affine) primitive permutation groups of degree $\<256$, calculated by M.~Short \cite{Short92}, \itemitem{$\circ$} the insolvable affine primitive permutation groups - of degree $\<256$, calculated in \cite{Theissen97}, - \item{$\bullet$} the non-affine primitive permutation groups of degree - $\<1000$, described in \cite{DixonMortimer88}, with generators - calculated in \cite{Theissen97}. + of degree $\<256$, calculated in \cite{Theissen97}. \endlist Note that the affine primitive permutation groups of degrees 256--999 are not included. diff --git a/doc/ref/install.tex b/doc/ref/install.tex new file mode 100644 index 0000000000..da8c8f80aa --- /dev/null +++ b/doc/ref/install.tex @@ -0,0 +1,322 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% +%W install.tex GAP documentation Frank Celler +%W & Martin Schoenert +%% +%H @(#)$Id$ +%% +%Y Copyright 1997, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany +%% +%% This file contains the description of the installation procedure and +%% command line options for various operating systems. +%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Chapter{Installing GAP} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{Features of GAP for UNIX} + +When you start {\GAP} for UNIX, you may specify a number of options on +the command-line to change the default behaviour of {\GAP}. All these +options start with a hyphen `-', followed by a single letter. Options +must not be grouped, e.g., `gap -gq' is illegal, use `gap -g -q' +instead. Some options require an argument, this must follow the option +and must be separated by a , e.g., `gap -m 256k', it is not +correct to say `gap -m256k' instead. + +{\GAP} for UNIX will only accept lower case options. + +As is described in the previous section (see "Installation of GAP for +UNIX") usually you will not execute {\GAP} directly. Instead you will +call a shell script, with the name `gap', which in turn executes {\GAP}. +This shell script sets some options as necessary to make {\GAP} work on +your system. This means that the default settings mentioned below may +not be what you experience when you execute {\GAP} on your system. + +`-h' + +The options `-h' tells {\GAP} to print a summary of all available +options. {\GAP} exits after printing the summary, all other options are +ignored. + +`-b' + +The option `-b' tells {\GAP} to suppress the banner. That means that +{\GAP} immediately prints the prompt. This is useful when you get tired +of the banner after a while. + +`-q' + +The option `-q' tells {\GAP} to be quiet. This means that {\GAP} does +not display the banner nor the prompt `gap>'. This is useful if you want +to run {\GAP} as a filter with input and output redirection and want to +avoid the banner and the prompts clobbering the output file. + +`-e' + +The option `-e' tells {\GAP} not to quit when receiving a `-D' on an +empty input line. This option should not be used when the input is a +file or pipe. + +`-f' + +The option `-f' tells {\GAP} to enable the line editing and history (see +"Line Editing"). + +In general line editing will be enabled if the input is connected to a +terminal. There are rare circumstances, for example when using a remote +session with a broken telnet implementation, when this detection fails. +Try to use `-f' in this case to enable line editing. + +`-n' + +The option `-n' tells {\GAP} to disable the line editing and history +(see "Line Editing"). + +You may want to do this if the command line editing is incompatible with +another program that is used to run {\GAP}. For example if {\GAP} is run +from inside a GNU Emacs shell window, `-n' should be used since otherwise +every input line will be echoed twice, once by Emacs and once by {\GAP}. + +`-x ' + +With this option you can tell {\GAP} how long lines are. {\GAP} uses +this value to decide when to split long lines. + +The default value is 80, which is the right value if you have a standard +ASCII terminal. If you have a larger monitor, or use a smaller font, or +redirect the output to a printer, you may want to increase this value. + +`-y ' + +With this option you can tell {\GAP} how many lines your screen has. +{\GAP} uses this value to decide after how many lines of on-line help it +should wait. + +The default value is 24, which is the right value if you have a standard +ASCII terminal. If you have a larger monitor, or use a smaller font, or +redirect the output to a printer, you may want to increase this value. + +`-g' + +The option `-g' tells {\GAP} to print a information message every time a +full garbage collection is performed. + +\begintt + #G FULL 44580/2479kb live 57304/4392kb dead 734/4096kb free +\endtt + +For example, this tells you that there are 44580 live objects that +survived a full garbage collection, that 57304 unused objects were +reclaimed by it, and that 734 KByte of totally allocated 4096 KBytes are +available afterwards. + +`-g -g' + +If you give the option `-g' twice {\GAP} prints a information message +every time a partial or full garbage collection is performed. + +\begintt + #G PART 9405/961kb+live 7525/1324kb+dead 2541/4096kb free +\endtt + +For example, this tells you that 9405 objects survived the partial +garbage collection and 7525 objects were reclaimed, and that 2541 KByte +of totally allocated 4096 KByte are available afterwards. + +`-m ' + +The option `-m' tells {\GAP} to allocate bytes at startup time. +If the last character of is `k' or `K' it is taken in KBytes and +if the last character is `m' or `M' is taken in MBytes. + +Under UNIX the default amount of memory allocated by {\GAP} is 8 MByte. +The amount of memory should be large enough so that computations do not +require too many garbage collections. On the other hand if {\GAP} +allocates more virtual memory than is physically available it will spend +most of the time paging. + +`-o ' + +The option `-o' tells {\GAP} to allocate at most bytes. If the +last character of is `k' or `K' it is taken in KBytes and if the +last character is `m' or `M' is taken in MBytes. + +Under UNIX the default amount is 64 MByte. If more than this amount is +required {\GAP} prints an error messages and quits. + +`-l ' + +The option `-l' tells {\GAP} that the {\GAP} root directory "GAP Root +Directory" is . Per default is './', i.e., the root +directory is normally expected to be the current directory. {\GAP} +searches for the library files which contain the functions initially +known to {\GAP}, in the subdirectory `lib/' of the root directory. + should end with a pathname separator, i.e., '/', but {\GAP} +will silently add one if it is missing. {\GAP} will read the file +'/lib/init.g' during startup. If {\GAP} cannot find this file +it will print the following warning + +\begintt + gap: hmm, I cannot find 'lib/init.g' maybe use option '-l '? +\endtt + +It is not possible to use {\GAP} without the library files, so you must +not ignore this warning. You should leave {\GAP} and start it again, +specifying the correct root path using the '-l' option. + +It is also possible to specify several alternative library paths by +separating them with semicolons ';'. This is explained in detail in +"GAP Root Directory". + +`-r' + +The option `-r' tells {\GAP} not to read the user supplied `~/.gaprc' +files. + +` ...' + +Further arguments are taken as filenames of files that are read by {\GAP} +during startup, after the system and private init files are read, but +before the first prompt is printed. The files are read in the order in +that they appear on the command line. {\GAP} only accepts 14 filenames +on the command line. If a file cannot be opened {\GAP} will print an +error message and will abort. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{Advanced Features of GAP} + +The following options are in general not needed for the normal operation +of {\GAP}. They are mostly used for debugging. + +`-a ' + +GASMAN, the storage manager of {\GAP} uses `sbrk' to get blocks of memory +from (certain) operating systems and it is required that subsequent calls +to `sbrk' produce adjacent blocks of memory in this case because {\GAP} +only wants to deal with one large block of memory. If the C function +`malloc' is called for whatever reason it is likely that `sbrk' no longer +produces adjacent blocks, therefore GAP does not use `malloc' itself. + +However some operation systems insist on calling `malloc' when a file is +open to fill a buffer. In order to catch these cases GAP preallocates a +block of memory with `malloc' which is immediately freed. The amount of +prealloc can be controlled with the `-a' option. If the last character +of is `k' or `K' it is taken in KBytes and if the last character +is `m' or `M' is taken in MBytes. + +`-D' + +The `-D' options tells {\GAP} to print short messages when it is reading +or completing files or loading modules. + +\begintt + |#I READ_GAP_ROOT: loading 'lib/kernel.g' as GAP file +\endtt + +Tells you that {\GAP} has started to read the library file +``lib/kernel.g''. + +\begintt + |#I READ_GAP_ROOT: loading 'lib/kernel.g' statically +\endtt + +Tells you that {\GAP} has used the compiled version of the library file +``lib/kernel.g''. This compiled module was statically linked to the +{\GAP} kernel at the time the kernel was created. + +\begintt + |#I READ_GAP_ROOT: loading 'lib/kernel.g' dynamically +\endtt + +Tells you that {\GAP} has loaded the compiled version of the library file +``lib/kernel.g''. This compiled module was dynamically loaded to the +{\GAP} kernel at runtime from a corresponding `.so' file. + +\begintt + |#I completing 'lib/domain.gd' +\endtt + +Tells you that {\GAP} has completed the file ``lib/domain.gd''. See +"Completion Files" for more information about completion of files. + +`-M' + +The `-M' option tells {\GAP} not to check for nor to use compiled +versions of library files. + +`-N' + +The `-N' option tells {\GAP} not to check for nor to use completion +files, see "Completion Files". + +`-X' + +The `-X' option tells {\GAP} to make a consistency check of the library +file and the corresponding completion file when reading the completion +file. + +`-Y' + +The `-X' option tells {\GAP} to make a consistency check of the library +file and the corresponding completion file when completing the library +file. + +`-i ' + +The `-i' changes the name of the init file from the default ``init.g'' to +. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{Completion Files} + +The standard distribution of {\GAP} already contains completion files so +in general *you do not need to create these files by yourself*. + +When starting, {\GAP} reads in the whole library. As this takes some +time library files are normally condensed into completion files. These +completion files contain the basic skeleton of the library but not the +function bodies. When a function body is required, for example because +you want to execute the corresponding function, the library file +containing the function body is completed. + +Completion files reduce the startup time of {\GAP} drastically. However, +it also means that the information stored in the completion files and the +library must be consistent. If you changes a library file without +recreating the completion files disaster is bound to happen. + +Bugfixes distributed for {\GAP} will also update the completion files, +therefore you only need to update them if you changed the library by +yourself. + +However, if you are modifying a library file a more convenient way is to +use the `-X' option that allows you (in most cases) to use the completion +files for the unchanged parts of library files and avoids using the +completion files for the changed parts. After you are finished modifying +the library files you can recreate the completion files using: + +\>CreateCompletionFiles() +\)CreateCompletionFiles( ) + +To create completion files you must have write permissions to `', +which defaults to the first root directory. Start {\GAP} with the `-N' +option (to suppress the reading of any existing completion files), then +execute the command `CreateCompletionFiles( );', where is a +string giving a path to the home directory of {\GAP} (the directory +containing the `lib' directory). + +This produces, among lots of informational output, the completion files. + +\begintt + $ gap4 -N + gap> CreateCompletionFiles(); + |#I converting "gap4/lib/read2.g" to "gap4/lib/read2.co" + |#I parsing "gap4/lib/process.gd" + |#I parsing "gap4/lib/listcoef.gi" + ... +\endtt + + + diff --git a/doc/ref/lists.tex b/doc/ref/lists.tex index 180b2c6fcf..0475af0743 100644 --- a/doc/ref/lists.tex +++ b/doc/ref/lists.tex @@ -8,9 +8,6 @@ special kind of lists, namely as lists without holes or duplicates, and whose entries are ordered with respect to the precedence relation~`\<'. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\Section{Lists and list objects}\null - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \Section{Basic list operations} @@ -27,14 +24,22 @@ basic operations that must be implemented for any list. They allow access to the entries of a list, but they do not allow changes to the list. -If you want to install your own methods for the operation `IsBound( -[ ] )', you have to specify this operation as a {\GAP} -object, i.e., you want to know a name for it: It is assigned to the -variable `IsBound\\[\\]', which you can, e.g., pass to `InstallMethod'. -In other words, `IsBound\\[\\]( , )' is the function call -equivalent to the (more elegant) syntactic expression `IsBound( [ - ] )'. Similarly, the operation for `[ ]' is called -`\\[\\]'. +A list in {\GAP} is any object that allows these basic operations, no +matter how it is internally represented. It is not necessary to have all +the list entries present in memory simultaneously, they can for example +be constructed one at a time, if they are enumerated one by one and after +use thrown away again. Such lists which do not store their entries +explicitly, but which know how to construct the th entry for every +value of will be called *enumerators*, see "AsList and Enumerators" +below. + +Although a call of the `IsBound' operation is written `IsBound( [ + ] )', this is merely a syntactic equivalent to the more customary +two-argument function call `IsBound\\[\\]( , )' (like ` + +' is equivalent to `SUM( , )'). The identifier `IsBound\\[\\]' +must, e.g., be used when methods are installed for that operation. +Similarly, the operation called by the syntactic construct `[ +]' is~`\\[\\]'. \>` in '{membership test}!{for lists} \>Position( , \[, \] ) @@ -49,9 +54,9 @@ without holes, this makes a list as long as whose th entry is `[ [ ] ]'. -These functions are automatically manufactured from the basic list -operations above. The operation `\{ \}' is called -`\\\{\\\}'. +These functions are automatically manufactured from the basic list +operations above. The operation called by the syntactic construct +`\{ \}' is~`\\\{\\\}'. \>Unbind( [ ] ) \>`[ ] := '{list element!assignment} @@ -66,25 +71,25 @@ operation and type the left hand side of the assignment afterwards, you will get the right hand side as result. -These operations are called `Unbind\\[\\]', `\\[\\]\\:\\=' -resp.~`\\\{\\\}\\:\\='. +The corresponding operations are called `Unbind\\[\\]', `\\[\\]\\:\\=' +and~`\\\{\\\}\\:\\='. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \Section{AsList and Enumerators}\null \>AsList( ) -`AsList( )' constructs a {\GAP} object that represents a domain as if -it were an immutable list of its elements. Note that we say ``a list'', -not ``the list'' because there are many ways of ordering the elements -and, indeed, {\GAP} does not guarantee anything about the ordering it -chooses. If you say `$list_1$ := AsList( $D_1$ );' and `$list_2$ := -AsList( $D_2$ );' then even if `$D_1$ = $D_2$', the orderings of $list_1$ -and $list_2$ may be different, and consequently you may have `$list_1$ -\<> $list_2$'. After all, $D_1$ may be represented differently than $D_2$ -and the `AsList' may be constructed depending on the representation. -(Even if you say `$list_3$ := AsList( $D_1$ );' again later, you may have -`$list_3$ \<> $list_1$'.) +`AsList( )' constructs a {\GAP} object that represents a mathematical +set as if it were an immutable list of its elements. Note that we say ``a +list'', not ``the list'' because there are many ways of ordering the +elements and, indeed, {\GAP} does not guarantee anything about the +ordering it chooses. If you say `$list_1$ := AsList( $D_1$ );' and +`$list_2$ := AsList( $D_2$ );' then even if `$D_1$ = $D_2$', the +orderings of $list_1$ and $list_2$ may be different, and consequently you +may have `$list_1$ \<> $list_2$'. After all, $D_1$ may be represented +differently than $D_2$ and the `AsList' may be constructed depending on +the representation. (Even if you say `$list_3$ := AsList( $D_1$ );' again +later, you may have `$list_3$ \<> $list_1$'.) Objects constructed by `AsList' behave like immutable lists, so you cannot modify them, neither by assigning to elements or sublists, nor by @@ -104,65 +109,303 @@ \>Enumerator( ) -An *enumerator* is a {\GAP} object that represents a collection as if it -were an immutable list of its elements; just like an object constructed -by `AsList'. The remarks made at the beginning of that section also apply -to enumerators, and the only difference is that enumerators are space -efficient rather than time efficient. Again you can use the list -operations like `[ ]' and `Position', but you cannot assign -to single positions or to sublists of enumerators, nor can you `Unbind' -elements. +An *enumerator* is a {\GAP} object that represents a mathematical set as +if it were an immutable list of its elements; just like an object +constructed by `AsList'. The remarks made at the beginning of that +section also apply to enumerators, and the only difference is that +enumerators are space efficient rather than time efficient. Again you can +use the list operations like `[ ]' and `Position', but you +cannot assign to single positions or to sublists of enumerators, nor can +you `Unbind' elements. \>PositionCanonical( , ) -`PositionCanonical( , )' works basically like `Position( -, )', but there can be a difference in the behaviour when - is not a plain list but a specially-constructed enumerator. Such -enumerators are often used to enumerate domains whose elements are -mathematically defined as equivalence classes of other elements. As an -example, take a projective space (see "ProjectiveSpace"), whose elements -can be defined as equivalence classes of vectors under scalar -transformations. The following {\GAP} commands construct the -three-dimensional projective space over the field with three elements. -\begintt - gap> vec := GF(3)^4;; pro := ProjectiveSpace( vec ); - ProjectiveSpace( ( GF(3)^4 ) ) - gap> enum := Enumerator( vec ); - -\endtt -Mathematically the elements of `pro' are equivalence classes of two -non-zero vectors from `vec' each, but {\GAP} represents such a class by a -canonical (i.e. here, left-normed) representative. This is what the -enumerator returns when you ask for `enum[ ]'. -\begintt - gap> enum{[3..4]}; - [ [ 0*Z(3), 0*Z(3), Z(3)^0, Z(3)^0 ], [ 0*Z(3), 0*Z(3), Z(3)^0, Z(3) ] ] -\endtt -On the other hand, if you want to specify an element of `pro', i.e., an -equivalence class, you can give either of its elements; and if you ask -for the `PositionCanonical' in the enumerator `enum', {\GAP} will -silently replace the element by the canonical representative. This does, -however, no longer work, if you ask for the `Position' because in this -case {\GAP} replaces `pro' by the plain list of its elements and does -then no longer know that these elements form a projective space. -\begintt +\indextt{OneDimSubspacesTransversal}% +`PositionCanonical( , )' works basically like `Position( +, )', but there can be a difference in the behaviour when + is not a plain list but a specially-constructed enumerator. Such +enumerators are often used to enumerate sets whose elements are +mathematically defined as equivalence classes of other elements. As an +example, take the function `OneDimSubspacesTransversal'. It returns an +enumerator whose elements form a *system of representatives* for the +one-dimensional subspaces in a vector space or, in other words, for a +projective space. The following example constructs this enumerator in the +case of the three-dimensional space over the field with three elements. +\beginexample + gap> enum := OneDimSubspacesTransversal( GF(3)^3 ); + P( 3^3 ) +\endexample +Each of the representatives in `enum' represents two non-zero vectors +from `GF(3)^3', and it is always a canonical (i.e. here, left-normed) +representative. This is what the enumerator returns when you ask for +`enum[ ]'. +\beginexample + gap> enum[3]; enum[4]; + [ 0*Z(3), 0*Z(3), Z(3)^0, Z(3)^0 ] + [ 0*Z(3), 0*Z(3), Z(3)^0, Z(3) ] +\endexample +On the other hand, if you want to specify a one-dimensional subspace, +i.e., an equivalence class of two vectors, you can give either of its +elements; and if you ask for the `PositionCanonical' in the enumerator +`enum', {\GAP} will silently replace the element by the canonical +representative. This does, however, no longer work, if you ask for the +`Position' because in this case {\GAP} replaces `pro' by the plain list +of its elements and does then no longer know that these elements form a +system of representatives. +\beginexample gap> v := [2,1,1,1]*Z(3)^0;; PositionCanonical( enum, v ); 40 gap> enum[40]; [ Z(3)^0, Z(3), Z(3), Z(3) ] gap> Position( enum, v ); fail -\endtt -This manual always mentions explicitly when such a silent conversion is -done by an enumerator. +\endexample + +To summarize: The enumerator in the above example is a list of +representatives for the equivalence classes, and these representatives +are --- mathematically viewed --- not the elements of the projective +space. Such enumerators are convenient because they avoid the +introduction of new types of elements (here: the introduction of +projective points or one-dimensional subspaces). There are, however, two +caveats about them: +\beginlist + \item{$\bullet$} They cannot be obtained as `Enumerator( )' + where is a projective space in the proper mathematical + sense. In general, they are never enumerators of domains (see + chapter~"Domains and Collections"). + \item{$\bullet$} The function `Position( enum, )' cannot be used + to find the position of the mathematical element represented by + . The function `PositionCanonical' does that. +\endlist +Suppose you have a {\GAP} object which is either a proper +mathematical set or merely a set of representatives for the elements in a +proper mathematical set. Now if you want to enumerate that mathematical +set, you can in both cases use ` := Enumerator( )' in +conjunction with `PositionCanonical( , )', where stands +a {\GAP} object of the same type as produces. Reason: If is +equal to `AsList( )', then `PositionCanonical' simply behaves like +`Position'. And if is merely a list of representatives, you will have +` = ' and `PositionCanonical' will really give the position of +the mathematical element represented by . (An example of this usage +is given by the operation functions, see "External sets".) For every +enumerator, this manual mentions explicitly if it allows such a use of +representatives. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{Sets} + +A list may have holes or contain elements more than once. Also, the +elements of a list are in general not sorted, i.e., ` \< ' +(for two natural numbers) does in general not imply `[] \< +[]'. The two list entries need not even be comparable at all, +because the `\<' relation is defined only between elements belonging to +the same family (see~"Families"). + +Mathematically, the only defining property of a *set* is that membership +in it can be decided for every element. In {\GAP}, a set is a special +kind of list, and since the ordering plays not role for a set, {\GAP} can +impose restrictions on the ordering of the list representing the set. A +list representing a set must not have holes nor contain elements twice. +Additionally, {\GAP} requires the elements to be sorted w.r.t.\ the +relation `\<', which implies that they must all belong to the same +family. + +\index{lists!properties of}\index{multisets}% +\indextt{IsDenseList}\indextt{IsHomogeneousList}% +\indextt{IsDuplicateFreeList}\indextt{IsSSortedList}% +A non-empty *dense* list (i.e., one without holes) all of whose elements +belong to the same family is called *homogeneous*. Hence a set is either +empty or a strictly sorted collection (where the adverb ``strictly'' +implies that there are no duplicates). If we drop the condition of +duplicate-freeness but keep the requirement that the list be sorted (in +the sense that ` \< $\Rightarrow$ [] \<= []'), +we arrive at *multisets*, which are empty or homogeneous sorted lists. +All the list properties mentioned here can be tested with the {\GAP} +functions `IsDenseList', `IsHomogeneousList', `IsDuplicateFreeList', +`IsSSortedList'. + +\>Set( ) + +`Set' returns a new proper set, which is represented as a sorted list +without holes or duplicates, containing the elements of the list . + +`Set' returns a new list even if the list is already a proper set, +in this case it is equivalent to `ShallowCopy' (see "ShallowCopy"). +Thus the result is a new list that is not identical to any other list. +The elements of the result are however identical to elements of . +If contains equal elements, it is not specified to which of those +the element of the result is identical (see "Identical Lists"). + +\>AddSet( , ) +\>RemoveSet( , ) + +`AddSet' adds , which may be an elment of an arbitrary type, to the +set , which must be a proper set, otherwise an error will be +signalled. If is already an element of the set , the set is +not changed. Otherwise is inserted at the correct position such +that is again a set afterwards. + +`RemoveSet' removes the element , which may be an object of +arbitrary type, from the set , which must be a set, otherwise an +error will be signalled. If is not an element of nothing +happens. If is an element it is removed and all the following +elements in the list are moved one position forward. + +\>IntersectSet( , ) + +`IntersectSet' intersects the set with the set . This is +equivalent to removing all the elements that are not in from + (see "RemoveSet"). must be a set, otherwise an error is +signalled. may be a list that is not a proper set, in which case +`IntersectSet' silently applies `Set' to it first (see "Set"). +`IntersectSet' returns nothing, it is only called to change . + +The function `IntersectionSet' (see "Set functions!for sets") is the +nondestructive counterpart to the destructive procedure `IntersectSet'. + +\>UniteSet( , ) + +`UniteSet' unites the set with the set . This is equivalent +to adding all the elements in to (see "AddSet"). +must be a proper set, otherwise an error is signalled. may also +be list that is not a proper set, in which case `UniteSet' silently +applies `Set' to it first (see "Set"). 'UniteSet' returns nothing, it is +only called to change . + +The function `UnionSet' (see "Set functions!for sets") is the +nondestructive counterpart to the destructive procedure `UniteSet'. + +\>SubtractSet( , ) + +`SubtractSet' subtracts the set from the set . This is +equivalent to removing all the elements in from (see +"RemoveSet"). must be a proper set, otherwise an error is +signalled. may be a list that is not a proper set, in which case +`SubtractSet' applies `Set' to it first (see "Set"). `SubtractSet' +returns nothing, it is only called to change . + +The function `Difference' (see "Difference!for domains") is the +nondestructive counterpart to destructive the procedure `SubtractSet'. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{Set functions!for sets} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Set functions are applicable not only to sets, but more generally to +collections, where a collection is either a set of a domain with an +algebraic structure. In this section we mention only the methods for +plain sets, the methods for domains, such as groups, will be described in +section "Set functions!for domains". + +\>IsSubset( , ) + +This is implemented by `IsSubsetSet', which you can call directly to save +a little bit of time. Either argument to `IsSubsetSet' may also be a +list that is not a proper set, in which case `IsSubset' silently applies +`Set' (see "Set") to it first. + +\>Union( , ) + +This is implemented by `UnionSet', which you can call directly to save a +little bit of time. Note that `UnionSet' only accepts two sets, unlike +`Union', which accepts several sets or a list of sets. The result of +`UnionSet' is a new set, represented as a sorted list without holes or +duplicates. Each argument to `UnionSet' may also be a list that is not a +proper set, in which case `UnionSet' silently applies `Set' (see "Set") +to this argument. `UnionSet' is implemented in terms of its destructive +counterpart `UniteSet' (see "UniteSet"). + +\>Intersection( , ) + +This is implemented by `IntersectionSet', which you can call directly to +save a little bit of time. Note that `IntersectionSet' only accepts two +sets, unlike `Intersection', which accepts several sets or a list of +sets. The result of `IntersectionSet' is a new set, represented as a +sorted list without holes or duplicates. Each argument to +`IntersectionSet' may also be a list that is not a proper set, in which +case `IntersectionSet' silently applies `Set' (see "Set") to this +argument. `IntersectionSet' is implemented in terms of its destructive +counterpart `IntersectSet' (see "IntersectSet"). + +The result of `IntersectionSet' and `UnionSet' is always a new list, that +is not identical to any other list. The elements of that list however +are identical to the corresponding elements of . If is not +a proper list it is not specified to which of a number of equal elements +in the element in the result is identical (see "Identical Lists"). + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{Knowledge of the set property}\null + +In the previous section we defined a proper set as a sorted list without +holes or duplicates. This representation is not only nice to use, it is +also a good internal representation supporting efficient algorithms. For +example the `in' operator can use binary instead of a linear search since +a set is sorted. For another example `Union' only has to merge the sets. + +However, all those set functions also allow lists that are not proper +sets, silently making a copy of it and converting this copy to a set. +Suppose all the functions would have to test their arguments every time, +comparing each element with its successor, to see if they are proper +sets. This would chew up most of the performance advantage again. For +example suppose `in' would have to run over the whole list, to see if it +is a proper set, so it could use the binary search. That would be +ridiculous. + +To avoid this a list that is a proper set may, but need not, have an +internal flag set that tells those functions that this list is indeed a +proper set. Those functions do not have to check this argument then, and +can use the more efficient algorithms. This section tells you when a +proper set obtains this flag, so you can write your functions in such a +way that you make best use of the algorithms. + +The results of `Set', `Difference', `Intersection' and `Union' are known +to be sets by construction, and thus have the flag set upon creation. + +If an argument to `IsSet', `IsEqualSet', `IsSubset', `Set', `Difference', +`Intersection' or `Union' is a proper set, that does not yet have the +flag set, those functions will notice that and set the flag for this set. +Note that `in' will use linear search if the right operand does not have +the flag set, will therefore not detect if it is a proper set and will, +unlike the functions above, never set the flag. + +If you change a proper set, that does have this flag set, by assignment, +`Add' or `Append' the set will generally lose it flag, even if the +change is such that the resulting list is still a proper set. However if +the set has more than 100 elements and the value assigned or added is not +a list and not a record and the resulting list is still a proper set than +it will keep the flag. Note that changing a list that is not a proper +set will never set the flag, even if the resulting list is a proper set. +Such a set will obtain the flag only if it is passed to a set function. + +Suppose you have built a proper set in such a way that it does not have +the flag set, and that you now want to perform lots of membership tests. +Then you should call `IsSet' with that set as an argument. If it is +indeed a proper set `IsSet' will set the flag, and the subsequent `in' +operations will use the more efficient binary search. You can think of +the call to `IsSet' as a hint to {\GAP} that this list is a proper set. + +There is no way you can set the flag for an ordinary list without going +through the checking in `IsSet'. The internal functions depend so much +on the fact that a list with this flag set is indeed sorted and without +holes and duplicates that the risk would be too high to allow setting the +flag without such a check. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{AsListSorted and EnumeratorSorted}\null + +\>AsListSorted( ) +\>EnumeratorSorted( ) + +These functions return sorted versions of what `AsList( )' and +`Enumerator( )' would return. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Local Variables: -% mode: text -% mode: outline-minor -% outline-regexp: "\\\\Chapter\\|\\\\Section" -% fill-column: 73 +% mode: text +% mode: outline-minor +% outline-regexp: "\\\\Chapter\\|\\\\Section\\|\\\\stars" +% paragraph-start: "\\\\begin\\|\\\\end\\|\\$\\$\\|.*%\\|^$" +% paragraph-separate: "\\\\begin\\|\\\\end\\|\\$\\$\\|.*%\\|^$" +% fill-column: 73 % End: -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/doc/ref/manual.tex b/doc/ref/manual.tex index f1feb1044b..626e67c436 100644 --- a/doc/ref/manual.tex +++ b/doc/ref/manual.tex @@ -55,6 +55,7 @@ %F FrontMatter . . . . . . . . . . . . . . . . . . . . . GAP 4 Tutorial %% \FrontMatter +\immediate\write\citeout{\bs bibdata{mrabbrev,algebra,manual}} \input ../tut/copyrigh % % @@ -63,17 +64,18 @@ %F Chapters . . . . . . . . . . . . . . . . . . . . . . GAP 4 Tutorial %% \Chapters -%\Input{lists} -%\Input{domain} -%\Input{group} -%\Input{solvgrp} -%\Input{permgrp} -%\Input{grplib} \Input{files} \Input{streams} \Input{process} \Input{debug} \Input{speedup} +\Input{lists} +\Input{domain} +\Input{group} +\Input{solvgrp} +\Input{permgrp} +\Input{grplib} +\Input{install} % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -81,8 +83,8 @@ %F Appendices . . . . . . . . . . . . Extending GAP 4 Reference Manual %% \Appendices -%\input glossary -%\Bibliography +\input glossary +\Bibliography \Index % % diff --git a/doc/ref/permgrp.tex b/doc/ref/permgrp.tex index cda05b4ac6..5487c58b1d 100644 --- a/doc/ref/permgrp.tex +++ b/doc/ref/permgrp.tex @@ -246,12 +246,13 @@ taking $b_i$ to $p\in O_i$. Then the order of is the product of the indices $[G^{(i)}:G^{(i+1)}]$, i.e., the product of the transversal lengths $|R_i|$. If is a permutation mapping $b_i$ to $c_i$, then -$$\centerline{\vbox{\halign{\hfil$#$& $\iff #$\hfil & \quad #\hfil \cr +$$ + \vbox{\halign{\hfil$#$& $\iff #$\hfil & \quad #\hfil \cr g\in G & gr_1^{-1}\in G^{(2)} & (with $r_1=R_1[c_1]$) \cr & gr_1^{-1}r_2^{-1}\in G^{(3)} & (with $r_2=R_1[c_2r_1^{-1}]$) \cr \ldots & gr_1^{-1}\ldots r_n^{-1}\in G^{(n+1)}=\{{\rm id}\} & - (with $r_n=R_n[c_nr_1^{-1}\ldots r_{n-1}^{-1}]$).\cr}}}$$ + (with $r_n=R_n[c_nr_1^{-1}\ldots r_{n-1}^{-1}]$).\cr}}$$ This method of dividing by transversal elements is known as _reduction of a permutation along a stabilizer chain_\index{stabilizer chain!reduction of permutation along}, and it gives a membership test for @@ -305,14 +306,15 @@ \>StabChain( \[, \| \] ) -`StabChain( )' performs the same calculations as `Base( )', but +`StabChain( )' performs the same calculations as `Base( )', but returns the whole stabilizer chain, not just the base. If no stabilizer -chain has been entered into the group record of so far, `StabChain' -stores its result in `.stabChain'. See "Stabilizer chain records" for -detailed information on how this component looks like. Note that the base -can be reconstructed from the stabilizer chain by looping over the -Schreier trees and collecting the root points. This is what the function -`Base' does when a stabilizer chain has already been calculated. +chain has been entered into the group record of so far, `StabChain' +stores its result in `.stabChain'. See "ext:Stabilizer chain records" +in the extension manual for detailed information on how this component +looks like. Note that the base can be reconstructed from the stabilizer +chain by looping over the Schreier trees and collecting the root points. +This is what the function `Base' does when a stabilizer chain has already +been calculated. A second argument may be given to `StabChain', it must be a record that may contain the components listed below. If they are absent, @@ -424,8 +426,9 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \Section{Set functions!for permutation groups} -See "Set functions" for general remarks on set functions and also for -other set functions that are not overlaid for permutation groups. +See "Set functions!for domains" for general remarks on set functions and +also for other set functions that are not overlaid for permutation +groups. \>` in '{membership test}!{for permutation groups} \>Elements( )!{for permutation groups} @@ -509,71 +512,11 @@ \>ConjugateGroup( ,

)!{for permutation groups} -This function returns the conjugate of the permutation group under -the permutation

.

must be an element of the parent group of . -If a stabilizer chain for is already known, it is also conjugated. - -\danger Conjugating a stabilizer chain by a permutation

means -replacing all the points which appear in the `orbit' components by their -images under

and replacing every permutation which appears in a -`labels' or `transversal' component by its conjugate $g^p$. The conjugate -$g^p$ acts on the mapped points exactly as did on the original -points, i.e., $(pnt.p). g^p = (pnt.g).p$. Since the entries in the -`translabels' components are integers pointing to positions of the -`labels' list, the `translabels' lists just have to be permuted by

-for the conjugated stabilizer. Then `generators' is reconstructed as -`labels\{ genlabels \}' and `transversal\{ orbit \}' as `labels\{ -translabels\{ orbit \} \}'. - -This conjugation technique can be generalized.\index{generalized -conjugation technique} Instead of mapping points and permutations under -the same permutation

, it is sometimes desirable (e.g., in the context -of permutation group homomorphisms) to map the points with an arbitrary -mapping and the permutations with a homomorphism such that -the compatibility of the actions is still valid: $map(pnt). hom(g) = -map(pnt.g)$. (Of course the ordinary conjugation is a special case of -this, with $map(pnt) = pnt.p$ and $hom(g) = g^p$.) - -In the generalized case, the ``conjugated'' chain need not be a -stabilizer chain for the image of , since the ``preimage'' of the -stabilizer of $map(b)$ (where is a base point) need not fix , but -only fixes the preimage $map^{-1}(map(b))$ setwise. Therefore the method -can be applied only to one level and the next stabilizer must be computed -explicitly. But if is injective, we have $map(b).hom(g)=map(b) \iff -b.g=b$, and if this holds, then $g=w(g_1,\ldots,g_n)$ is a word in the -generators $g_1,\ldots,g_n$ of the stabilizer of~ and $hom(g) -\buildrel\*\over = w(hom(g_1),\ldots,hom(g_n))$ is in the ``conjugated'' -stabilizer. If, more generally, is a right inverse to a -homomorphism~$\varphi$ (i.e., $\varphi(hom(g))=g\,\forall g$), -equality~$\*$ holds modulo ${\rm Ker}\,\varphi$; in this case the -``conjugated'' chain can be made into a real stabilizer chain by -extending each level with the generators ${\rm Ker}\,\varphi$ and -appending a proper stabilizer chain of~${\rm Ker}\,\varphi$ at the end. -These special cases will occur in the algorithms for permutation group -homomorphisms (see~"Homomorphisms!for permutation groups"). - -To ``conjugate'' the points (i.e., `orbit') and permutations (i.e., -`labels') of the Schreier tree, a loop is set up over the `orbit' list -constructed during the orbit algorithm, and for each vertex with -unique edge $a\labelto l b$ ending at , the label is mapped with - and with . We assume that the `orbit' list was built -w.r.t.~a certain ordering of the labels, where $l'\. -This shape of the `orbit' list is guaranteed if the Schreier tree is -extended only by `AddGeneratorsExtendSchreierTree', and it is then also -guaranteed for the ``conjugated'' Schreier tree. (The ordering of the -labels cannot be read from the Schreier tree, however.) - -In the generalized case, it can happen that the edge $a\labelto l b$ -bears a label whose image is ``old'', i.e., equal to the image of an -earlier label $l'\ to the identity. +This function returns the conjugate of the permutation group under +the permutation

.

must be an element of the parent group of . +If a stabilizer chain for is already known, it is also conjugated. +The method for this and some generalizations are explained in +"ext:Generalized conjugation technique" in the extension manual. \>Centralizer( , \| )!{for permutation groups} \>Normalizer( , )!{for permutation groups} @@ -584,14 +527,14 @@ "SubgroupProperty". Below the refinements used in each particular case are described. -\medskip\noindent +\medskip *Centralizer:* $\Pi \mapsto \Pi \wedge \Pi u$. Here, $\wedge$ denotes a ``meet'' of partitions which obeys $(\Psi \wedge \Psi')h = \Psi h \wedge \Psi'h$ for arbitrary partitions $\Psi,\Psi'$ and for any permutation . If is a subgroup, this refinement is used for each generator of~. -\medskip\noindent +\medskip *Normalizer:* First, every $g\in N_G(U)$ must permute the -orbits of equal length among themselves (and if is in a multiple-point stabilizer $U^{(i)}$, also the $U^{(i)}$-orbits). Furthermore, if the @@ -620,7 +563,7 @@ then the refinements for the regular socle are also employed in the calculation of the normalizer of~. -% \medskip\noindent +% \medskip % *Two-closure:* By definition, an element of the full symmetric group lies % in the two-closure of if it preserves all the orbital graphs $(a,b)G$ % of~, and the refinements derived from this condition for the @@ -631,7 +574,7 @@ % is shown in~\cite{LPS88} that an element belongs to the two-closure % of~ if and only if it normalizes~ and preserves all orbital graphs. -\medskip\noindent +\medskip *Intersection:* If $\Delta_i$ is the partition into $H_{a_1,\ldots,a_{i-1}}$-orbits, then the refinement used to construct $\Pi_i$ resp.~$\Sigma_i$ is $\Pi\mapsto \Pi\wedge \Delta_i$ @@ -660,6 +603,30 @@ computed and returned. Note that the centralizer operates imprimitively on the cycles of , and hence must be a proper subgroup of . +\>ConjugacyClasses( )!{for permutation groups} +\>RationalClasses( )!{for permutation groups} + +The default method for computing conjugacy classes in a permutation group +is to compute the rational classes and decompose them as shows in the +example in "Rational classes!for groups". But this method is replaced by +more elementary methods in the following cases: +\beginlist + \item{$\bullet$} if has order at most 1000 or `HasAsList( )', + an orbit algorithm is performed on the element list, + \item{$\bullet$} if is simple, classes are found by random + searching and conjugacy tests, + \item{$\bullet$} if is solvable (this is tested), the solvable + method from "ConjugacyClasses!for solvable groups" is used. +\endlist +The determination of the rational classes follows the method described +in~\cite{Butler94}: The rational classes of the Sylow subgroups are +determined by the special method for $p$-groups (see "RationalClasses!for +p-groups"), they are then fused in the full group. The rational classes +of elements of non prime power order are found as homomorphic images in +the centralizers of the $p$-class representatives (among whose roots +representatives of all classes can be found). If is a $p$-group +itself, only the first step of this computation is needed. + \>Socle( )!{for primitive permutation groups} \>Earns( , \[, OnPoints \] )!{for permutation groups} @@ -674,6 +641,19 @@ on~ or not of affine type, whereas `Socle' signals an error for non-primitive~. +\>Omega( ,

\[, \] )!{for abelian permutation p-groups} + +If is an abelian

-group in normal form $G=C_{p^n_1} \times \ldots +\times C_{p^n_r}$ where the direct factor $C_{p^n_i}$ is generated by +$\zeta_i\in G$, then `Omega( ,

, ) = $\langle +\zeta_1^{p^{n_1-n}}\rangle \times \ldots \times +\langle\zeta_r^{p^{n_r-n}}\rangle$', where negative powers of $p$ must be +replaced by~1 (e.g., if $\zeta$ has order~

, then `Omega( +$\langle\zeta\rangle$,

, 2 )' would be $\langle\zeta^{1/{

}}\rangle +:= \langle\zeta\rangle$, i.e., the whole group). The generators~$\zeta_i$ +are determined by the function `IndependentGeneratorsOfAbelianGroup', +which has an efficient method for permutation groups. + \>RightTransversal( , )!{for permutation groups} \danger Suppose we want to enumerate the (right) cosets in a permutation @@ -768,19 +748,6 @@ bound on the nilpotency class mentioned in the description of `LowerCentralSeries' for nilpotent permutation groups). -\>IndependentGeneratorsAbelianPermGroup( ) - -This is for you to explain, Martin. - -\>Omega( ,

, )!{for permutation groups} - -If is an abelian

-group in normal form $G=Z_{p^n_1} \times \ldots -\times Z_{p^n_r}$ where the direct factor $Z_{p^n_i}$ is generated by -$\zeta_i\in G$, then $\Omega_n(G) = \langle \zeta_1^{p^{n_1-n}}\rangle -\times \ldots \times \langle\zeta_r^{p^{n_r-n}}\rangle$. The -generators~$\zeta_i$ are determined by the function -`IndependentGeneratorsAbelianPermGroup'. - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \Section{Group functions!for solvable permutation groups} @@ -913,12 +880,12 @@ orbits $b_jG_i^{(j)}g_i^k$ for $k=0,\ldots, p-1$ with

the relative order of~$g_i$. -(3) The `labels' components (as explained in "Stabilizer chain records") -are identical on every level of the stabilizer chain and this common -`labels' list (except for the first entry, which is the identity) is -equal to the list . In fact, the calculation of the generating -sequence is a side-effect of the stabilizer chain extensions performed -according to rules (1) and~(2). +(3) The `labels' components (as explained in "ext:Stabilizer chain +records" in the extension manual) are identical on every level of the +stabilizer chain and this common `labels' list (except for the first +entry, which is the identity) is equal to the list . In fact, the +calculation of the generating sequence is a side-effect of the stabilizer +chain extensions performed according to rules (1) and~(2). \>ExponentsOfPcElement( , )!{for solvable permutation groups} \>DepthOfPcElement( , )!{for solvable permutation groups} @@ -1099,25 +1066,26 @@ \>CoKernel( )% !{for `GroupGeneralMappingByImages'!for permutation groups} -The cokernel of is determined by the method described in -"CoKernel!for `GroupGeneralMappingByImages'", where we take the set of +The cokernel of is determined by the method described in +"CoKernel!for `GroupGeneralMappingByImages'", where we take the set of all Schreier generators as a defining set of relations for the source of -. More precisely, for each level of the stabilizer chain of +. More precisely, for each level of the stabilizer chain of , for each `$p\in S$.orbit' and for each `$g\in S$.generators', we -form the Schreier generator ` := InverseRepresentative( ,

) ^ --1 \* \* InverseRepresentative( ,

^ )'. This is a word in -the labels of (and so in ) which lies in `.stabilizer' (see -"Stabilizer chain records"), and we consider as relator the quotient ` -/ $w(gens)$' where $w(gens)$ is the factorization of by reduction -along the stabilizer chain `.stabilizer' as described in "Stabilizer -chains". The Reidemeister-Schreier rewriting method shows that this gives -indeed a set of defining relations. Each relator is a word $w_j$ in - which yields the identity in the source of , because it is a -relator in the free group. The normal closure in the range of of -the set $\{w_j(imgs)\}$ of the values of these words with the images -substituted is then the subgroup of images of the identity element of the -source. In particular, a total is a mapping if and only if -$w_j(imgs)$ is the identity for all~. +form the Schreier generator ` := InverseRepresentative( ,

) ^ +-1 \* \* InverseRepresentative( ,

^ )'. This is a word in +the labels of (and so in ) which lies in `.stabilizer' (see +"ext:Stabilizer chain records" in the extension manual), and we consider +as relator the quotient ` / $w(gens)$' where $w(gens)$ is the +factorization of by reduction along the stabilizer chain +`.stabilizer' as described in "Stabilizer chains". The +Reidemeister-Schreier rewriting method shows that this gives indeed a set +of defining relations. Each relator is a word $w_j$ in which +yields the identity in the source of , because it is a relator in +the free group. The normal closure in the range of of the set +$\{w_j(imgs)\}$ of the values of these words with the images substituted +is then the subgroup of images of the identity element of the source. In +particular, a total is a mapping if and only if $w_j(imgs)$ is the +identity for all~. \>ImagesRepresentative( , )% !{for `GroupGeneralMappingByImages'!for permutation groups} diff --git a/doc/ref/process.tex b/doc/ref/process.tex index 82b129c632..483b8ad8c5 100644 --- a/doc/ref/process.tex +++ b/doc/ref/process.tex @@ -32,8 +32,55 @@ returns the return value of the process (if the operating system supports such a concept). -

must be a directory object (see "Directories") which specifies the -directory in which the process is run. +The first argument is a directory object which will be the current +directory (in the usual UNIX or MSDOS sense) when the program is run. +This will only matter if the program accesses files (including running +other programs) via relative path names. In particular, it has nothing +to do with finding the binary to run. + +In general the directory will either be the current directory, which is +returned by `DirectoryCurrent' (which was the behaviour of GAP 3), or a +temporary returned by `DirectoryTemporary'. If one expects that the +process creates temporary or log files the latter should be used because +{\GAP} will attempt to remove these directories together with all the +files in them when quitting. + +If a program of a share package needs to be launched in a directory +relative to certain data libraries, then the first entry of +`DirectoryPackageLibrary' should be used. The argument of +`DirectoryPackageLibrary' should be the path to the data library relative +to the package directory. + +If a program calls other programs and needs to be launched in a directory +containing the executables for the share package then the first entry of +`DirectoriesPackagePrograms' should be used. + +The latter two alternatives should only be used if absolutely necessary +because otherwise one risks accumulating log or core files in the package +directory. + +Examples + +\beginexample + gap> path := DirectoriesSystemPrograms();; + gap> ls := Filename( path, "ls" );; + gap> stdin := InputTextUser();; + gap> stdout := OutputTextUser();; + gap> Process( path[1], ls, stdin, stdout, ["-c"] );; + awk ls mkdir + + # current directory, here the root directory + gap> Process( DirectoryCurrent(), ls, stdin, stdout, ["-c"] );; + bin lib trans tst CVS grp prim thr two + src dev etc tbl doc pkg small tom + + # create a temporary directory + gap> tmpdir := DirectoryTemporary();; + gap> Process( tmpdir, ls, stdin, stdout, ["-c"] );; + gap> PrintTo( Filename( tmpdir, "emil" ) ); + gap> Process( tmpdir, ls, stdin, stdout, ["-c"] );; + emil +\endexample is the filename of the program to launch, for portability it should be the result of `Filename' (see "Filename") and should pass @@ -88,14 +135,10 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \Section{Exec} -\>Exec( ) -\>Exec( , ) +\>Exec( , , ..., ) -runs a shell in the current directory to execute the command . The -first form runs a Bourne shell while the second command runs the shell -. needs to understand the option <-c> followed by the -command to be executed as a string. Any output of is sent to the -standard output. +runs a shell in the current directory to execute the command with +options ... . \begintt gap> Exec( "date" ) diff --git a/doc/ref/solvgrp.tex b/doc/ref/solvgrp.tex index d41f9b3573..b05bb9fe31 100644 --- a/doc/ref/solvgrp.tex +++ b/doc/ref/solvgrp.tex @@ -23,7 +23,7 @@ These functions ``factorize'' a given element of `.group' into the generators in the list $(g_1,\ldots,g_n)$. `ExponentsOfPcElement' returns a list such that -$$ g = g_1^{e[1]} \cdot g_2^{e[2]} \cdot \ldots \cdot g_n^{e[n]}. $$ +$$ g = g_1^{e[1]}.g_2^{e[2]}.\ldots.g_n^{e[n]}\. $$ The default method performs a division algorithm, i.e., it determines $e[1]$ such that $g_1^{-e[1]}g \in \< g_2, \ldots, g_n >$, by increasing $e[1]$ until the membership test yields true. Then is replaced by @@ -94,21 +94,28 @@ \index{polycyclic generating systems!induced}% Let $G$ be a solvable group with pcgs $(g_1,\ldots,g_n)$ and let $U$ be a -subgroup of $G$. with pcgs $(u_1,\ldots,u_m)$. We then have unique -factorizations $u_i=g_1^{e_{i1}}.\ldots.g_n^{e_{in}}$. Certain -transformations, like $u_i \mapsto u_i.u_{i+1}^{e_{i+1}}. -\ldots.u_m^{e_m}$, which transform the given pcgs of $U$ into another, -correspond to manipulations of the rows of the matrix -$(e_{ij})_{i=1,\ldots,m,\,j=1,\ldots,n}$ which are the elementary -operations of a non-commutative variant of Gauss' elimination algorithm. -We can achieve a pcgs for $U$ where the corresponding matrix has an +subgroup of $G$ with pcgs $(u_1,\ldots,u_m)$. We then have unique +factorizations $u_i=g_1^{e_{i1}}.\ldots.g_n^{e_{in}}$. Certain +transformations, like $u_i \mapsto u_i.u_{i+1}^{e_{i+1}}. +\ldots.u_m^{e_m}$, which transform the given pcgs of $U$ into another, +correspond to manipulations of the rows of the matrix +$(e_{ij})_{i=1,\ldots,m,\,j=1,\ldots,n}$ which are the elementary +operations of a non-commutative variant of Gauss' elimination algorithm. +We can achieve a pcgs for $U$ where the corresponding matrix has an echelon form like +%display{tex} $$ \def\dotfill{\cleaders\hbox{$\mkern1.5mu\.\mkern1.5mu$}\hfill}% \left(\vcenter{\halign{&\hbox to1em{\hfil$#$\hfil}\cr% \*&\*&\multispan4\dotfill&\*\cr & &\*&\*&\*&\omit\dotfill&\*\cr & & & & &\*&\*\cr & & & & & & \cr}}\right) $$ +%display{text} +% / * * ....... * \ +% | * * * . * | +% | * * | +% \ / +%enddisplay (with zeros in the lower left half). Such a pcgs for $U$ is called an *induced pcgs* w.r.t.\ the pcgs of $G$. Working a bit harder, we can also achieve a pcgs for $U$ for which in addition the leftmost entry in every @@ -132,10 +139,15 @@ gap> InducedPcgsByGenerators( pcgs, GeneratorsOfGroup( u ) ); Pcgs([ f1*f2, f2^2 ]) \endexample -Here the corresponding matrix is $({1\atop} {1\atop2} {0\atop0} -{0\atop0})$. The pcgs relative to which an induced pcgs was formed can be -retrived from the induced pcgs as the value of the attribute -`ParentPcgs'. +Here the corresponding matrix is +%display{tex} +$({1\atop} {1\atop2} {0\atop0} {0\atop0})$. +%display{text} +% /1 1 0 0\ +% \ 2 0 0/. +%enddisplay +The pcgs relative to which an induced pcgs was formed can be retrived +from the induced pcgs as the value of the attribute `ParentPcgs'. \>CanonicalPcgsWrtHomePcgs( ) \>HomePcgs( ) @@ -157,8 +169,13 @@ gap> CanonicalPcgsWrtHomePcgs( u ); Pcgs([ f1, f2 ]) \endexample -Now the corresponding matrix is $({1\atop} {0\atop1} {0\atop0} -{0\atop0})$. +Now the corresponding matrix is +%display{tex} +$({1\atop} {0\atop1} {0\atop0} {0\atop0})$. +%display{text} +% /1 0 0 0\ +% \ 1 0 0/. +%enddisplay \>CanonicalPcgsWrtFamilyPcgs( ) \>FamilyPcgs( ) @@ -187,19 +204,17 @@ \>DenominatorOfModuloPcgs( ) \index{polycyclic generating systems!modulo}% -Let $G$ be a solvable group and $N$ a normal subgroup. A *modulo pcgs* -for $G/N$ is a pcgs for the factor group even if the factor group itself -is unknown.\footnote\*{Migr\accent127ane sind Kopfschmerzen, auch wenn -man gar keine hat. (Erich K\accent127astner, in *P\accent127unktchen und -Anton*)} To construct such a thing, you need only a pcgs for $G$ and an -induced pcgs for $N$, but *no* group (isomorphic to) $G/N$. Such a factor -group is expensive to obtain, because it requires the setup of a new -collector (even if $G$ and $N$ were permutation groups, the factor would -be a pc group, see "NaturalHomomorphismByNormalSubgroup!for permutation -groups"), although the group operations could as well be performed in -$G$. Comparing elements in the factor group then requires comparison -modulo~$N$, and this is where the modulo pcgs helps: It makes the -functions like `ExponentsOfPcElement' return exponent lists that are +Let $G$ be a solvable group and $N$ a normal subgroup. A *modulo pcgs* +for $G/N$ is a pcgs for the factor group even if the factor group itself +is unknown. To construct such a thing, you need only a pcgs for $G$ and +an induced pcgs for $N$, but *no* group (isomorphic to) $G/N$. Such a +factor group is expensive to obtain, because it requires the setup of a +new collector (even if $G$ and $N$ were permutation groups, the factor +would be a pc group, see "NaturalHomomorphismByNormalSubgroup!for +permutation groups"), although the group operations could as well be +performed in $G$. Comparing elements in the factor group then requires +comparison modulo~$N$, and this is where the modulo pcgs helps: It makes +the functions like `ExponentsOfPcElement' return exponent lists that are valid for~$G/N$. \beginexample gap> N := PCore( G, 2 ); @@ -243,20 +258,26 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \Section{Affine methods!for solvable groups} -Let and be subgroups of a group such that normalizes -and consider the action of on by conjugation. If has an -elementary abelian subgroup (i.e., a vector space) that is normal in -both and , then affine methods can be employed to deduce -information about -conjugacy in from information about --conjugacy in $U/N$. In particular, one can define a set $R_H(U)$ of -_canonical -class representatives_ for such that, given a -representative $hN\in R_H(U/N)$ in the factor group, the intersection -$R_H(U) \cap hN$ (i.e., the set of canonical representatives in that -map to in $U/N$) is of the form with a set of orbit -representatives of the affine action on the vector space given by -$$ C \to {\rm AGL}(N), \qquad c \mapsto ( n \mapsto [h,c] n^c ), $$ -where is the preimage of $C_{H/N}(hN)$ in . The centralizer of a -representative $hk \in hK$ can also be calculated as described in +Let $U$ and $H$ be subgroups of a group $G$ such that $H$ normalizes $U$ +and consider the action of $H$ on $U$ by conjugation. If $U$ has an +elementary abelian subgroup $N$ (i.e., a vector space) that is normal in +both $U$ and $H$, then affine methods can be employed to deduce +information about $H$-conjugacy in $U$ from information about +$H$-conjugacy in $U/N$. In particular, one can define a set $R_H(U)$ of +*canonical $H$-class representatives* for $U$ such that, given a +representative $hN\in R_H(U/N)$ in the factor group, the intersection +$R_H(U) \cap hN$ is of the form $hK$ with $K$ a set of orbit +representatives of the affine action on the vector space $N$ given by +$$ C \to {\rm AGL}(N), \quad c \mapsto ( n \mapsto [h,c] n^c ), $$ +where $C$ is the full preimage of $C_{H/N}(hN)$ in $H$. The centralizers +of the representatives in $R_H(U)$ are obtained from the stabilizers in +this affine action, so that the procedure can be iterated to determine +$R_H(\tilde U)$ in a bigger group $\tilde U$ such that $U=\tilde U/\tilde +N$. + +If $N$ is central in $C$, the set $K$ in the above step can more easily +be obtained as a complement to $[h,C]$ in $N$ and there is a similar +shortcut for the centralizer. The methods are fully described in \cite{MeckyNeubuser89}. \>Centralizer( , | )!{for solvable groups} @@ -270,6 +291,14 @@ The -conjugacy classes of are calculated by affine methods. If the first argument is not given, the -classes of are calculated. +\>RationalClasses(

)!{for p-groups} + +The shortcut which the conjugacy class calculation takes for central +normal subgroups can be developed further so that it computes for +$p$-groups not only the conjugacy classes but also the rational classes +(see "Rational classes!for groups"). The method is described in chapter~2 +of \cite{Theissen93}. + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \Section{Operation functions!for solvable groups} @@ -293,7 +322,7 @@ \>Stabilizer( , ,

\[, {Pcgs( )}, \] \[, \] )% !{for solvable groups} \>StabilizerOfExternalSet( )!{for solvable groups} -\>OrbitStabilizer( , \[ , \] \[, {Pcgs( )}, \] % +\>OrbitStabilizer( , \[ , \]

\[, {Pcgs( )}, \] % \[, \] )!{for solvable groups} \>CanonicalRepresentativeOfExternalSet( )!{for solvable groups} \>OperatorOfExternalSet( )!{for solvable groups} @@ -301,20 +330,20 @@ \danger Since every group permutes the orbits of a normal subgroup setwise, and since a solvable group has a composition series $ = G_0 > \ldots > G_n=\{1\}$ with cyclic factors, the -orbit of a point - can be constructed by iterated cyclic extension. The orbit $p +

can be constructed by iterated cyclic extension. The orbit $

G_{i-1}$ is either equal to the orbit $

G_i$ or it is the concatenation the pairwise disjoint mapped orbits $

G_ig^j$ for $j=0,\ldots, [G_{i-1}:G_i] - 1$ if $\langle G_i, g\rangle = G_{i-1}$. In particular, the orbit of

under a member of the composition series is always a starting-piece of the entire -orbit. -If the orbit is stable in a cyclic extension step, i.e., if $p G_{i-1} = -p G_i$, there is an element $h\in G_i$ such that $p.gh^{-1} = p$ with -as above. The elements $gh^{-1}$ collected over all steps in which the -orbit is stable form a (reversed) pcgs for the stabilizer of

. In this -way the stabilizer can be computed together with the orbit in +If the orbit is stable in a cyclic extension step, i.e., if $p G_{i-1} = +p G_i$, there is an element $h\in G_i$ such that $

.gh^{-1} =

$ with + as above. The elements $gh^{-1}$ collected over all steps in which +the orbit is stable form a (reversed) pcgs for the stabilizer of

. In +this way the stabilizer can be computed together with the orbit in `OrbitStabilizer'. In a similar manner one can construct, given any point -

of the operation domain, an element in mapping

to its +

of the operation domain, an element in mapping

to its canonical representative. \>RepresentativeOperation( , , , \[, {Pcgs( )}, % diff --git a/doc/ref/speedup.tex b/doc/ref/speedup.tex index 09d1c8f3ac..7c0089ffbf 100644 --- a/doc/ref/speedup.tex +++ b/doc/ref/speedup.tex @@ -4,48 +4,6 @@ This chapter explains a couple of possibilities to increase the performance of GAP. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\Section{Completion files} - -When starting, {\GAP}4 takes some time to read all library files. This time -is mainly spent for computing the values of the different methods. If the -library files are not changed, however, one can compute these values once -and thus vastly increase the speed of loading {\GAP}. This is done using -``completion files''. - -A completion file is a file containing condensed information about -declarations and the according filter values. - -The completion files reside in the `lib' directory of the {\GAP} -distribution. When starting {\GAP}, it is checked if completion files exist. -If they do, they are read in. - -The command line option `-D' prints information about files and completion. -The command line option `-N' suppresses the reading of completion files. - -\>CreateCompletionFiles() - -To create completion files you must have write permissions for the `lib' -directory. Start {\GAP} with the `-N' option (to suppress -the reading of any existing completion files), then execute the command -`CreateCompletionFiles();', where is a string giving a path to -the home directory of {\GAP} (the directory containing the `lib' directory). - -This produces, among lots of informational output, completion files. - -\begintt -M114 /home/ahulpke > gap4 -N -gap> CreateCompletionFiles("gap4"); -#I converting "gap4/lib/read2.g" to "gap4/lib/read2.co" -#I parsing "gap4/lib/process.gd" -#I parsing "gap4/lib/listcoef.gi" -\endtt -(The remaining screen output has been left out here.) - -Note that currently no CRC check is performed, so loading a changed library -with old completion files can result in strange behaviour. To remedy this, -simply remove all completion files or create them anew. - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \Section{The compiler} \index{gac} @@ -145,6 +103,9 @@ end \endtt +The command line option `-M' disables the loading of compiled modules and +always reads code from the library. + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \Section{CRC Numbers} \index{crc} diff --git a/doc/tut/algvspc.tex b/doc/tut/algvspc.tex index ed79f355a5..3a10b28354 100644 --- a/doc/tut/algvspc.tex +++ b/doc/tut/algvspc.tex @@ -18,12 +18,12 @@ under scalar multiplication with elements in $F$. In {\GAP}, only those domains are regarded as vector spaces that are constructed as vector spaces. -Especially an additive group that does not know about an acting domain of -scalars is not regarded as a vector space in {\GAP}. +In particular, an additive group that does not know about an +acting domain of scalars is not regarded as a vector space in {\GAP}. Every field is itself a vector space, the set of matrices of the same -shape over a given field is a vector space, the set of linear mappings -between two vector spaces is a vector space. +shape over a given field forms a vector space, and the set of linear +mappings between two vector spaces forms a vector space. \beginexample gap> f:= GF(8); IsVectorSpace( f ); @@ -93,6 +93,26 @@ fail \endexample +The coefficient field of a vector space in {\GAP} can be accessed by +`LeftActingDomain'. + +\beginexample + gap> LeftActingDomain( rowsp ); + GF(3^2) + gap> LeftActingDomain( as ); + GF(3) + gap> LeftActingDomain( f ); + GF(2) +\endexample + +We see that the field `f' is a vector space over its prime field, +which is the field with 2 elements. +Note that it might also be natural to view any field as a vector space +over itself. +But in {\GAP}, `GF(p^n)' is a vector space over `GF(p)' for each prime `p'. +Of course one can construct a field as a vector space over any subfield +using `AsVectorSpace'. + The defining invariant of a vector space $V$ is its *dimension*, the maximal cardinality of a tuple of vectors in $V$ that are linearly independent over the coefficient field $F$ of $V$. @@ -178,6 +198,10 @@ End( GF(3), ( GF(3)^2 ) ) gap> IsAlgebra( hom ); true + gap> l:= SimpleLieAlgebra( "A", 1, Rationals ); + + gap> IsAssociative( l ); + false \endexample But if a domain was not constructed as an algebra, @@ -278,8 +302,8 @@ *structure constants*, that is, for a fixed basis $B$ of the algebra, the $B$-coefficients of the products of elements in $B$. Any finite dimensional algebra can be described by finitely many -structure constants. (Here `CF(7)' contains the cyclotomic field -generated by the 7th roots of unity.) +structure constants. (Here `CF(7)' is the cyclotomic field +generated by the complex 7th roots of unity.) \beginexample gap> bas:= Basis( a );; @@ -376,8 +400,10 @@ \endexample Another example of algebras is provided by *quaternion algebras*. - -@ COULD SOMEONE INTRODUCE EB and NF? @ +We define a quaternion algebra over an extension field of the +rationals, namely the field generated by $\sqrt{5}$. +(The number `EB(5)' is equal to $1/2 (-1+\sqrt{5})$. +The field is printed as `NF(5,[ 1, 4 ])'.) \beginexample gap> b5:= EB(5); diff --git a/doc/tut/domain.tex b/doc/tut/domain.tex new file mode 100644 index 0000000000..f78d29cb25 --- /dev/null +++ b/doc/tut/domain.tex @@ -0,0 +1,281 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% +%W domain.tex GAP documentation Thomas Breuer +%W & Frank Celler +%W & Martin Schoenert +%W & Heiko Theissen +%% +%H @(#)$Id$ +%% +%Y Copyright 1997, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany +%% +%% This file contains a tutorial introduction to domains. +%% + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Chapter{Domains} + +*Domain* is {\GAP}'s name for structured sets. +We already saw examples of domains in Chapters~"Groups and Homomorphisms" +and~"Vector Spaces and Algebras", +the groups `s8' and `a8' in Section~"Permutation groups" are domains, +likewise the field `f' and the vector space `v' in +Section~"Vector Spaces" are domains. +They were constructed by functions such as `Group' and `GF', +and they could be passed as arguments to other functions such as +`DerivedSubgroup' and `Dimension'. + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{Domains as Sets} + +First of all, a domain $D$ is a set. +If $D$ is finite then a list with the elements of this set can be +computed with the functions `AsList' and `AsListSorted'. +For infinite $D$, `Enumerator' and `EnumeratorSorted' may work, +but it is also possible that one gets an error message. + +Domains can be used as arguments of set functions such as `Intersection' +and `Union'. +{\GAP} tries to return a domain in these cases, +moreover it tries to return a domain with as much structure as possible. +For example, the intersection of two groups is (either empty or) again a +group, and {\GAP} will try to return it as a domain. +For `Union', the situation is different because the union of two groups +is in general not a group. + +\beginexample + gap> g:= Group( (1,2), (3,4) );; + gap> h:= Group( (3,4), (5,6) );; + gap> Intersection( g, h ); + Group( [ (3,4) ], ... ) +\endexample + +Two domains are regarded as equal w.r.t. the operator ```=''' if and only +if the are equal as sets, regardless of the additional structure of the +domains. + +\beginexample + gap> mats:= [ [ [ 0*Z(2), Z(2)^0 ], [ Z(2)^0, 0*Z(2) ] ], + > [ [ Z(2)^0, 0*Z(2) ], [ 0*Z(2), Z(2)^0 ] ] ];; + gap> Ring( mats ) = VectorSpace( GF(2), mats ); + true +\endexample + +Additionally, a domain is regarded as equal to the sorted list +of its elements. + +\beginexample + gap> g:= Group( (1,2) );; + gap> l:= AsListSorted( g ); + [ (), (1,2) ] + gap> g = l; + true + gap> IsGroup( l ); IsList( g ); + false + false +\endexample + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{Algebraic Structure} + +The additional structure of $D$ is constituted by the facts that $D$ is +known to be closed under certain operations such as addition or +multiplication, and that these operations have additional properties. +For example, if $D$ is a group then it is closed under multiplication +($D \times D \rightarrow D$, $(`g',`h') \mapsto `g * h'$), +under taking inverses ($D \rightarrow D$, $`g' \mapsto `g^-1'$) +and under taking the identity `g^0' or each element `g' in $D$; +additionally, the multiplication in $D$ is associative. + +The same set of elements can carry different algebraic structures. +For example, a semigroup is defined as being closed under an associative +multiplication, so each group is also a semigroup. +Likewise, a monoid is defined as a semigroup $D$ in which the identity +`g^0' is defined for every element `g', so each group is a monoid, +and each monoid is a semigroup. + +Other examples of domains are vector spaces, which are defined as +additive groups that are closed under (left) multiplication with elements +in a certain domain of scalars, +and conjugacy classes in a group $D$, +which are closed under the conjugation action of $D$. + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{Notions of Generation}\indextt{GeneratorsOfSomething} + +We have seen that a domain is closed under certain operations. +Usually a domain is constructed as the closure of some elements under +these operations. +In this situation, we say that the elements *generate* the domain. + +For example, a list of matrices of the same shape over a common field can +be used to generate an additive group or a vector space over a suitable +field; +if the matrics are square then we can also use the matrices as generators +of a semigroup, a ring, or an algebra. + +\beginexample + gap> mats:= [ [ [ 0*Z(2), Z(2)^0 ], [ Z(2)^0, 0*Z(2) ] ], + > [ [ Z(2)^0, 0*Z(2) ], [ 0*Z(2), Z(2)^0 ] ] ];; + gap> Size( AdditiveMagma( mats ) ); + 4 + gap> Size( VectorSpace( GF(8), mats ) ); + 64 + gap> Size( Algebra( GF(2), mats ) ); + 4 + gap> Size( Group( mats ) ); + 2 +\endexample + +Each combination of operations under which a domain shall be closed +constitutes a notion of generation. +So each group has group generators, and since it is a monoid, +one can also ask for monoid generators of a group. + +Note that one cannot simply ask for ``the generators of a domain'', +it is always necessary to specify what notion of generation is meant. +Access to the different generators is provided by functions with +names of the form `GeneratorsOfSomething'. +For example, `GeneratorsOfGroup' denotes group generators, +`GeneratorsOfMonoid' denotes monoid generators, and so on. +The result of `GeneratorsOfVectorSpace' is of course to be understood +relative to the field of scalars of the vector space in question. + +\beginexample + gap> GeneratorsOfVectorSpace( GF(4)^2 ); + [ [ Z(2)^0, 0*Z(2) ], [ 0*Z(2), Z(2)^0 ] ] + gap> v:= AsVectorSpace( GF(2), GF(4)^2 );; + gap> GeneratorsOfVectorSpace( v ); + [ [ Z(2)^0, 0*Z(2) ], [ 0*Z(2), Z(2)^0 ], [ Z(2^2), 0*Z(2) ], + [ 0*Z(2), Z(2^2) ] ] +\endexample + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{Domain Constructors}\indextt{Something} + +A group can be constructed from a list of group generators by +`Group( )', +likewise one can construct rings and algebras with the functions `Ring' +and `Algebra'. + +Note that it is not checked that is in fact a valid list of group +generators, for example whether the elements of can be multiplied +or whether they are invertible. +This means that {\GAP} trusts you, at least to some extent, that the +desired domain `Something( )' does exist. + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{Forming Closures of Domains}\indextt{ClosureSomething} + +Besides constructing domains from generators, one can also form the +closure of a given domain with an element or another domain. +There are different notions of closure, one has to specify one +according to the desired result and the structure of the given domain. +The functions to compute closures have names such as +`ClosureSomething'. +For example, if $D$ is a group and one wants to construct the group +generated by $D$ and an element $g$ then one can use +`ClosureGroup( $D$, $g$ )'. + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{Changing the Structure}\indextt{AsSomething} + +The same set of elements can have different algebraic structures. +For example, it may happen that a monoid $M$ does in fact contain +the inverses of all of its elements, and thus $M$ is equal to the group +formed by the elements of $M$. + +\beginexample + gap> m:= Monoid( mats );; + gap> m = Group( mats ); + true + gap> IsGroup( m ); + false +\endexample + +The last result in the above example may be surprising. +But the monoid `m' is not regarded as a group in {\GAP}, +and moreover there is no way to turn `m' into a group. +Let us formulate this as a rule: + +*The set of operations under which the domain is closed is fixed +in the construction of a domain, and cannot be changed later.* + +(Contrary to this, a domain *can* acquire knowledge about properties +such as whether the multiplication is associative or commutative.) + +If one needs a domain with a different structure than the given one, +one can construct a new domain with the required structure. +The functions that do these constructions have names such as +`AsSomething', they return a domain that has the same elements as the +argument in question but the structure `Something'. +In the above situation, one can use `AsGroup'. + +\beginexample + gap> g:= AsGroup( m );; + gap> m = g; + true + gap> IsGroup( g ); + true +\endexample + +If it is impossible to construct the desired domain, the `AsSomething' +functions return `fail'. + +\beginexample + gap> AsVectorSpace( GF(4), GF(2)^2 ); + fail +\endexample + +The functions `AsList' and `AsListSorted' mentioned above do not return +domains, but they fit into the general pattern in the sense that they +forget all the structure of the argument, including the fact that it is +a domain, and return a list with the same elements as the argument has. + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{Subdomains}\indextt{Subsomething}\indextt{SubsomethingNC} + +It is possible to construct a domain as a subset of an existing domain. +The respective functions have names such as `Subsomething', +they return domains with the structure `Something'. +For example, if one wants to deal with the subgroup of the domain +that is generated by the elements in the list , +one can use `Subgroup( , )'. +It is not required that is itself a group, only the group generated +by must be a subset of . + +The superset of a domain $S$ that was constructed by a `Subsomething' +function can be accessed as `Parent( $S$ )'. + +\beginexample + gap> g:= SymmetricGroup( 5 );; + gap> gens:= [ (1,2), (1,2,3,4) ];; + gap> s:= Subgroup( g, gens );; + gap> h:= Group( gens );; + gap> s = h; + true + gap> Parent( s ) = g; + true +\endexample + +Many functions return subdomains of their arguments, for example +the result of `SylowSubgroup( $G$ )' is a group with parent group $G$. + +If you are sure that the domain `Something( )' is contained in the +domain then you can also call `SubsomethingNC( , )' instead +of `Subsomething( , )'. +The `NC' stands for ``no check'', and the functions whose names end with +`NC' omit the check of containment. + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% +%E domain.tex . . . . . . . . . . . . . . . . . . . . . . . . ends here diff --git a/doc/tut/function.tex b/doc/tut/function.tex index 6fab5508f6..dd4e1c7c91 100644 --- a/doc/tut/function.tex +++ b/doc/tut/function.tex @@ -55,7 +55,7 @@ closing parenthesis. The function definition is terminated by the keyword `end'. -A {\GAP} function is an expression like integers, sums and lists. It +A {\GAP} function is an expression like an integer, a sum and a list. It therefore may be assigned to a variable. The terminating semicolon in the example does not belong to the function definition but terminates the assignment of the function to the name `sayhello'. Unlike in the case of @@ -124,9 +124,10 @@ expression and can therefore not be assigned to a variable. Furthermore an `if' statement does not return a value. -Fibonacci numbers are defined recursively by $f(1) = f(2) = 1$ and $f(n) -= f(n-1) + f(n-2)$. Since functions in {\GAP} may call themselves, a -function `fib' that computes Fibonacci numbers can be implemented +Fibonacci numbers are defined recursively by $f(1) = f(2) = 1$ and +$f(n) = f(n-1) + f(n-2)$ for $n \geq 3$. +Since functions in {\GAP} may call themselves, +a function `fib' that computes Fibonacci numbers can be implemented basically by typing the above equations. \beginexample diff --git a/doc/tut/group.tex b/doc/tut/group.tex index 43a0196ea7..5933f9f900 100644 --- a/doc/tut/group.tex +++ b/doc/tut/group.tex @@ -17,8 +17,8 @@ \Chapter{Groups and Homomorphisms} In this chapter we will show some computations with groups. The examples -deal most with permutation groups, because they are the most easy ones to -input. The functions mentioned here, like `Group', `Size' or +deal mostly with permutation groups, because they are the most easy ones +to input. The functions mentioned here, like `Group', `Size' or `SylowSubgroup', however, are the same for all kinds of groups, although the algorithms which compute the information of course will be different in most cases. @@ -191,8 +191,8 @@ \endexample will not cause an error, but the result does not tell anything about the inclusion of one group in another; `\<' tests which of the two groups is -less is some total order. On the other hand, the equality operator `=' in -fact does test the equality of groups. +less in some total order. On the other hand, the equality operator `=' in +fact does test the equality of its arguments. {\bf Summary.} In this section we have used the elementary group functions to determine the structure of a normalizer. We have assigned @@ -573,7 +573,7 @@ \endexample The result is a list of sets, such that `a8_56' operates on those sets. Now we would like the stabilizer of this operation on the sets. Because -we wanted to operate on the sets we have to pass `OnSets' as third +we want to operate on the sets we have to pass `OnSets' as third argument. \beginexample gap> u8_56 := Stabilizer( a8_56, blocks[1], OnSets );; @@ -725,7 +725,7 @@ gap> u15b := ClosureGroup( u105, (2,3)(6,8) );; Index( a8, u15b ); 15 gap> RepresentativeOperation( a8, u15, u15b ); - false + fail \endexample `RepresentativeOperation' tells us that there is no element in `a8' such that `u15 ^ = u15b'. Because `^' also denotes the conjugation of @@ -765,7 +765,8 @@ gap> PreImage( hom, (1,2,3) ); Error must be an inj. and surj. mapping at Error( " must be an inj. and surj. mapping" ); - Entering break read-eval-print loop, you can 'quit;' to quit to outer loop, + Entering break read-eval-print loop, you can 'quit;' to quit to outer \ + loop, or you can return to continue brk> quit; |_ diff --git a/doc/tut/introduc.tex b/doc/tut/introduc.tex index ed8d671765..ef7ecc3edf 100644 --- a/doc/tut/introduc.tex +++ b/doc/tut/introduc.tex @@ -24,7 +24,7 @@ terminal) followed by the corresponding output (which {\GAP} produces as an answer to your input). \begintt - This ``session protocol'' is indented and printed in typwriter style + This ``session protocol'' is indented and printed in typewriter style (like this paragraph) in this tutorial and should look exactly as it looks on your text terminal or text window. \endtt @@ -331,7 +331,11 @@ gap> (1,2,3)^(1,2); (1,3,2) \endexample -The last type of constants we want to introduce here are the +The various other constants that {\GAP} can deal with will be introduced +when they are used, for example there are elements of finite fields +such as `Z(8)', and complex roots of unity such as `E(4)'. + +The last type of constants we want to mention here are the *characters*, which are simply objects in {\GAP} that represent arbitrary characters from the character set of the operating system. Character literals can be entered in {\GAP} by enclosing the character in @@ -384,6 +388,8 @@ 22 gap> a * (a + 1); 506 + gap> a = 10; + false gap> a:= 10; 10 gap> a * (a + 1); @@ -426,7 +432,7 @@ In the remaining part of this manual we will ignore the difference between variables, their names (identifiers), and the objects they point to. It may be useful to think from time to time about what is really -meant by terms such as the integer `w'. +meant by terms such as ``the integer `w'''. There are some predefined variables coming with {\GAP}. Many of them you will find in the remaining chapters of this manual, since functions are @@ -590,7 +596,8 @@ 125 \endexample More complicated functions, especially functions with more than one -argument cannot be defined in this way. own {\GAP} functions in +argument cannot be defined in this way. +You will see how to write your own {\GAP} functions in Chapter~"prg:Functions" in the programming tutorial. %% Summary %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/doc/tut/manual.tex b/doc/tut/manual.tex index e6d9304fdd..65b97ef046 100644 --- a/doc/tut/manual.tex +++ b/doc/tut/manual.tex @@ -70,6 +70,7 @@ \Input{function} \Input{group} \Input{algvspc} +\Input{domain} \Input{opers} \Input{migrat} % diff --git a/doc/tut/migrat.tex b/doc/tut/migrat.tex index 105cc2b7b8..faa4984f55 100644 --- a/doc/tut/migrat.tex +++ b/doc/tut/migrat.tex @@ -498,6 +498,12 @@ operations is really a mapping, you can construct it via `GroupGeneralMappingByImages' and then call `IsMapping' for it. +Note that checking `IsGroupHomomorphism' is equivalent to checking +`IsGroupGeneralMapping' and `IsMapping'. +Further note that there is *no* function `IsHomomorphism' in {\GAP}~4, +since there are several different operations with respect to which a +mapping can be a homomorphism. + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \Section{Homomorphisms vs. Factor Structures} diff --git a/doc/tut/opers.tex b/doc/tut/opers.tex index 53236fc370..55e6b56ea1 100644 --- a/doc/tut/opers.tex +++ b/doc/tut/opers.tex @@ -136,11 +136,12 @@ functions are called *filters*. You can imagine a filter as a switch which is set either to `true' or to `false'. For every {\GAP} object there is a boolean list which has reserved a bit for every filter {\GAP} -knows about. Strictly speaking, there is one bit for every *primitive -filter*, and these primitive filters can be combined with `and' to form +knows about. Strictly speaking, there is one bit for every *simple +filter*, and these simple filters can be combined with `and' to form other filters (which are then `true' if and only if all the corresponding -bits are set to `true'). For example, the filter `IsPermGroup and -IsSolvableGroup' is made up from two primitive filters. +bits are set to `true'). +For example, the filter `IsPermGroup and IsSolvableGroup' is made up from +several simple filters. Since they allow only two values, the bits which represent filters can be compared very quickly, and the scheme by which {\GAP} chooses the method, @@ -152,10 +153,10 @@ We only present the following rule of the thumb here: Each installed method for an attribute, say `Size( )', has a ``required filter'', -which is made up from certain primitive filters which must yield `true' +which is made up from certain simple filters which must yield `true' for if this method is to be applicable. To execute a call of `Size( )', {\GAP} selects the applicable method whose required filter -combines the most primitive filters because it thinks that the more an +combines the most simple filters because it thinks that the more an algorithm requires of , the more efficient it will be. For example, if is a permutation group that is not (known to be) solvable, a method with required filter `IsPermGroup and IsSolvableGroup' is not @@ -186,7 +187,7 @@ \endtt This method would then be tried on every permutation group (whether known to be solvable or not), and it would include a mandatory solvability -test. {\GAP} persues such a strategy for `Size', using the solvable +test. {\GAP} pursues such a strategy for `Size', using the solvable method from \cite{Sims90b}. \edef\solsimsex{\the\chapno.\the\exno}% diff --git a/doc/tut/records.tex b/doc/tut/records.tex index 7daf88316d..5a3463d783 100644 --- a/doc/tut/records.tex +++ b/doc/tut/records.tex @@ -22,7 +22,7 @@ record is called a *record component*. In the following sections you will see how to define and how to use -records. Record objects are changed by assignments to record fields. +records. Record objects are changed by assignments to record components. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \Section{Plain Records} @@ -75,8 +75,8 @@ Sometimes it is interesting to know which components of a certain record are bound. This information is available from the function `RecNames', -which takes a record as its argument and returns a list of all bound -components of this record as a list of strings. +which takes a record as its argument and returns a list of names of +all bound components of this record as a list of strings. \beginexample gap> RecNames(date); @@ -107,7 +107,7 @@ \Section{Further Reading} Now return to Sections "Identical Lists" and "Immutability" and find out -what that section means for records. +what these sections mean for records. Records and functions for records are described in detail in Chapter "ref:Records". diff --git a/etc/INSTALL b/etc/INSTALL index 4e601efc91..ecf509703f 100644 --- a/etc/INSTALL +++ b/etc/INSTALL @@ -1,11 +1,13 @@ -GAP 4 Beta 1 +GAP 4 Beta 2 ------------ -This file (ftp://ftp-gap.dcs.st-and.ac.uk/pub/gap/gap4b1/INSTALL) -contains installation instructions for the first beta release of GAP 4, -called GAP 4.B.1 for short. +This file (ftp://ftp-gap.dcs.st-and.ac.uk/pub/gap/gap4beta/INSTALL) +contains installation instructions for the beta releases of GAP 4, +called GAP 4.beta for short. -At the moment we only support GAP 4.B.1 under UNIX, it has been tested on +The current beta release is Beta 2 of 16-Oct-97. + +At the moment we only support GAP 4.beta under UNIX, it has been tested on the following systems: 'alpha-dec-OSF32-gcc2' for DECalpha under OSF 3.2 with GNU cc 2 @@ -14,12 +16,13 @@ the following systems: 'i386-ibm-freebsd-gcc2' for IBM PC under FreeBSD 2.x with GNU cc 2 'i386-ibm-linux-gcc2' for IBM PC under Linux with GNU cc 2 'i386-ibm-nextstep-cc' for IBM PC under NeXTSTEP 3.x with GNU cc 2 + 'power-ibm-aix-gcc2' for IBM RS/6000 & AIX with GNU cc 2 'mips-sgi-irix-cc' for SGI Mips under IRIX 5/6 with cc 'sparc-sun-sunos-gcc2' fur Sun Sparc under SunOS with GCC 2 'sparc-sun-solaris-gcc2' fur Sun Sparc under Solaris with GCC 2 You will need a Pentium class i386 with at least 16 Mbyte to work -comfortable with GAP 4.B.1, a 486 is not recommended although GAP 4.B.1 +comfortable with GAP 4.beta, a 486 is not recommended although GAP 4.beta compiles on such systems. Porting GAP to another unix system is not hard, however. You need some @@ -29,69 +32,72 @@ systems". If you plan to port GAP to a non-UNIX system please contact gap-trouble@dcs.st-and.ac.uk -How to get GAP 4.B.1 +How to get GAP 4.beta -------------------- -GAP 4.B.1 is available via ftp, please see the accompanied README for -details about the status and copyright of GAP. +GAP 4.beta is available via ftp, please see the GAP web page +http://www-gap.dcs.st-and.ac.uk/~gap +for details about the status and copyright of GAP. -You can get GAP 4.B.1 from: +You can get GAP 4.beta from: - ftp://ftp-gap.dcs.st-and.ac.uk/pub/gap/gap4b1/ - ftp://ftp.math.rwth-aachen.de/pub/gap4b1/ + ftp://ftp-gap.dcs.st-and.ac.uk/pub/gap/gap4beta/ + ftp://ftp.math.rwth-aachen.de/pub/gap4beta/ These directories contain the following files: INSTALL this file - README information about GAP - gap4b1.tar.gz the source code as gzipped tar archive - doc4b1.tar.gz the documentation as gzipped tar archive + gap4bY.tar.gz the source code as gzipped tar archive + doc4bY.tar.gz the documentation as gzipped tar archive fix1.tar.gz corrections, additions for the files above ... +Where Y is the number of the beta release. + You need all the above files, however, at the time this document was written no ``fixX.tar.gz'' existed. - -Installation of GAP 4.B.1 under UNIX +Installation of GAP 4.beta under UNIX ------------------------------------ -Installing GAP 4.B.1 on any of the machines mentioned at the beginning of +Installing GAP 4.beta on any of the machines mentioned at the beginning of this file is fairly easy. Get the files described in "How to get GAP -4.B.1" and decide into which directory you want to install GAP 4.B.1. If -you will be the only user using GAP 4.B.1, you probably should install it -in your home directory. If other users will be also using GAP 4.B.1, you +4.beta" and decide into which directory you want to install GAP 4.beta. If +you will be the only user using GAP 4.beta, you probably should install it +in your home directory. If other users will be also using GAP 4.beta, you should install it in a public place, such as ``/usr/local/lib/''. GAP -4.B.1 will be installed in a subdirectory ``gap4beta'' of this directory. -You can later move GAP 4.B.1 to a different location. For example you +4.beta will be installed in a subdirectory ``gap4beta'' of this directory. +You can later move GAP 4.beta to a different location. For example you can first install it in your home directory and when it works move it to ``/usr/local/lib/''. The following installation example assumes that you are installing GAP -4.B.1 into the directory ``/usr/local/lib'' on a Pentium Pro running +4.beta into the directory ``/usr/local/lib'' on a Pentium Pro running FreeBSD. -First create a directory called ``gap4beta'' and `cd' into this -directory. +In the following text, Y in filenames always stands for the version number +of the beta release. So you should read for example 'gap4bY.tar.gz' as + 'gap4b2.tar.gz' or whatever the current version you got is. - you@unix> mkdir /usr/local/lib/gap4beta - you@unix> cd /usr/local/lib/gap4beta - -Now copy or ftp the files described in "How to get GAP 4.B.1" into this -directory. Unpack the files ``gap4b1.tar.gz'', ``doc4b1.tar.gz'' and any +Copy or ftp the files described in "How to get GAP 4.beta" into this +directory. Unpack the files ``gap4bY.tar.gz'', ``doc4bY.tar.gz'' and any ``fixX.tar.gz'' into the directory using `gunzip' and `tar'. If there is more than one fix file, first unpack ``fix1.tar.gz'', then ``fix2.tar.gz'', an so on. Let us assume that there are no ``fixX.tar.gz'' files, if there were any -they must be packed *after* ``gap4b1.tar.gz'' and ``doc4b1.tar.gz''. +they must be packed *after* ``gap4bY.tar.gz'' and ``doc4bY.tar.gz''. - you@unix> gunzip gap4b1.tar.gz doc4b1.tar.gz - you@unix> tar xvf gap4b1.tar + you@unix> gunzip gap4bY.tar.gz doc4bY.tar.gz + you@unix> tar xvf gap4bY.tar ... - you@unix> tar xvf doc4b1.tar.gz + you@unix> tar xvf doc4bY.tar.gz ... +Change in the directory gap4bY. + + you@unix> cd gap4bY + Change into the directory ``src'' and execute `make' to see which compilation targets are predefined. @@ -107,6 +113,7 @@ compilation targets are predefined. (GNU cc 2.5.8 comes with NeXTSTEP 3.3) 'mips-sgi-irix-gcc2' for SGI Mips under IRIX 5/6 with GNU cc 2 'mips-sgi-irix-cc' for SGI Mips under IRIX 5/6 with cc + 'power-ibm-aix-gcc2' for IBM RS/6000 & AIX with GNU cc 2 'sparc-sun-sunos-gcc2' fur Sun Sparc under SunOS with GCC 2 'sparc-sun-solaris-gcc2' fur Sun Sparc under Solaris with GCC 2 @@ -118,7 +125,7 @@ compilation targets are predefined. i.e., 'make sparc-sun-sunos-gcc2 COPTS=-g LOPTS=-g.' Choose the best matching target. If nothing matches precisely, check -Section "Porting GAP 4.B.1 to other UNIX systems". In our example the +Section "Porting GAP 4.beta to other UNIX systems". In our example the right target is 'i386-ibm-freebsd-gcc2'. Now compile GAP. you@unix> make i386-ibm-freebsd-gcc2 @@ -150,7 +157,7 @@ In order to test your compilation `cd' into the directory BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA - Version: GAP Release 4 Beta 1 + Version: GAP Release 4 Beta 2 BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA @@ -168,11 +175,22 @@ Try a few things to see if the compilation succeeded. Now edit the shell script ``gap.sh'' in the ``/usr/local/lib/gap4beta/bin'' directory according to the instructions -in this file. Then copy this script into a directory in your search -path, i.e., ``~/bin/'' as ``gap4beta''. (If you are using the C-shell, -you will also have to `rehash', so that the C-shell adds ``gap4beta'' to -its internal tables). When you later move GAP 4.B.1 to another location -you only need to edit this script. +in this file. After editing try to execute the script + + you@unix> bin/gap.sh + +If the shell complains that it cannot execute or find ``gap.sh'' check +the permissions of the file by doing a `ls -l bin/gap.sh'. The +permissions should include execute permissions, if they don't you can set +them by + + you@unix> chmod 755 bin/gap.sh + +Then copy this script into a directory in your search path, i.e., +``~/bin/'' as ``gap4beta''. (If you are using the C-shell, you will also +have to `rehash', so that the C-shell adds ``gap4beta'' to its internal +tables). When you later move GAP 4.beta to another location you only need +to edit this script. you@unix> cd ~ you@unix> gap4beta @@ -222,7 +240,7 @@ Now use `Read' (*not* `ReadTest') to read the file ``testall.g'' to run ... The documentation already contains the corresponding ``dvi'' files, the -GAP 4.B.1 manual is split into four parts. Ask your system adminstrator +GAP 4.beta manual is split into four parts. Ask your system adminstrator how to print ``dvi'' files. In case you want to re-TeX them: `cd' into the corresponding directory and execute `tex manual'. @@ -238,7 +256,7 @@ Extending GAP 4 Porting GAP to other UNIX systems --------------------------------- -As GAP 4.B.1 is a beta release, fixes and additions will be distributed +As GAP 4.beta is a beta release, fixes and additions will be distributed more rapidly than with GAP 3. Please check our WEB pages before trying to install GAP on machines not mentioned in the beginning. @@ -247,7 +265,7 @@ install GAP on machines not mentioned in the beginning. In order to port GAP to a UNIX systems not mentioned in the beginning, you will need an ANSI C compiler. Proceed with "Installation of GAP -4.B.1 for UNIX" until you have to select a target. +4.beta for UNIX" until you have to select a target. Now edit the ``Makefile'' and create a new target for your machine. For a System V machine a good beginning is: @@ -274,7 +292,7 @@ a System V machine a good beginning is: ) For a BSD machine, replace ``SYS_IS_USG'' be ``SYS_IS_BSD'' and try to -compile GAP 4.B.1. Most likely you get warnings or error messages about +compile GAP 4.beta. Most likely you get warnings or error messages about conflicting prototypes in ``system.h'' and some of your operating system files. Check with functions generate problems and add the following to the list ``CFLAGS_SYS'' (do not forget the prefix ``-D'') above: @@ -305,7 +323,7 @@ If the compilation succeeds *but* the linker complains about a missing ``/usr/local/lib/gap4beta/bin//sysfile.o'' and add `SYS_HAS_NO_VFORK'. -If you have compiled and linked GAP 4.B.1 successfully please send the +If you have compiled and linked GAP 4.beta successfully please send the corresponding ``Makefile'' entry to gap-trouble@dcs.st-and.ac.uk diff --git a/etc/PENDING_FIXES b/etc/PENDING_FIXES new file mode 100644 index 0000000000..e9486c0fe3 --- /dev/null +++ b/etc/PENDING_FIXES @@ -0,0 +1,2 @@ +# changes that shoudl make it to the next bugfix: +# Description (Date, Initials of person who fixed it, changed file) diff --git a/grp/basic.gd b/grp/basic.gd index eb9dc80163..30525be23c 100644 --- a/grp/basic.gd +++ b/grp/basic.gd @@ -15,7 +15,6 @@ Revision.basic_gd := ############################################################################# ## - #O AbelianGroupCons( , ) ## AbelianGroupCons := NewConstructor( @@ -55,44 +54,6 @@ AlternatingGroupCons := NewConstructor( [ IsGroup, IsInt ] ); -############################################################################# -## -#P IsNaturalAlternatingGroup( ) -## -## A group is a natural alternating group if it is a permutation group -## acting as alternating group on its moved points. -## -IsNaturalAlternatingGroup := NewProperty( - "IsNaturalAlternatingGroup", - IsPermGroup ); - -SetIsNaturalAlternatingGroup := Setter(IsNaturalAlternatingGroup); -HasIsNaturalAlternatingGroup := Tester(IsNaturalAlternatingGroup); - - -############################################################################# -## -#P IsAlternatingGroup( ) -## -## A group is a group isomorphic to a natural alterning group. -## -IsAlternatingGroup := NewProperty( - "IsAlternatingGroup", - IsGroup ); - -SetIsAlternatingGroup := Setter(IsAlternatingGroup); -HasIsAlternatingGroup := Tester(IsAlternatingGroup); - - -############################################################################# -## -#M IsAlternatingGroup( ) -## -InstallTrueMethod( - IsAlternatingGroup, - IsNaturalAlternatingGroup ); - - ############################################################################# ## #F AlternatingGroup( ) . . . . . . . . . . . . . . . alternating group @@ -115,15 +76,6 @@ AlternatingGroup := function ( arg ) end; -############################################################################# -## -#P IsOneGeneratorGroup -## -IsOneGeneratorGroup := NewProperty( - "IsOneGeneratorGroup", - IsGroup ); - - ############################################################################# ## #O CyclicGroupCons( , ) @@ -323,44 +275,6 @@ SymmetricGroupCons := NewConstructor( [ IsGroup, IsInt ] ); -############################################################################# -## -#P IsNaturalSymmetricGroup( ) -## -## A group is a natural symmetric group if it is a permutation group acting -## as symmetric group on its moved points. -## -IsNaturalSymmetricGroup := NewProperty( - "IsNaturalSymmetricGroup", - IsPermGroup ); - -SetIsNaturalSymmetricGroup := Setter(IsNaturalSymmetricGroup); -HasIsNaturalSymmetricGroup := Tester(IsNaturalSymmetricGroup); - - -############################################################################# -## -#P IsSymmetricGroup( ) -## -## A group is a group isomorphic to a natural symmetric group. -## -IsSymmetricGroup := NewProperty( - "IsSymmetricGroup", - IsGroup ); - -SetIsSymmetricGroup := Setter(IsSymmetricGroup); -HasIsSymmetricGroup := Tester(IsSymmetricGroup); - - -############################################################################# -## -#M IsSymmetricGroup( ) -## -InstallTrueMethod( - IsSymmetricGroup, - IsNaturalSymmetricGroup ); - - ############################################################################# ## #F SymmetricGroup( ) . . . . . . . . . . . . . . . . . symmetric group @@ -385,6 +299,5 @@ end; ############################################################################# ## - #E basic.gd . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here ## diff --git a/grp/basicpcg.gi b/grp/basicpcg.gi index bfac7fb6f2..6443b5ae1b 100644 --- a/grp/basicpcg.gi +++ b/grp/basicpcg.gi @@ -107,30 +107,6 @@ function( filter, n ) end ); -############################################################################# -## -#M CyclicGroupCons( , ) -## -InstallMethod( CyclicGroupCons, - "pc group", - true, - [ IsPcGroup and IsFinite and IsOneGeneratorGroup, - IsInt and IsPosRat ], - 0, - -function( filter, n ) - local f, g, r; - - f := FreeGroup(1); - g := GeneratorsOfGroup(f); - r := [ g[1]^n ]; - f := PolycyclicFactorGroup( f, r ); - SetSize( f, n ); - SetIsCyclic( f, true ); - return f; -end ); - - ############################################################################# ## #M DihedralGroupCons( , ) diff --git a/grp/basicprm.gi b/grp/basicprm.gi index 65fbcb40a0..72083b0227 100644 --- a/grp/basicprm.gi +++ b/grp/basicprm.gi @@ -26,7 +26,7 @@ InstallMethod( AbelianGroupCons, 0, function( filter, ints ) - local grp; + local grp, grps; if not ForAll( ints, IsInt ) then Error( " must be a list of integers" ); @@ -36,8 +36,8 @@ function( filter, ints ) fi; ints := Filtered( ints, x -> 1 < x ); - ints := List( ints, x -> CyclicGroupCons( IsPermGroup, x ) ); - grp := CallFuncList( DirectProduct, ints ); + grps := List( ints, x -> CyclicGroupCons( IsPermGroup, x ) ); + grp := CallFuncList( DirectProduct, grps ); SetSize( grp, Product(ints) ); SetIsAbelian( grp, true ); return grp; @@ -266,114 +266,8 @@ function( filter, dom ) end ); -############################################################################# -## - -#M IsNaturalAlternatingGroup( ) -## -InstallMethod( IsNaturalAlternatingGroup, - "size comparison", - true, - [ IsPermGroup ], - 0, - -function( alt ) - if 0 = NrMovedPoints(alt) then - return IsTrivial(alt); - else - return Size(alt) * 2 = Factorial( NrMovedPoints(alt) ); - fi; -end ); - - -############################################################################# -## -#M IsNaturalSymmetricGroup( ) -## -InstallMethod( IsNaturalSymmetricGroup, - "size comparison", - true, - [ IsPermGroup ], - 0, - -function( sym ) - return Size(sym) = Factorial( NrMovedPoints(sym) ); -end ); - - -############################################################################# -## -#M in -## -InstallMethod( \in, - true, - [ IsPerm, - IsNaturalSymmetricGroup ], - 0, - -function( g, S ) - local m, l; - - m := MovedPoints(S); - l := NrMovedPoints(S); - - if g = One( g ) then - return true; - elif l = 0 then - return false; - elif IsRange(m) and ( l = 1 or m[2] - m[1] = 1 ) then - return SmallestMovedPointPerm(g) >= m[1] - and LargestMovedPointPerm(g) <= m[l]; - else - return IsSubset( m, MovedPointsPerms([g]) ); - fi; -end ); - - -############################################################################# -## -#M Size( ) -## -InstallMethod( Size, - true, - [ IsNaturalSymmetricGroup ], - 0, - sym -> Factorial( NrMovedPoints(sym) ) ); - - -############################################################################# -## -#M StabilizerOp( , , OnPoints ) -## -InstallOtherMethod( StabilizerOp, - true, - [ IsNaturalSymmetricGroup, IsPosRat and IsInt, IsFunction ], - 0, - -function( sym, p, opr ) - if opr <> OnPoints then - TryNextMethod(); - fi; - return AsSubgroup( sym, - SymmetricGroup( Difference( MovedPoints( sym ), [ p ] ) ) ); -end ); ############################################################################# ## -#M PrintObj( ) -## -InstallMethod( PrintObj, - true, - [ IsNaturalSymmetricGroup ], - 0, - -function(sym) - Print( "Sym( ", MovedPoints(sym), " )" ); -end ); - - -############################################################################# -## - #E basicperm.gd . . . . . . . . . . . . . . . . . . . . . . . . . ends here ## diff --git a/lib/addmagma.gi b/lib/addmagma.gi index 514354084c..f727b0129b 100644 --- a/lib/addmagma.gi +++ b/lib/addmagma.gi @@ -4,7 +4,7 @@ ## #W @(#)$Id$ ## -#Y Copyright (C) 1996, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany +#Y Copyright (C) 1997, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany ## Revision.addmagma_gi := "@(#)$Id$"; @@ -559,6 +559,106 @@ InstallMethod( EnumeratorSorted, EnumeratorOfTrivialAdditiveMagmaWithZero ); +############################################################################# +## +#F ClosureAdditiveMagmaDefault( , ) closure of add. magma with elm +## +ClosureAdditiveMagmaDefault := function( A, elm ) + + local C, # closure '\< , \>', result + gens, # generators of + gen, # generator of or + Celements, # intermediate list of elements + len; # current number of elements + + gens:= GeneratorsOfAdditiveMagma( A ); + + # try to avoid adding an element to a add. magma that already contains it + if elm in gens + or ( HasAsListSorted( A ) and elm in AsListSorted( A ) ) + then + return A; + fi; + + # make the closure add. magma + gens:= Concatenation( gens, [ elm ] ); + C:= AdditiveMagmaByGenerators( gens ); + UseSubsetRelation( C, A ); + + # if the elements of are known then extend this list + # (multiply each element from the left and right with the new + # generator, and then multiply with all elements until the + # list becomes stable) + if HasAsListSorted( A ) then + + Celements := ShallowCopy( AsListSorted( A ) ); + AddSet( Celements, elm ); + UniteSet( Celements, Celements + elm ); + UniteSet( Celements, elm + Celements ); + repeat + len:= Length( Celements ); + for gen in Celements do + UniteSet( Celements, Celements + gen ); + UniteSet( Celements, gen + Celements ); + od; + until len = Length( Celements ); + + SetAsListSorted( C, AsListSorted( Celements ) ); + SetIsFinite( C, true ); + SetSize( C, Length( Celements ) ); + + fi; + + # return the closure + return C; +end; + + +############################################################################# +## +#M Enumerator( ) . . . . . . . . . set of the elements of an add. magma +#M EnumeratorSorted( ) . . . . . . set of the elements of an add. magma +## +EnumeratorOfAdditiveMagma := function( A ) + + local gens, # add. magma generators of + H, # subadd. magma of the first generators of + gen; # generator of + + # handle the case of an empty add. magma + gens:= GeneratorsOfAdditiveMagma( A ); + if IsEmpty( gens ) then + return []; + fi; + + # start with the empty add. magma and its element list + H:= SubadditiveMagma( A, [] ); + SetAsListSorted( H, Immutable( [ ] ) ); + + # Add the generators one after the other. + # We use a function that maintains the elements list for the closure. + for gen in gens do + H:= ClosureAdditiveMagmaDefault( H, gen ); + od; + + # return the list of elements + Assert( 2, HasAsListSorted( H ) ); + return AsListSorted( H ); +end; + +InstallMethod( Enumerator, + "generic method for an add. magma", + true, + [ IsAdditiveMagma and IsAttributeStoringRep ], 0, + EnumeratorOfAdditiveMagma ); + +InstallMethod( EnumeratorSorted, + "generic method for an add. magma", + true, + [ IsAdditiveMagma and IsAttributeStoringRep ], 0, + EnumeratorOfAdditiveMagma ); + + ############################################################################# ## #M IsSubset( , ) . . . . . . . . . . . . . . for two additive magmas diff --git a/lib/algebra.gi b/lib/algebra.gi index 97d025351e..4d86bfc122 100644 --- a/lib/algebra.gi +++ b/lib/algebra.gi @@ -1328,7 +1328,7 @@ InstallMethod( AsFLMLORWithOne, A:= FLMLORWithOne( F, GeneratorsOfLeftModule( V ) ); if A <> V then - Error( " is not a FLMLOR-with-one" ); + return fail; fi; if HasBasisOfDomain( V ) then SetBasisOfDomain( A, BasisOfDomain( V ) ); @@ -1342,7 +1342,7 @@ InstallMethod( AsFLMLORWithOne, y -> x * y ) ) ); A:= FLMLORWithOne( F, L ); if A <> V then - Error( " is not a FLMLOR-with-one" ); + return fail; fi; elif IsSubset( F, LeftActingDomain( V ) ) then @@ -1351,11 +1351,11 @@ InstallMethod( AsFLMLORWithOne, L:= BasisVectors( BasisOfDomain( AsField( LeftActingDomain(V), F ) ) ); if ForAny( L, x -> ForAny( GeneratorsOfLeftModule( V ), y -> not x * y in V ) ) then - Error( "field change leads out of " ); + return fail; fi; A:= FLMLORWithOne( F, GeneratorsOfLeftModule( V ) ); if A <> V then - Error( " is not a FLMLOR-with-one" ); + return fail; fi; else @@ -1409,7 +1409,7 @@ InstallMethod( AsFLMLORWithOne, L:= BasisVectors( BasisOfDomain( AsField( LeftActingDomain(D), F ) ) ); if ForAny( L, x -> ForAny( GeneratorsOfAlgebra( D ), y -> not x * y in D ) ) then - Error( "field change leads out of " ); + return fail; fi; A:= FLMLORWithOne( F, GeneratorsOfLeftOperatorRing( D ) ); @@ -1459,7 +1459,7 @@ InstallMethod( AsFLMLORWithOne, L:= BasisVectors( BasisOfDomain( AsField( LeftActingDomain(D), F ) ) ); if ForAny( L, x -> ForAny( GeneratorsOfAlgebra( D ), y -> not x * y in D ) ) then - Error( "field change leads out of the algebra" ); + return fail; fi; A:= AlgebraWithOne( F, GeneratorsOfAlgebra( D ) ); @@ -1815,7 +1815,7 @@ InstallMethod( IsSubset, ## For associative algebras(-with-one), we need to check only the products ## of algebra(-with-one) generators. ## -InstallOtherMethod( IsLeftIdeal, +InstallOtherMethod( IsLeftIdealOp, "method for FLMLOR and free left module", IsIdentical, [ IsFLMLOR, IsFreeLeftModule ], 0, @@ -1823,7 +1823,7 @@ InstallOtherMethod( IsLeftIdeal, GeneratorsOfLeftModule, GeneratorsOfLeftModule ) ); -InstallOtherMethod( IsLeftIdeal, +InstallOtherMethod( IsLeftIdealOp, "method for associative FLMLOR and free left module", IsIdentical, [ IsFLMLOR and IsAssociative, IsFreeLeftModule ], 0, @@ -1831,7 +1831,7 @@ InstallOtherMethod( IsLeftIdeal, GeneratorsOfLeftOperatorRing, GeneratorsOfLeftModule ) ); -InstallOtherMethod( IsLeftIdeal, +InstallOtherMethod( IsLeftIdealOp, "method for associative FLMLOR-with-one and free left module", IsIdentical, [ IsFLMLORWithOne and IsAssociative, IsFreeLeftModule ], 0, @@ -1839,7 +1839,7 @@ InstallOtherMethod( IsLeftIdeal, GeneratorsOfLeftOperatorRingWithOne, GeneratorsOfLeftModule ) ); -InstallMethod( IsLeftIdeal, +InstallMethod( IsLeftIdealOp, "method for associative FLMLOR and FLMLOR", IsIdentical, [ IsFLMLOR and IsAssociative, IsFLMLOR ], 0, @@ -1859,7 +1859,7 @@ InstallMethod( IsLeftIdeal, ## For associative algebras(-with-one), we need to check only the products ## of algebra(-with-one) generators. ## -InstallOtherMethod( IsRightIdeal, +InstallOtherMethod( IsRightIdealOp, "method for FLMLOR and free left module", IsIdentical, [ IsFLMLOR, IsFreeLeftModule ], 0, @@ -1867,7 +1867,7 @@ InstallOtherMethod( IsRightIdeal, GeneratorsOfLeftModule, GeneratorsOfLeftModule ) ); -InstallOtherMethod( IsRightIdeal, +InstallOtherMethod( IsRightIdealOp, "method for associative FLMLOR and free left module", IsIdentical, [ IsFLMLOR and IsAssociative, IsFreeLeftModule ], 0, @@ -1875,7 +1875,7 @@ InstallOtherMethod( IsRightIdeal, GeneratorsOfLeftOperatorRing, GeneratorsOfLeftModule ) ); -InstallOtherMethod( IsRightIdeal, +InstallOtherMethod( IsRightIdealOp, "method for associative FLMLOR-with-one and free left module", IsIdentical, [ IsFLMLORWithOne and IsAssociative, IsFreeLeftModule ], 0, @@ -1883,7 +1883,7 @@ InstallOtherMethod( IsRightIdeal, GeneratorsOfLeftOperatorRingWithOne, GeneratorsOfLeftModule ) ); -InstallMethod( IsRightIdeal, +InstallMethod( IsRightIdealOp, "method for associative FLMLOR and FLMLOR", IsIdentical, [ IsFLMLOR and IsAssociative, IsFLMLOR ], 0, @@ -2032,7 +2032,7 @@ InstallMethod( AsSubalgebra, function( A, U ) local S; if not IsSubset( A, U ) then - Error( " must be a subset of " ); + return fail; fi; # Construct the generators list. @@ -2057,7 +2057,7 @@ InstallMethod( AsSubalgebra, function( A, U ) local S; if not IsSubset( A, U ) then - Error( " must be a subset of " ); + return fail; fi; # Construct the generators list. @@ -2084,10 +2084,8 @@ InstallMethod( AsSubalgebraWithOne, IsIdentical, [ IsAlgebra, IsAlgebra ], 0, function( A, U ) local S; - if not IsSubset( A, U ) then - Error( " must be a subset of " ); - elif One( U ) = fail then - Error( " does not contain an identity element" ); + if not IsSubset( A, U ) or One( U ) = fail then + return fail; fi; if LeftActingDomain( A ) <> LeftActingDomain( U ) then @@ -2110,7 +2108,7 @@ InstallMethod( AsSubalgebraWithOne, function( A, U ) local S; if not IsSubset( A, U ) then - Error( " must be a subset of " ); + return fail; fi; if LeftActingDomain( A ) <> LeftActingDomain( U ) then @@ -2259,7 +2257,7 @@ end; ## #M Centralizer( , ) . . . . . . cent. of a vector space in an algebra ## -InstallMethod( Centralizer, +InstallMethod( CentralizerOp, "method for a finite dimensional algebra and a vector space with parent", IsIdentical, [ IsAlgebra, IsVectorSpace and HasParent ], 0, @@ -2277,7 +2275,7 @@ InstallMethod( Centralizer, ## #M Centralizer( , ) . . cent. of a vector space in an assoc. algebra ## -InstallMethod( Centralizer, +InstallMethod( CentralizerOp, "method for a fin. dim. assoc. algebra and a vector space with parent", IsIdentical, [ IsAlgebra and IsAssociative, IsVectorSpace and HasParent ], 0, @@ -2295,7 +2293,7 @@ InstallMethod( Centralizer, ## #M Centralizer( , ) . . . . . . cent. of a vector space in an algebra ## -InstallMethod( Centralizer, +InstallMethod( CentralizerOp, "method for a finite dimensional algebra and a vector space", IsIdentical, [ IsAlgebra, IsVectorSpace ], 0, @@ -2313,7 +2311,7 @@ InstallMethod( Centralizer, ## #M Centralizer( , ) . . cent. of a vector space in an assoc. algebra ## -InstallMethod( Centralizer, +InstallMethod( CentralizerOp, "method for a fin. dim. assoc. algebra and a vector space", IsIdentical, [ IsAlgebra and IsAssociative, IsVectorSpace ], 0, @@ -2331,7 +2329,7 @@ InstallMethod( Centralizer, ## #M Centralizer( , ) . . . . . . . cent. of an element in an algebra ## -InstallMethod( Centralizer, +InstallMethod( CentralizerOp, "method for an algebra and an element", IsCollsElms, [ IsAlgebra, IsObject ], 0, @@ -2502,12 +2500,20 @@ InstallMethod( ProductSpace, # Look for the ideal relation that allows to construct an ideal. if IsIdentical( U, V ) then P:= U; - elif HasParent( V ) and IsIdentical( Parent( V ), U ) then + elif HasParent( V ) and IsIdentical( Parent( V ), U ) + and HasIsIdealInParent( V ) + and IsIdealInParent( V ) then P:= U; - elif HasParent( U ) and IsIdentical( Parent( U ), V ) then + elif HasParent( U ) and IsIdentical( Parent( U ), V ) + and HasIsIdealInParent( U ) + and IsIdealInParent( U ) then P:= V; - elif HasParent( U ) and HasParent( V ) - and IsIdentical( Parent( V ), Parent( U ) ) then + elif HasParent( U ) and HasParent( V ) + and IsIdentical( Parent( V ), Parent( U ) ) + and HasIsIdealInParent( U ) + and IsIdealInParent( U ) + and HasIsIdealInParent( V ) + and IsIdealInParent( V ) then P:= Parent( U ); else TryNextMethod(); diff --git a/lib/algfp.gi b/lib/algfp.gi index 9cb0af33ff..662013e548 100644 --- a/lib/algfp.gi +++ b/lib/algfp.gi @@ -179,7 +179,51 @@ InstallMethod( \=, return ExtRepOfObj( x ) = ExtRepOfObj( y ); end ); -#T missing: \<, \= method to look for normal form in the family +#T missing: \= method to look for normal form in the family + + +############################################################################# +## +#M \<( , ) . . . . . . . . for two normalized f.p. algebra elements +## +## The ordering is defined as follows. +## Expressions with less summands are shorter, +## and for expressions with the same number of summands, +## the words in algebra generators and the coefficients are compared +## according to the ordering in the external representation. +## +InstallMethod( \<, + "method for two normalized f.p. algebra elements", + IsIdentical, + [ IsElementOfFpAlgebra and IsNormalForm, + IsElementOfFpAlgebra and IsNormalForm ], 0, + function( x, y ) + local lenx, leny, i; + + x:= ExtRepOfObj( x )[2]; + y:= ExtRepOfObj( y )[2]; + lenx:= Length( x ); + leny:= Length( y ); + + # Compare the lengths. + if lenx < leny then + return true; + elif leny < lenx then + return false; + fi; + + # For expressions of same length, compare the summands. + for i in [ 1 .. lenx ] do + if x[i] < y[i] then + return true; + elif y[i] < x[i] then + return false; + fi; + od; + + # The operands are equal. + return false; + end ); ############################################################################# @@ -298,6 +342,24 @@ function(a) end); +############################################################################# +## +#M One( ) +## +InstallOtherMethod( One, + "method for an f.p. algebra element", + true, + [ IsElementOfFpAlgebra and IsPackedAlgebraElmDefaultRep ], 0, + function( elm ) + local one; + one:= One( elm![1] ); + if one <> fail then + one:= ElementOfFpAlgebra( FamilyObj( elm ), one ); + fi; + return one; + end ); + + ############################################################################# ## #M Zero( ) @@ -339,7 +401,8 @@ function(a,b) return ElementOfFpAlgebra(FamilyObj(a),a![1]*b); end); -#AH Embedding can only be defined reasonably if a 'One' is present +#AH Embedding can only be defined reasonably if a 'One' different from +#AH the zero is present #AH (The factor may collaps). diff --git a/lib/alglie.gi b/lib/alglie.gi index 584b1e9f2b..663584f13d 100644 --- a/lib/alglie.gi +++ b/lib/alglie.gi @@ -2583,9 +2583,9 @@ FindSl2 := function( L, x ) v:= SolutionMat( eqs, b ); - if v = false then + if v = fail then # There is no sl_2 containing . - return false; + return fail; fi; z:= LinearCombination( B, v{ [ 1 .. n ] } ); @@ -3548,7 +3548,7 @@ InstallMethod( UniversalEnvelopingAlgebra, # Enter knowledge about 'U'. SetDimension( U, infinity ); - for gen in GeneratorsOfLeftOperatorRing( U ) do + for gen in GeneratorsOfLeftOperatorRingWithOne( U ) do SetIsNormalForm( gen, true ); od; SetIsNormalForm( Zero( U ), true ); diff --git a/lib/algmat.gi b/lib/algmat.gi index cd3e43fbf5..d247c5c735 100644 --- a/lib/algmat.gi +++ b/lib/algmat.gi @@ -788,7 +788,7 @@ end; ## #M Centralizer( , ) . . . . . . . . . for matrix FLMLOR and matrix ## -InstallMethod( Centralizer, +InstallMethod( CentralizerOp, "method for associative Gaussian matrix FLMLOR, and matrix", IsCollsElms, [ IsMatrixFLMLOR and IsAssociative and IsGaussianSpace, @@ -806,7 +806,7 @@ InstallMethod( Centralizer, ## #M Centralizer( , ) . . . . . . . for matrix FLMLOR and matrix FLMLOR ## -InstallMethod( Centralizer, +InstallMethod( CentralizerOp, "method for associative Gaussian matrix FLMLOR, and FLMLOR", IsIdentical, [ IsMatrixFLMLOR and IsAssociative and IsGaussianSpace, @@ -824,7 +824,7 @@ InstallMethod( Centralizer, ## #M Centralizer( , ) . . . . . for matrix FLMLOR-with-one and matrix ## -InstallMethod( Centralizer, +InstallMethod( CentralizerOp, "method for associative Gaussian matrix FLMLOR-with-one, and matrix", IsCollsElms, [ IsMatrixFLMLOR and IsFLMLORWithOne @@ -843,7 +843,7 @@ InstallMethod( Centralizer, ## #M Centralizer( , ) . . for matrix FLMLOR-with-one and matrix FLMLOR ## -InstallMethod( Centralizer, +InstallMethod( CentralizerOp, "method for associative Gaussian matrix FLMLOR-with-one, and FLMLOR", IsIdentical, [ IsMatrixFLMLOR and IsFLMLORWithOne @@ -923,7 +923,7 @@ end; ## #M Centralizer( , ) . . . . . . . for full associative matrix algebra ## -InstallMethod( Centralizer, +InstallMethod( CentralizerOp, "method for full (associative) matrix FLMLOR, and FLMLOR", IsIdentical, [ IsMatrixFLMLOR and IsFullMatrixModule, IsFLMLOR ], 0, @@ -935,7 +935,7 @@ InstallMethod( Centralizer, GeneratorsOfAlgebra( S ) ); end ); -InstallMethod( Centralizer, +InstallMethod( CentralizerOp, "method for full (associative) matrix FLMLOR, and left module", IsIdentical, [ IsMatrixFLMLOR and IsFullMatrixModule, IsLeftModule ], 0, @@ -947,7 +947,7 @@ InstallMethod( Centralizer, GeneratorsOfLeftModule( S ) ); end ); -InstallMethod( Centralizer, +InstallMethod( CentralizerOp, "method for full (associative) matrix FLMLOR, and list of matrices", IsIdentical, [ IsMatrixFLMLOR and IsFullMatrixModule, IsCollection and IsList ], 0, @@ -958,7 +958,7 @@ InstallMethod( Centralizer, return FullMatrixAlgebraCentralizer( LeftActingDomain( A ), S ); end ); -InstallMethod( Centralizer, +InstallMethod( CentralizerOp, "method for full (associative) matrix FLMLOR, and empty list", true, [ IsMatrixFLMLOR and IsFullMatrixModule, IsList and IsEmpty ], 0, diff --git a/lib/basis.gd b/lib/basis.gd index fcb8bdd00e..1207a028cf 100644 --- a/lib/basis.gd +++ b/lib/basis.gd @@ -214,6 +214,8 @@ LinearCombination := NewOperation( "LinearCombination", ## ## is defined only for semi-echelonized bases of Gaussian row and matrix ## vector spaces. +## If the scalars in the vector are not all contained in the +## underlying left module of then `fail' is returned. ## SiftedVector := NewOperation( "SiftedVector", [ IsBasis, IsVector ] ); #T more restrictive (SEB)? diff --git a/lib/clas.gd b/lib/clas.gd index da471a45fd..15f74e42ca 100644 --- a/lib/clas.gd +++ b/lib/clas.gd @@ -4,45 +4,6 @@ ## #H @(#)$Id$ ## -#H $Log$ -#H Revision 4.12 1997/06/10 14:47:15 stand -#H Added declaration of 'GeneratorsPrimeResidueClassGroup'. AH -#H -#H Revision 4.11 1997/05/29 06:51:19 sam -#H moved `InstallTrueMethod' calls to the `gd' files -#H -#H Revision 4.10 1997/03/11 12:44:25 ahulpke -#H Moved random class serach into a separate function -#H -#H Revision 4.9 1997/01/16 10:46:18 fceller -#H renamed 'NewConstructor' to 'NewOperation', -#H renamed 'NewOperationFlags1' to 'NewConstructor' -#H -#H Revision 4.8 1997/01/11 13:02:40 htheisse -#H fixed an error in `CentralStepRatClPGroup'; cleaned up the code -#H -#H Revision 4.7 1997/01/10 08:45:31 htheisse -#H added conjugacy class functions for perm groups and pcgs groups -#H -#H Revision 4.6 1996/12/19 09:58:51 htheisse -#H added revision lines -#H -#H Revision 4.5 1996/12/17 13:49:45 htheisse -#H improved enumerator for rational classes -#H -#H Revision 4.4 1996/10/31 12:23:06 htheisse -#H changed representation of conjugacy classes to `ExternalOrbitByStabilizer' -#H -#H Revision 4.3 1996/10/11 07:04:27 htheisse -#H added operation `RightTransversal' -#H -#H Revision 4.2 1996/10/09 13:31:29 htheisse -#H made conjugacy class functions work (at least for M24) -#H -#H Revision 4.1 1996/10/09 11:37:56 htheisse -#H made first steps towards computation of conjugacy classes -#H -## Revision.clas_gd := "@(#)$Id$"; @@ -67,7 +28,11 @@ IsExternalOrbitByStabilizerEnumerator := NewRepresentation ############################################################################# ## #R IsConjugacyClassGroupRep . . . . . . . . . . . conjugacy class in group +#R IsConjugacyClassPermGroupRep . . . . . . . . . conjugacy class in group ## +## Conjugacy classes have the representation `IsConjugacyClassGroupRep', a +## subrepresentation is `IsConjugacyClassPermGroupRep' for permutation +## groups. IsConjugacyClassGroupRep := NewRepresentation( "IsConjugacyClassGroupRep", IsExternalOrbitByStabilizerRep, [ ] ); @@ -78,6 +43,12 @@ IsConjugacyClassPermGroupRep := NewRepresentation ## #C ConjugacyClass( , ) . . . . . . . . . conjugacy class constructor ## +## creates the conjugacy class in $G$ with representative $g$. +## A conjugacy class is an +## external orbit ("ExternalOrbit") of group elements with the group acting +## by conjugation on it. Thus element tests or operation representatives can be +## computed. The attribute `Centralizer' gives the centralizer of +## the representative which is the same result as `StabilizerOfExternalSet'. ConjugacyClass := NewOperation( "ConjugacyClass", [ IsGroup, IsObject ] ); #T 1997/01/16 fceller was old 'NewConstructor' @@ -86,6 +57,9 @@ ConjugacyClass := NewOperation( "ConjugacyClass", [ IsGroup, IsObject ] ); ## #R IsRationalClassGroupRep . . . . . . . . . . . . . rational class in group ## +## Rational classes have the representation `IsRationalClassGroupRep', a +## subrepresentation is `IsRationalClassPermGroupRep' for permutation +## groups. IsRationalClassGroupRep := NewRepresentation( "IsRationalClassGroupRep", IsComponentObjectRep and IsAttributeStoringRep and IsExternalSet, [ "galoisGroup", "power" ] ); @@ -108,14 +82,31 @@ InstallTrueMethod( IsFinite, IsRationalClassGroupRep and IsDomain ); ## #C RationalClass( , ) . . . . . . . . . . rational class constructor ## +## creates the rational class in $G$ with representative $g$. +## A rational class consists of elements that are conjugate to +## $g$ or to a power $g^i$ where $i$ is coprime to the order of $g$. Thus a +## rational class can be interpreted as a conjugacy class of cyclic subgroups. +## A rational class is an external set ("IsExternalSet") of group elements with +## the group acting by conjugation on it but not an external orbit. +## +## The exponents $i$ for which $^i$ +## lies already in the ordinary conjugacy class of , form a subgroup +## of the *prime residue class group* $P_n$ (see "where"), the so-called +## *Galois group* of the rational class. The prime residue class group $P_n$ +## is obtained in {\GAP} as `Units( Integers mod )', the unit group +## of a residue class ring. The Galois group of a rational class +## is stored in the attribute `GaloisGroup( )' as a subgroup of this +## group. +#T Is the next true? should it be that way? +## There is an exeception for the class of the identity element, because the +## residue class ring `Integers mod 1' has no units. Since the Galois group +## of the identity is trivial, it is simply represented as `Units( Integers +## mod 2 )'. RationalClass := NewOperation( "RationalClass", [ IsGroup, IsObject ] ); #T 1997/01/16 fceller was old 'NewConstructor' DecomposedRationalClass := NewOperationArgs( "DecomposedRationalClass" ); -PermResidueClass := NewOperationArgs( "PermResidueClass" ); -GeneratorsPrimeResidueClassGroup := - NewOperationArgs( "GeneratorsPrimeResidueClassGroup" ); -PrimeResidueClassGroup := NewOperationArgs( "PrimeResidueClassGroup" ); +GroupByPrimeResidues := NewOperationArgs( "GroupByPrimeResidues" ); ConjugacyClassesByRandomSearch := NewOperationArgs( "ConjugacyClassesByRandomSearch" ); ConjugacyClassesTry := NewOperationArgs( "ConjugacyClassesTry" ); @@ -133,7 +124,7 @@ GeneralStepClEANS := NewOperationArgs( "GeneralStepClEANS" ); ClassesSolvableGroup := NewOperationArgs( "ClassesSolvableGroup" ); CompleteGaloisGroupPElement := NewOperationArgs( "CompleteGaloisGroupPElement" ); -ConstructList := NewOperationArgs( "ConstructList" ); +RatClasPElmArrangeClasses := NewOperationArgs( "RatClasPElmArrangeClasses" ); SortRationalClasses := NewOperationArgs( "SortRationalClasses" ); FusionRationalClassesPSubgroup := NewOperationArgs( "FusionRationalClassesPSubgroup" ); RationalClassesPElements := NewOperationArgs( "RationalClassesPElements" ); diff --git a/lib/clas.gi b/lib/clas.gi index ae30138d0f..94d64067ca 100644 --- a/lib/clas.gi +++ b/lib/clas.gi @@ -17,7 +17,7 @@ InstallMethod( Enumerator, true, [ IsExternalOrbitByStabilizerRep ], 0, enum := Objectify( NewType( FamilyObj( xorb ), IsExternalOrbitByStabilizerEnumerator ), - rec( rightTransversal := RightTransversal( ActingDomain( xorb ), + rec( rightTransversal := RightTransversalInParent( StabilizerOfExternalSet( xorb ) ) ) ); SetUnderlyingCollection( enum, xorb ); return enum; @@ -138,7 +138,7 @@ InstallMethod( Size, [ IsConjugacyClassGroupRep ], 0, cl -> Index( ActingDomain( cl ), StabilizerOfExternalSet( cl ) ) ); -InstallOtherMethod( Centralizer, true, [ IsConjugacyClassGroupRep ], 0, +InstallOtherMethod( CentralizerOp, true, [ IsConjugacyClassGroupRep ], 0, StabilizerOfExternalSet ); ############################################################################# @@ -247,7 +247,8 @@ ConjugacyClassesTry := function ( G, classes, elm, length, fixes ) end; -InstallMethod( ConjugacyClasses, true, [ IsGroup ], 20, +InstallMethod( ConjugacyClasses, "try solvable method", true, + [ IsGroup ], 0, function( G ) local cls, cl, c; @@ -298,7 +299,7 @@ InstallMethod( \=, IsIdentical, [ IsRationalClassGroupRep, return ForAny( RightTransversalInParent( GaloisGroup( cl1 ) ), e -> RepresentativeOperation( ActingDomain( cl1 ), Representative( cl1 ), - Representative( cl2 ) ^ ( 1 ^ e ) ) <> fail ); + Representative( cl2 ) ^ Int( e ) ) <> fail ); end ); ############################################################################# @@ -310,7 +311,7 @@ InstallMethod( \in, IsElmsColls, [ IsObject, IsRationalClassGroupRep ], 0, return ForAny( RightTransversalInParent( GaloisGroup( cl ) ), e -> RepresentativeOperation( ActingDomain( cl ), Representative( cl ), - g ^ ( 1 ^ e ) ) <> fail ); + g ^ Int( e ) ) <> fail ); end ); ############################################################################# @@ -353,10 +354,10 @@ DecomposedRationalClass := function( cl ) C := StabilizerOfExternalSet( cl ); rep := Representative( cl ); gal := GaloisGroup( cl ); - T := RightTransversal( Parent( gal ), gal ); + T := RightTransversalInParent( gal ); cls := [ ]; for e in T do - c := ConjugacyClass( G, rep ^ ( 1 ^ e ) ); + c := ConjugacyClass( G, rep ^ Int( e ) ); SetStabilizerOfExternalSet( c, C ); Add( cls, c ); od; @@ -400,7 +401,7 @@ InstallMethod( \[\], true, [ IsRationalClassGroupEnumerator, pos := pos - 1; pow := QuoInt( pos, Length( T ) ) + 1; pos := pos mod Length( T ) + 1; - return ( rep ^ T[ pos ] ) ^ ( 1 ^ gal[ pow ] ); + return ( rep ^ T[ pos ] ) ^ Int( gal[ pow ] ); end ); InstallMethod( PositionCanonical, true, @@ -414,7 +415,7 @@ InstallMethod( PositionCanonical, true, gal := RightTransversalInParent( GaloisGroup( rcl ) ); T := enum!.rightTransversal; for pow in [ 1 .. Length( gal ) ] do - t := RepresentativeOperation( G, rep ^ ( 1 ^ gal[ pow ] ), elm ); + t := RepresentativeOperation( G, rep ^ Int( gal[ pow ] ), elm ); if t <> fail then break; fi; @@ -426,7 +427,7 @@ InstallMethod( PositionCanonical, true, fi; end ); -InstallOtherMethod( Centralizer, true, [ IsRationalClassGroupRep ], 0, +InstallOtherMethod( CentralizerOp, true, [ IsRationalClassGroupRep ], 0, StabilizerOfExternalSet ); ############################################################################# @@ -440,106 +441,55 @@ InstallMethod( AsList, true, [ IsRationalClassGroupRep ], 0, aslist := [ ]; orb := Orbit( ActingDomain( rcl ), Representative( rcl ) ); for e in RightTransversalInParent( GaloisGroup( rcl ) ) do - Append( aslist, List( orb, g -> g ^ ( 1 ^ e ) ) ); + Append( aslist, List( orb, g -> g ^ Int( e ) ) ); od; return aslist; end ); -############################################################################# -## -#F PermResidueClass( , ) . . residue class as permutation on [1..n] -## -PermResidueClass := function( r, n ) - return PermList( List( [ 1 .. n - 1 ] * r, i -> i mod n ) ); -end; - -############################################################################# -## -#F GeneratorsPrimeResidueClassGroup() . . . residue class representatives -## -GeneratorsPrimeResidueClassGroup := function(m) -local gens, # generating residues - p, q, # prime and prime power dividing - r, # primitive root modulo - g; # is = mod and = 1 mod / - - # add generators for each prime power factor of - gens := []; - for p in Set( FactorsInt( m ) ) do - q := p; - while m mod (q * p) = 0 do q := q * p; od; - - # $ Z / 4Z = < 3 > $ - if q = 4 then - r := 3; - g := r + q * (((1/q mod (m/q)) * (1 - r)) mod (m/q)); - Add( gens, g ); - - # $ Z / 8nZ = < 5, -1 > $ is *not* cyclic - elif q mod 8 = 0 then - r := q-1; - g := r + q * (((1/q mod (m/q)) * (1 - r)) mod (m/q)); - Add( gens, g); - r := 5; - g := r + q * (((1/q mod (m/q)) * (1 - r)) mod (m/q)); - Add( gens, g ); - - # for odd $ Z / qZ $ is cyclic - elif q <> 2 then - r := PrimitiveRootMod( q ); - g := r + q * (((1/q mod (m/q)) * (1 - r)) mod (m/q)); - Add( gens, g ); - fi; - - od; - return gens; -end; - -############################################################################# -## -#F PrimeResidueClassGroup() . . . . . . . full prime residue class group -## -PrimeResidueClassGroups := [ Group( () ) ]; - -PrimeResidueClassGroup := function ( m ) - local G; # group $Z/mZ$, result - - if not IsBound( PrimeResidueClassGroups[ m ] ) then - - # return the group generated by - G := Group(List(GeneratorsPrimeResidueClassGroup(m), - i->PermResidueClass(i,m)), - PermResidueClass( 1, m ) ); - SetSize( G, Phi( m ) ); - PrimeResidueClassGroups[ m ] := G; - - fi; - return PrimeResidueClassGroups[ m ]; -end; - ############################################################################# ## #M GaloisGroup( ) . . . . . . . . . . . . . . . . . of a rational class ## InstallOtherMethod( GaloisGroup, true, [ IsRationalClassGroupRep ], 0, - function( cl ) - local rep, ord, gals, i; +function( cl ) +local rep, ord, gals, i, pr; rep := Representative( cl ); ord := Order( rep ); gals := [ ]; - for i in [ 1 .. ord - 1 ] do - if GcdInt( i, ord ) = 1 - and RepresentativeOperation( ActingDomain( cl ), - rep, rep ^ i ) <> fail then - Add( gals, PermResidueClass( i, ord ) ); + if ord>1 then + pr:=PrimeResidues(ord); + else + pr:=[]; + fi; + for i in pr do + if RepresentativeOperation( ActingDomain( cl ), + rep, rep ^ i ) <> fail then + Add( gals, i ); fi; od; - return SubgroupNC( PrimeResidueClassGroup( ord ), gals ); + return GroupByPrimeResidues( gals, ord ); end ); ############################################################################# ## +#F GroupByPrimeResidues( , ) . . . . . . . . . . . . . . . local +## +GroupByPrimeResidues := function( gens, oh ) + local R; + + # Replace 1 by 2, because (Z/1Z)* is a nasty group (for GAP). + if oh = 1 then + oh := 2; + fi; + + R := Integers mod oh; + return SubgroupNC( Units( R ), gens * One( R ) ); +end; + +############################################################################# +## + #M RationalClasses( ) . . . . . . . . . . . . . . . . . . . of a group ## InstallMethod( RationalClasses, true, [ IsGroup ], 0, @@ -612,7 +562,6 @@ InstallMethod( RationalClasses, true, [ IsSolvableGroup ], 20, end ); ############################################################################# - #F RationalClassesInEANS( , ) . . . . . . . . by projective operation ## RationalClassesInEANS := function( G, E ) @@ -627,7 +576,7 @@ RationalClassesInEANS := function( G, E ) pcgs := Pcgs( E ); ff := GF( RelativeOrders( pcgs )[ 1 ] ); one := One( ff ); - pro := ProjectiveSpace( ff ^ Length( pcgs ) ); + pro := OneDimSubspacesTransversal( ff ^ Length( pcgs ) ); opr := function( v, g ) return one * ExponentsOfPcElement( pcgs, PcElementByExponents( pcgs, v ) ^ g ); diff --git a/lib/claspcgs.gi b/lib/claspcgs.gi index 684b6538f6..f4a22afff6 100644 --- a/lib/claspcgs.gi +++ b/lib/claspcgs.gi @@ -156,22 +156,6 @@ KernelHcommaC := function( N, h, C ) return tmp; end; -############################################################################# -## -#F GroupByPrimeResidues( , ) . . . . . . . . . . . . . . . local -## -GroupByPrimeResidues := function( gens, oh ) - local perms, gen; - - perms := [ ]; - for gen in gens do - if gen mod oh <> 1 then - Add( perms, PermResidueClass( gen, oh ) ); - fi; - od; - return SubgroupNC( PrimeResidueClassGroup( oh ), perms ); -end; - ############################################################################# ## #F OrderModK( , ) . . . . . . . . . . order modulo normal subgroup @@ -219,12 +203,12 @@ CentralStepRatClPGroup := function( G, N, mK, mL, cl ) h := cl.representative; ohN := OrderModK( h, mK ); oh := OrderModK( h, mL ); - Gal := PrimeResidueClassGroup( oh ); classes := [ ]; if oh = 1 then # Special case: is trivial. + Gal := Units( Integers mod 1 ); gal := GroupByPrimeResidues( [ ], p ); gal!.type := 3; gal!.operators := [ ]; @@ -254,7 +238,7 @@ CentralStepRatClPGroup := function( G, N, mK, mL, cl ) c.galoisGroup!.type := 3; c.galoisGroup!.operators := [ ]; Add( classes, c ); - for v in ProjectiveSpace( GF( p ) ^ Length( N ) ) do + for v in OneDimSubspacesTransversal( GF( p ) ^ Length( N ) ) do c := rec( representative := PcElementByExponents( N, v ), centralizer := G, galoisGroup := gal ); @@ -263,6 +247,7 @@ CentralStepRatClPGroup := function( G, N, mK, mL, cl ) fi; else + Gal := Units( Integers mod oh ); if IsBound( cl.kernel ) then N := cl.kernel; else @@ -310,7 +295,7 @@ CentralStepRatClPGroup := function( G, N, mK, mL, cl ) Q := [ ]; for i in [ 1 .. Length( GeneratorsOfGroup( preimage ) ) ] do Add( Q, ExponentsOfPcElement( N, LeftQuotient( h ^ - ( 1 ^ GeneratorsOfGroup( preimage )[ i ] ), + Int( GeneratorsOfGroup( preimage )[ i ] ), h ^ preimage!.operators[ i ] ) ) ); od; Q := Q * N!.subspace.projection; @@ -387,19 +372,27 @@ CentralStepRatClPGroup := function( G, N, mK, mL, cl ) # . else K := EnumeratorByPcgs( N, N!.subspace.baseComplement ); - preimage := PermResidueClass( PrimitiveRootMod( oh ), oh ) ^ - IndexInParent( cl.galoisGroup ); + cyc := GroupByPrimeResidues( [ PowerModInt + ( PrimitiveRootMod( oh ), + IndexInParent( cl.galoisGroup ), oh ) ], oh ); + SetSize( cyc, Phi( oh ) / IndexInParent( cl.galoisGroup ) ); + if IsTrivial( cyc ) then + preimage := One( cyc ); + else + SetIndependentGeneratorsOfAbelianGroup( cyc, + GeneratorsOfGroup( cyc ) ); + preimage := Pcgs( cyc )[ 1 ]; + fi; if IsTrivial( cl.galoisGroup ) then operator := One( G ); else operator := cl.galoisGroup!.operators[ 1 ]; fi; v := PcElementByExponents( N, N{ N!.subspace.baseComplement }, - ExponentsOfPcElement( N, LeftQuotient( h ^ ( 1 ^ preimage ), + ExponentsOfPcElement( N, LeftQuotient( h ^ Int( preimage ), h ^ operator ) ) * N!.subspace.projection ); - cyc := GroupByGenerators( [ preimage ] ); Pcgs( cyc ); opr := function( k, l ) - return ( v * k ) ^ ( 1 / 1 ^ l mod p ); + return ( v * k ) ^ ( 1 / Int( l ) mod p ); end; xset := ExternalSet( cyc, K, opr ); @@ -433,7 +426,7 @@ CentralStepRatClPGroup := function( G, N, mK, mL, cl ) # corresponding to its generator(s). if p <> 2 then gens := [ exps[ l ] ]; - oprs := [ operator ^ ( 1 ^ exps[ l ] ) ]; + oprs := [ operator ^ Int( exps[ l ] ) ]; fi; gal := SubgroupNC( Gal, gens ); if p = 2 then @@ -442,7 +435,7 @@ CentralStepRatClPGroup := function( G, N, mK, mL, cl ) gal!.operators := [ ]; for i in [ 1 .. Length( GeneratorsOfGroup( gal ) ) ] do Add( gal!.operators, CentralStepConjugatingElement - ( N, h, k, k, 1 ^ GeneratorsOfGroup( gal )[ i ], + ( N, h, k, k, Int( GeneratorsOfGroup( gal )[ i ] ), oprs[ i ] ) ); od; @@ -454,8 +447,8 @@ CentralStepRatClPGroup := function( G, N, mK, mL, cl ) if IsBound( cl.candidates ) then # cl.candidates[l] ^ c.operator = - # c.representative ^ c.exponent - c.exponent := 1 ^ exps[ l ]; + # c.representative ^ c.exponent (DIFFERS from (c^o^e=r)!) + c.exponent := Int( exps[ l ] ); c.operator := CentralStepConjugatingElement ( N, h, cl.candidates[ l ], k, c.exponent, conj[ l ] ); @@ -585,7 +578,7 @@ GeneralStepClEANS := function( H, U, N, cl ) ran := [ 1 .. r ]; # Construct matrices for the affine operation on $N/[h,N]$. - aff := AffineSpace( field ^ r ); + aff := ExtendedVectors( field ^ r ); gens := InducedPcgsWrtHomePcgs( C ); imgs := [ ]; for c in gens do @@ -668,44 +661,60 @@ end; ############################################################################# ## -#F ClassesSolvableGroup( , , , , ) cool function +#F ClassesSolvableGroup( , , , [, ] ) . . . . . +## +## In this function classes are described by records with components +## `representative', `centralizer', `galoisGroup' (for rational classes). If +## are given, their classes will have a canonical +## `representative' and additional components `operator' and `exponent' (for +## rational classes) such that +## (candidate ^ operator) ^ exponent = representative. (c^o^e=r) ## ClassesSolvableGroup := function( arg ) local G, home, # the supergroup (of and ), the home pcgs U, # group in which to find the -classes + Upcgs, # induced Pcgs of U H, Hp, # group operating on , a pcgs for limit, # limit on order of representatives mode, # LSB: ratCl | power | test :MSB candidates, # candidates to be replaced by their canonical reps. - eas, step, # elementary abelian series in through + eas, # elementary abelian series in through + step, # counter looping over K, L, # members of Kp,mK,Lp,mL, # induced and modulo pcgs's KcapH,LcapH, # pcgs's of intersections with N, cent, # elementary abelian factor, for affine action cls, newcls, # classes in range/source of homomorphism - tra, exp, # transversal and exponents for candidates - team, # team of candidates with same image under homomorphism + news, # new classes obtained in step + cl, # class looping over + opr, exp, # (candidates[i]^opr[i])^exp[i]=cls[i].representative + team, # team of candidates with same image modulo blist,pos,q, # these control grouping of into s p, # prime dividing $|G|$ - ord, # order of a rational class modulo + ord, # order of a rational class modulo new, power, # auxiliary variables for determination of power tree - cl, c, i; # loop variables + c, i; # loop variables # Get the arguments. - H := arg[ 1 ]; - U := arg[ 2 ]; - limit := arg[ 3 ]; - mode := arg[ 4 ]; - if limit = true then - limit := rec( order := infinity, - size := 0 ); - fi; + H := arg[ 1 ]; # the operating group + U := arg[ 2 ]; # the group on which acts by conjugation if H = U then G := H; else G := ClosureGroup( H, U ); fi; + limit := arg[ 3 ]; # if limit <> true, restricts the classes computed: + if limit = true then # only classes will be output which have + limit := rec( order := infinity, # rep. order dividing `order' + size := 0 ); # class size dividing `size' + fi; + mode := arg[ 4 ]; # explained below whenever it appears + + # is a list of elements whose classes will be output (but + # with canonical representatives), see comment above. Or is + # just one element, from whose output class the centralizer will be read + # off. if Length( arg ) = 5 then candidates := arg[ 5 ]; else candidates := false; fi; - # Treat the trivial case. + # Treat the case of a trivial group. if IsTrivial( U ) then if mode = 4 then # test conjugacy of two elements return One( U ); @@ -735,7 +744,8 @@ ClassesSolvableGroup := function( arg ) return cls; fi; - # Calculate a (central) elementary abelian series. + # Calculate a (central) elementary abelian series with all pcgs induced + # w.r.t. . if not IsPermGroup( G ) then HomePcgs( G ); fi; @@ -749,16 +759,21 @@ ClassesSolvableGroup := function( arg ) eas := ElementaryAbelianSeries( G ); cent := function( cl, N, L ) return ForAll( N, k -> ForAll - ( InducedPcgsWrtHomePcgs( cl.centralizer ) - { [ 1 .. Length( InducedPcgsWrtHomePcgs( cl.centralizer ) ) - - Length( InducedPcgsWrtHomePcgs( L ) ) ] }, + ( InducedPcgsWrtHomePcgs( cl.centralizer ), +#T was: Only those elements form the induced PCGS. The subset seemed to +#T enforce taking only the elements up, but the ordering of the series used +#T may be different then the ordering in the PCGS. So this will fail. AH +#T one might pick the right ones, but this would be almost the same work. +#T { [ 1 .. Length( InducedPcgsWrtHomePcgs( cl.centralizer ) ) +#T - Length( InducedPcgsWrtHomePcgs( L ) ) ] }, c -> Comm( k, c ) in L ) ); end; fi; G := eas[ 1 ]; home := HomePcgs( G ); + Upcgs:=InducedPcgsByGeneratorsNC(home,GeneratorsOfGroup(U)); H := AsSubgroup( G, H ); - Hp := InducedPcgsWrtHomePcgs( H ); + Hp := InducedPcgsByGeneratorsNC(home, GeneratorsOfGroup(H)); # Initialize the algorithm for the trivial group. step := 1; @@ -766,19 +781,19 @@ ClassesSolvableGroup := function( arg ) step := step + 1; od; L := eas[ step ]; - Lp := InducedPcgsWrtHomePcgs( L ); - if not IsIdentical( G, H ) then + Lp := InducedPcgsByGeneratorsNC(home,GeneratorsOfGroup( L )); + if not (G=H) then LcapH := NormalIntersectionPcgs( home, Hp, Lp ); fi; if mode mod 2 = 1 # rational classes or IsIdentical( FamilyObj( G ), FamilyObj( candidates ) ) then - mL := ModuloPcgsByPcSequenceNC( home, Pcgs( U ), Lp ); + mL := ModuloPcgsByPcSequenceNC( home, Upcgs, Lp ); fi; if candidates <> false # centralizer calculation and not IsIdentical( FamilyObj( G ), FamilyObj( candidates ) ) then cl := rec( representative := candidates, centralizer := H ); - tra := One( U ); + opr := One( U ); elif mode mod 2 = 1 then # rational classes cl := rec( representative := One( U ), centralizer := H, @@ -797,7 +812,7 @@ ClassesSolvableGroup := function( arg ) fi; if IsIdentical( FamilyObj( G ), FamilyObj( candidates ) ) then cls := List( candidates, c -> cl ); - tra := List( candidates, c -> One( U ) ); + opr := List( candidates, c -> One( U ) ); exp := ListWithIdenticalEntries( Length( candidates ), 1 ); else cls := [ cl ]; @@ -806,23 +821,35 @@ ClassesSolvableGroup := function( arg ) # Now go back through the factors by all groups in the elementary abelian # series. for step in [ step + 1 .. Length( eas ) ] do + + # We apply the homomorphism principle to the homomorphism G/L -> G/K. + # The actual computations are all done in , factors are + # represented by modulo pcgs. K := L; Kp := Lp; L := eas[ step ]; - Lp := InducedPcgsWrtHomePcgs( L ); - N := Kp mod Lp; + Lp := InducedPcgsByGeneratorsNC(home, GeneratorsOfGroup(L) ); + N := Kp mod Lp; # modulo pcgs representing the kernel + + #T What is this? Obviously it is needed somewhere, but it is + #T certainly not good programming style. AH SetFilterObj( N, IsPcgs ); - if not IsIdentical( G, H ) then + + if Size( G ) <> Size( H ) then KcapH := LcapH; LcapH := NormalIntersectionPcgs( home, Hp, Lp ); N!.capH := KcapH mod LcapH; + #T See above + SetFilterObj( N!.capH, IsPcgs ); else N!.capH := N; fi; - if mode mod 2 = 1 # rational classes; construct the power tree + + # Rational classes or identification of classes. + if mode mod 2 = 1 or IsIdentical( FamilyObj( G ), FamilyObj( candidates ) ) then mK := mL; - mL := ModuloPcgsByPcSequenceNC( home, Pcgs( U ), Lp ); + mL := ModuloPcgsByPcSequenceNC( home, Upcgs, Lp ); fi; # Identification of classes. @@ -837,7 +864,7 @@ ClassesSolvableGroup := function( arg ) pos := Position( blist, false ); while pos <> fail do - # Find a team with same image under . + # Find a team of candidates with same image under . cl := cls[ pos ]; cl.representative := PcElementByExponents( mK, ExponentsOfPcElement( mK, cl.representative ) ); @@ -847,7 +874,7 @@ ClassesSolvableGroup := function( arg ) while q <> fail do if cls[ q ].representative / cl.representative in K then - c := candidates[ q ] ^ tra[ q ]; + c := candidates[ q ] ^ opr[ q ]; if mode mod 2 = 1 then # rational classes c := c ^ exp[ q ]; fi; @@ -863,25 +890,37 @@ ClassesSolvableGroup := function( arg ) fi; q := Position( blist, false, q ); od; - + + # Now is a class modulo (possibly with + # `.candidates' a list of elements mapping into this + # class modulo ). Let be a list of all classes + # modulo that map to modulo (resp. a list of + # classes to which the list `.candidates' maps modulo + # , together with `operator's and `exponent's as in + # (c^o^e=r)). if mode mod 2 = 1 then # rational classes - newcls := CentralStepRatClPGroup( U, N, mK, mL, cl ); + newcls := CentralStepRatClPGroup( H, N, mK, mL, cl ); elif cent( cl, N, L ) then newcls := CentralStepClEANS( H, U, N, cl ); else newcls := GeneralStepClEANS( H, U, N, cl ); fi; - # Update , and . + # Update , and . for i in [ 1 .. Length( team ) ] do for q in team[ i ] do cls[ q ] := newcls[ i ]; - tra[ q ] := tra[ q ] * newcls[ i ].operator; + opr[ q ] := opr[ q ] * newcls[ i ].operator; if mode mod 2 = 1 then # rational classes ord := OrderModK( cls[ q ].representative, mL ); if ord <> 1 then + + # For historical reasons, the `exponent's + # returns by `CentralStepRatClPGroup' are the + # inverses of what we need. exp[ q ] := exp[ q ] / newcls[ i ].exponent mod ord; + fi; fi; od; @@ -897,7 +936,7 @@ ClassesSolvableGroup := function( arg ) else cls := GeneralStepClEANS( H, U, N, cls[ 1 ] ); fi; - tra := tra * cls[ 1 ].operator; + opr := opr * cls[ 1 ].operator; elif mode mod 2 = 1 then # rational classes newcls := [ ]; @@ -908,7 +947,7 @@ ClassesSolvableGroup := function( arg ) cl.power.representative := PcElementByExponents( mK, ExponentsOfPcElement( mK, cl.power.representative ) ); fi; - new := CentralStepRatClPGroup( U, N, mK, mL, cl ); + new := CentralStepRatClPGroup( H, N, mK, mL, cl ); ord := OrderModK( new[ 1 ].representative, mL ); if ord <= limit.order and ( limit.size = 0 @@ -919,7 +958,7 @@ ClassesSolvableGroup := function( arg ) else cl.power.candidates := [ ( new[1].representative ^ cl.power.operator ) ^ (p*cl.power.exponent) ]; - power := CentralStepRatClPGroup( U, N, mK, mL, + power := CentralStepRatClPGroup( H, N, mK, mL, cl.power )[ 1 ]; power.operator := cl.power.operator * power.operator; @@ -935,34 +974,38 @@ ClassesSolvableGroup := function( arg ) od; cls := newcls; - else - newcls := [ ]; - for cl in cls do - if cent( cl, N, L ) then - Append( newcls, CentralStepClEANS( H, U, N, cl ) ); - else - Append( newcls, GeneralStepClEANS( H, U, N, cl ) ); - fi; - od; - cls := newcls; - fi; + else + newcls := [ ]; + for cl in cls do + if cent( cl, N, L ) then + news:=CentralStepClEANS( H, U, N, cl ); + else + news:=GeneralStepClEANS( H, U, N, cl ); + fi; + Assert(1,ForAll(news, + i->ForAll(GeneratorsOfGroup(i.centralizer), + j->Comm(i.representative,j) in eas[step]))); + Append(newcls,news); + od; + cls := newcls; + fi; od; if mode = 4 then # test conjugacy of two elements if cls[ 1 ].representative <> cls[ 2 ].representative then return fail; else - return tra[ 1 ] / tra[ 2 ]; + return opr[ 1 ] / opr[ 2 ]; fi; elif candidates <> false and not IsIdentical( FamilyObj( U ), FamilyObj( candidates ) ) then # centralizer calculation - return ConjugateSubgroup( cls[ 1 ].centralizer, tra ^ -1 ); + return ConjugateSubgroup( cls[ 1 ].centralizer, opr ^ -1 ); fi; if candidates <> false then # add operators (and exponents) for i in [ 1 .. Length( cls ) ] do - cls[ i ].operator := tra[ i ]; + cls[ i ].operator := opr[ i ]; if mode mod 2 = 1 then # rational classes cls[ i ].exponent := exp[ i ]; fi; diff --git a/lib/clasperm.gi b/lib/clasperm.gi index f1c973cec3..898d6d452b 100644 --- a/lib/clasperm.gi +++ b/lib/clasperm.gi @@ -134,7 +134,7 @@ InstallMethod( PositionCanonical, true, T := enum!.rightTransversal; for pow in [ 1 .. Length( gal ) ] do t := RepOpElmTuplesPermGroup( true, G, - [ elm ], [ rep ^ ( 1 ^ gal[ pow ] ) ], + [ elm ], [ rep ^ Int( gal[ pow ] ) ], TrivialSubgroup( G ), StabilizerOfExternalSet( rcl ) ); if t <> fail then @@ -148,7 +148,7 @@ InstallMethod( PositionCanonical, true, fi; end ); -InstallOtherMethod( Centralizer, true, [ IsRationalClassGroupRep ], 0, +InstallOtherMethod( CentralizerOp, true, [ IsRationalClassGroupRep ], 0, StabilizerOfExternalSet ); ############################################################################# @@ -164,7 +164,7 @@ InstallMethod( \=, IsIdentical, [ IsRationalClassPermGroupRep, return ForAny( RightTransversalInParent( GaloisGroup( cl1 ) ), e -> RepOpElmTuplesPermGroup( true, ActingDomain( cl1 ), [ Representative( cl1 ) ], - [ Representative( cl2 ) ^ ( 1 ^ e ) ], + [ Representative( cl2 ) ^ Int( e ) ], StabilizerOfExternalSet( cl1 ), StabilizerOfExternalSet( cl2 ) ) <> fail ); end ); @@ -180,7 +180,7 @@ InstallMethod( \in, true, [ IsPerm, IsRationalClassPermGroupRep ], 0, G := ActingDomain( cl ); return ForAny( RightTransversalInParent( GaloisGroup( cl ) ), e -> RepOpElmTuplesPermGroup( true, G, - [ g ^ ( 1 ^ e ) ], + [ g ^ Int( e ) ], [ Representative( cl ) ], TrivialSubgroup( G ), StabilizerOfExternalSet( cl ) ) <> fail ); @@ -199,7 +199,7 @@ end ); ## is nothing to be done, since the Galois group is a 2-group then. ## CompleteGaloisGroupPElement := function( class, gal, power, p ) - local G, rep, order, + local G, rep, order, F, phi, # size of the prime residue class group primitiveRoot, # generator of the cyclic prime residue class group sizeKnownPart, # size of the known part of the Galois group @@ -219,6 +219,7 @@ CompleteGaloisGroupPElement := function( class, gal, power, p ) G := ActingDomain( class ); rep := Representative( class ); order := Order( rep ); + F := FamilyObj( One( ZmodnZ( order ) ) ); # = 1 means that the power is the identity class. if power = 1 then @@ -234,8 +235,7 @@ CompleteGaloisGroupPElement := function( class, gal, power, p ) phi := order / p * ( p - 1 ); sizeKnownPart := Size( gal ); sizeUnknownPart := GcdInt( p - 1, phi / sizeKnownPart ); - primitiveRoot := PermResidueClass - ( PrimitiveRootMod( order ), order ); + primitiveRoot := ZmodnZObj( F, PrimitiveRootMod( order ) ); generatorUnknownPart := primitiveRoot ^ ( phi / sizeUnknownPart ); q := Size( G ) / Size( StabilizerOfExternalSet( class ) ) / sizeKnownPart; @@ -263,22 +263,23 @@ CompleteGaloisGroupPElement := function( class, gal, power, p ) fusingElement := power!.fusingElement ^ (Size(GaloisGroup(power)) / (sizeKnownPart*div[i])); - if rep ^ fusingElement <> rep ^ ( 1 ^ exp ) then + if rep ^ fusingElement <> rep ^ Int( exp ) then fusingElement := fail; fi; fi; elif order = p - or PermResidueClass( 1 ^ exp, order / p ) - in GaloisGroup( power ) then + or LogMod( Int( exp ), PrimitiveRootMod( order / p ), + order / p ) mod + IndexInParent( GaloisGroup( power ) ) = 0 then if IsPerm( rep ) then fusingElement := RepOpElmTuplesPermGroup( true, G, - [ rep ], [ rep ^ ( 1 ^ exp ) ], + [ rep ], [ rep ^ Int( exp ) ], StabilizerOfExternalSet( class ), StabilizerOfExternalSet( class ) ); else fusingElement := RepresentativeOperation( G, - rep, rep ^ ( 1 ^ exp ) ); + rep, rep ^ Int( exp ) ); fi; fi; fi; @@ -288,8 +289,9 @@ CompleteGaloisGroupPElement := function( class, gal, power, p ) # Construct the Galois group as subgroup of a prime residue class # group and enter the conjugating element which induces the # generating automorphism into the class record. - gal := SubgroupNC( PrimeResidueClassGroup( order ), - [ primitiveRoot ^ ( phi / sizeKnownPart / div[ i ] ) ] ); + gal := GroupByPrimeResidues( + [ primitiveRoot ^ ( phi / sizeKnownPart / div[ i ] ) ], + order ); class!.fusingElement := fusingElement; fi; @@ -298,9 +300,9 @@ end; ############################################################################# ## -#F ConstructList( , , , ) . . . . . . . . . . local +#F RatClasPElmArrangeClasses( , , , ) ## -ConstructList := function( T, list, roots, power ) +RatClasPElmArrangeClasses := function( T, list, roots, power ) local i, j, allRoots; allRoots := [ power ]; @@ -309,7 +311,7 @@ ConstructList := function( T, list, roots, power ) j := Length( list ) + 1; list[ j ] := i; roots[ j ] := [ ]; - Append( roots[ j ], ConstructList( T, list, roots, i ) ); + Append( roots[ j ],RatClasPElmArrangeClasses(T,list,roots,i)); Append( allRoots, roots[ j ] ); fi; od; @@ -390,9 +392,14 @@ FusionRationalClassesPSubgroup := function( N, S, rationalClasses ) fusedClasses := [ ]; for orb in orbs do cl := rationalClasses[ Representative( orb ) ]; - cl.centralizer := Centralizer - ( StabilizerOfExternalSet( orb ), cl.representative, - cl.centralizer ); +# +#T We may *NOT* set a known (larger) centralizer here as the centralizers +# themselves are used later to arrange the classes correctly (Lemma 3.3 in +# Heiko's diploma thesis, page 59/60). AH +# +# cl.centralizer := Centralizer +# ( StabilizerOfExternalSet( orb ), cl.representative, +# cl.centralizer ); Add( fusedClasses, cl ); od; @@ -510,7 +517,7 @@ RationalClassesPElements := function( arg ) # Determine the order in which to process the -classes. list := [ 1 ]; roots := [ [ ] ]; - ConstructList( rationalSClasses, list, roots, 1 ); + RatClasPElmArrangeClasses( rationalSClasses, list, roots, 1 ); found := [ 1 ]; movedTo := [ 0 ]; @@ -533,7 +540,7 @@ RationalClassesPElements := function( arg ) ( RightTransversalInParent( Scl.galoisGroup ), e -> RepOpElmTuplesPermGroup( true, G, [ Scl.representative ], - [ Representative( c ) ^ ( 1 ^ e ) ], + [ Representative( c ) ^ Int( e ) ], Scl.centralizer, StabilizerOfExternalSet( c ) ) <> fail ) ); fi; @@ -680,7 +687,7 @@ RationalClassesPermGroup := function( G, primes ) (GaloisGroup(rationalClasses_[pos])) do conj := RepOpElmTuplesPermGroup( true, C_, [ cl ], [ Representative - (rationalClasses_[pos])^(1^m) ], + (rationalClasses_[pos])^Int(m) ], TrivialSubgroup( C_ ), StabilizerOfExternalSet (rationalClasses_[ pos ]) ); @@ -698,10 +705,10 @@ RationalClassesPermGroup := function( G, primes ) # Now $Hom(y^{g^i}) ~ Hom(y^m)$. $Gal(y)$ is the # direct product of $Gal(Hom(y))$ and the subgroup # generated by $mj^i$. - gens := [ ChineseRem( moduli, [ 1 ^ ji, 1 ^ m ] ) ]; + gens := [ ChineseRem( moduli, [ Int(ji), Int(m) ] ) ]; for gen in GeneratorsOfGroup( GaloisGroup( class_ ) ) do - Add( gens, ChineseRem( moduli, [ 1, 1 ^ gen ] ) ); + Add( gens, ChineseRem( moduli, [ 1, Int(gen)] ) ); od; class := RationalClass( G, y ); SetStabilizerOfExternalSet( class, Centralizer @@ -748,6 +755,8 @@ InstallMethod( ConjugacyClasses, "perm group", true, [ IsPermGroup ], 0, function( G ) if Size( G ) <= 1000 or IsSimpleGroup( G ) then return ConjugacyClassesByRandomSearch( G ); + elif IsSolvableGroup( G ) then + TryNextMethod(); else return Concatenation( List( RationalClasses( G ), DecomposedRationalClass ) ); diff --git a/lib/coll.gi b/lib/coll.gi index 9d6ed3855b..6c14410c21 100644 --- a/lib/coll.gi +++ b/lib/coll.gi @@ -211,11 +211,25 @@ InstallMethod( Representative, InstallImmediateMethod( RepresentativeSmallest, IsCollection and HasEnumeratorSorted, 1000, - C -> EnumeratorSorted( C )[1] ); + function( C ) + C:= EnumeratorSorted( C ); + if IsEmpty( C ) then + TryNextMethod(); + else + return C[1]; + fi; + end ); InstallImmediateMethod( RepresentativeSmallest, IsCollection and HasAsListSorted, 1000, - C -> AsListSorted( C )[1] ); + function( C ) + C:= AsListSorted( C ); + if IsEmpty( C ) then + TryNextMethod(); + else + return C[1]; + fi; + end ); InstallMethod( RepresentativeSmallest, "method for a collection", diff --git a/lib/csetgrp.gi b/lib/csetgrp.gi index 1affba767d..22b0e2e731 100644 --- a/lib/csetgrp.gi +++ b/lib/csetgrp.gi @@ -457,6 +457,7 @@ local c,a1,a2,r,s,t,rg,st,i,j,q,nr,o,nu,step,p,set,img,k,sch,rep, od; stabs:=nstab; r:=nr; + Info(InfoCoset,3,Length(r)," double cosets so far."); od; return dcs; @@ -472,7 +473,7 @@ end); ## #M RightTransversal generic ## -InstallMethod(RightTransversal, "generic, use RightCosets", +InstallMethod(RightTransversalOp, "generic, use RightCosets", IsIdentical,[IsGroup,IsGroup],0, function(G,U) return List(RightCosets(G,U),Representative); diff --git a/lib/csetpc.gi b/lib/csetpc.gi index 013cb998f9..3765f8b05e 100644 --- a/lib/csetpc.gi +++ b/lib/csetpc.gi @@ -151,7 +151,7 @@ local eas,r,st,nr,nst,ind,H,sff,f,m,i,j,ao,Npcgs,v,isi,img, # modify later: if U trivial if Length(mats)>0 then - affsp:=AffineSpace(FullRowSpace(f,Length(wg))); + affsp:=ExtendedVectors(FullRowSpace(f,Length(wg))); ao:=ExternalSet(U,affsp,Upcgs,mats); ao:=ExternalOrbits(ao); ao:=rec(representatives:=List(ao,i-> @@ -232,7 +232,7 @@ IsRightTransversalPcGroup := NewRepresentation ## #M RightTransversal( , ) . . . . . . . . . for pc groups ## -InstallMethod( RightTransversal, "PC",IsIdentical, +InstallMethod( RightTransversalOp, "PC",IsIdentical, [ IsSolvableGroup, IsGroup ], 100, function( G, U ) local elements, g, u, e, i,t,depths,gens,p; diff --git a/lib/ctbl.gi b/lib/ctbl.gi index 5805c55ee9..a5ba840cf3 100644 --- a/lib/ctbl.gi +++ b/lib/ctbl.gi @@ -392,13 +392,13 @@ InstallOtherMethod( Irr, dec; # decomposition of ordinary characters # into known Brauer characters - if not IsPSolvable( OrdinaryCharacterTable( modtbl ) ) then - TryNextMethod(); - fi; - p:= UnderlyingCharacteristic( modtbl ); ordtbl:= OrdinaryCharacterTable( modtbl ); + if not IsPSolvable( ordtbl, p ) then + TryNextMethod(); + fi; + rest:= RestrictedClassFunctions( ordtbl, modtbl, Irr( ordtbl ) ); irr:= Set( Filtered( rest, x -> DegreeOfCharacter( x ) = 1 ) ); cd:= Set( List( rest, DegreeOfCharacter ) ); @@ -3557,7 +3557,7 @@ PrintCharTable := tbl -> PrintCharacterTable( tbl, "t" ); ## #M IsPSolvable( ,

) ## -InstallOtherMethod( IsPSolvable, +InstallOtherMethod( IsPSolvableOp, "method for an ordinary character table, an a positive integer", true, [ IsOrdinaryTable, IsInt and IsPosRat ], 0, @@ -4118,7 +4118,7 @@ InstallOtherMethod( IsPSolvable, #T ## #T #M NormalClosure( , ) #T ## -#T InstallOtherMethod( NormalClosure, true, [ IsOrdinaryTable, IsList ], 0, +#T InstallOtherMethod( NormalClosureOp, true, [ IsOrdinaryTable, IsList ], 0, #T function( tbl, classes ) #T #T local closure, # classes forming the normal closure, result diff --git a/lib/ctblfuns.gd b/lib/ctblfuns.gd index 46a5d7062e..34b0b06ac6 100644 --- a/lib/ctblfuns.gd +++ b/lib/ctblfuns.gd @@ -339,6 +339,18 @@ PermutationCharacter := NewOperation( "PermutationCharacter", [ IsGroup, IsGroup ] ); +############################################################################# +## +#F CycleStructureClass( , ) +## +## Let be a permutation character, and the position of a +## conjugacy class. +## `CycleStructureClass' returns the cycle structure of the elements in +## class in the underlying permutation representation. +## +CycleStructureClass := NewOperationArgs( "CycleStructureClass" ); + + ############################################################################# ## #O ClassFunctionByValues( , ) diff --git a/lib/ctblfuns.gi b/lib/ctblfuns.gi index be11b656e8..20fcef869d 100644 --- a/lib/ctblfuns.gi +++ b/lib/ctblfuns.gi @@ -1030,6 +1030,17 @@ InstallMethod( PermutationCharacter, return CharacterByValues( OrdinaryCharacterTable( G ), c ); end ); +############################################################################# +## +#M PermutationCharacter( ) . . . . . . . . . . . for group action +## +InstallOtherMethod( PermutationCharacter, + "group action on domain",true,[IsPermGroup,IsListOrCollection,IsFunction],0, +function(G,dom,opr) + return CharacterByValues(OrdinaryCharacterTable(G), + List(ConjugacyClasses(G), + i->Number(dom,j->j=opr(j,Representative(i))))); +end); #T ############################################################################# #T ## @@ -1050,6 +1061,61 @@ InstallMethod( PermutationCharacter, #T end ); +############################################################################# +## +#F CycleStructureClass( , ) +## +CycleStructureClass := function( permchar, class ) + + local tbl, # underlying character table + n, # element order of `class' + divs, # divisors of `n' + i, d, j, # loop over `divs' + fixed, # numbers of fixed points + cycstruct; # cycle structure, result + + # Check the arguments. + if not ( IsClassFunction( permchar ) and IsInt( class ) + and IsPosRat( class ) ) then + Error( " must be a class function, a position" ); + fi; + + # Compute the numbers of fixed points of powers. + tbl:= UnderlyingCharacterTable( permchar ); + permchar:= ValuesOfClassFunction( permchar ); + n:= OrdersClassRepresentatives( tbl )[ class ]; + divs:= DivisorsInt( n ); + fixed:= []; + for i in [ 1 .. Length( divs ) ] do + + # Compute the number of cycles of the element of order `n / d'. + d:= divs[i]; + fixed[d]:= permchar[ PowerMap( tbl, d, class ) ]; + for j in [ 1 .. i-1 ] do + if d mod divs[j] = 0 then + + # Subtract the number of fixed points with stabilizer exactly + # of order `n / divs[j]'. + fixed[d]:= fixed[d] - fixed[ divs[j] ]; + + fi; + od; + + od; + + # Convert these numbers into numbers of cycles. + cycstruct:= []; + for i in divs do + if fixed[i] <> 0 and 1 < i then + cycstruct[ i-1 ]:= fixed[i] / i; + fi; + od; + + # Return the cycle structure. + return cycstruct; +end; + + ############################################################################# ## #M ClassFunctionByValues( , ) @@ -1300,6 +1366,12 @@ InstallOtherMethod( EigenvaluesChar, # mod 'n', and thus powering with 'i' is Galois conjugate to # powering with 'Gcd(n,i)' powers[i]:= char[ PowerMap( tbl, i, class ) ]; +#T better approach: +#T only write down values for one representative of each +#T Galois family, and compute traces; +#T for rational characters, this avoids computation with +#T non-rational values at all. +#T (how much does this help?) for j in PrimeResidues( n/i ) do # Note that the position cannot be 0. @@ -2912,17 +2984,20 @@ InstallOtherMethod( GroupByGenerators, true, [ IsHomogeneousList and IsClassFunctionCollection ], 0, function( gens ) - local G; + local filter,G; # Check that the class functions are invertible. if ForAny( gens, psi -> Inverse( psi ) = fail ) then Error( "class functions in must be invertible" ); fi; + filter:=IsGroup and IsAttributeStoringRep; + if IsFinite(gens) then + filter:=filter and IsFinitelyGeneratedGroup; + fi; + # Construct the group. - G:= Objectify( NewType( FamilyObj( gens ), - IsGroup and IsAttributeStoringRep ), - rec() ); + G:= Objectify( NewType( FamilyObj( gens ),filter), rec() ); SetGeneratorsOfMagmaWithInverses( G, AsList( gens ) ); return G; end ); @@ -2932,7 +3007,7 @@ InstallOtherMethod( GroupByGenerators, IsCollsElms, [ IsHomogeneousList and IsClassFunctionCollection, IsClassFunction ], 0, function( gens, id ) - local G; + local filter,G; # Check that the class functions are invertible. if ForAny( gens, psi -> Inverse( psi ) = fail ) then @@ -2941,10 +3016,13 @@ InstallOtherMethod( GroupByGenerators, Error( " must be an identity" ); fi; + filter:=IsGroup and IsAttributeStoringRep; + if IsFinite(gens) then + filter:=filter and IsFinitelyGeneratedGroup; + fi; + # Construct the group. - G:= Objectify( NewType( FamilyObj( gens ), - IsGroup and IsAttributeStoringRep ), - rec() ); + G:= Objectify( NewType( FamilyObj( gens ),filter), rec() ); SetGeneratorsOfMagmaWithInverses( G, AsList( gens ) ); SetOne( G, id ); return G; @@ -2964,7 +3042,8 @@ InstallOtherMethod( GroupByGenerators, # Construct the group. G:= Objectify( NewType( CollectionsFamily( FamilyObj( id ) ), - IsGroup and IsAttributeStoringRep ), + IsGroup and IsAttributeStoringRep and + IsFinitelyGeneratedGroup ), rec() ); SetGeneratorsOfMagmaWithInverses( G, [] ); SetOne( G, id ); diff --git a/lib/ctblgrp.gi b/lib/ctblgrp.gi index c04f29616e..4a57caa525 100644 --- a/lib/ctblgrp.gi +++ b/lib/ctblgrp.gi @@ -1935,8 +1935,10 @@ local G, # group D.raeume:=[r]; # Galois group operating on the columns - ga:=Group(Set(List(GeneratorsPrimeResidueClassGroup( Exponent(G)), - i->PermList(List([1..k],j->PowerMap(D.charTable,i,j))))),()); + ga:=Group(Set(List(Flat(GeneratorsPrimeResidues( + Exponent(G)).generators), + i->PermList(List([1..k],j->PowerMap(D.charTable,i,j))))),()); + D.galMorphisms:=ga; D.galoisOrbits:=List([1..k],i->Set(Orbit(ga,i))); D.matrices:=Difference(Set(List(D.galoisOrbits,i->i[1])),[1]); @@ -2092,7 +2094,9 @@ local G,k,C,D,opt; od; - return DixontinI(D); + C:=DixontinI(D); + SetIrr(OrdinaryCharacterTable(G),C); + return C; end; diff --git a/lib/ctblmaps.gd b/lib/ctblmaps.gd index 5bd3f945c8..3dad6ce69e 100644 --- a/lib/ctblmaps.gd +++ b/lib/ctblmaps.gd @@ -334,11 +334,22 @@ InitPowermap := NewOperationArgs( "InitPowermap" ); #F Congruences( , , , , true ) ## ## improves which is an approximation for the -th -## powermap of using the property that for each element of -## the congruence -## $'Gal'( (g), ) \equiv (g^{}) \pmod{}$ holds; -## if the representative order of $g$ is relative prime to we have -## $'GaloisCyc( (g), ) = (g^{})$. +## powermap of using the property that for each character in the +## list the congruence +## \[ +## `GaloisCyc'( (g), ) +## \equiv (g^{}) \pmod{} +## \] +## holds for all group elements $g$. +## If the representative order of $g$ is relative prime to we check +## the stronger condition +## \[ +## `GaloisCyc'( (g), ) = (g^{}). +## \] +## If is a linear character then we check +## \[ +## (g)^{} = (g^{}). +## \] ## ## If \"quick\" is specified, only those classes with ambiguous images are ## considered. @@ -346,8 +357,8 @@ InitPowermap := NewOperationArgs( "InitPowermap" ); ## If there are classes for which no images are possible, the value is the ## empty list (not undefined!) ## -## 'Congruences' returns 'true' if no inconsistencies were detected, and -## 'false' otherwise. +## `Congruences' returns `true' if no inconsistencies were detected, and +## `false' otherwise. ## Congruences := NewOperationArgs( "Congruences" ); diff --git a/lib/ctblmaps.gi b/lib/ctblmaps.gi index b416b94220..9cef1bddc1 100644 --- a/lib/ctblmaps.gi +++ b/lib/ctblmaps.gi @@ -1436,10 +1436,15 @@ Congruences := function( arg ) for cand_image in images do j:= 1; ok:= true; - while j <= Length( chars ) and ok do # loop over characters + while ok and j <= Length( chars ) do # loop over characters char:= chars[j]; - if not IsUnknown( char[ cand_image ] ) then - if IsInt( char[i] ) then + if not IsUnknown( char[ cand_image ] ) + and not IsUnknown( char[i] ) then + if char[1] = 1 then + if char[i]^prime <> char[ cand_image ] then + ok:= false; + fi; + elif IsInt( char[i] ) then if not IsCycInt( ( char[ cand_image ] - char[i] ) / prime ) then ok:= false; fi; @@ -1475,13 +1480,13 @@ Congruences := function( arg ) # look for empty lists. errors:= []; for i in omega do - if Length( powermap[i] ) = 0 then + if IsEmpty( powermap[i] ) then Add( errors, i ); elif Length( powermap[i] ) = 1 then powermap[i]:= powermap[i][1]; fi; od; - if Length( errors ) > 0 then + if not IsEmpty( errors ) then Info( InfoCharacterTable, 1, "Congruences(.,.,.,", prime, "): no image possible for classes ", errors ); @@ -3413,12 +3418,13 @@ ContainedDecomposables := function( constituents, moduls, parachar, func ) firstallowed, step, gencharacter, newvalues; abgespalten:= []; - while uniques <> [] do + while not IsEmpty( uniques ) do for col in uniques do candidate[col]:= ( candidate[col] + images[col] ) mod moduls[col]; row:= StepModGauss( matrix, moduls, nonzerocol, col ); if row <> fail then abgespalten[ Length( abgespalten ) + 1 ]:= row; +#T Add ! if candidate[ col ] mod row[ col ] <> 0 then impossible:= true; return abgespalten; @@ -3455,7 +3461,7 @@ ContainedDecomposables := function( constituents, moduls, parachar, func ) AddSet( newvalues, j ); fi; od; - if newvalues = [] then # contradiction + if IsEmpty( newvalues ) then # contradiction impossible:= true; return abgespalten; elif Length( newvalues ) = 1 then # unique diff --git a/lib/ctblperm.gi b/lib/ctblperm.gi index fff6e6189e..fa7dbfcbe6 100644 --- a/lib/ctblperm.gi +++ b/lib/ctblperm.gi @@ -41,6 +41,7 @@ end; IdentificationPermGroup := function(D,el) local s,t,i,l; # guter Programmier s t i l ! s:=CycleStructurePerm(el); + s:=ShallowCopy(s); if not IsPerfectGroup(D.group) then Add(s,CanonicalRightCosetElement(DerivedSubgroup(D.group),el)); fi; @@ -219,28 +220,6 @@ local k,sum,perm,structures,ambiguousStructures,i,j,p,e,cem,ces,z,t,cen,a, end); -############################################################################# -## -#F NaturalCharacter(,) . . . . permutation character -## -## 'NaturalCharacter' will either compute the permutation character of -## in or the permutation character of the natural representation. -## -InstallOtherMethod(NaturalCharacter,"natural permutation action", - true,[IsPermGroup],0, -function(G) - local i, c, cl, s; - - s := MovedPoints(G); - c := [Length(s)]; - cl := ConjugacyClasses(G); - for i in [ 2 .. Length(cl) ] do - Add( c, Length( Difference( s, MovedPoints( - Group( [Representative(cl[i])],() ) ) ) ) ); - od; - return c; -end); - ############################################################################# ## #E ctblperm.gi diff --git a/lib/ctblsolv.gi b/lib/ctblsolv.gi index ec06a00de0..57ca134367 100644 --- a/lib/ctblsolv.gi +++ b/lib/ctblsolv.gi @@ -261,7 +261,7 @@ ProjectiveCharDeg := function( G, z, q ) # 'P' is the direct product of the Sylow 'p' subgroup of 'z' # and an elementary abelian 'p' subgroup. - O:= Omega( P ); + O:= Omega( P, p ); Opcgs:= Pcgs( O ); Gpcgs:= Pcgs( G ); @@ -582,7 +582,7 @@ CoveringTriplesCharacters := function( G, z ) fi; - O:= Omega( P ); + O:= Omega( P, p ); Opcgs:= Pcgs( O ); Gpcgs:= Pcgs( G ); diff --git a/lib/domain.gd b/lib/domain.gd index bfb18a8bab..ef13301d8b 100644 --- a/lib/domain.gd +++ b/lib/domain.gd @@ -188,19 +188,10 @@ UnderlyingCollection := NewAttribute( "UnderlyingCollection", SetUnderlyingCollection := Setter( UnderlyingCollection ); HasUnderlyingCollection := Tester( UnderlyingCollection ); -InstallInParentMethod := function( attr, filter, op ) - InstallMethod( attr, true, [ filter ], 0, - dom -> op( Parent( dom ), dom ) ); -end; - - -############################################################################# -## -#F OperationSubdomain( ... ) makes `ConjugateSubgroup' from `ConjugateGroup' -## -OperationSubdomain := function( name, opr, rel ) - local req, i, oper, method; +OperationSubdomainRequiredFilters := function( opr ) + local req, i; + req := false; for i in [ 1, 3 .. LEN_LIST(OPERATIONS)-1 ] do if IS_IDENTICAL_OBJ( OPERATIONS[i], opr ) then @@ -209,9 +200,21 @@ OperationSubdomain := function( name, opr, rel ) fi; od; if req = false then - Error( "unknown operation ", NameFunction(opr) ); + Error( "unknown operation ", NAME_FUNC(opr) ); + elif Length( req ) <> 2 then + Error( "operation ", NAME_FUNC(opr), " does not take 2 arguments" ); fi; - req := ShallowCopy( req ); + return req; +end; + +############################################################################# +## +#F OperationSubdomain( ... ) makes `ConjugateSubgroup' from `ConjugateGroup' +## +OperationSubdomain := function( name, opr, rel ) + local req, oper, method; + + req := SHALLOW_COPY_OBJ( OperationSubdomainRequiredFilters( opr ) ); req[ 1 ] := WITH_HIDDEN_IMPS_FLAGS( AND_FLAGS ( req[ 1 ], FLAGS_FILTER( HasParent ) ) ); oper := NEW_OPERATION( name ); @@ -226,10 +229,62 @@ OperationSubdomain := function( name, opr, rel ) return E; end; - INSTALL_METHOD_FLAGS( oper, NameFunction(oper), rel, req, 0, method ); + INSTALL_METHOD_FLAGS( oper, false, rel, req, 0, method ); return oper; end; +############################################################################# +## +#F InParentFOA( , , , ) . dispatcher, oper and attr +## +InParentFOA := function( name, superreq, subreq, NewAorP ) + local str, oper, attr, func; + + # Create the two-argument operation. + str:= SHALLOW_COPY_OBJ( name ); + APPEND_LIST_INTR( str, "Op" ); + oper:= NewOperation( str, [ superreq, subreq ] ); + + # Create the attribute or property + # (for cases where the first argument is the parent of the second). + str:= SHALLOW_COPY_OBJ( name ); + APPEND_LIST_INTR( str, "InParent" ); + attr:= NewAorP( str, subreq ); + + # Create the function that mainly calls the operation, + # but also checks resp. sets the attribute if the first argument + # is identical with the parent of the second. + func:= function( arg ) + local super, sub, value; + if Length( arg ) <> 2 then + return CallFuncList( oper, arg ); + fi; + super := arg[1]; + sub := arg[2]; + if HasParent( sub ) and IsIdentical( super, Parent( sub ) ) then + if Tester( attr )( sub ) then + value:= attr( sub ); + else + value:= oper( super, sub ); + Setter( attr )( sub, value ); + fi; + else + value:= oper( super, sub ); + fi; + return value; + end; + + # Install the method for the attribute that calls the operation. + str:= "method that calls the two-argument operation "; + APPEND_LIST_INTR( str, name ); + APPEND_LIST_INTR( str, "Op" ); + InstallMethod( attr, str, true, [ subreq ], 0, + D -> oper( Parent( D ), D ) ); + + # Return the triple. + return [ func, oper, attr ]; +end; + ############################################################################# ## @@ -252,6 +307,3 @@ end; ############################################################################# ## #E domain.gd . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here - - - diff --git a/lib/factgrp.gi b/lib/factgrp.gi index 197378da56..474cf30beb 100644 --- a/lib/factgrp.gi +++ b/lib/factgrp.gi @@ -415,7 +415,7 @@ local G,N,oh,gens,img,dom,b,improve,bp,bb,i,fb,k,bestdeg,subo; if IsGroup(oh) then # unless it is too hard compared to what we know already if DegreeNaturalHomomorphismsPool(G,N)=fail - or Index(G,oh)*SIZE_OBJ(GeneratorsOfGroup(G)[1])<=2000000 then + or Index(G,oh)<=10000 then oh:=FactorCosetOperation(G,oh,N); #stores implicitely! else return fail; @@ -526,7 +526,7 @@ local G,N,u,v,cnt,zen,uc,nu,totalcnt,interupt,cor; # look if it is worth to look at action on N # if not abelian: later replace by abelian Normal subgroup if IsAbelian(N) and (Size(N)>50 or Index(G,N)2 and arg[3]>Index(G,u)) then #FactorCosetOperation(G,u,N); ImproveOperationDegreeByBlocks(G,N,u); # computes and stores @@ -769,7 +769,7 @@ end); ## this function returns an epimorphism from G ## with kernel N. The range of this mapping is a suitable (isomorphic) ## permutation group (with which we can compute much easier). -InstallMethod(NaturalHomomorphismByNormalSubgroup, +InstallMethod(NaturalHomomorphismByNormalSubgroupOp, "search for operation",IsIdentical,[IsGroup,IsGroup],0, function(G,N) local h; diff --git a/lib/ffe.gi b/lib/ffe.gi index 5c4c45bc39..f47557dcb3 100644 --- a/lib/ffe.gi +++ b/lib/ffe.gi @@ -62,6 +62,19 @@ InstallOtherMethod( DegreeFFE, end ); +############################################################################# +## +#M LogFFE( , ) . . . . . . . . . . . . . . . . . . . . . for two FFE +## +InstallMethod( LogFFE, + "method for two FFEs", + IsIdentical, + [ IsFFE, IsFFE ], 0, + function( n, r ) + return LogMod( Int( n ), Int( r ), Characteristic( n ) ); + end ); + + ############################################################################# ## #M IntVecFFE( ) @@ -598,7 +611,7 @@ InstallMethod( Order, InstallMethod( SquareRoots, "method for a field of FFEs, and a FFE", IsCollsElms, - [ IsField and IsFFECollection, IsFFE ], 0, + [ IsField, IsFFE ], 0, function( F, z ) local r; if IsZero( z ) then diff --git a/lib/field.gd b/lib/field.gd index d0afb479a0..2cebdc0187 100644 --- a/lib/field.gd +++ b/lib/field.gd @@ -385,6 +385,12 @@ Subfield := NewOperationArgs( "Subfield" ); SubfieldNC := NewOperationArgs( "SubfieldNC" ); +############################################################################# +## +#M IsFinite( ) . . . . . . . . . . . . . . . for magmas of ffes +## +InstallTrueMethod( IsSubsetLocallyFiniteGroup, IsFFECollection and IsMagma ); + ############################################################################# ## #E field.gd . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here diff --git a/lib/field.gi b/lib/field.gi index b9afbff67b..054cd145ae 100644 --- a/lib/field.gi +++ b/lib/field.gi @@ -465,17 +465,19 @@ InstallMethod( IsSubset, ############################################################################# ## -#M AsDivisionRing( , ) +#M AsDivisionRing( , ) . . . . . . . . . . . for two division rings ## InstallMethod( AsDivisionRing, - "method for two fields", + "method for two division rings", IsIdentical, [ IsDivisionRing, IsDivisionRing ], 0, function( F, D ) local E; - if not IsSubset( D, F ) then - Error( " must be contained in " ); + if F = LeftActingDomain( D ) then + return D; + elif not IsSubset( D, F ) then + return fail; fi; E:= DivisionRingByGenerators( F, GeneratorsOfDivisionRing( D ) ); @@ -487,6 +489,19 @@ InstallMethod( AsDivisionRing, end ); +############################################################################# +## +#M AsLeftModule( , ) . . . . . . . . . . . for two division rings +## +## View the division ring as vector space over the division ring . +## +InstallMethod( AsLeftModule, + "method for two division rings", + IsIdentical, + [ IsDivisionRing, IsDivisionRing ], 0, + AsDivisionRing ); + + ############################################################################# ## #M Conjugates( , ) . . . . . . . . . . conjugates of a field element @@ -865,6 +880,27 @@ InstallMethod( Units, end ); +############################################################################# +## +#M PrimitiveRoot( ) . . . . . . . . . . . . for finite prime field +## +## For a fields of prime order $p$, the multiplicative group corresponds to +## the group of residues modulo $p$, via `Int'. +## A primitive root is obtained as `PrimitiveRootMod( $p$ )' times the +## identity of . +## +InstallMethod( PrimitiveRoot, + "method for a finite prime field", + true, + [ IsField and IsFinite ], 0, + function( F ) + if not IsPrimeField( F ) then + TryNextMethod(); + fi; + return PrimitiveRootMod( Size( F ) ) * One( F ); + end ); + + ############################################################################# ## #M IsAssociated( , , ) . . . . . . check associatedness in a field diff --git a/lib/fieldfin.gi b/lib/fieldfin.gi index af5c5bedfd..8434c0077d 100644 --- a/lib/fieldfin.gi +++ b/lib/fieldfin.gi @@ -57,6 +57,49 @@ InstallMethod( Random, true, return rnd; end ); +############################################################################# +## +#M Units( ) . . . . . . . . . . . . . . . . . . . . via `PrimitiveRoot' +## +InstallMethod( Units, true, + [ IsField and IsFinite ], 0, + F -> Group( PrimitiveRoot( F ) ) ); + +InstallTrueMethod( IsHandledByNiceMonomorphism, + IsGroup and IsFFECollection ); + +############################################################################# +## +#M in . . . . . . . . . . . . . . . . . . . . via `PrimitiveRoot' +## +InstallMethod( \in, "for groups of FFE, Z/pZ, p<>2", IsElmsColls, + [ IsFFE, IsGroup and IsFFECollection ], 0, + function( elm, G ) + local F; + + F := Field( Concatenation( GeneratorsOfGroup( G ), [ One( G ) ] ) ); + return LogFFE( elm, PrimitiveRoot( F ) ) mod + ( ( Size( F ) - 1 ) / Size( G ) ) = 0; +end ); + +############################################################################# +## +#M Pcgs( ) . . . . . . . . . . . . . . . . . . . . . via `PrimitiveRoot' +## +InstallMethod( Pcgs, "for groups of FFE", true, + [ IsGroup and IsFFECollection ], 0, + function( G ) + local F; + + if IsTrivial( G ) then + TryNextMethod(); + else + F := Field( Concatenation( GeneratorsOfGroup( G ), [ One( G ) ] ) ); + SetIndependentGeneratorsOfAbelianGroup( G, + [ PrimitiveRoot( F ) ^ ( ( Size( F ) - 1 ) / Size( G ) ) ] ); + return PcgsByIndependentGeneratorsOfAbelianGroup( G ); + fi; +end ); ############################################################################# ## diff --git a/lib/files.gd b/lib/files.gd index a5fb386746..6ab69cede1 100644 --- a/lib/files.gd +++ b/lib/files.gd @@ -282,6 +282,7 @@ end; ############################################################################# ## + #V EDITOR . . . . . . . . . . . . . . . . . . . . default editor for `Edit' ## EDITOR := "vi"; @@ -289,78 +290,24 @@ EDITOR := "vi"; ############################################################################# ## -#F Edit( ) . . . . . . . . . . . . . . . . . edit and read file +#O Edit( ) . . . . . . . . . . . . . . . . . edit and read file ## -Edit := function( name ) - local editor, ret; - - editor := Filename( DirectoriesSystemPrograms(), EDITOR ); - if editor = fail then - Error( "cannot locate editor `", EDITOR, "'" ); - fi; - ret := Process( DirectoryCurrent(), editor, InputTextUser(), - OutputTextUser(), [ name ] ); - if ret <> 0 then - Error( "editor returned ", ret ); - fi; - Read(name); -end; +Edit := NewOperationArgs("Edit"); ############################################################################# ## -#F CreateCompletionFiles( ) . . . . . . . create "lib/readX.co" files +#O CreateCompletionFiles( ) . . . . . . . create "lib/readX.co" files ## -CreateCompletionFiles := function( arg ) - local path, input, i, com, read, j, crc; - - # get the path to the output - if 0 = Length(arg) then - path := DirectoriesLibrary("")[1]; - elif 1 = Length(arg) then - path := Directory(arg[1]); - fi; - input := DirectoriesLibrary(""); +CreateCompletionFiles := NewOperationArgs("CreateCompletionFiles"); - # loop over the list of completable files - for i in COMPLETABLE_FILES do - # convert "read" into "comp" - com := Filename( path, ReplacedString( i[1], ".g", ".co" ) ); - if com = fail then - Error( "cannot create output file" ); - fi; - Print( "#I converting \"", i[1], "\" to \"", com, "\"\n" ); - - # now find the input file - read := List( i[2], x -> [ x, Filename( input, x ) ] ); - if ForAny( read, x -> x[2] = fail ) then - Error( "cannot locate input files" ); - fi; - - # create the completion files - PRINT_TO( com, "# completion of \"", i[1], "\"\n" ); - APPEND_TO( com, "RANK_FILTER_LIST := ", i[3], ";\n" ); - for j in read do - - # create a crc value - Print( "#I parsing \"", j[1], "\"\n" ); - crc := GAP_CRC(j[2]); - - # create header - APPEND_TO( com, "COM_RESULT := COM_FILE( \"", j[1], "\", ", - crc, " );\n", "if not IsBound(COM_RESULT) then\nError(\"", - "cannot locate file \\\"", j[1], "\\\"\");\nelif ", - "COM_RESULT ", " = 3 then\n" ); - - # create completion - MAKE_INIT( com, j[2] ); - - APPEND_TO( com, "fi;\n" ); - od; - od; -end; +############################################################################# +## +#O CheckCompletionFiles() . . . . . . . . . . . check the completion files +## +CheckCompletionFiles := NewOperationArgs("CheckCompletionFiles"); ############################################################################# diff --git a/lib/files.gi b/lib/files.gi index a01400352e..ba0ead9b9b 100644 --- a/lib/files.gi +++ b/lib/files.gi @@ -175,5 +175,164 @@ InstallMethod( ReadAsFunction, ############################################################################# ## +#M Edit( ) . . . . . . . . . . . . . . . . . edit and read file +## +Edit := function( name ) + local editor, ret; + + editor := Filename( DirectoriesSystemPrograms(), EDITOR ); + if editor = fail then + Error( "cannot locate editor `", EDITOR, "'" ); + fi; + ret := Process( DirectoryCurrent(), editor, InputTextUser(), + OutputTextUser(), [ name ] ); + if ret <> 0 then + Error( "editor returned ", ret ); + fi; + Read(name); +end; + + +############################################################################# +## +#M CreateCompletionFiles( ) . . . . . . . create "lib/readX.co" files +## +CreateCompletionFiles := function( arg ) + local path, input, i, com, read, j, crc; + + # get the path to the output + if 0 = Length(arg) then + path := DirectoriesLibrary("")[1]; + elif 1 = Length(arg) then + path := Directory(arg[1]); + fi; + input := DirectoriesLibrary(""); + + # loop over the list of completable files + for i in COMPLETABLE_FILES do + + # convert "read" into "comp" + com := Filename( path, ReplacedString( i[1], ".g", ".co" ) ); + if com = fail then + Error( "cannot create output file" ); + fi; + Print( "#I converting \"", i[1], "\" to \"", com, "\"\n" ); + + # now find the input file + read := List( [1 .. Length(i[2]) ], x + -> [ i[2][x], Filename( input, i[2][x] ), i[3][x] ] ); + if ForAny( read, x -> x[2] = fail ) then + Error( "cannot locate input files" ); + fi; + + # create the completion files + PRINT_TO( com, "#I file=\"", i[1], "\"\n\n" ); + for j in read do + + # create a crc value + Print( "#I parsing \"", j[1], "\"\n" ); + crc := GAP_CRC(j[2]); + + # create ranking list + APPEND_TO( com, "#F file=\"", j[1], "\" crc=", crc, "\n" ); + APPEND_TO( com, "RANK_FILTER_LIST := ", j[3], ";\n", + "RANK_FILTER_COUNT := 1;\n\n" ); + + # create `COM_FILE' header and `if' start + APPEND_TO( com, "#C load module, file, or complete\n" ); + APPEND_TO( com, + "COM_RESULT := COM_FILE( \"", j[1], "\", ", crc, " );\n", + "if COM_RESULT = fail then\n", + "Error(\"cannot locate file \\\"", j[1], "\\\"\");\n", + "elif COM_RESULT = 1 then\n", + ";\n", + "elif COM_RESULT = 2 then\n", + ";\n", + "elif COM_RESULT = 4 then\n", + "READ_CHANGED_GAP_ROOT(\"",j[1],"\");\n", + "elif COM_RESULT = 3 then\n" + ); + + # create completion + MAKE_INIT( com, j[2] ); + + APPEND_TO( com, + "else\n", + "Error(\"unknown result code \", COM_RESULT );\n", + "fi;\n\n", + "#U unbind temporary variables\n", + "Unbind(RANK_FILTER_LIST);\n", + "Unbind(RANK_FILTER_COUNT);\n", + "Unbind(COM_RESULT);\n", + "#E file=\"", j[1], "\"\n\n" + ); + od; + od; +end; + +############################################################################# +## +#M CheckCompletionFiles() . . . . . . . . . . . check the completion files +## +CheckCompletionFiles := function() + local dirs, file, com, stream, next, pos, fname, crc, + lfile, new, nook; + + dirs := DirectoriesLibrary(""); + nook := []; + for file in COMPLETED_FILES do + com := ReplacedString( file, ".g", ".co" ); + Print( "#I checking \"", com, "\"\n" ); + stream := InputTextFile(com); + while not IsEndOfStream(stream) do + next := ReadLine(stream); + if next <> fail and next[1] = '#' then + if next[2] = 'F' then + + # extract the filename + pos := 4; + while next[pos] <> '"' do + pos := pos + 1; + od; + pos := pos+1; + fname := ""; + while next[pos] <> '"' do + Add( fname, next[pos] ); + pos := pos + 1; + od; + + # extract the crc value + while next[pos] <> '=' do + pos := pos + 1; + od; + crc := Int(next{[pos+1..Length(next)-1]}); + + # recompute crc + lfile := Filename( dirs, fname ); + if lfile = fail then + Print( "#W file \"", fname, "\" not found\n" ); + Add( nook, fname ); + else + new := GAP_CRC( lfile ); + if new <> crc then + Print( "#W file \"", fname, "\" not OK\n" ); + Add( nook, fname ); + else + Print( "#I file \"", fname, "\" OK\n" ); + fi; + fi; + fi; + fi; + od; + CloseStream(stream); + od; + return nook; +end; + + +############################################################################# +## + + #E files.gi . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here ## diff --git a/lib/filter.g b/lib/filter.g index 6e7e924f40..864e77a016 100644 --- a/lib/filter.g +++ b/lib/filter.g @@ -169,8 +169,8 @@ RANK_FILTER_STORE := function( filter ) fi; hash := HASH_FLAGS(flags); rank := RANK_FILTER(flags); - ADD_LIST( RANK_FILTER_LIST, hash ); - ADD_LIST( RANK_FILTER_LIST, rank ); + ADD_LIST( RANK_FILTER_LIST_CURRENT, hash ); + ADD_LIST( RANK_FILTER_LIST_CURRENT, rank ); return rank; end; diff --git a/lib/frattext.gd b/lib/frattext.gd index b9a9c8c67f..f62c030edf 100644 --- a/lib/frattext.gd +++ b/lib/frattext.gd @@ -3,7 +3,7 @@ #W frattext.gd GAP library Bettina Eick ## Revision.frattext_gd := - "@(#)$Id:"; + "@(#)$Id$"; ############################################################################# ## diff --git a/lib/frattext.gi b/lib/frattext.gi index 0a101e1f3c..eec45bc079 100644 --- a/lib/frattext.gi +++ b/lib/frattext.gi @@ -3,7 +3,7 @@ #W frattext.gi GAP library Bettina Eick ## Revision.frattext_gi := - "@(#)$Id:"; + "@(#)$Id$"; ############################################################################# ## diff --git a/lib/frattfree.gd b/lib/frattfree.gd index f9a51ae0a0..cd65e6e94d 100644 --- a/lib/frattfree.gd +++ b/lib/frattfree.gd @@ -3,7 +3,7 @@ #W frattfree.gd GAP library Bettina Eick ## Revision.frattfree_gd := - "@(#)$Id:"; + "@(#)$Id$:"; ############################################################################# ## diff --git a/lib/frattfree.gi b/lib/frattfree.gi index 99b30ebb6a..0243c735ae 100644 --- a/lib/frattfree.gi +++ b/lib/frattfree.gi @@ -3,7 +3,7 @@ #W frattfree.gi GAP library Bettina Eick ## Revision.frattfree_gi := - "@(#)$Id:"; + "@(#)$Id$"; ############################################################################# ## diff --git a/lib/ghom.gd b/lib/ghom.gd index 745f19c77b..9126715ffc 100644 --- a/lib/ghom.gd +++ b/lib/ghom.gd @@ -27,17 +27,25 @@ GroupHomomorphismByImages := NewOperation( "GroupHomomorphismByImages", ############################################################################# ## #O NaturalHomomorphismByNormalSubgroup( , ) . . map onto factor group +#O NaturalHomomorphismByNormalSubgroupNC(, ) ## -NaturalHomomorphismByNormalSubgroup := NewOperation( - "NaturalHomomorphismByNormalSubgroup", [ IsGroup, IsGroup ] ); - - -############################################################################# -## -#A NaturalHomomorphismByNormalSubgroupInParent( ) . if G is the parent -## -NaturalHomomorphismByNormalSubgroupInParent := NewAttribute( - "NaturalHomomorphismByNormalSubgroupInParent", IsGroup ); +## returns a homomorphism from to another group whose kernel is . +## \GAP will try to select the image group as to make computations in it as +## efficient as possible. As the factor group $/$ can be identified +## with the image of this permits efficient computations in the factor +## group. The `NC' variant does not check whether is normal in . +NaturalHomomorphismByNormalSubgroup:= + NewOperationArgs("NaturalHomomorphismByNormalSubgroup"); + +tmp:= InParentFOA( "NaturalHomomorphismByNormalSubgroup", IsGroup, IsGroup, + NewAttribute ); +NaturalHomomorphismByNormalSubgroupNC := tmp[1]; +NaturalHomomorphismByNormalSubgroupOp := tmp[2]; +NaturalHomomorphismByNormalSubgroupInParent := tmp[3]; +SetNaturalHomomorphismByNormalSubgroupInParent := + Setter( NaturalHomomorphismByNormalSubgroupInParent ); +HasNaturalHomomorphismByNormalSubgroupInParent := + Tester( NaturalHomomorphismByNormalSubgroupInParent ); IsGroupGeneralMappingByImages := NewRepresentation @@ -97,12 +105,7 @@ IsNaturalHomomorphismPcGroupRep := NewRepresentation IsAttributeStoringRep, [ "pcgsSource", "pcgsRange" ] ); -FilterGroupGeneralMappingByImages := NewOperationArgs( - "FilterGroupGeneralMappingByImages" ); - MakeMapping := NewOperationArgs( "MakeMapping" ); -GroupIsomorphismByFunctions := NewOperationArgs( - "GroupIsomorphismByFunctions" ); IsomorphismPermGroup := NewAttribute("IsomorphismPermGroup",IsGroup); HasIsomorphismPermGroup := Tester( IsomorphismPermGroup ); diff --git a/lib/ghom.gi b/lib/ghom.gi index e175f3ff86..c8e9c8060c 100644 --- a/lib/ghom.gi +++ b/lib/ghom.gi @@ -12,14 +12,41 @@ Revision.ghom_gi := ############################################################################# ## - #M = . . . . . . . . . . . . . . . . . . . . . . . . . . via images ## -InstallMethod( \=, IsIdentical, [ IsGroupGeneralMapping, - IsGroupGeneralMapping ], 0, - function( a, b ) - return AsGroupGeneralMappingByImages( a ) = - AsGroupGeneralMappingByImages( b ); +InstallMethod( \=, "compare their AsGroupGeneralMappingByImages", + IsIdentical, [ IsGroupGeneralMapping, IsGroupGeneralMapping ], 0, +function( a, b ) +local i; + # force both to GroupGeneralMappingsByImages + if not IsGroupGeneralMapping(a) then + a:=AsGroupGeneralMappingByImages( a ); + fi; + if not IsGroupGeneralMapping(b) then + b:=AsGroupGeneralMappingByImages( b ); + fi; + + # try to fall back on homomorphism routines + if IsSingleValued(a) and IsSingleValued(b) then + # as both are single valued (and the appropriate flags are now set) + # we will automatically fall in the routines for homomorphisms. + # So this is not an infinite recursion + return a=b; + fi; + + # now do the hard test + if Source(a)<>Source(b) + or Range(a)<>Range(b) + or PreImagesRange(a)<>PreImagesRange(b) + or ImagesSource(a)<>ImagesSource(b) then + return false; + fi; + for i in PreImagesRange(a) do + if Set(Images(a,i))<>Set(Images(b,i)) then + return false; + fi; + od; + return true; end ); ############################################################################# @@ -136,6 +163,14 @@ InstallMethod( GroupGeneralMappingByImages, true, if IsPermGroup( H ) then filter := filter and IsToPermGroupGeneralMappingByImages; fi; + + # Do we map a free group or an fp group by its standard generators? + # (So we can used MappedWord for mapping)? + if ((IsSubgroupFpGroup(G) and not HasParent(G)) + or IsFreeGroup(G)) and + gens=GeneratorsOfGroup(G) then + filter := filter and IsFromFpGroupStdGensGeneralMappingByImages; + fi; if IsSubgroupFpGroup(H) then filter := filter and IsToFpGroupGeneralMappingByImages; fi; @@ -504,24 +539,29 @@ end ); ############################################################################# ## - -#F NaturalHomomorphismByNormalSubgroup( , ) check whether N \unlhd G? +#M NaturalHomomorphismByNormalSubgroup( , ) check whether N \unlhd G? ## -InstallMethod( NaturalHomomorphismByNormalSubgroup, IsIdentical, +NaturalHomomorphismByNormalSubgroup := function(G,N) + if not IsNormal(G,N) then + Error(" must be normal in "); + fi; + return NaturalHomomorphismByNormalSubgroupNC(G,N); +end; + +InstallMethod( NaturalHomomorphismByNormalSubgroupOp, IsIdentical, [ IsGroup, IsGroup and IsTrivial ], SUM_FLAGS, function( G, T ) return IdentityMapping( G ); end ); -InstallInParentMethod( NaturalHomomorphismByNormalSubgroupInParent, - IsGroup, NaturalHomomorphismByNormalSubgroup ); - ############################################################################# ## #M ImagesRepresentative( , ) . . . . . . . . . if given by pcgs ## InstallMethod( ImagesRepresentative, FamSourceEqFamElm, - [ IsGroupGeneralMappingByPcgs, IsMultiplicativeElementWithInverse ], + [ IsGroupGeneralMappingByPcgs and IsTotal, + # ^ because of `ExponentsOfPcElement' + IsMultiplicativeElementWithInverse ], 100, # to override methods for `IsPerm( )' function( hom, elm ) local exp; @@ -531,18 +571,6 @@ InstallMethod( ImagesRepresentative, FamSourceEqFamElm, end ); -############################################################################# -## -#F GroupIsomorphismByFunctions( , , ,

) . . . . . . . for Frank -## -GroupIsomorphismByFunctions := function( G, H, I, P ) - local hom; - - hom := MappingByFunction( G, H, I, P ); - Setter( IsGroupHomomorphism )( hom, true ); - return hom; -end; - ############################################################################# ## #M IsomorphismPermGroup( ) . . . . . . . . . by right regular operation diff --git a/lib/ghompcgs.gi b/lib/ghompcgs.gi index 73ed8ae828..d00705fd15 100644 --- a/lib/ghompcgs.gi +++ b/lib/ghompcgs.gi @@ -332,7 +332,7 @@ end); #M NaturalHomomorphismByNormalSubgroup( , ) . . . . . . for pc groups ## -InstallMethod( NaturalHomomorphismByNormalSubgroup, IsIdentical, +InstallMethod( NaturalHomomorphismByNormalSubgroupOp, IsIdentical, [ IsPcGroup, IsPcGroup ], 0, function( G, N ) local pcgsG, pcgsN, pcgsK, pcgsF, F, hom; @@ -364,7 +364,7 @@ InstallMethod( NaturalHomomorphismByNormalSubgroup, IsIdentical, return hom; end ); -InstallMethod( NaturalHomomorphismByNormalSubgroup, IsIdentical, +InstallMethod( NaturalHomomorphismByNormalSubgroupOp, IsIdentical, [ IsGroup and HasSpecialPcgs, IsGroup and HasInducedPcgsWrtSpecialPcgs ], 0, function( G, N ) diff --git a/lib/ghomperm.gi b/lib/ghomperm.gi index 33fc811ee8..c80c7009e9 100644 --- a/lib/ghomperm.gi +++ b/lib/ghomperm.gi @@ -163,9 +163,9 @@ CoKernelGensPermHom := function( hom ) C := [ ]; for sch in CoKernelGensIterator( hom ) do - if sch <> One( sch ) and not sch in C then - Add( C, sch ); - fi; + if not (sch=One(sch) or sch in C) then + Add( C, sch ); + fi; od; return C; end; @@ -755,7 +755,7 @@ end ); ## #M ImagesRepresentative( , ) . . . . . . . . . . for blocks hom ## -InstallMethod( ImagesRepresentative, FamSourceEqFamElm, +InstallMethod( ImagesRepresentative, "blocks homomorphism", FamSourceEqFamElm, [ IsBlocksHomomorphism, IsMultiplicativeElementWithInverse ], 0, function( hom, elm ) local img, D, i; @@ -844,7 +844,8 @@ InstallMethod( ImagesSet, CollFamSourceEqFamElms, ## #M PreImagesRepresentative( , ) . . . . . . . . . for blocks hom ## -InstallMethod( PreImagesRepresentative, FamRangeEqFamElm, +InstallMethod( PreImagesRepresentative, "blocks homomorphism", + FamRangeEqFamElm, [ IsBlocksHomomorphism, IsMultiplicativeElementWithInverse ], 0, function( hom, elm ) local D, # the block system @@ -862,11 +863,16 @@ InstallMethod( PreImagesRepresentative, FamRangeEqFamElm, while Length( S.genlabels ) <> 0 do # Find the image block of the current block. - b := hom!.reps[ S.orbit[ 1 ] ] ^ elm; - if b > Length( D ) then - return fail; - fi; - B := D[ b ]; + if IsBound(hom!.reps[S.orbit[1]]) then + b := hom!.reps[ S.orbit[ 1 ] ] ^ elm; + if b > Length( D ) then + return fail; + fi; + B := D[ b ]; + else + # the point is in no block (non-transitive action) + B:=[S.orbit[1]]; + fi; # Find a point in that can be hit by the preimage. pos := PositionProperty( B, pnt -> diff --git a/lib/gpprmsya.gd b/lib/gpprmsya.gd new file mode 100644 index 0000000000..b6ca4eb9a1 --- /dev/null +++ b/lib/gpprmsya.gd @@ -0,0 +1,95 @@ +############################################################################# +## +#W gpprmsya.gd GAP Library Frank Celler +## +#H @(#)$Id$ +## +#Y Copyright (C) 1996, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany +## +## This file contains the declarations for symmetric and alternating +## permutation groups +## +Revision.gpprmsya_gd := + "@(#)$Id$"; + + +############################################################################# +## +#P IsNaturalAlternatingGroup( ) +## +## A group is a natural alternating group if it is a permutation group +## acting as alternating group on its moved points. +## +IsNaturalAlternatingGroup := NewProperty( + "IsNaturalAlternatingGroup", + IsPermGroup ); + +SetIsNaturalAlternatingGroup := Setter(IsNaturalAlternatingGroup); +HasIsNaturalAlternatingGroup := Tester(IsNaturalAlternatingGroup); + + +############################################################################# +## +#P IsAlternatingGroup( ) +## +## Such a group is a group isomorphic to a natural alterning group. +## +IsAlternatingGroup := NewProperty( + "IsAlternatingGroup", + IsGroup ); + +SetIsAlternatingGroup := Setter(IsAlternatingGroup); +HasIsAlternatingGroup := Tester(IsAlternatingGroup); + + +############################################################################# +## +#M IsAlternatingGroup( ) +## +InstallTrueMethod( + IsAlternatingGroup, + IsNaturalAlternatingGroup ); + + +############################################################################# +## +#P IsNaturalSymmetricGroup( ) +## +## A group is a natural symmetric group if it is a permutation group acting +## as symmetric group on its moved points. +## +IsNaturalSymmetricGroup := NewProperty( + "IsNaturalSymmetricGroup", + IsPermGroup ); + +SetIsNaturalSymmetricGroup := Setter(IsNaturalSymmetricGroup); +HasIsNaturalSymmetricGroup := Tester(IsNaturalSymmetricGroup); + + +############################################################################# +## +#P IsSymmetricGroup( ) +## +## Such a group is a group isomorphic to a natural symmetric group. +## +IsSymmetricGroup := NewProperty( + "IsSymmetricGroup", + IsGroup ); + +SetIsSymmetricGroup := Setter(IsSymmetricGroup); +HasIsSymmetricGroup := Tester(IsSymmetricGroup); + + +############################################################################# +## +#M IsSymmetricGroup( ) +## +InstallTrueMethod( + IsSymmetricGroup, + IsNaturalSymmetricGroup ); + + +############################################################################# +## +#E gpprmsya.gd . . . . . . . . . . . . . . . . . . . . . . . . . ends here +## diff --git a/lib/gpprmsya.gi b/lib/gpprmsya.gi new file mode 100644 index 0000000000..a89b05f360 --- /dev/null +++ b/lib/gpprmsya.gi @@ -0,0 +1,613 @@ +############################################################################# +## +#W gpprmsya.gi GAP Library Heiko Theissen +#W Alexander Hulpke +#W Martin Schoenert +## +#H @(#)$Id$ +## +#Y Copyright (C) 1996, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany +## +## This file contains the methods for symmetric and alternating groups +## +Revision.gpprmsya_gi := + "@(#)$Id$"; + + +############################################################################# +## +#M IsNaturalAlternatingGroup( ) +## +InstallMethod( IsNaturalAlternatingGroup, + "size comparison", + true, + [ IsPermGroup ], + 0, + +function( alt ) + if 0 = NrMovedPoints(alt) then + return IsTrivial(alt); + else + return Size(alt) * 2 = Factorial( NrMovedPoints(alt) ); + fi; +end ); + + +############################################################################# +## +#M in +## +InstallMethod( \in,"alternating", + true, + [ IsPerm, + IsNaturalAlternatingGroup ], + 0, + +function( g, S ) + local m, l; + + if SignPerm(g)=-1 then + return false; + fi; + m := MovedPoints(S); + l := NrMovedPoints(S); + + if g = One( g ) then + return true; + elif l = 0 then + return false; + elif IsRange(m) and ( l = 1 or m[2] - m[1] = 1 ) then + return SmallestMovedPointPerm(g) >= m[1] + and LargestMovedPointPerm(g) <= m[l]; + else + return IsSubset( m, MovedPointsPerms([g]) ); + fi; +end ); + +InstallMethod(Random,"alternating group: floyd's algorithm", + true,[IsNaturalAlternatingGroup],0, +function ( G ) + local rnd, # random permutation, result + sgn, # sign of the permutation so far + tmp, # temporary variable for swapping + deg, + mov, + i, k; # loop variables + + # use Floyd\'s algorithm + mov:=MovedPoints(G); + deg:=Length(mov); + rnd := [1..deg]; + sgn := 1; + for i in [1..deg-2] do + k := Random( [ i .. deg] ); + tmp := rnd[i]; + rnd[i] := rnd[k]; + rnd[k] := tmp; + if i <> k then + sgn := -sgn; + fi; + od; + + # make the permutation even + if sgn = -1 then + tmp := rnd[deg-1]; + rnd[deg-1] := rnd[deg]; + rnd[deg] := tmp; + fi; + + # return the permutation + return PermList( rnd )^MappingPermListList([1..deg],mov); +end); + +#T special StabChain method? + +############################################################################# +## +#M RepresentativeOperation( , , , ). . for alternating groups +## +InstallOtherMethod(RepresentativeOperationOp,true, + [IsNaturalAlternatingGroup,IsObject, IsObject, IsFunction ], 0, +function ( G, d, e, opr ) +local dom,sortfun,max,cd,ce,rep; + dom:=Set(MovedPoints(G)); + if opr=OnPoints then + if IsInt(d) and IsInt(e) then + if d in dom and e in dom and Length(dom)>2 then + return (d,e,First(dom,i->i<>d and i<>e)); + else + return fail; + fi; + elif IsPerm(d) and IsPerm(e) and d in G and e in G then + sortfun:=function(a,b) return Length(a)CycleStructurePerm(e) then + return fail; + fi; + max:=Maximum(LargestMovedPointPerm(d),LargestMovedPointPerm(e)); + cd:=ShallowCopy(Cycles(d,[1..max])); + ce:=ShallowCopy(Cycles(e,[1..max])); + Sort(cd,sortfun); + Sort(ce,sortfun); + rep:=MappingPermListList(Concatenation(cd),Concatenation(ce)); + if SignPerm(rep)=-1 then + dom:=Difference(dom,Union(Concatenation(cd),Concatenation(ce))); + if Length(dom)>1 then + rep:=rep*(dom[1],dom[2]); + else + cd:=Filtered(cd,i->IsSubset(dom,i)); + d:=CycleStructurePerm(d); + e:=PositionProperty([1..Length(d)],i->IsBound(d[i]) and + # cycle structure is shifted, so this is even length + # we need either to swap a pair of even cycles or to 3-cycle + # odd cycles + ((IsInt(i+1/2) and d[i]>1) or + (IsInt(i/2) and d[i]>2))); + if e=fail then + rep:=fail; + elif IsInt(e+1/2) then + cd:=Filtered(cd,i->Length(i)=e+1); + cd:=cd{[1,2]}; + rep:=MappingPermListList(Concatenation(cd), + Concatenation([cd[2],cd[1]]))*rep; + else + cd:=Filtered(cd,i->Length(i)=e+1); + cd:=cd{[1,2,3]}; + rep:=MappingPermListList(Concatenation(cd), + Concatenation([cd[2],cd[3],cd[1]]))*rep; + fi; + fi; + fi; + return rep; + fi; + elif (opr=OnSets or opr=OnTuples) and (IsList(d) and IsList(e)) then + if Length(d)<>Length(e) then + return fail; + fi; + if IsSubset(dom,Set(d)) and IsSubset(dom,Set(e)) then + rep:=MappingPermListList(d,e); + fi; + if SignPerm(rep)=-1 then + cd:=Difference(dom,e); + if Length(cd)>1 then + rep:=rep*(cd[1],cd[2]); + elif opr=OnSets then + if Length(d)>1 then + rep:=(d[1],d[2])*rep; + else + rep:=fail; # set Length <2, maximal 1 further point in dom,impossible + fi; + else # opr=OnTuples, not enough points left + rep:=fail; + fi; + fi; + return rep; + fi; + TryNextMethod(); +end); + + +InstallMethod(SylowSubgroupOp,"alternating",true, + [IsNaturalAlternatingGroup, IsPosRat and IsInt],0, +function ( G, p ) + local S, #

-Sylow subgroup of , result + sgs, # strong generating set of + q, # power of

+ i, # loop variable + trf, + mov, + deg; + + mov:=MovedPoints(G); + deg:=Length(mov); + # make the strong generating set + sgs := []; + for i in [3..deg] do + q := p; + if p = 2 and i mod 2 = 0 then + Add( sgs, (mov[1],mov[2])(mov[i-1],mov[i]) ); + q := q * p; + fi; + trf:=MappingPermListList([1..deg],mov); # translating perm + while i mod q = 0 do + Add( sgs, PermList( Concatenation( + [1..i-q], [i-q+1+q/p..i], [i-q+1..i-q+q/p] ) )^trf ); + q := q * p; + od; + od; + + # make the Sylow subgroup + S := SubgroupNC( G, sgs ); + + # add the stabilizer chain + #MakeStabChainStrongGenerators( S, Reversed([1..G.degree]), sgs ); + + # return the Sylow subgroup + return S; +end); + + +InstallMethod(ConjugacyClasses,"alternating",true, + [IsNaturalAlternatingGroup],0, +function ( G ) + local classes, # conjugacy classes of , result + prt, # partition of + sum, # partial sum of the entries in + rep, # representative of a conjugacy class of + mov,deg,trf, # degree, moved points, transfer + i; # loop variable + + mov:=MovedPoints(G); + deg:=Length(mov); + trf:=MappingPermListList([1..deg],mov); + # loop over the partitions + classes := []; + for prt in Partitions( deg ) do + + # only take those partitions that lie in the alternating group + if Number( prt, i -> i mod 2 = 0 ) mod 2 = 0 then + + # compute the representative of the conjugacy class + rep := [2..deg]; + sum := 1; + for i in prt do + rep[sum+i-1] := sum; + sum := sum + i; + od; + rep := PermList( rep )^trf; + + # add the new class to the list of classes + Add( classes, ConjugacyClass( G, rep ) ); + + # some classes split in the alternating group + if ForAll( prt, i -> i mod 2 = 1 ) + and Length( prt ) = Length( Set( prt ) ) + then + Add( classes, ConjugacyClass(G,rep^(mov[deg-1],mov[deg])) ); + fi; + + fi; + + od; + + # return the classes + return classes; +end); + + +############################################################################# +## +#M IsNaturalSymmetricGroup( ) +## +InstallMethod( IsNaturalSymmetricGroup, + "size comparison", + true, + [ IsPermGroup ], + 0, + +function( sym ) + return Size(sym) = Factorial( NrMovedPoints(sym) ); +end ); + + +############################################################################# +## +#M in +## +InstallMethod( \in, + true, + [ IsPerm, + IsNaturalSymmetricGroup ], + 0, + +function( g, S ) + local m, l; + + m := MovedPoints(S); + l := NrMovedPoints(S); + + if g = One( g ) then + return true; + elif l = 0 then + return false; + elif IsRange(m) and ( l = 1 or m[2] - m[1] = 1 ) then + return SmallestMovedPointPerm(g) >= m[1] + and LargestMovedPointPerm(g) <= m[l]; + else + return IsSubset( m, MovedPointsPerms([g]) ); + fi; +end ); + + +############################################################################# +## +#M Size( ) +## +InstallMethod( Size, + true, + [ IsNaturalSymmetricGroup ], + 0, + sym -> Factorial( NrMovedPoints(sym) ) ); + + +InstallMethod(Random,"symmetric group: floyd's algorithm", + true,[IsNaturalSymmetricGroup],0, +function ( G ) + local rnd, # random permutation, result + sgn, # sign of the permutation so far + tmp, # temporary variable for swapping + deg, + mov, + i, k; # loop variables + + # use Floyd\'s algorithm + mov:=MovedPoints(G); + deg:=Length(mov); + rnd := [1..deg]; + sgn := 1; + for i in [1..deg-2] do + k := Random( [ i .. deg] ); + tmp := rnd[i]; + rnd[i] := rnd[k]; + rnd[k] := tmp; + od; + + # return the permutation + return PermList( rnd )^MappingPermListList([1..deg],mov); +end); + +############################################################################# +## +#M StabilizerOp( , , OnPoints ) +## +InstallOtherMethod( StabilizerOp, + true, + [ IsNaturalSymmetricGroup, IsPosRat and IsInt, IsFunction ], + 0, + +function( sym, p, opr ) + if opr <> OnPoints then + TryNextMethod(); + fi; + return AsSubgroup( sym, + SymmetricGroup( Difference( MovedPoints( sym ), [ p ] ) ) ); +end ); + +InstallMethod(CentralizerOp,"element in symmetric group", + IsCollsElms,[IsNaturalSymmetricGroup,IsPerm],0, +function ( G, g ) + local C, # centralizer of in , result + sgs, # strong generating set of + gen, # one generator in + cycles, # cycles of + cycle, # one cycle from + lasts, # '[]' is the last cycle of length + last, # one cycle from + mov, + i; # loop variable + + if not g in G then + TryNextMethod(); + fi; + + # handle special case + mov:=MovedPoints(G); + + # start with the empty strong generating system + sgs := []; + + # compute the cycles and find for each length the last one + cycles := Cycles( g, mov ); + lasts := []; + for cycle in cycles do + lasts[Length(cycle)] := cycle; + od; + + # loop over the cycles + for cycle in cycles do + + # add that cycle itself to the strong generators + if Length( cycle ) <> 1 then + gen := MappingPermListList(cycle, + Concatenation(cycle{[2..Length(cycle)]},[cycle[1]])); + Add( sgs, gen ); + fi; + + # and this cycle can be mapped to the last cycle of this length + if cycle <> lasts[ Length(cycle) ] then + last := lasts[ Length(cycle) ]; + gen := MappingPermListList(Concatenation(cycle,last), + Concatenation(last,cycle)); + Add( sgs, gen ); + fi; + + od; + + # make the centralizer + C := Subgroup( G , sgs ); + + # return the centralizer + return C; +end); + +############################################################################# +## +#M RepresentativeOperation( , , , ) . . for symmetric groups +## +InstallOtherMethod(RepresentativeOperationOp,true, + [IsNaturalSymmetricGroup,IsObject, IsObject, IsFunction ], 0, +function ( G, d, e, opr ) +local dom,sortfun,max,cd,ce; + dom:=Set(MovedPoints(G)); + if opr=OnPoints then + if IsInt(d) and IsInt(e) then + if d in dom and e in dom then + return (d,e); + else + return fail; + fi; + elif IsPerm(d) and IsPerm(e) and d in G and e in G then + sortfun:=function(a,b) return Length(a)CycleStructurePerm(e) then + return fail; + fi; + max:=Maximum(LargestMovedPointPerm(d),LargestMovedPointPerm(e)); + cd:=ShallowCopy(Cycles(d,[1..max])); + ce:=ShallowCopy(Cycles(e,[1..max])); + Sort(cd,sortfun); + Sort(ce,sortfun); + return MappingPermListList(Concatenation(cd),Concatenation(ce)); + fi; + elif (opr=OnSets or opr=OnTuples) and (IsList(d) and IsList(e)) then + if Length(d)<>Length(e) then + return fail; + fi; + if IsSubset(dom,Set(d)) and IsSubset(dom,Set(e)) then + return MappingPermListList(d,e); + fi; + fi; + TryNextMethod(); +end); + +InstallMethod(SylowSubgroupOp,"symmetric",true, + [IsNaturalSymmetricGroup, IsPosRat and IsInt],0, +function ( G, p ) +local S, #

-Sylow subgroup of , result + sgs, # strong generating set of + q, # power of

+ mov,deg,trf, # degree, moved points, transfer + i; # loop variable + + mov:=MovedPoints(G); + deg:=Length(mov); + trf:=MappingPermListList([1..deg],mov); + # make the strong generating set + sgs := []; + for i in [1..deg] do + q := p; + while i mod q = 0 do + Add( sgs, PermList( Concatenation( + [1..i-q], [i-q+1+q/p..i], [i-q+1..i-q+q/p] ) )^trf ); + q := q * p; + od; + od; + + # make the Sylow subgroup + S := Subgroup( G , sgs ); + + # return the Sylow subgroup + return S; +end); + +InstallMethod(ConjugacyClasses,"symmetric",true, + [IsNaturalSymmetricGroup],0, +function ( G ) + local classes, # conjugacy classes of , result + prt, # partition of + sum, # partial sum of the entries in + rep, # representative of a conjugacy class of + mov,deg,trf, # degree, moved points, transfer + i; # loop variable + + mov:=MovedPoints(G); + deg:=Length(mov); + trf:=MappingPermListList([1..deg],mov); + # loop over the partitions + classes := []; + for prt in Partitions( deg ) do + + # compute the representative of the conjugacy class + rep := [2..deg]; + sum := 1; + for i in prt do + rep[sum+i-1] := sum; + sum := sum + i; + od; + rep := PermList( rep )^trf; + + # add the new class to the list of classes + Add( classes, ConjugacyClass( G, rep ) ); + + od; + + # return the classes + return classes; +end); + +InstallMethod(IsomorphismFpGroup,"symmetric group",true, + [IsNaturalSymmetricGroup],0, +function ( G ) +local F, # free group + gens, #generators of F + imgs, + hom, # bijection + mov,deg, + relators, + i, k; # loop variables + + mov:=MovedPoints(G); + deg:=Length(mov); + + # create the finitely presented group with .degree-1 generators + F := FreeGroup( deg-1, Concatenation("S_",String(deg),".") ); + gens:=GeneratorsOfGroup(F); + + # add the relations according to the Coxeter presentation $a-b-c-...-d$ + relators := []; + for i in [1..deg-1] do + Add( relators, gens[i]^2 ); + od; + for i in [1..deg-2] do + Add( relators, (gens[i] * gens[i+1])^3 ); + for k in [i+2..deg-1] do + Add( relators, (gens[i] * gens[k])^2 ); + od; + od; + + F:=F/relators; + + SetSize(F,Size(G)); + + # compute the bijection + imgs:=[]; + for i in [2..deg] do + Add(imgs,(mov[i-1],mov[i])); + od; + + hom:=GroupHomomorphismByImages(G,F,imgs,GeneratorsOfGroup(F)); + + # return the finitely presented group + return hom; +end); + +############################################################################# +## +#M PrintObj( ) +## +InstallMethod( PrintObj, + true, + [ IsNaturalSymmetricGroup ], + 0, + +function(sym) + Print( "Sym( ", MovedPoints(sym), " )" ); +end ); + + +############################################################################# +## +#E gpprmsya.gd . . . . . . . . . . . . . . . . . . . . . . . . . ends here +## diff --git a/lib/gprdpc.gi b/lib/gprdpc.gi index ec6fd18038..9b00245907 100644 --- a/lib/gprdpc.gi +++ b/lib/gprdpc.gi @@ -3,7 +3,7 @@ #W gprdpc.gi GAP library Bettina Eick ## Revision.gprdpc_gi := - "@(#)$Id:"; + "@(#)$Id$"; ############################################################################# ## diff --git a/lib/grp.gd b/lib/grp.gd index 68561f220c..cdd860ba22 100644 --- a/lib/grp.gd +++ b/lib/grp.gd @@ -20,6 +20,65 @@ Revision.grp_gd := GroupString := function(arg) return "Group"; end; #T !!! +IsPrimeInt := "2b defined"; + +############################################################################# +## +#F KeyDependentFOA( , , , ) . e.g., `PCore' +## +KeyDependentFOA := function( name, grpreq, keyreq, keytest ) + local str, oper, attr, func; + + if keytest = "prime" then + keytest := function( key ) + if not IsPrimeInt( key ) then + Error( name, ":

must be a prime" ); + fi; + end; + fi; + + # Create the two-argument operation. + str:= SHALLOW_COPY_OBJ( name ); + APPEND_LIST_INTR( str, "Op" ); + oper:= NewOperation( str, [ grpreq, keyreq ] ); + + # Create the mutable attribute and install the default method. + str := "Computed"; + APPEND_LIST_INTR( str, name ); + APPEND_LIST_INTR( str, "s" ); + attr:= NewAttribute( str, grpreq, "mutable" ); + InstallMethod( attr, true, [ grpreq ], 0, grp -> [ ] ); + + # Create the function that mainly calls the operation. + func:= function( grp, key ) + local known, i, erg; + + if not IsFinite( grp ) then + Error( name, ": must be finite" ); + fi; + keytest( key ); + known := attr( grp ); + i := 1; + while i < Length( known ) + and known[ i ] < key do + i := i + 2; + od; + # start storing only after the result has been computed. This avoids + # errors if a calculation had been interrupted. + erg := oper( grp, key ); + if i > Length( known ) or known[ i ] <> key then + known{ [ i .. Length( known ) ] + 2 } := + known{ [ i .. Length( known ) ] }; + known[ i ] := key; + known[ i + 1 ] := erg; + fi; + return known[ i + 1 ]; + end; + + # Return the triple. + return [ func, oper, attr ]; +end; + ############################################################################# ## @@ -99,6 +158,27 @@ InstallFactorMaintainedMethod( IsFinitelyGeneratedGroup, InstallTrueMethod( IsFinitelyGeneratedGroup, IsGroup and IsTrivial ); +############################################################################# +## +#P IsSubsetLocallyFiniteGroup() . . . . test if a group is locally finite +## +## A group is called locally finite if every finitely generated subgroup is +## finite. +## +IsSubsetLocallyFiniteGroup := + NewProperty( "IsSubsetLocallyFiniteGroup", IsGroup ); +SetIsSubsetLocallyFiniteGroup := Setter( IsSubsetLocallyFiniteGroup ); +HasIsSubsetLocallyFiniteGroup := Tester( IsSubsetLocallyFiniteGroup ); + +# this true method will enforce that many groups are finite, which is needed +# implicitly +InstallTrueMethod( IsFinite, IsFinitelyGeneratedGroup and IsGroup + and IsSubsetLocallyFiniteGroup ); + +InstallTrueMethod( IsSubsetLocallyFiniteGroup, IsFinite and IsGroup ); + +InstallSubsetMaintainedMethod( IsSubsetLocallyFiniteGroup, + IsGroup and IsSubsetLocallyFiniteGroup, IsGroup ); ############################################################################# ## @@ -482,13 +562,24 @@ HasNrConjugacyClasses := Tester( NrConjugacyClasses ); ############################################################################# ## -#A Omega( ) +#O OmegaOp( ,

, ) ## ## is the largest elementary abelian normal subgroup in the $p$-group . ## -Omega := NewAttribute( "Omega", IsGroup ); -SetOmega := Setter( Omega ); -HasOmega := Tester( Omega ); +Omega := NewOperationArgs( "Omega" ); +OmegaOp := NewOperation( "OmegaOp", + [ IsGroup, IsPosRat and IsInt, IsPosRat and IsInt ] ); +ComputedOmegas := NewAttribute( "ComputedOmegas", IsGroup, "mutable" ); + + +############################################################################# +## +#O AgemoOp( ,

, ) +## +Agemo := NewOperationArgs( "Agemo" ); +AgemoOp := NewOperation( "AgemoOp", + [ IsGroup, IsPosRat and IsInt, IsPosRat and IsInt ] ); +ComputedAgemos := NewAttribute( "ComputedAgemos", IsGroup, "mutable" ); ############################################################################# @@ -596,6 +687,23 @@ SetSupersolvableResiduum := Setter( SupersolvableResiduum ); HasSupersolvableResiduum := Tester( SupersolvableResiduum ); +############################################################################# +## +#F SupersolvableResiduumDefault( ) . . . . supersolvable residuum of +## +## `SupersolvableResiduumDefault' returns a record with components +## `ssr' : +## the supersolvable residuum of the group , that is, +## the largest normal subgroup of with supersolvable factor group, +## `ds' : +## a chain of normal subgroups of , descending from to the +## supersolvable residuum, such that any refinement of this chain +## is a normal series. +## +SupersolvableResiduumDefault := NewOperationArgs( + "SupersolvableResiduumDefault" ); + + ############################################################################# ## #A ComplementSystem( ) @@ -641,17 +749,6 @@ SetUpperCentralSeriesOfGroup := Setter( UpperCentralSeriesOfGroup ); HasUpperCentralSeriesOfGroup := Tester( UpperCentralSeriesOfGroup ); -############################################################################# -## -#O Agemo( ,

) -## -## is the subgroup of the $p$-group that is generated by the $p$-th -## powers of the generators of . -#T why not an attribute?? -## -Agemo := NewOperation( "Agemo", [ IsGroup, IsPosRat and IsInt ] ); - - ############################################################################# ## #O EulerianFunction( , ) @@ -743,14 +840,10 @@ ConjugateSubgroups := NewOperation( "ConjugateSubgroups", ## #O Core( , ) ## -Core := NewOperation( "Core", [ IsGroup, IsGroup ] ); - - -############################################################################# -## -#A CoreInParent( ) -## -CoreInParent := NewAttribute( "CoreInParent", IsGroup ); +tmp:= InParentFOA( "Core", IsGroup, IsGroup, NewAttribute ); +Core := tmp[1]; +CoreOp := tmp[2]; +CoreInParent := tmp[3]; SetCoreInParent := Setter( CoreInParent ); HasCoreInParent := Tester( CoreInParent ); @@ -782,14 +875,10 @@ FactorGroup := NewOperation( "FactorGroup", [ IsGroup, IsGroup ] ); ## #O Index( , ) ## -Index := NewOperation( "Index", [ IsGroup, IsGroup ] ); - - -############################################################################# -## -#A IndexInParent( ) -## -IndexInParent := NewAttribute( "IndexInParent", IsGroup ); +tmp:= InParentFOA( "Index", IsGroup, IsGroup, NewAttribute ); +Index := tmp[1]; +IndexOp := tmp[2]; +IndexInParent := tmp[3]; SetIndexInParent := Setter( IndexInParent ); HasIndexInParent := Tester( IndexInParent ); @@ -805,42 +894,56 @@ HasIndexInWholeGroup := Tester( IndexInWholeGroup ); ############################################################################# ## -#O IsConjugate( , , ) +#A IndependentGeneratorsOfAbelianGroup( ) ## -IsConjugate := NewOperation( "IsConjugate", - [ IsGroup, IsObject, IsObject ] ); +IndependentGeneratorsOfAbelianGroup := NewAttribute + ( "IndependentGeneratorsOfAbelianGroup", IsGroup and IsAbelian ); +SetIndependentGeneratorsOfAbelianGroup := + Setter( IndependentGeneratorsOfAbelianGroup ); +HasIndependentGeneratorsOfAbelianGroup := + Tester( IndependentGeneratorsOfAbelianGroup ); ############################################################################# ## -#P IsNormalInParent( ) +#O IsConjugate( , , ) ## -IsNormalInParent := NewProperty( "IsNormalInParent", IsGroup ); -SetIsNormalInParent := Setter( IsNormalInParent ); -HasIsNormalInParent := Tester( IsNormalInParent ); +IsConjugate := NewOperation( "IsConjugate", + [ IsGroup, IsObject, IsObject ] ); ############################################################################# ## #O IsNormal( , ) ## -IsNormal := NewOperation( "IsNormal", [ IsGroup, IsGroup ] ); +tmp:= InParentFOA( "IsNormal", IsGroup, IsGroup, NewProperty ); +IsNormal := tmp[1]; +IsNormalOp := tmp[2]; +IsNormalInParent := tmp[3]; +SetIsNormalInParent := Setter( IsNormalInParent ); +HasIsNormalInParent := Tester( IsNormalInParent ); ############################################################################# ## -#O IsPNilpotent( ,

) +#F IsPNilpotent( ,

) ## -IsPNilpotent := NewOperation( "IsPNilpotent", - [ IsGroup, IsPosRat and IsInt ] ); +tmp := KeyDependentFOA( "IsPNilpotent", IsGroup, + IsPosRat and IsInt, "prime" ); +IsPNilpotent := tmp[1]; +IsPNilpotentOp := tmp[2]; +ComputedIsPNilpotents := tmp[3]; ############################################################################# ## -#O IsPSolvable( ,

) +#F IsPSolvable( ,

) ## -IsPSolvable := NewOperation( "IsPSolvable", - [ IsGroup, IsPosRat and IsInt ] ); +tmp := KeyDependentFOA( "IsPSolvable", IsGroup, + IsPosRat and IsInt, "prime" ); +IsPSolvable := tmp[1]; +IsPSolvableOp := tmp[2]; +ComputedIsPSolvables := tmp[3]; ############################################################################# @@ -862,14 +965,10 @@ IsSubnormal := NewOperation( "IsSubnormal", [ IsGroup, IsGroup ] ); ## #O NormalClosure( , ) ## -NormalClosure := NewOperation( "NormalClosure", [ IsGroup, IsGroup ] ); - - -############################################################################# -## -#A NormalClosureInParent( ) -## -NormalClosureInParent := NewAttribute( "NormalClosureInParent", IsGroup ); +tmp:= InParentFOA( "NormalClosure", IsGroup, IsGroup, NewAttribute ); +NormalClosure := tmp[1]; +NormalClosureOp := tmp[2]; +NormalClosureInParent := tmp[3]; SetNormalClosureInParent := Setter( NormalClosureInParent ); HasNormalClosureInParent := Tester( NormalClosureInParent ); @@ -887,17 +986,14 @@ NormalIntersection := NewOperation( "NormalIntersection", #O Normalizer( , ) #O Normalizer( , ) ## -Normalizer := NewOperation( "Normalizer", [ IsGroup, IsObject ] ); - - -############################################################################# -## -#A NormalizerInParent( ) -## -NormalizerInParent := NewAttribute( "NormalizerInParent", IsGroup ); +tmp:= InParentFOA( "Normalizer", IsGroup, IsObject, NewAttribute ); +Normalizer := tmp[1]; +NormalizerOp := tmp[2]; +NormalizerInParent := tmp[3]; SetNormalizerInParent := Setter( NormalizerInParent ); HasNormalizerInParent := Tester( NormalizerInParent ); + ############################################################################# ## #O CentralizerModulo(,,) full preimage of C_(G/N)(elm.N) @@ -909,60 +1005,35 @@ CentralizerModulo := NewOperation("CentralizerModulo", ############################################################################# ## #F PCentralSeries( ,

) -#O PCentralSeriesOp( ,

) -#A ComputedPCentralSeriess( ) . . . . . . . . known $p$-central series -## -## 'PCentralSeries' returns the

-central series of the group . -## -## The series that were computed already by 'PCentralSeries' are -## stored as value of the attribute 'ComputedPCentralSeriess'. -## Methods for the computation of a

-central series can be installed for -## the operation 'PCentralSeriesOp'. ## -PCentralSeries := NewOperationArgs( "PCentralSeries" ); +tmp := KeyDependentFOA( "PCentralSeries", IsGroup, + IsPosRat and IsInt, + "prime" ); +PCentralSeries := tmp[1]; +PCentralSeriesOp := tmp[2]; +ComputedPCentralSeriess := tmp[3]; -PCentralSeriesOp := NewOperation( "PCentralSeriesOp", - [ IsGroup, IsPosRat and IsInt ] ); - -ComputedPCentralSeriess := NewAttribute( "ComputedPCentralSeriess", - IsGroup, "mutable" ); ############################################################################# ## #F PRump( ,

) -#O PRumpOp( ,

) -#A ComputedPRumps( ) ## -PRump := NewOperationArgs( "PRump" ); - -PRumpOp := NewOperation( "PRumpOp", - [ IsGroup, IsPosRat and IsInt ] ); - -ComputedPRumps := NewAttribute( "ComputedPRumps", - IsGroup, "mutable" ); +tmp := KeyDependentFOA( "PRump", IsGroup, + IsPosRat and IsInt, "prime" ); +PRump := tmp[1]; +PRumpOp := tmp[2]; +ComputedPRumps := tmp[3]; ############################################################################# ## #F PCore( ,

) -#O PCoreOp( ,

) -#A ComputedPCores( ) . . . . . . . . . . . . . . . . . . known $p$ cores ## -## 'PCore' returns the

-core of the group , where

is a prime -## integer. -## The

-core of is the largest normal subgroup of whose size is a -## power of

. -## -## The

-cores that were computed already by 'PCore' are -## stored as value of the attribute 'ComputedPCores'. -## Methods for the computation of a

-core can be installed for -## the operation 'PCoreOp'. -## -PCoreOp := NewOperation( "PCoreOp", [ IsGroup, IsPosRat and IsInt ] ); - -PCore := NewOperationArgs( "PCore" ); - -ComputedPCores := NewAttribute( "ComputedPCores", IsGroup, "mutable" ); +tmp := KeyDependentFOA( "PCore", IsGroup, + IsPosRat and IsInt, "prime" ); +PCore := tmp[1]; +PCoreOp := tmp[2]; +ComputedPCores := tmp[3]; ############################################################################# @@ -978,15 +1049,10 @@ Stabilizer := NewOperation( "Stabilizer", ## #O SubnormalSeries( , ) ## -SubnormalSeries := NewOperation( "SubnormalSeries", [ IsGroup, IsGroup ] ); - - -############################################################################# -## -#A SubnormalSeriesInParent( ) -## -SubnormalSeriesInParent := NewAttribute( "SubnormalSeriesInParent", - IsGroup ); +tmp:= InParentFOA( "SubnormalSeries", IsGroup, IsGroup, NewAttribute ); +SubnormalSeries := tmp[1]; +SubnormalSeriesOp := tmp[2]; +SubnormalSeriesInParent := tmp[3]; SetSubnormalSeriesInParent := Setter( SubnormalSeriesInParent ); HasSubnormalSeriesInParent := Tester( SubnormalSeriesInParent ); @@ -994,67 +1060,33 @@ HasSubnormalSeriesInParent := Tester( SubnormalSeriesInParent ); ############################################################################# ## #F SylowSubgroup( ,

) -#O SylowSubgroupOp( ,

) -#A ComputedSylowSubgroups( ) . . . . . . . . . . . known Sylow subgroups -## -## 'SylowSubgroup' returns a Sylow

subgroup of the group . ## -## The Sylow subgroups that were computed already by 'SylowSubgroup' are -## stored as value of the attribute 'ComputedSylowSubgroups'. -## Methods for the computation of a Sylow subgroup can be installed for -## the operation 'SylowSubgroupOp'. -## -SylowSubgroup := NewOperationArgs( "SylowSubgroup" ); - -SylowSubgroupOp := NewOperation( "SylowSubgroupOp", - [ IsGroup, IsPosRat and IsInt ] ); - -ComputedSylowSubgroups := NewAttribute( "ComputedSylowSubgroups", - IsGroup, "mutable" ); +tmp := KeyDependentFOA( "SylowSubgroup", IsGroup, + IsPosRat and IsInt, "prime" ); +SylowSubgroup := tmp[1]; +SylowSubgroupOp := tmp[2]; +ComputedSylowSubgroups := tmp[3]; ############################################################################# ## #F SylowComplement( ,

) -#O SylowComplementOp( ,

) -#A ComputedSylowComplements( ) . . . . . . . . . known Sylow complements -## -## 'SylowComplement' returns a Sylow

complement of the group . -## -## The Sylow complements that were computed already by 'SylowComplement' are -## stored as value of the attribute 'ComputedSylowComplements'. -## Methods for the computation of a Sylow complement can be installed for -## the operation 'SylowComplementOp'. ## -SylowComplement := NewOperationArgs( "SylowComplement" ); - -SylowComplementOp := NewOperation( "SylowComplementOp", - [ IsGroup, IsPosRat and IsInt ] ); - -ComputedSylowComplements := NewAttribute( "ComputedSylowComplements", - IsGroup, "mutable" ); +tmp := KeyDependentFOA( "SylowComplement", IsGroup, + IsPosRat and IsInt, "prime" ); +SylowComplement := tmp[1]; +SylowComplementOp := tmp[2]; +ComputedSylowComplements := tmp[3]; ############################################################################# ## #F HallSubgroup( , ) -#O HallSubgroupOp( , ) -#A ComputedHallSubgroups( ) . . . . . . . . . . . known Hall subgroups -## -## 'HallSubgroup' returns a Hall subgroup of the group . ## -## The Hall subgroups that were computed already by 'HallSubgroup' are -## stored as value of the attribute 'ComputedHallSubgroups'. -## Methods for the computation of a Hall subgroup can be installed for -## the operation 'HallSubgroupOp'. -## -HallSubgroup := NewOperationArgs( "HallSubgroup" ); - -HallSubgroupOp := NewOperation( "HallSubgroupOp", - [ IsGroup, IsObject ] ); - -ComputedHallSubgroups := NewAttribute( "ComputedHallSubgroups", - IsGroup, "mutable" ); +tmp := KeyDependentFOA( "HallSubgroup", IsGroup, IsList, ReturnTrue ); +HallSubgroup := tmp[1]; +HallSubgroupOp := tmp[2]; +ComputedHallSubgroups := tmp[3]; ############################################################################# @@ -1122,9 +1154,14 @@ IsRightTransversal := NewRepresentation( "IsRightTransversal", IsComponentObjectRep and IsAttributeStoringRep, [ "group", "subgroup" ] ); -RightTransversal := NewOperation( "RightTransversal", [ IsGroup, IsGroup ] ); -RightTransversalInParent := NewAttribute( "RightTransversalInParent", - IsGroup ); +############################################################################# +## +#O RightTransversal( , ) . . . . . . . . . . . . . right transversal +## +tmp:= InParentFOA( "RightTransversal", IsGroup, IsGroup, NewAttribute ); +RightTransversal := tmp[1]; +RightTransversalOp := tmp[2]; +RightTransversalInParent := tmp[3]; SetRightTransversalInParent := Setter( RightTransversalInParent ); HasRightTransversalInParent := Tester( RightTransversalInParent ); diff --git a/lib/grp.gi b/lib/grp.gi index db1b744ddc..2c34cfdc19 100644 --- a/lib/grp.gi +++ b/lib/grp.gi @@ -17,9 +17,6 @@ Revision.grp_gi := ClosureSubgroup := OperationSubdomain( "ClosureSubgroup", ClosureGroup, true ); -ConjugateSubgroup := OperationSubdomain( "ConjugateSubgroup", - ConjugateGroup, IsCollsElms ); - ############################################################################# ## @@ -323,18 +320,18 @@ InstallMethod( AsGroup, function ( D ) local G, L; - D := AsList( D ); + D := AsListSorted( D ); L := ShallowCopy( D ); G := TrivialSubgroup( GroupByGenerators( D ) ); SubtractSet( L, AsListSorted( G ) ); - while 0 < Length(L) do + while not IsEmpty(L) do G := ClosureGroupDefault( G, L[1] ); SubtractSet( L, AsListSorted( G ) ); od; if Length( AsList( G ) ) <> Length( D ) then - Error( "the elements of must form a group" ); + return fail; fi; - G := GroupByGenerators( GeneratorsOfGroup( G ), D[1]^0 ); + G := GroupByGenerators( GeneratorsOfGroup( G ), One( D[1] ) ); SetAsListSorted( G, D ); SetIsFinite( G, true ); SetSize( G, Length( D ) ); @@ -698,37 +695,57 @@ InstallMethod( NrConjugacyClasses, true, [ IsGroup ], 0, G -> Length( ConjugacyClasses( G ) ) ); + ############################################################################# ## -#M Omega( ) . . . . . . . . . . . . . . . . . for an abelian $p$-group +#M Omega( ,

[, ] ) . . . . . . . . . . omega of a

-group +## +Omega := function( arg ) + local G, p, n, known; + + G := arg[1]; + p := arg[2]; + + # must be a

-group + if Size( G ) <> p ^ LogInt( Size( G ), p ) then + Error( "Omega: must be a p-group" ); + fi; + + if Length( arg ) = 3 then n := arg[3]; + else n := 1; fi; + + known := ComputedOmegas( G ); + if not IsBound( known[ n ] ) then + known[ n ] := OmegaOp( G, p, n ); + fi; + return known[ n ]; +end; + + +############################################################################# +## +#M OmegaOp( ,

, ) . . . . . . . . . for an abelian

-group ## #T the code should be cleaned, #T especially one should avoid the many unnecessary calls of 'Difference' -## -InstallMethod( Omega, +InstallMethod( OmegaOp, "method for a p-group (abelian)", true, - [ IsGroup ], 0, - function( G ) + [ IsGroup, IsPosRat and IsInt, IsPosRat and IsInt ], 0, + function( G, p, n ) - local facts, # prime factors of the size of 'G' - p, # unique prime divisor of the size of 'G' - pcgs, # PCGS of 'G' + local pcgs, # PCGS of 'G' i, j, rel, rl, rc, ng, ml, mc, m, k, q, one; # identity of 'G' - if not IsAbelian( G ) then + if not IsAbelian( G ) or n <> 1 then TryNextMethod(); fi; #T should be changed as soon as a generic method for p-groups is available. - # Check that 'G' is a 'p'-group. - facts:= Set( Factors( Size( G ) ) ); - if 1 < Length( facts ) then - Error( " must be a p-group" ); - fi; +#T what about `IndependentGeneratorsOfAbelianGroup'? +#T (at the moment exists only for permutation groups) - p:= facts[1]; pcgs:= Pcgs( G ); ng:= ShallowCopy( pcgs ); @@ -797,6 +814,8 @@ InstallMethod( Omega, return SubgroupNC( G, m ); end ); +InstallMethod( ComputedOmegas, true, [ IsGroup ], 0, G -> [ ] ); + ############################################################################# ## @@ -821,30 +840,6 @@ InstallMethod( OrdersClassRepresentatives, G -> List( ConjugacyClasses( G ), c -> Order( Representative( c ) ) ) ); -############################################################################# -## -#M ComputedPCentralSeriess( ) -## -InstallMethod( ComputedPCentralSeriess, true, [ IsGroup ], 0, - G -> [] ); - - -############################################################################# -## -#M ComputedPRumps( ) -## -InstallMethod( ComputedPRumps, true, [ IsGroup ], 0, - G -> [] ); - - -############################################################################# -## -#M ComputedPCores( ) -## -InstallMethod( ComputedPCores, true, [ IsGroup ], 0, - G -> [] ); - - ############################################################################# ## #M RationalClasses( ) @@ -912,10 +907,223 @@ InstallMethod( GeneratorsSmallest, Error( "panic, not generated by its elements" ); end ); + +############################################################################# +## +#F SupersolvableResiduumDefault( ) . . . . supersolvable residuum of +## +## The algorithm constructs a descending series of normal subgroups with +## supersolvable factor group from to its supersolvable residuum such +## that any subgroup that refines this series is normal in . +## +## In each step of the algorithm, a normal subgroup of with +## supersolvable factor group is taken. +## Then its commutator factor group is constructed and decomposed into its +## Sylow subgroups. +## For each, the Frattini factor group is considered as a -module. +## We are interested only in the submodules of codimension 1. +## For these cases, the eigenspaces of the dual submodule are calculated, +## and the preimages of their orthogonal spaces are used to construct new +## normal subgroups with supersolvable factor groups. +## If no eigenspace is found within one step, the residdum is reached. +## +## The component `ds' describes a series such that any composition series +## through `ds' from down to the residuum is a chief series. +## +SupersolvableResiduumDefault := function( G ) + + local ssr, # supersolvable residuum + ds, # component `ds' of the result + gens, # generators of `G' + gs, # small generating system of `G' + p, # loop variable + o, # group order + size, # size of `G' + s, # subgroup of `G' + oldssr, # value of `ssr' in the last iteration + dh, # nat. hom. modulo derived subgroup + df, # range of `dh' + fs, # list of factors of the size of `df' + gen, # generators for the next candidate + np, # `p'-prime part of the size of `df' + pp, # `p'-part of the size of `df' + pu, # Sylow `p' subgroup of `df' + tmp, # agemo generators + ph, # nat. hom. onto Frattini quotient of `pu' + ff, # Frattini factor + ffsize, # size of `ff' + pcgs, # PCGS of `ff' + dim, # dimension of the vector space `ff' + idm, # identity matrix + mg, # matrices of `G' action on `ff' + field, # prime field in char. `p' + vsl, # list of simult. eigenspaces + nextvsl, # for next iteration + matrix, # loopvariable + eigenvalue, # loop variable + nullspace, # generators of the eigenspace + space, # loop variable + inter, # intersection + tmp2, # + v, # + ve; # + + ssr := DerivedSubgroup( G ); + ds := [ G, ssr ]; + + if not IsTrivial( ssr ) then + + # Find a small generating system `gs' of `G'. + gens := GeneratorsOfGroup( G ); + gs := [ gens[1] ]; + p := 2; + o := Order( gens[1] ); + size := Size( G ); + repeat + s:= SubgroupNC( G, Concatenation( gs, [ gens[p] ] ) ); + if o < Size( s ) then + Add( gs, gens[p] ); + o:= Size( s ); + fi; + p:= p+1; + until o = size; + + # Loop until we reach the residuum. + repeat + + # Remember the last candidate as `oldssr'. + oldssr := ssr; + ssr := DerivedSubgroup( oldssr ); + dh := NaturalHomomorphismByNormalSubgroup( oldssr, ssr ); + + # `df' is the commutator factor group `oldssr / ssr'. + df := Range( dh ); + fs := FactorsInt( Size( df ) ); + + # `gen' collects the generators for the next candidate + gen := ShallowCopy( GeneratorsOfGroup( df ) ); + + for p in Set( fs ) do + + np:= Product( Filtered( fs, x -> x <> p ) ); + pp:= Product( Filtered( fs, x -> x = p ) ); + + # `pu' is the Sylow `p' subgroup of `df'. + pu:= SubgroupNC( df, List( GeneratorsOfGroup(df), x -> x^np ) ); + + # Remove the `p'-part from the generators list `gen'. + gen:= List( gen, x -> x^pp ); + + # Add the agemo_1 of the Sylow subgroup to the generators list. + tmp:= List( GeneratorsOfGroup( pu ), x -> x^p ); + Append( gen, tmp ); + ph:= NaturalHomomorphismByNormalSubgroup( pu, + SubgroupNC( df, tmp ) ); + + # `ff' is the Frattini factor group. + ff := Range( ph ); + ffsize:= Size( ff ); + if p < ffsize then + + pcgs := Pcgs( ff ); + dim := Length( pcgs ); + idm := IdentityMat( dim, GF(p) ); + + # `mg' is the list of matrices of the action of `G' on the + # dual space of the module, w.r.t. a pcgs of `ff'. + mg:= List( gs, x -> TransposedMat( List( pcgs, + y -> Z(p)^0 * ExponentsOfPcElement( pcgs, Image( ph, + Image( dh, PreImagesRepresentative( + dh, PreImagesRepresentative(ph,y) )^x ) ) )))^-1); + mg:= Filtered( mg, x -> not IsOne( x ) ); + + # `vsl' is a list of generators of all the simultaneous + # eigenspaces. + field:= GF(p); + vsl:= [ IdentityMat( dim, field ) ]; + for matrix in mg do + + nextvsl:= []; + + # All eigenvalues of `matrix' will be used. + for eigenvalue in List( Filtered( Factors( + CharacteristicPolynomial( field, matrix ) ), + x -> DegreeOfUnivariateLaurentPolynomial( x ) = 1 ), + y -> - CoefficientsOfUnivariatePolynomial( y )[1] ) do + + nullspace:= NullspaceMat( matrix - eigenvalue*idm ); + if not IsEmpty( nullspace ) then + for space in vsl do + inter:= SumIntersectionMat( space, nullspace )[2]; + if not IsEmpty( inter ) then + Add( nextvsl, inter ); + fi; + od; + fi; + + od; + + vsl:= nextvsl; + + od; + + # Now calculate the dual spaces of the eigenspaces. + if IsEmpty( vsl ) then + Append( gen, GeneratorsOfGroup( pu ) ); + else + + # `tmp' collects the eigenspaces. + tmp:= []; + for matrix in vsl do + + # `tmp2' will be the base of the dual space. + tmp2:= []; + Append( tmp, matrix ); + + for v in NullspaceMat( TransposedMat( tmp ) ) do + + # Construct a group element corresponding to + # the basis element of the submodule. + ve:= PcElementByExponents( pcgs, v ); + Add( tmp2, PreImagesRepresentative( ph, ve ) ); + + od; + Add( ds, PreImagesSet( dh, + SubgroupNC( df, Concatenation( tmp2, gen ) ) ) ); + od; + Append( gen, tmp2 ); + fi; + else + Add( ds, PreImagesSet( dh, + SubgroupNC( df, AsListSorted( gen ) ) ) ); + fi; + od; + + # Generate the new candidate. + ssr:= PreImagesSet( dh, SubgroupNC( df, AsListSorted( gen ) ) ); + + until IsTrivial( ssr ) or oldssr = ssr; + + ssr:= SubgroupNC( G, GeneratorsOfGroup( ssr ) ); + + fi; + + # Return the result. + return rec( ssr:= ssr, ds:= ds ); +end; + + ############################################################################# ## #M SupersolvableResiduum( ) ## +InstallMethod( SupersolvableResiduum, + "method for finite groups (call `SupersolvableResiduumDefault')", + true, + [ IsGroup and IsFinite ], + 0, + G -> SupersolvableResiduumDefault( G ).ssr ); + ############################################################################# ## @@ -1009,29 +1217,6 @@ function( G ) return comp; end ); -############################################################################# -## -#M ComputedSylowSubgroups( ) . . . . . . . list of known Sylow subgroups -## -InstallMethod( ComputedSylowSubgroups, true, [ IsGroup ], 0, - G -> [] ); - - -############################################################################# -## -#M ComputedSylowComplements( ) . . . . . .list of known Sylow complement -## -InstallMethod( ComputedSylowComplements, true, [ IsGroup ], 0, - G -> [] ); - - -############################################################################# -## -#M ComputedHallSubgroups( ) . . . . . . . . list of known Hall subgroups -## -InstallMethod( ComputedHallSubgroups, true, [ IsGroup ], 0, - G -> [] ); - ############################################################################# ## @@ -1068,34 +1253,49 @@ InstallMethod( UpperCentralSeriesOfGroup, ############################################################################# ## -#M Agemo( ,

) . . . . . . . . . . . . . . . agemo of a

-group -#T why not attribute? +#M Agemo( ,

[, ] ) . . . . . . . . . . agemo of a

-group ## -InstallMethod( Agemo, - "generic method for groups", - true, [ IsGroup, IsPosRat and IsInt ], 0, - function( G, p ) - - local C; - +Agemo := function( arg ) + local G, p, n, known; + + G := arg[1]; + p := arg[2]; + # must be a

-group - if 1 < Length(Set(FactorsInt(Size(G)))) then - Error( " must be a p-group" ); + if Size( G ) <> p ^ LogInt( Size( G ), p ) then + Error( "Agemo: must be a p-group" ); fi; - if Size(G) mod p <> 0 then - Error( " must be a

-group" ); + + if Length( arg ) = 3 then n := arg[3]; + else n := 1; fi; + + known := ComputedAgemos( G ); + if not IsBound( known[ n ] ) then + known[ n ] := AgemoOp( G, p, n ); fi; + return known[ n ]; +end; + +InstallMethod( AgemoOp, + "generic method for groups", + true, [ IsGroup, IsPosRat and IsInt, IsPosRat and IsInt ], 0, + function( G, p, n ) - # if is abelian, raise the generators to the p.th power + local C, q; + + q := p ^ n; + # if is abelian, raise the generators to the q.th power if IsAbelian(G) then - return SubgroupNC( G, List( GeneratorsOfGroup( G ), x -> x^p ) ); + return SubgroupNC( G, List( GeneratorsOfGroup( G ), x -> x^q ) ); # otherwise compute the conjugacy classes of elements else - C := Set( List( ConjugacyClasses(G), x -> Representative(x)^p ) ); + C := Set( List( ConjugacyClasses(G), x -> Representative(x)^q ) ); return NormalClosure( G, SubgroupNC( G, C ) ); fi; - end ); +end ); + +InstallMethod( ComputedAgemos, true, [ IsGroup ], 0, G -> [ ] ); ############################################################################# @@ -1132,8 +1332,7 @@ InstallMethod( AsSubgroup, function( G, U ) local S; if not IsSubset( G, U ) then - Error( " must be a subset of " ); -#T or fail? + return fail; fi; S:= SubgroupNC( G, GeneratorsOfGroup( U ) ); UseIsomorphismRelation( U, S ); @@ -1345,8 +1544,6 @@ InstallOtherMethod( \^, ## #M ConjugateGroup( , ) ## -#T compat3.g ? -## InstallMethod( ConjugateGroup, ", ", IsCollsElms, [ IsGroup, IsMultiplicativeElementWithInverse ], 0, function( G, g ) @@ -1357,11 +1554,14 @@ InstallMethod( ConjugateGroup, ", ", IsCollsElms, return H; end ); +ConjugateSubgroup := OperationSubdomain( "ConjugateSubgroup", + ConjugateGroup, IsCollsElms ); + ############################################################################# ## #M Core( , ) . . . . . . . . . . . . . core of a subgroup in a group ## -InstallMethod( Core, +InstallMethod( CoreOp, "generic method for two groups", IsIdentical, [ IsGroup, IsGroup ], 0, function ( G, U ) @@ -1425,7 +1625,7 @@ InstallOtherMethod( \/, ## #M Index( , ) ## -InstallMethod( Index, +InstallMethod( IndexOp, "generic method for two groups", IsIdentical, [ IsGroup, IsGroup ], 0, function( G, H ) @@ -1445,7 +1645,7 @@ InstallMethod( Index, ## #M IsNormal( , ) ## -InstallMethod( IsNormal, +InstallMethod( IsNormalOp, "generic method for two groups", IsIdentical, [ IsGroup, IsGroup ], 0, function( G, H ) @@ -1494,7 +1694,7 @@ InstallMethod( Length, true, [ IsRightTransversal ], 0, ## #M NormalClosure( , ) . . . . normal closure of a subgroup in a group ## -InstallMethod( NormalClosure, +InstallMethod( NormalClosureOp, "generic method for two groups", IsIdentical, [ IsGroup, IsGroup ], 0, function ( G, N ) @@ -1556,7 +1756,7 @@ InstallMethod( NormalIntersection, #M Normalizer( , ) #M Normalizer( , ) ## -InstallMethod( Normalizer, +InstallMethod( NormalizerOp, "generic method for two groups", IsIdentical, [ IsGroup, IsGroup ], 0, function ( G, U ) @@ -1594,31 +1794,6 @@ InstallMethod( NrConjugacyClassesInSupergroup, end ); -############################################################################# -## -#F PCentralSeries( ,

) -## -PCentralSeries := function( G, p ) - local known; - if not IsGroup( G ) then - Error( " must be a group" ); - fi; - if not IsInt( p ) or not IsPrimeInt( p ) then - Error( "

must be a prime" ); - fi; - - known:= ComputedPCentralSeriess( G ); - - # compute the

-central series - if not IsBound( known[p] ) then - known[p] := PCentralSeriesOp( G, p ); - fi; - - # return the

-central series - return known[p]; -end; - - ############################################################################# ## #M PCentralSeriesOp( ,

) . . . . . . . . . . . .

-central series @@ -1643,31 +1818,6 @@ InstallMethod( PCentralSeriesOp, end ); -############################################################################# -## -#F PRump( ,

) -## -PRump := function( G, p ) - local known; - if not IsGroup( G ) then - Error( " must be a group" ); - fi; - if not IsInt( p ) or not IsPrimeInt( p ) then - Error( "

must be a prime" ); - fi; - - known:= ComputedPRumps( G ); - - # compute the

-central series - if not IsBound( known[p] ) then - known[p] := PRumpOp( G, p ); - fi; - - # return the

-central series - return known[p]; -end; - - ############################################################################# ## #M PRumpOp( ,

) @@ -1686,30 +1836,6 @@ function( G, p ) return V; end); -############################################################################# -## -#F PCore( ,

) -## -PCore := function( G, p ) - local known; - if not IsGroup( G ) then - Error( " must be a group" ); - fi; - if not IsInt( p ) or not IsPrimeInt( p ) then - Error( "

must be a prime" ); - fi; - - known:= ComputedPCores( G ); - - # compute the

-core - if not IsBound( known[p] ) then - known[p] := PCoreOp( G, p ); - fi; - - # return the

-core - return known[p]; -end; - ############################################################################# ## @@ -1737,7 +1863,7 @@ InstallMethod( PCoreOp, ## #M SubnormalSeries( , ) . subnormal series from a group to a subgroup ## -InstallMethod( SubnormalSeries, +InstallMethod( SubnormalSeriesOp, "generic method for two groups", IsIdentical, [ IsGroup, IsGroup ], 0, function ( G, U ) @@ -1766,83 +1892,6 @@ InstallMethod( SubnormalSeries, end ); -############################################################################# -## -#M SylowSubgroup( ,

) . . . . . . . . . . . .compute a Sylow subgroup -## -SylowSubgroup := function( G, p ) - local known; - if not IsGroup( G ) or not IsFinite( G ) then - Error( " must be a finite group" ); - fi; - Info( InfoGroup, 1, - "SylowSubgroup: ", GroupString(G,"G"), ",

= ", p ); - if not IsInt( p ) or not IsPrimeInt( p ) then - Error( "

must be a prime" ); - fi; - - known:= ComputedSylowSubgroups( G ); - - # compute the Sylow

subgroup - if not IsBound( known[p] ) then - known[p] := SylowSubgroupOp( G, p ); - fi; - - # return the Sylow

subgroup - Info( InfoGroup, 1, - "SylowSubgroup: ", GroupString( known[p], "S" ) ); - return known[p]; -end; - -############################################################################# -## -#M SylowComplement( ,

) . . . . . . . . . .compute a Sylow complement -## -SylowComplement := function( G, p ) - local known; - if not IsGroup( G ) or not IsFinite( G ) then - Error( " must be a finite group" ); - fi; - if not IsInt( p ) or not IsPrimeInt( p ) then - Error( "

must be a prime" ); - fi; - - known:= ComputedSylowComplements( G ); - - # compute the

-complement - if not IsBound( known[p] ) then - known[p] := SylowComplementOp( G, p ); - fi; - - # return the

-complement - return known[p]; -end; - -############################################################################# -## -#M HallSubgroup( , ) . . . . . . . . . . . . compute a Hall subgroup -## -HallSubgroup := function( G, pi ) - local known; - if not IsGroup( G ) or not IsFinite( G ) then - Error( " must be a finite group" ); - fi; - if not IsList( pi ) then - Error( " must be a list of primes" ); - fi; - - known:= ComputedHallSubgroups( G ); - - # compute the Hall subgroup - if not IsBound( known[Product(pi)] ) then - known[Product(pi)] := HallSubgroupOp( G, pi ); - fi; - - # return the Hall subgroup - return known[Product(pi)]; -end; - - ############################################################################# ## #M SylowSubgroupOp( ,

) . . . . . . . . . . . for a group and a prime @@ -2054,14 +2103,14 @@ InstallMethod( EnumeratorSorted, #M Centralizer( , ) . . . . . . . . . . . . centralizer of element #M Centralizer( , ) . . . . . . . . . . . . centralizer of subgroup ## -InstallMethod( Centralizer, +InstallMethod( CentralizerOp, "generic method for group and object", IsCollsElms, [ IsGroup, IsObject ], 0, function( G, elm ) return Stabilizer( G, elm, OnPoints ); end ); -InstallMethod( Centralizer, +InstallMethod( CentralizerOp, "generic method for two groups", IsIdentical, [ IsGroup, IsGroup ], 0, function( G, H ) @@ -2599,10 +2648,14 @@ InstallMethod( GroupByGenerators, "generic method for collection", true, [ IsCollection ] , 0, function( gens ) - local G; - G:= Objectify( NewType( FamilyObj( gens ), - IsGroup and IsAttributeStoringRep ), - rec() ); + local filter,G; + + filter:=IsGroup and IsAttributeStoringRep; + if IsFinite(gens) then + filter:=filter and IsFinitelyGeneratedGroup; + fi; + + G:= Objectify( NewType( FamilyObj( gens ),filter), rec() ); SetGeneratorsOfMagmaWithInverses( G, AsList( gens ) ); RunGroupMethods( gens, G ); return G; @@ -2612,10 +2665,14 @@ InstallOtherMethod( GroupByGenerators, "generic method for collection and element", IsCollsElms, [ IsCollection, IsMultiplicativeElementWithInverse ], 0, function( gens, id ) - local G; - G:= Objectify( NewType( FamilyObj( gens ), - IsGroup and IsAttributeStoringRep ), - rec() ); + local filter,G; + + filter:=IsGroup and IsAttributeStoringRep; + if IsFinite(gens) then + filter:=filter and IsFinitelyGeneratedGroup; + fi; + + G:= Objectify( NewType( FamilyObj( gens ),filter), rec() ); SetGeneratorsOfMagmaWithInverses( G, AsList( gens ) ); SetOne( G, id ); if IsEmpty(gens) then @@ -2632,7 +2689,8 @@ InstallOtherMethod( GroupByGenerators, function( empty, id ) local G; G:= Objectify( NewType( CollectionsFamily( FamilyObj( id ) ), - IsGroup and IsAttributeStoringRep ), + IsGroup and IsAttributeStoringRep and + IsFinitelyGeneratedGroup), rec() ); SetGeneratorsOfMagmaWithInverses( G, [] ); SetOne( G, id ); @@ -2773,19 +2831,6 @@ function(g,n) return g[n]; end); -############################################################################# -## -#M ``in parent'' attributes -## -InstallInParentMethod( CoreInParent, IsGroup, Core ); -InstallInParentMethod( IndexInParent, IsGroup, Index ); -InstallInParentMethod( IsNormalInParent, IsGroup, IsNormal ); -InstallInParentMethod( NormalClosureInParent, IsGroup, NormalClosure ); -InstallInParentMethod( NormalizerInParent, IsGroup, Normalizer ); -InstallInParentMethod( RightTransversalInParent, IsGroup, RightTransversal ); -InstallInParentMethod( SubnormalSeriesInParent, IsGroup, SubnormalSeries ); - - ############################################################################# ## #F NormalSubgroups( ) . . . . . . . . . . . normal subgroups of a group diff --git a/lib/grpffmat.gi b/lib/grpffmat.gi index 0c4f151773..f92cbdf480 100644 --- a/lib/grpffmat.gi +++ b/lib/grpffmat.gi @@ -141,7 +141,7 @@ end ); ## #M NaturalHomomorphismByNormalSubgroup( , ) . . . . via nicomorphism ## -InstallMethod( NaturalHomomorphismByNormalSubgroup, IsIdentical, +InstallMethod( NaturalHomomorphismByNormalSubgroupOp, IsIdentical, [ IsFFEMatrixGroup, IsFFEMatrixGroup ], 0, function( G, N ) local nice; diff --git a/lib/grpfp.gd b/lib/grpfp.gd index 57ee0d4614..231f89fa65 100644 --- a/lib/grpfp.gd +++ b/lib/grpfp.gd @@ -107,6 +107,19 @@ FreeGeneratorsOfFpGroup := NewOperationArgs( "FreeGeneratorsOfFpGroup" ); FreeGroupOfFpGroup := NewOperationArgs( "FreeGroupOfFpGroup" ); +############################################################################ +## +#F IsFromFpGroupStdGensGeneralMappingByImages . . . Mapping from Fp group, +## just mapping the standard generators +## +IsFromFpGroupStdGensGeneralMappingByImages := NewRepresentation + ( "IsFromFpGroupStdGensGeneralMappingByImages", + IsGroupGeneralMappingByImages, + [ "generators", "genimages" ] ); +IsFromFpGroupStdGensHomomorphismByImages := + IsFromFpGroupStdGensGeneralMappingByImages and IsMapping; + + ############################################################################ ## #F IsToFpGroupGeneralMappingByImages @@ -155,6 +168,16 @@ RelatorRepresentatives := NewOperationArgs("RelatorRepresentatives"); RelsSortedByStartGen := NewOperationArgs("RelsSortedByStartGen"); +############################################################################# +## +#F SubgroupGeneratorsCosetTable(,,) +## determinate subgroup generators form fee generators, relators and +## coset table. It returns elements of the free group! +## +SubgroupGeneratorsCosetTable := NewOperationArgs( + "SubgroupGeneratorsCosetTable" ); + + ############################################################################# ## #E grpfp.gd . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here diff --git a/lib/grpfp.gi b/lib/grpfp.gi index 44ba3e368f..7a1bd5c28b 100644 --- a/lib/grpfp.gi +++ b/lib/grpfp.gi @@ -168,6 +168,49 @@ InstallMethod( \<, end ); +############################################################################# +## +#M \in ( , ) in subgroup of fp group +## +InstallMethod( \in, + "subgroup of fp group", + IsElmsColls, + [ IsElementOfFpGroup, + IsSubgroupFpGroup ], + 0, +function(elm,U) +local t,fg,i,p; + t:=CosetTableInWholeGroup(U); + elm:=UnderlyingElement(elm); + # build up generator list corresponding to coset table + fg:=[]; + for i in FreeGeneratorsOfFpGroup(U) do + Add(fg,i);Add(fg,i^-1); + od; + p:=1; + for i in [1..LengthWord(elm)] do + p:=t[Position(fg,Subword(elm,i,i))][p]; + od; + return p=1; +end); + + +############################################################################# +## +#M \=( , ) . . . . . . . . . for two subgroups of a f.p. group +## +InstallMethod( \=, + "subgroups of fp group", + IsIdentical, + [ IsSubgroupFpGroup, + IsSubgroupFpGroup ], + 0, + function( left, right ) + return ForAll(GeneratorsOfGroup(left),i->i in right) + and ForAll(GeneratorsOfGroup(right),i->i in left); + end ); + + ############################################################################# ## #M GeneratorsOfGroup( ) . . . . . . . . . . . . . . . for a f.p. group @@ -714,6 +757,36 @@ FreeGroupOfFpGroup := function( F ) end; +############################################################################# +## +#M ImagesRepresentative( , ) +## +InstallMethod( ImagesRepresentative, + "map from fp group or free group, use 'MappedWord'", + FamSourceEqFamElm, [ IsFromFpGroupStdGensGeneralMappingByImages, + IsMultiplicativeElementWithInverse ], 0, +function( hom, elm ) + return MappedWord(elm,hom!.generators,hom!.genimages); +end); + + +############################################################################# +## +#M Index( , ) +## +InstallMethod( IndexOp, + "method for finitely presented groups", + true, + [ IsSubgroupFpGroup, IsSubgroupFpGroup ], + 0, +function(G,H) + if not IsSubset(G,H) then + Error(" must be a subset of "); + fi; + return IndexInWholeGroup(H)/IndexInWholeGroup(G); +end); + + ############################################################################# ## #M IndexInWholeGroup( ) . . . . . . index of a subgroup in an fp group @@ -734,6 +807,119 @@ function( H ) end ); +############################################################################# +## +#M Intersection2(,) . intersection of two fin. pres. groups +## +InstallMethod(Intersection2,"subgroups of fp group",IsIdentical, + [IsSubgroupFpGroup,IsSubgroupFpGroup],0, +function ( G, H ) + local I, # intersection of and , result + Fam, # group family + rels, # representatives for the relators + table, # coset table for in its parent + nrcos, # number of cosets of + tableG, # coset table of + nrcosG, # number of cosets of + tableH, # coset table of + nrcosH, # number of cosets of + pargens, # generators of Parent(G) + freegens, # free generators of Parent(G) + nrgens, # number of generators of the parent of and + ren, # if 'ren[]' is 'nrcosH * + ' then the + # coset of corresponds to the intersection + # of the pair of cosets of and of + ner, # the inverse mapping of 'ren' + cos, # coset loop variable + gen, # generator loop variable + img; # image of under + + Fam:=FamilyObj(G); + # handle trivial cases + if IsIdentical(G,Fam!.wholeGroup) then + return H; + elif IsIdentical(H,Fam!.wholeGroup) then + return G; + fi; + + tableG := CosetTableInWholeGroup(G); + nrcosG := Length( tableG[1] ) + 1; + tableH := CosetTableInWholeGroup(H); + nrcosH := Length( tableH[1] ) + 1; + + if nrcosGi in G) then + return G; + fi; + elif nrcosHi in H) then + return H; + fi; + fi; + + pargens:=GeneratorsOfGroup(Fam!.wholeGroup); + freegens:=FreeGeneratorsOfFpGroup(G); + # initialize the table for the intersection + rels := RelatorRepresentatives( ElementsFamily(Fam)!.relators ); + nrgens := Length(freegens); + table := []; + for gen in [ 1 .. nrgens ] do + table[ 2*gen-1 ] := []; + if freegens[ gen ]^2 in rels + or freegens[ gen ]^-2 in rels + then + table[ 2*gen ] := table[ 2*gen-1 ]; + else + table[ 2*gen ] := []; + fi; + od; + + # set up the renumbering + ren := ListWithIdenticalEntries(nrcosG*nrcosH,0); + ner := ListWithIdenticalEntries(nrcosG*nrcosH,0); + ren[ 1*nrcosH + 1 ] := 1; + ner[ 1 ] := 1*nrcosH + 1; + nrcos := 1; + + # the coset table for the intersection is the transitive component of 1 + # in the *tensored* permutation representation + cos := 1; + while cos <= nrcos do + + # loop over all entries in this row + for gen in [ 1 .. nrgens ] do + + # get the coset pair + img := nrcosH * tableG[ 2*gen-1 ][ QuoInt( ner[ cos ], nrcosH ) ] + + tableH[ 2*gen-1 ][ ner[ cos ] mod nrcosH ]; + + # if this pair is new give it the next available coset number + if ren[ img ] = 0 then + nrcos := nrcos + 1; + ren[ img ] := nrcos; + ner[ nrcos ] := img; + fi; + + # and enter it into the coset table + table[ 2*gen-1 ][ cos ] := ren[ img ]; + table[ 2*gen ][ ren[ img ] ] := cos; + + od; + + cos := cos + 1; + od; + + # now make the subgroup + I:=SubgroupGeneratorsCosetTable(freegens,rels, table ); + I:=List(I,i->MappedWord(i,freegens,pargens)); + I:=Subgroup(Fam!.wholeGroup,I); + SetCosetTableInWholeGroup(I,table); + + # and return it + return I; +end); + + ############################################################################# ## #M IsAbelian( ) . . . . . . . . . . . . test if an fp group is abelian @@ -776,6 +962,26 @@ function( G ) end ); +############################################################################# +## +#M IsSingleValued +## +InstallMethod( IsSingleValued, + "map from fp group or free group, given on std. gens: test relators", + true, + [IsFromFpGroupStdGensGeneralMappingByImages],0, +function(hom) +local s,sg,o; + s:=Source(hom); + if IsFreeGroup(s) then + return true; + fi; + sg:=FreeGeneratorsOfFpGroup(s); + o:=One(Range(hom)); + return ForAll(RelatorsOfFpGroup(s),i->MappedWord(i,sg,hom!.genimages)=o); +end); + + ############################################################################# ## #M IsTrivial( ) . . . . . . . . . . . . . . . . . test if is trivial @@ -1105,8 +1311,53 @@ end); ############################################################################# ## -#F LowIndexSubgroupsFpGroup(,,[,]) . . find subgroups -#F of small index in a finitely presented group +#M KernelOfMultiplicativeGeneralMapping( ) +## +InstallMethod( KernelOfMultiplicativeGeneralMapping, + "map from fp group or free group", + true, [ IsFromFpGroupStdGensGeneralMappingByImages + and IsToPermGroupGeneralMappingByImages ],0, +function(hom) +local f,p,t,orbs,o,cor,i,j,k,u,e,frg; + + f:=Source(hom); + frg:=FreeGeneratorsOfFpGroup(f); + p:=Range(hom); + # construct coset table + t:=[]; + orbs:=Orbits(p,MovedPoints(p)); + cor:=f; + + for o in orbs do + # form coset table + for i in hom!.genimages do + for j in [1,-1] do + e:=i^j; + Add(t,List(o,k->Position(o,k^e))); + od; + od; + StandardizeTable(t); + + # get subgroup generators + u:=SubgroupGeneratorsCosetTable(frg, + ElementsFamily(FamilyObj(f))!.relators,t); + + # map them to f + u:=List(u,i->MappedWord(i,frg,hom!.generators)); + + u:=Subgroup(f,u); + SetCosetTableInWholeGroup(u,t); + cor:=Intersection(cor,u); + od; + cor:=Core(f,cor); + return cor; +end); + + +############################################################################# +## +#M LowIndexSubgroupsFpGroup(,,[,]) . . find subgroups +#M of small index in a finitely presented group ## LowIndexSubgroupsFpGroup := function ( arg ) local G, # parent group @@ -1857,7 +2108,7 @@ end); ## is automatically cyclically reduced). ## RelatorRepresentatives := function ( rels ) - local cyc, fam, i, length, list, min, rel, reversed, reps; + local cyc, fam, i, j, length, list, min, rel, reversed, reps; reps := [ ]; @@ -1885,21 +2136,25 @@ RelatorRepresentatives := function ( rels ) if cyc^-1 < min then min := cyc^-1; fi; od; - # reinvert the exponents. - list := ExtRepOfObj( min ); - for i in [ 2, 4 .. Length( list ) ] do - list[i] := -list[i]; - od; - # if the relator is new, add it to the representatives - min := ObjByExtRep( fam, list ); if not min in reps then - AddSet( reps, min ); + AddSet( reps, [ LengthWord( min ), min ] ); fi; fi; od; + # reinvert the exponents. + for i in [ 1 .. Length( reps ) ] do + rel := reps[i][2]; + fam := FamilyObj( rel ); + list := ExtRepOfObj( rel ); + for j in [ 2, 4 .. Length( list ) ] do + list[j] := -list[j]; + od; + reps[i] := ObjByExtRep( fam, list ); + od; + # return the representatives return reps; end; @@ -2107,6 +2362,131 @@ function( H ) end ); +############################################################################# +## +#M SubgroupGeneratorsCosetTable(,,
) +## determines subgroup generators from free generators, relators and +## coset table. It returns elements of the free group! +## +SubgroupGeneratorsCosetTable := function ( freegens, fprels, table ) + local gens, # generators for the subgroup + rels, # representatives for the relators + relsGen, # relators sorted by start generator + deductions, # deduction queue + ded, # index of current deduction in above + nrdeds, # current number of deductions in above + nrgens, + cos, # loop variable for coset + i, gen, inv, # loop variables for generator + g, # loop variable for generator col + rel, # loop variable for relation + p, p1, p2, # generator position numbers + triple, # loop variable for relators as triples + app, # arguments list for 'ApplyRel' + x, y, c; + + nrgens := 2 * Length( freegens ) + 1; + gens := []; + + # make all entries in the table negative + for cos in [ 1 .. Length( table[1] ) ] do + for gen in table do + if 0 < gen[cos] then + gen[cos] := -gen[cos]; + fi; + od; + od; + + # make the rows for the relators and distribute over relsGen + rels := RelatorRepresentatives( fprels ); + relsGen := RelsSortedByStartGen( freegens, rels, table, false ); + + # make the structure that is passed to 'ApplyRel' + app := ListWithIdenticalEntries(4,0); + + # run over all the cosets + cos := 1; + while cos <= Length( table[1] ) do + + # run through all the rows and look for undefined entries + for i in [1..Length(freegens)] do + gen := table[2*i-1]; + + if gen[cos] < 0 then + + inv := table[2*i]; + + # make the Schreier generator for this entry + x := One(freegens[1]); + c := cos; + while c <> 1 do + g := nrgens - 1; + y := nrgens - 1; + while 0 < g do + if AbsInt(table[g][c]) <= AbsInt(table[y][c]) then + y := g; + fi; + g := g - 2; + od; + x := freegens[ y/2 ] * x; + c := AbsInt(table[y][c]); + od; + x := x * freegens[ i ]; + c := AbsInt( gen[ cos ] ); + while c <> 1 do + g := nrgens - 1; + y := nrgens - 1; + while 0 < g do + if AbsInt(table[g][c]) <= AbsInt(table[y][c]) then + y := g; + fi; + g := g - 2; + od; + x := x * freegens[ y/2 ]^-1; + c := AbsInt(table[y][c]); + od; + if x <> One(x) then + Add( gens, x ); + fi; + + # define a new coset + gen[cos] := - gen[cos]; + inv[ gen[cos] ] := cos; + + # set up the deduction queue and run over it until it's empty + deductions := [ [i,cos] ]; + nrdeds := 1; + ded := 1; + while ded <= nrdeds do + + # apply all relators that start with this generator + for triple in relsGen[deductions[ded][1]] do + app[1] := triple[3]; + app[2] := deductions[ded][2]; + app[3] := -1; + app[4] := app[2]; + if ApplyRel( app, triple[2] ) then + triple[2][app[1]][app[2]] := app[4]; + triple[2][app[3]][app[4]] := app[2]; + nrdeds := nrdeds + 1; + deductions[nrdeds] := [triple[1][app[1]],app[2]]; + fi; + od; + + ded := ded + 1; + od; + + fi; + od; + + cos := cos + 1; + od; + + # return the generators + return gens; +end; + + ############################################################################# ## #E grpfp.gi . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here diff --git a/lib/grplatt.gd b/lib/grplatt.gd index f3e56191a4..71d99e8679 100644 --- a/lib/grplatt.gd +++ b/lib/grplatt.gd @@ -30,6 +30,11 @@ IsLatticeSubgroupsRep := NewRepresentation("IsLatticeSubgroupsRep", ## #A Zuppos() . set of generators for cyclic subgroups of prime power size ## +## The *Zuppos* of a group are the cyclic subgroups of prime power order. +## (The name ``Zuppo'' derives from the German abbreviation.) This attribute +## gives generators of all such subgroups of a group . That is all elements +## of of prime power order up to the equivalence that they generate the +## same cyclic subgroup. Zuppos := NewAttribute("Zuppos",IsGroup); SetZuppos := Setter(Zuppos); HasZuppos := Tester(Zuppos); @@ -54,13 +59,6 @@ MaximalSubgroupsLattice := MinimalSupergroupsLattice := NewAttribute("MinimalSupergroupsLattice",IsLatticeSubgroupsRep); -############################################################################# -## -#A NormalSubgroups -## -NormalSubgroups := NewAttribute( "NormalSubgroups", IsGroup ); -NormalSubgroupsAbove := NewOperationArgs( "NormalSubgroupsAbove" ); - ############################################################################# ## #A TableOfMarks() diff --git a/lib/grplatt.gi b/lib/grplatt.gi index f9318d92bf..be20008e3d 100644 --- a/lib/grplatt.gi +++ b/lib/grplatt.gi @@ -828,42 +828,6 @@ function (G) return maxs; end); -############################################################################# -## -#F NormalSubgroups( ) -## -InstallMethod(NormalSubgroups,"generic method for groups",true,[IsGroup],0, -function ( G ) - local nrm; - nrm := NormalSubgroupsAbove(G,TrivialSubgroup(G),[]); - Sort( nrm, function( a, b ) return Size( a ) < Size( b ); end ); - return nrm; -end ); - -NormalSubgroupsAbove := function ( G, N, avoid ) - local R, C, g, M; - - R := [ N ]; - avoid := ShallowCopy( avoid ); - for C in ConjugacyClasses( G ) do - g := Representative( C ); - if not g in avoid and not g in N then - - # compute the normal closure of and in - M := NormalClosure( G, ClosureGroup( N, g ) ); - if ForAll( avoid, rep -> not rep in M ) then - Append( R, NormalSubgroupsAbove(G,M,avoid) ); - fi; - - # from now on avoid this representative - Add( avoid, g ); - fi; - od; - - # return the list of normal subgroups - return R; -end; - ############################################################################# ## #M TableOfMarks() . . . . . . . . . . . . . . . . make a table of marks diff --git a/lib/grpnice.gd b/lib/grpnice.gd index 29f7661566..19cfdd645f 100644 --- a/lib/grpnice.gd +++ b/lib/grpnice.gd @@ -59,8 +59,9 @@ IsHandledByNiceMonomorphism := NewProperty( SetIsHandledByNiceMonomorphism := Setter(IsHandledByNiceMonomorphism); HasIsHandledByNiceMonomorphism := Tester(IsHandledByNiceMonomorphism); -InstallSubsetMaintainedMethod(IsHandledByNiceMonomorphism, - IsHandledByNiceMonomorphism and IsGroup,IsGroup); +InstallSubsetMaintainedMethod( IsHandledByNiceMonomorphism, + IsHandledByNiceMonomorphism and IsGroup, + IsGroup); ############################################################################# ## @@ -218,13 +219,13 @@ end; ############################################################################# ## -#F SubgroupMethodByNiceMonomorphism( , ) +#F GroupMethodByNiceMonomorphismCollOther( , ) ## -SubgroupMethodByNiceMonomorphism := function( oper, par ) +GroupMethodByNiceMonomorphismCollOther := function( oper, par ) # check the argument length - if 1 <> Length(par) then - Error( "need only one argument for ", NameFunction(oper) ); + if 2 <> Length(par) then + Error( "need two argument for ", NameFunction(oper) ); fi; par := ShallowCopy(par); par[1] := par[1] and IsHandledByNiceMonomorphism; @@ -235,22 +236,20 @@ SubgroupMethodByNiceMonomorphism := function( oper, par ) true, par, NICE_FLAGS, - function( obj ) - local nice, img, sub; + function( obj, other ) + local nice, img; nice := NiceMonomorphism(obj); - img := oper( NiceObject(obj) ); - sub := GroupByNiceMonomorphism( nice, img ); - SetParent( sub, obj ); - return sub; + img := oper( NiceObject(obj), other ); + return GroupByNiceMonomorphism( nice, img ); end ); end; ############################################################################# ## -#F SubgroupMethodByNiceMonomorphismCollColl( , ) +#F GroupMethodByNiceMonomorphismCollColl( , ) ## -SubgroupMethodByNiceMonomorphismCollColl := function( oper, par ) +GroupMethodByNiceMonomorphismCollColl := function( oper, par ) # check the argument length if 2 <> Length(par) then @@ -268,11 +267,11 @@ SubgroupMethodByNiceMonomorphismCollColl := function( oper, par ) NICE_FLAGS, function( obj1, obj2 ) local nice, img; - if not IsSubgroup( obj1, obj2 ) then + nice := NiceMonomorphism(obj1); + if not IsIdentical( nice, NiceMonomorphism(obj2) ) then TryNextMethod(); fi; - nice := NiceMonomorphism(obj1); - img := oper( NiceObject(obj1), Image(nice,obj2) ); + img := oper( NiceObject(obj1), NiceObject(obj2) ); return GroupByNiceMonomorphism( nice, img ); end ); end; @@ -280,9 +279,72 @@ end; ############################################################################# ## -#F GroupMethodByNiceMonomorphismCollOther( , ) +#F GroupMethodByNiceMonomorphismCollElm( , ) ## -GroupMethodByNiceMonomorphismCollOther := function( oper, par ) +GroupMethodByNiceMonomorphismCollElm := function( oper, par ) + + # check the argument length + if 2 <> Length(par) then + Error( "need two arguments for ", NameFunction(oper) ); + fi; + par := ShallowCopy(par); + par[1] := par[1] and IsHandledByNiceMonomorphism; + + # install the method + InstallOtherMethod( oper, + "handled by nice monomorphism", + IsCollsElms, + par, + NICE_FLAGS, + function( obj1, obj2 ) + local nice, img, img1; + nice := NiceMonomorphism(obj1); + img := ImagesRepresentative( nice, obj2 ); + if img = fail then + TryNextMethod(); + fi; + img1 := oper( NiceObject(obj1), img ); + return GroupByNiceMonomorphism( nice, img1 ); + end ); +end; + + +############################################################################# +## + +#F SubgroupMethodByNiceMonomorphism( , ) +## +SubgroupMethodByNiceMonomorphism := function( oper, par ) + + # check the argument length + if 1 <> Length(par) then + Error( "need only one argument for ", NameFunction(oper) ); + fi; + par := ShallowCopy(par); + par[1] := par[1] and IsHandledByNiceMonomorphism; + + # install the method + InstallOtherMethod( oper, + "handled by nice monomorphism", + true, + par, + NICE_FLAGS, + function( obj ) + local nice, img, sub; + nice := NiceMonomorphism(obj); + img := oper( NiceObject(obj) ); + sub := GroupByNiceMonomorphism( nice, img ); + SetParent( sub, obj ); + return sub; + end ); +end; + + +############################################################################# +## +#F SubgroupMethodByNiceMonomorphismCollOther( , ) +## +SubgroupMethodByNiceMonomorphismCollOther := function( oper, par ) # check the argument length if 2 <> Length(par) then @@ -298,19 +360,21 @@ GroupMethodByNiceMonomorphismCollOther := function( oper, par ) par, NICE_FLAGS, function( obj, other ) - local nice, img; + local nice, img, sub; nice := NiceMonomorphism(obj); img := oper( NiceObject(obj), other ); - return GroupByNiceMonomorphism( nice, img ); + sub := GroupByNiceMonomorphism( nice, img ); + SetParent( sub, obj ); + return sub; end ); end; ############################################################################# ## -#F GroupMethodByNiceMonomorphismCollColl( , ) +#F SubgroupMethodByNiceMonomorphismCollColl( , ) ## -GroupMethodByNiceMonomorphismCollColl := function( oper, par ) +SubgroupMethodByNiceMonomorphismCollColl := function( oper, par ) # check the argument length if 2 <> Length(par) then @@ -327,22 +391,24 @@ GroupMethodByNiceMonomorphismCollColl := function( oper, par ) par, NICE_FLAGS, function( obj1, obj2 ) - local nice, img; - nice := NiceMonomorphism(obj1); - if not IsIdentical( nice, NiceMonomorphism(obj2) ) then + local nice, img, sub; + if not IsSubgroup( obj1, obj2 ) then TryNextMethod(); fi; - img := oper( NiceObject(obj1), NiceObject(obj2) ); - return GroupByNiceMonomorphism( nice, img ); + nice := NiceMonomorphism(obj1); + img := oper( NiceObject(obj1), Image(nice,obj2) ); + sub := GroupByNiceMonomorphism( nice, img ); + SetParent( sub, obj1 ); + return sub; end ); end; ############################################################################# ## -#F GroupMethodByNiceMonomorphismCollElm( , ) +#F SubgroupMethodByNiceMonomorphismCollElm( , ) ## -GroupMethodByNiceMonomorphismCollElm := function( oper, par ) +SubgroupMethodByNiceMonomorphismCollElm := function( oper, par ) # check the argument length if 2 <> Length(par) then @@ -358,14 +424,16 @@ GroupMethodByNiceMonomorphismCollElm := function( oper, par ) par, NICE_FLAGS, function( obj1, obj2 ) - local nice, img, img1; + local nice, img, img1, sub; nice := NiceMonomorphism(obj1); img := ImagesRepresentative( nice, obj2 ); if img = fail then TryNextMethod(); fi; img1 := oper( NiceObject(obj1), img ); - return GroupByNiceMonomorphism( nice, img1 ); + sub := GroupByNiceMonomorphism( nice, img1 ); + SetParent( sub, obj1 ); + return sub; end ); end; diff --git a/lib/grpnice.gi b/lib/grpnice.gi index c32bf294f8..c85ad0a1e8 100644 --- a/lib/grpnice.gi +++ b/lib/grpnice.gi @@ -15,34 +15,41 @@ Revision.grpnice_gi := ############################################################################# ## -#M GeneratorsOfMagmaWithInverses( ) + +#M GeneratorsOfMagmaWithInverses( ) . get generators from nice obj ## InstallMethod( GeneratorsOfMagmaWithInverses, true, [ IsGroup and IsHandledByNiceMonomorphism ], 0, -function( G ) +function( grp ) local nice; - nice := NiceMonomorphism(G); - return List( GeneratorsOfGroup(NiceObject(G)), + nice := NiceMonomorphism(grp); + return List( GeneratorsOfGroup(NiceObject(grp)), x -> PreImagesRepresentative(nice,x) ); end ); ############################################################################# ## -#M One( ) +#M One( ) . . . . . . . . . . . . . . . . . . get one from nice obj ## -InstallOtherMethod( One,"via niceomorphism",true, - [ IsGroup and IsHandledByNiceMonomorphism ], 0, -function( G ) - return PreImagesRepresentative(NiceMonomorphism(G),One(NiceObject(G))); +InstallOtherMethod( One, + true, + [ IsGroup and IsHandledByNiceMonomorphism ], + 0, + +function( grp ) + local nice; + nice := NiceMonomorphism(grp); + return PreImagesRepresentative(nice,One(NiceObject(grp))); end ); + ############################################################################# ## -#M GroupByNiceMonomorphism( , ) +#M GroupByNiceMonomorphism( , ) construct group with nice obj ## InstallMethod( GroupByNiceMonomorphism, true, @@ -64,7 +71,7 @@ end ); ############################################################################# ## -#M NiceObject( ) +#M NiceObject( ) . . . . . . . . . . . . . get nice object of group ## InstallMethod( NiceObject, true, @@ -91,31 +98,51 @@ end ); ############################################################################# ## -#M NiceMonomorphism +#M NiceMonomorphism( ) . . construct a nice monomorphism from parent ## InstallMethod(NiceMonomorphism, - "for subgroups that get the nice monomorphism by their parent",true, - [ IsGroup and IsHandledByNiceMonomorphism and HasParent],0, + "for subgroups that get the nice monomorphism by their parent", + true, + [ IsGroup and IsHandledByNiceMonomorphism and HasParent], + 0, + function(G) -local P; - P:=Parent(G); - if not IsHandledByNiceMonomorphism(P) then - TryNextMethod(); - fi; - return NiceMonomorphism(P); -end); + local P; + + P :=Parent(G); + if not IsHandledByNiceMonomorphism(P) then + TryNextMethod(); + fi; + return NiceMonomorphism(P); +end ); ############################################################################# ## - -#M \^( , ) +#M NiceMonomorphism( ) . . . . . . . . . . . . . . . . regular operation ## -GroupMethodByNiceMonomorphismCollElm( \^, - [ IsGroup, IsMultiplicativeElementWithInverse ] ); +InstallMethod( NiceMonomorphism, "regular operation", true, + [ IsGroup and IsHandledByNiceMonomorphism ], 0, + function( G ) + local mon; + + if not HasGeneratorsOfGroup( G ) then + TryNextMethod(); + elif not HasOne( G ) then + if IsEmpty( GeneratorsOfGroup( G ) ) then + TryNextMethod(); + else + SetOne( G, One( GeneratorsOfGroup( G )[ 1 ] ) ); + fi; + fi; + mon := OperationHomomorphism( G, AsList( G ), OnRight ); + SetIsInjective( mon, true ); + return mon; +end ); ############################################################################# ## + #M \=( , ) . . . . . . . . . . . . . . test if two groups are equal ## PropertyMethodByNiceMonomorphismCollColl( \=, @@ -124,18 +151,22 @@ PropertyMethodByNiceMonomorphismCollColl( \=, ############################################################################# ## -#M \in( , ) . . . . . . . . . . . . test if elm \in G +#M \in( , ) . . . . . . . . . . . . . . . . . test if in ## -InstallMethod( \in, "by nice monomorphism", IsElmsColls, - [ IsMultiplicativeElementWithInverse, - IsGroup and IsHandledByNiceMonomorphism ], 0, - function( elm, G ) +InstallMethod( \in, + "by nice monomorphism", + IsElmsColls, + [ IsMultiplicativeElementWithInverse, + IsGroup and IsHandledByNiceMonomorphism ], + 0, + +function( elm, G ) local nice, img; nice := NiceMonomorphism( G ); - img := ImagesRepresentative( nice, elm ); - return img in NiceObject( G ) - and PreImagesRepresentative( nice, img ) = elm; + img := ImagesRepresentative( nice, elm ); + return img in NiceObject( G ) + and PreImagesRepresentative( nice, img ) = elm; end ); @@ -151,7 +182,7 @@ AttributeMethodByNiceMonomorphism( AbelianInvariants, ## #M Centralizer( , ) . . . . . . . . . . . . centralizer of subgroup ## -GroupMethodByNiceMonomorphismCollColl( Centralizer, +SubgroupMethodByNiceMonomorphismCollColl( CentralizerOp, [ IsGroup, IsGroup ] ); @@ -159,7 +190,7 @@ GroupMethodByNiceMonomorphismCollColl( Centralizer, ## #M Centralizer( , ) . . . . . . . . . . . . centralizer of element ## -GroupMethodByNiceMonomorphismCollElm( Centralizer, +SubgroupMethodByNiceMonomorphismCollElm( CentralizerOp, [ IsGroup, IsObject ] ); @@ -191,7 +222,7 @@ GroupMethodByNiceMonomorphismCollElm( ClosureGroup, ## #M CommutatorFactorGroup( ) . . . . commutator factor group of a group ## -SubgroupMethodByNiceMonomorphism( CommutatorFactorGroup, +AttributeMethodByNiceMonomorphism( CommutatorFactorGroup, [ IsGroup ] ); @@ -205,9 +236,31 @@ GroupMethodByNiceMonomorphismCollColl( CommutatorSubgroup, ############################################################################# ## -#M ConjugateSubgroup( , ) . . . . . . . . . . . . . conjugate of +#M ConjugacyClasses +## +InstallMethod(ConjugacyClasses,"via niceomorphism",true, + [IsGroup and IsHandledByNiceMonomorphism],NICE_FLAGS, +function(g) +local mon,cl,clg,c,i; + mon:=NiceMonomorphism(g); + cl:=ConjugacyClasses(NiceObject(g)); + clg:=[]; + for i in cl do + c:=ConjugacyClass(g,PreImagesRepresentative(mon,Representative(i))); + if HasStabilizerOfExternalSet(i) then + SetStabilizerOfExternalSet(c,PreImages(mon,StabilizerOfExternalSet(i))); + fi; + Add(clg,c); + od; + return clg; +end); + + +############################################################################# +## +#M ConjugateGroup( , ) . . . . . . . . . . . . . . conjugate of ## -GroupMethodByNiceMonomorphismCollElm( ConjugateSubgroup, +GroupMethodByNiceMonomorphismCollElm( ConjugateGroup, [ IsGroup and HasParent, IsMultiplicativeElementWithInverse ] ); @@ -215,7 +268,7 @@ GroupMethodByNiceMonomorphismCollElm( ConjugateSubgroup, ## #M Core( , ) . . . . . . . . . . . . . . . . core of a in a ## -GroupMethodByNiceMonomorphismCollColl( Core, +GroupMethodByNiceMonomorphismCollColl( CoreOp, [ IsGroup, IsGroup ] ); @@ -279,7 +332,7 @@ SubgroupMethodByNiceMonomorphism( FrattiniSubgroup, ## #M Index( , ) . . . . . . . . . . . . . . . . . . index of in ## -AttributeMethodByNiceMonomorphismCollColl( Index, +AttributeMethodByNiceMonomorphismCollColl( IndexOp, [ IsGroup, IsGroup ] ); @@ -335,7 +388,7 @@ PropertyMethodByNiceMonomorphism( IsNilpotentGroup, ## #M IsNormal( , ) . . . . . . . . . . . . . test if normal in ## -PropertyMethodByNiceMonomorphismCollColl( IsNormal, +PropertyMethodByNiceMonomorphismCollColl( IsNormalOp, [ IsGroup, IsGroup ] ); @@ -387,6 +440,34 @@ PropertyMethodByNiceMonomorphism( IsSupersolvableGroup, [ IsGroup ] ); +############################################################################# +## +#M IsomorphismPcGroup +## +InstallMethod(IsomorphismPcGroup,"via niceomorphisms",true, + [IsGroup and IsHandledByNiceMonomorphism],NICE_FLAGS, +function(g) +local mon,iso,xset; + mon:=NiceMonomorphism(g); + if not IsOperationHomomorphism( mon ) then + TryNextMethod(); + fi; + xset := UnderlyingExternalSet( mon ); + if IsExternalSetByOperatorsRep( xset ) then + mon := OperationHomomorphism( g, HomeEnumerator( xset ), + xset!.generators, xset!.operators, xset!.funcOperation ); + else + mon := OperationHomomorphism( g, HomeEnumerator( xset ), + FunctionOperation( xset ) ); + fi; + iso:=IsomorphismPcGroup(NiceObject(g)); + if iso=fail then + return fail; + else + return mon*iso; + fi; +end); + ############################################################################# ## #M JenningsSeries( ) . . . . . . . . . . . jennings series of a p-group @@ -407,7 +488,7 @@ GroupSeriesMethodByNiceMonomorphism( LowerCentralSeriesOfGroup, ## #M NormalClosure( , ) . . . . normal closure of a subgroup in a group ## -GroupMethodByNiceMonomorphismCollColl( NormalClosure, +GroupMethodByNiceMonomorphismCollColl( NormalClosureOp, [ IsGroup, IsGroup ] ); @@ -423,9 +504,7 @@ GroupMethodByNiceMonomorphismCollColl( NormalIntersection, ## #M Normalizer( , ) . . . . . . . . . . . . normalizer of in ## -GroupMethodByNiceMonomorphismCollColl( Normalizer, - [ IsGroup, IsGroup ] ); -SubgroupMethodByNiceMonomorphismCollColl( Normalizer, +SubgroupMethodByNiceMonomorphismCollColl( NormalizerOp, [ IsGroup, IsGroup ] ); @@ -465,7 +544,7 @@ GroupSeriesMethodByNiceMonomorphismCollOther( PCentralSeriesOp, ## #M PCoreOp( ,

) . . . . . . . . . . . . . . . . . . p-core of a group ## -GroupMethodByNiceMonomorphismCollOther( PCoreOp, +SubgroupMethodByNiceMonomorphismCollOther( PCoreOp, [ IsGroup, IsPosRat and IsInt ] ); @@ -477,6 +556,46 @@ SubgroupMethodByNiceMonomorphism( RadicalGroup, [ IsGroup ] ); +############################################################################# +## +#M RationalClasses +## +InstallMethod(RationalClasses,"via niceomorphism",true, + [IsGroup and IsHandledByNiceMonomorphism],NICE_FLAGS, +function(g) +local mon,cl,clg,c,i; + mon:=NiceMonomorphism(g); + cl:=RationalClasses(NiceObject(g)); + clg:=[]; + for i in cl do + c:=RationalClass(g,PreImagesRepresentative(mon,Representative(i))); + if HasStabilizerOfExternalSet(i) then + SetStabilizerOfExternalSet(c,PreImages(mon,StabilizerOfExternalSet(i))); + fi; + if HasGaloisGroup(i) then + SetGaloisGroup(c,GaloisGroup(i)); + fi; + Add(clg,c); + od; + return clg; +end); + + +############################################################################# +## +#M RightTransversal +## +InstallMethod(RightTransversalOp,"via niceomorphism",true, + [IsGroup and IsHandledByNiceMonomorphism,IsGroup],NICE_FLAGS, +function(g,u) +local mon,rt; + mon:=NiceMonomorphism(g); + rt:=RightTransversal(ImagesSet(mon,g),ImagesSet(mon,u)); + rt:=List(rt,i->PreImagesRepresentative(mon,i)); + return rt; +end); + + ############################################################################# ## #M Size( ) . . . . . . . . . . . . . . . . . . . . . . . . . size of @@ -505,7 +624,7 @@ AttributeMethodByNiceMonomorphism( SizesConjugacyClasses, ## #M SubnormalSeries( , ) . subnormal series from a group to a subgroup ## -GroupSeriesMethodByNiceMonomorphismCollColl( SubnormalSeries, +GroupSeriesMethodByNiceMonomorphismCollColl( SubnormalSeriesOp, [ IsGroup, IsGroup ] ); @@ -513,18 +632,10 @@ GroupSeriesMethodByNiceMonomorphismCollColl( SubnormalSeries, ## #M SylowSubgroupOp( ,

) . . . . . . . . . . Sylow subgroup of a group ## -GroupMethodByNiceMonomorphismCollOther( SylowSubgroupOp, +SubgroupMethodByNiceMonomorphismCollOther( SylowSubgroupOp, [ IsGroup, IsPosRat and IsInt ] ); -############################################################################# -## -#M TrivialSubgroup( ) . . . . . . . . . . . trivial subgroup of a group -## -SubgroupMethodByNiceMonomorphism( TrivialSubgroup, - [ IsGroup ] ); - - ############################################################################# ## #M UpperCentralSeriesOfGroup( ) . . . . upper central series of a group @@ -533,71 +644,6 @@ GroupSeriesMethodByNiceMonomorphism( UpperCentralSeriesOfGroup, [ IsGroup ] ); -############################################################################# -## -#M IsomorphismPcGroup -## -InstallMethod(IsomorphismPcGroup,"via niceomorphisms",true, - [IsGroup and IsHandledByNiceMonomorphism],NICE_FLAGS, -function(g) -local mon,iso,xset; - mon:=NiceMonomorphism(g); - if not IsOperationHomomorphism( mon ) then - TryNextMethod(); - fi; - xset := UnderlyingExternalSet( mon ); - if IsExternalSetByOperatorsRep( xset ) then - mon := OperationHomomorphism( g, HomeEnumerator( xset ), - xset!.generators, xset!.operators, xset!.funcOperation ); - else - mon := OperationHomomorphism( g, HomeEnumerator( xset ), - FunctionOperation( xset ) ); - fi; - iso:=IsomorphismPcGroup(NiceObject(g)); - if iso=fail then - return fail; - else - return mon*iso; - fi; -end); - -############################################################################# -## -#M ConjugacyClasses -## -InstallMethod(ConjugacyClasses,"via niceomorphism",true, - [IsGroup and IsHandledByNiceMonomorphism],NICE_FLAGS, -function(g) -local mon,cl,clg,c,i; - mon:=NiceMonomorphism(g); - cl:=ConjugacyClasses(NiceObject(g)); - clg:=[]; - for i in cl do - c:=ConjugacyClass(g,PreImagesRepresentative(mon,Representative(i))); - if HasStabilizerOfExternalSet(i) then - SetStabilizerOfExternalSet(c,PreImages(mon,StabilizerOfExternalSet(i))); - fi; - Add(clg,c); - od; - return clg; -end); - - -############################################################################# -## -#M RightTransversal -## -InstallMethod(RightTransversal,"via niceomorphism",true, - [IsGroup and IsHandledByNiceMonomorphism,IsGroup],NICE_FLAGS, -function(g,u) -local mon,rt; - mon:=NiceMonomorphism(g); - rt:=RightTransversal(ImagesSet(mon,g),ImagesSet(mon,u)); - rt:=List(rt,i->PreImagesRepresentative(mon,i)); - return rt; -end); - - ############################################################################# ## diff --git a/lib/grppc.gi b/lib/grppc.gi index 4651ba296c..2139d9142f 100644 --- a/lib/grppc.gi +++ b/lib/grppc.gi @@ -660,7 +660,7 @@ end ); ## #M Core( , ) ## -InstallMethod( Core, +InstallMethod( CoreOp, "pcgs computable groups", true, [ IsGroup and IsPcgsComputable, @@ -859,7 +859,7 @@ end ); ## #M NormalClosure( , ) ## -InstallMethod( NormalClosure, +InstallMethod( NormalClosureOp, "groups with home pcgs", true, [ IsGroup and HasHomePcgs, @@ -936,7 +936,7 @@ end ); ## #M Centralizer( , ) . . . . . . . . . . . . . . using affine methods ## -InstallMethod( Centralizer, +InstallMethod( CentralizerOp, "pcgs computable group and element", IsCollsElms, [ IsGroup and IsPcgsComputable and IsFinite, @@ -947,7 +947,7 @@ function( G, g ) return ClassesSolvableGroup( G, Group( g ), true, 0, g ); end ); -InstallMethod( Centralizer, +InstallMethod( CentralizerOp, "pcgs computable groups", IsIdentical, [ IsGroup and IsPcgsComputable and IsFinite, @@ -976,7 +976,7 @@ InstallOtherMethod( RepresentativeOperationOp, 0, function( G, d, e, opr ) - if opr <> OnPoints then + if opr <> OnPoints or not (IsPcGroup(G) or (d in G and e in G)) then TryNextMethod(); fi; return ClassesSolvableGroup( G, G, true, 4, [ d, e ] ); diff --git a/lib/grppcatr.gi b/lib/grppcatr.gi index bfddc81b68..dee4a466ba 100644 --- a/lib/grppcatr.gi +++ b/lib/grppcatr.gi @@ -564,22 +564,23 @@ end); #F NextStepCentralizer( , , , ) ## NextStepCentralizer := function( gens, cent, pcgsF, field ) - local h, g, newgens, matlist, comm, null, elm, j; + local g, newgens, matlist, notcentral, h, comm, null, j, elm; for g in gens do if Length( cent ) = 0 then return []; fi; newgens := []; matlist := []; + notcentral := []; for h in cent do comm := ExponentsOfPcElement( pcgsF, Comm( h, g ) ) * One(field); if comm = Zero( field ) * comm then Add( newgens, h ); else + Add( notcentral, h ); Add( matlist, comm ); fi; od; - cent := Difference( cent, newgens ); if Length( matlist ) > 0 then @@ -588,7 +589,7 @@ NextStepCentralizer := function( gens, cent, pcgsF, field ) # calculate elements corresponding to null for j in [1..Length(null)] do - elm := PcElementByExponents( pcgsF, cent, null[j] ); + elm := PcElementByExponents( pcgsF, notcentral, null[j] ); Add( newgens, elm ); od; fi; diff --git a/lib/grppcaut.gi b/lib/grppcaut.gi index 21cfb6cd2b..99e510581d 100644 --- a/lib/grppcaut.gi +++ b/lib/grppcaut.gi @@ -3,7 +3,7 @@ #W grppcaut.gi GAP library Bettina Eick ## Revision.grppcaut_gi := - "@(#)$Id:"; + "@(#)$Id$"; ############################################################################# ## @@ -586,7 +586,7 @@ LiftInduciblePair := function( epi, ind, M, weight ) # solve system u := SolutionMat( E, v ); - if IsBool( u ) then Error("no lifting found"); fi; + if u = fail then Error("no lifting found"); fi; # correct images for i in [1..n] do diff --git a/lib/grppcext.gd b/lib/grppcext.gd index d1b276e49c..4a2324bf68 100644 --- a/lib/grppcext.gd +++ b/lib/grppcext.gd @@ -3,7 +3,7 @@ #W grppcext.gd GAP library Bettina Eick ## Revision.grppcext_gd := - "@(#)$Id:"; + "@(#)$Id$"; ############################################################################# ## diff --git a/lib/grppcext.gi b/lib/grppcext.gi index a9642330c1..bac1c8ea7e 100644 --- a/lib/grppcext.gi +++ b/lib/grppcext.gi @@ -3,7 +3,7 @@ #W grppcext.gi GAP library Bettina Eick ## Revision.grppcext_gi := - "@(#)$Id:"; + "@(#)$Id$"; ############################################################################# ## diff --git a/lib/grppcfp.gd b/lib/grppcfp.gd index cee885bc4d..1946923d35 100644 --- a/lib/grppcfp.gd +++ b/lib/grppcfp.gd @@ -3,7 +3,7 @@ #W grppcfp.gd GAP library Bettina Eick ## Revision.grppcfp_gd := - "@(#)$Id:"; + "@(#)$Id$"; ############################################################################# ## diff --git a/lib/grppcfp.gi b/lib/grppcfp.gi index 53284d43b9..6b7f54176e 100644 --- a/lib/grppcfp.gi +++ b/lib/grppcfp.gi @@ -6,7 +6,7 @@ ## fp group and vice versa. ## Revision.grppcfp_gi := - "@(#)$Id:"; + "@(#)$Id$"; ############################################################################# ## @@ -479,7 +479,8 @@ LiftEpimorphismSQ := function( epi, M, c ) sol := SolutionMat( A, V ); # if there is no solution, then there is no lift - if IsBool( sol ) then return false; fi; + if sol = fail then return false; fi; +#T return value should be fail? # create lift elms := []; diff --git a/lib/grppclat.gd b/lib/grppclat.gd index b2a92dbc9a..c93b579aef 100644 --- a/lib/grppclat.gd +++ b/lib/grppclat.gd @@ -17,7 +17,6 @@ Revision.grppclat_gd:= #V Information function ## InfoPcSubgroup := NewInfoClass("InfoPcSubgroup"); -SetInfoLevel(InfoPcSubgroup,4); ############################################################################# ## diff --git a/lib/grppclat.gi b/lib/grppclat.gi index f49cb872ab..a027d288ee 100644 --- a/lib/grppclat.gi +++ b/lib/grppclat.gi @@ -26,7 +26,7 @@ local G,morph,N,s,p,e,i,j,k,ise; e:=[G,N]; else N:=TrivialSubgroup(G); - e:=DerivedSeries(G); + e:=DerivedSeriesOfGroup(G); fi; e:=ElementaryAbelianSeries(e); s:=[G]; @@ -88,6 +88,9 @@ local g,op,a,pcgs,ma,mat,d,f,i,j,new,newmat,id,p,dodim,compldim,compl,dims; if not IsElementaryAbelian(g) then Error(" must be a vector space"); fi; + if IsTrivial(g) then + return [g]; + fi; pcgs:=Pcgs(g); d:=Length(pcgs); p:=RelativeOrderOfPcElement(pcgs,pcgs[1]); @@ -220,6 +223,7 @@ end; ## normal: just search for normal subgroups ## consider: function(A,N,B,M) indicator function, whether ## complements of this type would be needed +## retnorm: return normalizers ## InvariantSubgroupsPcGroup := function(arg) local g, # group @@ -239,6 +243,7 @@ local g, # group opt, # options record normal, # flag for 'normal' option consider, # optional 'consider' function + retnorm, # option: return all normalizers f, # g/e[i] epi, # g -> f lastepi, # epi of last step @@ -306,6 +311,9 @@ local g, # group else consider:=false; fi; + + retnorm:=IsBound(opt.retnorm) and opt.retnorm; + isom:=fail; # get automorphisms and compute their normalizer, if applicable @@ -334,14 +342,13 @@ local g, # group # get the normalizer of funcnorm:=Normalizer(g,Subgroup(b,func)); -Assert(1,IsSubgroup(g,funcnorm)); -funcnorm:=Subgroup(g,Filtered(GeneratorsOfGroup(funcnorm),i->i in g)); + Assert(1,IsSubgroup(g,funcnorm)); func:=List(func,i->InnerAutomorphism(b,i)); # compute characteristic series e:=InvariantElementaryAbelianSeries(g,func); - f:=DerivedSeries(g); + f:=DerivedSeriesOfGroup(g); if Length(e)>Length(f) and ForAll([1..Length(f)-1],i->IsElementaryAbelian(f[i]/f[i+1])) then Info(InfoPcSubgroup,1," Preferring Derived Series"); @@ -536,7 +543,7 @@ Assert(1,ForAll(bs,i->ForAll(efunc,j->Image(j,i)=i))); # compute fusion kconh:=List([1..Length(com)],i->[i]); - if iForAll(efunc,j->Image(j,i)=i))); elif comnorms<>fail then comnorms:=List(com,i->z.cocycleToComplement(i)); - comnorms:=List(comnorms, - i->ClosureGroup(CentralizerModulo(n,b,i),i)); + if Size(a)=Size(bsnorms[bpos]) then + comnorms:=List(comnorms, + i->ClosureGroup(CentralizerModulo(n,b,i),i)); + else + comnorms:=List(comnorms,i->Normalizer(bsnorms[bpos],i)); + fi; fi; @@ -669,8 +680,8 @@ Assert(1,ForAll(bs,i->ForAll(efunc,j->Image(j,i)=i))); # a possible conjugating element is a solution of the # large LGS - l:=SolutionMat(glsyl,glsyr); - if l<>false then + l:= SolutionMat(glsyl,glsyr); + if l <> fail then m:=Product([1..Length(l)], i->nag[i]^IntFFE(l[i])); # note that we found one! @@ -744,15 +755,69 @@ Assert(1,ForAll(bs,i->ForAll(efunc,j->Image(j,i)=i))); grps:=ngrps; grpsnorms:=ngrpsnorms; + Info(InfoPcSubgroup,5,List(grps,Size),List(grpsnorms,Size)); od; if isom<>fail then grps:=List(grps,j->PreImage(isom,j)); + if retnorm then + grpsnorms:=List(grpsnorms,j->PreImage(isom,j)); + fi; fi; - return grps; + if retnorm then + return [grps,grpsnorms]; + else + return grps; + fi; end; + +############################################################################# +## +#M LatticeSubgroups() . . . . . . . . . . lattice of subgroups +## +InstallMethod(LatticeSubgroups,"elementary abelian extension",true, + [IsSolvableGroup],0, +function(G) +local s,i,c,classes, lattice; + s:=InvariantSubgroupsPcGroup(G,rec(retnorm:=true)); + classes:=[]; + for i in [1..Length(s[1])] do + c:=ConjugacyClassSubgroups(G,s[1][i]); + SetStabilizerOfExternalSet(c,s[2][i]); + Add(classes,c); + od; + + # create the lattice + lattice:=Objectify(NewType(FamilyObj(classes),IsLatticeSubgroupsRep), + rec()); + lattice!.conjugacyClassesSubgroups:=classes; + lattice!.group :=G; + + # return the lattice + return lattice; + +end); + +############################################################################# +## +#M NormalSubgroups() . . . . . . . . . . list of normal subgroups +## +InstallMethod(NormalSubgroups,"elementary abelian extension",true, + [IsSolvableGroup],0, +function(G) +local n; + n:=InvariantSubgroupsPcGroup(G,rec( + actions:=List(GeneratorsOfGroup(G),i->InnerAutomorphism(G,i)), + normal:=true)); + + # sort the normal subgroups according to their size + Sort(n,function(a,b) return Size(a) < Size(b); end); + + return n; +end); + ############################################################################# ## #F SizeConsiderFunction() returns auxiliary function for diff --git a/lib/grppcnrm.gi b/lib/grppcnrm.gi index 2e33a9e74e..938bddc09b 100644 --- a/lib/grppcnrm.gi +++ b/lib/grppcnrm.gi @@ -1062,7 +1062,7 @@ end ); ## #M Normalizer( , ) ## -InstallMethod( Normalizer, +InstallMethod( NormalizerOp, "for groups with home pcgs", IsIdentical, [ IsGroup and HasHomePcgs, diff --git a/lib/grpperm.gd b/lib/grpperm.gd index 9ab3efc3cc..9ed7e3ab85 100644 --- a/lib/grpperm.gd +++ b/lib/grpperm.gd @@ -15,13 +15,13 @@ IsPermGroup := IsGroup and IsPermCollection; ############################################################################# ## -#M IsFinite( ) . . . . . . . . . . . . . . . for magmas of permutations +#M IsSubsetLocallyFiniteGroup( ) . . . . . . for magmas of permutations ## -#T To tell the truth, we should ask whether the magma is finitely generated. +#T Here we assume implicitly that all permutations are finitary! #T (What would be a permutation with unbounded largest moved point? #T Perhaps a permutation of possibly infinite order?) ## -InstallTrueMethod( IsFinite, IsPermCollection and IsMagma ); +InstallTrueMethod( IsSubsetLocallyFiniteGroup, IsPermCollection ); IsFactorGroup := ReturnFalse; # temporarily @@ -49,7 +49,6 @@ NumberCoset := NewOperationArgs( "NumberCoset" ); CosetNumber := NewOperationArgs( "CosetNumber" ); IndependentGeneratorsAbelianPPermGroup := NewOperationArgs( "IndependentGeneratorsAbelianPPermGroup" ); -IndependentGeneratorsAbelianPermGroup := NewOperationArgs( "IndependentGeneratorsAbelianPermGroup" ); OrbitPerms := NewOperationArgs( "OrbitPerms" ); OrbitsPerms := NewOperationArgs( "OrbitsPerms" ); SmallestMovedPointPerms := NewOperationArgs( "SmallestMovedPointPerms" ); @@ -57,7 +56,6 @@ LargestMovedPointPerms := NewOperationArgs( "LargestMovedPointPerms" ); MovedPointsPerms := NewOperationArgs( "MovedPointsPerms" ); NrMovedPointsPerms := NewOperationArgs( "NrMovedPointsPerms" ); SylowSubgroupPermGroup := NewOperationArgs( "SylowSubgroupPermGroup" ); -OmegaPN := NewOperationArgs( "OmegaPN" ); SignPermGroup := NewOperationArgs( "SignPermGroup" ); CycleStructuresGroup := NewOperationArgs( "CycleStructuresGroup" ); ############################################################################# diff --git a/lib/grpperm.gi b/lib/grpperm.gi index 0874548301..2fa9ba68e5 100644 --- a/lib/grpperm.gi +++ b/lib/grpperm.gi @@ -12,6 +12,28 @@ Revision.grpperm_gi := ############################################################################# ## +#M AsSubgroup( , ) . . . . . . . . . . . . with stab chain transfer +## +InstallMethod( AsSubgroup, + "perm groups", + IsIdentical, [ IsPermGroup, IsPermGroup ], 0, + function( G, U ) + local S; + if not IsSubset( G, U ) then + return fail; + fi; + S:= SubgroupNC( G, GeneratorsOfGroup( U ) ); + UseIsomorphismRelation( U, S ); + UseSubsetRelation( U, S ); + if HasStabChain( U ) then + SetStabChain( S, StabChainAttr( U ) ); + fi; + return S; +end ); + +############################################################################# +## + #F IndependentGeneratorsAbelianPPermGroup(

,

) . . . nice generators ## IndependentGeneratorsAbelianPPermGroup := function ( P, p ) @@ -97,9 +119,11 @@ end; ############################################################################# ## -#F IndependentGeneratorsAbelianPermGroup( ) . . . . . . nice generators +#M IndependentGeneratorsOfAbelianGroup( ) . . . . . . . nice generators ## -IndependentGeneratorsAbelianPermGroup := function ( G ) +InstallMethod( IndependentGeneratorsOfAbelianGroup, "for perm group", true, + [ IsPermGroup and IsAbelian ], 0, + function ( G ) local inds, # independent generators, result p, # prime factor of group size gens, # generators of

-Sylowsubgroup @@ -129,7 +153,7 @@ IndependentGeneratorsAbelianPermGroup := function ( G ) # return the independent generators return inds; -end; +end ); ############################################################################# ## @@ -555,7 +579,7 @@ end ); ## #M NormalClosure( , ) . . . . . . . . . . . . . . . . . in perm group ## -InstallMethod( NormalClosure, true, [ IsPermGroup, IsPermGroup ], 0, +InstallMethod( NormalClosureOp, true, [ IsPermGroup, IsPermGroup ], 0, function ( G, U ) local N, # normal closure of in , result chain, # stabilizer chain for the result @@ -952,17 +976,6 @@ end ); ############################################################################# ## -#M IsNormal( , ) . . . . . . . . . . . . . . . . . . for perm groups -## -InstallMethod( IsNormal, true, [ IsPermGroup, IsPermGroup ], 0, - function( G, N ) - return ForAll( GeneratorsOfGroup( N ), genN -> - ForAll( GeneratorsOfGroup( G ), genG -> - genN ^ genG in N ) ); -end ); - -############################################################################# -## #M IsSolvableGroup( ) . . . . . . . . . . . . . . . . solvability test ## InstallMethod( IsSolvableGroup, true, [ IsPermGroup ], 0, @@ -1180,26 +1193,6 @@ SylowSubgroupPermGroup := function( G, p ) end; -############################################################################# -## -#F OmegaPN( ,

, ) . . . . . . . . roots of unity in abelian group -## -OmegaPN := function( G, p, n ) - local gens, i, ord; - - if not IsAbelian( G ) then - TryNextMethod(); - fi; - gens := IndependentGeneratorsAbelianPermGroup( G ); - for i in [ 1 .. Length( gens ) ] do - ord := Order( gens[ i ] ); - if ord mod p = 0 then - gens[ i ] := gens[ i ] ^ ( ord / p ^ n ); - fi; - od; - return SubgroupNC( G, gens ); -end; - ############################################################################# ## #M Socle( ) . . . . . . . . . . . socle of primitive permutation group @@ -1297,6 +1290,30 @@ InstallMethod( FrattiniSubgroup, true, [ IsPermGroup ], 0, return SolvableNormalClosurePermGroup( G, k ); end ); +############################################################################# +## +#M OmegaOp( ,

, ) . . . . . . . . . . . . for abelian perm groups +## +InstallMethod( OmegaOp, "in abelian perm groups", true, + [ IsPermGroup, IsPosRat and IsInt, IsPosRat and IsInt ], 0, + function( G, p, n ) + local gens, q, gen, ord, o; + + if not IsAbelian( G ) then + TryNextMethod(); + fi; + q := p ^ n; + gens := [ ]; + for gen in IndependentGeneratorsOfAbelianGroup( G ) do + ord := Order( gen ); + o := GcdInt( ord, q ); + if o <> 1 then + Add( gens, gen ^ ( ord / o ) ); + fi; + od; + return SubgroupNC( G, gens ); +end ); + ############################################################################# ## @@ -1395,7 +1412,7 @@ end ); ## #M RightTransversal( , ) . . . . . . . . . . . . . . for perm groups ## -InstallMethod( RightTransversal, IsIdentical, +InstallMethod( RightTransversalOp, IsIdentical, [ IsPermGroup, IsPermGroup ], 0, function( G, U ) return RightTransversalPermGroupConstructor( IsRightTransversalPermGroup, diff --git a/lib/grpprmcs.gi b/lib/grpprmcs.gi index e1e10c7260..15a99d1743 100644 --- a/lib/grpprmcs.gi +++ b/lib/grpprmcs.gi @@ -107,7 +107,11 @@ DisplayCompositionSeries := function( S ) # display the composition series Print( GroupString( S[1], "G" ), "\n" ); for i in [2..Length(S)] do - f := Image( NaturalHomomorphismByNormalSubgroupInParent( S[ i ] ) ); + if Parent(S[i])=S[i-1] then + f:=Image( NaturalHomomorphismByNormalSubgroupInParent( S[ i ] ) ); + else + f:=Image(NaturalHomomorphismByNormalSubgroup(S[i-1],S[i])); + fi; Print( " | ",IsomorphismTypeFiniteSimpleGroup(f),"\n"); if i < Length(S) then Print( GroupString( S[i], "S" ), "\n" ); @@ -2458,9 +2462,10 @@ local G,H,nser,U,i,j,k,cs,n,o,mat,mats,row,p,one,m,c,v,ser,gens,r,dim,im, Add(nser,cs); n:=cs; else - o:=GroupOnSubgroupsOrbit(H,cs); - Info(InfoGroup,1,"orblen=",Length(o)); - n:=Intersection(o); + n:=Core(H,cs); + #o:=GroupOnSubgroupsOrbit(H,cs); + #Info(InfoGroup,1,"orblen=",Length(o)); + #n:=Intersection(o); #n:=o[1]; #for i in o{[2..Length(o)]} do #n:=IntersectionNormalClosurePermGroup(n,i); diff --git a/lib/grpreps.gd b/lib/grpreps.gd index c516842bdb..7339820765 100644 --- a/lib/grpreps.gd +++ b/lib/grpreps.gd @@ -3,7 +3,7 @@ #W grpreps.gd GAP library Bettina Eick ## Revision.grpreps_gd := - "@(#)$Id:"; + "@(#)$Id$"; ############################################################################# ## diff --git a/lib/grpreps.gi b/lib/grpreps.gi index 97ac575f00..e11f5503e8 100644 --- a/lib/grpreps.gi +++ b/lib/grpreps.gi @@ -3,7 +3,7 @@ #W grpreps.gi GAP library Bettina Eick ## Revision.grpreps_gi := - "@(#)$Id:"; + "@(#)$Id$"; ############################################################################# ## diff --git a/lib/help.g b/lib/help.g index 3c85e4ea66..59b3085177 100644 --- a/lib/help.g +++ b/lib/help.g @@ -476,35 +476,58 @@ HELP_PRINT_SECTION := function( book, chapter, section ) Add( lines, line ); fi; - # ignore lines starting or ending with '%' - elif line[1] = '%' or line[Length(line)] = '%' then - ; - # ignore answers to exercises elif MATCH_BEGIN(line,"\\answer") then repeat line := ReadLine(stream); until line = fail or line = "\n"; + # ignore displays for TeX or HTML + elif MATCH_BEGIN(line,"%display{tex}") + or MATCH_BEGIN(line,"%display{html}") + or MATCH_BEGIN(line,"%display{jpeg}") then + repeat + line := ReadLine(stream); + until line = fail + or MATCH_BEGIN(line,"%display{text}") + or MATCH_BEGIN(line,"%enddisplay"); + if MATCH_BEGIN(line,"%display{text}") then + verbatim := true; + Add( lines, "" ); + fi; + # example environment elif MATCH_BEGIN(line,"\\beginexample") - or MATCH_BEGIN(line,"\\begintt") then + or MATCH_BEGIN(line,"\\begintt") + or MATCH_BEGIN(line,"%display{text}") then verbatim := true; Add( lines, "" ); elif MATCH_BEGIN(line,"\\endexample") - or MATCH_BEGIN(line,"\\endtt") then + or MATCH_BEGIN(line,"\\endtt") + or MATCH_BEGIN(line,"%enddisplay") then verbatim := false; Add( lines, "" ); - + + # verbatim mode + elif verbatim and line[1] = '%' then + Add( lines, line{[2..Length(line)]} ); + + # ignore lines starting or ending with '%' + elif line[1] = '%' or line[Length(line)] = '%' then + ; + # use everything else else if not verbatim then - if MATCH_BEGIN(line,"\\exercise") then + if MATCH_BEGIN(line,"\\exercise") then line{[1..9]} := "EXERCISE:"; + elif MATCH_BEGIN(line,"\\danger") then + line{[1..7]} := "DANGER:"; fi; REPLACE_SUBSTRING( line, "~", " " ); REPLACE_SUBSTRING( line, "{\\GAP}", " GAP " ); - REPLACE_SUBSTRING( line, "\\", " " ); + REPLACE_SUBSTRING( line, "\\dots", ". . ." ); + REPLACE_SUBSTRING( line, "\\", " " ); fi; Add( lines, line ); fi; diff --git a/lib/init.g b/lib/init.g index acab95284c..bea2dae5d5 100644 --- a/lib/init.g +++ b/lib/init.g @@ -108,20 +108,50 @@ end; ## this name must include an extension. The file must also define ## 'Revision.'. ## +IS_READ_OR_COMPLETE := false; + READED_FILES := []; +RANK_FILTER_LIST := []; +RANK_FILTER_LIST_CURRENT := fail; +RANK_FILTER_COUNT := fail; + +RANK_FILTER_COMPLETION := Error; # defined in "filter.g" +RANK_FILTER_STORE := Error; # defined in "filter.g" +RANK_FILTER := Error; # defined in "filter.g" +RankFilter := Error; # defined in "filter.g" + + ReadAndCheckFunc := function( path ) return function( name ) local ext, libname; + # create a filename from and libname := SHALLOW_COPY_OBJ(path); APPEND_LIST_INTR( libname, "/" ); APPEND_LIST_INTR( libname, name ); - ADD_LIST( READED_FILES, libname ); - if not READ_GAP_ROOT(libname) then - Error("the library file '",name,"' must exist and be readable"); + + # we are completing, store the filename and filter ranks + if IS_READ_OR_COMPLETE then + ADD_LIST( READED_FILES, libname ); + RANK_FILTER_LIST_CURRENT := []; + RANK_FILTER_COUNT := 0; + ADD_LIST( RANK_FILTER_LIST, RANK_FILTER_LIST_CURRENT ); + if not READ_GAP_ROOT(libname) then + Error( "the library file '", name, "' must exist and ", + "be readable"); + fi; + Unbind(RANK_FILTER_LIST_CURRENT); + Unbind(RANK_FILTER_COUNT); + else + if not READ_GAP_ROOT(libname) then + Error( "the library file '", name, "' must exist and ", + "be readable"); + fi; fi; + + # check the revision entry ext := ReplacedString( name, ".", "_" ); if not IsBound(Revision.(ext)) then Print( "#W revision entry missing in \"", name, "\"\n" ); @@ -136,37 +166,32 @@ end; #F ReadOrComplete( ) . . . . . . . . . . . . read file or completion ## COMPLETABLE_FILES := []; - -RANK_FILTER_LIST := []; -RANK_FILTER_COUNT := 0; -RANK_FILTER_COMPLETION := Error; # defined in "filter.g" -RANK_FILTER_STORE := Error; # defined in "filter.g" -RANK_FILTER := Error; # defined in "filter.g" -RankFilter := Error; # defined in "filter.g" - +COMPLETED_FILES := []; ReadOrComplete := function( name ) local comp, check; READED_FILES := []; + check := CHECK_INSTALL_METHOD; # use completion files if CHECK_FOR_COMP_FILES then comp := ReplacedString( name, ".g", ".co" ); # do not check installation and use cached ranks - check := CHECK_INSTALL_METHOD; CHECK_INSTALL_METHOD := false; - RankFilter := RANK_FILTER_COMPLETION; - RANK_FILTER_COUNT := 1; + RankFilter := RANK_FILTER_COMPLETION; # check for the completion file if not READ_GAP_ROOT(comp) then - # read the original file + # set filter functions to store + IS_READ_OR_COMPLETE := true; CHECK_INSTALL_METHOD := check; - RankFilter := RANK_FILTER_STORE; - RANK_FILTER_LIST := []; + RankFilter := RANK_FILTER_STORE; + RANK_FILTER_LIST := []; + + # read the original file InfoRead1( "#I reading ", name, "\n" ); if not READ_GAP_ROOT(name) then Error( "cannot read or complete file ", name ); @@ -174,30 +199,50 @@ ReadOrComplete := function( name ) ADD_LIST( COMPLETABLE_FILES, [ name, READED_FILES, RANK_FILTER_LIST ] ); - # reset rank - RANK_FILTER_LIST := []; - RANK_FILTER_COUNT := 0; - RankFilter := RANK_FILTER; - # file completed else - CHECK_INSTALL_METHOD := check; - RankFilter := RANK_FILTER; + ADD_LIST( COMPLETED_FILES, name ); InfoRead1( "#I completed ", name, "\n" ); fi; + else - # hash the ranks - RankFilter := RANK_FILTER_STORE; - RANK_FILTER_LIST := []; - RANK_FILTER_COUNT := 0; + # set `RankFilter' to hash the ranks + IS_READ_OR_COMPLETE := true; + RankFilter := RANK_FILTER_STORE; + RANK_FILTER_LIST := []; + + # read the file if not READ_GAP_ROOT(name) then Error( "cannot read file ", name ); fi; ADD_LIST( COMPLETABLE_FILES, [ name, READED_FILES, RANK_FILTER_LIST ] ); - RANK_FILTER_LIST := []; fi; + + # reset rank and filter functions + IS_READ_OR_COMPLETE := false; + CHECK_INSTALL_METHOD := check; + RankFilter := RANK_FILTER; + Unbind(RANK_FILTER_LIST); + Unbind(READED_FILES); +end; + + +############################################################################# +## +#F READ_CHANGED_GAP_ROOT( ) . . . . . . completion file is out-dated +## +READ_CHANGED_GAP_ROOT := function( name ) + local rankFilter; + + rankFilter := RankFilter; + RankFilter := RANK_FILTER; + Print( "#W inconsistent completion for \"", name, "\"\n" ); + if not READ_GAP_ROOT(name) then + Error( "cannot read file ", name ); + fi; + RankFilter := rankFilter; end; diff --git a/lib/integer.gi b/lib/integer.gi index 43f4e6382c..7787212a6e 100644 --- a/lib/integer.gi +++ b/lib/integer.gi @@ -606,15 +606,17 @@ end; PowerModInt := function ( r, e, m ) local pow, f; - # reduce r initially - r := r mod m; - - # handle special case + # handle special cases if e = 0 then return 1; + elif m = 1 then + return 0; fi; - # if e is negative then invert n modulo m with Euclids algorithm + # reduce `r' initially + r := r mod m; + + # if `e' is negative then invert `r' modulo `m' with Euclids algorithm if e < 0 then r := 1/r mod m; e := -e; @@ -1089,7 +1091,9 @@ InstallMethod( QuotientMod, true, [ IsIntegers, IsInt, IsInt, IsInt ], 0, function ( Integers, r, s, m ) - if r mod GcdInt( s, m ) = 0 then + if m = 1 then + return 0; + elif r mod GcdInt( s, m ) = 0 then return r/s mod m; else return fail; diff --git a/lib/list.gd b/lib/list.gd index 50e359da2f..bdf3abb82d 100644 --- a/lib/list.gd +++ b/lib/list.gd @@ -15,7 +15,6 @@ Revision.list_gd := ############################################################################# ## - #C IsList( ) . . . . . . . . . . . . . . . test if an object is a list ## IsList := NewCategoryKernel( "IsList", @@ -93,9 +92,9 @@ IsBound\[\] := NewOperationKernel( ############################################################################# ## -#O ELM0_LIST( , ) +#O Elm0List( , ) ## -ELM0_LIST := NewOperationKernel( +Elm0List := NewOperationKernel( "ELM0_LIST", [ IsList, IS_INT ], ELM0_LIST ); @@ -373,6 +372,30 @@ Collected := [ IsList ] ); +############################################################################# +## +#O Unique() . . . . . . . . . . . .duplicate free list of list elements +#O DuplicateFreeList() +## +## `Unique' returns a new (mutable) list whose entries are the elements +## of with +## duplicates removed. `Unique' only uses the `=' comparison and will not +## sort the result. Therefore it can be used even if the objects in the +## list are not in the same family. `DuplicateFreeList' is an alias for +## `Unique' +## +DuplicateFreeList := NewOperation( "DuplicateFreeList", [ IsList ] ); +Unique := DuplicateFreeList; + +############################################################################# +## +#A AsDuplicateFreeList() . . . .duplicate free list of list elements +## +## returns the same result as `DuplicateFreeList' ("DuplicateFreeList"), +## but as an attribute returns an immutable list. +## +AsDuplicateFreeList := NewAttribute( "AsDuplicateFreeList", IsList ); + ############################################################################# ## #O Flat() . . . . . . . . list of elements of a nested list structure diff --git a/lib/list.gi b/lib/list.gi index c21375cb64..f806dd5fc0 100644 --- a/lib/list.gi +++ b/lib/list.gi @@ -623,9 +623,9 @@ InstallOtherMethod( Product, ############################################################################# ## -#M ELM0_LIST +#M Elm0List ## -InstallMethod( ELM0_LIST, +InstallMethod( Elm0List, true, [ IsList, IsInt ], 0, function ( list, pos ) if IsBound( list[pos] ) then @@ -962,6 +962,28 @@ InstallMethod( Collected, end ); +############################################################################# +## +#M DuplicateFreeList() . . . . . duplicate free list of list elements +## +InstallMethod( DuplicateFreeList, true, [ IsList ], 0, +function ( list ) +local l,i; + l:=[]; + for i in list do + if not i in l then + Add(l,i); + fi; + od; + return l; +end ); + +############################################################################# +## +#M AsDuplicateFreeList() . . . . duplicate free list of list elements +## +InstallMethod( AsDuplicateFreeList, true, [ IsList ], 0, DuplicateFreeList); + ############################################################################# ## #M Flat() . . . . . . . . list of elements of a nested list structure diff --git a/lib/magma.gd b/lib/magma.gd index e429c27e9a..a79acd6225 100644 --- a/lib/magma.gd +++ b/lib/magma.gd @@ -321,18 +321,10 @@ IsCentral := ## of the magma . This is the domain of those elements $m \in $ that ## commute with . ## -Centralizer := - NewOperation( "Centralizer", - [ IsMagma, IsObject ] ); - - -############################################################################# -## -#A CentralizerInParent() . . . . . centralizer of a magma in its parent -## -CentralizerInParent := - NewAttribute( "CentralizerInParent", - IsMagma ); +tmp:= InParentFOA( "Centralizer", IsMagma, IsObject, NewAttribute ); +Centralizer := tmp[1]; +CentralizerOp := tmp[2]; +CentralizerInParent := tmp[3]; SetCentralizerInParent := Setter( CentralizerInParent ); HasCentralizerInParent := Tester( CentralizerInParent ); @@ -410,6 +402,22 @@ IsCentralFromGenerators := function( GeneratorsStruct1, GeneratorsStruct2 ) end; +############################################################################# +## +#A AsMagma( ) . . . . . . . . . . . . . . view a collection as a magma +## +AsMagma := NewAttribute( "AsMagma", IsCollection ); +SetAsMagma := Setter( AsMagma ); +HasAsMagma := Tester( AsMagma ); + + +############################################################################# +## +#O AsSubmagma( , ) . . . view a magma as a submagma of another magma +## +AsSubmagma := NewOperation( "AsSubmagma", [ IsMagma, IsMagma ] ); + + ############################################################################# ## #E magma.gd . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here diff --git a/lib/magma.gi b/lib/magma.gi index 65ba0f2d7e..e175c7ce8c 100644 --- a/lib/magma.gi +++ b/lib/magma.gi @@ -165,23 +165,12 @@ InstallMethod( IsCommutative, IsCommutativeFromGenerators( GeneratorsOfMagmaWithInverses ) ); -############################################################################# -## -#M CentralizerInParent( ) -## -InstallMethod( CentralizerInParent, - "method for a magma with parent", - true, - [ IsMagma and HasParent ], 0, - M -> Centralizer( Parent( M ), M ) ); - - ############################################################################# ## #M Centralizer( , ) . . . . . centralizer of an element in a magma #M Centralizer( , ) . . . . . . . . centralizer of a magma in a magma ## -InstallMethod( Centralizer, +InstallMethod( CentralizerOp, "method for a magma, and a mult. element", IsCollsElms, [ IsMagma, IsMultiplicativeElement ], 0, @@ -189,7 +178,7 @@ InstallMethod( Centralizer, return Filtered( AsList( M ), x -> x * obj = obj * x ); end ); -InstallMethod( Centralizer, +InstallMethod( CentralizerOp, "method for a commutative magma, and a mult. element", IsCollsElms, [ IsMagma and IsCommutative, IsMultiplicativeElement ], SUM_FLAGS, @@ -201,7 +190,7 @@ InstallMethod( Centralizer, fi; end ); -InstallMethod( Centralizer, +InstallMethod( CentralizerOp, "method for two magmas", IsIdentical, [ IsMagma, IsMagma ], 0, @@ -209,7 +198,7 @@ InstallMethod( Centralizer, return Filtered( M, x -> ForAll( N, y -> x * y = y * x ) ); end ); -InstallMethod( Centralizer, +InstallMethod( CentralizerOp, "method for two magmas, the first being commutative", IsIdentical, [ IsMagma and IsCommutative, IsMagma ], SUM_FLAGS, @@ -812,6 +801,106 @@ InstallMethod( EnumeratorSorted, EnumeratorOfTrivialMagmaWithOne ); +############################################################################# +## +#F ClosureMagmaDefault( , ) . . . . . closure of magma with element +## +ClosureMagmaDefault := function( M, elm ) + + local C, # closure '\< , \>', result + gens, # generators of + gen, # generator of or + Celements, # intermediate list of elements + len; # current number of elements + + gens:= GeneratorsOfMagma( M ); + + # try to avoid adding an element to a magma that already contains it + if elm in gens + or ( HasAsListSorted( M ) and elm in AsListSorted( M ) ) + then + return M; + fi; + + # make the closure magma + gens:= Concatenation( gens, [ elm ] ); + C:= MagmaByGenerators( gens ); + UseSubsetRelation( C, M ); + + # if the elements of are known then extend this list + # (multiply each element from the left and right with the new + # generator, and then multiply with all elements until the + # list becomes stable) + if HasAsListSorted( M ) then + + Celements := ShallowCopy( AsListSorted( M ) ); + AddSet( Celements, elm ); + UniteSet( Celements, Celements * elm ); + UniteSet( Celements, elm * Celements ); + repeat + len:= Length( Celements ); + for gen in Celements do + UniteSet( Celements, Celements * gen ); + UniteSet( Celements, gen * Celements ); + od; + until len = Length( Celements ); + + SetAsListSorted( C, AsListSorted( Celements ) ); + SetIsFinite( C, true ); + SetSize( C, Length( Celements ) ); + + fi; + + # return the closure + return C; +end; + + +############################################################################# +## +#M Enumerator( ) . . . . . . . . . . . . set of the elements of a magma +#M EnumeratorSorted( ) . . . . . . . . . set of the elements of a magma +## +EnumeratorOfMagma := function( M ) + + local gens, # magma generators of + H, # submagma of the first generators of + gen; # generator of + + # handle the case of an empty magma + gens:= GeneratorsOfMagma( M ); + if IsEmpty( gens ) then + return []; + fi; + + # start with the empty magma and its element list + H:= Submagma( M, [] ); + SetAsListSorted( H, Immutable( [ ] ) ); + + # Add the generators one after the other. + # We use a function that maintains the elements list for the closure. + for gen in gens do + H:= ClosureMagmaDefault( H, gen ); + od; + + # return the list of elements + Assert( 2, HasAsListSorted( H ) ); + return AsListSorted( H ); +end; + +InstallMethod( Enumerator, + "generic method for a magma", + true, + [ IsMagma and IsAttributeStoringRep ], 0, + EnumeratorOfMagma ); + +InstallMethod( EnumeratorSorted, + "generic method for a magma", + true, + [ IsMagma and IsAttributeStoringRep ], 0, + EnumeratorOfMagma ); + + ############################################################################# ## #M IsCentral( , ) . . . . . . . . . . . . . . . . . . for two magmas @@ -885,7 +974,60 @@ InstallMethod( IsSubset, return IsSubset( M, GeneratorsOfMagmaWithInverses( N ) ); end ); -InstallInParentMethod( CentralizerInParent, IsMagma, Centralizer ); + +############################################################################# +## +#M AsMagma( ) . . . . . . . . . . . . . . . domain , viewed as magma +## +InstallMethod( AsMagma, true, [ IsMagma ], 100, IdFunc ); + +InstallMethod( AsMagma, + "generic method for collections", + true, + [ IsCollection ], 0, + function( D ) + local M, L; + + D := AsListSorted( D ); + L := ShallowCopy( D ); + M := Submagma( MagmaByGenerators( D ), [] ); + SubtractSet( L, AsListSorted( M ) ); + while not IsEmpty(L) do + M := ClosureMagmaDefault( M, L[1] ); + SubtractSet( L, AsListSorted( M ) ); + od; + if Length( AsListSorted( M ) ) <> Length( D ) then + return fail; + fi; + M := MagmaByGenerators( GeneratorsOfMagma( M ) ); + SetAsListSorted( M, D ); + SetIsFinite( M, true ); + SetSize( M, Length( D ) ); + + # return the magma + return M; + end ); + + +############################################################################# +## +#M AsSubmagma( , ) +## +InstallMethod( AsSubmagma, + "generic method for magmas", + IsIdentical, + [ IsMagma, IsMagma ], 0, + function( G, U ) + local S; + if not IsSubset( G, U ) then + return fail; + fi; + S:= SubmagmaNC( G, GeneratorsOfMagma( U ) ); + UseIsomorphismRelation( U, S ); + UseSubsetRelation( U, S ); + return S; + end ); + ############################################################################# ## diff --git a/lib/mapphomo.gi b/lib/mapphomo.gi index dcd5c24a11..86ebe6706a 100644 --- a/lib/mapphomo.gi +++ b/lib/mapphomo.gi @@ -269,17 +269,23 @@ InstallMethod( ImagesSet, [ IsSPGeneralMapping and RespectsMultiplication and RespectsInverses, IsGroup ], 0, function( map, elms ) - local genimages; + local genimages, img; genimages:= List( GeneratorsOfMagmaWithInverses( elms ), gen -> ImagesRepresentative( map, gen ) ); if fail in genimages then TryNextMethod(); fi; - return SubgroupNC( Range( map ), Concatenation( + img := SubgroupNC( Range( map ), Concatenation( GeneratorsOfMagmaWithInverses( CoKernelOfMultiplicativeGeneralMapping( map ) ), genimages ) ); + if HasSize( CoKernelOfMultiplicativeGeneralMapping( map ) ) + and HasSize( elms ) then + SetSize( img, Size( CoKernelOfMultiplicativeGeneralMapping( map ) ) + * Size( elms ) ); + fi; + return img; end ); InstallMethod( ImagesSet, @@ -343,17 +349,23 @@ InstallMethod( PreImagesSet, [ IsSPGeneralMapping and RespectsMultiplication and RespectsInverses, IsGroup ], 0, function( map, elms ) - local genpreimages; + local genpreimages, pre; genpreimages:= List( GeneratorsOfMagmaWithInverses( elms ), gen -> PreImagesRepresentative( map, gen ) ); if fail in genpreimages then TryNextMethod(); fi; - return SubgroupNC( Source( map ), Concatenation( + pre := SubgroupNC( Source( map ), Concatenation( GeneratorsOfMagmaWithInverses( KernelOfMultiplicativeGeneralMapping( map ) ), genpreimages ) ); + if HasSize( KernelOfMultiplicativeGeneralMapping( map ) ) + and HasSize( elms ) then + SetSize( pre, Size( KernelOfMultiplicativeGeneralMapping( map ) ) + * Size( elms ) ); + fi; + return pre; end ); InstallMethod( PreImagesSet, diff --git a/lib/mapping.gd b/lib/mapping.gd index 6ce8406ca2..b297d57a27 100644 --- a/lib/mapping.gd +++ b/lib/mapping.gd @@ -75,7 +75,7 @@ ## resp. 'ImagesRepresentative' and the appropriate cokernel. ## Conversely, if 'AsList' for the underlying relation is known then ## 'ImagesElm' resp. 'ImagesRepresentative' may delegate to it, the general -## mapping gets the property 'IsConstantTimeAccesseneralMapping' for this; +## mapping gets the property 'IsConstantTimeAccessGeneralMapping' for this; ## note that this is not allowed if only an enumerator of the underlying ## relation is known.) ## @@ -453,6 +453,8 @@ ImagesElm := NewOperation( "ImagesElm", [ IsGeneralMapping, IsObject ] ); ## images of under or 'fail', the latter if and only if ## has no images under . ## +## Anything may happen if is not an element of the source of . +## ImagesRepresentative := NewOperation( "ImagesRepresentative", [ IsGeneralMapping, IsObject ] ); @@ -582,6 +584,8 @@ PreImageElm := NewOperation( "PreImageElm", ## preimages of under or 'fail', the latter if and only if ## has no preimages under . ## +## Anything may happen if is not an element of the range of . +## PreImagesRepresentative := NewOperation( "PreImagesRepresentative", [ IsGeneralMapping, IsObject ] ); diff --git a/lib/mapping.gi b/lib/mapping.gi index 6d36dbfb0d..7681fd4e43 100644 --- a/lib/mapping.gi +++ b/lib/mapping.gi @@ -31,7 +31,8 @@ InstallMethod( FamiliesOfGeneralMappingsAndRanges, "method for a family (return empty list)", true, [ IsFamily ], 0, - Fam -> [] ); +# Fam -> [] ); + Fam -> WeakPointerObj( [] ) ); ############################################################################# @@ -39,13 +40,24 @@ InstallMethod( FamiliesOfGeneralMappingsAndRanges, #F GeneralMappingsFamily( , ) ## GeneralMappingsFamily := function( FS, FR ) - local info, i, Fam; + + local info, i, len, entry, Fam; # Check whether this family was already constructed. info:= FamiliesOfGeneralMappingsAndRanges( FS ); - for i in [ 2, 4 .. Length( info ) ] do - if IsIdentical( info[ i-1 ], FR ) then - return info[i]; + len:= LengthWPObj( info ); + if len mod 2 = 1 then + len:= len - 1; + fi; + for i in [ 2, 4 .. len ] do + if IsIdentical( ElmWPObj( info, i-1 ), FR ) then + entry:= ElmWPObj( info, i ); + if entry <> fail then + return entry; + else + UnbindElmWPObj( info, i-1 ); + break; + fi; fi; od; @@ -55,7 +67,8 @@ GeneralMappingsFamily := function( FS, FR ) SetFamilySource( Fam, FS ); # Store the family. - Append( info, [ FR, Fam ] ); + SetElmWPObj( info, len+1, FR ); + SetElmWPObj( info, len+2, Fam ); # Return the family. return Fam; diff --git a/lib/matrix.gi b/lib/matrix.gi index 9ee1fb4839..60aefe7e83 100644 --- a/lib/matrix.gi +++ b/lib/matrix.gi @@ -284,13 +284,19 @@ InstallMethod( Display, function( m ) local deg, chr, zero, w, t, x, v, f, z, y; - # get the degree and characteristic - deg := Lcm( List( m, DegreeFFE ) ); - chr := Characteristic(m[1][1]); - zero := 0*Z(chr); + if IsZmodnZObj(m[1][1]) then + Print("ZmodnZ matrix:\n"); + t:=List(m,i->List(i,i->i![1])); + Display(t); + Print("modulo ",DataType(TypeObj(m[1][1])),"\n"); + else + # get the degree and characteristic + deg := Lcm( List( m, DegreeFFE ) ); + chr := Characteristic(m[1][1]); + zero := Zero(m[1][1]); - # if it is a finite prime field, use integers for display - if deg = 1 then + # if it is a finite prime field, use integers for display + if deg = 1 then # compute maximal width w := LogInt( chr, 10 ) + 2; @@ -311,9 +317,9 @@ function( m ) Print( "\n" ); od; - # if it a finite, use mixed integers/z notation - else - Print( "z = Z(", chr^deg, ")\n" ); + # if it a finite, use mixed integers/z notation + else + Print( "z = Z(", chr^deg, ")\n" ); # compute maximal width w := LogInt( chr^deg-1, 10 ) + 4; @@ -345,8 +351,8 @@ function( m ) Print( "\n" ); od; + fi; fi; - end ); @@ -696,6 +702,25 @@ function( mat ) end); +InstallOtherMethod( SumIntersectionMat, + true, [ IsEmpty, IsMatrix ], 0, +function(a,b) + return [b,a]; +end); + +InstallOtherMethod( SumIntersectionMat, + true, [ IsMatrix, IsEmpty ], 0, +function(a,b) + return [a,b]; +end); + +InstallOtherMethod( SumIntersectionMat, + IsIdentical, [ IsEmpty, IsEmpty ], 0, +function(a,b) + return [a,b]; +end); + + ############################################################################# ## #M DeterminantMat( ) @@ -1356,11 +1381,11 @@ function ( mat1, mat2 ) end ); -########################################################################## +############################################################################# ## #M SolutionMat( , ) . . . . . . . . . . one solution of equation ## -## One solution of * = or 'fail'. +## One solution of * = or `fail'. ## InstallMethod( SolutionMat, "generic method for matrix and vector", @@ -1414,7 +1439,7 @@ function ( mat, vec ) # Find a solution. for i in [ r + 1 .. l ] do - if vec[ i ] <> zero then return false; fi; + if vec[ i ] <> zero then return fail; fi; od; h := []; s := Length( mat[ 1 ] ); @@ -2293,7 +2318,7 @@ NullspaceModQ := function( E, q ) for e in elem do r := o * ( - (e * E) / (p ^ ( i - 1 ) ) ); sol := SolutionMat( B, r ); - if sol <> false then + if sol <> fail then for j in [ 1..Length( elem ) ] do new := e + ( p^(i-1) * List( o * elem[j] + sol, IntFFE ) ); #T ! diff --git a/lib/modfree.gi b/lib/modfree.gi index ab72dc4a90..84b6f8ab12 100644 --- a/lib/modfree.gi +++ b/lib/modfree.gi @@ -17,18 +17,22 @@ Revision.modfree_gi := #M \=( , ) . . . . . . . . . test if two free left modules are equal ## InstallMethod( \=, - "method for two free left modules", - IsIdentical, [ IsFreeLeftModule, IsFreeLeftModule ], 0, + "method for two free left modules (at least one fin. dim.)", + IsIdentical, + [ IsFreeLeftModule, IsFreeLeftModule ], 0, function( V, W ) - + local inter; if IsFiniteDimensional( V ) then - if LeftActingDomain( V ) = LeftActingDomain( W ) then + if IsFiniteDimensional( W ) then + if LeftActingDomain( V ) <> LeftActingDomain( W ) then + inter:= Intersection2( LeftActingDomain(V), LeftActingDomain(W) ); + V:= AsVectorSpace( inter, V ); + W:= AsVectorSpace( inter, W ); + fi; return Dimension( V ) = Dimension( W ) and ForAll( GeneratorsOfLeftModule( V ), x -> x in W ); else - return Dimension( V ) * DegreeOverPrimeField( LeftActingDomain(V) ) - = Dimension( W ) * DegreeOverPrimeField( LeftActingDomain(W) ) - and ForAll( GeneratorsOfLeftModule( V ), x -> x in W ); + return false; fi; elif IsFiniteDimensional( W ) then return false; diff --git a/lib/module.gd b/lib/module.gd index e3ac0f6f66..d9ad0ac764 100644 --- a/lib/module.gd +++ b/lib/module.gd @@ -200,7 +200,7 @@ HasTrivialSubmodule := HasTrivialSubadditiveMagmaWithZero; ## #O AsLeftModule( , ) ## -AsLeftModule := NewOperation( "AsModule", [ IsRing, IsDomain ] ); +AsLeftModule := NewOperation( "AsModule", [ IsRing, IsCollection ] ); ############################################################################# diff --git a/lib/module.gi b/lib/module.gi index 6af3363554..7fc727cbed 100644 --- a/lib/module.gi +++ b/lib/module.gi @@ -59,15 +59,47 @@ InstallOtherMethod( LeftModuleByGenerators, end ); +############################################################################# +## +#M AsLeftModule( , ) . . . . . domain , viewed as left -module +## +InstallMethod( AsLeftModule, + "generic method for a ring and a collection", + true, + [ IsRing, IsCollection ], 0, + function ( R, D ) + local S, L; + + D := AsListSorted( D ); + L := ShallowCopy( D ); + S := TrivialSubmodule( LeftModuleByGenerators( R, D ) ); + SubtractSet( L, AsListSorted( S ) ); + while not IsEmpty(L) do + S := ClosureLeftModule( S, L[1] ); + SubtractSet( L, AsListSorted( S ) ); + od; + if Length( AsListSorted( S ) ) <> Length( D ) then + return fail; + fi; + S := LeftModuleByGenerators( R, GeneratorsOfLeftModule( S ) ); + SetAsListSorted( S, D ); + SetIsFinite( S, true ); + SetSize( S, Length( D ) ); + + # return the left module + return S; + end ); + + ############################################################################# ## #M AsLeftModule( , ) . . . . . . . . . . . for ring and left module ## -## View the collection as a left module over the ring . +## View the left module as a left module over the ring . ## -#T InstallMethod( AsLeftModule, true, [ IsRing, IsCollection ], 0, - -InstallMethod( AsLeftModule, true, [ IsRing, IsLeftModule ], 0, +InstallMethod( AsLeftModule, + true, + [ IsRing, IsLeftModule ], 0, function( R, M ) local W, # the space, result @@ -128,8 +160,8 @@ InstallMethod( AsLeftModule, true, [ IsRing, IsLeftModule ], 0, # View 'M' first as module over the intersection of rings, # and then over the desired ring. return AsLeftModule( R, - AsLeftModule( Intersection( R, - LeftActingDomain( M ) ), M ) ); + AsLeftModule( Intersection2( R, LeftActingDomain( M ) ), + M ) ); fi; diff --git a/lib/monoid.gd b/lib/monoid.gd index 188235cdce..af9d2091ce 100644 --- a/lib/monoid.gd +++ b/lib/monoid.gd @@ -36,11 +36,18 @@ HasGeneratorsOfMonoid := HasGeneratorsOfMagmaWithOne; ## #A AsMonoid( ) . . . . . . . . . . . . . . . . . . . view as monoid ## -AsMonoid := NewAttribute( "AsMonoid", IsMonoid ); +AsMonoid := NewAttribute( "AsMonoid", IsCollection ); SetAsMonoid := Setter( AsMonoid ); HasAsMonoid := Tester( AsMonoid ); +############################################################################# +## +#O AsSubmonoid( , ) . view a monoid as a submonoid of another monoid +## +AsSubmonoid := NewOperation( "AsSubmonoid", [ IsMonoid, IsMonoid ] ); + + ############################################################################# ## #A TrivialSubmonoid( ) . . . . . . . . . trivial submonoid of monoid diff --git a/lib/monoid.gi b/lib/monoid.gi index 97763195b5..47f8013b8c 100644 --- a/lib/monoid.gi +++ b/lib/monoid.gi @@ -83,9 +83,56 @@ InstallOtherMethod( MonoidByGenerators, ############################################################################# ## -#M AsMonoid( ) . . . . . . . . . . . . . . . . view a monoid as a monoid +#M AsMonoid( ) . . . . . . . . . . . . . . domain , viewed as monoid ## -InstallMethod( AsMonoid, true, [ IsMonoid ], 0, IdFunc ); +InstallMethod( AsMonoid, true, [ IsMonoid ], 100, IdFunc ); + +InstallMethod( AsMonoid, + "generic method for a collection", + true, + [ IsCollection ], 0, + function ( D ) + local M, L; + + D := AsListSorted( D ); + L := ShallowCopy( D ); + M := TrivialSubmagmaWithOne( MonoidByGenerators( D ) ); + SubtractSet( L, AsListSorted( M ) ); + while not IsEmpty(L) do + M := ClosureMagmaDefault( M, L[1] ); + SubtractSet( L, AsListSorted( M ) ); + od; + if Length( AsListSorted( M ) ) <> Length( D ) then + return fail; + fi; + M := MonoidByGenerators( GeneratorsOfMonoid( M ), One( D[1] ) ); + SetAsListSorted( M, D ); + SetIsFinite( M, true ); + SetSize( M, Length( D ) ); + + # return the monoid + return M; + end ); + + +############################################################################# +## +#M AsSubmonoid( , ) +## +InstallMethod( AsSubmonoid, + "generic method for monoids", + IsIdentical, + [ IsMonoid, IsMonoid ], 0, + function( M, U ) + local S; + if not IsSubset( M, U ) then + return fail; + fi; + S:= SubmonoidNC( M, GeneratorsOfMonoid( U ) ); + UseIsomorphismRelation( U, S ); + UseSubsetRelation( U, S ); + return S; + end ); ############################################################################# @@ -117,7 +164,7 @@ Monoid := function( arg ) # list of generators elif Length( arg ) = 1 and IsList( arg[1] ) and 0 < Length( arg[1] ) then - return MonoidByGenerators( arg ); + return MonoidByGenerators( arg[1] ); # list of generators plus identity elif Length( arg ) = 2 and IsList( arg[1] ) then diff --git a/lib/morpheus.gd b/lib/morpheus.gd index cb0956e156..3b52dc305e 100644 --- a/lib/morpheus.gd +++ b/lib/morpheus.gd @@ -97,7 +97,7 @@ IsomorphismGroups := NewOperationArgs("IsomorphismGroups"); ## #F GQuotients ## -GQuotients := NewOperationArgs("GQuotients"); +GQuotients := NewOperation("GQuotients",[IsGroup,IsGroup]); ############################################################################# ## diff --git a/lib/morpheus.gi b/lib/morpheus.gi index 059fd2f951..052667c4d4 100644 --- a/lib/morpheus.gi +++ b/lib/morpheus.gi @@ -11,23 +11,6 @@ Revision.morpheus_gi:= "@(#)$Id$"; -DecomposedRationalClass := function( cl ) - local G, C, rep, gal, T, cls, e, c; - - G := ActingDomain( cl ); - C := StabilizerOfExternalSet( cl ); - rep := Representative( cl ); - gal := GaloisGroup( cl ); - T := RightTransversal( Parent( gal ), gal ); - cls := [ ]; - for e in T do - c := ConjugacyClass( G, rep ^ ( 1 ^ e ) ); - SetStabilizerOfExternalSet( c, C ); - Add( cls, c ); - od; - return cls; -end; - ############################################################################# ## #V MORPHEUSELMS . . . . limit up to which size to store element lists @@ -498,10 +481,10 @@ local i,j,k,l,m,o,nl,nj,max,r,e,au,p,gens,offs; # get standard generating system if not IsPermGroup(G) then p:=IsomorphismPermGroup(G); - gens:=IndependentGeneratorsAbelianPermGroup(Image(p)); + gens:=IndependentGeneratorsOfAbelianGroup(Image(p)); gens:=List(gens,i->PreImagesRepresentative(p,i)); else - gens:=IndependentGeneratorsAbelianPermGroup(G); + gens:=IndependentGeneratorsOfAbelianGroup(G); fi; au:=[]; @@ -542,8 +525,8 @@ local i,j,k,l,m,o,nl,nj,max,r,e,au,p,gens,offs; # multiplications - for k in List(GeneratorsOfGroup(PrimeResidueClassGroup(i^j[1])), - i->1^i) do + for k in List( Flat( GeneratorsPrimeResidues(i^j[1])!.generators ), + Int ) do Add(au,GroupHomomorphismByImages(G,G,Concatenation(nl,nj,j[2]), #1->1^k @@ -602,19 +585,19 @@ local o,p,gens,hens; # get standard generating system if not IsPermGroup(G) then p:=IsomorphismPermGroup(G); - gens:=IndependentGeneratorsAbelianPermGroup(Image(p)); + gens:=IndependentGeneratorsOfAbelianGroup(Image(p)); gens:=List(gens,i->PreImagesRepresentative(p,i)); else - gens:=IndependentGeneratorsAbelianPermGroup(G); + gens:=IndependentGeneratorsOfAbelianGroup(G); fi; # get standard generating system if not IsPermGroup(H) then p:=IsomorphismPermGroup(H); - hens:=IndependentGeneratorsAbelianPermGroup(Image(p)); + hens:=IndependentGeneratorsOfAbelianGroup(Image(p)); hens:=List(hens,i->PreImagesRepresentative(p,i)); else - hens:=IndependentGeneratorsAbelianPermGroup(H); + hens:=IndependentGeneratorsOfAbelianGroup(H); fi; o:=List(gens,i->Order(i)); @@ -641,7 +624,11 @@ InstallMethod(AutomorphismGroup,"Group",true,[IsGroup],0, function(G) local a; if IsAbelian(G) then - return AutomorphismGroupAbelianGroup(G); + a:=AutomorphismGroupAbelianGroup(G); + if HasIsFinite(G) and IsFinite(G) then + SetIsFinite(a,true); + fi; + return a; fi; a:=Morphium(G,G,true); if IsList(a.aut) then @@ -649,6 +636,9 @@ local a; a.inner:=SubgroupNC(a.aut,a.inner); fi; SetInnerAutomorphismsAutomorphismGroup(a.aut,a.inner); + if HasIsFinite(G) and IsFinite(G) then + SetIsFinite(a.aut,true); + fi; return a.aut; end); @@ -699,7 +689,9 @@ end; ## #F GQuotients(,) . . . . . epimorphisms from F onto G up to conjugacy ## -GQuotients := function (F,G) +InstallMethod(GQuotients,"for groups which can compute element orders",true, + [IsGroup,IsGroup and IsFinite],1, +function (F,G) local Fgens, # generators of F cl, # classes of G u, # trial generating set's group @@ -714,6 +706,12 @@ local Fgens, # generators of F fak, # multiplication factor cnt; # countdown for finish + # if we have a pontentially infinite fp group we cannot be clever + if IsSubgroupFpGroup(F) and not HasParent(F) and + (not HasSize(F) or Size(F)=infinity) then + TryNextMethod(); + fi; + Fgens:=GeneratorsOfGroup(F); if IsAbelian(G) and not IsAbelian(F) then Info(InfoMorph,1,"abelian quotients vi F/F'"); @@ -813,7 +811,108 @@ local Fgens, # generators of F Info(InfoMorph,1,Length(h)," found -> ",Length(cl)," homs"); return cl; -end; +end); + +InstallMethod(GQuotients,"without computing element orders",true, + [IsSubgroupFpGroup,IsGroup and IsFinite],1, +function (F,G) +local Fgens, # generators of F + Fam, # free elements family + rels, # power relations + cl, # classes of G + u, # trial generating set's group + pimgs, # possible images + val, # its value + best, # best generating set + bestval, # its value + sz, # |class| + i, # loop + h, # epis + len, # nr. gens tried + cnt; # countdown for finish + + Fgens:=GeneratorsOfGroup(F); + + if Length(Fgens)=0 then + if Size(G)>1 then + return []; + else + return [GroupHomomorphismByImages(F,G,[],[])]; + fi; + fi; + + if Size(G)=1 then + return [GroupHomomorphismByImages(F,G,Fgens, + List(Fgens,i->One(G)))]; + elif Length(Fgens)=1 then + Info(InfoMorph,1,"Cyclic group: only one quotient possible"); + # a cyclic group has at most one quotient + if not IsCyclic(G) then + return []; + else + # get the cyclic gens + h:=First(AsList(G),i->Order(i)=Size(G)); + # just map them + return [GroupHomomorphismByImages(F,G,Fgens,[h])]; + fi; + fi; + + cl:=ConjugacyClasses(G); + + # search relators in only one generator + rels:=ListWithIdenticalEntries(Length(Fgens),false); + if IsSubgroupFpGroup(F) and IsWholeFamily(F) then + Fam:=ElementsFamily(FamilyObj(F)); + for i in Fam!.relators do + u:=List([1..LengthWord(i)],j->Subword(i,j,j)); + if Length(Set(u))=1 then + # found relator in only one generator + val:=Position(GeneratorsOfGroup(Fam!.freeGroup),u[1]); + if val=fail then + val:=Position(GeneratorsOfGroup(Fam!.freeGroup),u[1]^-1); + if val=fail then Error();fi; + fi; + u:=Length(u); + if rels[val]=false then + rels[val]:=u; + else + rels[val]:=Gcd(rels[val],u); + fi; + fi; + od; + fi; + + # find potential images + pimgs:=[]; + + for i in [1..Length(Fgens)] do + if rels[i]<>false then + Info(InfoMorph,2,"generator order must divide ",rels[i]); + u:=Filtered(cl,j->IsInt(rels[i]/Order(Representative(j)))); + else + Info(InfoMorph,2,"no restriction on generator order"); + u:=ShallowCopy(cl); + fi; + Add(pimgs,u); + od; + + val:=Product(pimgs,i->Sum(i,Size)); + Info(InfoMorph,2,"Value: ",val); + + h:=MorClassLoop(G,pimgs,rec(gens:=Fgens,to:=G,from:=F),13); + Info(InfoMorph,2,"Test kernels"); + cl:=[]; + u:=[]; + for i in h do + if not KernelOfMultiplicativeGeneralMapping(i) in u then + Add(u,KernelOfMultiplicativeGeneralMapping(i)); + Add(cl,i); + fi; + od; + + Info(InfoMorph,1,Length(h)," found -> ",Length(cl)," homs"); + return cl; +end); ############################################################################# ## diff --git a/lib/object.gi b/lib/object.gi index 998ed467e7..f3dbe15029 100644 --- a/lib/object.gi +++ b/lib/object.gi @@ -268,6 +268,13 @@ function( obj ) end ); +############################################################################# +## +#O Display( ) . . . . . . . . . . . . . . . . . . . display an object +## +InstallMethod(Display,"generic: use Print",true, [ IsObject ],0, Print); + + ############################################################################# ## diff --git a/lib/oper.g b/lib/oper.g index 899401fbe9..ccebe98721 100644 --- a/lib/oper.g +++ b/lib/oper.g @@ -279,6 +279,11 @@ INSTALL_IMMEDIATE_METHOD := function( oper, name, filter, rank, method ) ignore, j; + # Check whether really is an operation. + if not IS_OPERATION(oper) then + Error( " is not an operation" ); + fi; + # Check whether this in fact installs an implication. if FLAGS_FILTER(oper) <> false and (method = true or method = RETURN_TRUE) @@ -600,7 +605,12 @@ end; ## INSTALL_METHOD := function( opr, info, rel, filters, rank, method, check ) local tmp, tmp2, req, i, imp, flags; - + + # check whether really is an operation + if not IS_OPERATION(opr) then + Error( " is not an operation" ); + fi; + # check whether this really installs an implication if FLAGS_FILTER(opr) <> false and (rel = true or rel = RETURN_TRUE) diff --git a/lib/oprt.gd b/lib/oprt.gd index c0195e3fab..7d1b4e35bf 100644 --- a/lib/oprt.gd +++ b/lib/oprt.gd @@ -9,22 +9,46 @@ Revision.oprt_gd := InfoOperation := NewInfoClass( "InfoOperation" ); +############################################################################# +## +#A MovedPoints( ). . . . . . . . . . . . . . . . of a permutation group +## +## returns a list of the points moved by the permutation group . +MovedPoints := NewAttribute( "MovedPoints", IsPermGroup ); +SetMovedPoints := Setter( MovedPoints ); +HasMovedPoints := Tester( MovedPoints ); + ############################################################################# ## #C IsExternalSet . . . . . . . . . . . . . . . . . category of external sets ## -## An external set specifies an operation : x --> of a -## group on a finite domain . If is not a list, an enumerator for -## is automatically chosen and fixed. +## An *external set* specifies an operation : x --> of a +## group on a domain . The external set knows the group, the +## domain and the actual operation function. +## Mathematically, an external set is the set~, which is endowed with +## the group operation , and for this reason {\GAP} treats external sets +## as a domain whose elements are the elements of . An external set is +## always a union of orbits. +## Currently the domain~ must always be finite. +## If is not a list, an enumerator for is automatically chosen. ## IsExternalSet := NewCategory( "IsExternalSet", IsDomain ); +OrbitishReq := [ IsGroup, IsList, IsObject, + IsList, + IsList, + IsFunction ]; +OrbitsishReq := [ IsGroup, IsList, + IsList, + IsList, + IsFunction ]; + ############################################################################# ## #R IsExternalSubset . . . . . . . . . . . representation of external subsets ## ## An external subset is the restriction of an external set to a subset of -## , i.e., to a union of orbits. +## the domain. It is again an external set. ## IsExternalSubset := NewRepresentation( "IsExternalSubset", IsComponentObjectRep and IsAttributeStoringRep and IsExternalSet, @@ -34,15 +58,26 @@ IsExternalSubset := NewRepresentation( "IsExternalSubset", ## #R IsExternalOrbit . . . . . . . . . . . representation of external orbits ## -## An external orbit is an external subset on one orbit. +## An external orbit is an external subset consisting of one orbit. ## IsExternalOrbit := NewRepresentation( "IsExternalOrbit", IsExternalSubset, [ "start" ] ); IsExternalSetByPcgs := NewCategory( "IsExternalSetByPcgs", IsExternalSet ); +# The following two integer variables give position in which the `Type' of an +# external set can store the `Type' of its external subsets resp. external +# orbits (to avoid repeated calls of `NewType'). XSET_XSSETTYPE := 4; XSET_XORBTYPE := 5; +############################################################################# +## +#R IsExternalSetDefaultRep . . . . . . . . . representation of external sets +#R IsExternalSetByOperatorsRep . . . . . . . representation of external sets +## +## External sets can be specified directly (`IsExternalSetDefaultRep'), or +## via and (`IsExternalSetByOperatorsRep') (see ref. manual). +## IsExternalSetDefaultRep := NewRepresentation( "IsExternalSetDefaultRep", IsComponentObjectRep and IsAttributeStoringRep and IsExternalSet, [ ] ); @@ -51,6 +86,29 @@ IsExternalSetByOperatorsRep := NewRepresentation IsComponentObjectRep and IsAttributeStoringRep and IsExternalSet, [ "generators", "operators", "funcOperation" ] ); +############################################################################# +## +#A ActingDomain( ) . . . . . . . . . . . . . . . . . . the group +## +## This attributs returns the group with which the external set was +## defined. +ActingDomain := NewAttribute( "ActingDomain", IsExternalSet ); +SetActingDomain := Setter( ActingDomain ); +HasActingDomain := Tester( ActingDomain ); + +############################################################################# +## +#A HomeEnumerator( ) . . . . . . . the enumerator of the domain +## +## For external subsets, this is different from `Enumerator( )', +## which enumerates the union of orbits. +## +HomeEnumerator := NewAttribute( "HomeEnumerator", IsExternalSet ); +SetHomeEnumerator := Setter( HomeEnumerator ); +HasHomeEnumerator := Tester( HomeEnumerator ); + + + IsOperationHomomorphism := NewRepresentation( "IsOperationHomomorphism", IsGroupHomomorphism and IsGroupGeneralMappingByAsGroupGeneralMappingByImages and @@ -68,6 +126,13 @@ IsOperationHomomorphismSubset := NewRepresentation ( "IsOperationHomomorphismSubset", IsOperationHomomorphism, [ ] ); + +############################################################################# +## +#R IsOperationHomomorphismByBase() . . if a base for the operation is known +## +## This is chosen if `HasBase( )'. +## IsOperationHomomorphismByBase := NewRepresentation ( "IsOperationHomomorphismByBase", IsOperationHomomorphism, @@ -79,34 +144,17 @@ IsConstituentHomomorphism := NewRepresentation( "IsConstituentHomomorphism", IsBlocksHomomorphism := NewRepresentation( "IsBlocksHomomorphism", IsOperationHomomorphismDirectly, [ "reps" ] ); -IsGeneralLinearOperationHomomorphism := NewRepresentation - ( "IsGeneralLinearOperationHomomorphism", - IsOperationHomomorphismDirectly, - [ ] ); - -IsGeneralLinearOperationHomomorphismWithBase := NewRepresentation - ( "IsGeneralLinearOperationHomomorphismWithBase", - IsGeneralLinearOperationHomomorphism, - [ ] ); - -############################################################################# -## -#A ActingDomain( ) . . . . . . . . . . . . . . . . . . the group -## -ActingDomain := NewAttribute( "ActingDomain", IsExternalSet ); -SetActingDomain := Setter( ActingDomain ); -HasActingDomain := Tester( ActingDomain ); - ############################################################################# ## -#A HomeEnumerator( ) . . . . . . . the enumerator of the domain +#R IsLinearOperationHomomorphism . . . . . . for operations of matrix groups ## -## For external subsets, this is different from `Enumerator( )', -## which enumerates the union of orbits. +## This representation is chosen for operation homomorphisms from matrix +## groups acting naturally on a set of vectors including the standard base. ## -HomeEnumerator := NewAttribute( "HomeEnumerator", IsExternalSet ); -SetHomeEnumerator := Setter( HomeEnumerator ); -HasHomeEnumerator := Tester( HomeEnumerator ); +IsLinearOperationHomomorphism := NewRepresentation + ( "IsLinearOperationHomomorphism", + IsOperationHomomorphismDirectly, + [ ] ); ############################################################################# ## @@ -116,6 +164,17 @@ FunctionOperation := NewAttribute( "FunctionOperation", IsExternalSet ); SetFunctionOperation := Setter( FunctionOperation ); HasFunctionOperation := Tester( FunctionOperation ); +############################################################################# +## +#A StabilizerOfExternalSet( ) . stabilizer of `Representative(xset)' +## +## The stabilizer must have as its parent. +## +StabilizerOfExternalSet := NewAttribute( "StabilizerOfExternalSet", + IsExternalSet ); +SetStabilizerOfExternalSet := Setter( StabilizerOfExternalSet ); +HasStabilizerOfExternalSet := Tester( StabilizerOfExternalSet ); + ############################################################################# ## #A CanonicalRepresentativeOfExternalSet( ) . . . . . . . . . . . . . @@ -160,10 +219,288 @@ OperatorOfExternalSet := NewAttribute( "OperatorOfExternalSet", SetOperatorOfExternalSet := Setter( OperatorOfExternalSet ); HasOperatorOfExternalSet := Tester( OperatorOfExternalSet ); + +############################################################################# +## + +#F OrbitsishFOA( , , , ) . orbits-like operation +## +## This function returns a list containing a wrapper function, an operation, +## and an attribute resp. property. +## +## The wrapper function, e.g., `Orbits( )', can be called either as +## `Orbits( )' for an external set , or as +## `Orbits( , [, , ][, ] )', with a group , a +## domain or list , generators of , and corresponding elements +## that act on via ; +## the default of and is te list of group generators of , +## the default of is `OnPoints'. +## +## The operation has name `Op', and its arguments are required to have +## the filters in the list . +## +## The attribute resp. property has name `Attr' resp. `Prop', +## it is used to store the result of the wrapper function when this is +## called for an external set. +## +## When the wrapper function is called, it computes the arguments for the +## operation if necessary, and returns the return value of the operation. +## If the Boolean is `true' then the external set is used as an +## argument instead of , in order to enable the installation of methods +## that use the type of external sets. +## +## (It is also possible to call the wrapper function with only argument a +## permutation group , which is then interpreted as acting on its set +## of moved points via `OnPoints'. +## Also in this case, the attribute is used to store the result.) +## +OrbitsishFOA := function( name, reqs, usetype, NewAorP ) + local str, propop, propat, func; + + # Create the operation. + str:= SHALLOW_COPY_OBJ( name ); + APPEND_LIST_INTR( str, "Op" ); + propop := NewOperation( str, reqs ); + + # Create the attribute or property. + str := SHALLOW_COPY_OBJ( name ); + if NewAorP = NewAttribute then APPEND_LIST_INTR( str, "Attr" ); + else APPEND_LIST_INTR( str, "Prop" ); fi; + propat := NewAorP( str, IsExternalSet ); + + # Install a method for the attribute when called with an external set. + InstallMethod( propat, + "method for an external set", + true, + [ IsExternalSet ], 0, + function( xset ) + local G, gens, oprs, opr; + G := ActingDomain( xset ); + if IsExternalSetByOperatorsRep( xset ) then + gens := xset!.generators; + oprs := xset!.operators; + opr := xset!.funcOperation; + else + if IsPcgsComputable( G ) then + gens := Pcgs( G ); + else + gens := GeneratorsOfGroup( G ); + fi; + oprs := gens; + opr := FunctionOperation( xset ); + fi; + if usetype then + return propop( G, xset, gens, oprs, opr ); + else + return propop( G, Enumerator( xset ), gens, oprs, opr ); + fi; + end ); + + # Install a method for the attribute when called with a + # permutation group. + InstallOtherMethod( propat, + "method for a permutation group", + true, + [ IsPermGroup ], 0, + function( G ) + local gens; + gens:= GeneratorsOfGroup( G ); + return propop( G, MovedPoints( G ), gens, gens, OnPoints ); + end ); + + # Create the wrapper function. + func := function( arg ) + + local G, D, opr, gens, oprs; + + # If there is only one argument, call the attribute. + if Length( arg ) = 1 then + return propat( arg[1] ); + elif 5 < Length( arg ) then + Error( "usage: ", name, "()\n", + "or ", name, "(<,[,,][,])" ); + fi; + + # Get the arguments. + G := arg[ 1 ]; + D := arg[ 2 ]; + if IsDomain( D ) then + D := Enumerator( D ); + fi; + if IsFunction( arg[ Length( arg ) ] ) then + opr := arg[ Length( arg ) ]; + else + opr := OnPoints; + fi; + if Length( arg ) > 3 then + gens := arg[ 3 ]; + oprs := arg[ 4 ]; + else + + # In the case of a permutation group acting on its moved points, + # use the attribute. + if IsPermGroup( G ) + and opr = OnPoints + and HasMovedPoints( G ) + and D = MovedPoints( G ) then + return propat( G ); + fi; + + if IsPcgsComputable( G ) then + gens:= Pcgs( G ); + else + gens:= GeneratorsOfGroup( G ); + fi; + oprs:= gens; + + fi; + + # Call the operation. + return propop( G, D, gens, oprs, opr ); + end; + + # Return the triple. + return [ func, propop, propat ]; +end; + + +############################################################################# +## +#F OrbitishFO( , , , ) . orbit-like operation +## +## This function is analogous to `OrbitsishFOA', but for operations +## like `Orbit( , , )'. +## Since the return values of these operations depend on the additional +## argument , there is no associated attribute. +## The family relation is required for the families of the 2nd and +## 3rd argument (e.g., `IsCollsElms' for `Orbit'). +## +## can also be an attribute (`BlocksAttr' or `MaximalBlocksAttr'). +## In this case, if only one of the two arguments and is given, +## blocks with no seed are computed, they are stored as attribute values +## according to the rules of `OrbitsishFOA'. +## +OrbitishFO := function( name, reqs, famrel, usetype ) + + local str, orbish, func; + + # Create the operation. + str:= SHALLOW_COPY_OBJ( name ); + APPEND_LIST_INTR( str, "Op" ); + orbish := NewOperation( str, reqs ); + + # Create the wrapper function. + func := function( arg ) + local G, D, pnt, gens, oprs, opr, xset, p, attrG, result; + + # Get the arguments. + if Length( arg ) = 2 and IsExternalSet( arg[ 1 ] ) then + xset := arg[ 1 ]; + pnt := arg[ 2 ]; + G := ActingDomain( xset ); + if HasHomeEnumerator( xset ) then + D := HomeEnumerator( xset ); + fi; + if IsExternalSetByOperatorsRep( xset ) then + gens := xset!.generators; + oprs := xset!.operators; + opr := xset!.funcOperation; + else + opr := FunctionOperation( xset ); + fi; + elif 2 <= Length( arg ) then + G := arg[ 1 ]; + if Length( arg ) > 2 + and famrel( FamilyObj( arg[ 2 ] ), FamilyObj( arg[ 3 ] ) ) then + D := arg[ 2 ]; + if IsDomain( D ) then + D := Enumerator( D ); + fi; + p := 3; + else + p := 2; + fi; + pnt := arg[ p ]; + if Length( arg ) > p + 1 then + gens := arg[ p + 1 ]; + oprs := arg[ p + 2 ]; + fi; + if IsFunction( arg[ Length( arg ) ] ) then + opr := arg[ Length( arg ) ]; + else + opr := OnPoints; + fi; + else + Error( "usage: ", name, "(,)\n", + "or ", name, "([,],[,,][,])" ); + fi; + + if not IsBound( gens ) then + if IsPcgsComputable( G ) then + gens := Pcgs( G ); + else + gens := GeneratorsOfGroup( G ); + fi; + oprs := gens; + fi; + + # In the case of `[Maximal]Blocks', where $G$ is a permutation group + # acting on its moved points, use an attribute for $G$. + attrG := IsOperation( usetype ) + and gens = oprs + and opr = OnPoints + and not IsBound( D ) + and HasMovedPoints( G ) + and pnt = MovedPoints( G ); + if attrG and IsBound( xset ) and Tester( usetype )( xset ) then + result := usetype( xset ); + elif attrG and Tester( usetype )( G ) then + result := usetype( G ); + elif usetype = true and IsBound( xset ) then + result := orbish( G, xset, pnt, gens, oprs, opr ); + elif IsBound( D ) then + result := orbish( G, D, pnt, gens, oprs, opr ); + else + + # The following line is also executed when `Blocks(, , )' + # is called to compute blocks with no seed, but then is really + # , i.e., the operation domain! + result := orbish( G, pnt, gens, oprs, opr ); + + fi; + + # Store the result in the case of an attribute `[Maximal]BlocksAttr'. + if attrG then + if IsBound( xset ) then + Setter( usetype )( xset, result ); + fi; + Setter( usetype )( G, result ); + fi; + + return result; +end; + + # Return the pair. + return [ func, orbish ]; +end; + + + + ############################################################################# ## #A OperationHomomorphism( ) . homomorphism into S_{HomeEnumerator(D)} +#O OperationHomomorphism( , [,] ) ## +## From an external set (for group and domain ), +## the function call +## `OperationHomomorphism( )' constructs +## the permutation representation $ \to S_{||}$ of by acting on +## the external set . The mapping functions +## for operation homomorphisms are described in section "Homomorphisms!for +## groups". The version `OperationHomomorphism( , , )' serves as +## shortcut for `OperationHomomorphism( ExternalSet( , , ) )'. + OperationHomomorphism := NewOperationArgs( "OperationHomomorphism" ); OperationHomomorphismAttr := NewAttribute( "OperationHomomorphism", IsExternalSet ); @@ -181,32 +518,46 @@ SurjectiveOperationHomomorphismAttr := NewAttribute ## #A UnderlyingExternalSet( ) . . . . . . . . . underlying external set ## +## The underlying set of an operation homomorphism is the external set on +## which it was defined. UnderlyingExternalSet := NewAttribute( "UnderlyingExternalSet", IsOperationHomomorphism ); SetUnderlyingExternalSet := Setter( UnderlyingExternalSet ); HasUnderlyingExternalSet := Tester( UnderlyingExternalSet ); -OrbitishReq := [ IsGroup, IsList, IsObject, - IsList, - IsList, - IsFunction ]; -OrbitsishReq := [ IsGroup, IsList, - IsList, - IsList, - IsFunction ]; - ############################################################################# ## +#O SparseOperationHomomorphism( , , , [,,] ) +## +tmp := OrbitishFO( "SparseOperationHomomorphism", OrbitishReq, + IsIdentical, false ); +SparseOperationHomomorphism := tmp[1]; +SparseOperationHomomorphismOp := tmp[2]; -#O ExternalSet( , , [,,] ) . construct external set +############################################################################# ## +#O ExternalSet( , [,,] [,] ) . construct external set +## +## creates the external set for the operation of on . +## can +## be either a proper set (see "Sets") or a domain which is represented as +## described in "Domains and Collections". can be an arbitrary group, +## and must be a {\GAP} function that takes two arguments (the first +## from , the second from ) and returns the an element of~, namely +## the image of the first argument under the second. This last argument +## is always optional in operation functions, if it is not present, +## the operation `OnPoints', which is defined as +## `( , ) = ^ ' is the default. ## If and are specified, must be a generating set for -## , and the operation is $(d,gens[i]) -> opr(d,oprs[i])$. -## -ExternalSet := NewOperationArgs( "ExternalSet" ); -ExternalSetOp := NewOperation( "ExternalSet", OrbitsishReq ); -ExternalSetAttr := NewAttribute( "ExternalSet", IsGroup ); - # properly: ^IsExternalSet +## , and the operation is $(d,gens[i]) -> opr(d,oprs[i])$. This can be +## useful if a representation, in which the operation is easier describable +## (for example a matrix representation) can be given for the generators, but +## there is no easy way to decompose arbitrary elements in the generators. +## +tmp := OrbitsishFOA( "ExternalSet", OrbitsishReq, false, NewAttribute ); +ExternalSet := tmp[1]; +ExternalSetOp := tmp[2]; +ExternalSetAttr := tmp[3]; ExternalSetByFilterConstructor := NewOperationArgs ( "ExternalSetByFilterConstructor" ); ExternalSetByTypeConstructor := NewOperationArgs @@ -214,16 +565,18 @@ ExternalSetByTypeConstructor := NewOperationArgs ############################################################################# ## -#O ExternalSubset( , , , [,,] ) . . . . . . . +#O ExternalSubset( , , , [,,] ) . . . . . . . ## -## constructs the external subset on the union of orbits of . +#T there must be a shorter syntax here! +## constructs the external subset of on the union of orbits of . ## -ExternalSubset := NewOperationArgs( "ExternalSubset" ); -ExternalSubsetOp := NewOperation( "ExternalSubset", +tmp := OrbitishFO( "ExternalSubset", [ IsGroup, IsList, IsList, IsList, IsList, - IsFunction ] ); + IsFunction ], IsIdentical, true ); +ExternalSubset := tmp[1]; +ExternalSubsetOp := tmp[2]; ############################################################################# ## @@ -231,129 +584,246 @@ ExternalSubsetOp := NewOperation( "ExternalSubset", ## ## constructs the external subset on the orbit of . ## -ExternalOrbit := NewOperationArgs( "ExternalOrbit" ); -ExternalOrbitOp := NewOperation( "ExternalOrbit", OrbitishReq ); +tmp := OrbitishFO( "ExternalOrbit", OrbitishReq, IsCollsElms, true ); +ExternalOrbit := tmp[1]; +ExternalOrbitOp := tmp[2]; -Orbit := NewOperationArgs( "Orbit" ); -OrbitOp := NewOperation( "Orbit", OrbitishReq ); +############################################################################# +## -Orbits := NewOperationArgs( "Orbits" ); -OrbitsOp := NewOperation( "Orbits", OrbitsishReq ); -OrbitsAttr := NewAttribute( "Orbits", IsExternalSet ); +#O Orbit( , , , [,,] ) . . . . . . . . . . . . +## +tmp := OrbitishFO( "Orbit", OrbitishReq, IsCollsElms, false ); +Orbit := tmp[1]; +OrbitOp := tmp[2]; -SparseOperationHomomorphism := NewOperationArgs - ( "SparseOperationHomomorphism" ); -SparseOperationHomomorphismOp := NewOperation( "SparseOperationHomomorphismOp", - OrbitishReq ); +############################################################################# +## +#A Orbits( , , [,,] ) . . . . . . . . . . . . . . . +## +tmp := OrbitsishFOA( "Orbits", OrbitsishReq, false, NewAttribute ); +Orbits := tmp[1]; +OrbitsOp := tmp[2]; +OrbitsAttr := tmp[3]; -ExternalOrbits := NewOperationArgs( "ExternalOrbits" ); -ExternalOrbitsOp := NewOperation( "ExternalOrbits", OrbitsishReq ); -ExternalOrbitsAttr := NewAttribute( "ExternalOrbits", IsExternalSet ); +############################################################################# +## +#O OrbitLength( , , , [,,] ) . . . . . . . . . +## +tmp := OrbitishFO( "OrbitLength", OrbitishReq, IsCollsElms, false ); +OrbitLength := tmp[1]; +OrbitLengthOp := tmp[2]; -ExternalOrbitsStabilizers := NewOperationArgs( "ExternalOrbitsStabilizers" ); -ExternalOrbitsStabilizersOp := NewOperation( "ExternalOrbitsStabilizers", - OrbitsishReq ); -ExternalOrbitsStabilizersAttr := NewAttribute( "ExternalOrbitsStabilizers", - IsExternalSet ); +############################################################################# +## +#O OrbitLengths( , , [,,] ) . . . . . . . . . . . . +## +tmp := OrbitsishFOA( "OrbitLengths", OrbitsishReq, false, NewAttribute ); +OrbitLengths := tmp[1]; +OrbitLengthsOp := tmp[2]; +OrbitLengthsAttr := tmp[3]; +############################################################################# +## +#O OrbitStabilizer( , , , [,,] ) . . . . . . . +## +## The stabilizer must have as its parent. +## +tmp := OrbitishFO( "OrbitStabilizer", OrbitishReq, IsCollsElms, false ); +OrbitStabilizer := tmp[1]; +OrbitStabilizerOp := tmp[2]; + +############################################################################# +## +#A ExternalOrbits( , , [,,] ) . . . . . . . . . . . +## +tmp := OrbitsishFOA( "ExternalOrbits", OrbitsishReq, true, NewAttribute ); +ExternalOrbits := tmp[1]; +ExternalOrbitsOp := tmp[2]; +ExternalOrbitsAttr := tmp[3]; + +############################################################################# +## +#A ExternalOrbitsStabilizers( , , [,,] ) . . . . . . +## +tmp := OrbitsishFOA( "ExternalOrbitsStabilizers", OrbitsishReq, + true, NewAttribute ); +ExternalOrbitsStabilizers := tmp[1]; +ExternalOrbitsStabilizersOp := tmp[2]; +ExternalOrbitsStabilizersAttr := tmp[3]; + +############################################################################# +## +#A Transitivity( , , [,,] ) . . . . . . . . . . . . +## +tmp := OrbitsishFOA( "Transitivity", OrbitsishReq, false, NewAttribute ); +Transitivity := tmp[1]; +TransitivityOp := tmp[2]; +TransitivityAttr := tmp[3]; + +############################################################################# +## +#A Blocks( , , , [,,] ) . . . . . . . . . . . +## +BlocksAttr := NewAttribute( "BlocksAttr", IsExternalSet ); +tmp := OrbitishFO( "Blocks", + [ IsGroup, IsList, IsList, + IsList, + IsList, + IsFunction ], IsIdentical, BlocksAttr ); +Blocks := tmp[1]; +BlocksOp := tmp[2]; + +############################################################################# +## +#A MaximalBlocks( , , , [,,] ) . . . . . . . . +## +MaximalBlocksAttr := NewAttribute( "MaximalBlocksAttr", IsExternalSet ); +tmp := OrbitishFO( "MaximalBlocks", + [ IsGroup, IsList, IsList, + IsList, + IsList, + IsFunction ], IsIdentical, MaximalBlocksAttr ); +MaximalBlocks := tmp[1]; +MaximalBlocksOp := tmp[2]; + +############################################################################# +## +#A MinimalBlocks( , , , [,,] ) . . . . . . . . +## +MinimalBlocksAttr := NewAttribute( "MinimalBlocksAttr", IsExternalSet ); +tmp := OrbitishFO( "MinimalBlocks", + [ IsGroup, IsList, IsList, + IsList, + IsList, + IsFunction ], IsIdentical, MinimalBlocksAttr ); +MinimalBlocks := tmp[1]; +MinimalBlocksOp := tmp[2]; + +############################################################################# +## +#A Earns( , , [,,] ) . . . . . . . . . . . . . . . . +## +tmp := OrbitsishFOA( "Earns", OrbitsishReq, false, NewAttribute ); +Earns := tmp[1]; +EarnsOp := tmp[2]; +EarnsAttr := tmp[3]; + +############################################################################# +## + +#P IsTransitive( , , [,,] ) . . . . . . . . . . . . +## +tmp := OrbitsishFOA( "IsTransitive", OrbitsishReq, false, NewProperty ); +IsTransitive := tmp[1]; +IsTransitiveOp := tmp[2]; +IsTransitiveProp := tmp[3]; + +############################################################################# +## +#P IsPrimitive( , , [,,] ) . . . . . . . . . . . . . +## +tmp := OrbitsishFOA( "IsPrimitive", OrbitsishReq, false, NewProperty ); +IsPrimitive := tmp[1]; +IsPrimitiveOp := tmp[2]; +IsPrimitiveProp := tmp[3]; + +############################################################################# +## +#P IsPrimitiveAffine( , , [,,] ) . . . . . . . . . . +## +tmp := OrbitsishFOA( "IsPrimitiveAffine", OrbitsishReq, false, NewProperty ); +IsPrimitiveAffine := tmp[1]; +IsPrimitiveAffineOp := tmp[2]; +IsPrimitiveAffineProp := tmp[3]; + +############################################################################# +## +#P IsSemiRegular( , , [,,] ) . . . . . . . . . . . . +## +tmp := OrbitsishFOA( "IsSemiRegular", OrbitsishReq, false, NewProperty ); +IsSemiRegular := tmp[1]; +IsSemiRegularOp := tmp[2]; +IsSemiRegularProp := tmp[3]; + +############################################################################# +## +#P IsRegular( , , [,,] ) . . . . . . . . . . . . . . +## +tmp := OrbitsishFOA( "IsRegular", OrbitsishReq, false, NewProperty ); +IsRegular := tmp[1]; +IsRegularOp := tmp[2]; +IsRegularProp := tmp[3]; + +############################################################################# +## + +#O Permutation( , , [,,] ) . . . . . . . . . . . . . +## Permutation := NewOperationArgs( "Permutation" ); PermutationOp := NewOperation( "Permutation", [ IsObject, IsList, IsFunction ] ); +############################################################################# +## +#O PermutationCycle( , , , [,,] ) . . . . . . . +## PermutationCycle := NewOperationArgs( "PermutationCycle" ); PermutationCycleOp := NewOperation( "PermutationCycle", [ IsObject, IsList, IsObject, IsFunction ] ); +############################################################################# +## +#O Cycle( , , , [,,] ) . . . . . . . . . . . . +## Cycle := NewOperationArgs( "Cycle" ); CycleOp := NewOperation( "Cycle", [ IsObject, IsList, IsObject, IsFunction ] ); +############################################################################# +## +#O Cycles( , , [,,] ) . . . . . . . . . . . . . . . +## Cycles := NewOperationArgs( "Cycles" ); CyclesOp := NewOperation( "Cycles", [ IsObject, IsList, IsFunction ] ); -Blocks := NewOperationArgs( "Blocks" ); -BlocksOp := NewOperation( "Blocks", - [ IsGroup, IsList, IsList, - IsList, - IsList, - IsFunction ] ); - -MaximalBlocks := NewOperationArgs( "MaximalBlocks" ); -MaximalBlocksOp := NewOperation( "MaximalBlocks", - [ IsGroup, IsList, IsList, - IsList, - IsList, - IsFunction ] ); - -OrbitLength := NewOperationArgs( "OrbitLength" ); -OrbitLengthOp := NewOperation( "OrbitLength", OrbitishReq ); - -OrbitLengths := NewOperationArgs( "OrbitLengths" ); -OrbitLengthsOp := NewOperation( "OrbitLengths", OrbitsishReq ); -OrbitLengthsAttr := NewAttribute( "OrbitLengths", IsExternalSet ); - +############################################################################# +## +#O CycleLength( , , , [,,] ) . . . . . . . . . +## CycleLength := NewOperationArgs( "CycleLength" ); CycleLengthOp := NewOperation( "CycleLength", [ IsObject, IsList, IsObject, IsFunction ] ); +############################################################################# +## +#O CycleLengths( , , , [,,] ) . . . . . . . . +## CycleLengths := NewOperationArgs( "CycleLengths" ); CycleLengthsOp := NewOperation( "CycleLengths", [ IsObject, IsList, IsFunction ] ); -IsTransitive := NewOperationArgs( "IsTransitive" ); -IsTransitiveOp := NewOperation( "IsTransitive", OrbitsishReq ); -IsTransitiveProp := NewProperty( "IsTransitive", IsObject ); - -Transitivity := NewOperationArgs( "Transitivity" ); -TransitivityOp := NewOperation( "Transitivity", OrbitsishReq ); -TransitivityAttr := NewAttribute( "Transitivity", IsObject ); - -IsPrimitive := NewOperationArgs( "IsPrimitive" ); -IsPrimitiveOp := NewOperation( "IsPrimitive", OrbitsishReq ); -IsPrimitiveProp := NewProperty( "IsPrimitive", IsObject ); - -Earns := NewOperationArgs( "Earns" ); -EarnsOp := NewOperation( "Earns", OrbitsishReq ); -EarnsAttr := NewAttribute( "Earns", IsObject ); - -IsPrimitiveAffine := NewOperationArgs( "IsPrimitiveAffine" ); -IsPrimitiveAffineOp := NewOperation( "IsPrimitiveAffine", OrbitsishReq ); -IsPrimitiveAffineProp := NewProperty( "IsPrimitiveAffine", IsObject ); - -IsSemiRegular := NewOperationArgs( "IsSemiRegular" ); -IsSemiRegularOp := NewOperation( "IsSemiRegular", OrbitsishReq ); -IsSemiRegularProp := NewProperty( "IsSemiRegular", IsObject ); - -IsRegular := NewOperationArgs( "IsRegular" ); -IsRegularOp := NewOperation( "IsRegular", OrbitsishReq ); -IsRegularProp := NewProperty( "IsRegular", IsObject ); +############################################################################# +## +#O RepresentativeOperation( , , , , [,,] ) . . +## RepresentativeOperation := NewOperationArgs( "RepresentativeOperation" ); RepresentativeOperationOp := NewOperation( "RepresentativeOperation", [ IsGroup, IsList, IsObject, IsObject, IsFunction ] ); ############################################################################# ## -#O Stabilizer( , , ) . . . . . . . . . . . . . . . . . . . . . -#O OrbitStabilizer( , , ) . . rec(orbit:=...,stabilizer:=...) -#A StabilizerOfExternalSet( ) . stabilizer of `Representative(xset)' +#O Stabilizer( , , , [,,] ) . . . . . . . . . . ## ## The stabilizer must have as its parent. ## Stabilizer := NewOperationArgs( "Stabilizer" ); -StabilizerOp := NewOperation( "Stabilizer", OrbitishReq ); - -OrbitStabilizer := NewOperationArgs( "OrbitStabilizer" ); -OrbitStabilizerOp := NewOperation( "OrbitStabilizer", OrbitishReq ); - -StabilizerOfExternalSet := NewAttribute( "StabilizerOfExternalSet", - IsExternalSet ); -SetStabilizerOfExternalSet := Setter( StabilizerOfExternalSet ); -HasStabilizerOfExternalSet := Tester( StabilizerOfExternalSet ); +tmp := OrbitishFO( "StabilizerFunc", OrbitishReq, IsCollsElms, false ); +StabilizerFunc := tmp[1]; +StabilizerOp := tmp[2]; -AttributeOperation := NewOperationArgs( "AttributeOperation" ); -OrbitishOperation := NewOperationArgs( "OrbitishOperation" ); OperationHomomorphismSubsetAsGroupGeneralMappingByImages := NewOperationArgs ( "OperationHomomorphismSubsetAsGroupGeneralMappingByImages" ); Operation := NewOperationArgs( "Operation" ); @@ -365,12 +835,6 @@ OrbitStabilizerListByGenerators := NewOperationArgs ( "OrbitStabilizerListByGenerators" ); SetCanonicalRepresentativeOfExternalOrbitByPcgs := NewOperationArgs( "SetCanonicalRepresentativeOfExternalOrbitByPcgs" ); - -############################################################################# -## - -#F StabilizerOfBlockNC( , ) . . . . block stabilizer for perm groups -## StabilizerOfBlockNC := NewOperationArgs( "StabilizerOfBlockNC" ); ############################################################################# @@ -383,4 +847,5 @@ StabilizerOfBlockNC := NewOperationArgs( "StabilizerOfBlockNC" ); ############################################################################# ## + #E oprt.gd . . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here diff --git a/lib/oprt.gi b/lib/oprt.gi index 06aa83b7c7..f715f14851 100644 --- a/lib/oprt.gi +++ b/lib/oprt.gi @@ -7,148 +7,6 @@ Revision.oprt_gi := "@(#)$Id$"; -############################################################################# -## -#F AttributeOperation( ) . . . . . . . . . . attribute for operations -## -## `AttributeOperation( op, attr, usetype, args )' calls an operation -## function with the arguments : If specify an external set -## or a group operating `OnPoints' on its `MovedPoints', and if -## resp. has the attribute , its value is returned. -## Otherwise, are parsed and converted into the form `( G, D, gens, -## oprs, opr )' and the operation is called with this argument list. If -## or was specified as above, the result is stored as the -## attribute in resp. . If is true and -## present, it is passed instead of , to allow usage of `TypeObj(xset)'. -## -AttributeOperation := function( propop, propat, usetype, args ) - local G, D, gens, oprs, opr, xset, result, attrG; - - # Get the arguments. - if IsExternalSet( args[ 1 ] ) then - xset := args[ 1 ]; - - # In the case of an external set, look at the attribute. - if Tester( propat )( xset ) then - return propat( xset ); - fi; - - G := ActingDomain( xset ); - D := Enumerator( xset ); - if IsExternalSetByOperatorsRep( xset ) then - gens := xset!.generators; - oprs := xset!.operators; - opr := xset!.funcOperation; - else - opr := FunctionOperation( xset ); - fi; - - else - G := args[ 1 ]; - D := args[ 2 ]; - if IsDomain( D ) then - D := Enumerator( D ); - fi; - if Length( args ) > 3 then - gens := args[ 3 ]; - oprs := args[ 4 ]; - fi; - if IsFunction( args[ Length( args ) ] ) then - opr := args[ Length( args ) ]; - else - opr := OnPoints; - fi; - fi; - - if not IsBound( gens ) then - if IsPcgsComputable( G ) then gens := Pcgs( G ); - else gens := GeneratorsOfGroup( G ); fi; - oprs := gens; - fi; - - # In the case of a permutation group $G$ acting on its moved points, use - # an attribute for $G$. - attrG := gens = oprs - and opr = OnPoints - and HasMovedPoints( G ) - and D = MovedPoints( G ); - if attrG and Tester( propat )( G ) then - result := propat( G ); - elif usetype - and IsBound( xset ) then - result := propop( G, xset, gens, oprs, opr ); - else - result := propop( G, D, gens, oprs, opr ); - fi; - - # Store the result in the case of an attribute. - if IsBound( xset ) then Setter( propat )( xset, result ); - elif attrG then Setter( propat )( G, result ); fi; - - return result; -end; - -############################################################################# -## -#F OrbitishOperation( ) . . . . . . . . . . . . orbit-like operation -## -OrbitishOperation := function( orbish, famrel, usetype, args ) - local G, D, pnt, gens, oprs, opr, xset, p; - - # Get the arguments. - if IsExternalSet( args[ 1 ] ) then - xset := args[ 1 ]; - pnt := args[ 2 ]; - G := ActingDomain( xset ); - if HasHomeEnumerator( xset ) then - D := HomeEnumerator( xset ); - fi; - if IsExternalSetByOperatorsRep( xset ) then - gens := xset!.generators; - oprs := xset!.operators; - opr := xset!.funcOperation; - else - opr := FunctionOperation( xset ); - fi; - else - G := args[ 1 ]; - if Length( args ) > 2 - and famrel( FamilyObj( args[ 2 ] ), FamilyObj( args[ 3 ] ) ) then - D := args[ 2 ]; - if IsDomain( D ) then - D := Enumerator( D ); - fi; - p := 3; - else - p := 2; - fi; - pnt := args[ p ]; - if Length( args ) > p + 1 then - gens := args[ p + 1 ]; - oprs := args[ p + 2 ]; - fi; - if IsFunction( args[ Length( args ) ] ) then - opr := args[ Length( args ) ]; - else - opr := OnPoints; - fi; - fi; - - if not IsBound( gens ) then - if IsPcgsComputable( G ) then gens := Pcgs( G ); - else gens := GeneratorsOfGroup( G ); fi; - oprs := gens; - fi; - if usetype - and IsBound( xset ) then - return orbish( G, xset, pnt, gens, oprs, opr ); - elif IsBound( D ) then - return orbish( G, D, pnt, gens, oprs, opr ); - else - return orbish( G, pnt, gens, oprs, opr ); - fi; -end; - ############################################################################# ## #R IsSubsetEnumerator . . . . . . . . . . . . . . . enumerator for subsets @@ -204,10 +62,6 @@ InstallMethod( AsList, true, [ IsSubsetEnumerator ], 0, #F ExternalSet( ) . . . . . . . . . . . . . external set constructor ## -ExternalSet := function( arg ) - return AttributeOperation( ExternalSetOp, ExternalSetAttr, false, arg ); -end; - InstallMethod( ExternalSetOp, "G, D, gens, oprs, opr", true, OrbitsishReq, 0, @@ -240,6 +94,10 @@ ExternalSetByFilterConstructor := function( filter, G, D, gens, oprs, opr ) return xset; end; +# The following function expects the type as first argument, to avoid a call +# of `NewType'. It is called by `ExternalSubsetOp' and `ExternalOrbitOp' when +# they are called with an external set (which has already stored this type). +# ExternalSetByTypeConstructor := function( type, G, D, gens, oprs, opr ) local xset; @@ -257,14 +115,6 @@ ExternalSetByTypeConstructor := function( type, G, D, gens, oprs, opr ) return xset; end; -############################################################################# -## -#M Size( ) . . . . . . . . . . . . . . . . . . . . . via enumerator -## -InstallMethod( Size, true, [ IsExternalSet ], 0, - xset -> Length( Enumerator( xset ) ) ); -#T is this necessary at all? (method in 'coll.gi') - ############################################################################# ## #M Enumerator( ) . . . . . . . . . . . . . . . . the underlying set @@ -304,10 +154,6 @@ InstallMethod( Representative, true, [ IsExternalSet ], 0, ## #F ExternalSubset( ) . . . . . . . . . . . . . external set on subset ## -ExternalSubset := function( arg ) - return OrbitishOperation( ExternalSubsetOp, IsIdentical, true, arg ); -end; - InstallMethod( ExternalSubsetOp, "G, D, start, gens, oprs, opr", true, [ IsGroup, IsList, IsList, @@ -333,6 +179,9 @@ InstallOtherMethod( ExternalSubsetOp, local type, xsset; type := TypeObj( xset ); + + # The type of an external set can store the type of its external subsets, + # to avoid repeated calls of `NewType'. if not IsBound( type![XSET_XSSETTYPE] ) then xsset := ExternalSetByFilterConstructor( IsExternalSubset, G, HomeEnumerator( xset ), gens, oprs, opr ); @@ -341,6 +190,7 @@ InstallOtherMethod( ExternalSubsetOp, xsset := ExternalSetByTypeConstructor( type![XSET_XSSETTYPE], G, HomeEnumerator( xset ), gens, oprs, opr ); fi; + xsset!.start := Immutable( start ); return xsset; end ); @@ -397,10 +247,6 @@ end ); ## #F ExternalOrbit( ) . . . . . . . . . . . . . . external set on orbit ## -ExternalOrbit := function( arg ) - return OrbitishOperation( ExternalOrbitOp, IsCollsElms, true, arg ); -end; - InstallMethod( ExternalOrbitOp, "G, D, pnt, gens, oprs, opr", true, OrbitishReq, 0, @@ -424,6 +270,9 @@ InstallOtherMethod( ExternalOrbitOp, local type, xorb; type := TypeObj( xset ); + + # The type of an external set can store the type of external orbits of + # its points, to avoid repeated calls of `NewType'. if not IsBound( type![XSET_XORBTYPE] ) then xorb := ExternalSetByFilterConstructor( IsExternalOrbit, G, HomeEnumerator( xset ), gens, oprs, opr ); @@ -432,6 +281,7 @@ InstallOtherMethod( ExternalOrbitOp, xorb := ExternalSetByTypeConstructor( type![XSET_XORBTYPE], G, HomeEnumerator( xset ), gens, oprs, opr ); fi; + SetRepresentative( xorb, pnt ); xorb!.start := Immutable( [ pnt ] ); return xorb; @@ -607,7 +457,7 @@ OperationHomomorphismConstructor := function( xset, surj ) if IsExternalSetByOperatorsRep( xset ) then filter := filter and IsOperationHomomorphismByOperators; elif IsMatrixGroup( G ) - and not IsProjectiveSpaceEnumerator( D ) + and not IsOneDimSubspacesTransversal( D ) and IsScalarList( D[ 1 ] ) and opr in [ OnPoints, OnRight ] then if not IsExternalSubset( xset ) @@ -615,7 +465,7 @@ OperationHomomorphismConstructor := function( xset, surj ) and IsFreeLeftModule( UnderlyingCollection( D ) ) and IsFullRowModule( UnderlyingCollection( D ) ) and IsLeftActedOnByDivisionRing( UnderlyingCollection( D ) ) then - filter := filter and IsGeneralLinearOperationHomomorphismWithBase; + filter := filter and IsLinearOperationHomomorphism; else if IsExternalSubset( xset ) then if HasEnumerator( xset ) then D := Enumerator( xset ); @@ -623,10 +473,7 @@ OperationHomomorphismConstructor := function( xset, surj ) fi; if IsSubset( D, IdentityMat ( Length( D[ 1 ] ), One( D[ 1 ][ 1 ] ) ) ) then - filter := filter and - IsGeneralLinearOperationHomomorphismWithBase; - else - filter := filter and IsGeneralLinearOperationHomomorphism; + filter := filter and IsLinearOperationHomomorphism; fi; fi; elif not IsExternalSubset( xset ) @@ -814,10 +661,6 @@ end; ## #F Orbit( ) . . . . . . . . . . . . . . . . . . . . . . . . . . orbit ## -Orbit := function( arg ) - return OrbitishOperation( OrbitOp, IsCollsElms, false, arg ); -end; - InstallMethod( OrbitOp, "G, D, pnt, [ 1gen ], [ 1opr ], opr", true, OrbitishReq, SUM_FLAGS, @@ -889,10 +732,6 @@ end ); ## #F OrbitStabilizer( ) . . . . . . . . . . . . . orbit and stabilizer ## -OrbitStabilizer := function( arg ) - return OrbitishOperation( OrbitStabilizerOp, IsCollsElms, false, arg ); -end; - InstallMethod( OrbitStabilizerOp, "G, D, pnt, gens, oprs, opr", true, OrbitishReq, 0, @@ -997,10 +836,6 @@ end; ## #F Orbits( ) . . . . . . . . . . . . . . . . . . . . . . . . . orbits ## -Orbits := function( arg ) - return AttributeOperation( OrbitsOp, OrbitsAttr, false, arg ); -end; - InstallMethod( OrbitsOp, "G, D, gens, oprs, opr", true, OrbitsishReq, 0, @@ -1038,11 +873,6 @@ end ); ## #F SparseOperationHomomorphism( ) operation homomorphism on `[1..n]' ## -SparseOperationHomomorphism := function( arg ) - return OrbitishOperation( SparseOperationHomomorphismOp, IsIdentical, - false, arg ); -end; - InstallMethod( SparseOperationHomomorphismOp, "G, D, start, gens, oprs, opr", true, [ IsGroup, IsList, IsList, @@ -1113,11 +943,6 @@ end ); ## #F ExternalOrbits( ) . . . . . . . . . . . . list of transitive xsets ## -ExternalOrbits := function( arg ) - return AttributeOperation( ExternalOrbitsOp, ExternalOrbitsAttr, - true, arg ); -end; - InstallMethod( ExternalOrbitsOp, "G, D, gens, oprs, opr", true, OrbitsishReq, 0, @@ -1168,11 +993,6 @@ end ); ## #F ExternalOrbitsStabilizers( ) . . . . . . list of transitive xsets ## -ExternalOrbitsStabilizers := function( arg ) - return AttributeOperation( ExternalOrbitsStabilizersOp, - ExternalOrbitsStabilizersAttr, true, arg ); -end; - InstallMethod( ExternalOrbitsStabilizersOp, "G, D, gens, oprs, opr", true, OrbitsishReq, 0, @@ -1531,10 +1351,6 @@ end ); ## #F Blocks( ) . . . . . . . . . . . . . . . . . . . . . . . . . blocks ## -Blocks := function( arg ) - return OrbitishOperation( BlocksOp, IsIdentical, true, arg ); -end; - InstallOtherMethod( BlocksOp, "G, D, gens, oprs, opr", true, [ IsGroup, IsList, @@ -1573,10 +1389,6 @@ end ); ## #F MaximalBlocks( ) . . . . . . . . . . . . . . . . . maximal blocks ## -MaximalBlocks := function( arg ) - return OrbitishOperation( MaximalBlocksOp, IsIdentical, true, arg ); -end; - InstallOtherMethod( MaximalBlocksOp, "G, D, gens, oprs, opr", true, [ IsGroup, IsList, @@ -1621,10 +1433,6 @@ end ); #F OrbitLength( ) . . . . . . . . . . . . . . . . . . . orbit length ## -OrbitLength := function( arg ) - return OrbitishOperation( OrbitLengthOp, IsCollsElms, false, arg ); -end; - InstallMethod( OrbitLengthOp, true, OrbitishReq, 0, function( G, D, pnt, gens, oprs, opr ) return Length( OrbitOp( G, D, pnt, gens, oprs, opr ) ); @@ -1643,10 +1451,6 @@ end ); ## #F OrbitLengths( ) . . . . . . . . . . . . . . . . . . . orbit lengths ## -OrbitLengths := function( arg ) - return AttributeOperation( OrbitLengthsOp, OrbitLengthsAttr, false, arg ); -end; - InstallMethod( OrbitLengthsOp, true, OrbitsishReq, 0, function( G, D, gens, oprs, opr ) return Immutable( List( Orbits( G, D, gens, oprs, opr ), Length ) ); @@ -1772,10 +1576,6 @@ end ); #F IsTransitive( , , , , ) . . . . transitivity test ## -IsTransitive := function( arg ) - return AttributeOperation( IsTransitiveOp, IsTransitiveProp, false, arg ); -end; - InstallMethod( IsTransitiveOp, true, OrbitsishReq, 0, function( G, D, gens, oprs, opr ) return IsSubset( OrbitOp( G, D[ 1 ], gens, oprs, opr ), D ); @@ -1785,10 +1585,6 @@ end ); ## #F Transitivity( ) . . . . . . . . . . . . . . . . transitivity degree ## -Transitivity := function( arg ) - return AttributeOperation( TransitivityOp, TransitivityAttr, false, arg ); -end; - InstallMethod( TransitivityOp, true, OrbitsishReq, 0, function( G, D, gens, oprs, opr ) local hom; @@ -1811,10 +1607,6 @@ end ); ## #F IsPrimitive( , , , , ) . . . . primitivity test ## -IsPrimitive := function( arg ) - return AttributeOperation( IsPrimitiveOp, IsPrimitiveProp, false, arg ); -end; - InstallMethod( IsPrimitiveOp, true, OrbitsishReq, 0, function( G, D, gens, oprs, opr ) return IsTransitive( G, D, gens, oprs, opr ) @@ -1825,10 +1617,6 @@ end ); ## #F Earns( ) . . . . . . . . elementary abelian regular normal subgroup ## -Earns := function( arg ) - return AttributeOperation( EarnsOp, EarnsAttr, false, arg ); -end; - InstallMethod( EarnsOp, true, OrbitsishReq, 0, function( G, D, gens, oprs, opr ) Error( "`Earns' only implemented for primitive permutation groups" ); @@ -1838,7 +1626,8 @@ end ); ## #M Setter( EarnsAttr )( , fail ) . . . . . . . . . . . never set `fail' ## -InstallMethod( Setter( EarnsAttr ), true, [ IsGroup, IsBool ], SUM_FLAGS, +InstallOtherMethod( Setter( EarnsAttr ), true, [ IsGroup, IsBool ], + SUM_FLAGS, function( G, fail ) Setter( IsPrimitiveAffineProp )( G, false ); end ); @@ -1847,11 +1636,6 @@ end ); ## #F IsPrimitiveAffine( ) . . . . . . . . . . . . is operation affine? ## -IsPrimitiveAffine := function( arg ) - return AttributeOperation( IsPrimitiveAffineOp, IsPrimitiveAffineProp, - false, arg ); -end; - InstallMethod( IsPrimitiveAffineOp, true, OrbitsishReq, 0, function( G, D, gens, oprs, opr ) return IsPrimitive( G, D, gens, oprs, opr ) @@ -1862,11 +1646,6 @@ end ); ## #F IsSemiRegular( ) . . . . . . . . . . . . . . . semiregularity test ## -IsSemiRegular := function( arg ) - return AttributeOperation( IsSemiRegularOp, IsSemiRegularProp, - false, arg ); -end; - InstallMethod( IsSemiRegularOp, true, OrbitsishReq, 0, function( G, D, gens, oprs, opr ) local hom; @@ -1899,10 +1678,6 @@ end ); ## #F IsRegular( ) . . . . . . . . . . . . . . . . . . . regularity test ## -IsRegular := function( arg ) - return AttributeOperation( IsRegularOp, IsRegularProp, false, arg ); -end; - InstallMethod( IsRegularOp, true, OrbitsishReq, 0, function( G, D, gens, oprs, opr ) return IsTransitive( G, D, gens, oprs, opr ) @@ -2095,7 +1870,7 @@ Stabilizer := function( arg ) if Length( arg ) = 1 then return StabilizerOfExternalSet( arg[ 1 ] ); else - return OrbitishOperation( StabilizerOp, IsCollsElms, false, arg ); + return CallFuncList( StabilizerFunc, arg ); fi; end; @@ -2275,20 +2050,20 @@ end ); #M PreImagesRepresentative( , ) . . . . . . . . . . build matrix ## InstallMethod( PreImagesRepresentative, true, - [ IsGeneralLinearOperationHomomorphism, IsPerm ], 0, + [ IsLinearOperationHomomorphism, IsPerm ], 0, function( hom, elm ) local V, base, mat, b; - + + if not elm in Image( hom ) then + return fail; + fi; V := HomeEnumerator( UnderlyingExternalSet( hom ) ); base := One( Source( hom ) ); mat := [ ]; for b in base do Add( mat, V[ PositionCanonical( V, b ) ^ elm ] ); od; - if IsGeneralLinearOperationHomomorphismWithBase( hom ) - or IsGeneralLinearGroup( Source( hom ) ) - or mat in Source( hom ) then return mat; - else return fail; fi; + return mat; end ); ############################################################################# diff --git a/lib/oprtpcgs.gi b/lib/oprtpcgs.gi index 09568532fa..de2d5b9976 100644 --- a/lib/oprtpcgs.gi +++ b/lib/oprtpcgs.gi @@ -13,14 +13,15 @@ Revision.oprtpcgs_gi := ## InstallMethod( OrbitStabilizerOp, "G, D, pnt, pcgs, oprs, opr", true, - [ IsGroup, IsList, IsObject, IsPcgs, IsList, IsFunction ], 0, + [ IsGroup, IsList, IsObject, IsPrimeOrdersPcgs, IsList, IsFunction ], + 0, function( G, D, pnt, pcgs, oprs, opr ) return OrbitStabilizerOp( G, pnt, pcgs, oprs, opr ); end ); InstallOtherMethod( OrbitStabilizerOp, "G, pnt, pcgs, oprs, opr", true, - [ IsGroup, IsObject, IsPcgs, IsList, IsFunction ], 0, + [ IsGroup, IsObject, IsPrimeOrdersPcgs, IsList, IsFunction ], 0, function( G, pnt, pcgs, oprs, opr ) local orb, # orbit len, # lengths of orbit before each extension @@ -265,14 +266,15 @@ end ); ## InstallMethod( OrbitOp, "G, D, pnt, pcgs, oprs, opr", true, - [ IsGroup, IsList, IsObject, IsPcgs, IsList, IsFunction ], 0, + [ IsGroup, IsList, IsObject, IsPrimeOrdersPcgs, IsList, IsFunction ], + 0, function( G, D, pnt, pcgs, oprs, opr ) return OrbitOp( G, pnt, pcgs, oprs, opr ); end ); InstallOtherMethod( OrbitOp, "G, pnt, pcgs, oprs, opr", true, - [ IsGroup, IsObject, IsPcgs, IsList, IsFunction ], 0, + [ IsGroup, IsObject, IsPrimeOrdersPcgs, IsList, IsFunction ], 0, function( G, pt, U, V, op ) local orb, v, img, len, i, j, k; @@ -301,7 +303,8 @@ end ); #M RepresentativeOperationOp( , , , , , , ) . ## InstallOtherMethod( RepresentativeOperationOp, true, - [ IsGroup, IsList, IsObject, IsObject, IsPcgs, IsList, IsFunction ], 0, + [ IsGroup, IsList, IsObject, IsObject, IsPrimeOrdersPcgs, + IsList, IsFunction ], 0, function( G, D, d, e, pcgs, oprs, opr ) local dset, eset; @@ -316,19 +319,17 @@ end ); #M StabilizerOp( , , , , , ) . . . . . . based on pcgs ## InstallMethod( StabilizerOp, - "G, D, pnt, pcgs, oprs, opr", true, - [ IsGroup, IsList, IsObject, IsPcgs, - IsList, - IsFunction ], 0, + "G, D, pnt, pcgs, oprs, opr, calling 'OrbitStabilizerOp'", true, + [ IsGroup, IsList, IsObject, IsPrimeOrdersPcgs, + IsList, IsFunction ], 0, function( G, D, pt, U, V, op ) return OrbitStabilizerOp( G, pt, U, V, op ).stabilizer; end ); InstallOtherMethod( StabilizerOp, - "G, pnt, pcgs, oprs, opr", true, - [ IsGroup, IsObject, IsPcgs, - IsList, - IsFunction ], 0, + "G, pnt, pcgs, oprs, opr, calling 'OrbitStabilizerOp'", true, + [ IsGroup, IsObject, IsPrimeOrdersPcgs, + IsList, IsFunction ], 0, function( G, pt, U, V, op ) return OrbitStabilizerOp( G, pt, U, V, op ).stabilizer; end ); diff --git a/lib/oprtperm.gi b/lib/oprtperm.gi index 69f944594b..e3d2f9ea4a 100644 --- a/lib/oprtperm.gi +++ b/lib/oprtperm.gi @@ -7,16 +7,30 @@ Revision.oprtperm_gi := "@(#)$Id$"; + +############################################################################# +## +#V RANK_SOLV +## +## Some operations have methods for permutations that are expected to be +## more effective than possible methods that use a PCGS; +## these methods are usually applicable only for special arguments, +## and call `TryNextMethod' in other cases. +## We install the methods with incremental rank `RANK_SOLV'. +## +RANK_SOLV := RankFilter( IsSolvableGroup ); + + ############################################################################# ## #M Orbit( , , , , ) . . . . . . . on integers ## InstallOtherMethod( OrbitOp, - "G, int, gens, perms, opr", true, + "G, int, gens, perms, opr = `OnPoints'", true, [ IsPermGroup, IsInt, IsList, IsList, - IsFunction ], 0, + IsFunction ], RANK_SOLV, function( G, pnt, gens, oprs, opr ) if gens <> oprs or opr <> OnPoints then TryNextMethod(); @@ -37,7 +51,7 @@ InstallOtherMethod( OrbitStabilizerOp, [ IsPermGroup, IsInt, IsList, IsList, - IsFunction ], 0, + IsFunction ], RANK_SOLV, function( G, pnt, gens, oprs, opr ) local S; @@ -64,7 +78,7 @@ InstallMethod( OrbitsOp, [ IsGroup, IsList and IsCyclotomicsCollection, IsList, IsList and IsPermCollection, - IsFunction ], 0, + IsFunction ], RANK_SOLV, function( G, D, gens, oprs, opr ) if opr <> OnPoints then TryNextMethod(); @@ -78,7 +92,7 @@ end ); ## InstallOtherMethod( CycleOp, "perm, int, opr", true, - [ IsPerm, IsInt, IsFunction ], 0, + [ IsPerm, IsInt, IsFunction ], RANK_SOLV, function( g, pnt, opr ) if opr <> OnPoints then TryNextMethod(); @@ -92,7 +106,7 @@ end ); ## InstallOtherMethod( CycleLengthOp, "perm, int, opr", true, - [ IsPerm, IsInt, IsFunction ], 0, + [ IsPerm, IsInt, IsFunction ], RANK_SOLV, function( g, pnt, opr ) if opr <> OnPoints then TryNextMethod(); @@ -109,7 +123,7 @@ InstallMethod( BlocksOp, [ IsGroup, IsList and IsCyclotomicsCollection, IsList and IsEmpty, IsList, IsList and IsPermCollection, - IsFunction ], 0, + IsFunction ], RANK_SOLV, function( G, D, noseed, gens, oprs, opr ) local blocks, # block system of , result orbit, # orbit of 1 under @@ -394,7 +408,7 @@ InstallMethod( BlocksOp, IsList and IsCyclotomicsCollection, IsList, IsList and IsPermCollection, - IsFunction ], 0, + IsFunction ], RANK_SOLV, function( G, D, seed, gens, oprs, opr ) local blks, # list of blocks, result rep, # representative of a point @@ -500,18 +514,357 @@ InstallMethod( BlocksOp, return Immutable( Set( blks ) ); end ); +############################################################################# +## +#M MinimalBlocks( , , , , ) +## Adaptation of the code for BlocksNoSeed to return _all_ minimal blocks +## containing D[1]. +## By Graham Sharp (Oxford), August 1997 +## +InstallOtherMethod( MinimalBlocksOp, + "G, domain, gens, perms, opr", true, + [ IsGroup, IsList and IsCyclotomicsCollection, + IsList, + IsList and IsPermCollection, + IsFunction ], RANK_SOLV, +function( G, D, gens, oprs, opr ) +local blocks, # block system of , result + orbit, # orbit of 1 under + trans, # factored inverse transversal for + eql, # ' = []' means $\beta(i) = \beta(k)$, + next, # the points that are equivalent are linked + last, # last point on the list linked through 'next' + leq, # ' = []' means $\beta(i) <= \beta(k)$ + gen, # one generator of or 'Stab(,1)' + rnd, # random element of + pnt, # one point in an orbit + img, # the image of under + cur, # the current representative of an orbit + rep, # the representative of a block in the block system + block, # the block, result + changed, # number of random Schreier generators + nrorbs, # number of orbits of subgroup $H$ of $G_1$ + i, # loop variable + minblocks, # set of minimal blocks, result + poss, # flag to indicate whether we might have a block + iter, # which points we've checked when + start; # index of first cur for this iteration (non-dec) + + if opr<>OnPoints then + TryNextMethod(); + fi; + + # handle trivial domain + if Length( D ) = 1 or IsPrime( Length( D ) ) then + return Immutable([ D ]); + fi; + + # handle trivial group + if Length( oprs )=0 then + Error(" must operate transitively on "); + fi; + + # compute the orbit of $G$ and a factored transversal + orbit := [ D[1] ]; + trans := []; + trans[ D[1] ] := (); + for pnt in orbit do + for gen in oprs do + if not IsBound( trans[ pnt / gen ] ) then + Add( orbit, pnt / gen ); + trans[ pnt / gen ] := gen; + fi; + od; + od; + + # check that the group is transitive + if Length( orbit ) <> Length( D ) then + Error(" must operate transitively on "); + fi; + Info(InfoOperation,1,"MinimalBlocks transversal computed"); + nrorbs := Length( orbit ); + + # since $i \in k^{G_1}$ implies $\beta(i)=\beta(k)$, we initialize + # so that the connected components are orbits of some subgroup $H < G_1$ + eql := []; + leq := []; + next := []; + last := []; + iter := []; + for pnt in orbit do + eql[pnt] := pnt; + leq[pnt] := pnt; + next[pnt] := 0; + last[pnt] := pnt; + iter[pnt] := 0; + od; + + # repeat until we run out of points + minblocks := []; + changed := 0; + rnd := (); + + for start in orbit{[2..Length(D)]} do + + # repeat until we have a block system + cur := start; + # unless this is a new point, ignore and go on to the next + # -we could do this by a linked list to avoid these checks but the + # O(n) overheads involved in setting it up are greater than those saved + if iter[cur] = 0 then + + repeat + + # compute such an $H$ by taking random Schreier generators of $G_1$ + # and stop if 2 successive generators dont change the orbits any + # more + while changed < 2 do + + # compute a random Schreier generator of $G_1$ + i := Length( orbit ); + while 1 <= i do + rnd := rnd * Random( oprs ); + i := QuoInt( i, 2 ); + od; + gen := rnd; + while D[1] ^ gen <> D[1] do + gen := gen * trans[ D[1] ^ gen ]; + od; + changed := changed + 1; + + # compute the image of every point under + for pnt in orbit do + img := pnt ^ gen; + + # find the representative of the orbit of + while eql[pnt] <> pnt do + pnt := eql[pnt]; + od; + + # find the representative of the orbit of + while eql[img] <> img do + img := eql[img]; + od; + + # if the don't agree merge their orbits + if pnt < img then + eql[img] := pnt; + next[ last[pnt] ] := img; + last[pnt] := last[img]; + nrorbs := nrorbs - 1; + changed := 0; + elif img < pnt then + eql[pnt] := img; + next[ last[img] ] := pnt; + last[img] := last[pnt]; + nrorbs := nrorbs - 1; + changed := 0; + fi; + + od; + + od; + Info(InfoOperation,1,"MinimalBlocks ", + "number of orbits of < _1 is ",nrorbs); + + # take arbitrary point , and an element taking 1 to + while eql[cur] <> cur do + cur := eql[cur]; + od; + # Mark the points in this new H-orbit as visited + if iter[cur] <> start then + img := cur; + while img <> 0 do + iter[img] := start; + img := next[img]; + od; + fi; + gen := []; + img := cur; + while img <> D[1] do + Add( gen, trans[img] ); + img := img ^ trans[img]; + od; + gen := Reversed( gen ); + + # compute an alleged block as orbit of 1 under $< H, gen >$ + pnt := cur; + poss := true; + while pnt <> 0 do + + # compute the representative of the block containing the image + img := pnt; + for i in gen do + img := img / i; + od; + while eql[img] <> img do + img := eql[img]; + od; + + # if its not our current block but a new block + if img <> D[1] and img <> cur and leq[img] = img + and (iter[img] = 0 or iter[img] = start) then + + # then try as a new start + leq[cur] := img; + cur := img; + if iter[cur] <> start then + img := cur; + while img <> 0 do + iter[img] := start; + img := next[img]; + od; + fi; + gen := []; + img := cur; + while img <> D[1] do + Add( gen, trans[img] ); + img := img ^ trans[img]; + od; + gen := Reversed( gen ); + pnt := cur; + + # otherwise if its not our current block but contains it + # by construction a nonminimal block contains the current block + # - not any more it doesn't! Now we also have to check whether + # the block appeared this time or earlier. + elif img <> D[1] and img <> cur + and leq[img] <> img and iter[img] = start then + + # then merge all blocks it contains with + while img <> cur do + eql[img] := cur; + next[ last[cur] ] := img; + last[ cur ] := last[ img ]; + img := leq[img]; + while img <> eql[img] do + img := eql[img]; + od; + od; + pnt := next[pnt]; + + # else if the block appeared in a previous iteration + elif iter[img] <> start and iter[img] <> 0 then + + # then end this iteration as this is not a minimal block + pnt := 0; + poss := false; + + # otherwise go on to the next point in the orbit + else + + pnt := next[pnt]; + + fi; + + od; + + # Skip this bit if we know we haven't got a block + if poss = true then + # make the alleged block + block := [ D[1] ]; + pnt := cur; + while pnt <> 0 do + Add( block, pnt ); + pnt := next[pnt]; + od; + block := Set( block ); + blocks := [ block ]; + Info(InfoOperation,1,"MinimalBlocks ", + "length of alleged block is ",Length(block)); + + # quick test to see if the group is primitive + if Length( block ) = Length( orbit ) then + Info(InfoOperation,1,"MinimalBlocks is primitive"); + return Immutable([ D ]); + fi; + + # quick test to see if the orbit can be a block + if Length( orbit ) mod Length( block ) <> 0 then + Info(InfoOperation,1,"MinimalBlocks ", + "alleged block is clearly not a block"); + changed := -1000; + fi; + + # '[]' is the representative of the block containing + rep := []; + for pnt in orbit do + rep[pnt] := 0; + od; + for pnt in block do + rep[pnt] := 1; + od; + + # compute the block system with an orbit algorithm + i := 1; + while 0 <= changed and i <= Length( blocks ) do + + # loop over the generators + for gen in oprs do + + # compute the image of the block under the generator + img := OnSets( blocks[i], gen ); + + # if this block is new + if rep[ img[1] ] = 0 then + + # add the new block to the list of blocks + Add( blocks, img ); + + # check that all points in the image are new + for pnt in img do + if rep[pnt] <> 0 then + Info(InfoOperation,1, + "MinimalBlocks, alleged block is not a block"); + changed := -1000; + fi; + rep[pnt] := img[1]; + od; + + # if this block is old + else + + # check that all points in the image lie in the block + for pnt in img do + if rep[pnt] <> rep[img[1]] then + Info(InfoOperation,1, + "MinimalBlocks , alleged block is not a block"); + changed := -1000; + fi; + od; + + fi; + + od; + + # on to the next block in the orbit + i := i + 1; + od; + fi; + + until 0 <= changed; + if poss = true then AddSet(minblocks, block); fi; + + # loop back to get another minimal block + fi; + od; + + # return the block system + return Immutable(minblocks); +end); + ############################################################################# ## -#M Earns( , ) . . . . . . . . . . earns of affine primitive group +#M Earns( , ) . . . . . . . . . . . . earns of affine primitive group ## InstallMethod( EarnsOp, "G, ints, gens, perms, opr", true, [ IsPermGroup, IsList, IsList, IsList, - IsFunction ], 0, - function( G, Omega, gens, oprs, opr ) + IsFunction ], RANK_SOLV, + function( G, D, gens, oprs, opr ) local pcgs, n, fac, p, d, alpha, beta, G1, G2, orb, Gamma, M, C, f, P, Q, Q0, R, R0, pre, gen, g, ord, pa, a, x, y, z; @@ -520,10 +873,10 @@ InstallMethod( EarnsOp, TryNextMethod(); fi; - n := Length( Omega ); + n := Length( D ); if not IsPrimePowerInt( n ) then return fail; - elif not IsPrimitive( G, Omega ) then + elif not IsPrimitive( G, D ) then TryNextMethod(); fi; @@ -550,14 +903,14 @@ InstallMethod( EarnsOp, fi; # If is not a Frobenius group ... - for orb in Orbits( G1, Omega ) do + for orb in Orbits( G1, D ) do beta := orb[ 1 ]; if beta <> alpha then G2 := Stabilizer( G1, beta ); if not IsTrivial( G2 ) then - Gamma := Filtered( Omega, p -> ForAll( GeneratorsOfGroup( G2 ), + Gamma := Filtered( D, p -> ForAll( GeneratorsOfGroup( G2 ), g -> p ^ g = p ) ); - if not IsPrimePowerInt( Length( Gamma ) ) then + if Set( FactorsInt( Length( Gamma ) ) ) <> [ p ] then return fail; fi; C := Centralizer( G, G2 ); @@ -597,14 +950,14 @@ InstallMethod( EarnsOp, fi; R := ClosureGroup( Q, gens ); - R0 := OmegaPN( R, p, 1 ); + R0 := OmegaOp( R, p, 1 ); y := First( GeneratorsOfGroup( R0 ), - y -> not # y in Q = Centre(G2) + y -> not # y in Q = Centre(G2)_p ( alpha ^ y = alpha and beta ^ y = beta and ForAll( GeneratorsOfGroup( G2 ), gen -> gen ^ y = gen ) ) ); - Q0 := OmegaPN( Q, p, 1 ); + Q0 := OmegaOp( Q, p, 1 ); for z in Q0 do M := SolvableNormalClosurePermGroup( G, [ y * z ] ); if M <> fail and Size( M ) = n then @@ -634,7 +987,7 @@ InstallMethod( TransitivityOp, [ IsPermGroup, IsList and IsCyclotomicsCollection, IsList, IsList, - IsFunction ], 0, + IsFunction ], RANK_SOLV, function( G, D, gens, oprs, opr ) if gens <> oprs or opr <> OnPoints then TryNextMethod(); @@ -658,7 +1011,7 @@ InstallMethod( IsSemiRegularOp, [ IsGroup, IsList and IsCyclotomicsCollection, IsList, IsList and IsPermCollection, - IsFunction ], 0, + IsFunction ], RANK_SOLV, function( G, D, gens, oprs, opr ) local used, # perm, # @@ -785,7 +1138,7 @@ end ); #M RepresentativeOperation( , , , ) . . . . . for perm groups ## InstallOtherMethod( RepresentativeOperationOp, true, [ IsPermGroup, - IsObject, IsObject, IsFunction ], 0, + IsObject, IsObject, IsFunction ], RANK_SOLV, function ( G, d, e, opr ) local rep, # representative, result r, # slice of the representative @@ -882,7 +1235,7 @@ InstallOtherMethod( StabilizerOp, [ IsPermGroup, IsObject, IsList, IsList, - IsFunction ], 0, + IsFunction ], RANK_SOLV, function( G, d, gens, oprs, opr ) local K, # stabilizer , result S, base; @@ -955,13 +1308,6 @@ local S,j; return GroupStabChain(G,S.stabilizer,true); end; -############################################################################# -## -## Local Variables: -## mode: outline-minor -## outline-regexp: "#[WCROAPMFVE]" -## fill-column: 77 -## End: ############################################################################# ## diff --git a/lib/partitio.gi b/lib/partitio.gi index 2e6b2d21b2..86b0792181 100644 --- a/lib/partitio.gi +++ b/lib/partitio.gi @@ -17,36 +17,6 @@ ## which is in cell ## lengths: a list of the cell lengths ## -## This file also contains the general partition backtracking function. -## -#H $Log$ -#H Revision 4.7 1997/06/06 12:16:40 htheisse -#H used `ListWithIdenticalEntries' -#H -#H Revision 4.6 1997/05/28 13:19:40 fceller -#H changed 'DeepCopy' to 'StructuralCopy' -#H -#H Revision 4.5 1997/01/20 17:00:26 htheisse -#H re-introduced `generators' -#H -#H Revision 4.4 1996/12/19 09:59:10 htheisse -#H added revision lines -#H -#H Revision 4.3 1996/11/27 15:32:56 htheisse -#H replaced `Copy' by `StructuralCopy' -#H -#H Revision 4.2 1996/11/21 16:50:50 htheisse -#H allowed stabilizer chains as arguments for `OrbitsPartition' -#H -#H Revision 4.1 1996/09/23 16:47:37 htheisse -#H added files for permutation groups (incl. backtracking) -#H stabiliser chains -#H group homomorphisms (of permutation groups) -#H operation homomorphisms -#H polycyclic generating systems of soluble permutation groups -#H (general concept tentatively) -#H -## Revision.partitio_gi := "@(#)$Id$"; @@ -60,7 +30,13 @@ Partition := function( list ) P := rec( points := Concatenation( list ), firsts := [ ], lengths := [ ] ); - P.cellno := ListWithIdenticalEntries( Maximum( P.points ), 0 ); + + if Length(list)>0 then + P.cellno := ListWithIdenticalEntries( Maximum( P.points ), 0 ); + else + Info(InfoWarning,2,"empty partition created!"); + P.cellno:=[]; + fi; i := 1; for c in [ 1 .. Length( list ) ] do if Length( list[ c ] ) = 0 then @@ -136,6 +112,9 @@ end; ## #F Fixcells(

) . . . . . . . . . . . . . . . . . . . . fixcells as list ## +## Returns a list of the points along in their cell, ordered as these cells +## are ordered +## Fixcells := function( P ) local fix, i; @@ -150,7 +129,17 @@ end; ############################################################################# ## -#F SplitCell(

, , , , ) . . . . . . . . . . . split a cell +#F SplitCell(

, , , , , ) . . . . . . . . split a cell +## +## Splits

[ ], by taking out all the points that are also contained +## in [ ] ^ g. The new cell is appended to

unless it would be +## empty. If the old cell would remain empty, nothing is changed either. +## +## Returns the length of the new cell, or `false' if nothing was changed. +## +## Shortcuts of the splitting algorithm: If the last argument is +## `true', at least one point will move out. If is a number, at most +## points will move out. ## SplitCell := function( P, i, Q, j, g, out ) local a, b, l, B, tmp, m, x, k; @@ -174,23 +163,37 @@ SplitCell := function( P, i, Q, j, g, out ) if out <> true then B := l - out; else B := 0; fi; if B > 0 then + + # Points left of remain in the cell, points right of move + # out. while a < b do + + # Decrease until a point remains in the cell. repeat b := b - 1; + + # $b < B$ means that more than points move out. if b < B then return false; fi; + until Q[ P.points[ b ] ^ g ] <> j; + + # Increase until a point moved out. repeat a := a + 1; until Q[ P.points[ a ] ^ g ] = j; + + # Swap the points. if a < b then tmp := P.points[ a ]; P.points[ a ] := P.points[ b ]; P.points[ b ] := tmp; fi; + od; - else + + else # Same as above, but without $b < B$ check. while a < b do repeat b := b - 1; @@ -220,6 +223,12 @@ end; ## #F IsolatePoint(

, ) . . . . . . . . . . . . . . . . isolate a point ## +## Takes point out of its cell in

, putting it into a new cell, which +## is appended to

. However, does nothing, if was already isolated. +## +## Returns the number of the cell from was taken out, or `false' if +## nothing was changed. +## IsolatePoint := function( P, a ) local i, pos, l, m; @@ -245,6 +254,17 @@ end; ## #F UndoRefinement(

) . . . . . . . . . . . . . . . . . undo a refinement ## +## Undoes the effect of the last cell-splitting actually performed by +## `SplitCell' or `IsolatePoint'. (This means that if the last call of such +## a function had no effect, `UndoRefinement' looks at the second-last etc.) +## This fuses the last cell of

with an earlier cell. +## +## Returns the number of the cell with which the last cell was fused, or +## `false' if the last cell starts at `

.points[1]', because then it +## cannot have been split off. +## +## May behave undefined if there was no splitting before. +## UndoRefinement := function( P ) local M, m; @@ -253,6 +273,7 @@ UndoRefinement := function( P ) return false; fi; + # Fuse the last cell with the one stored before it in `

.points'. m := P.cellno[ P.points[ P.firsts[ M ] - 1 ] ]; P.lengths[ m ] := P.lengths[ m ] + P.lengths[ M ]; P.cellno{ P.points @@ -282,6 +303,8 @@ end; ## #F FixpointCellNo(

, ) . . . . . . . . . fixpoint from cell no. ## +## Returns the first point of

[ ] (should be a one-point cell). +## FixpointCellNo := function( P, i ) return P.points[ P.firsts[ i ] ]; end; @@ -290,6 +313,11 @@ end; ## #F FixcellPoint(

, ) . . . . . . . . . . . . . . . . . . . . local ## +## Returns a random cell number which is not yet contained in and has +## length 1. +## +## Adds this cell number to . +## FixcellPoint := function( P, old ) local lens, poss, p; @@ -309,6 +337,11 @@ end; ## #F FixcellsCell(

, , , ) . . . . . . . . . . . local ## +## Returns [ , ] such that for j=1,...|K|=|I|, all points in cell +##

[ [j] ], mapped with have value [j] in (i.e., +## lie in cell [j] of a partition whose `cellno' entry is ). +## Returns `false' if and are empty. +## FixcellsCell := function( P, cellno, conj, old ) local K, I, i, k, start; @@ -371,6 +404,12 @@ end; ## #F CollectedPartition(

, ) . orbits on cells under group of ## +## Returns a partition into unions of cells of

of equal length, sorted +## by this length. However, if there are $n$ cells of equal length, which +## cannot be fused under the action of a group of order (because $n$ +## < SmallestPrimeDivisor( )), leaves these $n$ cells unfused. +## ( = 1 suppresses this extra feature.) +## CollectedPartition := function( P, size ) local lens, C, div, typ, p, i; diff --git a/lib/pcgs.gd b/lib/pcgs.gd index 2e5a882c42..34a26bc202 100644 --- a/lib/pcgs.gd +++ b/lib/pcgs.gd @@ -337,6 +337,15 @@ IsGenericPcgs := NewProperty( "IsGenericPcgs", IsPcgs ); SetIsGenericPcgs := Setter( IsGenericPcgs ); HasIsGenericPcgs := Tester( IsGenericPcgs ); + +############################################################################# +## +#F PcgsByIndependentGeneratorsOfAbelianGroup( ) +## +PcgsByIndependentGeneratorsOfAbelianGroup := NewOperationArgs + ( "PcgsByIndependentGeneratorsOfAbelianGroup" ); + + ############################################################################# ## diff --git a/lib/pcgs.gi b/lib/pcgs.gi index 7bb72c843c..f34f795292 100644 --- a/lib/pcgs.gi +++ b/lib/pcgs.gi @@ -20,6 +20,34 @@ Revision.pcgs_gi := InstallMethod( IsPcgsComputable, true, [ IsGroup ], 0, ReturnFalse ); +############################################################################# +## +#M Pcgs( ) . . . . . . . . from independent generators of abelian group +## +PcgsByIndependentGeneratorsOfAbelianGroup := function( A ) + local pcgs, pcs, rel, gen, f; + + pcs := [ ]; + rel := [ ]; + for gen in IndependentGeneratorsOfAbelianGroup( A ) do + for f in FactorsInt( Order( gen ) ) do + Add( pcs, gen ); + Add( rel, f ); + gen := gen ^ f; + od; + od; + pcgs := PcgsByPcSequenceNC( FamilyObj( One( A ) ), pcs ); + SetOneOfPcgs( pcgs, One( A ) ); + SetRelativeOrders( pcgs, rel ); + SetIsPrimeOrdersPcgs( pcgs, true ); + return pcgs; +end; + +InstallMethod( Pcgs, "from independent generators of abelian group", true, + [ IsGroup and IsAbelian and HasIndependentGeneratorsOfAbelianGroup ], 0, + PcgsByIndependentGeneratorsOfAbelianGroup ); + + ############################################################################# ## #M SetPcgs( , fail ) . . . . . . . . . . . . . . . . . never set `fail' diff --git a/lib/pcgscomp.gi b/lib/pcgscomp.gi index 409f24d45b..fd49a888e0 100644 --- a/lib/pcgscomp.gi +++ b/lib/pcgscomp.gi @@ -110,12 +110,17 @@ end ); InstallMethod( Pcgs, "generic method using CompositionSeries", true, - [ IsGroup and IsFinite ], - 0, +#T Why was 'IsFinite' required here? This gave this method a higher value it +#T deserved + [ IsGroup],0, function( grp ) local series, pcgs, orders, i, elm, o; + if HasIsFinite(grp) and not IsFinite(grp) then + Error("requires group to be finite!"); + fi; + series := CompositionSeries(grp); pcgs := []; orders := []; diff --git a/lib/pcgsnice.gi b/lib/pcgsnice.gi index 170fde9278..9b3309509a 100644 --- a/lib/pcgsnice.gi +++ b/lib/pcgsnice.gi @@ -5,6 +5,11 @@ #H @(#)$Id$ ## #H $Log$ +#H Revision 4.3 1997/10/14 10:36:09 ahulpke +#H Moved the generic method for 'Pcgs' (which got too high due to the Value for +#H 'IsFinite') down in the hierarchy. Added some installation messages. Told +#H automorphism groups to be finite. AH +#H #H Revision 4.2 1997/04/09 07:05:18 htheisse #H added flag `IsPrimeOrdersPcgs' for pcgs by nice monomorphisms #H @@ -19,7 +24,8 @@ Revision.pcgsnice_gi := ## #M Pcgs( ) . . . . . . . . . . . . . . . . . . . . via nice monomorphism ## -InstallMethod( Pcgs, true, [ IsGroup and IsHandledByNiceMonomorphism ], 0, +InstallMethod( Pcgs, "via niceomorphism", true, + [ IsGroup and IsHandledByNiceMonomorphism ], 0, function( G ) local nice, npcgs, pcgs; @@ -93,7 +99,7 @@ end ); ## #M ExponentOfPcElement( , , ) . . . . . via nice monomorphism ## -InstallMethod( ExponentOfPcElement, true, +InstallMethod( ExponentOfPcElement, "via nicoemorphism", true, [ IsPcgs and IsHandledByNiceMonomorphism, IsMultiplicativeElementWithInverse, IsPosRat and IsInt ], 0, diff --git a/lib/pcgspcg.gi b/lib/pcgspcg.gi index 1850d56b8d..1848b04a3d 100644 --- a/lib/pcgspcg.gi +++ b/lib/pcgspcg.gi @@ -695,6 +695,49 @@ function( pcgs, elm ) return led; end ); +############################################################################# +## + +#M Order( ) . . . . . . . . . . . . . . . . . . order of a pc-element +## + +############################################################################# +InstallMethod( Order, + "method for a pc-element", + HasDefiningPcgs, + [ IsMultiplicativeElementWithOne ], 3, + function( g ) + local pcgs, rorders, one, ord, d, rord; + + pcgs := DefiningPcgs( FamilyObj( g ) ); + rorders := RelativeOrders( pcgs ); + + one := g^0; + ord := 1; + + if IsPrimeOrdersPcgs( pcgs ) then + while g <> one do + d := DepthOfPcElement( pcgs, g ); + rord := rorders[ d ]; + ord := ord * rord; + g := g^rord; + od; + else + while g <> one do + d := DepthOfPcElement( pcgs, g ); + if not IsBound( rorders[d] ) or rorders[ d ] = 0 then + return infinity; + fi; + rord := rorders[ d ]; + rord := rord / Gcd( ExponentOfPcElement( pcgs, g, d ), rord ); + ord := ord * rord; + g := g^rord; + od; + fi; + return ord; +end ); + + ############################################################################# ## diff --git a/lib/pcgsperm.gi b/lib/pcgsperm.gi index c5dfd41f19..95777890bc 100644 --- a/lib/pcgsperm.gi +++ b/lib/pcgsperm.gi @@ -584,9 +584,9 @@ end; ############################################################################# ## -#F PcGroupPcgs( , , ) . . . . . . pcp group from pcgs +#F PcGroupPcgs( , , ) . . pcp group from pcgs ## -PcGroupPcgs := function( pcgs, index, isNilp ) +PcGroupPcgs := function( pcgs, index, isPcgsCentral ) local m, sc, gens, p, start, i, i2, n, n2; m := Length( pcgs ); @@ -609,7 +609,7 @@ PcGroupPcgs := function( pcgs, index, isNilp ) for i in [ 1 .. Length( index ) - 1 ] do for n in [ index[ i ] .. index[ i + 1 ] - 1 ] do for i2 in [ 1 .. i - 1 ] do - if isNilp then + if isPcgsCentral then start := index[ i + 1 ]; gens := GeneratorsOfRws( sc ){ [ start .. m ] }; for n2 in [ index[ i2 ] .. index[ i2 + 1 ] - 1 ] do @@ -774,7 +774,8 @@ InstallMethod( IsPcgsComputable, true, [ IsPermGroup ], 0, ReturnFalse ); ## #M Pcgs( ) . . . . . . . . . . . . . . . . . . . . pcgs for perm groups ## -InstallMethod( Pcgs, "Sims's method", true, [ IsPermGroup ], 0, +InstallMethod( Pcgs, "Sims's method", true, [ IsPermGroup ], + 100, # to override method ``from independent generators'' function( G ) local pcgs; @@ -784,7 +785,7 @@ InstallMethod( Pcgs, "Sims's method", true, [ IsPermGroup ], 0, end ); InstallMethod( Pcgs, "tail of perm pcgs", true, - [ IsMemberPcSeriesPermGroup ], 0, + [ IsMemberPcSeriesPermGroup ], 100, PcgsMemberPcSeriesPermGroup ); ############################################################################# @@ -1029,7 +1030,7 @@ end ); ## #M NaturalHomomorphismByNormalSubgroup( , ) . . for solvable factors ## -InstallMethod( NaturalHomomorphismByNormalSubgroup, IsIdentical, +InstallMethod( NaturalHomomorphismByNormalSubgroupOp, IsIdentical, [ IsPermGroup, IsPermGroup ], 0, function( G, N ) local map, pcgs, A; diff --git a/lib/pcgsspec.gi b/lib/pcgsspec.gi index 632ba2324f..906b906fac 100644 --- a/lib/pcgsspec.gi +++ b/lib/pcgsspec.gi @@ -80,12 +80,14 @@ end; #F PcgsSystemWithWf( ) ## PcgsSystemWithWf := function( pcgs, wf ) - local m, list, weights, work, nilp, h, i, j, g, S, + local ppcgs, m, list, weights, work, nilp, h, i, j, g, S, pos, s, wt, newpcgs, wset, layers, first; + + ppcgs := PrimePowerPcSequence( pcgs ); # initialise m := Length( pcgs ); - list := PrimePowerPcSequence( pcgs ); + list := ShallowCopy( ppcgs ); weights := List( list, x -> wf.one( pcgs, x ) ); work := List( [1..m], x -> List( [1..x], y -> true ) ); @@ -142,8 +144,14 @@ PcgsSystemWithWf := function( pcgs, wf ) # sort SortParallel( weights, list ); - # compute pcgs - newpcgs := PcgsByPcSequenceNC( FamilyObj(OneOfPcgs(pcgs)), list ); + # compute pcgs - be careful! + if ppcgs = AsList( pcgs ) and + ForAll( [1..m], x -> DepthOfPcElement(pcgs, list[x]) = x ) + then + newpcgs := pcgs; + else + newpcgs := PcgsByPcSequenceNC( FamilyObj(OneOfPcgs(pcgs)), list ); + fi; # set up layers wset := Set( weights ); @@ -158,18 +166,10 @@ PcgsSystemWithWf := function( pcgs, wf ) od; Add( first, m+1 ); - # check the induced case - if ForAll( [1..m], x -> DepthOfPcElement(pcgs, list[x]) = x ) then - return rec( pcgs := pcgs, - weights := weights, - layers := layers, - first := first ); - else - return rec( pcgs := newpcgs, - weights := weights, - layers := layers, - first := first ); - fi; + return rec( pcgs := newpcgs, + weights := weights, + layers := layers, + first := first ); end; @@ -329,7 +329,7 @@ PcgsSystemWithHallSystem := function( pcgssys ) m := Length( pcgssys.pcgs ); F := FamilyObj(OneOfPcgs(pcgssys.pcgs)); - # find starting index + # find starting index n := m; while 1 <= n and pcgssys.weights[n][1] = pcgssys.weights[m][1] do n := n - 1; @@ -558,6 +558,13 @@ end; #M SpecialPcgs( ) ## +InstallMethod( SpecialPcgs, + "method for special pcgs", + true, + [ IsSpecialPcgs ], + 0, pcgs -> pcgs ); + + InstallMethod( SpecialPcgs, "generic method for pcgs", true, diff --git a/lib/process.gd b/lib/process.gd index 820812e695..1081f00ad5 100644 --- a/lib/process.gd +++ b/lib/process.gd @@ -14,6 +14,7 @@ Revision.process_gd := ############################################################################# ## + #O Process(

, , , , ) . . . . . . start a process ## Process := NewOperation( @@ -26,32 +27,24 @@ Process := NewOperation( #F Exec . . . . . . . . . . . . . . . . . . . . . . . . . execute a command ## Exec := function( arg ) - local cmd, shell, dir, out; - - if not Length( arg ) in [1,2] then - return Error( "usage: Exec( [, ] )" ); - fi; + local cmd, i, shell, dir; + # simply concatenate the arguments cmd := arg[1]; + for i in [ 2 .. Length(arg) ] do + Append( cmd, " " ); + Append( cmd, arg[i] ); + od; - ## Select the shell, bourne shell is the default. - if Length( arg ) = 1 then - shell := Filename( DirectoriesSystemPrograms(), "sh" ); - else - shell := Filename( DirectoriesSystemPrograms(), arg[2] ); - fi; + # select the shell, bourne shell is the default + shell := Filename( DirectoriesSystemPrograms(), "sh" ); - ## Execute in the current directory. + # execute in the current directory dir := DirectoryCurrent(); - ## Output goes to standard out. - out := OutputTextFile( "*stdout*", false ); - - ## Execute the command. - Process( dir, shell, InputTextNone(), out, [ "-c", cmd ] ); + # execute the command + Process( dir, shell, InputTextUser(), OutputTextUser(), [ "-c", cmd ] ); - ## Close the output stream. - CloseStream( out ); end; diff --git a/lib/read1.g b/lib/read1.g index 23a4361c76..eee1f37e8b 100644 --- a/lib/read1.g +++ b/lib/read1.g @@ -14,6 +14,7 @@ ReadLib( "function.g" ); ReadLib( "object.gd" ); ReadLib( "coll.gd" ); ReadLib( "list.gd" ); +ReadLib( "wpobj.gd" ); ReadLib( "arith.gd" ); ReadLib( "ffe.gd" ); @@ -29,6 +30,7 @@ ReadLib( "record.g" ); ReadLib( "ffe.g" ); ReadLib( "arith.gi" ); ReadLib( "list.g" ); +ReadLib( "wpobj.g" ); ReadLib( "permutat.g" ); ReadLib( "object.gi" ); diff --git a/lib/read3.g b/lib/read3.g index cae01fd70f..40b1aa1e4b 100644 --- a/lib/read3.g +++ b/lib/read3.g @@ -88,6 +88,11 @@ ReadLib( "ghom.gd" ); ReadLib( "ghompcgs.gd" ); ReadLib( "gprd.gd" ); ReadLib( "ghomperm.gd" ); +ReadLib( "gpprmsya.gd" ); + +# family predicates (needed for all 'InstallMethod' and oprt.gd) +ReadLib( "fampred.g" ); + ReadLib( "oprt.gd" ); ReadLib( "stbc.gd" ); ReadLib( "clas.gd" ); @@ -106,6 +111,7 @@ ReadLib( "grppcfp.gd"); ReadLib( "morpheus.gd" ); ReadLib( "grplatt.gd" ); ReadLib( "oprtglat.gd" ); +ReadLib( "grppclat.gd" ); # files dealing with fp groups @@ -122,10 +128,8 @@ ReadLib( "hash.gd" ); ReadLib( "dt.g" ); -# family predicates (needed for all 'InstallMethod') -ReadLib( "fampred.g" ); - ReadLib( "list.gi" ); # was too early +ReadLib( "wpobj.gi" ); # files dealing with nice monomorphism diff --git a/lib/read5.g b/lib/read5.g index 53f047422c..b2fb805df1 100644 --- a/lib/read5.g +++ b/lib/read5.g @@ -120,8 +120,9 @@ ReadLib( "ghompcgs.gi" ); ReadLib( "gprd.gi" ); ReadLib( "ghomperm.gi" ); ReadLib( "grpperm.gi" ); +ReadLib( "gpprmsya.gi" ); ReadLib( "gprdperm.gi" ); -ReadLib( "gprdpc.gi" ); +ReadLib( "gprdpc.gi" ); ReadLib( "oprt.gi" ); ReadLib( "oprtperm.gi" ); ReadLib( "oprtpcgs.gi" ); @@ -155,6 +156,7 @@ ReadLib( "grpnice.gi" ); ReadLib( "morpheus.gi" ); ReadLib( "grplatt.gi" ); ReadLib( "oprtglat.gi" ); +ReadLib( "grppclat.gi" ); ReadLib( "grppcaut.gi" ); diff --git a/lib/ring.gd b/lib/ring.gd index 00c70c136a..eb7a09f66d 100644 --- a/lib/ring.gd +++ b/lib/ring.gd @@ -386,32 +386,18 @@ RightIdealNC := NewOperationArgs( "RightIdealNC" ); #O IsRightIdeal( , ) ## IsIdeal:= NewOperation( "IsIdeal", [ IsRing, IsRing ] ); -IsLeftIdeal:= NewOperation( "IsLeftIdeal", [ IsRing, IsRing ] ); -IsRightIdeal:= NewOperation( "IsRightIdeal", [ IsRing, IsRing ] ); - - -############################################################################# -## -#P IsLeftIdealInParent( ) -## -IsLeftIdealInParent := NewProperty( "IsLeftIdealInParent", IsRing ); +tmp:= InParentFOA( "IsLeftIdeal", IsRing, IsRing, NewProperty ); +IsLeftIdeal := tmp[1]; +IsLeftIdealOp := tmp[2]; +IsLeftIdealInParent := tmp[3]; SetIsLeftIdealInParent := Setter( IsLeftIdealInParent ); HasIsLeftIdealInParent := Tester( IsLeftIdealInParent ); - - -############################################################################# -## -#P IsRightIdealInParent( ) -## -IsRightIdealInParent := NewProperty( "IsRightIdealInParent", IsRing ); +tmp:= InParentFOA( "IsRightIdeal", IsRing, IsRing, NewProperty ); +IsRightIdeal := tmp[1]; +IsRightIdealOp := tmp[2]; +IsRightIdealInParent := tmp[3]; SetIsRightIdealInParent := Setter( IsRightIdealInParent ); HasIsRightIdealInParent := Tester( IsRightIdealInParent ); - - -############################################################################# -## -#P IsIdealInParent( ) -## IsIdealInParent := IsLeftIdealInParent and IsRightIdealInParent; SetIsIdealInParent := Setter( IsIdealInParent ); HasIsIdealInParent := Tester( IsIdealInParent ); diff --git a/lib/ring.gi b/lib/ring.gi index 464cd9b47f..9f42744fc5 100644 --- a/lib/ring.gi +++ b/lib/ring.gi @@ -1722,13 +1722,6 @@ InstallMethod( \=, end ); -############################################################################# -## -#M ``in parent'' attributes -## -InstallInParentMethod( IsLeftIdealInParent, IsRing, IsLeftIdeal ); -InstallInParentMethod( IsRightIdealInParent, IsRing, IsRightIdeal ); - ############################################################################# ## #E ring.gi . . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here diff --git a/lib/rwspcgrp.gi b/lib/rwspcgrp.gi index dc4deecaa6..a6ce8b9356 100644 --- a/lib/rwspcgrp.gi +++ b/lib/rwspcgrp.gi @@ -1077,9 +1077,6 @@ function( efam, gens, rels ) conjnp, conjnn, conflicts ); fi; - # give the system a chance to optimise itself - ReduceRules(col); - # check that the system is confluent e1 := ReducedOne(col); for rel in conflicts do diff --git a/lib/semigrp.gd b/lib/semigrp.gd index 3d9fd842d7..bd5b7f1993 100644 --- a/lib/semigrp.gd +++ b/lib/semigrp.gd @@ -27,7 +27,7 @@ HasIsSemigroup := Tester( IsSemigroup ); ## #A AsSemigroup( ) . . . . . . . . . . . . domain viewed as semigroup ## -AsSemigroup := NewAttribute( "AsSemigroup", IsMagma ); +AsSemigroup := NewAttribute( "AsSemigroup", IsCollection ); SetAsSemigroup := Setter( AsSemigroup ); HasAsSemigroup := Tester( AsSemigroup ); diff --git a/lib/semigrp.gi b/lib/semigrp.gi index 3e1a7c1ea9..e2777cfbf7 100644 --- a/lib/semigrp.gi +++ b/lib/semigrp.gi @@ -50,9 +50,36 @@ InstallMethod( SemigroupByGenerators, true, [ IsCollection ], 0, ############################################################################# ## -#M AsSemigroup( ) . . . . . . . . . . . view a semigroup as a semigroup +#M AsSemigroup( ) . . . . . . . . . . . domain , viewed as semigroup ## -InstallMethod( AsSemigroup, true, [ IsSemigroup ], 0, IdFunc ); +InstallMethod( AsSemigroup, true, [ IsSemigroup ], 100, IdFunc ); + +InstallMethod( AsSemigroup, + "generic method for collections", + true, + [ IsCollection ], 0, + function ( D ) + local S, L; + + D := AsListSorted( D ); + L := ShallowCopy( D ); + S := Submagma( SemigroupByGenerators( D ), [] ); + SubtractSet( L, AsListSorted( S ) ); + while not IsEmpty(L) do + S := ClosureMagmaDefault( S, L[1] ); + SubtractSet( L, AsListSorted( S ) ); + od; + if Length( AsListSorted( S ) ) <> Length( D ) then + return fail; + fi; + S := SemigroupByGenerators( GeneratorsOfSemigroup( S ) ); + SetAsListSorted( S, D ); + SetIsFinite( S, true ); + SetSize( S, Length( D ) ); + + # return the semigroup + return S; + end ); ############################################################################# @@ -68,7 +95,7 @@ Semigroup := function( arg ) # list of generators elif Length( arg ) = 1 and IsList( arg[1] ) and 0 < Length( arg[1] ) then - return SemigroupByGenerators( arg ); + return SemigroupByGenerators( arg[1] ); # generators elif 0 < Length( arg ) then diff --git a/lib/sgpres.gi b/lib/sgpres.gi index 37b7030bdb..5c38469a02 100644 --- a/lib/sgpres.gi +++ b/lib/sgpres.gi @@ -1159,6 +1159,7 @@ PresentationAugmentedCosetTable := function ( arg ) comps := [ 1 .. numgens ]; # define the remaining Tietze stack entries. + tietze[TZ_FREEGENS] := fgens; tietze[TZ_NUMGENS] := numgens; tietze[TZ_GENERATORS] := List( [ 1 .. numgens ], i -> fgens[i] ); tietze[TZ_INVERSES] := invs; @@ -2040,7 +2041,7 @@ end; ############################################################################# ## -#F SortRelsSortedByStartGen() sort the relators sorted by start gen +#M SortRelsSortedByStartGen() sort the relators sorted by start gen ## ## 'SortRelsSortedByStartGen' sorts the relators lists sorted by starting ## generator to get better results of the Reduced Reidemeister-Schreier diff --git a/lib/stbc.gd b/lib/stbc.gd index 2883b2e27c..a0812c594c 100644 --- a/lib/stbc.gd +++ b/lib/stbc.gd @@ -15,10 +15,6 @@ SmallestMovedPoint := NewAttribute( "SmallestMovedPoint", IsPermGroup ); SetSmallestMovedPoint := Setter( SmallestMovedPoint ); HasSmallestMovedPoint := Tester( SmallestMovedPoint ); -MovedPoints := NewAttribute( "MovedPoints", IsPermGroup ); -SetMovedPoints := Setter( MovedPoints ); -HasMovedPoints := Tester( MovedPoints ); - NrMovedPoints := NewAttribute( "NrMovedPoints", IsPermGroup ); SetNrMovedPoints := Setter( NrMovedPoints ); HasNrMovedPoints := Tester( NrMovedPoints ); diff --git a/lib/stbcbckt.gi b/lib/stbcbckt.gi index 620ad5f9cf..0c97cb01b5 100644 --- a/lib/stbcbckt.gi +++ b/lib/stbcbckt.gi @@ -87,9 +87,9 @@ end; IsSlicedPerm := NewRepresentation( "isSlicedPerm", IsPerm, [ "length", "word", "lftObj", "rgtObj", "opr" ] ); -InstallMethod( \^, true, [ IsPerm, IsSlicedPerm ], 0, +InstallMethod( \^, "sliced perm",true, [ IsPerm, IsSlicedPerm ], 0, function( p, perm ) return p ^ AsPerm( perm ); end ); -InstallMethod( \^, true, [ IsInt, IsSlicedPerm ], 0, +InstallMethod( \^, "sliced perm",true, [ IsInt, IsSlicedPerm ], 0, function( p, perm ) local i; @@ -99,7 +99,7 @@ InstallMethod( \^, true, [ IsInt, IsSlicedPerm ], 0, return p; end ); -InstallOtherMethod( \/, true, [ IsObject, IsSlicedPerm ], 0, +InstallOtherMethod( \/,"sliced perm", true, [ IsObject, IsSlicedPerm ], 0, function( p, perm ) local i; @@ -109,7 +109,7 @@ InstallOtherMethod( \/, true, [ IsObject, IsSlicedPerm ], 0, return p; end ); -InstallMethod( PrintObj, true, [ IsSlicedPerm ], 0, +InstallMethod( PrintObj,"sliced perm", true, [ IsSlicedPerm ], 0, function( perm ) Print( "" ); end ); @@ -117,7 +117,7 @@ end ); IsSlicedPermInv := NewRepresentation( "isSlicedPermInv", IsPerm, [ "length", "word", "lftObj", "rgtObj", "opr" ] ); -InstallOtherMethod( \^, true, [ IsObject, IsSlicedPermInv ], 0, +InstallOtherMethod( \^,"sliced perm", true, [ IsObject, IsSlicedPermInv ], 0, function( p, perm ) local i; @@ -127,7 +127,7 @@ InstallOtherMethod( \^, true, [ IsObject, IsSlicedPermInv ], 0, return p; end ); -InstallMethod( PrintObj, true, [ IsSlicedPermInv ], 0, +InstallMethod( PrintObj,"sliced perm", true, [ IsSlicedPermInv ], 0, function( perm ) Print( "" ); end ); @@ -348,6 +348,26 @@ end; ## #F Suborbits( , , , ) . . . . . . . . . . . . suborbits ## +## Returns a record with the following components: +## +## domain: the set +## stabChain: a stabilizer chain for $G_tofix$ (pointwise stabilizer) with +## base point (may be different from ) +## conj: an element mapping to +## which: a list whose

th entry is the number of the suborbit +## containing

+## lengths: a (not strictly) sorted list of suborbit lengths (subdegrees) +## byLengths: a list whose th entry is the set of numbers of suborbits of +## the th distinct length appearing in `lengths' +## partition: the partition into unions of suborbits of equal length +## The next three entries are lists whose entry refers to the th +## suborbit. +## blists: the suborbits as boolean lists +## reps: a transversal in s.t. $a.reps[k]$ lies in the th +## suborbit (reps[k] = `false' if this is impossible) +## orbitalPartitions: +## a list to store the `OrbitalPartition' for each suborbit in +## Suborbits := function( arg ) local H, tofix, b, Omega, suborbits, len, bylen, G, GG, a, conj, ran, subs, all, k, pnt, orb, gen, @@ -1414,6 +1434,9 @@ end; ## #F Refinements._RegularOrbit1( , ) . . . . . . extend mapped orbit ## +## Computes orbit and transversal `bF' for group = `data[6]' regular on +## that orbit. +## Refinements._RegularOrbit1 := function( rbase, image, d, len ) local F, trees; @@ -1444,6 +1467,14 @@ end; ## #F Refinements.RegularOrbit2( , , ) . . . meet mapped orbit ## +## Compute images `bhg' of `bh' under $g$ in `trees[].orbit = bE$ ($h\in +## E$). +## Entries in have the following meaning: +## [i,j] means that the image `bhg\in P[j]' of `bh = orb[]' can be +## calculated from `bg'. +## [-p,j] means that fixpoint

was mapped to fixpoint in `P[j]', +## i.e., `P[j]' has become a one-point cell. +## Refinements.RegularOrbit2 := function( rbase, image, d, orbit, strat ) local P, trees, orb, i; @@ -1466,6 +1497,14 @@ end; ## #F Refinements.RegularOrbit3( , ) . . . . . find images of orbit ## +## Register images `yhg' of `yh' under $g$ in an arbitrary orbit `yE' ($h\in +## E$). `yg\in P[f]' is a one-point cell. +## Entries in have the following meaning: +## [yh,i,j] means that the image `yhg\in P[j]' of `yh' can be calculated +## from `yg' and `bhg\in P[i]' (a one-point cell). +## [-p,j] means that fixpoint

was mapped to fixpoint in `P[j]', +## i.e., `P[j]' has become a one-point cell. +## Refinements.RegularOrbit3 := function( rbase, image, f, strat ) local P, yg, bhg, hg, yhg, i; @@ -1494,6 +1533,15 @@ end; ## #F Refinements.Suborbits0( , , , , ) subdegrees ## +## Computes suborbits of the stabilizer in = `image.data[2]' of the +## fixpoint in cell no. . (If is multiply transitive, replace it by +## the stabilizer of the first -1 images of R-base points.) +## +## Returns `true' if (1)~the list of suborbit lengths (subdegrees) equals +## , (2)~the list of subdegree frequencies equals and (3)~the +## meet with the partition into unions of suborbits of equal length +## succeeds. +## Refinements.Suborbits0 := function( rbase, image, tra, f, lens, byLen, strat ) local F, pnt, subs; @@ -1514,6 +1562,10 @@ end; ## #F Refinements.Suborbits1( , , , , , ) . . ## +## Meets the image partition with the orbital partition of the union of +## orbital graphs of suborbits of length `subs.byLengths[ ]'. ( and +## as in `Suborbits0'.) +## Refinements.Suborbits1 := function( rbase, image, tra, f, k, strat ) local F, pnt, subs, Q; @@ -1527,7 +1579,12 @@ end; ############################################################################# ## -#F Refinements.Suborbits2( , , , , ) . . . . . +#F Refinements.Suborbits2( , , , , , ) . +## +## Computes for each suborbit the intersection sizes with cells or +## more in the image partition. Stores the result in `data[3]' (needed only +## on this level, hence no '_'). Returns `true' if the collected result +## equals . ## Refinements.Suborbits2 := function( rbase, image, tra, f, start, coll ) local F, types, pnt, subs, i, p, k; @@ -1553,6 +1610,10 @@ end; ## #F Refinements.Suborbits3( , , , , , ) . ## +## Meets the image partition with the orbital partition of the union of +## orbital graphs of suborbits of type . Returns `false' if there are +## not of them. ( and as in `Suborbits0'.) +## Refinements.Suborbits3 := function( rbase, image, tra, f, typ, many, strat ) local F, types, pnt, subs, k, Q; @@ -1581,6 +1642,10 @@ NextLevelRegularGroups := function( P, rbase ) d := Length( rbase.base ) + 1; p := fail; + + # All images of a regular orbit are known if $s$ are known (where the + # regular group has $s$ generators). See sec. 3.7 of my thesis, read `b' + # for `\omega'. if d = 1 then p := rbase.regorb.orbit[ 1 ]; RegisterRBasePoint( P, rbase, p ); @@ -1625,6 +1690,7 @@ NextLevelRegularGroups := function( P, rbase ) fi; # If the image of a point is known, the image of its -orbit is known. + # See sec. 3.7 of my thesis, read `y' for `\gamma'. fix := Set( P.cellno{ rbase.regorb.orbit } ); f := FixcellPoint( P, fix ); while f <> false do @@ -1742,22 +1808,26 @@ RBaseGroupsBloxPermGroup := function( repr, G, Omega, E, div, B ) a := rbase.base[ len ]; if len >= tra then - # For each fixpoint in

, consider the suborbits rooted at it. + # For each fixpoint in

, consider the orbits of its + # stabilizer. f := FixcellPoint( P, doneroot ); while f <> false do fpt := FixpointCellNo( P, f ); subs := Suborbits( E, rbase.base{ [ 1 .. tra - 1 ] }, fpt, Omega ); - # Consider the partition into unions of suborbits of equal - # length. + # `Suborbits0' computes and meets the partition into unions of + # suborbits of equal length. strat := StratMeetPartition( rbase, P, subs.partition, subs.conj ); AddRefinement( rbase, "Suborbits0", [ tra, f, subs.lengths, List( subs.byLengths, Length ), strat ] ); - # Consider the corresponding orbital partitions for positive - # lengths (i.e. in the component of the root). + # For each such length, `Suborbits1' computes and meets the + # `OrbitalPartition' of the union of orbital graphs for the + # suborbits of that length (only if there are less than + # sqrt(subdegree) many and if they are in the component of the + # root). for k in [ 1 .. Length( subs.byLengths ) ] do if Length( subs.byLengths[ k ] ) ^ 2 < Length( subs.blists ) @@ -1772,13 +1842,16 @@ RBaseGroupsBloxPermGroup := function( repr, G, Omega, E, div, B ) fi; od; - # Find the types of the suborbits, i.e., the cells of

they - # intersect and their lengths. + # Find the types of the suborbits, i.e., the sizes of their + # intersections with the cells of

. if LARGE_TASK then start := NumberCells( P ) + 1; else start := 1; oldstart := 1; fi; types := List( subs.blists, o -> [ -SizeBlist( o ) ] ); done := Set( subs.byLengths ); while start <= NumberCells( P ) do + + # Do not consider a cell number in

twice (consider only + # cell numbers between and ). for i in [ start .. NumberCells( P ) ] do for k in Set( subs.which { OnTuples( Cell( P, i ), subs.conj ) } ) do @@ -1787,6 +1860,9 @@ RBaseGroupsBloxPermGroup := function( repr, G, Omega, E, div, B ) od; coll := Collected( StructuralCopy( types ) ); start := NumberCells( P ) + 1; + + # For each type, consider the `OrbitalPartition' of the union + # of orbital graphs of that type. for typ in coll do k := Filtered( [ 1 .. Length( subs.blists ) ], k -> types[ k ] = typ[ 1 ] ); @@ -1795,11 +1871,18 @@ RBaseGroupsBloxPermGroup := function( repr, G, Omega, E, div, B ) Q := OrbitalPartition( subs, k ); strat := StratMeetPartition( rbase, P, Q, subs.conj ); if Length( strat ) <> 0 then + + # `Suborbits2' computes the types in the image (stored + # in `data[3]') and compares them with (only for + # new cells between and ). if oldstart < start then AddRefinement( rbase, "Suborbits2", [ tra, f, oldstart, coll ] ); oldstart := start; fi; + + # `Suborbits3' computes and meets the orbital partition + # for the image. AddRefinement( rbase, "Suborbits3", [ tra, f, typ[ 1 ], Length( k ), strat ] ); if IsTrivialRBase( rbase ) then @@ -1808,6 +1891,7 @@ RBaseGroupsBloxPermGroup := function( repr, G, Omega, E, div, B ) fi; fi; od; + od; # Orbital graphs rooted at a point from the same -orbit seem @@ -2149,7 +2233,7 @@ AutomorphismGroupPermGroup := function( arg ) return N; end; -InstallMethod( Normalizer, IsIdentical, [ IsPermGroup, IsPermGroup ], 0, +InstallMethod( NormalizerOp,"perm group", IsIdentical, [ IsPermGroup, IsPermGroup ], 0, AutomorphismGroupPermGroup ); ############################################################################# @@ -2214,21 +2298,23 @@ end; ## #M Centralizer( , ) . . . . . . . . . . . . . . in permutation groups ## -InstallMethod( Centralizer, true, [ IsPermGroup, IsPerm ], 10, +InstallMethod( CentralizerOp, "perm group,elm",IsCollsElms, + [ IsPermGroup, IsPerm ], 10, function( G, e ) e := [ e ]; return RepOpElmTuplesPermGroup( false, G, e, e, TrivialSubgroup( G ), TrivialSubgroup( G ) ); end ); -InstallMethod( Centralizer, IsIdentical, [ IsPermGroup, IsPermGroup ], 10, +InstallMethod( CentralizerOp, "perm group, perm group", IsIdentical, + [ IsPermGroup, IsPermGroup ], 10, function( G, E ) return RepOpElmTuplesPermGroup( false, G, GeneratorsOfGroup( E ), GeneratorsOfGroup( E ), TrivialSubgroup( G ), TrivialSubgroup( G ) ); end ); -InstallOtherMethod( Centralizer, "with given subgroup", true, +InstallOtherMethod( CentralizerOp, "with given subgroup", true, [ IsPermGroup, IsPerm, IsPermGroup ], 0, function( G, e, U ) e := [ e ]; @@ -2239,7 +2325,8 @@ end ); ## #M Intersection( , ) . . . . . . . . . . . . . of permutation groups ## -InstallMethod( Intersection2, IsIdentical, [ IsPermGroup, IsPermGroup ], 0, +InstallMethod( Intersection2, "perm groups", IsIdentical, + [ IsPermGroup, IsPermGroup ], 0, function( G, H ) local Omega, P, rbase, L; diff --git a/lib/streams.gd b/lib/streams.gd index ca0c0f9955..0e8a5098a3 100644 --- a/lib/streams.gd +++ b/lib/streams.gd @@ -247,6 +247,14 @@ InputTextNone := NewOperationArgs( "InputTextNone" ); +############################################################################# +## +#O InputTextUser() . . . . . . . . . . . . . input text stream from the user +## +InputTextUser := NewOperationArgs( + "InputTextUser" ); + + ############################################################################# ## #O OutputTextString( , ) . . . . create output text stream @@ -273,6 +281,14 @@ OutputTextNone := NewOperationArgs( "OutputTextNone" ); +############################################################################# +## +#O OutputTextUser() . . . . . . . . . . . . output text stream to the user +## +OutputTextUser := NewOperationArgs( + "OutputTextUser" ); + + ############################################################################# ## diff --git a/lib/streams.gi b/lib/streams.gi index f9269b20d7..15fd12672a 100644 --- a/lib/streams.gi +++ b/lib/streams.gi @@ -1151,5 +1151,31 @@ end ); ############################################################################# ## +#F # # # # # # # # # # # # # # user streams # # # # # # # # # # # # # # # # +## + + +############################################################################# +## +#M InputTextUser() . . . . . . . . . . . . . input text stream from the user +## +InputTextUser := function() + return InputTextFile("*stdin*"); +end; + + +############################################################################# +## +#M OutputTextUser() . . . . . . . . . . . . output text stream to the user +## +OutputTextUser := function() + return OutputTextFile("*stdout*",false); +end; + + +############################################################################# +## + + #E streams.gi . . . . . . . . . . . . . . . . . . . . . . . . . . ends here ## diff --git a/lib/string.gi b/lib/string.gi index 441a7b733c..c3e97126ef 100644 --- a/lib/string.gi +++ b/lib/string.gi @@ -61,6 +61,16 @@ PrintArray := function( array ) end; +########################################################################## +## +#M Display( ) +## +InstallMethod( Display, + true, + [IsMatrix ], + 0,PrintArray); + + ############################################################################# ## #F DaysInYear( ) . . . . . . . . . days in a year, knows leap-years diff --git a/lib/tietze.gd b/lib/tietze.gd index 56beb64be0..d3df76916e 100644 --- a/lib/tietze.gd +++ b/lib/tietze.gd @@ -374,34 +374,6 @@ TzSubstituteWord := NewOperationArgs("TzSubstituteWord"); TzUpdateGeneratorImages := NewOperationArgs("TzUpdateGeneratorImages"); -############################################################################# -############################################################################# -## -## added temporarily to avoid error messages -## - - -############################################################################ -## -#F TzSubstituteGen -## -TzSubstituteGen := NewOperationArgs("TzSubstituteGen"); - - -############################################################################ -## -#F TzOccurrences -## -TzOccurrences := NewOperationArgs("TzOccurrences"); - - -############################################################################ -## -#F TzSearchC -## -TzSearchC := NewOperationArgs("TzSearchC"); - - ############################################################################# ## #E tietze.gd . . . . . . . . . . . . . . . . . . . . . . . . . . ends here diff --git a/lib/tietze.gi b/lib/tietze.gi index e9d8abdbb4..c47db76379 100644 --- a/lib/tietze.gi +++ b/lib/tietze.gi @@ -215,19 +215,6 @@ DecodeTree := function ( T ) T.protected := protected; end; -############################################################################# -## -## This is a preliminary dummy version of a routine which is not yet -## available in GAP4. -## -DecodeTree := function ( T ) - - Print( - "#I --------------------------------------------------------------\n", - "#I WARNING: Tietze transformations are not yet available in GAP 4\n", - "#I --------------------------------------------------------------\n" ); -end; - ############################################################################# ## @@ -329,7 +316,7 @@ PresentationFpGroup := function ( arg ) tietze[TZ_NUMGENS] := numgens; gens := List( [ 1 .. numgens ], i -> freegens[i] ); tietze[TZ_GENERATORS] := gens; - invs := [ numgens, numgens - 1 .. - numgens ]; + invs := ShallowCopy( numgens - [ 0 .. 2 * numgens ] ); tietze[TZ_INVERSES] := invs; frels := List( grels, rel -> MappedWord( rel, fggens, gens ) ); numrels := Length( frels ); @@ -1785,7 +1772,7 @@ TzGeneratorExponents := function ( T ) flags[i] := 1; tietze[TZ_MODIFIED] := true; elif num1 < 0 then - rels[i] := - rel; + rels[i] := List( rel, num -> -num ); fi; fi; fi; @@ -1858,19 +1845,6 @@ TzGo := function ( arg ) end; -############################################################################# -## -## This is a preliminary dummy version of a routine which is not yet -## available in GAP4. -## -TzGo := function ( arg ) - - Print( - "#I --------------------------------------------------------------\n", - "#I WARNING: Tietze transformations are not yet available in GAP 4\n", - "#I --------------------------------------------------------------\n" ); -end; - SimplifyPresentation := TzGo; @@ -1923,19 +1897,6 @@ TzGoGo := function ( T ) if silentGo then TzPrintStatus( T, true ); fi; end; -############################################################################# -## -## This is a preliminary dummy version of a routine which is not yet -## available in GAP4. -## -TzGoGo := function ( T ) - - Print( - "#I --------------------------------------------------------------\n", - "#I WARNING: Tietze transformations are not yet available in GAP 4\n", - "#I --------------------------------------------------------------\n" ); -end; - ############################################################################# ## @@ -1958,84 +1919,7 @@ TzHandleLength1Or2Relators := function ( T ) local absrep2, done, flags, gens, i, idword, invs, j, length, lengths, numgens, numgens1, numrels, pointers, protected, ptr, ptr1, ptr2, redunds, rels, rep, rep1, rep2, tietze, tracingImages, tree, - treelength, treeNums, TzReplaceGens; - - - TzReplaceGens := function ( tietze ) - - # This is a preliminary GAP version of a C routine which is not yet - # available in GAP4. - - local altered, i, invs, j, k, leng, lengths, new, numgens, numgens1, - numrels, old, reduced, rel, rels, total; - - # get some local varaibles. - numgens := tietze[TZ_NUMGENS]; - numrels := tietze[TZ_NUMRELS]; - rels := tietze[TZ_RELATORS]; - lengths := tietze[TZ_LENGTHS]; - invs := tietze[TZ_INVERSES]; - total := tietze[TZ_TOTAL]; - numgens1 := numgens + 1; - - # loop over all relators. - for i in [ 1 .. numrels ] do - rel := rels[i]; - leng := lengths[i]; - k := 0; - altered := false; - - # Don't change a sqare relator defining a valid involution. - if not ( leng = 2 and flags[i] = 3 and - invs[numgens1+rel[1]] = rel[1] ) - then - - # run through the relator and replace the occurring - # generators. - for j in [ 1 .. leng ] do - old := rel[j]; - if old < -numgens or numgens < old or old = 0 then - Error("gen no. ",j," in rel no. ",i," out of range"); - fi; - new := invs[numgens1-old]; - if new = 0 then - altered := true; - elif k > 0 and rel[k] = invs[numgens1+new] then - k := k - 1; - altered := true; - else - k := k + 1; - rel[k] := new; - if new <> old then altered := true; fi; - fi; - od; - - if altered then - - # now cyclically reduce the relator. - j := 1; - while j < k and rel[j] = invs[numgens1+rel[k]] do - j := j + 1; - k := k - 1; - od; - - # resize the resulting relator, if necessary. - if k < leng then - rels[i] := rel{ [ j .. k ] }; - reduced := k - j + 1; - lengths[i] := reduced; - total := total - leng + reduced; - fi; - - # redefine the corresponding search flag. - flags[i] := 1; - fi; - fi; - od; - - tietze[TZ_TOTAL] := total; - end; - + treelength, treeNums; if T.printLevel >= 3 then Print( "#I handling short relators\n" ); fi; @@ -2294,98 +2178,7 @@ end; ## TzMostFrequentPairs := function ( T, nmax ) - local gens, i, j, k, max, n, numgens, occlist, pairs, tietze, - TzOccurrencesPairs; - - - TzOccurrencesPairs := function ( arg ) - - # This is a preliminary GAP version of a C routine which is not yet - # available in GAP4. - - local i, ii, inv, invs, j1, j2, leng, list, num, numgens, numgens1, - rel, rels, tietze; - - # get the arguments. - tietze := arg[1]; - num := arg[2]; - if Length( arg ) > 2 then - list := arg[3]; - else - list := [ ]; - fi; - - # get some local variables. - numgens := tietze[TZ_NUMGENS]; - invs := tietze[TZ_INVERSES]; - rels := tietze[TZ_RELATORS]; - numgens1 := numgens + 1; - inv := invs[numgens1+num]; - - # return, if num = numgens. - if num = numgens then - return list; - fi; - - # list[i] counts the occurrences of gen * gen[i], - # list[numgens+i] counts the occurrences of gen * gen[i]^-1, - # list[2*numgens+i] counts the occurrences of gen^-1 * gen[i], - # list[3*numgens+i] counts the occurrences of gen^-1 * gen[i]^-1. - - # initialize the counters. - for i in [ 1 .. 4 * numgens ] do - list[i] := 0; - od; - - # loop over the relators. - for rel in rels do - leng := Length( rel ); - - # skip the current relator if its length is less than 2. - if leng > 1 then - - # loop over the current relator and investigate the pairs - # ( rel[j1], rel[j2] ). - j1 := leng; - for j2 in [ 1 .. leng ] do - - # count any "forward" pair gen * gen[i], gen * gen[i]^-1, - # gen^-1 * gen[i], or gen^-1 * gen[i]^-1 (with num < i). - if rel[j1] = num or rel[j1] = inv then - i := rel[j2]; - if i < -num or num < i then - if i < 0 then i := numgens - i; fi; - if rel[j1] <> num then i := i + 2 * numgens; fi; - list[i] := list[i] + 1; - fi; - - # count any "backward" pair gen[i]^-1 * gen^-1, - # gen[i] * gen^-1, gen[i]^-1 * gen, or gen[i] * gen - # (with num < i) which is not covered by a forward pair. - elif rel[j2] = num or rel[j2] = inv then - i := rel[j1]; - if i < -num or num < i then - ii := invs[numgens1+i]; - if num <> inv or rel[(j2+1) mod leng] <> ii or - i = ii and invs[numgens1+rel[(j1+leng-1) mod - leng]] = rel[j2] then - if ii < 0 then ii := numgens - ii; fi; - if rel[j2] <> inv then - ii := ii + 2 * numgens; - fi; - list[ii] := list[ii] + 1; - fi; - fi; - fi; - - j1 := j2; - od; - fi; - od; - - return list; -end; - + local gens, i, j, k, max, n, numgens, occlist, pairs, tietze; # check the first argument to be a Tietze record. if not ( IsBound( T.isTietze ) and T.isTietze ) then @@ -2509,118 +2302,6 @@ TzNewGenerator := function ( T ) end; -############################################################################# -## -#M TzOccurrences( , ) . . . . . . . . . occurrences of -#M TzOccurrences( ) . . . . . . . . . . . . Tietze generators -## -## This is a preliminary GAP version of a C routine which is not yet -## available in GAP4. -## -TzOccurrences := function ( arg ) - - local c, i, k, leng, lengths, minocc, minrel, next, num, numgens, - numrels, occ, rel, rels, tietze, total; - - # get the first argument which is assumed to be a Tietze stack. - tietze := arg[1]; - - # get some local variables. - numgens := tietze[TZ_NUMGENS]; - rels := tietze[TZ_RELATORS]; - numrels := tietze[TZ_NUMRELS]; - lengths := tietze[TZ_LENGTHS]; - - # check if a generator number is given. - if Length( arg ) > 1 then - - # count the occurrences the specified generator only. - num := arg[2]; - if num <= 0 or numgens < num then - Error( "given generator number ", num, " out of range" ); - fi; - - # initialize the counters. - minrel := 0; - minocc := 0; - total := 0; - - # loop over all relators. - for i in [ 1 .. numrels ] do - rel := rels[i]; - leng := lengths[i]; - - # loop through the relator. - occ := 0; - for k in [ 1 .. leng ] do - if rel[k] = num or rel[k] = -num then - occ := occ + 1; - fi; - od; - - if occ > 0 then - # check whether occ is less than the number of occurrences - # in the preceding relators. - if minocc = 0 or occ < minocc or - occ = minocc and leng < lengths[minrel] then - minrel := i; - minocc := occ; - fi; - total := total + occ; - fi; - od; - - total := [ total ]; - minrel := [ minrel ]; - minocc := [ minocc ]; - - else - - # handle general case of all Tietze generators. - num := numgens; - - # initialize the resulting lists. - minrel := ListWithIdenticalEntries( numgens, 0 ); - minocc := ListWithIdenticalEntries( numgens, 0 ); - total := ListWithIdenticalEntries( numgens, 0 ); - - # initialize a local list. - occ := ListWithIdenticalEntries( numgens, 0 ); - - # loop over all relators. - for i in [ 1 .. numrels ] do - rel := rels[i]; - leng := lengths[i]; - - # loop through the relator. - for k in [ 1 .. leng ] do - next := AbsInt( rel[k] ); - occ[next] := occ[next] + 1; - od; - - # loop over the generators, collecting the counts. - for k in [ 1 .. numgens ] do - c := occ[k]; - if c > 0 then - if minocc[k] = 0 or c < minocc[k] or - c = minocc[k] and leng < lengths[minrel[k]] then - minrel[k] := i; - minocc[k] := c; - fi; - total[k] := total[k] + c; - occ[k] := 0; - fi; - od; - od; - - fi; - - # return the result. - return [ total, minrel, minocc ]; - -end; - - ############################################################################# ## #M TzPrint( [,] ) . print internal Tietze presentation @@ -3096,38 +2777,7 @@ TzRemoveGenerators := function ( T ) local comps, gens, i, image, invs, j, newim, numgens, numgens1, oldnumgens, pointers, preimages, redunds, tietze, tracingImages, - tree, treelength, treeNums, TzRenumberGens; - - - TzRenumberGens := function ( tietze ) - - # This is a preliminary GAP version of a C routine which is not yet - # available in GAP4. - - local i, invs, j, leng, lengths, numgens, numrels, old, rel, rels; - - # get some local varaibles. - numgens := tietze[TZ_NUMGENS]; - numrels := tietze[TZ_NUMRELS]; - rels := tietze[TZ_RELATORS]; - lengths := tietze[TZ_LENGTHS]; - invs := tietze[TZ_INVERSES]; - - # loop over all relators and replace the occurring generators. - for i in [ 1 .. numrels ] do - rel := rels[i]; - leng := lengths[i]; - # run through the relator and replace the occurring generators. - for j in [ 1 .. leng ] do - old := rel[j]; - if old < -numgens or numgens < old or old = 0 then - Error( "gen no. ",j," in rel no. ",i," out of range" ); - fi; - rel[j] := invs[numgens+1-old]; - od; - od; - end; - + tree, treelength, treeNums; if T.printLevel >= 3 then Print( "#I renumbering the Tietze generators\n" ); @@ -3339,21 +2989,6 @@ TzSearch := function ( T ) od; end; - TzSearch := Ignore; - - -############################################################################# -## -#M TzSearchC( , , [, ] ) . . . search subwords -#M and substitute -## -## This is a preliminary dummy version of a C routine which is not yet -## available in GAP4. -## -TzSearchC := function ( arg ) - return 0; -end; - ############################################################################# ## @@ -3429,8 +3064,6 @@ TzSearchEqual := function ( T ) fi; end; - TzSearchEqual := Ignore; - ############################################################################# ## @@ -3444,61 +3077,6 @@ end; ## TzSort := function ( T ) - local flag, flags, h, i, k, leng, lengths, n, numrels, rel, rels, - TzSortC; - - - TzSortC := function ( tietze ) - - # This is a preliminary GAP version of a C routine which is not yet - # available in GAP4. - - # get some local varaibles. - rels := tietze[TZ_RELATORS]; - numrels := tietze[TZ_NUMRELS]; - flags := tietze[TZ_FLAGS]; - lengths := tietze[TZ_LENGTHS]; - - # sort the relators. - h := 1; - while 9 * h + 4 < numrels do h := 3 * h + 1; od; - while 0 < h do - for i in [ h+1 .. numrels ] do - rel := rels[i]; - leng := lengths[i]; - flag := flags[i]; - k := i; - if leng <> 0 then - while h < k and ( lengths[k-h] = 0 - or leng < lengths[k-h] - or leng = lengths[k-h] and flag > flags[k-h] ) do - rels[k] := rels[k-h]; - lengths[k] := lengths[k-h]; - flags[k] := flags[k-h]; - k := k - h; - od; - fi; - rels[k] := rel; - lengths[k] := leng; - flags[k] := flag; - od; - h := QuoInt( h, 3 ); - od; - - # reduce the lists, if necessary. - n := numrels; - while n > 0 and lengths[n] = 0 do - n := n - 1; - od; - if n < numrels then - tietze[TZ_RELATORS] := rels{ [ 1 .. n ] }; - tietze[TZ_FLAGS] := flags{ [ 1 .. n ] }; - tietze[TZ_LENGTHS] := lengths{ [ 1 .. n ] }; - tietze[TZ_NUMRELS] := n; - fi; - end; - - if T.printLevel >= 3 then Print( "#I sorting the relators\n" ); fi; # check the given argument to be a Tietze record. @@ -3757,71 +3335,6 @@ TzSubstituteCyclicJoins := function ( T ) end; -############################################################################# -## -#M TzSubstituteGen( , ) . . . replace a Tietze -#M generator by a Tietze word -## -## This is a preliminary GAP version of a C routine which is not yet -## available in GAP4. -## -TzSubstituteGen := function ( tietze, gen, word ) - - local flags, i, invs, j, leng, lengths, numgens, numgens1, numrels, rel, - rels, replacelist, wleng, winv; - - # get some local variables. - numgens := tietze[TZ_NUMGENS]; - numgens1 := numgens + 1; - invs := tietze[TZ_INVERSES]; - rels := tietze[TZ_RELATORS]; - numrels := tietze[TZ_NUMRELS]; - flags := tietze[TZ_FLAGS]; - lengths := tietze[TZ_LENGTHS]; - - # check the second argument to be a valid Tietze generator. - gen := AbsInt( gen ); - if gen < 0 or numgens < gen then - Error( "generator number ", gen, " out of range" ); - fi; - - # check the third argument to be a valid Tietze word, and invert it. - if not IsList( word ) then - Error( "third argument must be a Tietze word" ); - fi; - wleng := Length( word ); - winv := List( [ 1 .. wleng ], i -> invs[numgens1+word[wleng+1-i]] ); - - # build up the replace list. - replacelist := [ -numgens .. numgens ]; - replacelist[numgens1+gen] := word; - replacelist[numgens1-gen] := winv; - - # now loop over all relators. - for i in [ 1 .. numrels ] do - rel := rels[i]; - leng := Length( rel ); - - # check if the relator contains gen or its invers. - j := 0; - while j < leng do - j := j + 1; - if rel[j] = gen or rel[j] = -gen then - j := leng + 1; - fi; - od; - if j > leng then - # build up the modified relator and cyclically reduce ist. - rel := ReducedRrsWord( - Flat( List( rel, j -> replacelist[numgens1+j] ) ) ); - rels[i] := rel; - lengths[i] := Length( rel ); - flags[i] := 1; - fi; - od; -end; - - ############################################################################# ## #M TzSubstituteWord( , ) . . . substitute a given word diff --git a/lib/twocohom.gd b/lib/twocohom.gd index 51e99e8edd..6f9d1bd99b 100644 --- a/lib/twocohom.gd +++ b/lib/twocohom.gd @@ -3,7 +3,7 @@ #W twocohom.gd GAP library Bettina Eick ## Revision.twocohom_gd := - "@(#)$Id:"; + "@(#)$Id$"; ############################################################################# ## diff --git a/lib/twocohom.gi b/lib/twocohom.gi index 55b415e7b5..987430fa86 100644 --- a/lib/twocohom.gi +++ b/lib/twocohom.gi @@ -3,7 +3,7 @@ #W twocohom.gi GAP library Bettina Eick ## Revision.twocohom_gi := - "@(#)$Id:"; + "@(#)$Id$"; ############################################################################# ## diff --git a/lib/type.g b/lib/type.g index b494f9293e..d0ba0da0a5 100644 --- a/lib/type.g +++ b/lib/type.g @@ -842,10 +842,13 @@ end; SET_FILTER_OBJ := SetFilterObj; + + ############################################################################# ## #F ResetFilterObj( , ) ## + ResetFilterObj := function ( obj, filter ) if IS_POSOBJ( obj ) then SET_TYPE_POSOBJ( obj, SupType2( TYPE_OBJ(obj), filter ) ); diff --git a/lib/version.g b/lib/version.g index 1d56fba000..089fd7d9da 100644 --- a/lib/version.g +++ b/lib/version.g @@ -11,7 +11,7 @@ P(" ftp://ftp.math.rwth-aachen.de"); P(""); P("Please report bugs and problems to"); P(""); -P(" gap4@Math.RWTH-Aachen.DE"); +P(" gap-trouble@dcs.st-and.ac.uk"); P(""); P("quoting the Version and Date below and the machine, operation system,"); P("and compiler used."); diff --git a/lib/vspc.gi b/lib/vspc.gi index 497e4687a0..1c1aad487e 100644 --- a/lib/vspc.gi +++ b/lib/vspc.gi @@ -86,7 +86,7 @@ InstallMethod( AsSubspace, local newW, feature; if not IsSubset( V, W ) then - Error( " must be contained in " ); + return fail; fi; newW:= LeftModuleByGenerators( LeftActingDomain( W ), @@ -102,13 +102,10 @@ InstallMethod( AsSubspace, ############################################################################# ## -#M AsLeftModule( , ) . . . . . . . for division ring and collection #M AsLeftModule( , ) . . . . . . for division ring and vector space ## -## View the collection as a vector space over the division ring . +## View the vector space as a vector space over the division ring . ## -#T InstallMethod( AsLeftModule, true, [ IsDivisionRing, IsCollection ], 0, - InstallMethod( AsLeftModule, "method for a division ring and a vector space", true, diff --git a/lib/vspcmat.gi b/lib/vspcmat.gi index 2659f7d38d..c4ab067acf 100644 --- a/lib/vspcmat.gi +++ b/lib/vspcmat.gi @@ -503,13 +503,19 @@ InstallMethod( SiftedVector, [ IsBasis and IsSemiEchelonBasisOfGaussianMatrixSpaceRep, IsMatrix ], 0, function( B, v ) - local zero, # zero of the field + local F, # field of scalars + zero, # zero of the field m, # number of rows vectors, # basis vectors of 'B' i, j, k, # loop over rows and columns scalar, # one field element bvec; # one basis vector + F:= LeftActingDomain( UnderlyingLeftModule( B ) ); + if not ForAll( v, row -> IsSubset( F, row ) ) then + return fail; + fi; + v:= List( v, ShallowCopy ); zero:= Zero( v[1][1] ); vectors:= BasisVectors( B ); @@ -655,7 +661,8 @@ InstallMethod( \in, else zero:= Zero( mat[1][1] ); ncols:= V!.vectordim[2]; - return ForAll( SiftedVector( BasisOfDomain( V ), mat ), + mat:= SiftedVector( BasisOfDomain( V ), mat ); + return mat <> fail and ForAll( mat, row -> ncols < PositionNot( row, zero ) ); fi; end ); @@ -1172,7 +1179,7 @@ InstallMethod( MutableBasisByGenerators, and IsMutableBasisOfGaussianMatrixSpaceRep ), rec( basisVectors := ShallowCopy( newmats.vectors ), - heads := ShallowCopy( newmats.heads ), + heads := newmats.heads, zero := Zero( mats[1] ), leftActingDomain := R ) ); @@ -1220,13 +1227,13 @@ InstallOtherMethod( MutableBasisByGenerators, B!.basisVectors:= []; z:= ListWithIdenticalEntries( Length( zero[1] ), 0 ); - B!.heads:= List( zero, i -> z ); + B!.heads:= List( zero, i -> ShallowCopy( z ) ); else mats:= SemiEchelonMats( mats ); B!.basisVectors:= ShallowCopy( mats.vectors ); - B!.heads:= ShallowCopy( mats.heads ); + B!.heads:= mats.heads; fi; diff --git a/lib/vspcrow.gi b/lib/vspcrow.gi index c684d27419..fd7839f8e8 100644 --- a/lib/vspcrow.gi +++ b/lib/vspcrow.gi @@ -348,7 +348,11 @@ InstallMethod( SiftedVector, vectors, # basis vectors of i; # loop over basis vectors - zero:= 0 * v[1]; + if not IsSubset( LeftActingDomain( UnderlyingLeftModule( B ) ), v ) then + return fail; + fi; + + zero:= Zero( v[1] ); # Compute the coefficients of the 'B' vectors. v:= ShallowCopy( v ); @@ -477,10 +481,11 @@ InstallMethod( \in, function( v, V ) if IsEmpty( v ) then return V!.vectordim = 0; + elif V!.vectordim <> Length( v ) then + return false; else - return V!.vectordim = Length( v ) - and V!.vectordim < - PositionNot( SiftedVector( Basis( V ), v ), Zero( v[1] ) ); + v:= SiftedVector( Basis( V ), v ); + return v <> fail and V!.vectordim < PositionNot( v, Zero( v[1] ) ); fi; end ); @@ -734,7 +739,7 @@ InstallMethod( IsZero, ## #M AsLeftModule( , ) . . . . . . . . for division ring and matrix ## -InstallOtherMethod( AsLeftModule, +InstallMethod( AsLeftModule, "method for division ring and matrix", IsElmsColls, [ IsDivisionRing, IsMatrix ], 0, @@ -743,7 +748,7 @@ InstallOtherMethod( AsLeftModule, local m; if not IsPrimePowerInt( Length( vectors ) ) then - Error( " cannot be a vector space" ); + return fail; elif ForAll( vectors, v -> IsSubset( F, v ) ) then #T other check! @@ -753,7 +758,7 @@ InstallOtherMethod( AsLeftModule, if IsEmpty( m ) then m:= LeftModuleByGenerators( F, [], vectors[1] ); else - m:= LeftModuleByGenerators( F, m, "basis" ); + m:= FreeLeftModule( F, m, "basis" ); fi; else @@ -765,7 +770,7 @@ InstallOtherMethod( AsLeftModule, # Check that the space equals the list of vectors. if Size( m ) <> Length( vectors ) then - Error( " is not an -space" ); + return fail; fi; # Return the space. @@ -1597,104 +1602,78 @@ InstallMethod( ImmutableBasis, ############################################################################# ## -IsAffineSpace := NewRepresentation( "IsAffineSpace", - IsDomain and IsAttributeStoringRep, [ "space" ] ); - -IsAffineSpaceEnumerator := NewRepresentation( "IsAffineSpaceEnumerator", - IsDomainEnumerator and IsAttributeStoringRep, [ "affineSpace" ] ); - -IsProjectiveSpace := NewRepresentation( "IsProjectiveSpace", - IsDomain and IsAttributeStoringRep, [ "space" ] ); - -IsProjectiveSpaceEnumerator := NewRepresentation - ( "IsProjectiveSpaceEnumerator", - IsDomainEnumerator and IsAttributeStoringRep, [ "projectiveSpace" ] ); - -############################################################################# -## -#F AffineSpace( ) . . . . . constructor function for affine spaces +#F ExtendedVectors( ) . . . . . . . . . . . . . . . . . . . . . . . . . ## -AffineSpace := function( space ) - return Objectify( NewType( FamilyObj( space ), IsAffineSpace ), - rec( space := space ) ); -end; - -InstallMethod( PrintObj, true, [ IsAffineSpace ], 0, - function( obj ) - Print( "AffineSpace( ", obj!.space, " )" ); -end ); +IsExtendedVectors := NewRepresentation( "IsExtendedVectors", + IsEnumerator and IsAttributeStoringRep, + [ "spaceEnumerator", "one" ] ); -InstallMethod( Size, true, [ IsAffineSpace ], 0, obj -> Size( obj!.space ) ); - -InstallMethod( Enumerator,"affine", true, [ IsAffineSpace ], 0, - function( aspace ) - local enum; +ExtendedVectors := function( V ) + return Objectify( NewType( FamilyObj( V ), + IsExtendedVectors ), rec( + spaceEnumerator := Enumerator( V ), + one := One( LeftActingDomain( V ) ) ) ); +end; - enum := Objectify( NewType( FamilyObj( aspace ), - IsAffineSpaceEnumerator ), rec - ( spaceEnumerator := Enumerator( aspace!.space ) ) ); - SetUnderlyingCollection( enum, aspace ); - return enum; +InstallMethod( PrintObj, true, [ IsExtendedVectors ], 0, + function( T ) + Print( "A( ", UnderlyingCollection( T!.spaceEnumerator ), " )" ); end ); -InstallMethod( \[\], true, [ IsAffineSpaceEnumerator, IsInt ], 0, - function( aspace, num ) - return Concatenation( aspace!.spaceEnumerator[ num ], - [ One( LeftActingDomain( UnderlyingCollection( aspace )!.space ) ) ] ); +InstallMethod( Length, true, [ IsExtendedVectors ], 0, + T -> Length( T!.spaceEnumerator ) ); + +InstallMethod( \[\], true, [ IsExtendedVectors, IsInt ], 0, + function( T, num ) + return Concatenation( T!.spaceEnumerator[ num ], [ T!.one ] ); end ); InstallMethod( Position, true, - [ IsAffineSpaceEnumerator, IsObject, IsZeroCyc ], 0, - function( aspace, elm, zero ) - return Position( aspace!.spaceEnumerator, + [ IsExtendedVectors, IsObject, IsZeroCyc ], 0, + function( T, elm, zero ) + return Position( T!.spaceEnumerator, elm{ [ 1 .. Length( elm ) - 1 ] } ); end ); ############################################################################# ## -#F ProjectiveSpace( ) . constructor function for projective spaces +#F OneDimSubspacesTransversal( ) . . . . . . . . . . . . . . . . . . . . ## -ProjectiveSpace := function( space ) - return Objectify( NewType( FamilyObj( space ), IsProjectiveSpace ), - rec( space := space ) ); +IsOneDimSubspacesTransversal := NewRepresentation + ( "IsOneDimSubspacesTransversal", + IsEnumerator and IsAttributeStoringRep, + [ "enumeratorField", "dimension", "one" ] ); + +OneDimSubspacesTransversal := function( V ) + return Objectify( NewType( FamilyObj( V ), + IsOneDimSubspacesTransversal ), rec( + enumeratorField := Enumerator( LeftActingDomain( V ) ), + dimension := Dimension( V ), + one := One( LeftActingDomain( V ) ) ) ); end; - -InstallMethod( PrintObj, true, [ IsProjectiveSpace ], 0, - function( obj ) - Print( "ProjectiveSpace( ", obj!.space, " )" ); + +InstallMethod( PrintObj, true, [ IsOneDimSubspacesTransversal ], 0, + function( T ) + Print( "P( ", Length( T!.enumeratorField ), "^", T!.dimension, " )" ); end ); -InstallMethod( Size, true, [ IsProjectiveSpace ], 0, - function( obj ) +InstallMethod( Length, true, [ IsOneDimSubspacesTransversal ], 0, + function( T ) local q, d; - q := Size( LeftActingDomain( obj!.space ) ); - d := Dimension( obj!.space ); + q := Length( T!.enumeratorField ); + d := T!.dimension; return ( q ^ d - 1 ) / ( q - 1 ); end ); -InstallMethod( Enumerator,"projective", true, [ IsProjectiveSpace ], 0, - function( pspace ) - local enum; - - enum := Objectify( NewType( FamilyObj( pspace ), - IsProjectiveSpaceEnumerator ), rec( enumeratorField := - Enumerator( LeftActingDomain( pspace!.space ) ) ) ); - SetUnderlyingCollection( enum, pspace ); - return enum; -end ); - -InstallMethod( \[\], true, [ IsProjectiveSpaceEnumerator, IsInt ], 0, - function( pspace, num ) - local F, sp, f, v, zero, q, n, i, l, L; +InstallMethod( \[\], true, [ IsOneDimSubspacesTransversal, IsInt ], 0, + function( T, num ) + local f, v, q, n, i, l, L; - f := pspace!.enumeratorField; - pspace := UnderlyingCollection( pspace ); - sp := pspace!.space; - F := LeftActingDomain( sp ); - q := Size( F ); - n := Dimension( sp ); - v := ListWithIdenticalEntries( n, Zero( F ) ); + f := T!.enumeratorField; + q := Length( f ); + n := T!.dimension; + v := ListWithIdenticalEntries( n, Zero( T!.one ) ); num := num - 1; # Find the number of entries after the leading 1. @@ -1705,7 +1684,7 @@ InstallMethod( \[\], true, [ IsProjectiveSpaceEnumerator, IsInt ], 0, L := L * q + 1; od; num := num - ( L - 1 ) / q; - v[ n - l ] := One( F ); + v[ n - l ] := T!.one; for i in [ n - l + 1 .. n ] do v[ i ] := f[ num mod q + 1 ]; num := QuoInt( num, q ); @@ -1714,17 +1693,14 @@ InstallMethod( \[\], true, [ IsProjectiveSpaceEnumerator, IsInt ], 0, end ); InstallMethod( PositionCanonical, true, - [ IsProjectiveSpaceEnumerator, IsObject ], 0, - function( pspace, elm ) - local F, sp, f, zero, q, n, l, num, val, i; + [ IsOneDimSubspacesTransversal, IsObject ], 0, + function( T, elm ) + local f, zero, q, n, l, num, val, i; - f := pspace!.enumeratorField; - pspace := UnderlyingCollection( pspace ); - sp := pspace!.space; - F := LeftActingDomain( sp ); - zero := Zero( F ); - q := Size( F ); - n := Dimension( sp ); + f := T!.enumeratorField; + zero := Zero( T!.one ); + q := Length( f ); + n := T!.dimension; l := 1; # Find the first entry different from zero. @@ -1752,7 +1728,7 @@ end ); OnLines := function( vec, g ) local c; vec:= vec * g; - c:= DepthVector( vec ); + c:= PositionNot( vec, Zero( vec[1] ) ); if c <= Length( vec ) then vec:= vec / vec[c]; fi; diff --git a/lib/wpobj.g b/lib/wpobj.g new file mode 100644 index 0000000000..4ed14eac5a --- /dev/null +++ b/lib/wpobj.g @@ -0,0 +1,22 @@ +############################################################################# +## +#W wpobj.g GAP library Steve Linton +## +#H @(#)$Id$ +## +#Y Copyright (C) 1997, +## +## This file contains the weak pointer type that might have to be known very +## early in the bootstrap stage (therefore they are not in wpobj.gi) +## +Revision.wpobj_g := + "@(#)$Id$"; + +############################################################################# +## +#V TYPE_WPOBJ . . . . . . . . . . . . . . . . . . . . type of all wp object +## +TYPE_WPOBJ := NewType( ListsFamily, + IsWeakPointerObject and IsInternalRep ); + + diff --git a/lib/wpobj.gd b/lib/wpobj.gd new file mode 100644 index 0000000000..a169ae7f24 --- /dev/null +++ b/lib/wpobj.gd @@ -0,0 +1,61 @@ +############################################################################# +## +#W wpobj.gd GAP library Steve Linton +## +#H @(#)$Id$ +## +#Y Copyright (C) 1997, +## +## This file contains the definition of operations and functions for +## weak pointers. +## +## WP objects behave in most respects like mutable plain lists, except that +## they do not keep their subobjects alive, so that one sees things like. +## +## gap> w := WeakPointerObj([[1,2]]);; +## gap> IsBound(w[1]); +## true +## gap> GASMAN("collect"); +## gap> w; +## WeakPointerObj([ [ ] ]); +## +## for this reason the common idiom +## +## if IsBound(w[i]) then +## DoSomethigWith(w[i]); +## fi; +## +## is not really safe. +## +## A solution is provided by the kernel function ElmWPObj (weakptr.c), which +## returns fail if the entry is (1) unbound or (2) bound to the value fail. +## Since fail will never be collected as garbage, a subsequent call to IsBound +## can safely be used to distinguish these two cases, as in: +## +## x := ElmWPObj(w,i); +## if x <> fail or IsBound(w[i]) then +## DoSomethingWith(x); +## else +## DoSomethingElse(); +## fi; +## + +Revision.wpobj_gd := + "@(#)$Id$"; + + +############################################################################# +## +## +#C IsWeakPointerObject( ) . . . . . . . . . . category of WP objects +## +## All WP objects have to be mutable (a stronger term like volatile would +## be appropriate) +## + +IsWeakPointerObject := NewCategoryKernel( "IsWeakPointerObject", + IsList and IsMutable, + IsWPObj ); + + + diff --git a/lib/wpobj.gi b/lib/wpobj.gi new file mode 100644 index 0000000000..3fcc31559d --- /dev/null +++ b/lib/wpobj.gi @@ -0,0 +1,143 @@ +############################################################################# +## +#W wpobj.gi GAP library Steve Linton +## +#H @(#)$Id$ +## +#Y Copyright (C) 1997, +## +## This file contains the implementations for weak pointer objects +## +Revision.wpobj_gi := + "@(#)$Id$"; + +############################################################################# +## +#M [] access function for weak pointer objects +## +## We cannot use the kernel function directly, as it returns fail for unbound +## see comments in wpobj.gd for the reason. +## + +InstallMethod(\[\], + "method for a weak pointer object", + true, + [ IsWeakPointerObject, IsInt and IsPosRat ], + 0, + function( wp, pos) + local elm; + elm := ElmWPObj(wp, pos); + if elm <> fail or IsBoundElmWPObj(wp,pos) then + return elm; + else + Error("[] must have a value."); + fi; +end); + +############################################################################# +## +#M [] := weak pointer object member assignment +## + +InstallMethod(\[\]\:\=, + "method for a weak pointer object", + true, + [ IsWeakPointerObject, IsInt and IsPosRat, IsObject ], + 0, + SetElmWPObj); + +############################################################################# +## +#M Length( ) note that the answer may not stay valid +## + +InstallMethod(Length, + "method for a weak pointer object", + true, + [ IsWeakPointerObject ], + 0, + LengthWPObj); + +############################################################################# +## +#M IsBound([]) note that the answer may not stay valid +## + +InstallMethod(IsBound\[\], + "method for a weak pointer object", + true, + [ IsWeakPointerObject, IsInt and IsPosRat ], + 0, + IsBoundElmWPObj); + + +############################################################################# +## +#M Unbind([]) +## + +InstallMethod(Unbind\[\], + "method for a weak pointer object", + true, + [ IsWeakPointerObject, IsInt and IsPosRat ], + 0, + UnbindElmWPObj); + + +############################################################################# +## +#M Print method, ~ is not supported, so self-referential weak pointer +## objects cannot be printed +## + +InstallMethod(PrintObj, + "method for a weak pointer object", + true, + [ IsWeakPointerObject ], + 0, + function(wp) + local i,l,x; + Print("WeakPointerObj( [ "); + l := Length(wp); + if l <> 0 then + if IsBound(wp[1]) then + PrintObj(wp[1]); + fi; + for i in [2..l] do + Print(", "); + if IsBound(wp[i]) then + x := wp[i]; + PrintObj(x); + fi; + od; + fi; + Print("] )"); +end); + + +############################################################################# +## +#M ShallowCopy() +## +## Note that we do not use wp[i] access (see wpobj.gd for explanation) +## + +InstallMethod(ShallowCopy, + "method for a weak pointer object", + true, + [ IsWeakPointerObject ], + 0, + function(wp) + local w,i,l,x; + w := WeakPointerObj([]); + l := Length(wp); + for i in [1..l] do + x := ElmWPObj(wp,i); + if x <> fail or IsBound(wp[i]) then + w[i] := x; + fi; + od; + return w; +end); + + diff --git a/lib/zmodnz.gi b/lib/zmodnz.gi index 84a384feaa..59679eb4a5 100644 --- a/lib/zmodnz.gi +++ b/lib/zmodnz.gi @@ -65,7 +65,7 @@ InstallMethod( ZmodnZObj, [ IsZmodnZObjNonprimeFamily, IsInt ], 0, function( Fam, residue ) return Objectify( Fam!.typeOfZmodnZObj, - [ residue mod Fam!.modulus ] ); + [ residue mod Fam!.modulus ] ); end ); InstallOtherMethod( ZmodnZObj, @@ -351,7 +351,8 @@ InstallMethod( \/, function( x, y ) # Avoid to touch the rational arithmetics. return Objectify( TypeObj( x )![ ZNZ_PURE_TYPE ], - [ QuotientMod( x![1], y![1], DataType( TypeObj( x ) ) ) ] ); + [ QuotientMod( Integers, x![1], y![1], + DataType( TypeObj( x ) ) ) ] ); end ); InstallMethod( \/, @@ -361,7 +362,8 @@ InstallMethod( \/, function( x, y ) # Avoid to touch the rational arithmetics. return Objectify( TypeObj( x )![ ZNZ_PURE_TYPE ], - [ QuotientMod( x![1], y, DataType( TypeObj( x ) ) ) ] ); + [ QuotientMod( Integers, x![1], y, + DataType( TypeObj( x ) ) ) ] ); end ); InstallMethod( \/, @@ -371,7 +373,8 @@ InstallMethod( \/, function( x, y ) # Avoid to touch the rational arithmetics. return Objectify( TypeObj( y )![ ZNZ_PURE_TYPE ], - [ QuotientMod( x, y![1], DataType( TypeObj( y ) ) ) ] ); + [ QuotientMod( x, y![1], + DataType( TypeObj( y ) ) ) ] ); end ); InstallMethod( \/, @@ -439,7 +442,7 @@ InstallMethod( Inverse, [ IsZmodnZObj and IsModulusRep ], 0, function( elm ) local modulus; - modulus:= QuotientMod( 1, elm![1], FamilyObj( elm )!.modulus ); + modulus:= QuotientMod( Integers, 1, elm![1], FamilyObj( elm )!.modulus ); if modulus <> fail then modulus:= ZmodnZObj( FamilyObj( elm ), modulus ); fi; @@ -458,6 +461,19 @@ InstallMethod( DegreeFFE, z -> 1 ); +############################################################################# +## +#M LogFFE( , ) . . . . . . . . . . . . . . . . . . for 'IsZmodpZObj' +## +InstallMethod( LogFFE, + "method for two elements in Z/pZ (ModulusRep)", + IsIdentical, + [ IsZmodpZObj and IsModulusRep, IsZmodpZObj and IsModulusRep ], 0, + function( n, r ) + return LogMod( n![1], r![1], Characteristic( n ) ); + end ); + + ############################################################################# ## #M Int( ) . . . . . . . . . . . . . . . . . . . . . for 'IsZmodnZObj' @@ -548,10 +564,43 @@ InstallMethod( Units, true, [ IsZmodnZObjNonprimeCollection and IsWholeFamily and IsRing ], 0, function( R ) - local F; - F:= ElementsFamily( FamilyObj( R ) ); - return List( PrimeResidues( Size( R ) ), x -> ZmodnZObj( F, x ) ); - end ); + local G, gens; + + gens := GeneratorsPrimeResidues( Size( R ) ).generators; + if not IsEmpty( gens ) and gens[ 1 ] = 1 then + gens := gens{ [ 2 .. Length( gens ) ] }; + fi; + gens := Flat( gens ) * One( R ); + G := GroupByGenerators( gens, One( R ) ); + SetIsAbelian( G, true ); + SetIndependentGeneratorsOfAbelianGroup( G, gens ); + SetIsHandledByNiceMonomorphism(G,true); + return G; +end ); + +#InstallTrueMethod( IsHandledByNiceMonomorphism, +# IsGroup and IsZmodnZObjNonprimeCollection ); + +############################################################################# +## +#M in . . . . . . . . . . . for cyclic prime residue class groups +## +InstallMethod( \in, "for subgroups of Z/p^aZ, p<>2", IsElmsColls, + [ IsZmodnZObjNonprime, IsGroup and IsZmodnZObjNonprimeCollection ],0, + function( res, G ) + local m; + + m := FamilyObj( res )!.modulus; + res := Int( res ); + if GcdInt( res, m ) <> 1 then + return false; + elif m mod 2 <> 0 and IsPrimePowerInt( m ) then + return LogMod( res, PrimitiveRootMod( m ), m ) mod + ( Phi( m ) / Size( G ) ) = 0; + else + TryNextMethod(); + fi; +end ); ############################################################################# diff --git a/prim/primitiv.gd b/prim/primitiv.gd index 20873ccf56..3edcfa71cb 100644 --- a/prim/primitiv.gd +++ b/prim/primitiv.gd @@ -6,6 +6,9 @@ #H @(#)$Id$ ## #H $Log$ +#H Revision 4.3 1997/08/13 08:43:22 heiko +#H introduced FOA to operation functions +#H #H Revision 4.2 1997/07/17 15:29:43 htheisse #H reflects the state of my thesis #H @@ -24,9 +27,11 @@ coh := "2b defined"; PerfectResiduum := NewAttribute( "PerfectResiduum", IsGroup ); SimsNo := NewAttribute( "SimsNo", IsPermGroup ); SimsName := NewAttribute( "SimsName", IsPermGroup ); -Rank := NewOperationArgs( "Rank" ); -RankOp := NewOperation( "Rank", OrbitsishReq ); -RankAttr := NewAttribute( "Rank", IsObject ); + +tmp := OrbitsishFOA( "Rank", OrbitsishReq, false, NewAttribute ); +Rank := tmp[1]; +RankOp := tmp[2]; +RankAttr := tmp[3]; RepOpSuborbits := NewOperationArgs( "RepOpSuborbits" ); OnSuborbits := NewOperationArgs( "OnSuborbits" ); diff --git a/prim/primitiv.gi b/prim/primitiv.gi index de87080c1a..2a151520e2 100644 --- a/prim/primitiv.gi +++ b/prim/primitiv.gi @@ -120,6 +120,7 @@ AlternatingCohortOnSets := function( n, k ) A := AlternatingGroup( n ); orb := Combinations( [ 1 .. n ], k ); G := Operation( A, orb, OnSets ); + SetSize( G, Size( A ) ); out := Permutation( (1,2), orb, OnSets ); G!.normalizer := ClosureGroup( G, out ); coh := CohortOfGroup( G ); @@ -136,7 +137,7 @@ LinearCohortOnProjectivePoints := function( n, q ) local fld, pro, gens, M, coh; fld := GF( q ); - pro := ProjectiveSpace( fld ^ n ); + pro := OneDimSubspacesTransversal( fld ^ n ); gens := GeneratorsOfGroup( Operation( SL( n, q ), pro ) ); M := MutableIdentityMat( n, fld ); M[ 1 ][ 1 ] := PrimitiveRoot( fld ); @@ -156,7 +157,7 @@ SymplecticCohortOnProjectivePoints := function( n, q ) local fld, pro, gens, M, coh, i; fld := GF( q ); - pro := ProjectiveSpace( fld ^ n ); + pro := OneDimSubspacesTransversal( fld ^ n ); gens := GeneratorsOfGroup( Operation( Sp( n, q ), pro ) ); if q mod 2 = 0 then M := PrimitiveRoot( fld ); @@ -207,7 +208,7 @@ UnitaryCohortOnProjectivePoints := function( n, q, iso ) P[ n + 1 - i ] := ( zeta ^ q * id[ i ] - id[ n + 1 - i ] ) * imag; od; M := M ^ P; - pro := ProjectiveSpace( fld ^ n ); + pro := OneDimSubspacesTransversal( fld ^ n ); if iso then v := id[ 1 ]; else v := P[ 1 ]; fi; pro := ExternalOrbit( G, pro, v ); @@ -232,8 +233,11 @@ CohortProductAction := function( coh, n ) S := SymmetricGroup( n ); N := WreathProductProductAction( Source( coh ), S ); - G := WreathProductProductAction( KernelOfMultiplicativeGeneralMapping - ( coh ), TrivialSubgroup( S ) ); + G := WreathProductProductAction + ( OperationHomomorphism + ( KernelOfMultiplicativeGeneralMapping( coh ), + MovedPoints( Source( coh ) ) ), + OperationHomomorphism( TrivialSubgroup( S ), MovedPoints( S ) ) ); prd := ConstructCohort( N, G, MovedPoints( G ) ); SetName( prd, Concatenation( Name( coh ), "^", String( n ) ) ); return prd; @@ -472,10 +476,6 @@ end; ## #F Rank( ) . . . . . . . . . . . . . . . . . . . . number of suborbits ## -Rank := function( arg ) - return AttributeOperation( RankOp, RankAttr, false, arg ); -end; - InstallMethod( RankOp, true, OrbitsishReq, 0, function( G, D, gens, oprs, opr ) local hom; diff --git a/small/idgroup.g b/small/idgroup.g index df43fbf3bf..9e95f41b83 100644 --- a/small/idgroup.g +++ b/small/idgroup.g @@ -7,7 +7,7 @@ ## up to 1000 without the orders 256, 512 and 768. ## Revision.idgroup_g := - "@(#)$Id:"; + "@(#)$Id$"; if not IsBound( IdGroupTree ) then IdGroupTree := rec( fp := [ 1 .. 1000 ], next := [ ] ); diff --git a/small/idlib/id01.6 b/small/idlib/id01.6 index 041a1195dc..71b9475b1d 100644 --- a/small/idlib/id01.6 +++ b/small/idlib/id01.6 @@ -3,7 +3,7 @@ #W id01.6 GAP library of id's Hans Ulrich Besche ## Revision.id01_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 16 ] := rec( diff --git a/small/idlib/id02.4 b/small/idlib/id02.4 index 2552068281..df14455e2f 100644 --- a/small/idlib/id02.4 +++ b/small/idlib/id02.4 @@ -3,7 +3,7 @@ #W id02.4 GAP library of id's Hans Ulrich Besche ## Revision.id02_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 24 ] := rec( diff --git a/small/idlib/id03.2 b/small/idlib/id03.2 index c2481aa66b..206fc4b57c 100644 --- a/small/idlib/id03.2 +++ b/small/idlib/id03.2 @@ -3,7 +3,7 @@ #W id03.2 GAP library of id's Hans Ulrich Besche ## Revision.id03_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 32 ] := rec( diff --git a/small/idlib/id03.6 b/small/idlib/id03.6 index 2b82f725c2..380a6ed824 100644 --- a/small/idlib/id03.6 +++ b/small/idlib/id03.6 @@ -3,7 +3,7 @@ #W id03.6 GAP library of id's Hans Ulrich Besche ## Revision.id03_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 36 ] := rec( diff --git a/small/idlib/id04.0 b/small/idlib/id04.0 index 771822e9c8..7ab2ad73d9 100644 --- a/small/idlib/id04.0 +++ b/small/idlib/id04.0 @@ -3,7 +3,7 @@ #W id04.0 GAP library of id's Hans Ulrich Besche ## Revision.id04_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 40 ] := rec( diff --git a/small/idlib/id04.8 b/small/idlib/id04.8 index d86748873f..0735a92df2 100644 --- a/small/idlib/id04.8 +++ b/small/idlib/id04.8 @@ -3,7 +3,7 @@ #W id04.8 GAP library of id's Hans Ulrich Besche ## Revision.id04_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 48 ] := rec( diff --git a/small/idlib/id05.4 b/small/idlib/id05.4 index cae8ee170f..0eb4c5f0ec 100644 --- a/small/idlib/id05.4 +++ b/small/idlib/id05.4 @@ -3,7 +3,7 @@ #W id05.4 GAP library of id's Hans Ulrich Besche ## Revision.id05_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 54 ] := rec( diff --git a/small/idlib/id05.6 b/small/idlib/id05.6 index 5ac3f85744..652191f478 100644 --- a/small/idlib/id05.6 +++ b/small/idlib/id05.6 @@ -3,7 +3,7 @@ #W id05.6 GAP library of id's Hans Ulrich Besche ## Revision.id05_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 56 ] := rec( diff --git a/small/idlib/id06.0 b/small/idlib/id06.0 index 86b4e2c97f..84a4b14105 100644 --- a/small/idlib/id06.0 +++ b/small/idlib/id06.0 @@ -3,7 +3,7 @@ #W id06.0 GAP library of id's Hans Ulrich Besche ## Revision.id06_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 60 ] := rec( diff --git a/small/idlib/id06.4 b/small/idlib/id06.4 index 651fbd2de3..c2ffb7515d 100644 --- a/small/idlib/id06.4 +++ b/small/idlib/id06.4 @@ -3,7 +3,7 @@ #W id06.4 GAP library of id's Hans Ulrich Besche ## Revision.id06_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 64 ] := rec( diff --git a/small/idlib/id064.c b/small/idlib/id064.c index 7ebeab7d4b..2f378fe694 100644 --- a/small/idlib/id064.c +++ b/small/idlib/id064.c @@ -3,7 +3,7 @@ #W id064.c GAP library of id's Hans Ulrich Besche ## Revision.id064_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 64 ].next[ 3 ] := rec( diff --git a/small/idlib/id07.2 b/small/idlib/id07.2 index 177d2ad818..70ac97a321 100644 --- a/small/idlib/id07.2 +++ b/small/idlib/id07.2 @@ -3,7 +3,7 @@ #W id07.2 GAP library of id's Hans Ulrich Besche ## Revision.id07_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 72 ] := rec( diff --git a/small/idlib/id08.0 b/small/idlib/id08.0 index b8bf71d33b..005494e3ee 100644 --- a/small/idlib/id08.0 +++ b/small/idlib/id08.0 @@ -3,7 +3,7 @@ #W id08.0 GAP library of id's Hans Ulrich Besche ## Revision.id08_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 80 ] := rec( diff --git a/small/idlib/id08.1 b/small/idlib/id08.1 index 12709bc3dc..6ff200b10b 100644 --- a/small/idlib/id08.1 +++ b/small/idlib/id08.1 @@ -3,7 +3,7 @@ #W id08.1 GAP library of id's Hans Ulrich Besche ## Revision.id08_1 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 81 ] := rec( diff --git a/small/idlib/id08.4 b/small/idlib/id08.4 index b521f0deb8..15c7cce9bc 100644 --- a/small/idlib/id08.4 +++ b/small/idlib/id08.4 @@ -3,7 +3,7 @@ #W id08.4 GAP library of id's Hans Ulrich Besche ## Revision.id08_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 84 ] := rec( diff --git a/small/idlib/id08.8 b/small/idlib/id08.8 index cfc8fc23cc..06a9b31bbe 100644 --- a/small/idlib/id08.8 +++ b/small/idlib/id08.8 @@ -3,7 +3,7 @@ #W id08.8 GAP library of id's Hans Ulrich Besche ## Revision.id08_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 88 ] := rec( diff --git a/small/idlib/id09.0 b/small/idlib/id09.0 index e74834a651..7fa289ba09 100644 --- a/small/idlib/id09.0 +++ b/small/idlib/id09.0 @@ -3,7 +3,7 @@ #W id09.0 GAP library of id's Hans Ulrich Besche ## Revision.id09_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 90 ] := rec( diff --git a/small/idlib/id09.6 b/small/idlib/id09.6 index 567cee61b1..aa92df435c 100644 --- a/small/idlib/id09.6 +++ b/small/idlib/id09.6 @@ -3,7 +3,7 @@ #W id09.6 GAP library of id's Hans Ulrich Besche ## Revision.id09_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 96 ] := rec( diff --git a/small/idlib/id10.0 b/small/idlib/id10.0 index 6031c2c2eb..f2c01bb96d 100644 --- a/small/idlib/id10.0 +++ b/small/idlib/id10.0 @@ -3,7 +3,7 @@ #W id10.0 GAP library of id's Hans Ulrich Besche ## Revision.id10_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 100 ] := rec( diff --git a/small/idlib/id10.4 b/small/idlib/id10.4 index 7213c3c957..2be8889d47 100644 --- a/small/idlib/id10.4 +++ b/small/idlib/id10.4 @@ -3,7 +3,7 @@ #W id10.4 GAP library of id's Hans Ulrich Besche ## Revision.id10_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 104 ] := rec( diff --git a/small/idlib/id10.8 b/small/idlib/id10.8 index 1c10d7f684..2941e5c468 100644 --- a/small/idlib/id10.8 +++ b/small/idlib/id10.8 @@ -3,7 +3,7 @@ #W id10.8 GAP library of id's Hans Ulrich Besche ## Revision.id10_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 108 ] := rec( diff --git a/small/idlib/id100.0 b/small/idlib/id100.0 index 09f45fe85b..249b17c980 100644 --- a/small/idlib/id100.0 +++ b/small/idlib/id100.0 @@ -3,7 +3,7 @@ #W id100.0 GAP library of id's Hans Ulrich Besche ## Revision.id100_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 1000 ] := rec( diff --git a/small/idlib/id11.2 b/small/idlib/id11.2 index c703523ad5..4d2ba01524 100644 --- a/small/idlib/id11.2 +++ b/small/idlib/id11.2 @@ -3,7 +3,7 @@ #W id11.2 GAP library of id's Hans Ulrich Besche ## Revision.id11_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 112 ] := rec( diff --git a/small/idlib/id12.0 b/small/idlib/id12.0 index b8b7e46ab5..6947c3e21f 100644 --- a/small/idlib/id12.0 +++ b/small/idlib/id12.0 @@ -3,7 +3,7 @@ #W id12.0 GAP library of id's Hans Ulrich Besche ## Revision.id12_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 120 ] := rec( diff --git a/small/idlib/id12.6 b/small/idlib/id12.6 index 852eef447c..9526b421a1 100644 --- a/small/idlib/id12.6 +++ b/small/idlib/id12.6 @@ -3,7 +3,7 @@ #W id12.6 GAP library of id's Hans Ulrich Besche ## Revision.id12_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 126 ] := rec( diff --git a/small/idlib/id12.8 b/small/idlib/id12.8 index 8fa469addf..bc563a2d73 100644 --- a/small/idlib/id12.8 +++ b/small/idlib/id12.8 @@ -3,7 +3,7 @@ #W id12.8 GAP library of id's Hans Ulrich Besche ## Revision.id12_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 128 ] := rec( diff --git a/small/idlib/id128.e b/small/idlib/id128.e index c24b7efc56..a4a84dbdd9 100644 --- a/small/idlib/id128.e +++ b/small/idlib/id128.e @@ -3,7 +3,7 @@ #W id128.e GAP library of id's Hans Ulrich Besche ## Revision.id128_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 128 ].next[ 5 ] := rec( diff --git a/small/idlib/id128c.a b/small/idlib/id128c.a index e75295f14b..7d496ed7c0 100644 --- a/small/idlib/id128c.a +++ b/small/idlib/id128c.a @@ -3,7 +3,7 @@ #W id128c.a GAP library of id's Hans Ulrich Besche ## Revision.id128c_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 128 ].next[ 3 ].next[ 1 ] := rec( diff --git a/small/idlib/id128c.b b/small/idlib/id128c.b index c280edd0ec..d77e920f73 100644 --- a/small/idlib/id128c.b +++ b/small/idlib/id128c.b @@ -3,7 +3,7 @@ #W id128c.b GAP library of id's Hans Ulrich Besche ## Revision.id128c_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 128 ].next[ 3 ].next[ 2 ] := rec( diff --git a/small/idlib/id128ca.d b/small/idlib/id128ca.d index 516e8bd106..af982c4e09 100644 --- a/small/idlib/id128ca.d +++ b/small/idlib/id128ca.d @@ -3,7 +3,7 @@ #W id128ca.d GAP library of id's Hans Ulrich Besche ## Revision.id128ca_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 128 ].next[ 3 ].next[ 1 ].next[ 4 ] := rec( diff --git a/small/idlib/id128d.a b/small/idlib/id128d.a index cb7c507bad..eeb74823bb 100644 --- a/small/idlib/id128d.a +++ b/small/idlib/id128d.a @@ -3,7 +3,7 @@ #W id128d.a GAP library of id's Hans Ulrich Besche ## Revision.id128d_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 128 ].next[ 4 ].next[ 1 ] := rec( diff --git a/small/idlib/id128d.b b/small/idlib/id128d.b index 47fd97d744..6caf4a8fa5 100644 --- a/small/idlib/id128d.b +++ b/small/idlib/id128d.b @@ -3,7 +3,7 @@ #W id128d.b GAP library of id's Hans Ulrich Besche ## Revision.id128d_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 128 ].next[ 4 ].next[ 2 ] := rec( diff --git a/small/idlib/id128da.b b/small/idlib/id128da.b index ab6a202d7a..aece1ed0d3 100644 --- a/small/idlib/id128da.b +++ b/small/idlib/id128da.b @@ -3,7 +3,7 @@ #W id128da.b GAP library of id's Hans Ulrich Besche ## Revision.id128da_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 128 ].next[ 4 ].next[ 1 ].next[ 2 ] := rec( diff --git a/small/idlib/id128da.c b/small/idlib/id128da.c index af94680bd3..1bed180513 100644 --- a/small/idlib/id128da.c +++ b/small/idlib/id128da.c @@ -3,7 +3,7 @@ #W id128da.c GAP library of id's Hans Ulrich Besche ## Revision.id128da_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 128 ].next[ 4 ].next[ 1 ].next[ 3 ] := rec( diff --git a/small/idlib/id128da.d b/small/idlib/id128da.d index 1f9d81a3e3..2547b45e52 100644 --- a/small/idlib/id128da.d +++ b/small/idlib/id128da.d @@ -3,7 +3,7 @@ #W id128da.d GAP library of id's Hans Ulrich Besche ## Revision.id128da_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 128 ].next[ 4 ].next[ 1 ].next[ 4 ] := rec( diff --git a/small/idlib/id128db.d b/small/idlib/id128db.d index c5bf6d7948..c905bd744f 100644 --- a/small/idlib/id128db.d +++ b/small/idlib/id128db.d @@ -3,7 +3,7 @@ #W id128db.d GAP library of id's Hans Ulrich Besche ## Revision.id128db_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 128 ].next[ 4 ].next[ 2 ].next[ 4 ] := rec( diff --git a/small/idlib/id128db.f b/small/idlib/id128db.f index a052ed5569..20ac9726cd 100644 --- a/small/idlib/id128db.f +++ b/small/idlib/id128db.f @@ -3,7 +3,7 @@ #W id128db.f GAP library of id's Hans Ulrich Besche ## Revision.id128db_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 128 ].next[ 4 ].next[ 2 ].next[ 6 ] := rec( diff --git a/small/idlib/id128db.i b/small/idlib/id128db.i index 9434a66c87..eeb0ff3dc4 100644 --- a/small/idlib/id128db.i +++ b/small/idlib/id128db.i @@ -3,7 +3,7 @@ #W id128db.i GAP library of id's Hans Ulrich Besche ## Revision.id128db_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 128 ].next[ 4 ].next[ 2 ].next[ 9 ] := rec( diff --git a/small/idlib/id128db.k b/small/idlib/id128db.k index 6b88f4637c..0dd257b774 100644 --- a/small/idlib/id128db.k +++ b/small/idlib/id128db.k @@ -3,7 +3,7 @@ #W id128db.k GAP library of id's Hans Ulrich Besche ## Revision.id128db_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 128 ].next[ 4 ].next[ 2 ].next[ 11 ] := rec( diff --git a/small/idlib/id128db.o b/small/idlib/id128db.o index fcce39683a..93c8f193b9 100644 --- a/small/idlib/id128db.o +++ b/small/idlib/id128db.o @@ -3,7 +3,7 @@ #W id128db.o GAP library of id's Hans Ulrich Besche ## Revision.id128db_o := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 128 ].next[ 4 ].next[ 2 ].next[ 15 ] := rec( diff --git a/small/idlib/id128db.s b/small/idlib/id128db.s index 17094fd500..4d1d6d9e77 100644 --- a/small/idlib/id128db.s +++ b/small/idlib/id128db.s @@ -3,7 +3,7 @@ #W id128db.s GAP library of id's Hans Ulrich Besche ## Revision.id128db_s := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 128 ].next[ 4 ].next[ 2 ].next[ 19 ] := rec( diff --git a/small/idlib/id128db.w b/small/idlib/id128db.w index 483999ca78..4d0d21c7c4 100644 --- a/small/idlib/id128db.w +++ b/small/idlib/id128db.w @@ -3,7 +3,7 @@ #W id128db.w GAP library of id's Hans Ulrich Besche ## Revision.id128db_w := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 128 ].next[ 4 ].next[ 2 ].next[ 23 ] := rec( diff --git a/small/idlib/id128e.b b/small/idlib/id128e.b index 94ad3ddc42..3875c047a0 100644 --- a/small/idlib/id128e.b +++ b/small/idlib/id128e.b @@ -3,7 +3,7 @@ #W id128e.b GAP library of id's Hans Ulrich Besche ## Revision.id128e_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 128 ].next[ 5 ].next[ 2 ] := rec( diff --git a/small/idlib/id13.2 b/small/idlib/id13.2 index a7be6887e9..82a0981fd3 100644 --- a/small/idlib/id13.2 +++ b/small/idlib/id13.2 @@ -3,7 +3,7 @@ #W id13.2 GAP library of id's Hans Ulrich Besche ## Revision.id13_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 132 ] := rec( diff --git a/small/idlib/id13.5 b/small/idlib/id13.5 index 80e183bc49..98ef5342a6 100644 --- a/small/idlib/id13.5 +++ b/small/idlib/id13.5 @@ -3,7 +3,7 @@ #W id13.5 GAP library of id's Hans Ulrich Besche ## Revision.id13_5 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 135 ] := rec( diff --git a/small/idlib/id13.6 b/small/idlib/id13.6 index b9bde01ee8..cb4a80fab5 100644 --- a/small/idlib/id13.6 +++ b/small/idlib/id13.6 @@ -3,7 +3,7 @@ #W id13.6 GAP library of id's Hans Ulrich Besche ## Revision.id13_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 136 ] := rec( diff --git a/small/idlib/id14.0 b/small/idlib/id14.0 index cc95ebbc23..f811753c38 100644 --- a/small/idlib/id14.0 +++ b/small/idlib/id14.0 @@ -3,7 +3,7 @@ #W id14.0 GAP library of id's Hans Ulrich Besche ## Revision.id14_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 140 ] := rec( diff --git a/small/idlib/id14.4 b/small/idlib/id14.4 index 59dd6f69f2..404449a0b2 100644 --- a/small/idlib/id14.4 +++ b/small/idlib/id14.4 @@ -3,7 +3,7 @@ #W id14.4 GAP library of id's Hans Ulrich Besche ## Revision.id14_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 144 ] := rec( diff --git a/small/idlib/id15.0 b/small/idlib/id15.0 index 6ed04c3459..d09e3e6c9f 100644 --- a/small/idlib/id15.0 +++ b/small/idlib/id15.0 @@ -3,7 +3,7 @@ #W id15.0 GAP library of id's Hans Ulrich Besche ## Revision.id15_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 150 ] := rec( diff --git a/small/idlib/id15.2 b/small/idlib/id15.2 index 3b94f724cf..28f106b444 100644 --- a/small/idlib/id15.2 +++ b/small/idlib/id15.2 @@ -3,7 +3,7 @@ #W id15.2 GAP library of id's Hans Ulrich Besche ## Revision.id15_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 152 ] := rec( diff --git a/small/idlib/id15.6 b/small/idlib/id15.6 index e3c0e4740f..c1b0f2b22c 100644 --- a/small/idlib/id15.6 +++ b/small/idlib/id15.6 @@ -3,7 +3,7 @@ #W id15.6 GAP library of id's Hans Ulrich Besche ## Revision.id15_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 156 ] := rec( diff --git a/small/idlib/id16.0 b/small/idlib/id16.0 index ca3bf74223..b40984ec15 100644 --- a/small/idlib/id16.0 +++ b/small/idlib/id16.0 @@ -3,7 +3,7 @@ #W id16.0 GAP library of id's Hans Ulrich Besche ## Revision.id16_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 160 ] := rec( diff --git a/small/idlib/id16.2 b/small/idlib/id16.2 index 87ee17a0cb..8e5e914144 100644 --- a/small/idlib/id16.2 +++ b/small/idlib/id16.2 @@ -3,7 +3,7 @@ #W id16.2 GAP library of id's Hans Ulrich Besche ## Revision.id16_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 162 ] := rec( diff --git a/small/idlib/id16.8 b/small/idlib/id16.8 index b7866d332a..f3e5dfe183 100644 --- a/small/idlib/id16.8 +++ b/small/idlib/id16.8 @@ -3,7 +3,7 @@ #W id16.8 GAP library of id's Hans Ulrich Besche ## Revision.id16_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 168 ] := rec( diff --git a/small/idlib/id17.6 b/small/idlib/id17.6 index 37f6125d3f..b68097d204 100644 --- a/small/idlib/id17.6 +++ b/small/idlib/id17.6 @@ -3,7 +3,7 @@ #W id17.6 GAP library of id's Hans Ulrich Besche ## Revision.id17_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 176 ] := rec( diff --git a/small/idlib/id18.0 b/small/idlib/id18.0 index 268bc5eebc..0379df21b3 100644 --- a/small/idlib/id18.0 +++ b/small/idlib/id18.0 @@ -3,7 +3,7 @@ #W id18.0 GAP library of id's Hans Ulrich Besche ## Revision.id18_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 180 ] := rec( diff --git a/small/idlib/id18.4 b/small/idlib/id18.4 index 493e24351a..14e8ef22e5 100644 --- a/small/idlib/id18.4 +++ b/small/idlib/id18.4 @@ -3,7 +3,7 @@ #W id18.4 GAP library of id's Hans Ulrich Besche ## Revision.id18_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 184 ] := rec( diff --git a/small/idlib/id18.9 b/small/idlib/id18.9 index 73ddafba7b..1175f05fcc 100644 --- a/small/idlib/id18.9 +++ b/small/idlib/id18.9 @@ -3,7 +3,7 @@ #W id18.9 GAP library of id's Hans Ulrich Besche ## Revision.id18_9 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 189 ] := rec( diff --git a/small/idlib/id19.2 b/small/idlib/id19.2 index c333fc29d2..afab794111 100644 --- a/small/idlib/id19.2 +++ b/small/idlib/id19.2 @@ -3,7 +3,7 @@ #W id19.2 GAP library of id's Hans Ulrich Besche ## Revision.id19_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 192 ] := rec( diff --git a/small/idlib/id19.6 b/small/idlib/id19.6 index 9e02f79b62..5799ff4568 100644 --- a/small/idlib/id19.6 +++ b/small/idlib/id19.6 @@ -3,7 +3,7 @@ #W id19.6 GAP library of id's Hans Ulrich Besche ## Revision.id19_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 196 ] := rec( diff --git a/small/idlib/id19.8 b/small/idlib/id19.8 index c1ae832b0b..234ebc18f0 100644 --- a/small/idlib/id19.8 +++ b/small/idlib/id19.8 @@ -3,7 +3,7 @@ #W id19.8 GAP library of id's Hans Ulrich Besche ## Revision.id19_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 198 ] := rec( diff --git a/small/idlib/id192.d b/small/idlib/id192.d index dbd205c35d..079c189251 100644 --- a/small/idlib/id192.d +++ b/small/idlib/id192.d @@ -3,7 +3,7 @@ #W id192.d GAP library of id's Hans Ulrich Besche ## Revision.id192_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 192 ].next[ 4 ] := rec( diff --git a/small/idlib/id192.e b/small/idlib/id192.e index 2f8dae9684..40345e65dc 100644 --- a/small/idlib/id192.e +++ b/small/idlib/id192.e @@ -3,7 +3,7 @@ #W id192.e GAP library of id's Hans Ulrich Besche ## Revision.id192_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 192 ].next[ 5 ] := rec( diff --git a/small/idlib/id192.f b/small/idlib/id192.f index 4def5c91f1..fc1ba2eae8 100644 --- a/small/idlib/id192.f +++ b/small/idlib/id192.f @@ -3,7 +3,7 @@ #W id192.f GAP library of id's Hans Ulrich Besche ## Revision.id192_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 192 ].next[ 6 ] := rec( diff --git a/small/idlib/id192.g b/small/idlib/id192.g index 340e6d4e2e..2f7e7be386 100644 --- a/small/idlib/id192.g +++ b/small/idlib/id192.g @@ -3,7 +3,7 @@ #W id192.g GAP library of id's Hans Ulrich Besche ## Revision.id192_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 192 ].next[ 7 ] := rec( diff --git a/small/idlib/id192.i b/small/idlib/id192.i index 149386c5e6..1826009d1a 100644 --- a/small/idlib/id192.i +++ b/small/idlib/id192.i @@ -3,7 +3,7 @@ #W id192.i GAP library of id's Hans Ulrich Besche ## Revision.id192_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 192 ].next[ 9 ] := rec( diff --git a/small/idlib/id192g.b b/small/idlib/id192g.b index 1e87803b9e..a2e367428f 100644 --- a/small/idlib/id192g.b +++ b/small/idlib/id192g.b @@ -3,7 +3,7 @@ #W id192g.b GAP library of id's Hans Ulrich Besche ## Revision.id192g_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 192 ].next[ 7 ].next[ 2 ] := rec( diff --git a/small/idlib/id192g.d b/small/idlib/id192g.d index 212d51d536..b55ea4b942 100644 --- a/small/idlib/id192g.d +++ b/small/idlib/id192g.d @@ -3,7 +3,7 @@ #W id192g.d GAP library of id's Hans Ulrich Besche ## Revision.id192g_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 192 ].next[ 7 ].next[ 4 ] := rec( diff --git a/small/idlib/id192i.b b/small/idlib/id192i.b index 0ca0244318..adbd2bf679 100644 --- a/small/idlib/id192i.b +++ b/small/idlib/id192i.b @@ -3,7 +3,7 @@ #W id192i.b GAP library of id's Hans Ulrich Besche ## Revision.id192i_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 192 ].next[ 9 ].next[ 2 ] := rec( diff --git a/small/idlib/id192i.c b/small/idlib/id192i.c index 5a8bb5903e..23da914aab 100644 --- a/small/idlib/id192i.c +++ b/small/idlib/id192i.c @@ -3,7 +3,7 @@ #W id192i.c GAP library of id's Hans Ulrich Besche ## Revision.id192i_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 192 ].next[ 9 ].next[ 3 ] := rec( diff --git a/small/idlib/id20.0 b/small/idlib/id20.0 index 62dbe7ec7e..46bd478672 100644 --- a/small/idlib/id20.0 +++ b/small/idlib/id20.0 @@ -3,7 +3,7 @@ #W id20.0 GAP library of id's Hans Ulrich Besche ## Revision.id20_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 200 ] := rec( diff --git a/small/idlib/id20.4 b/small/idlib/id20.4 index 62f28b6cb6..d8fbccdfdf 100644 --- a/small/idlib/id20.4 +++ b/small/idlib/id20.4 @@ -3,7 +3,7 @@ #W id20.4 GAP library of id's Hans Ulrich Besche ## Revision.id20_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 204 ] := rec( diff --git a/small/idlib/id20.8 b/small/idlib/id20.8 index 7f2af00b9e..0f405bf565 100644 --- a/small/idlib/id20.8 +++ b/small/idlib/id20.8 @@ -3,7 +3,7 @@ #W id20.8 GAP library of id's Hans Ulrich Besche ## Revision.id20_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 208 ] := rec( diff --git a/small/idlib/id21.0 b/small/idlib/id21.0 index c425e6a391..11786c986c 100644 --- a/small/idlib/id21.0 +++ b/small/idlib/id21.0 @@ -3,7 +3,7 @@ #W id21.0 GAP library of id's Hans Ulrich Besche ## Revision.id21_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 210 ] := rec( diff --git a/small/idlib/id21.6 b/small/idlib/id21.6 index 208cf20b61..f3f1c2996f 100644 --- a/small/idlib/id21.6 +++ b/small/idlib/id21.6 @@ -3,7 +3,7 @@ #W id21.6 GAP library of id's Hans Ulrich Besche ## Revision.id21_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 216 ] := rec( diff --git a/small/idlib/id22.0 b/small/idlib/id22.0 index 28ff482155..e575be5191 100644 --- a/small/idlib/id22.0 +++ b/small/idlib/id22.0 @@ -3,7 +3,7 @@ #W id22.0 GAP library of id's Hans Ulrich Besche ## Revision.id22_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 220 ] := rec( diff --git a/small/idlib/id22.4 b/small/idlib/id22.4 index 1e9e25b01d..1a0de4a008 100644 --- a/small/idlib/id22.4 +++ b/small/idlib/id22.4 @@ -3,7 +3,7 @@ #W id22.4 GAP library of id's Hans Ulrich Besche ## Revision.id22_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 224 ] := rec( diff --git a/small/idlib/id22.5 b/small/idlib/id22.5 index 66976c9f01..e0e3b0d70a 100644 --- a/small/idlib/id22.5 +++ b/small/idlib/id22.5 @@ -3,7 +3,7 @@ #W id22.5 GAP library of id's Hans Ulrich Besche ## Revision.id22_5 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 225 ] := rec( diff --git a/small/idlib/id22.8 b/small/idlib/id22.8 index 0c2514a12e..ea0c5269c9 100644 --- a/small/idlib/id22.8 +++ b/small/idlib/id22.8 @@ -3,7 +3,7 @@ #W id22.8 GAP library of id's Hans Ulrich Besche ## Revision.id22_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 228 ] := rec( diff --git a/small/idlib/id23.2 b/small/idlib/id23.2 index 8e1f3f1237..fac8b1df16 100644 --- a/small/idlib/id23.2 +++ b/small/idlib/id23.2 @@ -3,7 +3,7 @@ #W id23.2 GAP library of id's Hans Ulrich Besche ## Revision.id23_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 232 ] := rec( diff --git a/small/idlib/id23.4 b/small/idlib/id23.4 index 2965f5e840..a88e98aa6f 100644 --- a/small/idlib/id23.4 +++ b/small/idlib/id23.4 @@ -3,7 +3,7 @@ #W id23.4 GAP library of id's Hans Ulrich Besche ## Revision.id23_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 234 ] := rec( diff --git a/small/idlib/id24.0 b/small/idlib/id24.0 index 6168995fa1..844197ba72 100644 --- a/small/idlib/id24.0 +++ b/small/idlib/id24.0 @@ -3,7 +3,7 @@ #W id24.0 GAP library of id's Hans Ulrich Besche ## Revision.id24_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 240 ] := rec( diff --git a/small/idlib/id24.3 b/small/idlib/id24.3 index ce7c87041b..7274f4a971 100644 --- a/small/idlib/id24.3 +++ b/small/idlib/id24.3 @@ -3,7 +3,7 @@ #W id24.3 GAP library of id's Hans Ulrich Besche ## Revision.id24_3 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 243 ] := rec( diff --git a/small/idlib/id24.8 b/small/idlib/id24.8 index 7fd0ed78cf..33c09f74e6 100644 --- a/small/idlib/id24.8 +++ b/small/idlib/id24.8 @@ -3,7 +3,7 @@ #W id24.8 GAP library of id's Hans Ulrich Besche ## Revision.id24_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 248 ] := rec( diff --git a/small/idlib/id25.0 b/small/idlib/id25.0 index fd6e017c1a..b21a512754 100644 --- a/small/idlib/id25.0 +++ b/small/idlib/id25.0 @@ -3,7 +3,7 @@ #W id25.0 GAP library of id's Hans Ulrich Besche ## Revision.id25_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 250 ] := rec( diff --git a/small/idlib/id25.2 b/small/idlib/id25.2 index 32361bdcef..236765eb49 100644 --- a/small/idlib/id25.2 +++ b/small/idlib/id25.2 @@ -3,7 +3,7 @@ #W id25.2 GAP library of id's Hans Ulrich Besche ## Revision.id25_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 252 ] := rec( diff --git a/small/idlib/id26.0 b/small/idlib/id26.0 index 716a64ab2a..ca575d85d6 100644 --- a/small/idlib/id26.0 +++ b/small/idlib/id26.0 @@ -3,7 +3,7 @@ #W id26.0 GAP library of id's Hans Ulrich Besche ## Revision.id26_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 260 ] := rec( diff --git a/small/idlib/id26.4 b/small/idlib/id26.4 index df957d3f87..87e0a9f170 100644 --- a/small/idlib/id26.4 +++ b/small/idlib/id26.4 @@ -3,7 +3,7 @@ #W id26.4 GAP library of id's Hans Ulrich Besche ## Revision.id26_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 264 ] := rec( diff --git a/small/idlib/id27.0 b/small/idlib/id27.0 index e710810957..7274fb5ae2 100644 --- a/small/idlib/id27.0 +++ b/small/idlib/id27.0 @@ -3,7 +3,7 @@ #W id27.0 GAP library of id's Hans Ulrich Besche ## Revision.id27_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 270 ] := rec( diff --git a/small/idlib/id27.2 b/small/idlib/id27.2 index 12ace20674..ee4e30237c 100644 --- a/small/idlib/id27.2 +++ b/small/idlib/id27.2 @@ -3,7 +3,7 @@ #W id27.2 GAP library of id's Hans Ulrich Besche ## Revision.id27_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 272 ] := rec( diff --git a/small/idlib/id27.6 b/small/idlib/id27.6 index 00b51abca5..e915dc80d5 100644 --- a/small/idlib/id27.6 +++ b/small/idlib/id27.6 @@ -3,7 +3,7 @@ #W id27.6 GAP library of id's Hans Ulrich Besche ## Revision.id27_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 276 ] := rec( diff --git a/small/idlib/id28.0 b/small/idlib/id28.0 index 66a2a54575..7a8e92609d 100644 --- a/small/idlib/id28.0 +++ b/small/idlib/id28.0 @@ -3,7 +3,7 @@ #W id28.0 GAP library of id's Hans Ulrich Besche ## Revision.id28_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 280 ] := rec( diff --git a/small/idlib/id28.8 b/small/idlib/id28.8 index ca89de6543..a6e57b2b82 100644 --- a/small/idlib/id28.8 +++ b/small/idlib/id28.8 @@ -3,7 +3,7 @@ #W id28.8 GAP library of id's Hans Ulrich Besche ## Revision.id28_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 288 ] := rec( diff --git a/small/idlib/id288.d b/small/idlib/id288.d index bc786d197d..d91c7cfbf4 100644 --- a/small/idlib/id288.d +++ b/small/idlib/id288.d @@ -3,7 +3,7 @@ #W id288.d GAP library of id's Hans Ulrich Besche ## Revision.id288_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 288 ].next[ 4 ] := rec( diff --git a/small/idlib/id288.e b/small/idlib/id288.e index ba7540a4bf..73b283a801 100644 --- a/small/idlib/id288.e +++ b/small/idlib/id288.e @@ -3,7 +3,7 @@ #W id288.e GAP library of id's Hans Ulrich Besche ## Revision.id288_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 288 ].next[ 5 ] := rec( diff --git a/small/idlib/id288.g b/small/idlib/id288.g index 2f47f579f6..8bf7013115 100644 --- a/small/idlib/id288.g +++ b/small/idlib/id288.g @@ -3,7 +3,7 @@ #W id288.g GAP library of id's Hans Ulrich Besche ## Revision.id288_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 288 ].next[ 7 ] := rec( diff --git a/small/idlib/id288.h b/small/idlib/id288.h index 22b984ff53..ad28227478 100644 --- a/small/idlib/id288.h +++ b/small/idlib/id288.h @@ -3,7 +3,7 @@ #W id288.h GAP library of id's Hans Ulrich Besche ## Revision.id288_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 288 ].next[ 8 ] := rec( diff --git a/small/idlib/id288.j b/small/idlib/id288.j index 7a39b43b91..98d8e9f743 100644 --- a/small/idlib/id288.j +++ b/small/idlib/id288.j @@ -3,7 +3,7 @@ #W id288.j GAP library of id's Hans Ulrich Besche ## Revision.id288_j := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 288 ].next[ 10 ] := rec( diff --git a/small/idlib/id288.l b/small/idlib/id288.l index aea6ffa893..4441012da2 100644 --- a/small/idlib/id288.l +++ b/small/idlib/id288.l @@ -3,7 +3,7 @@ #W id288.l GAP library of id's Hans Ulrich Besche ## Revision.id288_l := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 288 ].next[ 12 ] := rec( diff --git a/small/idlib/id288.v b/small/idlib/id288.v index 7d2d46e686..91f8afe6f7 100644 --- a/small/idlib/id288.v +++ b/small/idlib/id288.v @@ -3,7 +3,7 @@ #W id288.v GAP library of id's Hans Ulrich Besche ## Revision.id288_v := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 288 ].next[ 22 ] := rec( diff --git a/small/idlib/id288j.c b/small/idlib/id288j.c index 764b5cbe73..72c2e7a2fd 100644 --- a/small/idlib/id288j.c +++ b/small/idlib/id288j.c @@ -3,7 +3,7 @@ #W id288j.c GAP library of id's Hans Ulrich Besche ## Revision.id288j_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 288 ].next[ 10 ].next[ 3 ] := rec( diff --git a/small/idlib/id288l.c b/small/idlib/id288l.c index 577d50db92..2b80624695 100644 --- a/small/idlib/id288l.c +++ b/small/idlib/id288l.c @@ -3,7 +3,7 @@ #W id288l.c GAP library of id's Hans Ulrich Besche ## Revision.id288l_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 288 ].next[ 12 ].next[ 3 ] := rec( diff --git a/small/idlib/id29.4 b/small/idlib/id29.4 index 257fecee7f..bbfbd583cb 100644 --- a/small/idlib/id29.4 +++ b/small/idlib/id29.4 @@ -3,7 +3,7 @@ #W id29.4 GAP library of id's Hans Ulrich Besche ## Revision.id29_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 294 ] := rec( diff --git a/small/idlib/id29.6 b/small/idlib/id29.6 index f1dff6805d..5f290cd089 100644 --- a/small/idlib/id29.6 +++ b/small/idlib/id29.6 @@ -3,7 +3,7 @@ #W id29.6 GAP library of id's Hans Ulrich Besche ## Revision.id29_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 296 ] := rec( diff --git a/small/idlib/id29.7 b/small/idlib/id29.7 index 31d488bb31..8c8b0c7705 100644 --- a/small/idlib/id29.7 +++ b/small/idlib/id29.7 @@ -3,7 +3,7 @@ #W id29.7 GAP library of id's Hans Ulrich Besche ## Revision.id29_7 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 297 ] := rec( diff --git a/small/idlib/id30.0 b/small/idlib/id30.0 index 92b57ce7a5..4b0db7d147 100644 --- a/small/idlib/id30.0 +++ b/small/idlib/id30.0 @@ -3,7 +3,7 @@ #W id30.0 GAP library of id's Hans Ulrich Besche ## Revision.id30_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 300 ] := rec( diff --git a/small/idlib/id30.4 b/small/idlib/id30.4 index 884322c863..aa3c46deb1 100644 --- a/small/idlib/id30.4 +++ b/small/idlib/id30.4 @@ -3,7 +3,7 @@ #W id30.4 GAP library of id's Hans Ulrich Besche ## Revision.id30_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 304 ] := rec( diff --git a/small/idlib/id30.6 b/small/idlib/id30.6 index 3957cf28ed..3691632f02 100644 --- a/small/idlib/id30.6 +++ b/small/idlib/id30.6 @@ -3,7 +3,7 @@ #W id30.6 GAP library of id's Hans Ulrich Besche ## Revision.id30_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 306 ] := rec( diff --git a/small/idlib/id30.8 b/small/idlib/id30.8 index 153230127c..1ab8a4fe39 100644 --- a/small/idlib/id30.8 +++ b/small/idlib/id30.8 @@ -3,7 +3,7 @@ #W id30.8 GAP library of id's Hans Ulrich Besche ## Revision.id30_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 308 ] := rec( diff --git a/small/idlib/id31.2 b/small/idlib/id31.2 index aff65cbd07..2d435dc6f3 100644 --- a/small/idlib/id31.2 +++ b/small/idlib/id31.2 @@ -3,7 +3,7 @@ #W id31.2 GAP library of id's Hans Ulrich Besche ## Revision.id31_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 312 ] := rec( diff --git a/small/idlib/id31.5 b/small/idlib/id31.5 index 45106b8a89..6842238a49 100644 --- a/small/idlib/id31.5 +++ b/small/idlib/id31.5 @@ -3,7 +3,7 @@ #W id31.5 GAP library of id's Hans Ulrich Besche ## Revision.id31_5 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 315 ] := rec( diff --git a/small/idlib/id32.0 b/small/idlib/id32.0 index deb3c51b16..4b342274c5 100644 --- a/small/idlib/id32.0 +++ b/small/idlib/id32.0 @@ -3,7 +3,7 @@ #W id32.0 GAP library of id's Hans Ulrich Besche ## Revision.id32_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 320 ] := rec( diff --git a/small/idlib/id32.4 b/small/idlib/id32.4 index 5028bece74..97091d8d30 100644 --- a/small/idlib/id32.4 +++ b/small/idlib/id32.4 @@ -3,7 +3,7 @@ #W id32.4 GAP library of id's Hans Ulrich Besche ## Revision.id32_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 324 ] := rec( diff --git a/small/idlib/id32.8 b/small/idlib/id32.8 index fc728ec08d..3eebd11952 100644 --- a/small/idlib/id32.8 +++ b/small/idlib/id32.8 @@ -3,7 +3,7 @@ #W id32.8 GAP library of id's Hans Ulrich Besche ## Revision.id32_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 328 ] := rec( diff --git a/small/idlib/id320.c b/small/idlib/id320.c index 1ce1116acf..8f9e52f17f 100644 --- a/small/idlib/id320.c +++ b/small/idlib/id320.c @@ -3,7 +3,7 @@ #W id320.c GAP library of id's Hans Ulrich Besche ## Revision.id320_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 320 ].next[ 3 ] := rec( diff --git a/small/idlib/id320.f b/small/idlib/id320.f index 8604c10232..b59e813ccc 100644 --- a/small/idlib/id320.f +++ b/small/idlib/id320.f @@ -3,7 +3,7 @@ #W id320.f GAP library of id's Hans Ulrich Besche ## Revision.id320_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 320 ].next[ 6 ] := rec( diff --git a/small/idlib/id320.i b/small/idlib/id320.i index 733862ca85..437095e497 100644 --- a/small/idlib/id320.i +++ b/small/idlib/id320.i @@ -3,7 +3,7 @@ #W id320.i GAP library of id's Hans Ulrich Besche ## Revision.id320_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 320 ].next[ 9 ] := rec( diff --git a/small/idlib/id320h.c b/small/idlib/id320h.c index da88390e20..76321fe117 100644 --- a/small/idlib/id320h.c +++ b/small/idlib/id320h.c @@ -3,7 +3,7 @@ #W id320h.c GAP library of id's Hans Ulrich Besche ## Revision.id320h_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 320 ].next[ 8 ].next[ 3 ] := rec( diff --git a/small/idlib/id320h.d b/small/idlib/id320h.d index ccd8dac081..3c0b088afc 100644 --- a/small/idlib/id320h.d +++ b/small/idlib/id320h.d @@ -3,7 +3,7 @@ #W id320h.d GAP library of id's Hans Ulrich Besche ## Revision.id320h_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 320 ].next[ 8 ].next[ 4 ] := rec( diff --git a/small/idlib/id320h.f b/small/idlib/id320h.f index e4bd39d8e6..4d6821c6e4 100644 --- a/small/idlib/id320h.f +++ b/small/idlib/id320h.f @@ -3,7 +3,7 @@ #W id320h.f GAP library of id's Hans Ulrich Besche ## Revision.id320h_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 320 ].next[ 8 ].next[ 6 ] := rec( diff --git a/small/idlib/id320i.c b/small/idlib/id320i.c index 542d892e7a..da9d7401cb 100644 --- a/small/idlib/id320i.c +++ b/small/idlib/id320i.c @@ -3,7 +3,7 @@ #W id320i.c GAP library of id's Hans Ulrich Besche ## Revision.id320i_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 320 ].next[ 9 ].next[ 3 ] := rec( diff --git a/small/idlib/id320i.d b/small/idlib/id320i.d index e26549fb08..6a53f0a9d9 100644 --- a/small/idlib/id320i.d +++ b/small/idlib/id320i.d @@ -3,7 +3,7 @@ #W id320i.d GAP library of id's Hans Ulrich Besche ## Revision.id320i_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 320 ].next[ 9 ].next[ 4 ] := rec( diff --git a/small/idlib/id33.0 b/small/idlib/id33.0 index ff02ed826d..e0a1b94eb8 100644 --- a/small/idlib/id33.0 +++ b/small/idlib/id33.0 @@ -3,7 +3,7 @@ #W id33.0 GAP library of id's Hans Ulrich Besche ## Revision.id33_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 330 ] := rec( diff --git a/small/idlib/id33.6 b/small/idlib/id33.6 index 846f0f0966..88afc36fae 100644 --- a/small/idlib/id33.6 +++ b/small/idlib/id33.6 @@ -3,7 +3,7 @@ #W id33.6 GAP library of id's Hans Ulrich Besche ## Revision.id33_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 336 ] := rec( diff --git a/small/idlib/id34.0 b/small/idlib/id34.0 index 62e133b5e4..76b4fe0906 100644 --- a/small/idlib/id34.0 +++ b/small/idlib/id34.0 @@ -3,7 +3,7 @@ #W id34.0 GAP library of id's Hans Ulrich Besche ## Revision.id34_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 340 ] := rec( diff --git a/small/idlib/id34.2 b/small/idlib/id34.2 index cf25c3ca02..e545317663 100644 --- a/small/idlib/id34.2 +++ b/small/idlib/id34.2 @@ -3,7 +3,7 @@ #W id34.2 GAP library of id's Hans Ulrich Besche ## Revision.id34_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 342 ] := rec( diff --git a/small/idlib/id34.4 b/small/idlib/id34.4 index 308ff61c3f..ace0c5f819 100644 --- a/small/idlib/id34.4 +++ b/small/idlib/id34.4 @@ -3,7 +3,7 @@ #W id34.4 GAP library of id's Hans Ulrich Besche ## Revision.id34_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 344 ] := rec( diff --git a/small/idlib/id34.8 b/small/idlib/id34.8 index 31e288b246..2ef4e5e28b 100644 --- a/small/idlib/id34.8 +++ b/small/idlib/id34.8 @@ -3,7 +3,7 @@ #W id34.8 GAP library of id's Hans Ulrich Besche ## Revision.id34_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 348 ] := rec( diff --git a/small/idlib/id35.0 b/small/idlib/id35.0 index a970677cd8..b18707ee48 100644 --- a/small/idlib/id35.0 +++ b/small/idlib/id35.0 @@ -3,7 +3,7 @@ #W id35.0 GAP library of id's Hans Ulrich Besche ## Revision.id35_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 350 ] := rec( diff --git a/small/idlib/id35.1 b/small/idlib/id35.1 index 7950f63cb6..92c409a408 100644 --- a/small/idlib/id35.1 +++ b/small/idlib/id35.1 @@ -3,7 +3,7 @@ #W id35.1 GAP library of id's Hans Ulrich Besche ## Revision.id35_1 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 351 ] := rec( diff --git a/small/idlib/id35.2 b/small/idlib/id35.2 index 1eea16406d..1ccb4a0a96 100644 --- a/small/idlib/id35.2 +++ b/small/idlib/id35.2 @@ -3,7 +3,7 @@ #W id35.2 GAP library of id's Hans Ulrich Besche ## Revision.id35_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 352 ] := rec( diff --git a/small/idlib/id36.0 b/small/idlib/id36.0 index b316e5b237..b834dbb6a4 100644 --- a/small/idlib/id36.0 +++ b/small/idlib/id36.0 @@ -3,7 +3,7 @@ #W id36.0 GAP library of id's Hans Ulrich Besche ## Revision.id36_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 360 ] := rec( diff --git a/small/idlib/id36.4 b/small/idlib/id36.4 index 975470c2e7..cf9694098b 100644 --- a/small/idlib/id36.4 +++ b/small/idlib/id36.4 @@ -3,7 +3,7 @@ #W id36.4 GAP library of id's Hans Ulrich Besche ## Revision.id36_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 364 ] := rec( diff --git a/small/idlib/id36.8 b/small/idlib/id36.8 index f120f17476..a87a14d44b 100644 --- a/small/idlib/id36.8 +++ b/small/idlib/id36.8 @@ -3,7 +3,7 @@ #W id36.8 GAP library of id's Hans Ulrich Besche ## Revision.id36_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 368 ] := rec( diff --git a/small/idlib/id37.2 b/small/idlib/id37.2 index 6404124c24..63a4cef2db 100644 --- a/small/idlib/id37.2 +++ b/small/idlib/id37.2 @@ -3,7 +3,7 @@ #W id37.2 GAP library of id's Hans Ulrich Besche ## Revision.id37_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 372 ] := rec( diff --git a/small/idlib/id37.5 b/small/idlib/id37.5 index 4603311bd6..9801a3aa25 100644 --- a/small/idlib/id37.5 +++ b/small/idlib/id37.5 @@ -3,7 +3,7 @@ #W id37.5 GAP library of id's Hans Ulrich Besche ## Revision.id37_5 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 375 ] := rec( diff --git a/small/idlib/id37.6 b/small/idlib/id37.6 index 36c6f7995c..787d0ff05f 100644 --- a/small/idlib/id37.6 +++ b/small/idlib/id37.6 @@ -3,7 +3,7 @@ #W id37.6 GAP library of id's Hans Ulrich Besche ## Revision.id37_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 376 ] := rec( diff --git a/small/idlib/id37.8 b/small/idlib/id37.8 index f06d8a338b..49530a9fca 100644 --- a/small/idlib/id37.8 +++ b/small/idlib/id37.8 @@ -3,7 +3,7 @@ #W id37.8 GAP library of id's Hans Ulrich Besche ## Revision.id37_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 378 ] := rec( diff --git a/small/idlib/id38.0 b/small/idlib/id38.0 index fe4c484b79..f425eb2fb1 100644 --- a/small/idlib/id38.0 +++ b/small/idlib/id38.0 @@ -3,7 +3,7 @@ #W id38.0 GAP library of id's Hans Ulrich Besche ## Revision.id38_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 380 ] := rec( diff --git a/small/idlib/id38.4 b/small/idlib/id38.4 index 48d34895df..3c9e1007aa 100644 --- a/small/idlib/id38.4 +++ b/small/idlib/id38.4 @@ -3,7 +3,7 @@ #W id38.4 GAP library of id's Hans Ulrich Besche ## Revision.id38_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ] := rec( diff --git a/small/idlib/id384.b b/small/idlib/id384.b index 352a1e7016..d1f8cb1d14 100644 --- a/small/idlib/id384.b +++ b/small/idlib/id384.b @@ -3,7 +3,7 @@ #W id384.b GAP library of id's Hans Ulrich Besche ## Revision.id384_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 2 ] := rec( diff --git a/small/idlib/id384.e b/small/idlib/id384.e index cc183dd35d..e7a36bdf57 100644 --- a/small/idlib/id384.e +++ b/small/idlib/id384.e @@ -3,7 +3,7 @@ #W id384.e GAP library of id's Hans Ulrich Besche ## Revision.id384_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 5 ] := rec( diff --git a/small/idlib/id384.f b/small/idlib/id384.f index 7a8cabf72c..63d72e41b9 100644 --- a/small/idlib/id384.f +++ b/small/idlib/id384.f @@ -3,7 +3,7 @@ #W id384.f GAP library of id's Hans Ulrich Besche ## Revision.id384_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 6 ] := rec( diff --git a/small/idlib/id384.g b/small/idlib/id384.g index 9770d56e15..0feada694b 100644 --- a/small/idlib/id384.g +++ b/small/idlib/id384.g @@ -3,7 +3,7 @@ #W id384.g GAP library of id's Hans Ulrich Besche ## Revision.id384_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ] := rec( diff --git a/small/idlib/id384.h b/small/idlib/id384.h index 6eb1482333..b394cc7b90 100644 --- a/small/idlib/id384.h +++ b/small/idlib/id384.h @@ -3,7 +3,7 @@ #W id384.h GAP library of id's Hans Ulrich Besche ## Revision.id384_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 8 ] := rec( diff --git a/small/idlib/id384.k b/small/idlib/id384.k index bd4ac7336d..a5fd6b5ad3 100644 --- a/small/idlib/id384.k +++ b/small/idlib/id384.k @@ -3,7 +3,7 @@ #W id384.k GAP library of id's Hans Ulrich Besche ## Revision.id384_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 11 ] := rec( diff --git a/small/idlib/id384.p b/small/idlib/id384.p index 6ef845e164..17773084dd 100644 --- a/small/idlib/id384.p +++ b/small/idlib/id384.p @@ -3,7 +3,7 @@ #W id384.p GAP library of id's Hans Ulrich Besche ## Revision.id384_p := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 16 ] := rec( diff --git a/small/idlib/id384.q b/small/idlib/id384.q index 60c4e2c9c5..29379b692c 100644 --- a/small/idlib/id384.q +++ b/small/idlib/id384.q @@ -3,7 +3,7 @@ #W id384.q GAP library of id's Hans Ulrich Besche ## Revision.id384_q := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 17 ] := rec( diff --git a/small/idlib/id384.r b/small/idlib/id384.r index c7585720c3..615ae2aa79 100644 --- a/small/idlib/id384.r +++ b/small/idlib/id384.r @@ -3,7 +3,7 @@ #W id384.r GAP library of id's Hans Ulrich Besche ## Revision.id384_r := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 18 ] := rec( diff --git a/small/idlib/id384.s b/small/idlib/id384.s index c3a8236066..1bd387dd18 100644 --- a/small/idlib/id384.s +++ b/small/idlib/id384.s @@ -3,7 +3,7 @@ #W id384.s GAP library of id's Hans Ulrich Besche ## Revision.id384_s := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 19 ] := rec( diff --git a/small/idlib/id384.t b/small/idlib/id384.t index f30bf8fb7e..868066a025 100644 --- a/small/idlib/id384.t +++ b/small/idlib/id384.t @@ -3,7 +3,7 @@ #W id384.t GAP library of id's Hans Ulrich Besche ## Revision.id384_t := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 20 ] := rec( diff --git a/small/idlib/id384a.b b/small/idlib/id384a.b index 8f83c53780..d4a7f8d5fc 100644 --- a/small/idlib/id384a.b +++ b/small/idlib/id384a.b @@ -3,7 +3,7 @@ #W id384a.b GAP library of id's Hans Ulrich Besche ## Revision.id384a_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 28 ] := rec( diff --git a/small/idlib/id384a.e b/small/idlib/id384a.e index 2569c16650..ebbadb6847 100644 --- a/small/idlib/id384a.e +++ b/small/idlib/id384a.e @@ -3,7 +3,7 @@ #W id384a.e GAP library of id's Hans Ulrich Besche ## Revision.id384a_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 31 ] := rec( diff --git a/small/idlib/id384ac.b b/small/idlib/id384ac.b index 944c8585b0..bcf414f5ab 100644 --- a/small/idlib/id384ac.b +++ b/small/idlib/id384ac.b @@ -3,7 +3,7 @@ #W id384ac.b GAP library of id's Hans Ulrich Besche ## Revision.id384ac_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 29 ].next[ 2 ] := rec( diff --git a/small/idlib/id384d.b b/small/idlib/id384d.b index 38e686f1a8..c19d403494 100644 --- a/small/idlib/id384d.b +++ b/small/idlib/id384d.b @@ -3,7 +3,7 @@ #W id384d.b GAP library of id's Hans Ulrich Besche ## Revision.id384d_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 4 ].next[ 2 ] := rec( diff --git a/small/idlib/id384d.c b/small/idlib/id384d.c index 8ab4c47340..5a5c3a9570 100644 --- a/small/idlib/id384d.c +++ b/small/idlib/id384d.c @@ -3,7 +3,7 @@ #W id384d.c GAP library of id's Hans Ulrich Besche ## Revision.id384d_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 4 ].next[ 3 ] := rec( diff --git a/small/idlib/id384db.d b/small/idlib/id384db.d index fb4b81b53e..0d2195e3a6 100644 --- a/small/idlib/id384db.d +++ b/small/idlib/id384db.d @@ -3,7 +3,7 @@ #W id384db.d GAP library of id's Hans Ulrich Besche ## Revision.id384db_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 4 ].next[ 2 ].next[ 4 ] := rec( diff --git a/small/idlib/id384e.b b/small/idlib/id384e.b index 1404237bec..dc265ee3bd 100644 --- a/small/idlib/id384e.b +++ b/small/idlib/id384e.b @@ -3,7 +3,7 @@ #W id384e.b GAP library of id's Hans Ulrich Besche ## Revision.id384e_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 5 ].next[ 2 ] := rec( diff --git a/small/idlib/id384f.a b/small/idlib/id384f.a index 8b0ec6d26e..703eac4b0d 100644 --- a/small/idlib/id384f.a +++ b/small/idlib/id384f.a @@ -3,7 +3,7 @@ #W id384f.a GAP library of id's Hans Ulrich Besche ## Revision.id384f_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 6 ].next[ 1 ] := rec( diff --git a/small/idlib/id384f.b b/small/idlib/id384f.b index 5e9e0e61cf..948bb20454 100644 --- a/small/idlib/id384f.b +++ b/small/idlib/id384f.b @@ -3,7 +3,7 @@ #W id384f.b GAP library of id's Hans Ulrich Besche ## Revision.id384f_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 6 ].next[ 2 ] := rec( diff --git a/small/idlib/id384fa.b b/small/idlib/id384fa.b index 888834cf21..f1bc92519d 100644 --- a/small/idlib/id384fa.b +++ b/small/idlib/id384fa.b @@ -3,7 +3,7 @@ #W id384fa.b GAP library of id's Hans Ulrich Besche ## Revision.id384fa_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 6 ].next[ 1 ].next[ 2 ] := rec( diff --git a/small/idlib/id384fa.d b/small/idlib/id384fa.d index 00f781559d..1e337d8510 100644 --- a/small/idlib/id384fa.d +++ b/small/idlib/id384fa.d @@ -3,7 +3,7 @@ #W id384fa.d GAP library of id's Hans Ulrich Besche ## Revision.id384fa_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 6 ].next[ 1 ].next[ 4 ] := rec( diff --git a/small/idlib/id384fa.e b/small/idlib/id384fa.e index d2bc786f53..967b93aa01 100644 --- a/small/idlib/id384fa.e +++ b/small/idlib/id384fa.e @@ -3,7 +3,7 @@ #W id384fa.e GAP library of id's Hans Ulrich Besche ## Revision.id384fa_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 6 ].next[ 1 ].next[ 5 ] := rec( diff --git a/small/idlib/id384fb.d b/small/idlib/id384fb.d index c0572f077f..b4dffb0209 100644 --- a/small/idlib/id384fb.d +++ b/small/idlib/id384fb.d @@ -3,7 +3,7 @@ #W id384fb.d GAP library of id's Hans Ulrich Besche ## Revision.id384fb_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 6 ].next[ 2 ].next[ 4 ] := rec( diff --git a/small/idlib/id384fb.e b/small/idlib/id384fb.e index 23e927a551..d43fbedc05 100644 --- a/small/idlib/id384fb.e +++ b/small/idlib/id384fb.e @@ -3,7 +3,7 @@ #W id384fb.e GAP library of id's Hans Ulrich Besche ## Revision.id384fb_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 6 ].next[ 2 ].next[ 5 ] := rec( diff --git a/small/idlib/id384fb.i b/small/idlib/id384fb.i index 30056be198..a3b1de2b26 100644 --- a/small/idlib/id384fb.i +++ b/small/idlib/id384fb.i @@ -3,7 +3,7 @@ #W id384fb.i GAP library of id's Hans Ulrich Besche ## Revision.id384fb_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 6 ].next[ 2 ].next[ 9 ] := rec( diff --git a/small/idlib/id384fb.j b/small/idlib/id384fb.j index 64d89dacfe..5b0b388c5e 100644 --- a/small/idlib/id384fb.j +++ b/small/idlib/id384fb.j @@ -3,7 +3,7 @@ #W id384fb.j GAP library of id's Hans Ulrich Besche ## Revision.id384fb_j := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 6 ].next[ 2 ].next[ 10 ] := rec( diff --git a/small/idlib/id384fb.p b/small/idlib/id384fb.p index 68717bdf10..0ff4ef6ec3 100644 --- a/small/idlib/id384fb.p +++ b/small/idlib/id384fb.p @@ -3,7 +3,7 @@ #W id384fb.p GAP library of id's Hans Ulrich Besche ## Revision.id384fb_p := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 6 ].next[ 2 ].next[ 16 ] := rec( diff --git a/small/idlib/id384fb.t b/small/idlib/id384fb.t index e5e66fb140..bb44ff4e8c 100644 --- a/small/idlib/id384fb.t +++ b/small/idlib/id384fb.t @@ -3,7 +3,7 @@ #W id384fb.t GAP library of id's Hans Ulrich Besche ## Revision.id384fb_t := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 6 ].next[ 2 ].next[ 20 ] := rec( diff --git a/small/idlib/id384fb.y b/small/idlib/id384fb.y index 694e4871d3..cf62c3b5e3 100644 --- a/small/idlib/id384fb.y +++ b/small/idlib/id384fb.y @@ -3,7 +3,7 @@ #W id384fb.y GAP library of id's Hans Ulrich Besche ## Revision.id384fb_y := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 6 ].next[ 2 ].next[ 25 ] := rec( diff --git a/small/idlib/id384g.b b/small/idlib/id384g.b index 14e770ae1a..03c65b036f 100644 --- a/small/idlib/id384g.b +++ b/small/idlib/id384g.b @@ -3,7 +3,7 @@ #W id384g.b GAP library of id's Hans Ulrich Besche ## Revision.id384g_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 2 ] := rec( diff --git a/small/idlib/id384g.c b/small/idlib/id384g.c index a148bcac69..9dd7d1ba2a 100644 --- a/small/idlib/id384g.c +++ b/small/idlib/id384g.c @@ -3,7 +3,7 @@ #W id384g.c GAP library of id's Hans Ulrich Besche ## Revision.id384g_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 3 ] := rec( diff --git a/small/idlib/id384g.d b/small/idlib/id384g.d index 033cf7209d..da095b1830 100644 --- a/small/idlib/id384g.d +++ b/small/idlib/id384g.d @@ -3,7 +3,7 @@ #W id384g.d GAP library of id's Hans Ulrich Besche ## Revision.id384g_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 4 ] := rec( diff --git a/small/idlib/id384gb.a b/small/idlib/id384gb.a index fca00a0b78..d68c12f671 100644 --- a/small/idlib/id384gb.a +++ b/small/idlib/id384gb.a @@ -3,7 +3,7 @@ #W id384gb.a GAP library of id's Hans Ulrich Besche ## Revision.id384gb_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 2 ].next[ 1 ] := rec( diff --git a/small/idlib/id384gb.c b/small/idlib/id384gb.c index d6f8d5d8ad..c8b5e2a6ea 100644 --- a/small/idlib/id384gb.c +++ b/small/idlib/id384gb.c @@ -3,7 +3,7 @@ #W id384gb.c GAP library of id's Hans Ulrich Besche ## Revision.id384gb_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 2 ].next[ 3 ] := rec( diff --git a/small/idlib/id384gb.e b/small/idlib/id384gb.e index 29f9a01e21..11312d7b58 100644 --- a/small/idlib/id384gb.e +++ b/small/idlib/id384gb.e @@ -3,7 +3,7 @@ #W id384gb.e GAP library of id's Hans Ulrich Besche ## Revision.id384gb_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 2 ].next[ 5 ] := rec( diff --git a/small/idlib/id384gb.f b/small/idlib/id384gb.f index 9d715578c6..737d2d379f 100644 --- a/small/idlib/id384gb.f +++ b/small/idlib/id384gb.f @@ -3,7 +3,7 @@ #W id384gb.f GAP library of id's Hans Ulrich Besche ## Revision.id384gb_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 2 ].next[ 6 ] := rec( diff --git a/small/idlib/id384gb.h b/small/idlib/id384gb.h index 077b7094e9..613091700e 100644 --- a/small/idlib/id384gb.h +++ b/small/idlib/id384gb.h @@ -3,7 +3,7 @@ #W id384gb.h GAP library of id's Hans Ulrich Besche ## Revision.id384gb_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 2 ].next[ 8 ] := rec( diff --git a/small/idlib/id384gb.j b/small/idlib/id384gb.j index ff79c2dba8..6e2bbb1621 100644 --- a/small/idlib/id384gb.j +++ b/small/idlib/id384gb.j @@ -3,7 +3,7 @@ #W id384gb.j GAP library of id's Hans Ulrich Besche ## Revision.id384gb_j := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 2 ].next[ 10 ] := rec( diff --git a/small/idlib/id384gb.m b/small/idlib/id384gb.m index 039f85cd6a..cbf0d3e3c8 100644 --- a/small/idlib/id384gb.m +++ b/small/idlib/id384gb.m @@ -3,7 +3,7 @@ #W id384gb.m GAP library of id's Hans Ulrich Besche ## Revision.id384gb_m := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 2 ].next[ 13 ] := rec( diff --git a/small/idlib/id384gb.n b/small/idlib/id384gb.n index c2d52e5300..accde86825 100644 --- a/small/idlib/id384gb.n +++ b/small/idlib/id384gb.n @@ -3,7 +3,7 @@ #W id384gb.n GAP library of id's Hans Ulrich Besche ## Revision.id384gb_n := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 2 ].next[ 14 ] := rec( diff --git a/small/idlib/id384gb.q b/small/idlib/id384gb.q index 94d0ec5717..8bafb725b7 100644 --- a/small/idlib/id384gb.q +++ b/small/idlib/id384gb.q @@ -3,7 +3,7 @@ #W id384gb.q GAP library of id's Hans Ulrich Besche ## Revision.id384gb_q := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 2 ].next[ 17 ] := rec( diff --git a/small/idlib/id384gb.r b/small/idlib/id384gb.r index 086ae09a8e..17e8ce7677 100644 --- a/small/idlib/id384gb.r +++ b/small/idlib/id384gb.r @@ -3,7 +3,7 @@ #W id384gb.r GAP library of id's Hans Ulrich Besche ## Revision.id384gb_r := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 2 ].next[ 18 ] := rec( diff --git a/small/idlib/id384gb.u b/small/idlib/id384gb.u index 3c13667d44..13dde0b85c 100644 --- a/small/idlib/id384gb.u +++ b/small/idlib/id384gb.u @@ -3,7 +3,7 @@ #W id384gb.u GAP library of id's Hans Ulrich Besche ## Revision.id384gb_u := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 2 ].next[ 21 ] := rec( diff --git a/small/idlib/id384gb.x b/small/idlib/id384gb.x index 91a77b0ab8..4ef9ad881b 100644 --- a/small/idlib/id384gb.x +++ b/small/idlib/id384gb.x @@ -3,7 +3,7 @@ #W id384gb.x GAP library of id's Hans Ulrich Besche ## Revision.id384gb_x := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 2 ].next[ 24 ] := rec( diff --git a/small/idlib/id384gb.y b/small/idlib/id384gb.y index f962601e95..0cfb8aeaba 100644 --- a/small/idlib/id384gb.y +++ b/small/idlib/id384gb.y @@ -3,7 +3,7 @@ #W id384gb.y GAP library of id's Hans Ulrich Besche ## Revision.id384gb_y := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 2 ].next[ 25 ] := rec( diff --git a/small/idlib/id384gba.b b/small/idlib/id384gba.b index 48094b4b3b..fdf4eb4702 100644 --- a/small/idlib/id384gba.b +++ b/small/idlib/id384gba.b @@ -3,7 +3,7 @@ #W id384gba.b GAP library of id's Hans Ulrich Besche ## Revision.id384gba_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 2 ].next[ 28 ] := rec( diff --git a/small/idlib/id384gba.c b/small/idlib/id384gba.c index fefe89982f..be624baa6f 100644 --- a/small/idlib/id384gba.c +++ b/small/idlib/id384gba.c @@ -3,7 +3,7 @@ #W id384gba.c GAP library of id's Hans Ulrich Besche ## Revision.id384gba_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 2 ].next[ 29 ] := rec( diff --git a/small/idlib/id384gba.d b/small/idlib/id384gba.d index c587380204..502afe30e0 100644 --- a/small/idlib/id384gba.d +++ b/small/idlib/id384gba.d @@ -3,7 +3,7 @@ #W id384gba.d GAP library of id's Hans Ulrich Besche ## Revision.id384gba_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 2 ].next[ 30 ] := rec( diff --git a/small/idlib/id384gba.f b/small/idlib/id384gba.f index 037f3ee7cd..ec4ff1adef 100644 --- a/small/idlib/id384gba.f +++ b/small/idlib/id384gba.f @@ -3,7 +3,7 @@ #W id384gba.f GAP library of id's Hans Ulrich Besche ## Revision.id384gba_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 2 ].next[ 32 ] := rec( diff --git a/small/idlib/id384gba.j b/small/idlib/id384gba.j index 2bd0e7313d..3f6c817f23 100644 --- a/small/idlib/id384gba.j +++ b/small/idlib/id384gba.j @@ -3,7 +3,7 @@ #W id384gba.j GAP library of id's Hans Ulrich Besche ## Revision.id384gba_j := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 2 ].next[ 36 ] := rec( diff --git a/small/idlib/id384gd.g b/small/idlib/id384gd.g index b22d7881a1..ca8351be1e 100644 --- a/small/idlib/id384gd.g +++ b/small/idlib/id384gd.g @@ -3,7 +3,7 @@ #W id384gd.g GAP library of id's Hans Ulrich Besche ## Revision.id384gd_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 4 ].next[ 7 ] := rec( diff --git a/small/idlib/id384gd.q b/small/idlib/id384gd.q index 328a622f38..a2de8adff2 100644 --- a/small/idlib/id384gd.q +++ b/small/idlib/id384gd.q @@ -3,7 +3,7 @@ #W id384gd.q GAP library of id's Hans Ulrich Besche ## Revision.id384gd_q := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 4 ].next[ 17 ] := rec( diff --git a/small/idlib/id384gda.e b/small/idlib/id384gda.e index 889b30838b..b9583f7712 100644 --- a/small/idlib/id384gda.e +++ b/small/idlib/id384gda.e @@ -3,7 +3,7 @@ #W id384gda.e GAP library of id's Hans Ulrich Besche ## Revision.id384gda_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 4 ].next[ 31 ] := rec( diff --git a/small/idlib/id384gda.n b/small/idlib/id384gda.n index 10d880add7..4c62e4c88b 100644 --- a/small/idlib/id384gda.n +++ b/small/idlib/id384gda.n @@ -3,7 +3,7 @@ #W id384gda.n GAP library of id's Hans Ulrich Besche ## Revision.id384gda_n := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 4 ].next[ 40 ] := rec( diff --git a/small/idlib/id384gda.s b/small/idlib/id384gda.s index 49b2f988fd..b7de8c7740 100644 --- a/small/idlib/id384gda.s +++ b/small/idlib/id384gda.s @@ -3,7 +3,7 @@ #W id384gda.s GAP library of id's Hans Ulrich Besche ## Revision.id384gda_s := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 4 ].next[ 45 ] := rec( diff --git a/small/idlib/id384gda.x b/small/idlib/id384gda.x index 6eed148159..6288c460d0 100644 --- a/small/idlib/id384gda.x +++ b/small/idlib/id384gda.x @@ -3,7 +3,7 @@ #W id384gda.x GAP library of id's Hans Ulrich Besche ## Revision.id384gda_x := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 7 ].next[ 4 ].next[ 50 ] := rec( diff --git a/small/idlib/id384h.d b/small/idlib/id384h.d index 9480800d3b..eaa2f5ea4d 100644 --- a/small/idlib/id384h.d +++ b/small/idlib/id384h.d @@ -3,7 +3,7 @@ #W id384h.d GAP library of id's Hans Ulrich Besche ## Revision.id384h_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 8 ].next[ 4 ] := rec( diff --git a/small/idlib/id384i.b b/small/idlib/id384i.b index 17ac07e751..875753c799 100644 --- a/small/idlib/id384i.b +++ b/small/idlib/id384i.b @@ -3,7 +3,7 @@ #W id384i.b GAP library of id's Hans Ulrich Besche ## Revision.id384i_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ] := rec( diff --git a/small/idlib/id384i.c b/small/idlib/id384i.c index 5d174282cb..298899b96c 100644 --- a/small/idlib/id384i.c +++ b/small/idlib/id384i.c @@ -3,7 +3,7 @@ #W id384i.c GAP library of id's Hans Ulrich Besche ## Revision.id384i_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 3 ] := rec( diff --git a/small/idlib/id384i.d b/small/idlib/id384i.d index 0b1dde91cd..ea72c34ba9 100644 --- a/small/idlib/id384i.d +++ b/small/idlib/id384i.d @@ -3,7 +3,7 @@ #W id384i.d GAP library of id's Hans Ulrich Besche ## Revision.id384i_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ] := rec( diff --git a/small/idlib/id384i.e b/small/idlib/id384i.e index d6a5f00caf..5c3733c05c 100644 --- a/small/idlib/id384i.e +++ b/small/idlib/id384i.e @@ -3,7 +3,7 @@ #W id384i.e GAP library of id's Hans Ulrich Besche ## Revision.id384i_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 5 ] := rec( diff --git a/small/idlib/id384i.f b/small/idlib/id384i.f index 655edaf81b..eb6f75e76d 100644 --- a/small/idlib/id384i.f +++ b/small/idlib/id384i.f @@ -3,7 +3,7 @@ #W id384i.f GAP library of id's Hans Ulrich Besche ## Revision.id384i_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 6 ] := rec( diff --git a/small/idlib/id384ib.a b/small/idlib/id384ib.a index b465a11af5..a61e3f2fda 100644 --- a/small/idlib/id384ib.a +++ b/small/idlib/id384ib.a @@ -3,7 +3,7 @@ #W id384ib.a GAP library of id's Hans Ulrich Besche ## Revision.id384ib_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 1 ] := rec( diff --git a/small/idlib/id384ib.b b/small/idlib/id384ib.b index 928d3a2da6..94e0cb3b3c 100644 --- a/small/idlib/id384ib.b +++ b/small/idlib/id384ib.b @@ -3,7 +3,7 @@ #W id384ib.b GAP library of id's Hans Ulrich Besche ## Revision.id384ib_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 2 ] := rec( diff --git a/small/idlib/id384ib.d b/small/idlib/id384ib.d index b309688544..1ab6c49fa7 100644 --- a/small/idlib/id384ib.d +++ b/small/idlib/id384ib.d @@ -3,7 +3,7 @@ #W id384ib.d GAP library of id's Hans Ulrich Besche ## Revision.id384ib_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 4 ] := rec( diff --git a/small/idlib/id384ib.e b/small/idlib/id384ib.e index 832aa11710..fbd0e30494 100644 --- a/small/idlib/id384ib.e +++ b/small/idlib/id384ib.e @@ -3,7 +3,7 @@ #W id384ib.e GAP library of id's Hans Ulrich Besche ## Revision.id384ib_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 5 ] := rec( diff --git a/small/idlib/id384ib.g b/small/idlib/id384ib.g index a25e376e9f..411edcec44 100644 --- a/small/idlib/id384ib.g +++ b/small/idlib/id384ib.g @@ -3,7 +3,7 @@ #W id384ib.g GAP library of id's Hans Ulrich Besche ## Revision.id384ib_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 7 ] := rec( diff --git a/small/idlib/id384ib.h b/small/idlib/id384ib.h index 2bf47d2106..8cbfb964ac 100644 --- a/small/idlib/id384ib.h +++ b/small/idlib/id384ib.h @@ -3,7 +3,7 @@ #W id384ib.h GAP library of id's Hans Ulrich Besche ## Revision.id384ib_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 8 ] := rec( diff --git a/small/idlib/id384ib.k b/small/idlib/id384ib.k index 2ab299b5f2..3a09f314d8 100644 --- a/small/idlib/id384ib.k +++ b/small/idlib/id384ib.k @@ -3,7 +3,7 @@ #W id384ib.k GAP library of id's Hans Ulrich Besche ## Revision.id384ib_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 11 ] := rec( diff --git a/small/idlib/id384ib.m b/small/idlib/id384ib.m index 5d81d07d00..03b578b09b 100644 --- a/small/idlib/id384ib.m +++ b/small/idlib/id384ib.m @@ -3,7 +3,7 @@ #W id384ib.m GAP library of id's Hans Ulrich Besche ## Revision.id384ib_m := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 13 ] := rec( diff --git a/small/idlib/id384ib.o b/small/idlib/id384ib.o index abdb6e682b..f0e8ea6e02 100644 --- a/small/idlib/id384ib.o +++ b/small/idlib/id384ib.o @@ -3,7 +3,7 @@ #W id384ib.o GAP library of id's Hans Ulrich Besche ## Revision.id384ib_o := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 15 ] := rec( diff --git a/small/idlib/id384ib.p b/small/idlib/id384ib.p index e8a14bcd52..aca7c018c7 100644 --- a/small/idlib/id384ib.p +++ b/small/idlib/id384ib.p @@ -3,7 +3,7 @@ #W id384ib.p GAP library of id's Hans Ulrich Besche ## Revision.id384ib_p := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 16 ] := rec( diff --git a/small/idlib/id384ib.t b/small/idlib/id384ib.t index e27aa582ee..f2be5bb51d 100644 --- a/small/idlib/id384ib.t +++ b/small/idlib/id384ib.t @@ -3,7 +3,7 @@ #W id384ib.t GAP library of id's Hans Ulrich Besche ## Revision.id384ib_t := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 20 ] := rec( diff --git a/small/idlib/id384ib.v b/small/idlib/id384ib.v index b52eb88a86..4d6437a18c 100644 --- a/small/idlib/id384ib.v +++ b/small/idlib/id384ib.v @@ -3,7 +3,7 @@ #W id384ib.v GAP library of id's Hans Ulrich Besche ## Revision.id384ib_v := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 22 ] := rec( diff --git a/small/idlib/id384ib.x b/small/idlib/id384ib.x index 9ad4da5ea8..9032c8f8b1 100644 --- a/small/idlib/id384ib.x +++ b/small/idlib/id384ib.x @@ -3,7 +3,7 @@ #W id384ib.x GAP library of id's Hans Ulrich Besche ## Revision.id384ib_x := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 24 ] := rec( diff --git a/small/idlib/id384ib.y b/small/idlib/id384ib.y index 87a20005b3..5ff3c2e009 100644 --- a/small/idlib/id384ib.y +++ b/small/idlib/id384ib.y @@ -3,7 +3,7 @@ #W id384ib.y GAP library of id's Hans Ulrich Besche ## Revision.id384ib_y := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 25 ] := rec( diff --git a/small/idlib/id384iba.b b/small/idlib/id384iba.b index 4a828b1875..2b64a9233f 100644 --- a/small/idlib/id384iba.b +++ b/small/idlib/id384iba.b @@ -3,7 +3,7 @@ #W id384iba.b GAP library of id's Hans Ulrich Besche ## Revision.id384iba_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 28 ] := rec( diff --git a/small/idlib/id384iba.f b/small/idlib/id384iba.f index 01ade925f7..a82df19e0e 100644 --- a/small/idlib/id384iba.f +++ b/small/idlib/id384iba.f @@ -3,7 +3,7 @@ #W id384iba.f GAP library of id's Hans Ulrich Besche ## Revision.id384iba_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 1 ].next[ 6 ] := rec( diff --git a/small/idlib/id384iba.l b/small/idlib/id384iba.l index d85cd07b5a..4760b938ba 100644 --- a/small/idlib/id384iba.l +++ b/small/idlib/id384iba.l @@ -3,7 +3,7 @@ #W id384iba.l GAP library of id's Hans Ulrich Besche ## Revision.id384iba_l := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 1 ].next[ 12 ] := rec( diff --git a/small/idlib/id384iba.m b/small/idlib/id384iba.m index daf3212d8c..8173264fa7 100644 --- a/small/idlib/id384iba.m +++ b/small/idlib/id384iba.m @@ -3,7 +3,7 @@ #W id384iba.m GAP library of id's Hans Ulrich Besche ## Revision.id384iba_m := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 1 ].next[ 13 ] := rec( diff --git a/small/idlib/id384iba.o b/small/idlib/id384iba.o index 136b3d34c9..0d7ef2848c 100644 --- a/small/idlib/id384iba.o +++ b/small/idlib/id384iba.o @@ -3,7 +3,7 @@ #W id384iba.o GAP library of id's Hans Ulrich Besche ## Revision.id384iba_o := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 1 ].next[ 15 ] := rec( diff --git a/small/idlib/id384ibb.aj b/small/idlib/id384ibb.aj index 86159c5185..5df18b5354 100644 --- a/small/idlib/id384ibb.aj +++ b/small/idlib/id384ibb.aj @@ -3,7 +3,7 @@ #W id384ibb.aj GAP library of id's Hans Ulrich Besche ## Revision.id384ibb_aj := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 2 ].next[ 36 ] := rec( diff --git a/small/idlib/id384ibb.k b/small/idlib/id384ibb.k index 07398e495c..1133941f0a 100644 --- a/small/idlib/id384ibb.k +++ b/small/idlib/id384ibb.k @@ -3,7 +3,7 @@ #W id384ibb.k GAP library of id's Hans Ulrich Besche ## Revision.id384ibb_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 2 ].next[ 11 ] := rec( diff --git a/small/idlib/id384ibb.n b/small/idlib/id384ibb.n index 0ce832b500..8ecc0ad583 100644 --- a/small/idlib/id384ibb.n +++ b/small/idlib/id384ibb.n @@ -3,7 +3,7 @@ #W id384ibb.n GAP library of id's Hans Ulrich Besche ## Revision.id384ibb_n := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 2 ].next[ 14 ] := rec( diff --git a/small/idlib/id384ibb.w b/small/idlib/id384ibb.w index 0f15e38db2..9d9a83644d 100644 --- a/small/idlib/id384ibb.w +++ b/small/idlib/id384ibb.w @@ -3,7 +3,7 @@ #W id384ibb.w GAP library of id's Hans Ulrich Besche ## Revision.id384ibb_w := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 2 ].next[ 23 ] := rec( diff --git a/small/idlib/id384ibb.x b/small/idlib/id384ibb.x index fc01238df4..33711659f6 100644 --- a/small/idlib/id384ibb.x +++ b/small/idlib/id384ibb.x @@ -3,7 +3,7 @@ #W id384ibb.x GAP library of id's Hans Ulrich Besche ## Revision.id384ibb_x := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 2 ].next[ 24 ] := rec( diff --git a/small/idlib/id384ibb.y b/small/idlib/id384ibb.y index 02039a234b..c33fc27c3d 100644 --- a/small/idlib/id384ibb.y +++ b/small/idlib/id384ibb.y @@ -3,7 +3,7 @@ #W id384ibb.y GAP library of id's Hans Ulrich Besche ## Revision.id384ibb_y := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 2 ].next[ 25 ] := rec( diff --git a/small/idlib/id384ibe.aa b/small/idlib/id384ibe.aa index a66fcec1e8..a2b2084e90 100644 --- a/small/idlib/id384ibe.aa +++ b/small/idlib/id384ibe.aa @@ -3,7 +3,7 @@ #W id384ibe.aa GAP library of id's Hans Ulrich Besche ## Revision.id384ibe_aa := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 5 ].next[ 27 ] := rec( diff --git a/small/idlib/id384ibe.g b/small/idlib/id384ibe.g index 84fd5ce5d9..f38a43711e 100644 --- a/small/idlib/id384ibe.g +++ b/small/idlib/id384ibe.g @@ -3,7 +3,7 @@ #W id384ibe.g GAP library of id's Hans Ulrich Besche ## Revision.id384ibe_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 5 ].next[ 7 ] := rec( diff --git a/small/idlib/id384ibe.q b/small/idlib/id384ibe.q index ed2d613f83..a9aaa890cc 100644 --- a/small/idlib/id384ibe.q +++ b/small/idlib/id384ibe.q @@ -3,7 +3,7 @@ #W id384ibe.q GAP library of id's Hans Ulrich Besche ## Revision.id384ibe_q := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 5 ].next[ 17 ] := rec( diff --git a/small/idlib/id384ibe.r b/small/idlib/id384ibe.r index 4e0127715d..27fee04b44 100644 --- a/small/idlib/id384ibe.r +++ b/small/idlib/id384ibe.r @@ -3,7 +3,7 @@ #W id384ibe.r GAP library of id's Hans Ulrich Besche ## Revision.id384ibe_r := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 5 ].next[ 18 ] := rec( diff --git a/small/idlib/id384ibe.w b/small/idlib/id384ibe.w index ddd4d85599..f39b757153 100644 --- a/small/idlib/id384ibe.w +++ b/small/idlib/id384ibe.w @@ -3,7 +3,7 @@ #W id384ibe.w GAP library of id's Hans Ulrich Besche ## Revision.id384ibe_w := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 5 ].next[ 23 ] := rec( diff --git a/small/idlib/id384ibh.ag b/small/idlib/id384ibh.ag index f8a06fd624..5e871a7dbb 100644 --- a/small/idlib/id384ibh.ag +++ b/small/idlib/id384ibh.ag @@ -3,7 +3,7 @@ #W id384ibh.ag GAP library of id's Hans Ulrich Besche ## Revision.id384ibh_ag := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 8 ].next[ 33 ] := rec( diff --git a/small/idlib/id384ibh.bh b/small/idlib/id384ibh.bh index 5e2e40a839..13ce902d8c 100644 --- a/small/idlib/id384ibh.bh +++ b/small/idlib/id384ibh.bh @@ -3,7 +3,7 @@ #W id384ibh.bh GAP library of id's Hans Ulrich Besche ## Revision.id384ibh_bh := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 8 ].next[ 60 ] := rec( diff --git a/small/idlib/id384ibh.r b/small/idlib/id384ibh.r index fe118f3db6..ff2505ffd1 100644 --- a/small/idlib/id384ibh.r +++ b/small/idlib/id384ibh.r @@ -3,7 +3,7 @@ #W id384ibh.r GAP library of id's Hans Ulrich Besche ## Revision.id384ibh_r := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 8 ].next[ 18 ] := rec( diff --git a/small/idlib/id384ibm.ac b/small/idlib/id384ibm.ac index 08fa380eb3..25e7e30563 100644 --- a/small/idlib/id384ibm.ac +++ b/small/idlib/id384ibm.ac @@ -3,7 +3,7 @@ #W id384ibm.ac GAP library of id's Hans Ulrich Besche ## Revision.id384ibm_ac := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 2 ].next[ 13 ].next[ 29 ] := rec( diff --git a/small/idlib/id384ic.b b/small/idlib/id384ic.b index 413e6f2d92..d57c5ac347 100644 --- a/small/idlib/id384ic.b +++ b/small/idlib/id384ic.b @@ -3,7 +3,7 @@ #W id384ic.b GAP library of id's Hans Ulrich Besche ## Revision.id384ic_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 3 ].next[ 2 ] := rec( diff --git a/small/idlib/id384ic.c b/small/idlib/id384ic.c index 09871ca7c1..b4550a25b8 100644 --- a/small/idlib/id384ic.c +++ b/small/idlib/id384ic.c @@ -3,7 +3,7 @@ #W id384ic.c GAP library of id's Hans Ulrich Besche ## Revision.id384ic_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 3 ].next[ 3 ] := rec( diff --git a/small/idlib/id384ic.f b/small/idlib/id384ic.f index 80c9e6914f..a77f25da6f 100644 --- a/small/idlib/id384ic.f +++ b/small/idlib/id384ic.f @@ -3,7 +3,7 @@ #W id384ic.f GAP library of id's Hans Ulrich Besche ## Revision.id384ic_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 3 ].next[ 6 ] := rec( diff --git a/small/idlib/id384ic.i b/small/idlib/id384ic.i index fbced8597d..989bec8696 100644 --- a/small/idlib/id384ic.i +++ b/small/idlib/id384ic.i @@ -3,7 +3,7 @@ #W id384ic.i GAP library of id's Hans Ulrich Besche ## Revision.id384ic_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 3 ].next[ 9 ] := rec( diff --git a/small/idlib/id384ic.r b/small/idlib/id384ic.r index 262bc09e49..d0520337c6 100644 --- a/small/idlib/id384ic.r +++ b/small/idlib/id384ic.r @@ -3,7 +3,7 @@ #W id384ic.r GAP library of id's Hans Ulrich Besche ## Revision.id384ic_r := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 3 ].next[ 18 ] := rec( diff --git a/small/idlib/id384ic.z b/small/idlib/id384ic.z index 8d02b1c155..7f6947beac 100644 --- a/small/idlib/id384ic.z +++ b/small/idlib/id384ic.z @@ -3,7 +3,7 @@ #W id384ic.z GAP library of id's Hans Ulrich Besche ## Revision.id384ic_z := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 3 ].next[ 26 ] := rec( diff --git a/small/idlib/id384ica.d b/small/idlib/id384ica.d index 699f86161e..c23e8ed98f 100644 --- a/small/idlib/id384ica.d +++ b/small/idlib/id384ica.d @@ -3,7 +3,7 @@ #W id384ica.d GAP library of id's Hans Ulrich Besche ## Revision.id384ica_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 3 ].next[ 30 ] := rec( diff --git a/small/idlib/id384ica.g b/small/idlib/id384ica.g index aa92bc5023..25057bb327 100644 --- a/small/idlib/id384ica.g +++ b/small/idlib/id384ica.g @@ -3,7 +3,7 @@ #W id384ica.g GAP library of id's Hans Ulrich Besche ## Revision.id384ica_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 3 ].next[ 33 ] := rec( diff --git a/small/idlib/id384id.f b/small/idlib/id384id.f index 94bd6080a9..02465d4cd1 100644 --- a/small/idlib/id384id.f +++ b/small/idlib/id384id.f @@ -3,7 +3,7 @@ #W id384id.f GAP library of id's Hans Ulrich Besche ## Revision.id384id_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 6 ] := rec( diff --git a/small/idlib/id384id.i b/small/idlib/id384id.i index f70e5fc817..2107b8cb59 100644 --- a/small/idlib/id384id.i +++ b/small/idlib/id384id.i @@ -3,7 +3,7 @@ #W id384id.i GAP library of id's Hans Ulrich Besche ## Revision.id384id_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 9 ] := rec( diff --git a/small/idlib/id384id.k b/small/idlib/id384id.k index 37eb019457..cd61e20fa8 100644 --- a/small/idlib/id384id.k +++ b/small/idlib/id384id.k @@ -3,7 +3,7 @@ #W id384id.k GAP library of id's Hans Ulrich Besche ## Revision.id384id_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 11 ] := rec( diff --git a/small/idlib/id384id.l b/small/idlib/id384id.l index 6aaf996e1b..1b59334e78 100644 --- a/small/idlib/id384id.l +++ b/small/idlib/id384id.l @@ -3,7 +3,7 @@ #W id384id.l GAP library of id's Hans Ulrich Besche ## Revision.id384id_l := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 12 ] := rec( diff --git a/small/idlib/id384id.o b/small/idlib/id384id.o index 3da38d9e40..07349e0da3 100644 --- a/small/idlib/id384id.o +++ b/small/idlib/id384id.o @@ -3,7 +3,7 @@ #W id384id.o GAP library of id's Hans Ulrich Besche ## Revision.id384id_o := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 15 ] := rec( diff --git a/small/idlib/id384id.u b/small/idlib/id384id.u index a74b496c6f..76a1bd1bae 100644 --- a/small/idlib/id384id.u +++ b/small/idlib/id384id.u @@ -3,7 +3,7 @@ #W id384id.u GAP library of id's Hans Ulrich Besche ## Revision.id384id_u := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 21 ] := rec( diff --git a/small/idlib/id384id.v b/small/idlib/id384id.v index 4afda9efb0..9c6b490d0d 100644 --- a/small/idlib/id384id.v +++ b/small/idlib/id384id.v @@ -3,7 +3,7 @@ #W id384id.v GAP library of id's Hans Ulrich Besche ## Revision.id384id_v := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 22 ] := rec( diff --git a/small/idlib/id384id.w b/small/idlib/id384id.w index 2c6fab93ca..497ffb1c92 100644 --- a/small/idlib/id384id.w +++ b/small/idlib/id384id.w @@ -3,7 +3,7 @@ #W id384id.w GAP library of id's Hans Ulrich Besche ## Revision.id384id_w := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 23 ] := rec( diff --git a/small/idlib/id384id.z b/small/idlib/id384id.z index 679e39bf94..ee10f6db86 100644 --- a/small/idlib/id384id.z +++ b/small/idlib/id384id.z @@ -3,7 +3,7 @@ #W id384id.z GAP library of id's Hans Ulrich Besche ## Revision.id384id_z := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 26 ] := rec( diff --git a/small/idlib/id384ida.e b/small/idlib/id384ida.e index 8f9bdd4f20..b82e6ca3d0 100644 --- a/small/idlib/id384ida.e +++ b/small/idlib/id384ida.e @@ -3,7 +3,7 @@ #W id384ida.e GAP library of id's Hans Ulrich Besche ## Revision.id384ida_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 31 ] := rec( diff --git a/small/idlib/id384ida.f b/small/idlib/id384ida.f index c20fab2ccd..450dab5446 100644 --- a/small/idlib/id384ida.f +++ b/small/idlib/id384ida.f @@ -3,7 +3,7 @@ #W id384ida.f GAP library of id's Hans Ulrich Besche ## Revision.id384ida_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 32 ] := rec( diff --git a/small/idlib/id384ida.k b/small/idlib/id384ida.k index dbddec8e35..e79231a09c 100644 --- a/small/idlib/id384ida.k +++ b/small/idlib/id384ida.k @@ -3,7 +3,7 @@ #W id384ida.k GAP library of id's Hans Ulrich Besche ## Revision.id384ida_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 37 ] := rec( diff --git a/small/idlib/id384ida.l b/small/idlib/id384ida.l index 23c252a543..d82c6b5ee6 100644 --- a/small/idlib/id384ida.l +++ b/small/idlib/id384ida.l @@ -3,7 +3,7 @@ #W id384ida.l GAP library of id's Hans Ulrich Besche ## Revision.id384ida_l := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 38 ] := rec( diff --git a/small/idlib/id384ida.r b/small/idlib/id384ida.r index 4adbd02828..58674f1b17 100644 --- a/small/idlib/id384ida.r +++ b/small/idlib/id384ida.r @@ -3,7 +3,7 @@ #W id384ida.r GAP library of id's Hans Ulrich Besche ## Revision.id384ida_r := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 44 ] := rec( diff --git a/small/idlib/id384ida.u b/small/idlib/id384ida.u index 91c92f32df..7801569c8e 100644 --- a/small/idlib/id384ida.u +++ b/small/idlib/id384ida.u @@ -3,7 +3,7 @@ #W id384ida.u GAP library of id's Hans Ulrich Besche ## Revision.id384ida_u := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 47 ] := rec( diff --git a/small/idlib/id384ida.v b/small/idlib/id384ida.v index 210beceaf5..6875a2c134 100644 --- a/small/idlib/id384ida.v +++ b/small/idlib/id384ida.v @@ -3,7 +3,7 @@ #W id384ida.v GAP library of id's Hans Ulrich Besche ## Revision.id384ida_v := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 48 ] := rec( diff --git a/small/idlib/id384idb.c b/small/idlib/id384idb.c index 9ee3656bb5..6ee425f8dc 100644 --- a/small/idlib/id384idb.c +++ b/small/idlib/id384idb.c @@ -3,7 +3,7 @@ #W id384idb.c GAP library of id's Hans Ulrich Besche ## Revision.id384idb_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 55 ] := rec( diff --git a/small/idlib/id384idb.k b/small/idlib/id384idb.k index 3441930ba7..b84d803767 100644 --- a/small/idlib/id384idb.k +++ b/small/idlib/id384idb.k @@ -3,7 +3,7 @@ #W id384idb.k GAP library of id's Hans Ulrich Besche ## Revision.id384idb_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 63 ] := rec( diff --git a/small/idlib/id384idb.l b/small/idlib/id384idb.l index 4292d169d4..2b6898a5d7 100644 --- a/small/idlib/id384idb.l +++ b/small/idlib/id384idb.l @@ -3,7 +3,7 @@ #W id384idb.l GAP library of id's Hans Ulrich Besche ## Revision.id384idb_l := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 64 ] := rec( diff --git a/small/idlib/id384idb.s b/small/idlib/id384idb.s index 7bc2a634d4..f79094e2f6 100644 --- a/small/idlib/id384idb.s +++ b/small/idlib/id384idb.s @@ -3,7 +3,7 @@ #W id384idb.s GAP library of id's Hans Ulrich Besche ## Revision.id384idb_s := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 71 ] := rec( diff --git a/small/idlib/id384idb.t b/small/idlib/id384idb.t index 4ec7d2d19c..f2923ceb9b 100644 --- a/small/idlib/id384idb.t +++ b/small/idlib/id384idb.t @@ -3,7 +3,7 @@ #W id384idb.t GAP library of id's Hans Ulrich Besche ## Revision.id384idb_t := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 72 ] := rec( diff --git a/small/idlib/id384idb.y b/small/idlib/id384idb.y index ff6a6a2901..aa644596fe 100644 --- a/small/idlib/id384idb.y +++ b/small/idlib/id384idb.y @@ -3,7 +3,7 @@ #W id384idb.y GAP library of id's Hans Ulrich Besche ## Revision.id384idb_y := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 77 ] := rec( diff --git a/small/idlib/id384idb.z b/small/idlib/id384idb.z index baad18b53c..c208f88fdf 100644 --- a/small/idlib/id384idb.z +++ b/small/idlib/id384idb.z @@ -3,7 +3,7 @@ #W id384idb.z GAP library of id's Hans Ulrich Besche ## Revision.id384idb_z := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 78 ] := rec( diff --git a/small/idlib/id384idc.h b/small/idlib/id384idc.h index a327dcabd4..8819453dc8 100644 --- a/small/idlib/id384idc.h +++ b/small/idlib/id384idc.h @@ -3,7 +3,7 @@ #W id384idc.h GAP library of id's Hans Ulrich Besche ## Revision.id384idc_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 86 ] := rec( diff --git a/small/idlib/id384idc.i b/small/idlib/id384idc.i index b859d7f756..91956ed0be 100644 --- a/small/idlib/id384idc.i +++ b/small/idlib/id384idc.i @@ -3,7 +3,7 @@ #W id384idc.i GAP library of id's Hans Ulrich Besche ## Revision.id384idc_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 87 ] := rec( diff --git a/small/idlib/id384idc.o b/small/idlib/id384idc.o index 0c4c3e0128..c1f7027529 100644 --- a/small/idlib/id384idc.o +++ b/small/idlib/id384idc.o @@ -3,7 +3,7 @@ #W id384idc.o GAP library of id's Hans Ulrich Besche ## Revision.id384idc_o := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 93 ] := rec( diff --git a/small/idlib/id384idc.q b/small/idlib/id384idc.q index 1fbce84797..653a073d05 100644 --- a/small/idlib/id384idc.q +++ b/small/idlib/id384idc.q @@ -3,7 +3,7 @@ #W id384idc.q GAP library of id's Hans Ulrich Besche ## Revision.id384idc_q := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 95 ] := rec( diff --git a/small/idlib/id384idc.r b/small/idlib/id384idc.r index f5223ee765..635746baf5 100644 --- a/small/idlib/id384idc.r +++ b/small/idlib/id384idc.r @@ -3,7 +3,7 @@ #W id384idc.r GAP library of id's Hans Ulrich Besche ## Revision.id384idc_r := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 96 ] := rec( diff --git a/small/idlib/id384idc.t b/small/idlib/id384idc.t index c6743c903c..35310835e3 100644 --- a/small/idlib/id384idc.t +++ b/small/idlib/id384idc.t @@ -3,7 +3,7 @@ #W id384idc.t GAP library of id's Hans Ulrich Besche ## Revision.id384idc_t := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 98 ] := rec( diff --git a/small/idlib/id384idc.y b/small/idlib/id384idc.y index 9426837a96..7b01971c50 100644 --- a/small/idlib/id384idc.y +++ b/small/idlib/id384idc.y @@ -3,7 +3,7 @@ #W id384idc.y GAP library of id's Hans Ulrich Besche ## Revision.id384idc_y := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 103 ] := rec( diff --git a/small/idlib/id384idc.z b/small/idlib/id384idc.z index 67d97749e0..64d05795cd 100644 --- a/small/idlib/id384idc.z +++ b/small/idlib/id384idc.z @@ -3,7 +3,7 @@ #W id384idc.z GAP library of id's Hans Ulrich Besche ## Revision.id384idc_z := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 104 ] := rec( diff --git a/small/idlib/id384idd.g b/small/idlib/id384idd.g index fa68aaa495..ed0bcac124 100644 --- a/small/idlib/id384idd.g +++ b/small/idlib/id384idd.g @@ -3,7 +3,7 @@ #W id384idd.g GAP library of id's Hans Ulrich Besche ## Revision.id384idd_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 111 ] := rec( diff --git a/small/idlib/id384idd.h b/small/idlib/id384idd.h index 0f37ce09f8..3c11c1c28e 100644 --- a/small/idlib/id384idd.h +++ b/small/idlib/id384idd.h @@ -3,7 +3,7 @@ #W id384idd.h GAP library of id's Hans Ulrich Besche ## Revision.id384idd_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 112 ] := rec( diff --git a/small/idlib/id384idd.p b/small/idlib/id384idd.p index 9750ce5dd2..5d8b7ac0cd 100644 --- a/small/idlib/id384idd.p +++ b/small/idlib/id384idd.p @@ -3,7 +3,7 @@ #W id384idd.p GAP library of id's Hans Ulrich Besche ## Revision.id384idd_p := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 120 ] := rec( diff --git a/small/idlib/id384idd.u b/small/idlib/id384idd.u index 92827b1036..ed1cb94601 100644 --- a/small/idlib/id384idd.u +++ b/small/idlib/id384idd.u @@ -3,7 +3,7 @@ #W id384idd.u GAP library of id's Hans Ulrich Besche ## Revision.id384idd_u := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 125 ] := rec( diff --git a/small/idlib/id384idd.v b/small/idlib/id384idd.v index 20b20c4f37..448ea2ce51 100644 --- a/small/idlib/id384idd.v +++ b/small/idlib/id384idd.v @@ -3,7 +3,7 @@ #W id384idd.v GAP library of id's Hans Ulrich Besche ## Revision.id384idd_v := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 126 ] := rec( diff --git a/small/idlib/id384ide.c b/small/idlib/id384ide.c index 13d667c566..2f25d251a6 100644 --- a/small/idlib/id384ide.c +++ b/small/idlib/id384ide.c @@ -3,7 +3,7 @@ #W id384ide.c GAP library of id's Hans Ulrich Besche ## Revision.id384ide_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 133 ] := rec( diff --git a/small/idlib/id384ide.k b/small/idlib/id384ide.k index 85d831df25..b711840d9b 100644 --- a/small/idlib/id384ide.k +++ b/small/idlib/id384ide.k @@ -3,7 +3,7 @@ #W id384ide.k GAP library of id's Hans Ulrich Besche ## Revision.id384ide_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 141 ] := rec( diff --git a/small/idlib/id384ide.l b/small/idlib/id384ide.l index 7b92f1e103..f65d28ff61 100644 --- a/small/idlib/id384ide.l +++ b/small/idlib/id384ide.l @@ -3,7 +3,7 @@ #W id384ide.l GAP library of id's Hans Ulrich Besche ## Revision.id384ide_l := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 142 ] := rec( diff --git a/small/idlib/id384ide.z b/small/idlib/id384ide.z index 9ec008f046..e919e061db 100644 --- a/small/idlib/id384ide.z +++ b/small/idlib/id384ide.z @@ -3,7 +3,7 @@ #W id384ide.z GAP library of id's Hans Ulrich Besche ## Revision.id384ide_z := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 9 ].next[ 4 ].next[ 156 ] := rec( diff --git a/small/idlib/id384k.b b/small/idlib/id384k.b index b2e0288897..160fa8bb71 100644 --- a/small/idlib/id384k.b +++ b/small/idlib/id384k.b @@ -3,7 +3,7 @@ #W id384k.b GAP library of id's Hans Ulrich Besche ## Revision.id384k_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 11 ].next[ 2 ] := rec( diff --git a/small/idlib/id384k.c b/small/idlib/id384k.c index aea50d24fe..1d36419665 100644 --- a/small/idlib/id384k.c +++ b/small/idlib/id384k.c @@ -3,7 +3,7 @@ #W id384k.c GAP library of id's Hans Ulrich Besche ## Revision.id384k_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 11 ].next[ 3 ] := rec( diff --git a/small/idlib/id384k.d b/small/idlib/id384k.d index f896ad8c00..5edb40de15 100644 --- a/small/idlib/id384k.d +++ b/small/idlib/id384k.d @@ -3,7 +3,7 @@ #W id384k.d GAP library of id's Hans Ulrich Besche ## Revision.id384k_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 11 ].next[ 4 ] := rec( diff --git a/small/idlib/id384k.e b/small/idlib/id384k.e index 5ad2eac141..641e42dcbc 100644 --- a/small/idlib/id384k.e +++ b/small/idlib/id384k.e @@ -3,7 +3,7 @@ #W id384k.e GAP library of id's Hans Ulrich Besche ## Revision.id384k_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 11 ].next[ 5 ] := rec( diff --git a/small/idlib/id384kc.n b/small/idlib/id384kc.n index c1a0fa0d26..753a5f9c4e 100644 --- a/small/idlib/id384kc.n +++ b/small/idlib/id384kc.n @@ -3,7 +3,7 @@ #W id384kc.n GAP library of id's Hans Ulrich Besche ## Revision.id384kc_n := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 384 ].next[ 11 ].next[ 3 ].next[ 14 ] := rec( diff --git a/small/idlib/id39.0 b/small/idlib/id39.0 index 2a8870cb54..c20350d1c9 100644 --- a/small/idlib/id39.0 +++ b/small/idlib/id39.0 @@ -3,7 +3,7 @@ #W id39.0 GAP library of id's Hans Ulrich Besche ## Revision.id39_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 390 ] := rec( diff --git a/small/idlib/id39.2 b/small/idlib/id39.2 index 112adb8186..e1015952da 100644 --- a/small/idlib/id39.2 +++ b/small/idlib/id39.2 @@ -3,7 +3,7 @@ #W id39.2 GAP library of id's Hans Ulrich Besche ## Revision.id39_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 392 ] := rec( diff --git a/small/idlib/id39.6 b/small/idlib/id39.6 index 10b687b65f..b33f5480bd 100644 --- a/small/idlib/id39.6 +++ b/small/idlib/id39.6 @@ -3,7 +3,7 @@ #W id39.6 GAP library of id's Hans Ulrich Besche ## Revision.id39_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 396 ] := rec( diff --git a/small/idlib/id40.0 b/small/idlib/id40.0 index b2c3c4ba7e..834db4a20d 100644 --- a/small/idlib/id40.0 +++ b/small/idlib/id40.0 @@ -3,7 +3,7 @@ #W id40.0 GAP library of id's Hans Ulrich Besche ## Revision.id40_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 400 ] := rec( diff --git a/small/idlib/id40.5 b/small/idlib/id40.5 index 9db339d709..a730072111 100644 --- a/small/idlib/id40.5 +++ b/small/idlib/id40.5 @@ -3,7 +3,7 @@ #W id40.5 GAP library of id's Hans Ulrich Besche ## Revision.id40_5 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 405 ] := rec( diff --git a/small/idlib/id40.8 b/small/idlib/id40.8 index feacb887c8..4371a7df68 100644 --- a/small/idlib/id40.8 +++ b/small/idlib/id40.8 @@ -3,7 +3,7 @@ #W id40.8 GAP library of id's Hans Ulrich Besche ## Revision.id40_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 408 ] := rec( diff --git a/small/idlib/id41.4 b/small/idlib/id41.4 index 5be85834af..8d0344f5b5 100644 --- a/small/idlib/id41.4 +++ b/small/idlib/id41.4 @@ -3,7 +3,7 @@ #W id41.4 GAP library of id's Hans Ulrich Besche ## Revision.id41_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 414 ] := rec( diff --git a/small/idlib/id41.6 b/small/idlib/id41.6 index e2a76cac93..6c096e3daf 100644 --- a/small/idlib/id41.6 +++ b/small/idlib/id41.6 @@ -3,7 +3,7 @@ #W id41.6 GAP library of id's Hans Ulrich Besche ## Revision.id41_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 416 ] := rec( diff --git a/small/idlib/id42.0 b/small/idlib/id42.0 index 1948345821..bad7908d5c 100644 --- a/small/idlib/id42.0 +++ b/small/idlib/id42.0 @@ -3,7 +3,7 @@ #W id42.0 GAP library of id's Hans Ulrich Besche ## Revision.id42_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 420 ] := rec( diff --git a/small/idlib/id42.4 b/small/idlib/id42.4 index 4374048bc2..a8fee3017c 100644 --- a/small/idlib/id42.4 +++ b/small/idlib/id42.4 @@ -3,7 +3,7 @@ #W id42.4 GAP library of id's Hans Ulrich Besche ## Revision.id42_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 424 ] := rec( diff --git a/small/idlib/id43.2 b/small/idlib/id43.2 index d9d8e5a4af..eeddf5f2b8 100644 --- a/small/idlib/id43.2 +++ b/small/idlib/id43.2 @@ -3,7 +3,7 @@ #W id43.2 GAP library of id's Hans Ulrich Besche ## Revision.id43_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 432 ] := rec( diff --git a/small/idlib/id432.f b/small/idlib/id432.f index 8731ad346b..d463a9eae9 100644 --- a/small/idlib/id432.f +++ b/small/idlib/id432.f @@ -3,7 +3,7 @@ #W id432.f GAP library of id's Hans Ulrich Besche ## Revision.id432_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 432 ].next[ 6 ] := rec( diff --git a/small/idlib/id432.i b/small/idlib/id432.i index f06d2f0e7b..1030b643f7 100644 --- a/small/idlib/id432.i +++ b/small/idlib/id432.i @@ -3,7 +3,7 @@ #W id432.i GAP library of id's Hans Ulrich Besche ## Revision.id432_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 432 ].next[ 9 ] := rec( diff --git a/small/idlib/id432.j b/small/idlib/id432.j index 57a9f5129f..b114eec321 100644 --- a/small/idlib/id432.j +++ b/small/idlib/id432.j @@ -3,7 +3,7 @@ #W id432.j GAP library of id's Hans Ulrich Besche ## Revision.id432_j := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 432 ].next[ 10 ] := rec( diff --git a/small/idlib/id432.k b/small/idlib/id432.k index 1130f91a80..47e6fcbf69 100644 --- a/small/idlib/id432.k +++ b/small/idlib/id432.k @@ -3,7 +3,7 @@ #W id432.k GAP library of id's Hans Ulrich Besche ## Revision.id432_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 432 ].next[ 11 ] := rec( diff --git a/small/idlib/id432.m b/small/idlib/id432.m index 711e4a4f52..910c78db61 100644 --- a/small/idlib/id432.m +++ b/small/idlib/id432.m @@ -3,7 +3,7 @@ #W id432.m GAP library of id's Hans Ulrich Besche ## Revision.id432_m := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 432 ].next[ 13 ] := rec( diff --git a/small/idlib/id432.o b/small/idlib/id432.o index f0ae08e51f..d833709884 100644 --- a/small/idlib/id432.o +++ b/small/idlib/id432.o @@ -3,7 +3,7 @@ #W id432.o GAP library of id's Hans Ulrich Besche ## Revision.id432_o := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 432 ].next[ 15 ] := rec( diff --git a/small/idlib/id44.0 b/small/idlib/id44.0 index 0606a5b127..ae2af54117 100644 --- a/small/idlib/id44.0 +++ b/small/idlib/id44.0 @@ -3,7 +3,7 @@ #W id44.0 GAP library of id's Hans Ulrich Besche ## Revision.id44_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 440 ] := rec( diff --git a/small/idlib/id44.1 b/small/idlib/id44.1 index 70d0f4e285..5d6615ece9 100644 --- a/small/idlib/id44.1 +++ b/small/idlib/id44.1 @@ -3,7 +3,7 @@ #W id44.1 GAP library of id's Hans Ulrich Besche ## Revision.id44_1 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 441 ] := rec( diff --git a/small/idlib/id44.4 b/small/idlib/id44.4 index c107a83a3c..3e99f2cd94 100644 --- a/small/idlib/id44.4 +++ b/small/idlib/id44.4 @@ -3,7 +3,7 @@ #W id44.4 GAP library of id's Hans Ulrich Besche ## Revision.id44_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 444 ] := rec( diff --git a/small/idlib/id44.8 b/small/idlib/id44.8 index 2ffed64d24..932d71e610 100644 --- a/small/idlib/id44.8 +++ b/small/idlib/id44.8 @@ -3,7 +3,7 @@ #W id44.8 GAP library of id's Hans Ulrich Besche ## Revision.id44_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 448 ] := rec( diff --git a/small/idlib/id448.c b/small/idlib/id448.c index 44b266e3b0..037781a640 100644 --- a/small/idlib/id448.c +++ b/small/idlib/id448.c @@ -3,7 +3,7 @@ #W id448.c GAP library of id's Hans Ulrich Besche ## Revision.id448_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 448 ].next[ 3 ] := rec( diff --git a/small/idlib/id448.e b/small/idlib/id448.e index b8f1280a01..f6d1d5dcf3 100644 --- a/small/idlib/id448.e +++ b/small/idlib/id448.e @@ -3,7 +3,7 @@ #W id448.e GAP library of id's Hans Ulrich Besche ## Revision.id448_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 448 ].next[ 5 ] := rec( diff --git a/small/idlib/id448.f b/small/idlib/id448.f index fdc273e71f..da32bb6e4f 100644 --- a/small/idlib/id448.f +++ b/small/idlib/id448.f @@ -3,7 +3,7 @@ #W id448.f GAP library of id's Hans Ulrich Besche ## Revision.id448_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 448 ].next[ 6 ] := rec( diff --git a/small/idlib/id448.i b/small/idlib/id448.i index 9a719fd700..224a5e8004 100644 --- a/small/idlib/id448.i +++ b/small/idlib/id448.i @@ -3,7 +3,7 @@ #W id448.i GAP library of id's Hans Ulrich Besche ## Revision.id448_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 448 ].next[ 9 ] := rec( diff --git a/small/idlib/id448h.b b/small/idlib/id448h.b index 38e4d81164..980a94248b 100644 --- a/small/idlib/id448h.b +++ b/small/idlib/id448h.b @@ -3,7 +3,7 @@ #W id448h.b GAP library of id's Hans Ulrich Besche ## Revision.id448h_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 448 ].next[ 8 ].next[ 2 ] := rec( diff --git a/small/idlib/id448h.d b/small/idlib/id448h.d index 3716f00563..67746f4eca 100644 --- a/small/idlib/id448h.d +++ b/small/idlib/id448h.d @@ -3,7 +3,7 @@ #W id448h.d GAP library of id's Hans Ulrich Besche ## Revision.id448h_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 448 ].next[ 8 ].next[ 4 ] := rec( diff --git a/small/idlib/id448i.b b/small/idlib/id448i.b index c66d3e4bc7..72dee6c3f3 100644 --- a/small/idlib/id448i.b +++ b/small/idlib/id448i.b @@ -3,7 +3,7 @@ #W id448i.b GAP library of id's Hans Ulrich Besche ## Revision.id448i_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 448 ].next[ 9 ].next[ 2 ] := rec( diff --git a/small/idlib/id448i.c b/small/idlib/id448i.c index 39a2423299..dca28cc29f 100644 --- a/small/idlib/id448i.c +++ b/small/idlib/id448i.c @@ -3,7 +3,7 @@ #W id448i.c GAP library of id's Hans Ulrich Besche ## Revision.id448i_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 448 ].next[ 9 ].next[ 3 ] := rec( diff --git a/small/idlib/id45.0 b/small/idlib/id45.0 index c1771376bf..e1157d9601 100644 --- a/small/idlib/id45.0 +++ b/small/idlib/id45.0 @@ -3,7 +3,7 @@ #W id45.0 GAP library of id's Hans Ulrich Besche ## Revision.id45_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 450 ] := rec( diff --git a/small/idlib/id45.6 b/small/idlib/id45.6 index d6f30b4e3e..95b396b1aa 100644 --- a/small/idlib/id45.6 +++ b/small/idlib/id45.6 @@ -3,7 +3,7 @@ #W id45.6 GAP library of id's Hans Ulrich Besche ## Revision.id45_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 456 ] := rec( diff --git a/small/idlib/id45.9 b/small/idlib/id45.9 index bbf00651d2..fcb167862d 100644 --- a/small/idlib/id45.9 +++ b/small/idlib/id45.9 @@ -3,7 +3,7 @@ #W id45.9 GAP library of id's Hans Ulrich Besche ## Revision.id45_9 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 459 ] := rec( diff --git a/small/idlib/id46.0 b/small/idlib/id46.0 index ac279cdfec..f33c78b7e3 100644 --- a/small/idlib/id46.0 +++ b/small/idlib/id46.0 @@ -3,7 +3,7 @@ #W id46.0 GAP library of id's Hans Ulrich Besche ## Revision.id46_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 460 ] := rec( diff --git a/small/idlib/id46.2 b/small/idlib/id46.2 index 1ed4087e1a..14843a9902 100644 --- a/small/idlib/id46.2 +++ b/small/idlib/id46.2 @@ -3,7 +3,7 @@ #W id46.2 GAP library of id's Hans Ulrich Besche ## Revision.id46_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 462 ] := rec( diff --git a/small/idlib/id46.4 b/small/idlib/id46.4 index 63bbdac19a..b82b7dbf9d 100644 --- a/small/idlib/id46.4 +++ b/small/idlib/id46.4 @@ -3,7 +3,7 @@ #W id46.4 GAP library of id's Hans Ulrich Besche ## Revision.id46_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 464 ] := rec( diff --git a/small/idlib/id46.8 b/small/idlib/id46.8 index fff9fa9187..04d8651b33 100644 --- a/small/idlib/id46.8 +++ b/small/idlib/id46.8 @@ -3,7 +3,7 @@ #W id46.8 GAP library of id's Hans Ulrich Besche ## Revision.id46_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 468 ] := rec( diff --git a/small/idlib/id47.2 b/small/idlib/id47.2 index a0d7b64841..82c6a4e3a7 100644 --- a/small/idlib/id47.2 +++ b/small/idlib/id47.2 @@ -3,7 +3,7 @@ #W id47.2 GAP library of id's Hans Ulrich Besche ## Revision.id47_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 472 ] := rec( diff --git a/small/idlib/id47.6 b/small/idlib/id47.6 index 7c96bff3af..b044a86204 100644 --- a/small/idlib/id47.6 +++ b/small/idlib/id47.6 @@ -3,7 +3,7 @@ #W id47.6 GAP library of id's Hans Ulrich Besche ## Revision.id47_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 476 ] := rec( diff --git a/small/idlib/id48.0 b/small/idlib/id48.0 index 97d4f2a635..e2ccb4bf3d 100644 --- a/small/idlib/id48.0 +++ b/small/idlib/id48.0 @@ -3,7 +3,7 @@ #W id48.0 GAP library of id's Hans Ulrich Besche ## Revision.id48_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 480 ] := rec( diff --git a/small/idlib/id48.4 b/small/idlib/id48.4 index a65ebf6c8c..5e7f9f99ee 100644 --- a/small/idlib/id48.4 +++ b/small/idlib/id48.4 @@ -3,7 +3,7 @@ #W id48.4 GAP library of id's Hans Ulrich Besche ## Revision.id48_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 484 ] := rec( diff --git a/small/idlib/id48.6 b/small/idlib/id48.6 index 570f5c62d1..016a2009ba 100644 --- a/small/idlib/id48.6 +++ b/small/idlib/id48.6 @@ -3,7 +3,7 @@ #W id48.6 GAP library of id's Hans Ulrich Besche ## Revision.id48_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 486 ] := rec( diff --git a/small/idlib/id48.8 b/small/idlib/id48.8 index 90164a7372..112e01905a 100644 --- a/small/idlib/id48.8 +++ b/small/idlib/id48.8 @@ -3,7 +3,7 @@ #W id48.8 GAP library of id's Hans Ulrich Besche ## Revision.id48_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 488 ] := rec( diff --git a/small/idlib/id480.g b/small/idlib/id480.g index a00a6afa25..186b3b5edb 100644 --- a/small/idlib/id480.g +++ b/small/idlib/id480.g @@ -3,7 +3,7 @@ #W id480.g GAP library of id's Hans Ulrich Besche ## Revision.id480_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 480 ].next[ 7 ] := rec( diff --git a/small/idlib/id480.i b/small/idlib/id480.i index ef7dd7c674..2ca14dc4fb 100644 --- a/small/idlib/id480.i +++ b/small/idlib/id480.i @@ -3,7 +3,7 @@ #W id480.i GAP library of id's Hans Ulrich Besche ## Revision.id480_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 480 ].next[ 9 ] := rec( diff --git a/small/idlib/id480.k b/small/idlib/id480.k index 03a4f28991..a5e2f74c42 100644 --- a/small/idlib/id480.k +++ b/small/idlib/id480.k @@ -3,7 +3,7 @@ #W id480.k GAP library of id's Hans Ulrich Besche ## Revision.id480_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 480 ].next[ 11 ] := rec( diff --git a/small/idlib/id480.l b/small/idlib/id480.l index eba16f7c7d..bceda22c28 100644 --- a/small/idlib/id480.l +++ b/small/idlib/id480.l @@ -3,7 +3,7 @@ #W id480.l GAP library of id's Hans Ulrich Besche ## Revision.id480_l := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 480 ].next[ 12 ] := rec( diff --git a/small/idlib/id480.n b/small/idlib/id480.n index 1372e0374f..6b91f1017c 100644 --- a/small/idlib/id480.n +++ b/small/idlib/id480.n @@ -3,7 +3,7 @@ #W id480.n GAP library of id's Hans Ulrich Besche ## Revision.id480_n := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 480 ].next[ 14 ] := rec( diff --git a/small/idlib/id480.p b/small/idlib/id480.p index c46aa4718b..fdbf85cb06 100644 --- a/small/idlib/id480.p +++ b/small/idlib/id480.p @@ -3,7 +3,7 @@ #W id480.p GAP library of id's Hans Ulrich Besche ## Revision.id480_p := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 480 ].next[ 16 ] := rec( diff --git a/small/idlib/id480.s b/small/idlib/id480.s index 4392824b24..6cee5897c5 100644 --- a/small/idlib/id480.s +++ b/small/idlib/id480.s @@ -3,7 +3,7 @@ #W id480.s GAP library of id's Hans Ulrich Besche ## Revision.id480_s := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 480 ].next[ 19 ] := rec( diff --git a/small/idlib/id480p.g b/small/idlib/id480p.g index f0316ce831..8210b2a704 100644 --- a/small/idlib/id480p.g +++ b/small/idlib/id480p.g @@ -3,7 +3,7 @@ #W id480p.g GAP library of id's Hans Ulrich Besche ## Revision.id480p_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 480 ].next[ 16 ].next[ 7 ] := rec( diff --git a/small/idlib/id480s.g b/small/idlib/id480s.g index d90d7177e4..40edd7b2dd 100644 --- a/small/idlib/id480s.g +++ b/small/idlib/id480s.g @@ -3,7 +3,7 @@ #W id480s.g GAP library of id's Hans Ulrich Besche ## Revision.id480s_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 480 ].next[ 19 ].next[ 7 ] := rec( diff --git a/small/idlib/id486.d b/small/idlib/id486.d index a83b7ec990..471d560d63 100644 --- a/small/idlib/id486.d +++ b/small/idlib/id486.d @@ -3,7 +3,7 @@ #W id486.d GAP library of id's Hans Ulrich Besche ## Revision.id486_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 486 ].next[ 4 ] := rec( diff --git a/small/idlib/id49.0 b/small/idlib/id49.0 index ece6901580..b8a495aa89 100644 --- a/small/idlib/id49.0 +++ b/small/idlib/id49.0 @@ -3,7 +3,7 @@ #W id49.0 GAP library of id's Hans Ulrich Besche ## Revision.id49_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 490 ] := rec( diff --git a/small/idlib/id49.2 b/small/idlib/id49.2 index 8fecca75df..fbc5511742 100644 --- a/small/idlib/id49.2 +++ b/small/idlib/id49.2 @@ -3,7 +3,7 @@ #W id49.2 GAP library of id's Hans Ulrich Besche ## Revision.id49_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 492 ] := rec( diff --git a/small/idlib/id49.5 b/small/idlib/id49.5 index 6d11f491cc..4a83881eda 100644 --- a/small/idlib/id49.5 +++ b/small/idlib/id49.5 @@ -3,7 +3,7 @@ #W id49.5 GAP library of id's Hans Ulrich Besche ## Revision.id49_5 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 495 ] := rec( diff --git a/small/idlib/id49.6 b/small/idlib/id49.6 index 0b52a2fe82..2b4933baee 100644 --- a/small/idlib/id49.6 +++ b/small/idlib/id49.6 @@ -3,7 +3,7 @@ #W id49.6 GAP library of id's Hans Ulrich Besche ## Revision.id49_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 496 ] := rec( diff --git a/small/idlib/id50.0 b/small/idlib/id50.0 index 92161297f7..07550435ce 100644 --- a/small/idlib/id50.0 +++ b/small/idlib/id50.0 @@ -3,7 +3,7 @@ #W id50.0 GAP library of id's Hans Ulrich Besche ## Revision.id50_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 500 ] := rec( diff --git a/small/idlib/id50.4 b/small/idlib/id50.4 index 347d0978d6..0d7d14fec6 100644 --- a/small/idlib/id50.4 +++ b/small/idlib/id50.4 @@ -3,7 +3,7 @@ #W id50.4 GAP library of id's Hans Ulrich Besche ## Revision.id50_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 504 ] := rec( diff --git a/small/idlib/id51.0 b/small/idlib/id51.0 index fdd2f69aec..f5dbac80e4 100644 --- a/small/idlib/id51.0 +++ b/small/idlib/id51.0 @@ -3,7 +3,7 @@ #W id51.0 GAP library of id's Hans Ulrich Besche ## Revision.id51_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 510 ] := rec( diff --git a/small/idlib/id51.3 b/small/idlib/id51.3 index 64963ba99e..5c2c9a3214 100644 --- a/small/idlib/id51.3 +++ b/small/idlib/id51.3 @@ -3,7 +3,7 @@ #W id51.3 GAP library of id's Hans Ulrich Besche ## Revision.id51_3 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 513 ] := rec( diff --git a/small/idlib/id51.6 b/small/idlib/id51.6 index cc62017c22..fd3dcb4e5d 100644 --- a/small/idlib/id51.6 +++ b/small/idlib/id51.6 @@ -3,7 +3,7 @@ #W id51.6 GAP library of id's Hans Ulrich Besche ## Revision.id51_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 516 ] := rec( diff --git a/small/idlib/id52.0 b/small/idlib/id52.0 index 06e95caa9f..a567238586 100644 --- a/small/idlib/id52.0 +++ b/small/idlib/id52.0 @@ -3,7 +3,7 @@ #W id52.0 GAP library of id's Hans Ulrich Besche ## Revision.id52_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 520 ] := rec( diff --git a/small/idlib/id52.2 b/small/idlib/id52.2 index 09e62d157c..2312bdc9dd 100644 --- a/small/idlib/id52.2 +++ b/small/idlib/id52.2 @@ -3,7 +3,7 @@ #W id52.2 GAP library of id's Hans Ulrich Besche ## Revision.id52_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 522 ] := rec( diff --git a/small/idlib/id52.5 b/small/idlib/id52.5 index 856a028f30..0bc29e1d58 100644 --- a/small/idlib/id52.5 +++ b/small/idlib/id52.5 @@ -3,7 +3,7 @@ #W id52.5 GAP library of id's Hans Ulrich Besche ## Revision.id52_5 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 525 ] := rec( diff --git a/small/idlib/id52.8 b/small/idlib/id52.8 index b7f64cec7a..54df0fc477 100644 --- a/small/idlib/id52.8 +++ b/small/idlib/id52.8 @@ -3,7 +3,7 @@ #W id52.8 GAP library of id's Hans Ulrich Besche ## Revision.id52_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 528 ] := rec( diff --git a/small/idlib/id53.2 b/small/idlib/id53.2 index b65cdea85b..b2e6af34d9 100644 --- a/small/idlib/id53.2 +++ b/small/idlib/id53.2 @@ -3,7 +3,7 @@ #W id53.2 GAP library of id's Hans Ulrich Besche ## Revision.id53_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 532 ] := rec( diff --git a/small/idlib/id53.6 b/small/idlib/id53.6 index de23c79426..8272926bf6 100644 --- a/small/idlib/id53.6 +++ b/small/idlib/id53.6 @@ -3,7 +3,7 @@ #W id53.6 GAP library of id's Hans Ulrich Besche ## Revision.id53_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 536 ] := rec( diff --git a/small/idlib/id54.0 b/small/idlib/id54.0 index b1a503a3cd..fa9ba65378 100644 --- a/small/idlib/id54.0 +++ b/small/idlib/id54.0 @@ -3,7 +3,7 @@ #W id54.0 GAP library of id's Hans Ulrich Besche ## Revision.id54_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 540 ] := rec( diff --git a/small/idlib/id54.4 b/small/idlib/id54.4 index ea63e9d1a4..c125661290 100644 --- a/small/idlib/id54.4 +++ b/small/idlib/id54.4 @@ -3,7 +3,7 @@ #W id54.4 GAP library of id's Hans Ulrich Besche ## Revision.id54_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 544 ] := rec( diff --git a/small/idlib/id54.6 b/small/idlib/id54.6 index b56f8d86a9..d283c76013 100644 --- a/small/idlib/id54.6 +++ b/small/idlib/id54.6 @@ -3,7 +3,7 @@ #W id54.6 GAP library of id's Hans Ulrich Besche ## Revision.id54_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 546 ] := rec( diff --git a/small/idlib/id55.0 b/small/idlib/id55.0 index 28568e0f09..c40e1aa3d8 100644 --- a/small/idlib/id55.0 +++ b/small/idlib/id55.0 @@ -3,7 +3,7 @@ #W id55.0 GAP library of id's Hans Ulrich Besche ## Revision.id55_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 550 ] := rec( diff --git a/small/idlib/id55.2 b/small/idlib/id55.2 index dd6992d56a..782133688c 100644 --- a/small/idlib/id55.2 +++ b/small/idlib/id55.2 @@ -3,7 +3,7 @@ #W id55.2 GAP library of id's Hans Ulrich Besche ## Revision.id55_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 552 ] := rec( diff --git a/small/idlib/id55.8 b/small/idlib/id55.8 index 6c92ce9317..450596fe9f 100644 --- a/small/idlib/id55.8 +++ b/small/idlib/id55.8 @@ -3,7 +3,7 @@ #W id55.8 GAP library of id's Hans Ulrich Besche ## Revision.id55_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 558 ] := rec( diff --git a/small/idlib/id56.0 b/small/idlib/id56.0 index 915604f28f..48d8730a67 100644 --- a/small/idlib/id56.0 +++ b/small/idlib/id56.0 @@ -3,7 +3,7 @@ #W id56.0 GAP library of id's Hans Ulrich Besche ## Revision.id56_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 560 ] := rec( diff --git a/small/idlib/id56.4 b/small/idlib/id56.4 index b14e48ae7a..3c63a33ca4 100644 --- a/small/idlib/id56.4 +++ b/small/idlib/id56.4 @@ -3,7 +3,7 @@ #W id56.4 GAP library of id's Hans Ulrich Besche ## Revision.id56_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 564 ] := rec( diff --git a/small/idlib/id56.7 b/small/idlib/id56.7 index 849493bad6..b1c58f6a1e 100644 --- a/small/idlib/id56.7 +++ b/small/idlib/id56.7 @@ -3,7 +3,7 @@ #W id56.7 GAP library of id's Hans Ulrich Besche ## Revision.id56_7 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 567 ] := rec( diff --git a/small/idlib/id56.8 b/small/idlib/id56.8 index fc2b875f7e..422172105a 100644 --- a/small/idlib/id56.8 +++ b/small/idlib/id56.8 @@ -3,7 +3,7 @@ #W id56.8 GAP library of id's Hans Ulrich Besche ## Revision.id56_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 568 ] := rec( diff --git a/small/idlib/id57.0 b/small/idlib/id57.0 index f3419f4570..3ea51a97dd 100644 --- a/small/idlib/id57.0 +++ b/small/idlib/id57.0 @@ -3,7 +3,7 @@ #W id57.0 GAP library of id's Hans Ulrich Besche ## Revision.id57_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 570 ] := rec( diff --git a/small/idlib/id57.2 b/small/idlib/id57.2 index dd46916217..e24fa9a54f 100644 --- a/small/idlib/id57.2 +++ b/small/idlib/id57.2 @@ -3,7 +3,7 @@ #W id57.2 GAP library of id's Hans Ulrich Besche ## Revision.id57_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 572 ] := rec( diff --git a/small/idlib/id57.6 b/small/idlib/id57.6 index 4fcc16f391..bd939aa9b0 100644 --- a/small/idlib/id57.6 +++ b/small/idlib/id57.6 @@ -3,7 +3,7 @@ #W id57.6 GAP library of id's Hans Ulrich Besche ## Revision.id57_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ] := rec( diff --git a/small/idlib/id576.b b/small/idlib/id576.b index 2761f679cf..45b8277e08 100644 --- a/small/idlib/id576.b +++ b/small/idlib/id576.b @@ -3,7 +3,7 @@ #W id576.b GAP library of id's Hans Ulrich Besche ## Revision.id576_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 2 ] := rec( diff --git a/small/idlib/id576.d b/small/idlib/id576.d index 56694248d8..612407ccd1 100644 --- a/small/idlib/id576.d +++ b/small/idlib/id576.d @@ -3,7 +3,7 @@ #W id576.d GAP library of id's Hans Ulrich Besche ## Revision.id576_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 4 ] := rec( diff --git a/small/idlib/id576.e b/small/idlib/id576.e index 4d094ee794..7c91820d8a 100644 --- a/small/idlib/id576.e +++ b/small/idlib/id576.e @@ -3,7 +3,7 @@ #W id576.e GAP library of id's Hans Ulrich Besche ## Revision.id576_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 5 ] := rec( diff --git a/small/idlib/id576.f b/small/idlib/id576.f index db0aa0371e..49ff5c1a6f 100644 --- a/small/idlib/id576.f +++ b/small/idlib/id576.f @@ -3,7 +3,7 @@ #W id576.f GAP library of id's Hans Ulrich Besche ## Revision.id576_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 6 ] := rec( diff --git a/small/idlib/id576.g b/small/idlib/id576.g index b06e71715c..2fb900b727 100644 --- a/small/idlib/id576.g +++ b/small/idlib/id576.g @@ -3,7 +3,7 @@ #W id576.g GAP library of id's Hans Ulrich Besche ## Revision.id576_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 7 ] := rec( diff --git a/small/idlib/id576.j b/small/idlib/id576.j index 13bd582c45..d21630a9ae 100644 --- a/small/idlib/id576.j +++ b/small/idlib/id576.j @@ -3,7 +3,7 @@ #W id576.j GAP library of id's Hans Ulrich Besche ## Revision.id576_j := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 10 ] := rec( diff --git a/small/idlib/id576.k b/small/idlib/id576.k index 31a125ba9a..caca704512 100644 --- a/small/idlib/id576.k +++ b/small/idlib/id576.k @@ -3,7 +3,7 @@ #W id576.k GAP library of id's Hans Ulrich Besche ## Revision.id576_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 11 ] := rec( diff --git a/small/idlib/id576.l b/small/idlib/id576.l index 788812e148..2ebf31a63e 100644 --- a/small/idlib/id576.l +++ b/small/idlib/id576.l @@ -3,7 +3,7 @@ #W id576.l GAP library of id's Hans Ulrich Besche ## Revision.id576_l := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 12 ] := rec( diff --git a/small/idlib/id576.o b/small/idlib/id576.o index dcc9b4b283..feaca730b7 100644 --- a/small/idlib/id576.o +++ b/small/idlib/id576.o @@ -3,7 +3,7 @@ #W id576.o GAP library of id's Hans Ulrich Besche ## Revision.id576_o := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 15 ] := rec( diff --git a/small/idlib/id576.y b/small/idlib/id576.y index f81c1d31ad..d8bd1cc6da 100644 --- a/small/idlib/id576.y +++ b/small/idlib/id576.y @@ -3,7 +3,7 @@ #W id576.y GAP library of id's Hans Ulrich Besche ## Revision.id576_y := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 25 ] := rec( diff --git a/small/idlib/id576a.d b/small/idlib/id576a.d index e9acf699cb..6d48f05e5f 100644 --- a/small/idlib/id576a.d +++ b/small/idlib/id576a.d @@ -3,7 +3,7 @@ #W id576a.d GAP library of id's Hans Ulrich Besche ## Revision.id576a_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 30 ] := rec( diff --git a/small/idlib/id576a.e b/small/idlib/id576a.e index 4b36ea8d9b..fc2d59e451 100644 --- a/small/idlib/id576a.e +++ b/small/idlib/id576a.e @@ -3,7 +3,7 @@ #W id576a.e GAP library of id's Hans Ulrich Besche ## Revision.id576a_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 31 ] := rec( diff --git a/small/idlib/id576a.m b/small/idlib/id576a.m index c03cac5aa4..0f5e2b02a1 100644 --- a/small/idlib/id576a.m +++ b/small/idlib/id576a.m @@ -3,7 +3,7 @@ #W id576a.m GAP library of id's Hans Ulrich Besche ## Revision.id576a_m := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 39 ] := rec( diff --git a/small/idlib/id576a.p b/small/idlib/id576a.p index 9dda9ded91..bae35b0419 100644 --- a/small/idlib/id576a.p +++ b/small/idlib/id576a.p @@ -3,7 +3,7 @@ #W id576a.p GAP library of id's Hans Ulrich Besche ## Revision.id576a_p := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 42 ] := rec( diff --git a/small/idlib/id576ae.d b/small/idlib/id576ae.d index 4dafead4a4..881e4cf55e 100644 --- a/small/idlib/id576ae.d +++ b/small/idlib/id576ae.d @@ -3,7 +3,7 @@ #W id576ae.d GAP library of id's Hans Ulrich Besche ## Revision.id576ae_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 31 ].next[ 4 ] := rec( diff --git a/small/idlib/id576d.b b/small/idlib/id576d.b index ec9be76b84..1f77a01c26 100644 --- a/small/idlib/id576d.b +++ b/small/idlib/id576d.b @@ -3,7 +3,7 @@ #W id576d.b GAP library of id's Hans Ulrich Besche ## Revision.id576d_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 4 ].next[ 2 ] := rec( diff --git a/small/idlib/id576h.b b/small/idlib/id576h.b index edbcdd0262..1416845974 100644 --- a/small/idlib/id576h.b +++ b/small/idlib/id576h.b @@ -3,7 +3,7 @@ #W id576h.b GAP library of id's Hans Ulrich Besche ## Revision.id576h_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 8 ].next[ 2 ] := rec( diff --git a/small/idlib/id576h.c b/small/idlib/id576h.c index 05ed301dab..92204ad53a 100644 --- a/small/idlib/id576h.c +++ b/small/idlib/id576h.c @@ -3,7 +3,7 @@ #W id576h.c GAP library of id's Hans Ulrich Besche ## Revision.id576h_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 8 ].next[ 3 ] := rec( diff --git a/small/idlib/id576j.c b/small/idlib/id576j.c index 9c554f7c2b..7304093274 100644 --- a/small/idlib/id576j.c +++ b/small/idlib/id576j.c @@ -3,7 +3,7 @@ #W id576j.c GAP library of id's Hans Ulrich Besche ## Revision.id576j_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 10 ].next[ 3 ] := rec( diff --git a/small/idlib/id576j.h b/small/idlib/id576j.h index a059885099..83731c9a4b 100644 --- a/small/idlib/id576j.h +++ b/small/idlib/id576j.h @@ -3,7 +3,7 @@ #W id576j.h GAP library of id's Hans Ulrich Besche ## Revision.id576j_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 10 ].next[ 8 ] := rec( diff --git a/small/idlib/id576k.b b/small/idlib/id576k.b index 57ec075a6f..9174f0b288 100644 --- a/small/idlib/id576k.b +++ b/small/idlib/id576k.b @@ -3,7 +3,7 @@ #W id576k.b GAP library of id's Hans Ulrich Besche ## Revision.id576k_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 11 ].next[ 2 ] := rec( diff --git a/small/idlib/id576l.c b/small/idlib/id576l.c index d022552760..6108692d5a 100644 --- a/small/idlib/id576l.c +++ b/small/idlib/id576l.c @@ -3,7 +3,7 @@ #W id576l.c GAP library of id's Hans Ulrich Besche ## Revision.id576l_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 12 ].next[ 3 ] := rec( diff --git a/small/idlib/id576l.d b/small/idlib/id576l.d index 79376cdcaf..ee3b3653be 100644 --- a/small/idlib/id576l.d +++ b/small/idlib/id576l.d @@ -3,7 +3,7 @@ #W id576l.d GAP library of id's Hans Ulrich Besche ## Revision.id576l_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 12 ].next[ 4 ] := rec( diff --git a/small/idlib/id576l.h b/small/idlib/id576l.h index edfdbb0f3c..31e3735387 100644 --- a/small/idlib/id576l.h +++ b/small/idlib/id576l.h @@ -3,7 +3,7 @@ #W id576l.h GAP library of id's Hans Ulrich Besche ## Revision.id576l_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 12 ].next[ 8 ] := rec( diff --git a/small/idlib/id576l.j b/small/idlib/id576l.j index ee074276bd..d0d9d5294f 100644 --- a/small/idlib/id576l.j +++ b/small/idlib/id576l.j @@ -3,7 +3,7 @@ #W id576l.j GAP library of id's Hans Ulrich Besche ## Revision.id576l_j := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 12 ].next[ 10 ] := rec( diff --git a/small/idlib/id576l.m b/small/idlib/id576l.m index a308e192bf..28a18a6b86 100644 --- a/small/idlib/id576l.m +++ b/small/idlib/id576l.m @@ -3,7 +3,7 @@ #W id576l.m GAP library of id's Hans Ulrich Besche ## Revision.id576l_m := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 12 ].next[ 13 ] := rec( diff --git a/small/idlib/id576lc.c b/small/idlib/id576lc.c index a19748f611..63465736ac 100644 --- a/small/idlib/id576lc.c +++ b/small/idlib/id576lc.c @@ -3,7 +3,7 @@ #W id576lc.c GAP library of id's Hans Ulrich Besche ## Revision.id576lc_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 12 ].next[ 3 ].next[ 3 ] := rec( diff --git a/small/idlib/id576lc.g b/small/idlib/id576lc.g index 21f4a053f7..dca0656a48 100644 --- a/small/idlib/id576lc.g +++ b/small/idlib/id576lc.g @@ -3,7 +3,7 @@ #W id576lc.g GAP library of id's Hans Ulrich Besche ## Revision.id576lc_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 12 ].next[ 3 ].next[ 7 ] := rec( diff --git a/small/idlib/id576lc.n b/small/idlib/id576lc.n index b7f0c3391e..1947fd4d6b 100644 --- a/small/idlib/id576lc.n +++ b/small/idlib/id576lc.n @@ -3,7 +3,7 @@ #W id576lc.n GAP library of id's Hans Ulrich Besche ## Revision.id576lc_n := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 12 ].next[ 3 ].next[ 14 ] := rec( diff --git a/small/idlib/id576lc.p b/small/idlib/id576lc.p index b6169f7b73..3901cf50a9 100644 --- a/small/idlib/id576lc.p +++ b/small/idlib/id576lc.p @@ -3,7 +3,7 @@ #W id576lc.p GAP library of id's Hans Ulrich Besche ## Revision.id576lc_p := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 12 ].next[ 3 ].next[ 16 ] := rec( diff --git a/small/idlib/id576lca.d b/small/idlib/id576lca.d index 84745dc830..cbe0643729 100644 --- a/small/idlib/id576lca.d +++ b/small/idlib/id576lca.d @@ -3,7 +3,7 @@ #W id576lca.d GAP library of id's Hans Ulrich Besche ## Revision.id576lca_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 12 ].next[ 3 ].next[ 30 ] := rec( diff --git a/small/idlib/id576lca.h b/small/idlib/id576lca.h index 3bd01c4baa..825b27e729 100644 --- a/small/idlib/id576lca.h +++ b/small/idlib/id576lca.h @@ -3,7 +3,7 @@ #W id576lca.h GAP library of id's Hans Ulrich Besche ## Revision.id576lca_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 12 ].next[ 3 ].next[ 34 ] := rec( diff --git a/small/idlib/id576lca.n b/small/idlib/id576lca.n index 8383fab335..80aa9f3ed4 100644 --- a/small/idlib/id576lca.n +++ b/small/idlib/id576lca.n @@ -3,7 +3,7 @@ #W id576lca.n GAP library of id's Hans Ulrich Besche ## Revision.id576lca_n := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 12 ].next[ 3 ].next[ 40 ] := rec( diff --git a/small/idlib/id576lca.q b/small/idlib/id576lca.q index 6abf926c9b..1f1630c77a 100644 --- a/small/idlib/id576lca.q +++ b/small/idlib/id576lca.q @@ -3,7 +3,7 @@ #W id576lca.q GAP library of id's Hans Ulrich Besche ## Revision.id576lca_q := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 12 ].next[ 3 ].next[ 43 ] := rec( diff --git a/small/idlib/id576lcb.v b/small/idlib/id576lcb.v index 5b65fe6694..10590ab4f7 100644 --- a/small/idlib/id576lcb.v +++ b/small/idlib/id576lcb.v @@ -3,7 +3,7 @@ #W id576lcb.v GAP library of id's Hans Ulrich Besche ## Revision.id576lcb_v := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 12 ].next[ 3 ].next[ 74 ] := rec( diff --git a/small/idlib/id576o.b b/small/idlib/id576o.b index 9f19d94035..25d3015bbe 100644 --- a/small/idlib/id576o.b +++ b/small/idlib/id576o.b @@ -3,7 +3,7 @@ #W id576o.b GAP library of id's Hans Ulrich Besche ## Revision.id576o_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 15 ].next[ 2 ] := rec( diff --git a/small/idlib/id576o.c b/small/idlib/id576o.c index bcabd521e1..e3b32263d7 100644 --- a/small/idlib/id576o.c +++ b/small/idlib/id576o.c @@ -3,7 +3,7 @@ #W id576o.c GAP library of id's Hans Ulrich Besche ## Revision.id576o_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 15 ].next[ 3 ] := rec( diff --git a/small/idlib/id576o.d b/small/idlib/id576o.d index 2e2ca45cb0..6afd34e806 100644 --- a/small/idlib/id576o.d +++ b/small/idlib/id576o.d @@ -3,7 +3,7 @@ #W id576o.d GAP library of id's Hans Ulrich Besche ## Revision.id576o_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 15 ].next[ 4 ] := rec( diff --git a/small/idlib/id576o.g b/small/idlib/id576o.g index 72e737eacc..40d3b16a6d 100644 --- a/small/idlib/id576o.g +++ b/small/idlib/id576o.g @@ -3,7 +3,7 @@ #W id576o.g GAP library of id's Hans Ulrich Besche ## Revision.id576o_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 15 ].next[ 7 ] := rec( diff --git a/small/idlib/id576o.h b/small/idlib/id576o.h index 7f74d7a889..67ed76cd51 100644 --- a/small/idlib/id576o.h +++ b/small/idlib/id576o.h @@ -3,7 +3,7 @@ #W id576o.h GAP library of id's Hans Ulrich Besche ## Revision.id576o_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 15 ].next[ 8 ] := rec( diff --git a/small/idlib/id576o.i b/small/idlib/id576o.i index 77dfe9a274..4fa3b84994 100644 --- a/small/idlib/id576o.i +++ b/small/idlib/id576o.i @@ -3,7 +3,7 @@ #W id576o.i GAP library of id's Hans Ulrich Besche ## Revision.id576o_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 15 ].next[ 9 ] := rec( diff --git a/small/idlib/id576od.f b/small/idlib/id576od.f index ecdebf9014..516bf54a70 100644 --- a/small/idlib/id576od.f +++ b/small/idlib/id576od.f @@ -3,7 +3,7 @@ #W id576od.f GAP library of id's Hans Ulrich Besche ## Revision.id576od_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 576 ].next[ 15 ].next[ 4 ].next[ 6 ] := rec( diff --git a/small/idlib/id58.0 b/small/idlib/id58.0 index a1dd152f06..aa14795f6e 100644 --- a/small/idlib/id58.0 +++ b/small/idlib/id58.0 @@ -3,7 +3,7 @@ #W id58.0 GAP library of id's Hans Ulrich Besche ## Revision.id58_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 580 ] := rec( diff --git a/small/idlib/id58.4 b/small/idlib/id58.4 index 4946ab845e..57d59dd294 100644 --- a/small/idlib/id58.4 +++ b/small/idlib/id58.4 @@ -3,7 +3,7 @@ #W id58.4 GAP library of id's Hans Ulrich Besche ## Revision.id58_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 584 ] := rec( diff --git a/small/idlib/id58.5 b/small/idlib/id58.5 index e306af5566..70add18978 100644 --- a/small/idlib/id58.5 +++ b/small/idlib/id58.5 @@ -3,7 +3,7 @@ #W id58.5 GAP library of id's Hans Ulrich Besche ## Revision.id58_5 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 585 ] := rec( diff --git a/small/idlib/id58.8 b/small/idlib/id58.8 index ec4e287d6a..a0d2ee93fb 100644 --- a/small/idlib/id58.8 +++ b/small/idlib/id58.8 @@ -3,7 +3,7 @@ #W id58.8 GAP library of id's Hans Ulrich Besche ## Revision.id58_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 588 ] := rec( diff --git a/small/idlib/id59.2 b/small/idlib/id59.2 index fd60dd2598..b543c814b3 100644 --- a/small/idlib/id59.2 +++ b/small/idlib/id59.2 @@ -3,7 +3,7 @@ #W id59.2 GAP library of id's Hans Ulrich Besche ## Revision.id59_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 592 ] := rec( diff --git a/small/idlib/id59.4 b/small/idlib/id59.4 index 1c577f3444..2917568d15 100644 --- a/small/idlib/id59.4 +++ b/small/idlib/id59.4 @@ -3,7 +3,7 @@ #W id59.4 GAP library of id's Hans Ulrich Besche ## Revision.id59_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 594 ] := rec( diff --git a/small/idlib/id60.0 b/small/idlib/id60.0 index 298946df5c..6c6aaba4c6 100644 --- a/small/idlib/id60.0 +++ b/small/idlib/id60.0 @@ -3,7 +3,7 @@ #W id60.0 GAP library of id's Hans Ulrich Besche ## Revision.id60_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 600 ] := rec( diff --git a/small/idlib/id60.8 b/small/idlib/id60.8 index a68182b7d4..d40988dca2 100644 --- a/small/idlib/id60.8 +++ b/small/idlib/id60.8 @@ -3,7 +3,7 @@ #W id60.8 GAP library of id's Hans Ulrich Besche ## Revision.id60_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 608 ] := rec( diff --git a/small/idlib/id61.2 b/small/idlib/id61.2 index a210acf271..3309dc57de 100644 --- a/small/idlib/id61.2 +++ b/small/idlib/id61.2 @@ -3,7 +3,7 @@ #W id61.2 GAP library of id's Hans Ulrich Besche ## Revision.id61_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 612 ] := rec( diff --git a/small/idlib/id61.6 b/small/idlib/id61.6 index 15457e9bba..a024948218 100644 --- a/small/idlib/id61.6 +++ b/small/idlib/id61.6 @@ -3,7 +3,7 @@ #W id61.6 GAP library of id's Hans Ulrich Besche ## Revision.id61_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 616 ] := rec( diff --git a/small/idlib/id62.0 b/small/idlib/id62.0 index 576f23d9e4..0eea4dfefc 100644 --- a/small/idlib/id62.0 +++ b/small/idlib/id62.0 @@ -3,7 +3,7 @@ #W id62.0 GAP library of id's Hans Ulrich Besche ## Revision.id62_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 620 ] := rec( diff --git a/small/idlib/id62.1 b/small/idlib/id62.1 index a395ae1a50..33cf25fa02 100644 --- a/small/idlib/id62.1 +++ b/small/idlib/id62.1 @@ -3,7 +3,7 @@ #W id62.1 GAP library of id's Hans Ulrich Besche ## Revision.id62_1 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 621 ] := rec( diff --git a/small/idlib/id62.4 b/small/idlib/id62.4 index 21c8a789d8..23d95b08cf 100644 --- a/small/idlib/id62.4 +++ b/small/idlib/id62.4 @@ -3,7 +3,7 @@ #W id62.4 GAP library of id's Hans Ulrich Besche ## Revision.id62_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 624 ] := rec( diff --git a/small/idlib/id62.5 b/small/idlib/id62.5 index 1edff73a8e..22404e5739 100644 --- a/small/idlib/id62.5 +++ b/small/idlib/id62.5 @@ -3,7 +3,7 @@ #W id62.5 GAP library of id's Hans Ulrich Besche ## Revision.id62_5 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 625 ] := rec( diff --git a/small/idlib/id624.l b/small/idlib/id624.l index 9126420d65..e0a8895e04 100644 --- a/small/idlib/id624.l +++ b/small/idlib/id624.l @@ -3,7 +3,7 @@ #W id624.l GAP library of id's Hans Ulrich Besche ## Revision.id624_l := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 624 ].next[ 12 ] := rec( diff --git a/small/idlib/id63.0 b/small/idlib/id63.0 index 126f1badbc..3baedd5b3b 100644 --- a/small/idlib/id63.0 +++ b/small/idlib/id63.0 @@ -3,7 +3,7 @@ #W id63.0 GAP library of id's Hans Ulrich Besche ## Revision.id63_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 630 ] := rec( diff --git a/small/idlib/id63.2 b/small/idlib/id63.2 index b9752de616..5544db5bcc 100644 --- a/small/idlib/id63.2 +++ b/small/idlib/id63.2 @@ -3,7 +3,7 @@ #W id63.2 GAP library of id's Hans Ulrich Besche ## Revision.id63_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 632 ] := rec( diff --git a/small/idlib/id63.6 b/small/idlib/id63.6 index f41b07cf38..f456afa645 100644 --- a/small/idlib/id63.6 +++ b/small/idlib/id63.6 @@ -3,7 +3,7 @@ #W id63.6 GAP library of id's Hans Ulrich Besche ## Revision.id63_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 636 ] := rec( diff --git a/small/idlib/id64.0 b/small/idlib/id64.0 index c6cd7e4664..cba820d218 100644 --- a/small/idlib/id64.0 +++ b/small/idlib/id64.0 @@ -3,7 +3,7 @@ #W id64.0 GAP library of id's Hans Ulrich Besche ## Revision.id64_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ] := rec( diff --git a/small/idlib/id64.4 b/small/idlib/id64.4 index 8841793514..0b4de3490a 100644 --- a/small/idlib/id64.4 +++ b/small/idlib/id64.4 @@ -3,7 +3,7 @@ #W id64.4 GAP library of id's Hans Ulrich Besche ## Revision.id64_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 644 ] := rec( diff --git a/small/idlib/id64.8 b/small/idlib/id64.8 index e1fe414714..2c5d889cd6 100644 --- a/small/idlib/id64.8 +++ b/small/idlib/id64.8 @@ -3,7 +3,7 @@ #W id64.8 GAP library of id's Hans Ulrich Besche ## Revision.id64_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 648 ] := rec( diff --git a/small/idlib/id640.b b/small/idlib/id640.b index 486efd69a7..f45c607f63 100644 --- a/small/idlib/id640.b +++ b/small/idlib/id640.b @@ -3,7 +3,7 @@ #W id640.b GAP library of id's Hans Ulrich Besche ## Revision.id640_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 2 ] := rec( diff --git a/small/idlib/id640.e b/small/idlib/id640.e index 091a7de93f..d1d3f87854 100644 --- a/small/idlib/id640.e +++ b/small/idlib/id640.e @@ -3,7 +3,7 @@ #W id640.e GAP library of id's Hans Ulrich Besche ## Revision.id640_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 5 ] := rec( diff --git a/small/idlib/id640.f b/small/idlib/id640.f index 9a4a81314a..a6d8370b8b 100644 --- a/small/idlib/id640.f +++ b/small/idlib/id640.f @@ -3,7 +3,7 @@ #W id640.f GAP library of id's Hans Ulrich Besche ## Revision.id640_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 6 ] := rec( diff --git a/small/idlib/id640.g b/small/idlib/id640.g index 5614e46b25..959c631bee 100644 --- a/small/idlib/id640.g +++ b/small/idlib/id640.g @@ -3,7 +3,7 @@ #W id640.g GAP library of id's Hans Ulrich Besche ## Revision.id640_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 7 ] := rec( diff --git a/small/idlib/id640.h b/small/idlib/id640.h index 0157b4e75a..35e724b3be 100644 --- a/small/idlib/id640.h +++ b/small/idlib/id640.h @@ -3,7 +3,7 @@ #W id640.h GAP library of id's Hans Ulrich Besche ## Revision.id640_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ] := rec( diff --git a/small/idlib/id640.k b/small/idlib/id640.k index 4d6e8b7838..907dd9d2f3 100644 --- a/small/idlib/id640.k +++ b/small/idlib/id640.k @@ -3,7 +3,7 @@ #W id640.k GAP library of id's Hans Ulrich Besche ## Revision.id640_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 11 ] := rec( diff --git a/small/idlib/id640.p b/small/idlib/id640.p index 0009b4d11c..b1c5b5241a 100644 --- a/small/idlib/id640.p +++ b/small/idlib/id640.p @@ -3,7 +3,7 @@ #W id640.p GAP library of id's Hans Ulrich Besche ## Revision.id640_p := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 16 ] := rec( diff --git a/small/idlib/id640c.a b/small/idlib/id640c.a index 6d351bdaf3..bbd09bc862 100644 --- a/small/idlib/id640c.a +++ b/small/idlib/id640c.a @@ -3,7 +3,7 @@ #W id640c.a GAP library of id's Hans Ulrich Besche ## Revision.id640c_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 3 ].next[ 1 ] := rec( diff --git a/small/idlib/id640c.b b/small/idlib/id640c.b index 7dc703384d..7328cd712d 100644 --- a/small/idlib/id640c.b +++ b/small/idlib/id640c.b @@ -3,7 +3,7 @@ #W id640c.b GAP library of id's Hans Ulrich Besche ## Revision.id640c_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 3 ].next[ 2 ] := rec( diff --git a/small/idlib/id640ca.d b/small/idlib/id640ca.d index 16f194c4fb..6331132406 100644 --- a/small/idlib/id640ca.d +++ b/small/idlib/id640ca.d @@ -3,7 +3,7 @@ #W id640ca.d GAP library of id's Hans Ulrich Besche ## Revision.id640ca_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 3 ].next[ 1 ].next[ 4 ] := rec( diff --git a/small/idlib/id640e.a b/small/idlib/id640e.a index 39024d154b..c4d3933ea1 100644 --- a/small/idlib/id640e.a +++ b/small/idlib/id640e.a @@ -3,7 +3,7 @@ #W id640e.a GAP library of id's Hans Ulrich Besche ## Revision.id640e_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 5 ].next[ 1 ] := rec( diff --git a/small/idlib/id640e.b b/small/idlib/id640e.b index ca2c701c45..6543cc2359 100644 --- a/small/idlib/id640e.b +++ b/small/idlib/id640e.b @@ -3,7 +3,7 @@ #W id640e.b GAP library of id's Hans Ulrich Besche ## Revision.id640e_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 5 ].next[ 2 ] := rec( diff --git a/small/idlib/id640ea.b b/small/idlib/id640ea.b index d465e49f10..4085a521d3 100644 --- a/small/idlib/id640ea.b +++ b/small/idlib/id640ea.b @@ -3,7 +3,7 @@ #W id640ea.b GAP library of id's Hans Ulrich Besche ## Revision.id640ea_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 5 ].next[ 1 ].next[ 2 ] := rec( diff --git a/small/idlib/id640ea.c b/small/idlib/id640ea.c index 903a660c71..7dac02aba4 100644 --- a/small/idlib/id640ea.c +++ b/small/idlib/id640ea.c @@ -3,7 +3,7 @@ #W id640ea.c GAP library of id's Hans Ulrich Besche ## Revision.id640ea_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 5 ].next[ 1 ].next[ 3 ] := rec( diff --git a/small/idlib/id640ea.d b/small/idlib/id640ea.d index 5441ecd165..f737ad8a1e 100644 --- a/small/idlib/id640ea.d +++ b/small/idlib/id640ea.d @@ -3,7 +3,7 @@ #W id640ea.d GAP library of id's Hans Ulrich Besche ## Revision.id640ea_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 5 ].next[ 1 ].next[ 4 ] := rec( diff --git a/small/idlib/id640eb.d b/small/idlib/id640eb.d index 9b01c57bc4..7524b7d9b0 100644 --- a/small/idlib/id640eb.d +++ b/small/idlib/id640eb.d @@ -3,7 +3,7 @@ #W id640eb.d GAP library of id's Hans Ulrich Besche ## Revision.id640eb_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 5 ].next[ 2 ].next[ 4 ] := rec( diff --git a/small/idlib/id640eb.f b/small/idlib/id640eb.f index 329a07299c..dd6061f220 100644 --- a/small/idlib/id640eb.f +++ b/small/idlib/id640eb.f @@ -3,7 +3,7 @@ #W id640eb.f GAP library of id's Hans Ulrich Besche ## Revision.id640eb_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 5 ].next[ 2 ].next[ 6 ] := rec( diff --git a/small/idlib/id640eb.i b/small/idlib/id640eb.i index 57e246a101..1feefb91f4 100644 --- a/small/idlib/id640eb.i +++ b/small/idlib/id640eb.i @@ -3,7 +3,7 @@ #W id640eb.i GAP library of id's Hans Ulrich Besche ## Revision.id640eb_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 5 ].next[ 2 ].next[ 9 ] := rec( diff --git a/small/idlib/id640eb.k b/small/idlib/id640eb.k index d1af5860de..aacbcc64ba 100644 --- a/small/idlib/id640eb.k +++ b/small/idlib/id640eb.k @@ -3,7 +3,7 @@ #W id640eb.k GAP library of id's Hans Ulrich Besche ## Revision.id640eb_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 5 ].next[ 2 ].next[ 11 ] := rec( diff --git a/small/idlib/id640eb.o b/small/idlib/id640eb.o index dde227bdfc..7a90a5b184 100644 --- a/small/idlib/id640eb.o +++ b/small/idlib/id640eb.o @@ -3,7 +3,7 @@ #W id640eb.o GAP library of id's Hans Ulrich Besche ## Revision.id640eb_o := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 5 ].next[ 2 ].next[ 15 ] := rec( diff --git a/small/idlib/id640eb.s b/small/idlib/id640eb.s index b7ffc013b0..7b69c7cd37 100644 --- a/small/idlib/id640eb.s +++ b/small/idlib/id640eb.s @@ -3,7 +3,7 @@ #W id640eb.s GAP library of id's Hans Ulrich Besche ## Revision.id640eb_s := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 5 ].next[ 2 ].next[ 19 ] := rec( diff --git a/small/idlib/id640eb.w b/small/idlib/id640eb.w index 688cb6301b..d95a12a7f9 100644 --- a/small/idlib/id640eb.w +++ b/small/idlib/id640eb.w @@ -3,7 +3,7 @@ #W id640eb.w GAP library of id's Hans Ulrich Besche ## Revision.id640eb_w := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 5 ].next[ 2 ].next[ 23 ] := rec( diff --git a/small/idlib/id640f.c b/small/idlib/id640f.c index 908332d594..65ec987168 100644 --- a/small/idlib/id640f.c +++ b/small/idlib/id640f.c @@ -3,7 +3,7 @@ #W id640f.c GAP library of id's Hans Ulrich Besche ## Revision.id640f_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 6 ].next[ 3 ] := rec( diff --git a/small/idlib/id640f.f b/small/idlib/id640f.f index 99533b398e..147ac90982 100644 --- a/small/idlib/id640f.f +++ b/small/idlib/id640f.f @@ -3,7 +3,7 @@ #W id640f.f GAP library of id's Hans Ulrich Besche ## Revision.id640f_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 6 ].next[ 6 ] := rec( diff --git a/small/idlib/id640g.c b/small/idlib/id640g.c index e89f703461..7e47b8398d 100644 --- a/small/idlib/id640g.c +++ b/small/idlib/id640g.c @@ -3,7 +3,7 @@ #W id640g.c GAP library of id's Hans Ulrich Besche ## Revision.id640g_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 7 ].next[ 3 ] := rec( diff --git a/small/idlib/id640h.c b/small/idlib/id640h.c index 2755fcbbd9..8b3c8eb021 100644 --- a/small/idlib/id640h.c +++ b/small/idlib/id640h.c @@ -3,7 +3,7 @@ #W id640h.c GAP library of id's Hans Ulrich Besche ## Revision.id640h_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 3 ] := rec( diff --git a/small/idlib/id640h.d b/small/idlib/id640h.d index cfcd3720d3..7819697995 100644 --- a/small/idlib/id640h.d +++ b/small/idlib/id640h.d @@ -3,7 +3,7 @@ #W id640h.d GAP library of id's Hans Ulrich Besche ## Revision.id640h_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 4 ] := rec( diff --git a/small/idlib/id640h.f b/small/idlib/id640h.f index 8783bfb7e2..088212fb11 100644 --- a/small/idlib/id640h.f +++ b/small/idlib/id640h.f @@ -3,7 +3,7 @@ #W id640h.f GAP library of id's Hans Ulrich Besche ## Revision.id640h_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 6 ] := rec( diff --git a/small/idlib/id640hc.a b/small/idlib/id640hc.a index a831b7a6e9..bdf8cb8073 100644 --- a/small/idlib/id640hc.a +++ b/small/idlib/id640hc.a @@ -3,7 +3,7 @@ #W id640hc.a GAP library of id's Hans Ulrich Besche ## Revision.id640hc_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 3 ].next[ 1 ] := rec( diff --git a/small/idlib/id640hc.b b/small/idlib/id640hc.b index 1c9467bab8..79bc40e0e3 100644 --- a/small/idlib/id640hc.b +++ b/small/idlib/id640hc.b @@ -3,7 +3,7 @@ #W id640hc.b GAP library of id's Hans Ulrich Besche ## Revision.id640hc_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 3 ].next[ 2 ] := rec( diff --git a/small/idlib/id640hc.d b/small/idlib/id640hc.d index f26b07459d..23787e9ba3 100644 --- a/small/idlib/id640hc.d +++ b/small/idlib/id640hc.d @@ -3,7 +3,7 @@ #W id640hc.d GAP library of id's Hans Ulrich Besche ## Revision.id640hc_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 3 ].next[ 4 ] := rec( diff --git a/small/idlib/id640hc.f b/small/idlib/id640hc.f index 095a464699..0b906b54b5 100644 --- a/small/idlib/id640hc.f +++ b/small/idlib/id640hc.f @@ -3,7 +3,7 @@ #W id640hc.f GAP library of id's Hans Ulrich Besche ## Revision.id640hc_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 3 ].next[ 6 ] := rec( diff --git a/small/idlib/id640hc.j b/small/idlib/id640hc.j index 77f553bf41..01f9f3f4a2 100644 --- a/small/idlib/id640hc.j +++ b/small/idlib/id640hc.j @@ -3,7 +3,7 @@ #W id640hc.j GAP library of id's Hans Ulrich Besche ## Revision.id640hc_j := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 3 ].next[ 10 ] := rec( diff --git a/small/idlib/id640hc.m b/small/idlib/id640hc.m index 6f376ce081..baa6c6b81b 100644 --- a/small/idlib/id640hc.m +++ b/small/idlib/id640hc.m @@ -3,7 +3,7 @@ #W id640hc.m GAP library of id's Hans Ulrich Besche ## Revision.id640hc_m := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 3 ].next[ 13 ] := rec( diff --git a/small/idlib/id640hc.o b/small/idlib/id640hc.o index 39afef7db2..43f90f51b1 100644 --- a/small/idlib/id640hc.o +++ b/small/idlib/id640hc.o @@ -3,7 +3,7 @@ #W id640hc.o GAP library of id's Hans Ulrich Besche ## Revision.id640hc_o := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 3 ].next[ 15 ] := rec( diff --git a/small/idlib/id640hc.q b/small/idlib/id640hc.q index 532848e1b4..e0047b512f 100644 --- a/small/idlib/id640hc.q +++ b/small/idlib/id640hc.q @@ -3,7 +3,7 @@ #W id640hc.q GAP library of id's Hans Ulrich Besche ## Revision.id640hc_q := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 3 ].next[ 17 ] := rec( diff --git a/small/idlib/id640hc.s b/small/idlib/id640hc.s index 4c22e5a15b..0f6841b204 100644 --- a/small/idlib/id640hc.s +++ b/small/idlib/id640hc.s @@ -3,7 +3,7 @@ #W id640hc.s GAP library of id's Hans Ulrich Besche ## Revision.id640hc_s := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 3 ].next[ 19 ] := rec( diff --git a/small/idlib/id640hc.v b/small/idlib/id640hc.v index 09831b8264..0be897b80a 100644 --- a/small/idlib/id640hc.v +++ b/small/idlib/id640hc.v @@ -3,7 +3,7 @@ #W id640hc.v GAP library of id's Hans Ulrich Besche ## Revision.id640hc_v := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 3 ].next[ 22 ] := rec( diff --git a/small/idlib/id640hc.y b/small/idlib/id640hc.y index 8ce433f4d7..b5124ef8ba 100644 --- a/small/idlib/id640hc.y +++ b/small/idlib/id640hc.y @@ -3,7 +3,7 @@ #W id640hc.y GAP library of id's Hans Ulrich Besche ## Revision.id640hc_y := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 3 ].next[ 25 ] := rec( diff --git a/small/idlib/id640hca.b b/small/idlib/id640hca.b index 72e19cb202..132a83eeb2 100644 --- a/small/idlib/id640hca.b +++ b/small/idlib/id640hca.b @@ -3,7 +3,7 @@ #W id640hca.b GAP library of id's Hans Ulrich Besche ## Revision.id640hca_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 3 ].next[ 28 ] := rec( diff --git a/small/idlib/id640hca.f b/small/idlib/id640hca.f index 14221a7736..e56d6ed660 100644 --- a/small/idlib/id640hca.f +++ b/small/idlib/id640hca.f @@ -3,7 +3,7 @@ #W id640hca.f GAP library of id's Hans Ulrich Besche ## Revision.id640hca_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 3 ].next[ 32 ] := rec( diff --git a/small/idlib/id640hca.h b/small/idlib/id640hca.h index 1fcd66df29..6f5304152a 100644 --- a/small/idlib/id640hca.h +++ b/small/idlib/id640hca.h @@ -3,7 +3,7 @@ #W id640hca.h GAP library of id's Hans Ulrich Besche ## Revision.id640hca_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 3 ].next[ 34 ] := rec( diff --git a/small/idlib/id640hca.i b/small/idlib/id640hca.i index 3ab11e093a..9777aac4c2 100644 --- a/small/idlib/id640hca.i +++ b/small/idlib/id640hca.i @@ -3,7 +3,7 @@ #W id640hca.i GAP library of id's Hans Ulrich Besche ## Revision.id640hca_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 3 ].next[ 35 ] := rec( diff --git a/small/idlib/id640hca.k b/small/idlib/id640hca.k index 02f3adc9dc..6edec82d97 100644 --- a/small/idlib/id640hca.k +++ b/small/idlib/id640hca.k @@ -3,7 +3,7 @@ #W id640hca.k GAP library of id's Hans Ulrich Besche ## Revision.id640hca_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 3 ].next[ 37 ] := rec( diff --git a/small/idlib/id640hca.m b/small/idlib/id640hca.m index 121910cf9a..5742b5f0c6 100644 --- a/small/idlib/id640hca.m +++ b/small/idlib/id640hca.m @@ -3,7 +3,7 @@ #W id640hca.m GAP library of id's Hans Ulrich Besche ## Revision.id640hca_m := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 3 ].next[ 39 ] := rec( diff --git a/small/idlib/id640hca.q b/small/idlib/id640hca.q index b4b75c7e9b..2cf38e230b 100644 --- a/small/idlib/id640hca.q +++ b/small/idlib/id640hca.q @@ -3,7 +3,7 @@ #W id640hca.q GAP library of id's Hans Ulrich Besche ## Revision.id640hca_q := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 3 ].next[ 43 ] := rec( diff --git a/small/idlib/id640hca.u b/small/idlib/id640hca.u index 10edf247d2..39e2985070 100644 --- a/small/idlib/id640hca.u +++ b/small/idlib/id640hca.u @@ -3,7 +3,7 @@ #W id640hca.u GAP library of id's Hans Ulrich Besche ## Revision.id640hca_u := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 3 ].next[ 47 ] := rec( diff --git a/small/idlib/id640hd.b b/small/idlib/id640hd.b index acd75a00ed..b8ebd608d2 100644 --- a/small/idlib/id640hd.b +++ b/small/idlib/id640hd.b @@ -3,7 +3,7 @@ #W id640hd.b GAP library of id's Hans Ulrich Besche ## Revision.id640hd_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 4 ].next[ 2 ] := rec( diff --git a/small/idlib/id640hd.c b/small/idlib/id640hd.c index c91b5abcbd..52969c639e 100644 --- a/small/idlib/id640hd.c +++ b/small/idlib/id640hd.c @@ -3,7 +3,7 @@ #W id640hd.c GAP library of id's Hans Ulrich Besche ## Revision.id640hd_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 4 ].next[ 3 ] := rec( diff --git a/small/idlib/id640hd.f b/small/idlib/id640hd.f index e9f0c5c9a3..aa712a7e59 100644 --- a/small/idlib/id640hd.f +++ b/small/idlib/id640hd.f @@ -3,7 +3,7 @@ #W id640hd.f GAP library of id's Hans Ulrich Besche ## Revision.id640hd_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 4 ].next[ 6 ] := rec( diff --git a/small/idlib/id640hd.s b/small/idlib/id640hd.s index 27ca2e5794..4ab2a74fed 100644 --- a/small/idlib/id640hd.s +++ b/small/idlib/id640hd.s @@ -3,7 +3,7 @@ #W id640hd.s GAP library of id's Hans Ulrich Besche ## Revision.id640hd_s := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 4 ].next[ 19 ] := rec( diff --git a/small/idlib/id640hf.n b/small/idlib/id640hf.n index 82c69a5cca..698aa7da7c 100644 --- a/small/idlib/id640hf.n +++ b/small/idlib/id640hf.n @@ -3,7 +3,7 @@ #W id640hf.n GAP library of id's Hans Ulrich Besche ## Revision.id640hf_n := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 6 ].next[ 14 ] := rec( diff --git a/small/idlib/id640hf.t b/small/idlib/id640hf.t index 8c5f6efbb9..2a69ccc688 100644 --- a/small/idlib/id640hf.t +++ b/small/idlib/id640hf.t @@ -3,7 +3,7 @@ #W id640hf.t GAP library of id's Hans Ulrich Besche ## Revision.id640hf_t := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 6 ].next[ 20 ] := rec( diff --git a/small/idlib/id640hfa.w b/small/idlib/id640hfa.w index d5a56a410a..4e05e30ae2 100644 --- a/small/idlib/id640hfa.w +++ b/small/idlib/id640hfa.w @@ -3,7 +3,7 @@ #W id640hfa.w GAP library of id's Hans Ulrich Besche ## Revision.id640hfa_w := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 6 ].next[ 49 ] := rec( diff --git a/small/idlib/id640hfb.e b/small/idlib/id640hfb.e index d7cbab00bd..3f64775a4b 100644 --- a/small/idlib/id640hfb.e +++ b/small/idlib/id640hfb.e @@ -3,7 +3,7 @@ #W id640hfb.e GAP library of id's Hans Ulrich Besche ## Revision.id640hfb_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 6 ].next[ 57 ] := rec( diff --git a/small/idlib/id640hfb.o b/small/idlib/id640hfb.o index 6e05fa59ae..01b1b30321 100644 --- a/small/idlib/id640hfb.o +++ b/small/idlib/id640hfb.o @@ -3,7 +3,7 @@ #W id640hfb.o GAP library of id's Hans Ulrich Besche ## Revision.id640hfb_o := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 6 ].next[ 67 ] := rec( diff --git a/small/idlib/id640hfb.y b/small/idlib/id640hfb.y index 06eead856c..05386c00cd 100644 --- a/small/idlib/id640hfb.y +++ b/small/idlib/id640hfb.y @@ -3,7 +3,7 @@ #W id640hfb.y GAP library of id's Hans Ulrich Besche ## Revision.id640hfb_y := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 8 ].next[ 6 ].next[ 77 ] := rec( diff --git a/small/idlib/id640j.c b/small/idlib/id640j.c index f1c3aa64aa..e6f743ff8d 100644 --- a/small/idlib/id640j.c +++ b/small/idlib/id640j.c @@ -3,7 +3,7 @@ #W id640j.c GAP library of id's Hans Ulrich Besche ## Revision.id640j_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ] := rec( diff --git a/small/idlib/id640j.d b/small/idlib/id640j.d index cb4dbebda5..557618e1a7 100644 --- a/small/idlib/id640j.d +++ b/small/idlib/id640j.d @@ -3,7 +3,7 @@ #W id640j.d GAP library of id's Hans Ulrich Besche ## Revision.id640j_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 4 ] := rec( diff --git a/small/idlib/id640j.f b/small/idlib/id640j.f index bd8d340da0..9c3cc86709 100644 --- a/small/idlib/id640j.f +++ b/small/idlib/id640j.f @@ -3,7 +3,7 @@ #W id640j.f GAP library of id's Hans Ulrich Besche ## Revision.id640j_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ] := rec( diff --git a/small/idlib/id640j.g b/small/idlib/id640j.g index f48c482029..bc76e99e56 100644 --- a/small/idlib/id640j.g +++ b/small/idlib/id640j.g @@ -3,7 +3,7 @@ #W id640j.g GAP library of id's Hans Ulrich Besche ## Revision.id640j_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 7 ] := rec( diff --git a/small/idlib/id640j.h b/small/idlib/id640j.h index 8f1eab1eee..0e50c8a9bc 100644 --- a/small/idlib/id640j.h +++ b/small/idlib/id640j.h @@ -3,7 +3,7 @@ #W id640j.h GAP library of id's Hans Ulrich Besche ## Revision.id640j_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 8 ] := rec( diff --git a/small/idlib/id640jc.a b/small/idlib/id640jc.a index 0af1b4ad0d..80788248f3 100644 --- a/small/idlib/id640jc.a +++ b/small/idlib/id640jc.a @@ -3,7 +3,7 @@ #W id640jc.a GAP library of id's Hans Ulrich Besche ## Revision.id640jc_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 1 ] := rec( diff --git a/small/idlib/id640jc.b b/small/idlib/id640jc.b index f0d6013a39..ed87d91d3d 100644 --- a/small/idlib/id640jc.b +++ b/small/idlib/id640jc.b @@ -3,7 +3,7 @@ #W id640jc.b GAP library of id's Hans Ulrich Besche ## Revision.id640jc_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 2 ] := rec( diff --git a/small/idlib/id640jc.c b/small/idlib/id640jc.c index 739c52db64..6869c37244 100644 --- a/small/idlib/id640jc.c +++ b/small/idlib/id640jc.c @@ -3,7 +3,7 @@ #W id640jc.c GAP library of id's Hans Ulrich Besche ## Revision.id640jc_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 3 ] := rec( diff --git a/small/idlib/id640jc.e b/small/idlib/id640jc.e index 470f241ee4..00cce1adb0 100644 --- a/small/idlib/id640jc.e +++ b/small/idlib/id640jc.e @@ -3,7 +3,7 @@ #W id640jc.e GAP library of id's Hans Ulrich Besche ## Revision.id640jc_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 5 ] := rec( diff --git a/small/idlib/id640jc.h b/small/idlib/id640jc.h index b13fe830f0..4f6f54c686 100644 --- a/small/idlib/id640jc.h +++ b/small/idlib/id640jc.h @@ -3,7 +3,7 @@ #W id640jc.h GAP library of id's Hans Ulrich Besche ## Revision.id640jc_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 8 ] := rec( diff --git a/small/idlib/id640jc.j b/small/idlib/id640jc.j index 75affd5d48..1573d6f4c0 100644 --- a/small/idlib/id640jc.j +++ b/small/idlib/id640jc.j @@ -3,7 +3,7 @@ #W id640jc.j GAP library of id's Hans Ulrich Besche ## Revision.id640jc_j := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 10 ] := rec( diff --git a/small/idlib/id640jc.l b/small/idlib/id640jc.l index 294262bd32..6692f074d8 100644 --- a/small/idlib/id640jc.l +++ b/small/idlib/id640jc.l @@ -3,7 +3,7 @@ #W id640jc.l GAP library of id's Hans Ulrich Besche ## Revision.id640jc_l := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 12 ] := rec( diff --git a/small/idlib/id640jc.o b/small/idlib/id640jc.o index 300e4bdb96..2392c99165 100644 --- a/small/idlib/id640jc.o +++ b/small/idlib/id640jc.o @@ -3,7 +3,7 @@ #W id640jc.o GAP library of id's Hans Ulrich Besche ## Revision.id640jc_o := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 15 ] := rec( diff --git a/small/idlib/id640jc.u b/small/idlib/id640jc.u index 1378a451cd..c6595129f3 100644 --- a/small/idlib/id640jc.u +++ b/small/idlib/id640jc.u @@ -3,7 +3,7 @@ #W id640jc.u GAP library of id's Hans Ulrich Besche ## Revision.id640jc_u := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 21 ] := rec( diff --git a/small/idlib/id640jc.y b/small/idlib/id640jc.y index bc78862cfb..e65ca31ba2 100644 --- a/small/idlib/id640jc.y +++ b/small/idlib/id640jc.y @@ -3,7 +3,7 @@ #W id640jc.y GAP library of id's Hans Ulrich Besche ## Revision.id640jc_y := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 25 ] := rec( diff --git a/small/idlib/id640jca.a b/small/idlib/id640jca.a index c9982eebe6..e682417d6e 100644 --- a/small/idlib/id640jca.a +++ b/small/idlib/id640jca.a @@ -3,7 +3,7 @@ #W id640jca.a GAP library of id's Hans Ulrich Besche ## Revision.id640jca_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 27 ] := rec( diff --git a/small/idlib/id640jca.d b/small/idlib/id640jca.d index a494503347..ceac21ec4c 100644 --- a/small/idlib/id640jca.d +++ b/small/idlib/id640jca.d @@ -3,7 +3,7 @@ #W id640jca.d GAP library of id's Hans Ulrich Besche ## Revision.id640jca_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 30 ] := rec( diff --git a/small/idlib/id640jca.f b/small/idlib/id640jca.f index 20fb86c35f..90fae56293 100644 --- a/small/idlib/id640jca.f +++ b/small/idlib/id640jca.f @@ -3,7 +3,7 @@ #W id640jca.f GAP library of id's Hans Ulrich Besche ## Revision.id640jca_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 1 ].next[ 6 ] := rec( diff --git a/small/idlib/id640jca.j b/small/idlib/id640jca.j index c468430e93..8cb650d11c 100644 --- a/small/idlib/id640jca.j +++ b/small/idlib/id640jca.j @@ -3,7 +3,7 @@ #W id640jca.j GAP library of id's Hans Ulrich Besche ## Revision.id640jca_j := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 36 ] := rec( diff --git a/small/idlib/id640jca.l b/small/idlib/id640jca.l index c77b356cbc..72cf800e85 100644 --- a/small/idlib/id640jca.l +++ b/small/idlib/id640jca.l @@ -3,7 +3,7 @@ #W id640jca.l GAP library of id's Hans Ulrich Besche ## Revision.id640jca_l := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 1 ].next[ 12 ] := rec( diff --git a/small/idlib/id640jca.m b/small/idlib/id640jca.m index 8d7b22073f..e09cb3e218 100644 --- a/small/idlib/id640jca.m +++ b/small/idlib/id640jca.m @@ -3,7 +3,7 @@ #W id640jca.m GAP library of id's Hans Ulrich Besche ## Revision.id640jca_m := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 1 ].next[ 13 ] := rec( diff --git a/small/idlib/id640jca.n b/small/idlib/id640jca.n index a112109638..029047dcfa 100644 --- a/small/idlib/id640jca.n +++ b/small/idlib/id640jca.n @@ -3,7 +3,7 @@ #W id640jca.n GAP library of id's Hans Ulrich Besche ## Revision.id640jca_n := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 40 ] := rec( diff --git a/small/idlib/id640jca.o b/small/idlib/id640jca.o index e3a1044a44..5ab68134d0 100644 --- a/small/idlib/id640jca.o +++ b/small/idlib/id640jca.o @@ -3,7 +3,7 @@ #W id640jca.o GAP library of id's Hans Ulrich Besche ## Revision.id640jca_o := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 1 ].next[ 15 ] := rec( diff --git a/small/idlib/id640jca.p b/small/idlib/id640jca.p index 5887e06fbc..77b314b882 100644 --- a/small/idlib/id640jca.p +++ b/small/idlib/id640jca.p @@ -3,7 +3,7 @@ #W id640jca.p GAP library of id's Hans Ulrich Besche ## Revision.id640jca_p := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 42 ] := rec( diff --git a/small/idlib/id640jcb.aj b/small/idlib/id640jcb.aj index 302275e672..22aee4e022 100644 --- a/small/idlib/id640jcb.aj +++ b/small/idlib/id640jcb.aj @@ -3,7 +3,7 @@ #W id640jcb.aj GAP library of id's Hans Ulrich Besche ## Revision.id640jcb_aj := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 2 ].next[ 36 ] := rec( diff --git a/small/idlib/id640jcb.k b/small/idlib/id640jcb.k index 3e3710c18f..66f4d7e1af 100644 --- a/small/idlib/id640jcb.k +++ b/small/idlib/id640jcb.k @@ -3,7 +3,7 @@ #W id640jcb.k GAP library of id's Hans Ulrich Besche ## Revision.id640jcb_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 2 ].next[ 11 ] := rec( diff --git a/small/idlib/id640jcb.n b/small/idlib/id640jcb.n index f71fa4db5e..c524f028e4 100644 --- a/small/idlib/id640jcb.n +++ b/small/idlib/id640jcb.n @@ -3,7 +3,7 @@ #W id640jcb.n GAP library of id's Hans Ulrich Besche ## Revision.id640jcb_n := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 2 ].next[ 14 ] := rec( diff --git a/small/idlib/id640jcb.w b/small/idlib/id640jcb.w index 4fb8fca0b7..1932b195a9 100644 --- a/small/idlib/id640jcb.w +++ b/small/idlib/id640jcb.w @@ -3,7 +3,7 @@ #W id640jcb.w GAP library of id's Hans Ulrich Besche ## Revision.id640jcb_w := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 2 ].next[ 23 ] := rec( diff --git a/small/idlib/id640jcb.x b/small/idlib/id640jcb.x index 90019cb7ef..9947c9f1ed 100644 --- a/small/idlib/id640jcb.x +++ b/small/idlib/id640jcb.x @@ -3,7 +3,7 @@ #W id640jcb.x GAP library of id's Hans Ulrich Besche ## Revision.id640jcb_x := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 2 ].next[ 24 ] := rec( diff --git a/small/idlib/id640jcb.y b/small/idlib/id640jcb.y index 6456723cd1..9d4a05d8a7 100644 --- a/small/idlib/id640jcb.y +++ b/small/idlib/id640jcb.y @@ -3,7 +3,7 @@ #W id640jcb.y GAP library of id's Hans Ulrich Besche ## Revision.id640jcb_y := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 2 ].next[ 25 ] := rec( diff --git a/small/idlib/id640jch.aa b/small/idlib/id640jch.aa index cc879d014d..45e329f7b1 100644 --- a/small/idlib/id640jch.aa +++ b/small/idlib/id640jch.aa @@ -3,7 +3,7 @@ #W id640jch.aa GAP library of id's Hans Ulrich Besche ## Revision.id640jch_aa := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 8 ].next[ 27 ] := rec( diff --git a/small/idlib/id640jch.g b/small/idlib/id640jch.g index ddae8de6f3..8df0edb0cd 100644 --- a/small/idlib/id640jch.g +++ b/small/idlib/id640jch.g @@ -3,7 +3,7 @@ #W id640jch.g GAP library of id's Hans Ulrich Besche ## Revision.id640jch_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 8 ].next[ 7 ] := rec( diff --git a/small/idlib/id640jch.q b/small/idlib/id640jch.q index 847ad891a0..40b6e486c3 100644 --- a/small/idlib/id640jch.q +++ b/small/idlib/id640jch.q @@ -3,7 +3,7 @@ #W id640jch.q GAP library of id's Hans Ulrich Besche ## Revision.id640jch_q := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 8 ].next[ 17 ] := rec( diff --git a/small/idlib/id640jch.r b/small/idlib/id640jch.r index e31654945c..3b62f07d10 100644 --- a/small/idlib/id640jch.r +++ b/small/idlib/id640jch.r @@ -3,7 +3,7 @@ #W id640jch.r GAP library of id's Hans Ulrich Besche ## Revision.id640jch_r := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 8 ].next[ 18 ] := rec( diff --git a/small/idlib/id640jch.w b/small/idlib/id640jch.w index 4a6ba27d8f..0713fcbfb3 100644 --- a/small/idlib/id640jch.w +++ b/small/idlib/id640jch.w @@ -3,7 +3,7 @@ #W id640jch.w GAP library of id's Hans Ulrich Besche ## Revision.id640jch_w := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 8 ].next[ 23 ] := rec( diff --git a/small/idlib/id640jcj.ag b/small/idlib/id640jcj.ag index 387d9e0ddc..3adfcb9e4b 100644 --- a/small/idlib/id640jcj.ag +++ b/small/idlib/id640jcj.ag @@ -3,7 +3,7 @@ #W id640jcj.ag GAP library of id's Hans Ulrich Besche ## Revision.id640jcj_ag := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 10 ].next[ 33 ] := rec( diff --git a/small/idlib/id640jcj.bh b/small/idlib/id640jcj.bh index a3f70f7721..39a0374e75 100644 --- a/small/idlib/id640jcj.bh +++ b/small/idlib/id640jcj.bh @@ -3,7 +3,7 @@ #W id640jcj.bh GAP library of id's Hans Ulrich Besche ## Revision.id640jcj_bh := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 10 ].next[ 60 ] := rec( diff --git a/small/idlib/id640jcj.r b/small/idlib/id640jcj.r index 6d70686825..cdff62fcf4 100644 --- a/small/idlib/id640jcj.r +++ b/small/idlib/id640jcj.r @@ -3,7 +3,7 @@ #W id640jcj.r GAP library of id's Hans Ulrich Besche ## Revision.id640jcj_r := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 10 ].next[ 18 ] := rec( diff --git a/small/idlib/id640jcu.ac b/small/idlib/id640jcu.ac index 8e7763eef1..794bd607fd 100644 --- a/small/idlib/id640jcu.ac +++ b/small/idlib/id640jcu.ac @@ -3,7 +3,7 @@ #W id640jcu.ac GAP library of id's Hans Ulrich Besche ## Revision.id640jcu_ac := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 3 ].next[ 21 ].next[ 29 ] := rec( diff --git a/small/idlib/id640jd.a b/small/idlib/id640jd.a index e8e364c8a4..15d0c1307d 100644 --- a/small/idlib/id640jd.a +++ b/small/idlib/id640jd.a @@ -3,7 +3,7 @@ #W id640jd.a GAP library of id's Hans Ulrich Besche ## Revision.id640jd_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 4 ].next[ 1 ] := rec( diff --git a/small/idlib/id640jd.d b/small/idlib/id640jd.d index d94094f3c0..078a5dbef7 100644 --- a/small/idlib/id640jd.d +++ b/small/idlib/id640jd.d @@ -3,7 +3,7 @@ #W id640jd.d GAP library of id's Hans Ulrich Besche ## Revision.id640jd_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 4 ].next[ 4 ] := rec( diff --git a/small/idlib/id640jd.f b/small/idlib/id640jd.f index e1a533cdff..db0b7fcd38 100644 --- a/small/idlib/id640jd.f +++ b/small/idlib/id640jd.f @@ -3,7 +3,7 @@ #W id640jd.f GAP library of id's Hans Ulrich Besche ## Revision.id640jd_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 4 ].next[ 6 ] := rec( diff --git a/small/idlib/id640jd.j b/small/idlib/id640jd.j index 91a5dec541..26a0e05f45 100644 --- a/small/idlib/id640jd.j +++ b/small/idlib/id640jd.j @@ -3,7 +3,7 @@ #W id640jd.j GAP library of id's Hans Ulrich Besche ## Revision.id640jd_j := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 4 ].next[ 10 ] := rec( diff --git a/small/idlib/id640jd.o b/small/idlib/id640jd.o index 5c37d882ad..33defb59fe 100644 --- a/small/idlib/id640jd.o +++ b/small/idlib/id640jd.o @@ -3,7 +3,7 @@ #W id640jd.o GAP library of id's Hans Ulrich Besche ## Revision.id640jd_o := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 4 ].next[ 15 ] := rec( diff --git a/small/idlib/id640jda.f b/small/idlib/id640jda.f index edc78a0302..52d91f7f8a 100644 --- a/small/idlib/id640jda.f +++ b/small/idlib/id640jda.f @@ -3,7 +3,7 @@ #W id640jda.f GAP library of id's Hans Ulrich Besche ## Revision.id640jda_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 4 ].next[ 32 ] := rec( diff --git a/small/idlib/id640jda.x b/small/idlib/id640jda.x index 246d9a2343..a6849d83bb 100644 --- a/small/idlib/id640jda.x +++ b/small/idlib/id640jda.x @@ -3,7 +3,7 @@ #W id640jda.x GAP library of id's Hans Ulrich Besche ## Revision.id640jda_x := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 4 ].next[ 50 ] := rec( diff --git a/small/idlib/id640jdb.c b/small/idlib/id640jdb.c index 4708b8b01d..ed3e461c2c 100644 --- a/small/idlib/id640jdb.c +++ b/small/idlib/id640jdb.c @@ -3,7 +3,7 @@ #W id640jdb.c GAP library of id's Hans Ulrich Besche ## Revision.id640jdb_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 4 ].next[ 55 ] := rec( diff --git a/small/idlib/id640jdb.h b/small/idlib/id640jdb.h index 933b4339f9..2fd4424bd2 100644 --- a/small/idlib/id640jdb.h +++ b/small/idlib/id640jdb.h @@ -3,7 +3,7 @@ #W id640jdb.h GAP library of id's Hans Ulrich Besche ## Revision.id640jdb_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 4 ].next[ 60 ] := rec( diff --git a/small/idlib/id640jf.b b/small/idlib/id640jf.b index ef311cdf5d..94d70fab35 100644 --- a/small/idlib/id640jf.b +++ b/small/idlib/id640jf.b @@ -3,7 +3,7 @@ #W id640jf.b GAP library of id's Hans Ulrich Besche ## Revision.id640jf_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 2 ] := rec( diff --git a/small/idlib/id640jf.n b/small/idlib/id640jf.n index ef5049ab3d..51fcc2c8f4 100644 --- a/small/idlib/id640jf.n +++ b/small/idlib/id640jf.n @@ -3,7 +3,7 @@ #W id640jf.n GAP library of id's Hans Ulrich Besche ## Revision.id640jf_n := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 14 ] := rec( diff --git a/small/idlib/id640jf.u b/small/idlib/id640jf.u index 3d7bef059e..9d91b9120c 100644 --- a/small/idlib/id640jf.u +++ b/small/idlib/id640jf.u @@ -3,7 +3,7 @@ #W id640jf.u GAP library of id's Hans Ulrich Besche ## Revision.id640jf_u := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 21 ] := rec( diff --git a/small/idlib/id640jf.x b/small/idlib/id640jf.x index d96c16e809..b43efc9ddd 100644 --- a/small/idlib/id640jf.x +++ b/small/idlib/id640jf.x @@ -3,7 +3,7 @@ #W id640jf.x GAP library of id's Hans Ulrich Besche ## Revision.id640jf_x := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 24 ] := rec( diff --git a/small/idlib/id640jfa.a b/small/idlib/id640jfa.a index 52adb62664..6a66e71d2e 100644 --- a/small/idlib/id640jfa.a +++ b/small/idlib/id640jfa.a @@ -3,7 +3,7 @@ #W id640jfa.a GAP library of id's Hans Ulrich Besche ## Revision.id640jfa_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 27 ] := rec( diff --git a/small/idlib/id640jfa.e b/small/idlib/id640jfa.e index cd06be5c75..c4be647733 100644 --- a/small/idlib/id640jfa.e +++ b/small/idlib/id640jfa.e @@ -3,7 +3,7 @@ #W id640jfa.e GAP library of id's Hans Ulrich Besche ## Revision.id640jfa_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 31 ] := rec( diff --git a/small/idlib/id640jfa.f b/small/idlib/id640jfa.f index f4733a98f4..1bee29f714 100644 --- a/small/idlib/id640jfa.f +++ b/small/idlib/id640jfa.f @@ -3,7 +3,7 @@ #W id640jfa.f GAP library of id's Hans Ulrich Besche ## Revision.id640jfa_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 32 ] := rec( diff --git a/small/idlib/id640jfa.n b/small/idlib/id640jfa.n index 3b2230670f..1283132beb 100644 --- a/small/idlib/id640jfa.n +++ b/small/idlib/id640jfa.n @@ -3,7 +3,7 @@ #W id640jfa.n GAP library of id's Hans Ulrich Besche ## Revision.id640jfa_n := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 40 ] := rec( diff --git a/small/idlib/id640jfa.o b/small/idlib/id640jfa.o index 24b21b41e2..5ae58ffe3d 100644 --- a/small/idlib/id640jfa.o +++ b/small/idlib/id640jfa.o @@ -3,7 +3,7 @@ #W id640jfa.o GAP library of id's Hans Ulrich Besche ## Revision.id640jfa_o := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 41 ] := rec( diff --git a/small/idlib/id640jfa.v b/small/idlib/id640jfa.v index 3a5c8fcbeb..aa061e9300 100644 --- a/small/idlib/id640jfa.v +++ b/small/idlib/id640jfa.v @@ -3,7 +3,7 @@ #W id640jfa.v GAP library of id's Hans Ulrich Besche ## Revision.id640jfa_v := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 48 ] := rec( diff --git a/small/idlib/id640jfb.d b/small/idlib/id640jfb.d index 745d4de12d..faf72f6da2 100644 --- a/small/idlib/id640jfb.d +++ b/small/idlib/id640jfb.d @@ -3,7 +3,7 @@ #W id640jfb.d GAP library of id's Hans Ulrich Besche ## Revision.id640jfb_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 56 ] := rec( diff --git a/small/idlib/id640jfb.j b/small/idlib/id640jfb.j index c8523422f7..8346795d0f 100644 --- a/small/idlib/id640jfb.j +++ b/small/idlib/id640jfb.j @@ -3,7 +3,7 @@ #W id640jfb.j GAP library of id's Hans Ulrich Besche ## Revision.id640jfb_j := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 62 ] := rec( diff --git a/small/idlib/id640jfb.m b/small/idlib/id640jfb.m index 0ada01a306..122d8b7748 100644 --- a/small/idlib/id640jfb.m +++ b/small/idlib/id640jfb.m @@ -3,7 +3,7 @@ #W id640jfb.m GAP library of id's Hans Ulrich Besche ## Revision.id640jfb_m := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 65 ] := rec( diff --git a/small/idlib/id640jfb.p b/small/idlib/id640jfb.p index 29bfd4179e..5ec81c395d 100644 --- a/small/idlib/id640jfb.p +++ b/small/idlib/id640jfb.p @@ -3,7 +3,7 @@ #W id640jfb.p GAP library of id's Hans Ulrich Besche ## Revision.id640jfb_p := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 68 ] := rec( diff --git a/small/idlib/id640jfb.w b/small/idlib/id640jfb.w index 4edc9a87f2..e0c395cafa 100644 --- a/small/idlib/id640jfb.w +++ b/small/idlib/id640jfb.w @@ -3,7 +3,7 @@ #W id640jfb.w GAP library of id's Hans Ulrich Besche ## Revision.id640jfb_w := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 75 ] := rec( diff --git a/small/idlib/id640jfc.c b/small/idlib/id640jfc.c index 57e6ca79ab..0fcd64a770 100644 --- a/small/idlib/id640jfc.c +++ b/small/idlib/id640jfc.c @@ -3,7 +3,7 @@ #W id640jfc.c GAP library of id's Hans Ulrich Besche ## Revision.id640jfc_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 81 ] := rec( diff --git a/small/idlib/id640jfc.j b/small/idlib/id640jfc.j index 8531232dee..cb41a31e1e 100644 --- a/small/idlib/id640jfc.j +++ b/small/idlib/id640jfc.j @@ -3,7 +3,7 @@ #W id640jfc.j GAP library of id's Hans Ulrich Besche ## Revision.id640jfc_j := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 88 ] := rec( diff --git a/small/idlib/id640jfc.p b/small/idlib/id640jfc.p index 6882b082c6..fedeea28ba 100644 --- a/small/idlib/id640jfc.p +++ b/small/idlib/id640jfc.p @@ -3,7 +3,7 @@ #W id640jfc.p GAP library of id's Hans Ulrich Besche ## Revision.id640jfc_p := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 94 ] := rec( diff --git a/small/idlib/id640jfc.v b/small/idlib/id640jfc.v index 50d5fa3051..c0447bfdb4 100644 --- a/small/idlib/id640jfc.v +++ b/small/idlib/id640jfc.v @@ -3,7 +3,7 @@ #W id640jfc.v GAP library of id's Hans Ulrich Besche ## Revision.id640jfc_v := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 100 ] := rec( diff --git a/small/idlib/id640jfd.c b/small/idlib/id640jfd.c index 0c295cda75..8b8ca787bd 100644 --- a/small/idlib/id640jfd.c +++ b/small/idlib/id640jfd.c @@ -3,7 +3,7 @@ #W id640jfd.c GAP library of id's Hans Ulrich Besche ## Revision.id640jfd_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 107 ] := rec( diff --git a/small/idlib/id640jfd.d b/small/idlib/id640jfd.d index b6e252ca30..51900c40da 100644 --- a/small/idlib/id640jfd.d +++ b/small/idlib/id640jfd.d @@ -3,7 +3,7 @@ #W id640jfd.d GAP library of id's Hans Ulrich Besche ## Revision.id640jfd_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 108 ] := rec( diff --git a/small/idlib/id640jfd.i b/small/idlib/id640jfd.i index f6c85eaa54..a483f74bac 100644 --- a/small/idlib/id640jfd.i +++ b/small/idlib/id640jfd.i @@ -3,7 +3,7 @@ #W id640jfd.i GAP library of id's Hans Ulrich Besche ## Revision.id640jfd_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 113 ] := rec( diff --git a/small/idlib/id640jfd.p b/small/idlib/id640jfd.p index 231e5b8b1c..00c3b41a72 100644 --- a/small/idlib/id640jfd.p +++ b/small/idlib/id640jfd.p @@ -3,7 +3,7 @@ #W id640jfd.p GAP library of id's Hans Ulrich Besche ## Revision.id640jfd_p := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 120 ] := rec( diff --git a/small/idlib/id640jfd.w b/small/idlib/id640jfd.w index e870497707..55c1cdd5d0 100644 --- a/small/idlib/id640jfd.w +++ b/small/idlib/id640jfd.w @@ -3,7 +3,7 @@ #W id640jfd.w GAP library of id's Hans Ulrich Besche ## Revision.id640jfd_w := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 127 ] := rec( diff --git a/small/idlib/id640jfd.y b/small/idlib/id640jfd.y index 485e7bbaa1..79ab3af4ee 100644 --- a/small/idlib/id640jfd.y +++ b/small/idlib/id640jfd.y @@ -3,7 +3,7 @@ #W id640jfd.y GAP library of id's Hans Ulrich Besche ## Revision.id640jfd_y := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 129 ] := rec( diff --git a/small/idlib/id640jfe.a b/small/idlib/id640jfe.a index e7b07e6d4f..d2430fc397 100644 --- a/small/idlib/id640jfe.a +++ b/small/idlib/id640jfe.a @@ -3,7 +3,7 @@ #W id640jfe.a GAP library of id's Hans Ulrich Besche ## Revision.id640jfe_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 131 ] := rec( diff --git a/small/idlib/id640jfe.h b/small/idlib/id640jfe.h index 3e951718a9..f3a1377b47 100644 --- a/small/idlib/id640jfe.h +++ b/small/idlib/id640jfe.h @@ -3,7 +3,7 @@ #W id640jfe.h GAP library of id's Hans Ulrich Besche ## Revision.id640jfe_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 138 ] := rec( diff --git a/small/idlib/id640jfe.i b/small/idlib/id640jfe.i index fd565517ab..f5259e4887 100644 --- a/small/idlib/id640jfe.i +++ b/small/idlib/id640jfe.i @@ -3,7 +3,7 @@ #W id640jfe.i GAP library of id's Hans Ulrich Besche ## Revision.id640jfe_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 139 ] := rec( diff --git a/small/idlib/id640jfe.n b/small/idlib/id640jfe.n index 127a55b659..de43344c1c 100644 --- a/small/idlib/id640jfe.n +++ b/small/idlib/id640jfe.n @@ -3,7 +3,7 @@ #W id640jfe.n GAP library of id's Hans Ulrich Besche ## Revision.id640jfe_n := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 144 ] := rec( diff --git a/small/idlib/id640jfe.u b/small/idlib/id640jfe.u index 862634aa2b..6b11113a63 100644 --- a/small/idlib/id640jfe.u +++ b/small/idlib/id640jfe.u @@ -3,7 +3,7 @@ #W id640jfe.u GAP library of id's Hans Ulrich Besche ## Revision.id640jfe_u := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 151 ] := rec( diff --git a/small/idlib/id640jfe.z b/small/idlib/id640jfe.z index 8d65d9357b..bffc789e45 100644 --- a/small/idlib/id640jfe.z +++ b/small/idlib/id640jfe.z @@ -3,7 +3,7 @@ #W id640jfe.z GAP library of id's Hans Ulrich Besche ## Revision.id640jfe_z := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 156 ] := rec( diff --git a/small/idlib/id640jff.a b/small/idlib/id640jff.a index 0609ebc073..49be5b6957 100644 --- a/small/idlib/id640jff.a +++ b/small/idlib/id640jff.a @@ -3,7 +3,7 @@ #W id640jff.a GAP library of id's Hans Ulrich Besche ## Revision.id640jff_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 157 ] := rec( diff --git a/small/idlib/id640jff.g b/small/idlib/id640jff.g index 2706dce6dd..917de645af 100644 --- a/small/idlib/id640jff.g +++ b/small/idlib/id640jff.g @@ -3,7 +3,7 @@ #W id640jff.g GAP library of id's Hans Ulrich Besche ## Revision.id640jff_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 163 ] := rec( diff --git a/small/idlib/id640jff.k b/small/idlib/id640jff.k index 7f26c8a4d5..517689e265 100644 --- a/small/idlib/id640jff.k +++ b/small/idlib/id640jff.k @@ -3,7 +3,7 @@ #W id640jff.k GAP library of id's Hans Ulrich Besche ## Revision.id640jff_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 167 ] := rec( diff --git a/small/idlib/id640jff.l b/small/idlib/id640jff.l index 37e3cd51eb..2c8911eb24 100644 --- a/small/idlib/id640jff.l +++ b/small/idlib/id640jff.l @@ -3,7 +3,7 @@ #W id640jff.l GAP library of id's Hans Ulrich Besche ## Revision.id640jff_l := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 168 ] := rec( diff --git a/small/idlib/id640jff.v b/small/idlib/id640jff.v index 6cd393052b..6a6f7aaaf1 100644 --- a/small/idlib/id640jff.v +++ b/small/idlib/id640jff.v @@ -3,7 +3,7 @@ #W id640jff.v GAP library of id's Hans Ulrich Besche ## Revision.id640jff_v := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 178 ] := rec( diff --git a/small/idlib/id640jfg.b b/small/idlib/id640jfg.b index e9933504cf..4295f6416f 100644 --- a/small/idlib/id640jfg.b +++ b/small/idlib/id640jfg.b @@ -3,7 +3,7 @@ #W id640jfg.b GAP library of id's Hans Ulrich Besche ## Revision.id640jfg_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 184 ] := rec( diff --git a/small/idlib/id640jfg.e b/small/idlib/id640jfg.e index 758e3ba478..26ee1e20e2 100644 --- a/small/idlib/id640jfg.e +++ b/small/idlib/id640jfg.e @@ -3,7 +3,7 @@ #W id640jfg.e GAP library of id's Hans Ulrich Besche ## Revision.id640jfg_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 187 ] := rec( diff --git a/small/idlib/id640jfg.o b/small/idlib/id640jfg.o index 264d357d7d..de70121cf2 100644 --- a/small/idlib/id640jfg.o +++ b/small/idlib/id640jfg.o @@ -3,7 +3,7 @@ #W id640jfg.o GAP library of id's Hans Ulrich Besche ## Revision.id640jfg_o := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 197 ] := rec( diff --git a/small/idlib/id640jfg.y b/small/idlib/id640jfg.y index 3ef64fdd6c..d2441686ae 100644 --- a/small/idlib/id640jfg.y +++ b/small/idlib/id640jfg.y @@ -3,7 +3,7 @@ #W id640jfg.y GAP library of id's Hans Ulrich Besche ## Revision.id640jfg_y := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 10 ].next[ 6 ].next[ 207 ] := rec( diff --git a/small/idlib/id640k.b b/small/idlib/id640k.b index 1bea3cf775..9f2a0be548 100644 --- a/small/idlib/id640k.b +++ b/small/idlib/id640k.b @@ -3,7 +3,7 @@ #W id640k.b GAP library of id's Hans Ulrich Besche ## Revision.id640k_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 11 ].next[ 2 ] := rec( diff --git a/small/idlib/id640k.d b/small/idlib/id640k.d index fa295114b4..3efa36c7c0 100644 --- a/small/idlib/id640k.d +++ b/small/idlib/id640k.d @@ -3,7 +3,7 @@ #W id640k.d GAP library of id's Hans Ulrich Besche ## Revision.id640k_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 11 ].next[ 4 ] := rec( diff --git a/small/idlib/id640k.e b/small/idlib/id640k.e index a23f0b8b63..1791511c12 100644 --- a/small/idlib/id640k.e +++ b/small/idlib/id640k.e @@ -3,7 +3,7 @@ #W id640k.e GAP library of id's Hans Ulrich Besche ## Revision.id640k_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 11 ].next[ 5 ] := rec( diff --git a/small/idlib/id640k.f b/small/idlib/id640k.f index 8b3639f06e..f373844f95 100644 --- a/small/idlib/id640k.f +++ b/small/idlib/id640k.f @@ -3,7 +3,7 @@ #W id640k.f GAP library of id's Hans Ulrich Besche ## Revision.id640k_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 11 ].next[ 6 ] := rec( diff --git a/small/idlib/id640kb.h b/small/idlib/id640kb.h index 309cbc01f1..93e37ca3ca 100644 --- a/small/idlib/id640kb.h +++ b/small/idlib/id640kb.h @@ -3,7 +3,7 @@ #W id640kb.h GAP library of id's Hans Ulrich Besche ## Revision.id640kb_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 11 ].next[ 2 ].next[ 8 ] := rec( diff --git a/small/idlib/id640kd.x b/small/idlib/id640kd.x index 40c282853a..87cef9e9e9 100644 --- a/small/idlib/id640kd.x +++ b/small/idlib/id640kd.x @@ -3,7 +3,7 @@ #W id640kd.x GAP library of id's Hans Ulrich Besche ## Revision.id640kd_x := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 640 ].next[ 11 ].next[ 4 ].next[ 24 ] := rec( diff --git a/small/idlib/id648.f b/small/idlib/id648.f index 3fb8bc979b..78bc58b54c 100644 --- a/small/idlib/id648.f +++ b/small/idlib/id648.f @@ -3,7 +3,7 @@ #W id648.f GAP library of id's Hans Ulrich Besche ## Revision.id648_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 648 ].next[ 6 ] := rec( diff --git a/small/idlib/id648.h b/small/idlib/id648.h index cc78b9be80..34f48082c3 100644 --- a/small/idlib/id648.h +++ b/small/idlib/id648.h @@ -3,7 +3,7 @@ #W id648.h GAP library of id's Hans Ulrich Besche ## Revision.id648_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 648 ].next[ 8 ] := rec( diff --git a/small/idlib/id648.i b/small/idlib/id648.i index a0148e8993..3870b36c3b 100644 --- a/small/idlib/id648.i +++ b/small/idlib/id648.i @@ -3,7 +3,7 @@ #W id648.i GAP library of id's Hans Ulrich Besche ## Revision.id648_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 648 ].next[ 9 ] := rec( diff --git a/small/idlib/id648.k b/small/idlib/id648.k index f374b220a1..e4ee3d9788 100644 --- a/small/idlib/id648.k +++ b/small/idlib/id648.k @@ -3,7 +3,7 @@ #W id648.k GAP library of id's Hans Ulrich Besche ## Revision.id648_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 648 ].next[ 11 ] := rec( diff --git a/small/idlib/id648.l b/small/idlib/id648.l index 7ef84a00dd..c3e106f7c8 100644 --- a/small/idlib/id648.l +++ b/small/idlib/id648.l @@ -3,7 +3,7 @@ #W id648.l GAP library of id's Hans Ulrich Besche ## Revision.id648_l := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 648 ].next[ 12 ] := rec( diff --git a/small/idlib/id648.p b/small/idlib/id648.p index 864f51f45c..0efdce8aa2 100644 --- a/small/idlib/id648.p +++ b/small/idlib/id648.p @@ -3,7 +3,7 @@ #W id648.p GAP library of id's Hans Ulrich Besche ## Revision.id648_p := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 648 ].next[ 16 ] := rec( diff --git a/small/idlib/id65.0 b/small/idlib/id65.0 index d0e5f5495e..964a8cab3b 100644 --- a/small/idlib/id65.0 +++ b/small/idlib/id65.0 @@ -3,7 +3,7 @@ #W id65.0 GAP library of id's Hans Ulrich Besche ## Revision.id65_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 650 ] := rec( diff --git a/small/idlib/id65.6 b/small/idlib/id65.6 index 6f94d997c7..e3972452ea 100644 --- a/small/idlib/id65.6 +++ b/small/idlib/id65.6 @@ -3,7 +3,7 @@ #W id65.6 GAP library of id's Hans Ulrich Besche ## Revision.id65_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 656 ] := rec( diff --git a/small/idlib/id66.0 b/small/idlib/id66.0 index d97cf740cc..e84379b140 100644 --- a/small/idlib/id66.0 +++ b/small/idlib/id66.0 @@ -3,7 +3,7 @@ #W id66.0 GAP library of id's Hans Ulrich Besche ## Revision.id66_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 660 ] := rec( diff --git a/small/idlib/id66.4 b/small/idlib/id66.4 index 39bd1b047b..db3acbd164 100644 --- a/small/idlib/id66.4 +++ b/small/idlib/id66.4 @@ -3,7 +3,7 @@ #W id66.4 GAP library of id's Hans Ulrich Besche ## Revision.id66_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 664 ] := rec( diff --git a/small/idlib/id66.6 b/small/idlib/id66.6 index 2c569bc1f6..140d507988 100644 --- a/small/idlib/id66.6 +++ b/small/idlib/id66.6 @@ -3,7 +3,7 @@ #W id66.6 GAP library of id's Hans Ulrich Besche ## Revision.id66_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 666 ] := rec( diff --git a/small/idlib/id67.2 b/small/idlib/id67.2 index 4a837e33d6..6b45cf4fa7 100644 --- a/small/idlib/id67.2 +++ b/small/idlib/id67.2 @@ -3,7 +3,7 @@ #W id67.2 GAP library of id's Hans Ulrich Besche ## Revision.id67_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 672 ] := rec( diff --git a/small/idlib/id67.5 b/small/idlib/id67.5 index 56da5f4392..749fd7bd4d 100644 --- a/small/idlib/id67.5 +++ b/small/idlib/id67.5 @@ -3,7 +3,7 @@ #W id67.5 GAP library of id's Hans Ulrich Besche ## Revision.id67_5 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 675 ] := rec( diff --git a/small/idlib/id67.6 b/small/idlib/id67.6 index 17ea166664..c127ab2c4a 100644 --- a/small/idlib/id67.6 +++ b/small/idlib/id67.6 @@ -3,7 +3,7 @@ #W id67.6 GAP library of id's Hans Ulrich Besche ## Revision.id67_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 676 ] := rec( diff --git a/small/idlib/id672.e b/small/idlib/id672.e index c2e7b542a6..63806e9a2a 100644 --- a/small/idlib/id672.e +++ b/small/idlib/id672.e @@ -3,7 +3,7 @@ #W id672.e GAP library of id's Hans Ulrich Besche ## Revision.id672_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 672 ].next[ 5 ] := rec( diff --git a/small/idlib/id672.h b/small/idlib/id672.h index 2fe1a95b5c..83a127825e 100644 --- a/small/idlib/id672.h +++ b/small/idlib/id672.h @@ -3,7 +3,7 @@ #W id672.h GAP library of id's Hans Ulrich Besche ## Revision.id672_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 672 ].next[ 8 ] := rec( diff --git a/small/idlib/id672.i b/small/idlib/id672.i index 4ce238a1ee..1183216f19 100644 --- a/small/idlib/id672.i +++ b/small/idlib/id672.i @@ -3,7 +3,7 @@ #W id672.i GAP library of id's Hans Ulrich Besche ## Revision.id672_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 672 ].next[ 9 ] := rec( diff --git a/small/idlib/id672.n b/small/idlib/id672.n index 8a9863e106..c3e76dfcf6 100644 --- a/small/idlib/id672.n +++ b/small/idlib/id672.n @@ -3,7 +3,7 @@ #W id672.n GAP library of id's Hans Ulrich Besche ## Revision.id672_n := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 672 ].next[ 14 ] := rec( diff --git a/small/idlib/id672.q b/small/idlib/id672.q index 91320cc1f2..440ad0a937 100644 --- a/small/idlib/id672.q +++ b/small/idlib/id672.q @@ -3,7 +3,7 @@ #W id672.q GAP library of id's Hans Ulrich Besche ## Revision.id672_q := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 672 ].next[ 17 ] := rec( diff --git a/small/idlib/id672.t b/small/idlib/id672.t index b6fe7905b5..3f35d42dcc 100644 --- a/small/idlib/id672.t +++ b/small/idlib/id672.t @@ -3,7 +3,7 @@ #W id672.t GAP library of id's Hans Ulrich Besche ## Revision.id672_t := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 672 ].next[ 20 ] := rec( diff --git a/small/idlib/id672q.e b/small/idlib/id672q.e index 24ee80acbd..656ec7845d 100644 --- a/small/idlib/id672q.e +++ b/small/idlib/id672q.e @@ -3,7 +3,7 @@ #W id672q.e GAP library of id's Hans Ulrich Besche ## Revision.id672q_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 672 ].next[ 17 ].next[ 5 ] := rec( diff --git a/small/idlib/id672t.e b/small/idlib/id672t.e index 2549d9b653..3257e3f80f 100644 --- a/small/idlib/id672t.e +++ b/small/idlib/id672t.e @@ -3,7 +3,7 @@ #W id672t.e GAP library of id's Hans Ulrich Besche ## Revision.id672t_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 672 ].next[ 20 ].next[ 5 ] := rec( diff --git a/small/idlib/id68.0 b/small/idlib/id68.0 index 3353508181..5966acbcc2 100644 --- a/small/idlib/id68.0 +++ b/small/idlib/id68.0 @@ -3,7 +3,7 @@ #W id68.0 GAP library of id's Hans Ulrich Besche ## Revision.id68_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 680 ] := rec( diff --git a/small/idlib/id68.4 b/small/idlib/id68.4 index 9ac588d946..415e8b9286 100644 --- a/small/idlib/id68.4 +++ b/small/idlib/id68.4 @@ -3,7 +3,7 @@ #W id68.4 GAP library of id's Hans Ulrich Besche ## Revision.id68_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 684 ] := rec( diff --git a/small/idlib/id68.6 b/small/idlib/id68.6 index d9076727d4..eb021152da 100644 --- a/small/idlib/id68.6 +++ b/small/idlib/id68.6 @@ -3,7 +3,7 @@ #W id68.6 GAP library of id's Hans Ulrich Besche ## Revision.id68_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 686 ] := rec( diff --git a/small/idlib/id68.8 b/small/idlib/id68.8 index 2d2e31daa0..876c3ed7ba 100644 --- a/small/idlib/id68.8 +++ b/small/idlib/id68.8 @@ -3,7 +3,7 @@ #W id68.8 GAP library of id's Hans Ulrich Besche ## Revision.id68_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 688 ] := rec( diff --git a/small/idlib/id69.0 b/small/idlib/id69.0 index 231639feba..4f5a751e3b 100644 --- a/small/idlib/id69.0 +++ b/small/idlib/id69.0 @@ -3,7 +3,7 @@ #W id69.0 GAP library of id's Hans Ulrich Besche ## Revision.id69_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 690 ] := rec( diff --git a/small/idlib/id69.3 b/small/idlib/id69.3 index ccde68a1a7..28b864446f 100644 --- a/small/idlib/id69.3 +++ b/small/idlib/id69.3 @@ -3,7 +3,7 @@ #W id69.3 GAP library of id's Hans Ulrich Besche ## Revision.id69_3 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 693 ] := rec( diff --git a/small/idlib/id69.6 b/small/idlib/id69.6 index 8f46884588..2dd32ea254 100644 --- a/small/idlib/id69.6 +++ b/small/idlib/id69.6 @@ -3,7 +3,7 @@ #W id69.6 GAP library of id's Hans Ulrich Besche ## Revision.id69_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 696 ] := rec( diff --git a/small/idlib/id70.0 b/small/idlib/id70.0 index 124160e411..658936be88 100644 --- a/small/idlib/id70.0 +++ b/small/idlib/id70.0 @@ -3,7 +3,7 @@ #W id70.0 GAP library of id's Hans Ulrich Besche ## Revision.id70_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 700 ] := rec( diff --git a/small/idlib/id70.2 b/small/idlib/id70.2 index bdd91f643b..6ebc882d2c 100644 --- a/small/idlib/id70.2 +++ b/small/idlib/id70.2 @@ -3,7 +3,7 @@ #W id70.2 GAP library of id's Hans Ulrich Besche ## Revision.id70_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 702 ] := rec( diff --git a/small/idlib/id70.4 b/small/idlib/id70.4 index cca8e95bd9..1bbaec139b 100644 --- a/small/idlib/id70.4 +++ b/small/idlib/id70.4 @@ -3,7 +3,7 @@ #W id70.4 GAP library of id's Hans Ulrich Besche ## Revision.id70_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 704 ] := rec( diff --git a/small/idlib/id70.8 b/small/idlib/id70.8 index 02ce320d7c..41db3b9b66 100644 --- a/small/idlib/id70.8 +++ b/small/idlib/id70.8 @@ -3,7 +3,7 @@ #W id70.8 GAP library of id's Hans Ulrich Besche ## Revision.id70_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 708 ] := rec( diff --git a/small/idlib/id704.c b/small/idlib/id704.c index 9dc2e376dc..4a85ab68c9 100644 --- a/small/idlib/id704.c +++ b/small/idlib/id704.c @@ -3,7 +3,7 @@ #W id704.c GAP library of id's Hans Ulrich Besche ## Revision.id704_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 704 ].next[ 3 ] := rec( diff --git a/small/idlib/id704.d b/small/idlib/id704.d index fbbc7f21e0..5db656e4da 100644 --- a/small/idlib/id704.d +++ b/small/idlib/id704.d @@ -3,7 +3,7 @@ #W id704.d GAP library of id's Hans Ulrich Besche ## Revision.id704_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 704 ].next[ 4 ] := rec( diff --git a/small/idlib/id704.g b/small/idlib/id704.g index a5af1def9d..2de89e84f4 100644 --- a/small/idlib/id704.g +++ b/small/idlib/id704.g @@ -3,7 +3,7 @@ #W id704.g GAP library of id's Hans Ulrich Besche ## Revision.id704_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 704 ].next[ 7 ] := rec( diff --git a/small/idlib/id704.i b/small/idlib/id704.i index 51d618f56c..267f19565a 100644 --- a/small/idlib/id704.i +++ b/small/idlib/id704.i @@ -3,7 +3,7 @@ #W id704.i GAP library of id's Hans Ulrich Besche ## Revision.id704_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 704 ].next[ 9 ] := rec( diff --git a/small/idlib/id704h.b b/small/idlib/id704h.b index fffd2f6ac6..d2e2527b75 100644 --- a/small/idlib/id704h.b +++ b/small/idlib/id704h.b @@ -3,7 +3,7 @@ #W id704h.b GAP library of id's Hans Ulrich Besche ## Revision.id704h_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 704 ].next[ 8 ].next[ 2 ] := rec( diff --git a/small/idlib/id704h.d b/small/idlib/id704h.d index 5acae40c40..39d3ee688a 100644 --- a/small/idlib/id704h.d +++ b/small/idlib/id704h.d @@ -3,7 +3,7 @@ #W id704h.d GAP library of id's Hans Ulrich Besche ## Revision.id704h_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 704 ].next[ 8 ].next[ 4 ] := rec( diff --git a/small/idlib/id704i.b b/small/idlib/id704i.b index baa8d4cd42..ea7eb43b14 100644 --- a/small/idlib/id704i.b +++ b/small/idlib/id704i.b @@ -3,7 +3,7 @@ #W id704i.b GAP library of id's Hans Ulrich Besche ## Revision.id704i_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 704 ].next[ 9 ].next[ 2 ] := rec( diff --git a/small/idlib/id704i.c b/small/idlib/id704i.c index 0c11bc3200..30d72a89da 100644 --- a/small/idlib/id704i.c +++ b/small/idlib/id704i.c @@ -3,7 +3,7 @@ #W id704i.c GAP library of id's Hans Ulrich Besche ## Revision.id704i_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 704 ].next[ 9 ].next[ 3 ] := rec( diff --git a/small/idlib/id71.2 b/small/idlib/id71.2 index 5d1abe239e..3d88488ed2 100644 --- a/small/idlib/id71.2 +++ b/small/idlib/id71.2 @@ -3,7 +3,7 @@ #W id71.2 GAP library of id's Hans Ulrich Besche ## Revision.id71_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 712 ] := rec( diff --git a/small/idlib/id71.4 b/small/idlib/id71.4 index 3235529107..6f79c23336 100644 --- a/small/idlib/id71.4 +++ b/small/idlib/id71.4 @@ -3,7 +3,7 @@ #W id71.4 GAP library of id's Hans Ulrich Besche ## Revision.id71_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 714 ] := rec( diff --git a/small/idlib/id72.0 b/small/idlib/id72.0 index 1189358485..9657207ad0 100644 --- a/small/idlib/id72.0 +++ b/small/idlib/id72.0 @@ -3,7 +3,7 @@ #W id72.0 GAP library of id's Hans Ulrich Besche ## Revision.id72_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 720 ] := rec( diff --git a/small/idlib/id72.6 b/small/idlib/id72.6 index d1368e33ef..d71444d6fa 100644 --- a/small/idlib/id72.6 +++ b/small/idlib/id72.6 @@ -3,7 +3,7 @@ #W id72.6 GAP library of id's Hans Ulrich Besche ## Revision.id72_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 726 ] := rec( diff --git a/small/idlib/id72.8 b/small/idlib/id72.8 index b6bfa5d3fd..135f5d48ad 100644 --- a/small/idlib/id72.8 +++ b/small/idlib/id72.8 @@ -3,7 +3,7 @@ #W id72.8 GAP library of id's Hans Ulrich Besche ## Revision.id72_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 728 ] := rec( diff --git a/small/idlib/id72.9 b/small/idlib/id72.9 index 07e06281a0..b90eb600bb 100644 --- a/small/idlib/id72.9 +++ b/small/idlib/id72.9 @@ -3,7 +3,7 @@ #W id72.9 GAP library of id's Hans Ulrich Besche ## Revision.id72_9 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 729 ] := rec( diff --git a/small/idlib/id720.o b/small/idlib/id720.o index 7f310e4ff6..cf7b5c4323 100644 --- a/small/idlib/id720.o +++ b/small/idlib/id720.o @@ -3,7 +3,7 @@ #W id720.o GAP library of id's Hans Ulrich Besche ## Revision.id720_o := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 720 ].next[ 15 ] := rec( diff --git a/small/idlib/id720.q b/small/idlib/id720.q index d198a4abda..726ee4313f 100644 --- a/small/idlib/id720.q +++ b/small/idlib/id720.q @@ -3,7 +3,7 @@ #W id720.q GAP library of id's Hans Ulrich Besche ## Revision.id720_q := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 720 ].next[ 17 ] := rec( diff --git a/small/idlib/id720.t b/small/idlib/id720.t index b070057dbc..e7462a34fc 100644 --- a/small/idlib/id720.t +++ b/small/idlib/id720.t @@ -3,7 +3,7 @@ #W id720.t GAP library of id's Hans Ulrich Besche ## Revision.id720_t := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 720 ].next[ 20 ] := rec( diff --git a/small/idlib/id720.w b/small/idlib/id720.w index 68a2cf6527..cae52628ae 100644 --- a/small/idlib/id720.w +++ b/small/idlib/id720.w @@ -3,7 +3,7 @@ #W id720.w GAP library of id's Hans Ulrich Besche ## Revision.id720_w := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 720 ].next[ 23 ] := rec( diff --git a/small/idlib/id720.y b/small/idlib/id720.y index 3cc1004e92..ebe87939ef 100644 --- a/small/idlib/id720.y +++ b/small/idlib/id720.y @@ -3,7 +3,7 @@ #W id720.y GAP library of id's Hans Ulrich Besche ## Revision.id720_y := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 720 ].next[ 25 ] := rec( diff --git a/small/idlib/id729c.b b/small/idlib/id729c.b index 949a03404c..48fec1422f 100644 --- a/small/idlib/id729c.b +++ b/small/idlib/id729c.b @@ -3,7 +3,7 @@ #W id729c.b GAP library of id's Hans Ulrich Besche ## Revision.id729c_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 729 ].next[ 3 ].next[ 2 ] := rec( diff --git a/small/idlib/id729d.b b/small/idlib/id729d.b index 8443788987..77c784f1b7 100644 --- a/small/idlib/id729d.b +++ b/small/idlib/id729d.b @@ -3,7 +3,7 @@ #W id729d.b GAP library of id's Hans Ulrich Besche ## Revision.id729d_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 729 ].next[ 4 ].next[ 2 ] := rec( diff --git a/small/idlib/id729db.b b/small/idlib/id729db.b index 401e831f2e..c8035a6984 100644 --- a/small/idlib/id729db.b +++ b/small/idlib/id729db.b @@ -3,7 +3,7 @@ #W id729db.b GAP library of id's Hans Ulrich Besche ## Revision.id729db_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 729 ].next[ 4 ].next[ 2 ].next[ 2 ] := rec( diff --git a/small/idlib/id73.2 b/small/idlib/id73.2 index 5b3e38ad58..1fd1a36a59 100644 --- a/small/idlib/id73.2 +++ b/small/idlib/id73.2 @@ -3,7 +3,7 @@ #W id73.2 GAP library of id's Hans Ulrich Besche ## Revision.id73_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 732 ] := rec( diff --git a/small/idlib/id73.5 b/small/idlib/id73.5 index 1c7a1ca167..fc3f405fd7 100644 --- a/small/idlib/id73.5 +++ b/small/idlib/id73.5 @@ -3,7 +3,7 @@ #W id73.5 GAP library of id's Hans Ulrich Besche ## Revision.id73_5 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 735 ] := rec( diff --git a/small/idlib/id73.6 b/small/idlib/id73.6 index 62acd5eca2..131d2b21b7 100644 --- a/small/idlib/id73.6 +++ b/small/idlib/id73.6 @@ -3,7 +3,7 @@ #W id73.6 GAP library of id's Hans Ulrich Besche ## Revision.id73_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 736 ] := rec( diff --git a/small/idlib/id73.8 b/small/idlib/id73.8 index 7f08221539..54ba3fa18a 100644 --- a/small/idlib/id73.8 +++ b/small/idlib/id73.8 @@ -3,7 +3,7 @@ #W id73.8 GAP library of id's Hans Ulrich Besche ## Revision.id73_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 738 ] := rec( diff --git a/small/idlib/id74.0 b/small/idlib/id74.0 index 30518ae09a..ecf7ab2ff3 100644 --- a/small/idlib/id74.0 +++ b/small/idlib/id74.0 @@ -3,7 +3,7 @@ #W id74.0 GAP library of id's Hans Ulrich Besche ## Revision.id74_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 740 ] := rec( diff --git a/small/idlib/id74.4 b/small/idlib/id74.4 index 18d1f49ad7..1d0a96e8ff 100644 --- a/small/idlib/id74.4 +++ b/small/idlib/id74.4 @@ -3,7 +3,7 @@ #W id74.4 GAP library of id's Hans Ulrich Besche ## Revision.id74_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 744 ] := rec( diff --git a/small/idlib/id74.8 b/small/idlib/id74.8 index f9f9fad2f6..13434de104 100644 --- a/small/idlib/id74.8 +++ b/small/idlib/id74.8 @@ -3,7 +3,7 @@ #W id74.8 GAP library of id's Hans Ulrich Besche ## Revision.id74_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 748 ] := rec( diff --git a/small/idlib/id75.0 b/small/idlib/id75.0 index e17a6699d7..3acf197327 100644 --- a/small/idlib/id75.0 +++ b/small/idlib/id75.0 @@ -3,7 +3,7 @@ #W id75.0 GAP library of id's Hans Ulrich Besche ## Revision.id75_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 750 ] := rec( diff --git a/small/idlib/id75.2 b/small/idlib/id75.2 index 8389887cda..97c9920533 100644 --- a/small/idlib/id75.2 +++ b/small/idlib/id75.2 @@ -3,7 +3,7 @@ #W id75.2 GAP library of id's Hans Ulrich Besche ## Revision.id75_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 752 ] := rec( diff --git a/small/idlib/id75.6 b/small/idlib/id75.6 index 6de26dff63..202ba0d6ac 100644 --- a/small/idlib/id75.6 +++ b/small/idlib/id75.6 @@ -3,7 +3,7 @@ #W id75.6 GAP library of id's Hans Ulrich Besche ## Revision.id75_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 756 ] := rec( diff --git a/small/idlib/id76.0 b/small/idlib/id76.0 index f73a72d51c..916ce1ef28 100644 --- a/small/idlib/id76.0 +++ b/small/idlib/id76.0 @@ -3,7 +3,7 @@ #W id76.0 GAP library of id's Hans Ulrich Besche ## Revision.id76_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 760 ] := rec( diff --git a/small/idlib/id76.5 b/small/idlib/id76.5 index 44b0c72dc5..b019709fbe 100644 --- a/small/idlib/id76.5 +++ b/small/idlib/id76.5 @@ -3,7 +3,7 @@ #W id76.5 GAP library of id's Hans Ulrich Besche ## Revision.id76_5 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 765 ] := rec( diff --git a/small/idlib/id77.0 b/small/idlib/id77.0 index 8cfb26c3af..7dbf08fbdb 100644 --- a/small/idlib/id77.0 +++ b/small/idlib/id77.0 @@ -3,7 +3,7 @@ #W id77.0 GAP library of id's Hans Ulrich Besche ## Revision.id77_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 770 ] := rec( diff --git a/small/idlib/id77.4 b/small/idlib/id77.4 index c8720d3150..0081dd4abd 100644 --- a/small/idlib/id77.4 +++ b/small/idlib/id77.4 @@ -3,7 +3,7 @@ #W id77.4 GAP library of id's Hans Ulrich Besche ## Revision.id77_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 774 ] := rec( diff --git a/small/idlib/id77.6 b/small/idlib/id77.6 index f86f8c75b1..d9aae937e5 100644 --- a/small/idlib/id77.6 +++ b/small/idlib/id77.6 @@ -3,7 +3,7 @@ #W id77.6 GAP library of id's Hans Ulrich Besche ## Revision.id77_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 776 ] := rec( diff --git a/small/idlib/id78.0 b/small/idlib/id78.0 index f5a9ba913a..4d33a4c3fa 100644 --- a/small/idlib/id78.0 +++ b/small/idlib/id78.0 @@ -3,7 +3,7 @@ #W id78.0 GAP library of id's Hans Ulrich Besche ## Revision.id78_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 780 ] := rec( diff --git a/small/idlib/id78.3 b/small/idlib/id78.3 index f0837dc969..af7e509131 100644 --- a/small/idlib/id78.3 +++ b/small/idlib/id78.3 @@ -3,7 +3,7 @@ #W id78.3 GAP library of id's Hans Ulrich Besche ## Revision.id78_3 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 783 ] := rec( diff --git a/small/idlib/id78.4 b/small/idlib/id78.4 index a7c7dfcd5d..da1d6bb2c1 100644 --- a/small/idlib/id78.4 +++ b/small/idlib/id78.4 @@ -3,7 +3,7 @@ #W id78.4 GAP library of id's Hans Ulrich Besche ## Revision.id78_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 784 ] := rec( diff --git a/small/idlib/id79.2 b/small/idlib/id79.2 index e06c42a5da..95463760bb 100644 --- a/small/idlib/id79.2 +++ b/small/idlib/id79.2 @@ -3,7 +3,7 @@ #W id79.2 GAP library of id's Hans Ulrich Besche ## Revision.id79_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 792 ] := rec( diff --git a/small/idlib/id79.8 b/small/idlib/id79.8 index 3f220910ec..a3f9e4a87e 100644 --- a/small/idlib/id79.8 +++ b/small/idlib/id79.8 @@ -3,7 +3,7 @@ #W id79.8 GAP library of id's Hans Ulrich Besche ## Revision.id79_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 798 ] := rec( diff --git a/small/idlib/id80.0 b/small/idlib/id80.0 index 93d01bf914..50a3d0983c 100644 --- a/small/idlib/id80.0 +++ b/small/idlib/id80.0 @@ -3,7 +3,7 @@ #W id80.0 GAP library of id's Hans Ulrich Besche ## Revision.id80_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 800 ] := rec( diff --git a/small/idlib/id80.4 b/small/idlib/id80.4 index c763709725..dce4f86d92 100644 --- a/small/idlib/id80.4 +++ b/small/idlib/id80.4 @@ -3,7 +3,7 @@ #W id80.4 GAP library of id's Hans Ulrich Besche ## Revision.id80_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 804 ] := rec( diff --git a/small/idlib/id80.8 b/small/idlib/id80.8 index b6bb6d58bb..6ed0992108 100644 --- a/small/idlib/id80.8 +++ b/small/idlib/id80.8 @@ -3,7 +3,7 @@ #W id80.8 GAP library of id's Hans Ulrich Besche ## Revision.id80_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 808 ] := rec( diff --git a/small/idlib/id800.f b/small/idlib/id800.f index dceffd440a..4178d467ba 100644 --- a/small/idlib/id800.f +++ b/small/idlib/id800.f @@ -3,7 +3,7 @@ #W id800.f GAP library of id's Hans Ulrich Besche ## Revision.id800_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 800 ].next[ 6 ] := rec( diff --git a/small/idlib/id800.h b/small/idlib/id800.h index bd7218cf88..066e8bf3a6 100644 --- a/small/idlib/id800.h +++ b/small/idlib/id800.h @@ -3,7 +3,7 @@ #W id800.h GAP library of id's Hans Ulrich Besche ## Revision.id800_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 800 ].next[ 8 ] := rec( diff --git a/small/idlib/id800.i b/small/idlib/id800.i index 1df0412ce7..56b0a71956 100644 --- a/small/idlib/id800.i +++ b/small/idlib/id800.i @@ -3,7 +3,7 @@ #W id800.i GAP library of id's Hans Ulrich Besche ## Revision.id800_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 800 ].next[ 9 ] := rec( diff --git a/small/idlib/id800.k b/small/idlib/id800.k index deea3e515f..a151cb0063 100644 --- a/small/idlib/id800.k +++ b/small/idlib/id800.k @@ -3,7 +3,7 @@ #W id800.k GAP library of id's Hans Ulrich Besche ## Revision.id800_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 800 ].next[ 11 ] := rec( diff --git a/small/idlib/id800.m b/small/idlib/id800.m index 360152a1e5..bf3f0243cb 100644 --- a/small/idlib/id800.m +++ b/small/idlib/id800.m @@ -3,7 +3,7 @@ #W id800.m GAP library of id's Hans Ulrich Besche ## Revision.id800_m := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 800 ].next[ 13 ] := rec( diff --git a/small/idlib/id800k.c b/small/idlib/id800k.c index 1354f8174b..f98116b377 100644 --- a/small/idlib/id800k.c +++ b/small/idlib/id800k.c @@ -3,7 +3,7 @@ #W id800k.c GAP library of id's Hans Ulrich Besche ## Revision.id800k_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 800 ].next[ 11 ].next[ 3 ] := rec( diff --git a/small/idlib/id800m.c b/small/idlib/id800m.c index ece63f563c..226c770235 100644 --- a/small/idlib/id800m.c +++ b/small/idlib/id800m.c @@ -3,7 +3,7 @@ #W id800m.c GAP library of id's Hans Ulrich Besche ## Revision.id800m_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 800 ].next[ 13 ].next[ 3 ] := rec( diff --git a/small/idlib/id800m.f b/small/idlib/id800m.f index b2cba2e404..f45a89a407 100644 --- a/small/idlib/id800m.f +++ b/small/idlib/id800m.f @@ -3,7 +3,7 @@ #W id800m.f GAP library of id's Hans Ulrich Besche ## Revision.id800m_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 800 ].next[ 13 ].next[ 6 ] := rec( diff --git a/small/idlib/id81.0 b/small/idlib/id81.0 index 403711128e..f59c3d0687 100644 --- a/small/idlib/id81.0 +++ b/small/idlib/id81.0 @@ -3,7 +3,7 @@ #W id81.0 GAP library of id's Hans Ulrich Besche ## Revision.id81_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 810 ] := rec( diff --git a/small/idlib/id81.2 b/small/idlib/id81.2 index d4940d4cfd..b3e4c9173f 100644 --- a/small/idlib/id81.2 +++ b/small/idlib/id81.2 @@ -3,7 +3,7 @@ #W id81.2 GAP library of id's Hans Ulrich Besche ## Revision.id81_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 812 ] := rec( diff --git a/small/idlib/id81.6 b/small/idlib/id81.6 index df2c35c519..f9dc346a3b 100644 --- a/small/idlib/id81.6 +++ b/small/idlib/id81.6 @@ -3,7 +3,7 @@ #W id81.6 GAP library of id's Hans Ulrich Besche ## Revision.id81_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 816 ] := rec( diff --git a/small/idlib/id81.9 b/small/idlib/id81.9 index 5a0eaa0ef1..3d1ae2d831 100644 --- a/small/idlib/id81.9 +++ b/small/idlib/id81.9 @@ -3,7 +3,7 @@ #W id81.9 GAP library of id's Hans Ulrich Besche ## Revision.id81_9 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 819 ] := rec( diff --git a/small/idlib/id82.0 b/small/idlib/id82.0 index 058df8e6f0..f23af7a8c9 100644 --- a/small/idlib/id82.0 +++ b/small/idlib/id82.0 @@ -3,7 +3,7 @@ #W id82.0 GAP library of id's Hans Ulrich Besche ## Revision.id82_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 820 ] := rec( diff --git a/small/idlib/id82.4 b/small/idlib/id82.4 index ccbda90fed..31a7a583d3 100644 --- a/small/idlib/id82.4 +++ b/small/idlib/id82.4 @@ -3,7 +3,7 @@ #W id82.4 GAP library of id's Hans Ulrich Besche ## Revision.id82_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 824 ] := rec( diff --git a/small/idlib/id82.5 b/small/idlib/id82.5 index c0cb07e22b..42d3fc93fe 100644 --- a/small/idlib/id82.5 +++ b/small/idlib/id82.5 @@ -3,7 +3,7 @@ #W id82.5 GAP library of id's Hans Ulrich Besche ## Revision.id82_5 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 825 ] := rec( diff --git a/small/idlib/id82.8 b/small/idlib/id82.8 index d0f41329a0..6f0785055a 100644 --- a/small/idlib/id82.8 +++ b/small/idlib/id82.8 @@ -3,7 +3,7 @@ #W id82.8 GAP library of id's Hans Ulrich Besche ## Revision.id82_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 828 ] := rec( diff --git a/small/idlib/id83.2 b/small/idlib/id83.2 index 5fa580d18d..24699e9f24 100644 --- a/small/idlib/id83.2 +++ b/small/idlib/id83.2 @@ -3,7 +3,7 @@ #W id83.2 GAP library of id's Hans Ulrich Besche ## Revision.id83_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 832 ] := rec( diff --git a/small/idlib/id83.6 b/small/idlib/id83.6 index 39e2253057..cc24ceb6bc 100644 --- a/small/idlib/id83.6 +++ b/small/idlib/id83.6 @@ -3,7 +3,7 @@ #W id83.6 GAP library of id's Hans Ulrich Besche ## Revision.id83_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 836 ] := rec( diff --git a/small/idlib/id83.7 b/small/idlib/id83.7 index 4f6a60cbf5..b2bad1ff02 100644 --- a/small/idlib/id83.7 +++ b/small/idlib/id83.7 @@ -3,7 +3,7 @@ #W id83.7 GAP library of id's Hans Ulrich Besche ## Revision.id83_7 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 837 ] := rec( diff --git a/small/idlib/id832.c b/small/idlib/id832.c index 592cdc6db9..57ec7d18d8 100644 --- a/small/idlib/id832.c +++ b/small/idlib/id832.c @@ -3,7 +3,7 @@ #W id832.c GAP library of id's Hans Ulrich Besche ## Revision.id832_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 832 ].next[ 3 ] := rec( diff --git a/small/idlib/id832.g b/small/idlib/id832.g index fdc91656a4..84c8ab9463 100644 --- a/small/idlib/id832.g +++ b/small/idlib/id832.g @@ -3,7 +3,7 @@ #W id832.g GAP library of id's Hans Ulrich Besche ## Revision.id832_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 832 ].next[ 7 ] := rec( diff --git a/small/idlib/id832.i b/small/idlib/id832.i index 3a2f255589..5c5eb00542 100644 --- a/small/idlib/id832.i +++ b/small/idlib/id832.i @@ -3,7 +3,7 @@ #W id832.i GAP library of id's Hans Ulrich Besche ## Revision.id832_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 832 ].next[ 9 ] := rec( diff --git a/small/idlib/id832h.c b/small/idlib/id832h.c index 62de1b8160..67d5608985 100644 --- a/small/idlib/id832h.c +++ b/small/idlib/id832h.c @@ -3,7 +3,7 @@ #W id832h.c GAP library of id's Hans Ulrich Besche ## Revision.id832h_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 832 ].next[ 8 ].next[ 3 ] := rec( diff --git a/small/idlib/id832h.d b/small/idlib/id832h.d index df7d6e1384..80a2c84622 100644 --- a/small/idlib/id832h.d +++ b/small/idlib/id832h.d @@ -3,7 +3,7 @@ #W id832h.d GAP library of id's Hans Ulrich Besche ## Revision.id832h_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 832 ].next[ 8 ].next[ 4 ] := rec( diff --git a/small/idlib/id832h.f b/small/idlib/id832h.f index d4e72be3c5..cbaee8dda6 100644 --- a/small/idlib/id832h.f +++ b/small/idlib/id832h.f @@ -3,7 +3,7 @@ #W id832h.f GAP library of id's Hans Ulrich Besche ## Revision.id832h_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 832 ].next[ 8 ].next[ 6 ] := rec( diff --git a/small/idlib/id832i.c b/small/idlib/id832i.c index becd4fc047..d064b32d0c 100644 --- a/small/idlib/id832i.c +++ b/small/idlib/id832i.c @@ -3,7 +3,7 @@ #W id832i.c GAP library of id's Hans Ulrich Besche ## Revision.id832i_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 832 ].next[ 9 ].next[ 3 ] := rec( diff --git a/small/idlib/id832i.d b/small/idlib/id832i.d index 7549da468f..d735ccdd34 100644 --- a/small/idlib/id832i.d +++ b/small/idlib/id832i.d @@ -3,7 +3,7 @@ #W id832i.d GAP library of id's Hans Ulrich Besche ## Revision.id832i_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 832 ].next[ 9 ].next[ 4 ] := rec( diff --git a/small/idlib/id84.0 b/small/idlib/id84.0 index 7f805ed9f7..d13d7971c9 100644 --- a/small/idlib/id84.0 +++ b/small/idlib/id84.0 @@ -3,7 +3,7 @@ #W id84.0 GAP library of id's Hans Ulrich Besche ## Revision.id84_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 840 ] := rec( diff --git a/small/idlib/id84.6 b/small/idlib/id84.6 index 82dbbca2db..d158df6cc7 100644 --- a/small/idlib/id84.6 +++ b/small/idlib/id84.6 @@ -3,7 +3,7 @@ #W id84.6 GAP library of id's Hans Ulrich Besche ## Revision.id84_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 846 ] := rec( diff --git a/small/idlib/id84.8 b/small/idlib/id84.8 index f72e1e33ff..5f687e3b64 100644 --- a/small/idlib/id84.8 +++ b/small/idlib/id84.8 @@ -3,7 +3,7 @@ #W id84.8 GAP library of id's Hans Ulrich Besche ## Revision.id84_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 848 ] := rec( diff --git a/small/idlib/id85.0 b/small/idlib/id85.0 index 9de30ac338..927e43b09c 100644 --- a/small/idlib/id85.0 +++ b/small/idlib/id85.0 @@ -3,7 +3,7 @@ #W id85.0 GAP library of id's Hans Ulrich Besche ## Revision.id85_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 850 ] := rec( diff --git a/small/idlib/id85.2 b/small/idlib/id85.2 index c49e9deb0b..584294c4df 100644 --- a/small/idlib/id85.2 +++ b/small/idlib/id85.2 @@ -3,7 +3,7 @@ #W id85.2 GAP library of id's Hans Ulrich Besche ## Revision.id85_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 852 ] := rec( diff --git a/small/idlib/id85.5 b/small/idlib/id85.5 index 9c1fef0ff1..e4be8ef4cb 100644 --- a/small/idlib/id85.5 +++ b/small/idlib/id85.5 @@ -3,7 +3,7 @@ #W id85.5 GAP library of id's Hans Ulrich Besche ## Revision.id85_5 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 855 ] := rec( diff --git a/small/idlib/id85.6 b/small/idlib/id85.6 index cd688b8f82..b63759d363 100644 --- a/small/idlib/id85.6 +++ b/small/idlib/id85.6 @@ -3,7 +3,7 @@ #W id85.6 GAP library of id's Hans Ulrich Besche ## Revision.id85_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 856 ] := rec( diff --git a/small/idlib/id85.8 b/small/idlib/id85.8 index 4b2be5487e..84d430a7ad 100644 --- a/small/idlib/id85.8 +++ b/small/idlib/id85.8 @@ -3,7 +3,7 @@ #W id85.8 GAP library of id's Hans Ulrich Besche ## Revision.id85_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 858 ] := rec( diff --git a/small/idlib/id86.0 b/small/idlib/id86.0 index 855115dd82..7603fc912c 100644 --- a/small/idlib/id86.0 +++ b/small/idlib/id86.0 @@ -3,7 +3,7 @@ #W id86.0 GAP library of id's Hans Ulrich Besche ## Revision.id86_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 860 ] := rec( diff --git a/small/idlib/id86.4 b/small/idlib/id86.4 index aee3d43b52..bc90fb3a15 100644 --- a/small/idlib/id86.4 +++ b/small/idlib/id86.4 @@ -3,7 +3,7 @@ #W id86.4 GAP library of id's Hans Ulrich Besche ## Revision.id86_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ] := rec( diff --git a/small/idlib/id86.8 b/small/idlib/id86.8 index 1b1ebb0436..ebb02a35cd 100644 --- a/small/idlib/id86.8 +++ b/small/idlib/id86.8 @@ -3,7 +3,7 @@ #W id86.8 GAP library of id's Hans Ulrich Besche ## Revision.id86_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 868 ] := rec( diff --git a/small/idlib/id864.b b/small/idlib/id864.b index 6a2ea90334..84e08cdc9d 100644 --- a/small/idlib/id864.b +++ b/small/idlib/id864.b @@ -3,7 +3,7 @@ #W id864.b GAP library of id's Hans Ulrich Besche ## Revision.id864_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 2 ] := rec( diff --git a/small/idlib/id864.d b/small/idlib/id864.d index 597b3fb5d7..bbb9384193 100644 --- a/small/idlib/id864.d +++ b/small/idlib/id864.d @@ -3,7 +3,7 @@ #W id864.d GAP library of id's Hans Ulrich Besche ## Revision.id864_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 4 ] := rec( diff --git a/small/idlib/id864.e b/small/idlib/id864.e index 66ab488a96..385c973317 100644 --- a/small/idlib/id864.e +++ b/small/idlib/id864.e @@ -3,7 +3,7 @@ #W id864.e GAP library of id's Hans Ulrich Besche ## Revision.id864_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 5 ] := rec( diff --git a/small/idlib/id864.g b/small/idlib/id864.g index aa0ada8425..e34de4deb8 100644 --- a/small/idlib/id864.g +++ b/small/idlib/id864.g @@ -3,7 +3,7 @@ #W id864.g GAP library of id's Hans Ulrich Besche ## Revision.id864_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 7 ] := rec( diff --git a/small/idlib/id864.h b/small/idlib/id864.h index 88587724e2..8dd9cd0081 100644 --- a/small/idlib/id864.h +++ b/small/idlib/id864.h @@ -3,7 +3,7 @@ #W id864.h GAP library of id's Hans Ulrich Besche ## Revision.id864_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 8 ] := rec( diff --git a/small/idlib/id864.j b/small/idlib/id864.j index 1b4e965a41..34d186628b 100644 --- a/small/idlib/id864.j +++ b/small/idlib/id864.j @@ -3,7 +3,7 @@ #W id864.j GAP library of id's Hans Ulrich Besche ## Revision.id864_j := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 10 ] := rec( diff --git a/small/idlib/id864.l b/small/idlib/id864.l index 6bb5d9cd72..2b1f09c6ad 100644 --- a/small/idlib/id864.l +++ b/small/idlib/id864.l @@ -3,7 +3,7 @@ #W id864.l GAP library of id's Hans Ulrich Besche ## Revision.id864_l := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 12 ] := rec( diff --git a/small/idlib/id864.m b/small/idlib/id864.m index 35fe7dd927..8dbe22f932 100644 --- a/small/idlib/id864.m +++ b/small/idlib/id864.m @@ -3,7 +3,7 @@ #W id864.m GAP library of id's Hans Ulrich Besche ## Revision.id864_m := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 13 ] := rec( diff --git a/small/idlib/id864.o b/small/idlib/id864.o index 83018a47c7..77138032d7 100644 --- a/small/idlib/id864.o +++ b/small/idlib/id864.o @@ -3,7 +3,7 @@ #W id864.o GAP library of id's Hans Ulrich Besche ## Revision.id864_o := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 15 ] := rec( diff --git a/small/idlib/id864.p b/small/idlib/id864.p index 86c3f5d560..a5ceffcc84 100644 --- a/small/idlib/id864.p +++ b/small/idlib/id864.p @@ -3,7 +3,7 @@ #W id864.p GAP library of id's Hans Ulrich Besche ## Revision.id864_p := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 16 ] := rec( diff --git a/small/idlib/id864.r b/small/idlib/id864.r index 7423ef49b0..24d9a9f8eb 100644 --- a/small/idlib/id864.r +++ b/small/idlib/id864.r @@ -3,7 +3,7 @@ #W id864.r GAP library of id's Hans Ulrich Besche ## Revision.id864_r := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 18 ] := rec( diff --git a/small/idlib/id864.v b/small/idlib/id864.v index cd590ba2ee..bc03c34396 100644 --- a/small/idlib/id864.v +++ b/small/idlib/id864.v @@ -3,7 +3,7 @@ #W id864.v GAP library of id's Hans Ulrich Besche ## Revision.id864_v := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 22 ] := rec( diff --git a/small/idlib/id864a.b b/small/idlib/id864a.b index 2c31912539..499dc1f75d 100644 --- a/small/idlib/id864a.b +++ b/small/idlib/id864a.b @@ -3,7 +3,7 @@ #W id864a.b GAP library of id's Hans Ulrich Besche ## Revision.id864a_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 28 ] := rec( diff --git a/small/idlib/id864a.e b/small/idlib/id864a.e index f8da476995..515718a875 100644 --- a/small/idlib/id864a.e +++ b/small/idlib/id864a.e @@ -3,7 +3,7 @@ #W id864a.e GAP library of id's Hans Ulrich Besche ## Revision.id864a_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 31 ] := rec( diff --git a/small/idlib/id864a.m b/small/idlib/id864a.m index 5ddc747322..a6ce58fabc 100644 --- a/small/idlib/id864a.m +++ b/small/idlib/id864a.m @@ -3,7 +3,7 @@ #W id864a.m GAP library of id's Hans Ulrich Besche ## Revision.id864a_m := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 39 ] := rec( diff --git a/small/idlib/id864ae.a b/small/idlib/id864ae.a index d171597ffc..ad50cd1c71 100644 --- a/small/idlib/id864ae.a +++ b/small/idlib/id864ae.a @@ -3,7 +3,7 @@ #W id864ae.a GAP library of id's Hans Ulrich Besche ## Revision.id864ae_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 31 ].next[ 1 ] := rec( diff --git a/small/idlib/id864ak.a b/small/idlib/id864ak.a index f69d92ea67..6644134fd4 100644 --- a/small/idlib/id864ak.a +++ b/small/idlib/id864ak.a @@ -3,7 +3,7 @@ #W id864ak.a GAP library of id's Hans Ulrich Besche ## Revision.id864ak_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 37 ].next[ 1 ] := rec( diff --git a/small/idlib/id864ak.b b/small/idlib/id864ak.b index fa806b0cd4..789727957c 100644 --- a/small/idlib/id864ak.b +++ b/small/idlib/id864ak.b @@ -3,7 +3,7 @@ #W id864ak.b GAP library of id's Hans Ulrich Besche ## Revision.id864ak_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 37 ].next[ 2 ] := rec( diff --git a/small/idlib/id864b.b b/small/idlib/id864b.b index f2b8581371..eee679c803 100644 --- a/small/idlib/id864b.b +++ b/small/idlib/id864b.b @@ -3,7 +3,7 @@ #W id864b.b GAP library of id's Hans Ulrich Besche ## Revision.id864b_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 54 ] := rec( diff --git a/small/idlib/id864b.c b/small/idlib/id864b.c index 6fdd07aa59..bc871dc5a5 100644 --- a/small/idlib/id864b.c +++ b/small/idlib/id864b.c @@ -3,7 +3,7 @@ #W id864b.c GAP library of id's Hans Ulrich Besche ## Revision.id864b_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 55 ] := rec( diff --git a/small/idlib/id864j.a b/small/idlib/id864j.a index cadd23e0d4..7211956685 100644 --- a/small/idlib/id864j.a +++ b/small/idlib/id864j.a @@ -3,7 +3,7 @@ #W id864j.a GAP library of id's Hans Ulrich Besche ## Revision.id864j_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 10 ].next[ 1 ] := rec( diff --git a/small/idlib/id864m.b b/small/idlib/id864m.b index 8994850c4f..be6507274e 100644 --- a/small/idlib/id864m.b +++ b/small/idlib/id864m.b @@ -3,7 +3,7 @@ #W id864m.b GAP library of id's Hans Ulrich Besche ## Revision.id864m_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 13 ].next[ 2 ] := rec( diff --git a/small/idlib/id864m.d b/small/idlib/id864m.d index ee0b6ecfb8..270487d880 100644 --- a/small/idlib/id864m.d +++ b/small/idlib/id864m.d @@ -3,7 +3,7 @@ #W id864m.d GAP library of id's Hans Ulrich Besche ## Revision.id864m_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 13 ].next[ 4 ] := rec( diff --git a/small/idlib/id864o.b b/small/idlib/id864o.b index b20f151612..b0d9f0556f 100644 --- a/small/idlib/id864o.b +++ b/small/idlib/id864o.b @@ -3,7 +3,7 @@ #W id864o.b GAP library of id's Hans Ulrich Besche ## Revision.id864o_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 15 ].next[ 2 ] := rec( diff --git a/small/idlib/id864o.h b/small/idlib/id864o.h index 72cdde910f..9bfd3a1f74 100644 --- a/small/idlib/id864o.h +++ b/small/idlib/id864o.h @@ -3,7 +3,7 @@ #W id864o.h GAP library of id's Hans Ulrich Besche ## Revision.id864o_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 15 ].next[ 8 ] := rec( diff --git a/small/idlib/id864r.b b/small/idlib/id864r.b index 75993ab81f..44db391fc9 100644 --- a/small/idlib/id864r.b +++ b/small/idlib/id864r.b @@ -3,7 +3,7 @@ #W id864r.b GAP library of id's Hans Ulrich Besche ## Revision.id864r_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 18 ].next[ 2 ] := rec( diff --git a/small/idlib/id864r.e b/small/idlib/id864r.e index 066b1e0254..a59049fdcd 100644 --- a/small/idlib/id864r.e +++ b/small/idlib/id864r.e @@ -3,7 +3,7 @@ #W id864r.e GAP library of id's Hans Ulrich Besche ## Revision.id864r_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 18 ].next[ 5 ] := rec( diff --git a/small/idlib/id864r.g b/small/idlib/id864r.g index 4cf9133c5c..4477a6f9ce 100644 --- a/small/idlib/id864r.g +++ b/small/idlib/id864r.g @@ -3,7 +3,7 @@ #W id864r.g GAP library of id's Hans Ulrich Besche ## Revision.id864r_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 18 ].next[ 7 ] := rec( diff --git a/small/idlib/id864r.k b/small/idlib/id864r.k index 4b3dd33e8a..61bef188b9 100644 --- a/small/idlib/id864r.k +++ b/small/idlib/id864r.k @@ -3,7 +3,7 @@ #W id864r.k GAP library of id's Hans Ulrich Besche ## Revision.id864r_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 864 ].next[ 18 ].next[ 11 ] := rec( diff --git a/small/idlib/id87.0 b/small/idlib/id87.0 index 58c2026f39..e8ea0ff417 100644 --- a/small/idlib/id87.0 +++ b/small/idlib/id87.0 @@ -3,7 +3,7 @@ #W id87.0 GAP library of id's Hans Ulrich Besche ## Revision.id87_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 870 ] := rec( diff --git a/small/idlib/id87.2 b/small/idlib/id87.2 index 027167dc3c..d450e928d4 100644 --- a/small/idlib/id87.2 +++ b/small/idlib/id87.2 @@ -3,7 +3,7 @@ #W id87.2 GAP library of id's Hans Ulrich Besche ## Revision.id87_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 872 ] := rec( diff --git a/small/idlib/id87.5 b/small/idlib/id87.5 index daccafc62b..ff971f56dc 100644 --- a/small/idlib/id87.5 +++ b/small/idlib/id87.5 @@ -3,7 +3,7 @@ #W id87.5 GAP library of id's Hans Ulrich Besche ## Revision.id87_5 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 875 ] := rec( diff --git a/small/idlib/id87.6 b/small/idlib/id87.6 index a9543287fe..0525c04d48 100644 --- a/small/idlib/id87.6 +++ b/small/idlib/id87.6 @@ -3,7 +3,7 @@ #W id87.6 GAP library of id's Hans Ulrich Besche ## Revision.id87_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 876 ] := rec( diff --git a/small/idlib/id88.0 b/small/idlib/id88.0 index 31e1993fec..7b5693c233 100644 --- a/small/idlib/id88.0 +++ b/small/idlib/id88.0 @@ -3,7 +3,7 @@ #W id88.0 GAP library of id's Hans Ulrich Besche ## Revision.id88_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 880 ] := rec( diff --git a/small/idlib/id88.2 b/small/idlib/id88.2 index 0c01f68531..0d0cdd6ab9 100644 --- a/small/idlib/id88.2 +++ b/small/idlib/id88.2 @@ -3,7 +3,7 @@ #W id88.2 GAP library of id's Hans Ulrich Besche ## Revision.id88_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 882 ] := rec( diff --git a/small/idlib/id88.4 b/small/idlib/id88.4 index 78adda93a5..7dd36cc441 100644 --- a/small/idlib/id88.4 +++ b/small/idlib/id88.4 @@ -3,7 +3,7 @@ #W id88.4 GAP library of id's Hans Ulrich Besche ## Revision.id88_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 884 ] := rec( diff --git a/small/idlib/id88.8 b/small/idlib/id88.8 index 26b2425df9..4d47414255 100644 --- a/small/idlib/id88.8 +++ b/small/idlib/id88.8 @@ -3,7 +3,7 @@ #W id88.8 GAP library of id's Hans Ulrich Besche ## Revision.id88_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 888 ] := rec( diff --git a/small/idlib/id89.1 b/small/idlib/id89.1 index c5b49c3c2f..f5687e695f 100644 --- a/small/idlib/id89.1 +++ b/small/idlib/id89.1 @@ -3,7 +3,7 @@ #W id89.1 GAP library of id's Hans Ulrich Besche ## Revision.id89_1 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 891 ] := rec( diff --git a/small/idlib/id89.6 b/small/idlib/id89.6 index c1cfddabc9..2c339c8f00 100644 --- a/small/idlib/id89.6 +++ b/small/idlib/id89.6 @@ -3,7 +3,7 @@ #W id89.6 GAP library of id's Hans Ulrich Besche ## Revision.id89_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ] := rec( diff --git a/small/idlib/id896.b b/small/idlib/id896.b index 092095eff7..0bdb7174d8 100644 --- a/small/idlib/id896.b +++ b/small/idlib/id896.b @@ -3,7 +3,7 @@ #W id896.b GAP library of id's Hans Ulrich Besche ## Revision.id896_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 2 ] := rec( diff --git a/small/idlib/id896.e b/small/idlib/id896.e index e3a1b7c2ec..1742097c47 100644 --- a/small/idlib/id896.e +++ b/small/idlib/id896.e @@ -3,7 +3,7 @@ #W id896.e GAP library of id's Hans Ulrich Besche ## Revision.id896_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 5 ] := rec( diff --git a/small/idlib/id896.f b/small/idlib/id896.f index d70d8b8e6a..b6c3cd75be 100644 --- a/small/idlib/id896.f +++ b/small/idlib/id896.f @@ -3,7 +3,7 @@ #W id896.f GAP library of id's Hans Ulrich Besche ## Revision.id896_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 6 ] := rec( diff --git a/small/idlib/id896.g b/small/idlib/id896.g index 692cd2b36a..0aee963cc6 100644 --- a/small/idlib/id896.g +++ b/small/idlib/id896.g @@ -3,7 +3,7 @@ #W id896.g GAP library of id's Hans Ulrich Besche ## Revision.id896_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 7 ] := rec( diff --git a/small/idlib/id896.h b/small/idlib/id896.h index 5084928cf5..62818d440c 100644 --- a/small/idlib/id896.h +++ b/small/idlib/id896.h @@ -3,7 +3,7 @@ #W id896.h GAP library of id's Hans Ulrich Besche ## Revision.id896_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ] := rec( diff --git a/small/idlib/id896.l b/small/idlib/id896.l index 418e1ada59..3705139ce4 100644 --- a/small/idlib/id896.l +++ b/small/idlib/id896.l @@ -3,7 +3,7 @@ #W id896.l GAP library of id's Hans Ulrich Besche ## Revision.id896_l := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 12 ] := rec( diff --git a/small/idlib/id896c.a b/small/idlib/id896c.a index 2b448014af..7b3cc62aa0 100644 --- a/small/idlib/id896c.a +++ b/small/idlib/id896c.a @@ -3,7 +3,7 @@ #W id896c.a GAP library of id's Hans Ulrich Besche ## Revision.id896c_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 3 ].next[ 1 ] := rec( diff --git a/small/idlib/id896c.b b/small/idlib/id896c.b index f93c791db2..4e4e85499f 100644 --- a/small/idlib/id896c.b +++ b/small/idlib/id896c.b @@ -3,7 +3,7 @@ #W id896c.b GAP library of id's Hans Ulrich Besche ## Revision.id896c_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 3 ].next[ 2 ] := rec( diff --git a/small/idlib/id896ca.d b/small/idlib/id896ca.d index 1e7df94093..344164c2a1 100644 --- a/small/idlib/id896ca.d +++ b/small/idlib/id896ca.d @@ -3,7 +3,7 @@ #W id896ca.d GAP library of id's Hans Ulrich Besche ## Revision.id896ca_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 3 ].next[ 1 ].next[ 4 ] := rec( diff --git a/small/idlib/id896e.b b/small/idlib/id896e.b index 8ab4241a7d..de4e81b405 100644 --- a/small/idlib/id896e.b +++ b/small/idlib/id896e.b @@ -3,7 +3,7 @@ #W id896e.b GAP library of id's Hans Ulrich Besche ## Revision.id896e_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 5 ].next[ 2 ] := rec( diff --git a/small/idlib/id896e.c b/small/idlib/id896e.c index 9adca7591d..c87ef4049b 100644 --- a/small/idlib/id896e.c +++ b/small/idlib/id896e.c @@ -3,7 +3,7 @@ #W id896e.c GAP library of id's Hans Ulrich Besche ## Revision.id896e_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 5 ].next[ 3 ] := rec( diff --git a/small/idlib/id896eb.b b/small/idlib/id896eb.b index fe70289c27..5e93300e05 100644 --- a/small/idlib/id896eb.b +++ b/small/idlib/id896eb.b @@ -3,7 +3,7 @@ #W id896eb.b GAP library of id's Hans Ulrich Besche ## Revision.id896eb_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 5 ].next[ 2 ].next[ 2 ] := rec( diff --git a/small/idlib/id896eb.c b/small/idlib/id896eb.c index 731cd6c147..0d26e27d86 100644 --- a/small/idlib/id896eb.c +++ b/small/idlib/id896eb.c @@ -3,7 +3,7 @@ #W id896eb.c GAP library of id's Hans Ulrich Besche ## Revision.id896eb_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 5 ].next[ 2 ].next[ 3 ] := rec( diff --git a/small/idlib/id896eb.d b/small/idlib/id896eb.d index fc0107b0bc..6d36ac779f 100644 --- a/small/idlib/id896eb.d +++ b/small/idlib/id896eb.d @@ -3,7 +3,7 @@ #W id896eb.d GAP library of id's Hans Ulrich Besche ## Revision.id896eb_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 5 ].next[ 2 ].next[ 4 ] := rec( diff --git a/small/idlib/id896ec.d b/small/idlib/id896ec.d index 0223c48247..e6de370f66 100644 --- a/small/idlib/id896ec.d +++ b/small/idlib/id896ec.d @@ -3,7 +3,7 @@ #W id896ec.d GAP library of id's Hans Ulrich Besche ## Revision.id896ec_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 5 ].next[ 3 ].next[ 4 ] := rec( diff --git a/small/idlib/id896ec.f b/small/idlib/id896ec.f index 1f1441ea50..2a13c5e83d 100644 --- a/small/idlib/id896ec.f +++ b/small/idlib/id896ec.f @@ -3,7 +3,7 @@ #W id896ec.f GAP library of id's Hans Ulrich Besche ## Revision.id896ec_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 5 ].next[ 3 ].next[ 6 ] := rec( diff --git a/small/idlib/id896ec.i b/small/idlib/id896ec.i index ef88c166a9..e2c342c936 100644 --- a/small/idlib/id896ec.i +++ b/small/idlib/id896ec.i @@ -3,7 +3,7 @@ #W id896ec.i GAP library of id's Hans Ulrich Besche ## Revision.id896ec_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 5 ].next[ 3 ].next[ 9 ] := rec( diff --git a/small/idlib/id896ec.k b/small/idlib/id896ec.k index 7705003e9a..4c202d2690 100644 --- a/small/idlib/id896ec.k +++ b/small/idlib/id896ec.k @@ -3,7 +3,7 @@ #W id896ec.k GAP library of id's Hans Ulrich Besche ## Revision.id896ec_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 5 ].next[ 3 ].next[ 11 ] := rec( diff --git a/small/idlib/id896ec.o b/small/idlib/id896ec.o index d33b713dc9..9de256569d 100644 --- a/small/idlib/id896ec.o +++ b/small/idlib/id896ec.o @@ -3,7 +3,7 @@ #W id896ec.o GAP library of id's Hans Ulrich Besche ## Revision.id896ec_o := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 5 ].next[ 3 ].next[ 15 ] := rec( diff --git a/small/idlib/id896ec.t b/small/idlib/id896ec.t index db10189848..402bd5bc84 100644 --- a/small/idlib/id896ec.t +++ b/small/idlib/id896ec.t @@ -3,7 +3,7 @@ #W id896ec.t GAP library of id's Hans Ulrich Besche ## Revision.id896ec_t := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 5 ].next[ 3 ].next[ 20 ] := rec( diff --git a/small/idlib/id896ec.x b/small/idlib/id896ec.x index 72b819ea43..996dfc5b10 100644 --- a/small/idlib/id896ec.x +++ b/small/idlib/id896ec.x @@ -3,7 +3,7 @@ #W id896ec.x GAP library of id's Hans Ulrich Besche ## Revision.id896ec_x := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 5 ].next[ 3 ].next[ 24 ] := rec( diff --git a/small/idlib/id896f.b b/small/idlib/id896f.b index 340eb75b5e..b5fa47c5e5 100644 --- a/small/idlib/id896f.b +++ b/small/idlib/id896f.b @@ -3,7 +3,7 @@ #W id896f.b GAP library of id's Hans Ulrich Besche ## Revision.id896f_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 6 ].next[ 2 ] := rec( diff --git a/small/idlib/id896g.b b/small/idlib/id896g.b index 5f25a6b7fc..51e53a259d 100644 --- a/small/idlib/id896g.b +++ b/small/idlib/id896g.b @@ -3,7 +3,7 @@ #W id896g.b GAP library of id's Hans Ulrich Besche ## Revision.id896g_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 7 ].next[ 2 ] := rec( diff --git a/small/idlib/id896h.b b/small/idlib/id896h.b index 3fc82a2416..edce6a4535 100644 --- a/small/idlib/id896h.b +++ b/small/idlib/id896h.b @@ -3,7 +3,7 @@ #W id896h.b GAP library of id's Hans Ulrich Besche ## Revision.id896h_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 2 ] := rec( diff --git a/small/idlib/id896h.c b/small/idlib/id896h.c index 502e2839b8..390411d81c 100644 --- a/small/idlib/id896h.c +++ b/small/idlib/id896h.c @@ -3,7 +3,7 @@ #W id896h.c GAP library of id's Hans Ulrich Besche ## Revision.id896h_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 3 ] := rec( diff --git a/small/idlib/id896h.d b/small/idlib/id896h.d index 8ba3a3a6dd..2609b9e036 100644 --- a/small/idlib/id896h.d +++ b/small/idlib/id896h.d @@ -3,7 +3,7 @@ #W id896h.d GAP library of id's Hans Ulrich Besche ## Revision.id896h_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 4 ] := rec( diff --git a/small/idlib/id896hb.a b/small/idlib/id896hb.a index 07bf069155..707df630c4 100644 --- a/small/idlib/id896hb.a +++ b/small/idlib/id896hb.a @@ -3,7 +3,7 @@ #W id896hb.a GAP library of id's Hans Ulrich Besche ## Revision.id896hb_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 2 ].next[ 1 ] := rec( diff --git a/small/idlib/id896hb.b b/small/idlib/id896hb.b index fcba5db286..31e684ecc7 100644 --- a/small/idlib/id896hb.b +++ b/small/idlib/id896hb.b @@ -3,7 +3,7 @@ #W id896hb.b GAP library of id's Hans Ulrich Besche ## Revision.id896hb_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 2 ].next[ 2 ] := rec( diff --git a/small/idlib/id896hb.c b/small/idlib/id896hb.c index fd55007b47..4c3e61487c 100644 --- a/small/idlib/id896hb.c +++ b/small/idlib/id896hb.c @@ -3,7 +3,7 @@ #W id896hb.c GAP library of id's Hans Ulrich Besche ## Revision.id896hb_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 2 ].next[ 3 ] := rec( diff --git a/small/idlib/id896hb.e b/small/idlib/id896hb.e index 53eb50583e..b36342530e 100644 --- a/small/idlib/id896hb.e +++ b/small/idlib/id896hb.e @@ -3,7 +3,7 @@ #W id896hb.e GAP library of id's Hans Ulrich Besche ## Revision.id896hb_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 2 ].next[ 5 ] := rec( diff --git a/small/idlib/id896hb.k b/small/idlib/id896hb.k index 266284a7d4..ec5341d8a5 100644 --- a/small/idlib/id896hb.k +++ b/small/idlib/id896hb.k @@ -3,7 +3,7 @@ #W id896hb.k GAP library of id's Hans Ulrich Besche ## Revision.id896hb_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 2 ].next[ 11 ] := rec( diff --git a/small/idlib/id896hb.m b/small/idlib/id896hb.m index 4b3231c727..77619818f3 100644 --- a/small/idlib/id896hb.m +++ b/small/idlib/id896hb.m @@ -3,7 +3,7 @@ #W id896hb.m GAP library of id's Hans Ulrich Besche ## Revision.id896hb_m := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 2 ].next[ 13 ] := rec( diff --git a/small/idlib/id896hb.n b/small/idlib/id896hb.n index cccb0a4fae..8d1699e5f7 100644 --- a/small/idlib/id896hb.n +++ b/small/idlib/id896hb.n @@ -3,7 +3,7 @@ #W id896hb.n GAP library of id's Hans Ulrich Besche ## Revision.id896hb_n := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 2 ].next[ 14 ] := rec( diff --git a/small/idlib/id896hb.q b/small/idlib/id896hb.q index adc1c1efbf..c176f224ca 100644 --- a/small/idlib/id896hb.q +++ b/small/idlib/id896hb.q @@ -3,7 +3,7 @@ #W id896hb.q GAP library of id's Hans Ulrich Besche ## Revision.id896hb_q := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 2 ].next[ 17 ] := rec( diff --git a/small/idlib/id896hb.s b/small/idlib/id896hb.s index c58c222651..4305b9eeb6 100644 --- a/small/idlib/id896hb.s +++ b/small/idlib/id896hb.s @@ -3,7 +3,7 @@ #W id896hb.s GAP library of id's Hans Ulrich Besche ## Revision.id896hb_s := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 2 ].next[ 19 ] := rec( diff --git a/small/idlib/id896hb.v b/small/idlib/id896hb.v index fdc6c4b5e6..a3a9b32a0b 100644 --- a/small/idlib/id896hb.v +++ b/small/idlib/id896hb.v @@ -3,7 +3,7 @@ #W id896hb.v GAP library of id's Hans Ulrich Besche ## Revision.id896hb_v := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 2 ].next[ 22 ] := rec( diff --git a/small/idlib/id896hb.x b/small/idlib/id896hb.x index 4ee831f9df..c72c4ad685 100644 --- a/small/idlib/id896hb.x +++ b/small/idlib/id896hb.x @@ -3,7 +3,7 @@ #W id896hb.x GAP library of id's Hans Ulrich Besche ## Revision.id896hb_x := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 2 ].next[ 24 ] := rec( diff --git a/small/idlib/id896hb.y b/small/idlib/id896hb.y index 2fe797548c..dc0b60ccf3 100644 --- a/small/idlib/id896hb.y +++ b/small/idlib/id896hb.y @@ -3,7 +3,7 @@ #W id896hb.y GAP library of id's Hans Ulrich Besche ## Revision.id896hb_y := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 2 ].next[ 25 ] := rec( diff --git a/small/idlib/id896hba.a b/small/idlib/id896hba.a index 54fc63f582..712ef71c84 100644 --- a/small/idlib/id896hba.a +++ b/small/idlib/id896hba.a @@ -3,7 +3,7 @@ #W id896hba.a GAP library of id's Hans Ulrich Besche ## Revision.id896hba_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 2 ].next[ 27 ] := rec( diff --git a/small/idlib/id896hba.b b/small/idlib/id896hba.b index 6b8a7e5154..f5c7570ce6 100644 --- a/small/idlib/id896hba.b +++ b/small/idlib/id896hba.b @@ -3,7 +3,7 @@ #W id896hba.b GAP library of id's Hans Ulrich Besche ## Revision.id896hba_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 2 ].next[ 28 ] := rec( diff --git a/small/idlib/id896hba.d b/small/idlib/id896hba.d index fb00a2dec1..f05bb47b8a 100644 --- a/small/idlib/id896hba.d +++ b/small/idlib/id896hba.d @@ -3,7 +3,7 @@ #W id896hba.d GAP library of id's Hans Ulrich Besche ## Revision.id896hba_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 2 ].next[ 30 ] := rec( diff --git a/small/idlib/id896hba.g b/small/idlib/id896hba.g index 7e2c2624d4..7c9e32152d 100644 --- a/small/idlib/id896hba.g +++ b/small/idlib/id896hba.g @@ -3,7 +3,7 @@ #W id896hba.g GAP library of id's Hans Ulrich Besche ## Revision.id896hba_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 2 ].next[ 33 ] := rec( diff --git a/small/idlib/id896hba.i b/small/idlib/id896hba.i index 67a1a3154a..e3748fe2c4 100644 --- a/small/idlib/id896hba.i +++ b/small/idlib/id896hba.i @@ -3,7 +3,7 @@ #W id896hba.i GAP library of id's Hans Ulrich Besche ## Revision.id896hba_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 2 ].next[ 35 ] := rec( diff --git a/small/idlib/id896hba.j b/small/idlib/id896hba.j index 487c2732a1..88ecf94ac2 100644 --- a/small/idlib/id896hba.j +++ b/small/idlib/id896hba.j @@ -3,7 +3,7 @@ #W id896hba.j GAP library of id's Hans Ulrich Besche ## Revision.id896hba_j := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 2 ].next[ 36 ] := rec( diff --git a/small/idlib/id896hd.l b/small/idlib/id896hd.l index a76b71bcfb..9769565b0e 100644 --- a/small/idlib/id896hd.l +++ b/small/idlib/id896hd.l @@ -3,7 +3,7 @@ #W id896hd.l GAP library of id's Hans Ulrich Besche ## Revision.id896hd_l := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 4 ].next[ 12 ] := rec( diff --git a/small/idlib/id896hd.n b/small/idlib/id896hd.n index 80d875be0a..834593ee71 100644 --- a/small/idlib/id896hd.n +++ b/small/idlib/id896hd.n @@ -3,7 +3,7 @@ #W id896hd.n GAP library of id's Hans Ulrich Besche ## Revision.id896hd_n := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 4 ].next[ 14 ] := rec( diff --git a/small/idlib/id896hda.j b/small/idlib/id896hda.j index a0ead3ddc2..2c4ad0fc8f 100644 --- a/small/idlib/id896hda.j +++ b/small/idlib/id896hda.j @@ -3,7 +3,7 @@ #W id896hda.j GAP library of id's Hans Ulrich Besche ## Revision.id896hda_j := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 4 ].next[ 36 ] := rec( diff --git a/small/idlib/id896hda.k b/small/idlib/id896hda.k index 2461142073..94d951631c 100644 --- a/small/idlib/id896hda.k +++ b/small/idlib/id896hda.k @@ -3,7 +3,7 @@ #W id896hda.k GAP library of id's Hans Ulrich Besche ## Revision.id896hda_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 4 ].next[ 37 ] := rec( diff --git a/small/idlib/id896hda.s b/small/idlib/id896hda.s index 092bf572e5..21b3a93961 100644 --- a/small/idlib/id896hda.s +++ b/small/idlib/id896hda.s @@ -3,7 +3,7 @@ #W id896hda.s GAP library of id's Hans Ulrich Besche ## Revision.id896hda_s := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 4 ].next[ 45 ] := rec( diff --git a/small/idlib/id896hda.z b/small/idlib/id896hda.z index 8cb5886aa9..55e57ac551 100644 --- a/small/idlib/id896hda.z +++ b/small/idlib/id896hda.z @@ -3,7 +3,7 @@ #W id896hda.z GAP library of id's Hans Ulrich Besche ## Revision.id896hda_z := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 8 ].next[ 4 ].next[ 52 ] := rec( diff --git a/small/idlib/id896j.b b/small/idlib/id896j.b index 6e935fe984..2b7f4e7dc2 100644 --- a/small/idlib/id896j.b +++ b/small/idlib/id896j.b @@ -3,7 +3,7 @@ #W id896j.b GAP library of id's Hans Ulrich Besche ## Revision.id896j_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ] := rec( diff --git a/small/idlib/id896j.c b/small/idlib/id896j.c index d74b1bdad8..8cacd01548 100644 --- a/small/idlib/id896j.c +++ b/small/idlib/id896j.c @@ -3,7 +3,7 @@ #W id896j.c GAP library of id's Hans Ulrich Besche ## Revision.id896j_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 3 ] := rec( diff --git a/small/idlib/id896j.d b/small/idlib/id896j.d index 51e5422a6d..8ebd22fe08 100644 --- a/small/idlib/id896j.d +++ b/small/idlib/id896j.d @@ -3,7 +3,7 @@ #W id896j.d GAP library of id's Hans Ulrich Besche ## Revision.id896j_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ] := rec( diff --git a/small/idlib/id896j.e b/small/idlib/id896j.e index 620ebbe2b0..bf263f37a6 100644 --- a/small/idlib/id896j.e +++ b/small/idlib/id896j.e @@ -3,7 +3,7 @@ #W id896j.e GAP library of id's Hans Ulrich Besche ## Revision.id896j_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 5 ] := rec( diff --git a/small/idlib/id896j.f b/small/idlib/id896j.f index 4cba564585..d6b6a5dc1a 100644 --- a/small/idlib/id896j.f +++ b/small/idlib/id896j.f @@ -3,7 +3,7 @@ #W id896j.f GAP library of id's Hans Ulrich Besche ## Revision.id896j_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 6 ] := rec( diff --git a/small/idlib/id896jb.a b/small/idlib/id896jb.a index 2d80b64350..2033315fb6 100644 --- a/small/idlib/id896jb.a +++ b/small/idlib/id896jb.a @@ -3,7 +3,7 @@ #W id896jb.a GAP library of id's Hans Ulrich Besche ## Revision.id896jb_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 1 ] := rec( diff --git a/small/idlib/id896jb.b b/small/idlib/id896jb.b index 53f28b32da..a70c8e3dde 100644 --- a/small/idlib/id896jb.b +++ b/small/idlib/id896jb.b @@ -3,7 +3,7 @@ #W id896jb.b GAP library of id's Hans Ulrich Besche ## Revision.id896jb_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 2 ] := rec( diff --git a/small/idlib/id896jb.c b/small/idlib/id896jb.c index bb41f2b50b..ccbf2aa2eb 100644 --- a/small/idlib/id896jb.c +++ b/small/idlib/id896jb.c @@ -3,7 +3,7 @@ #W id896jb.c GAP library of id's Hans Ulrich Besche ## Revision.id896jb_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 3 ] := rec( diff --git a/small/idlib/id896jb.d b/small/idlib/id896jb.d index 21efc64a03..08f90d2d22 100644 --- a/small/idlib/id896jb.d +++ b/small/idlib/id896jb.d @@ -3,7 +3,7 @@ #W id896jb.d GAP library of id's Hans Ulrich Besche ## Revision.id896jb_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 4 ] := rec( diff --git a/small/idlib/id896jb.i b/small/idlib/id896jb.i index 62da033791..b6042f907f 100644 --- a/small/idlib/id896jb.i +++ b/small/idlib/id896jb.i @@ -3,7 +3,7 @@ #W id896jb.i GAP library of id's Hans Ulrich Besche ## Revision.id896jb_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 9 ] := rec( diff --git a/small/idlib/id896jb.j b/small/idlib/id896jb.j index 88cd6fd1dc..3bfb8333bf 100644 --- a/small/idlib/id896jb.j +++ b/small/idlib/id896jb.j @@ -3,7 +3,7 @@ #W id896jb.j GAP library of id's Hans Ulrich Besche ## Revision.id896jb_j := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 10 ] := rec( diff --git a/small/idlib/id896jb.k b/small/idlib/id896jb.k index a6eb7758ca..21018ff2a6 100644 --- a/small/idlib/id896jb.k +++ b/small/idlib/id896jb.k @@ -3,7 +3,7 @@ #W id896jb.k GAP library of id's Hans Ulrich Besche ## Revision.id896jb_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 11 ] := rec( diff --git a/small/idlib/id896jb.l b/small/idlib/id896jb.l index f03a3d24cc..49e7ac759f 100644 --- a/small/idlib/id896jb.l +++ b/small/idlib/id896jb.l @@ -3,7 +3,7 @@ #W id896jb.l GAP library of id's Hans Ulrich Besche ## Revision.id896jb_l := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 12 ] := rec( diff --git a/small/idlib/id896jb.r b/small/idlib/id896jb.r index 1f84d7ae71..a6167919dc 100644 --- a/small/idlib/id896jb.r +++ b/small/idlib/id896jb.r @@ -3,7 +3,7 @@ #W id896jb.r GAP library of id's Hans Ulrich Besche ## Revision.id896jb_r := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 18 ] := rec( diff --git a/small/idlib/id896jb.s b/small/idlib/id896jb.s index 79ffd9476b..44fcbb8393 100644 --- a/small/idlib/id896jb.s +++ b/small/idlib/id896jb.s @@ -3,7 +3,7 @@ #W id896jb.s GAP library of id's Hans Ulrich Besche ## Revision.id896jb_s := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 19 ] := rec( diff --git a/small/idlib/id896jb.t b/small/idlib/id896jb.t index a2152678d6..a2ab7f017b 100644 --- a/small/idlib/id896jb.t +++ b/small/idlib/id896jb.t @@ -3,7 +3,7 @@ #W id896jb.t GAP library of id's Hans Ulrich Besche ## Revision.id896jb_t := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 20 ] := rec( diff --git a/small/idlib/id896jb.u b/small/idlib/id896jb.u index ab317b81c4..00a513c054 100644 --- a/small/idlib/id896jb.u +++ b/small/idlib/id896jb.u @@ -3,7 +3,7 @@ #W id896jb.u GAP library of id's Hans Ulrich Besche ## Revision.id896jb_u := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 21 ] := rec( diff --git a/small/idlib/id896jba.a b/small/idlib/id896jba.a index 125298be2b..d18fec352d 100644 --- a/small/idlib/id896jba.a +++ b/small/idlib/id896jba.a @@ -3,7 +3,7 @@ #W id896jba.a GAP library of id's Hans Ulrich Besche ## Revision.id896jba_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 27 ] := rec( diff --git a/small/idlib/id896jba.b b/small/idlib/id896jba.b index 95fe89bb38..1d612f383a 100644 --- a/small/idlib/id896jba.b +++ b/small/idlib/id896jba.b @@ -3,7 +3,7 @@ #W id896jba.b GAP library of id's Hans Ulrich Besche ## Revision.id896jba_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 28 ] := rec( diff --git a/small/idlib/id896jba.c b/small/idlib/id896jba.c index f10da09004..81196a76fb 100644 --- a/small/idlib/id896jba.c +++ b/small/idlib/id896jba.c @@ -3,7 +3,7 @@ #W id896jba.c GAP library of id's Hans Ulrich Besche ## Revision.id896jba_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 29 ] := rec( diff --git a/small/idlib/id896jba.f b/small/idlib/id896jba.f index a5c2ac8c8b..45df2f4409 100644 --- a/small/idlib/id896jba.f +++ b/small/idlib/id896jba.f @@ -3,7 +3,7 @@ #W id896jba.f GAP library of id's Hans Ulrich Besche ## Revision.id896jba_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 1 ].next[ 6 ] := rec( diff --git a/small/idlib/id896jba.l b/small/idlib/id896jba.l index 4856a54615..de92459482 100644 --- a/small/idlib/id896jba.l +++ b/small/idlib/id896jba.l @@ -3,7 +3,7 @@ #W id896jba.l GAP library of id's Hans Ulrich Besche ## Revision.id896jba_l := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 1 ].next[ 12 ] := rec( diff --git a/small/idlib/id896jba.m b/small/idlib/id896jba.m index 85091435f9..403fdb9aa7 100644 --- a/small/idlib/id896jba.m +++ b/small/idlib/id896jba.m @@ -3,7 +3,7 @@ #W id896jba.m GAP library of id's Hans Ulrich Besche ## Revision.id896jba_m := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 1 ].next[ 13 ] := rec( diff --git a/small/idlib/id896jba.o b/small/idlib/id896jba.o index ef54784771..2ace94bd16 100644 --- a/small/idlib/id896jba.o +++ b/small/idlib/id896jba.o @@ -3,7 +3,7 @@ #W id896jba.o GAP library of id's Hans Ulrich Besche ## Revision.id896jba_o := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 1 ].next[ 15 ] := rec( diff --git a/small/idlib/id896jbb.aj b/small/idlib/id896jbb.aj index d5b5523bd7..e5abccd199 100644 --- a/small/idlib/id896jbb.aj +++ b/small/idlib/id896jbb.aj @@ -3,7 +3,7 @@ #W id896jbb.aj GAP library of id's Hans Ulrich Besche ## Revision.id896jbb_aj := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 2 ].next[ 36 ] := rec( diff --git a/small/idlib/id896jbb.k b/small/idlib/id896jbb.k index 569c31f122..b8e9d209c1 100644 --- a/small/idlib/id896jbb.k +++ b/small/idlib/id896jbb.k @@ -3,7 +3,7 @@ #W id896jbb.k GAP library of id's Hans Ulrich Besche ## Revision.id896jbb_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 2 ].next[ 11 ] := rec( diff --git a/small/idlib/id896jbb.n b/small/idlib/id896jbb.n index 6b828e6919..272d0dd13d 100644 --- a/small/idlib/id896jbb.n +++ b/small/idlib/id896jbb.n @@ -3,7 +3,7 @@ #W id896jbb.n GAP library of id's Hans Ulrich Besche ## Revision.id896jbb_n := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 2 ].next[ 14 ] := rec( diff --git a/small/idlib/id896jbb.w b/small/idlib/id896jbb.w index edf2dfa038..feb934c03a 100644 --- a/small/idlib/id896jbb.w +++ b/small/idlib/id896jbb.w @@ -3,7 +3,7 @@ #W id896jbb.w GAP library of id's Hans Ulrich Besche ## Revision.id896jbb_w := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 2 ].next[ 23 ] := rec( diff --git a/small/idlib/id896jbb.x b/small/idlib/id896jbb.x index 5630625e46..4fbc24b5f6 100644 --- a/small/idlib/id896jbb.x +++ b/small/idlib/id896jbb.x @@ -3,7 +3,7 @@ #W id896jbb.x GAP library of id's Hans Ulrich Besche ## Revision.id896jbb_x := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 2 ].next[ 24 ] := rec( diff --git a/small/idlib/id896jbb.y b/small/idlib/id896jbb.y index 2a3706827f..42851e7d61 100644 --- a/small/idlib/id896jbb.y +++ b/small/idlib/id896jbb.y @@ -3,7 +3,7 @@ #W id896jbb.y GAP library of id's Hans Ulrich Besche ## Revision.id896jbb_y := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 2 ].next[ 25 ] := rec( diff --git a/small/idlib/id896jbi.aa b/small/idlib/id896jbi.aa index 7bcd7829be..806de9418b 100644 --- a/small/idlib/id896jbi.aa +++ b/small/idlib/id896jbi.aa @@ -3,7 +3,7 @@ #W id896jbi.aa GAP library of id's Hans Ulrich Besche ## Revision.id896jbi_aa := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 9 ].next[ 27 ] := rec( diff --git a/small/idlib/id896jbi.g b/small/idlib/id896jbi.g index 279abfc5f1..969f03ac00 100644 --- a/small/idlib/id896jbi.g +++ b/small/idlib/id896jbi.g @@ -3,7 +3,7 @@ #W id896jbi.g GAP library of id's Hans Ulrich Besche ## Revision.id896jbi_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 9 ].next[ 7 ] := rec( diff --git a/small/idlib/id896jbi.q b/small/idlib/id896jbi.q index 48bfc56547..c2d066241d 100644 --- a/small/idlib/id896jbi.q +++ b/small/idlib/id896jbi.q @@ -3,7 +3,7 @@ #W id896jbi.q GAP library of id's Hans Ulrich Besche ## Revision.id896jbi_q := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 9 ].next[ 17 ] := rec( diff --git a/small/idlib/id896jbi.r b/small/idlib/id896jbi.r index 90687d5a85..b77180b631 100644 --- a/small/idlib/id896jbi.r +++ b/small/idlib/id896jbi.r @@ -3,7 +3,7 @@ #W id896jbi.r GAP library of id's Hans Ulrich Besche ## Revision.id896jbi_r := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 9 ].next[ 18 ] := rec( diff --git a/small/idlib/id896jbi.w b/small/idlib/id896jbi.w index 2dc2f5e60b..20baa3ec5a 100644 --- a/small/idlib/id896jbi.w +++ b/small/idlib/id896jbi.w @@ -3,7 +3,7 @@ #W id896jbi.w GAP library of id's Hans Ulrich Besche ## Revision.id896jbi_w := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 9 ].next[ 23 ] := rec( diff --git a/small/idlib/id896jbj.ag b/small/idlib/id896jbj.ag index f8fdb04545..a71d6b096d 100644 --- a/small/idlib/id896jbj.ag +++ b/small/idlib/id896jbj.ag @@ -3,7 +3,7 @@ #W id896jbj.ag GAP library of id's Hans Ulrich Besche ## Revision.id896jbj_ag := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 10 ].next[ 33 ] := rec( diff --git a/small/idlib/id896jbj.bh b/small/idlib/id896jbj.bh index 69f9fdcb2e..21d2eb5701 100644 --- a/small/idlib/id896jbj.bh +++ b/small/idlib/id896jbj.bh @@ -3,7 +3,7 @@ #W id896jbj.bh GAP library of id's Hans Ulrich Besche ## Revision.id896jbj_bh := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 10 ].next[ 60 ] := rec( diff --git a/small/idlib/id896jbj.r b/small/idlib/id896jbj.r index b4a139cd3d..512c0cca97 100644 --- a/small/idlib/id896jbj.r +++ b/small/idlib/id896jbj.r @@ -3,7 +3,7 @@ #W id896jbj.r GAP library of id's Hans Ulrich Besche ## Revision.id896jbj_r := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 10 ].next[ 18 ] := rec( diff --git a/small/idlib/id896jbr.ac b/small/idlib/id896jbr.ac index 05389b8c8a..b58fc76735 100644 --- a/small/idlib/id896jbr.ac +++ b/small/idlib/id896jbr.ac @@ -3,7 +3,7 @@ #W id896jbr.ac GAP library of id's Hans Ulrich Besche ## Revision.id896jbr_ac := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 2 ].next[ 18 ].next[ 29 ] := rec( diff --git a/small/idlib/id896jc.a b/small/idlib/id896jc.a index 7d43fde043..72336df1d2 100644 --- a/small/idlib/id896jc.a +++ b/small/idlib/id896jc.a @@ -3,7 +3,7 @@ #W id896jc.a GAP library of id's Hans Ulrich Besche ## Revision.id896jc_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 3 ].next[ 1 ] := rec( diff --git a/small/idlib/id896jc.f b/small/idlib/id896jc.f index baf63dda36..d2dd9ea35c 100644 --- a/small/idlib/id896jc.f +++ b/small/idlib/id896jc.f @@ -3,7 +3,7 @@ #W id896jc.f GAP library of id's Hans Ulrich Besche ## Revision.id896jc_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 3 ].next[ 6 ] := rec( diff --git a/small/idlib/id896jc.i b/small/idlib/id896jc.i index 52655456cd..7f58996550 100644 --- a/small/idlib/id896jc.i +++ b/small/idlib/id896jc.i @@ -3,7 +3,7 @@ #W id896jc.i GAP library of id's Hans Ulrich Besche ## Revision.id896jc_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 3 ].next[ 9 ] := rec( diff --git a/small/idlib/id896jc.l b/small/idlib/id896jc.l index 6c778d1913..c9018d9e12 100644 --- a/small/idlib/id896jc.l +++ b/small/idlib/id896jc.l @@ -3,7 +3,7 @@ #W id896jc.l GAP library of id's Hans Ulrich Besche ## Revision.id896jc_l := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 3 ].next[ 12 ] := rec( diff --git a/small/idlib/id896jc.u b/small/idlib/id896jc.u index 4e2ba51cc5..93432868a6 100644 --- a/small/idlib/id896jc.u +++ b/small/idlib/id896jc.u @@ -3,7 +3,7 @@ #W id896jc.u GAP library of id's Hans Ulrich Besche ## Revision.id896jc_u := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 3 ].next[ 21 ] := rec( diff --git a/small/idlib/id896jca.d b/small/idlib/id896jca.d index 4f7cceb908..33bc3c594d 100644 --- a/small/idlib/id896jca.d +++ b/small/idlib/id896jca.d @@ -3,7 +3,7 @@ #W id896jca.d GAP library of id's Hans Ulrich Besche ## Revision.id896jca_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 3 ].next[ 30 ] := rec( diff --git a/small/idlib/id896jca.f b/small/idlib/id896jca.f index 593ef7526b..be075cc644 100644 --- a/small/idlib/id896jca.f +++ b/small/idlib/id896jca.f @@ -3,7 +3,7 @@ #W id896jca.f GAP library of id's Hans Ulrich Besche ## Revision.id896jca_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 3 ].next[ 32 ] := rec( diff --git a/small/idlib/id896jca.h b/small/idlib/id896jca.h index 86d78167aa..8088e283e4 100644 --- a/small/idlib/id896jca.h +++ b/small/idlib/id896jca.h @@ -3,7 +3,7 @@ #W id896jca.h GAP library of id's Hans Ulrich Besche ## Revision.id896jca_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 3 ].next[ 34 ] := rec( diff --git a/small/idlib/id896jd.b b/small/idlib/id896jd.b index c73d300106..2361ba8202 100644 --- a/small/idlib/id896jd.b +++ b/small/idlib/id896jd.b @@ -3,7 +3,7 @@ #W id896jd.b GAP library of id's Hans Ulrich Besche ## Revision.id896jd_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 2 ] := rec( diff --git a/small/idlib/id896jd.l b/small/idlib/id896jd.l index 601761c1c1..add39dd5bb 100644 --- a/small/idlib/id896jd.l +++ b/small/idlib/id896jd.l @@ -3,7 +3,7 @@ #W id896jd.l GAP library of id's Hans Ulrich Besche ## Revision.id896jd_l := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 12 ] := rec( diff --git a/small/idlib/id896jd.n b/small/idlib/id896jd.n index d9c0cf7044..4a56c142e2 100644 --- a/small/idlib/id896jd.n +++ b/small/idlib/id896jd.n @@ -3,7 +3,7 @@ #W id896jd.n GAP library of id's Hans Ulrich Besche ## Revision.id896jd_n := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 14 ] := rec( diff --git a/small/idlib/id896jd.s b/small/idlib/id896jd.s index 535711ad87..ba5f6866cd 100644 --- a/small/idlib/id896jd.s +++ b/small/idlib/id896jd.s @@ -3,7 +3,7 @@ #W id896jd.s GAP library of id's Hans Ulrich Besche ## Revision.id896jd_s := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 19 ] := rec( diff --git a/small/idlib/id896jd.u b/small/idlib/id896jd.u index e27c878e9a..015816b2cc 100644 --- a/small/idlib/id896jd.u +++ b/small/idlib/id896jd.u @@ -3,7 +3,7 @@ #W id896jd.u GAP library of id's Hans Ulrich Besche ## Revision.id896jd_u := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 21 ] := rec( diff --git a/small/idlib/id896jd.x b/small/idlib/id896jd.x index 9100651428..ac55d7dce0 100644 --- a/small/idlib/id896jd.x +++ b/small/idlib/id896jd.x @@ -3,7 +3,7 @@ #W id896jd.x GAP library of id's Hans Ulrich Besche ## Revision.id896jd_x := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 24 ] := rec( diff --git a/small/idlib/id896jd.z b/small/idlib/id896jd.z index 17f6466483..84e43173de 100644 --- a/small/idlib/id896jd.z +++ b/small/idlib/id896jd.z @@ -3,7 +3,7 @@ #W id896jd.z GAP library of id's Hans Ulrich Besche ## Revision.id896jd_z := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 26 ] := rec( diff --git a/small/idlib/id896jda.c b/small/idlib/id896jda.c index d855f9915d..201da8e4a0 100644 --- a/small/idlib/id896jda.c +++ b/small/idlib/id896jda.c @@ -3,7 +3,7 @@ #W id896jda.c GAP library of id's Hans Ulrich Besche ## Revision.id896jda_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 29 ] := rec( diff --git a/small/idlib/id896jda.h b/small/idlib/id896jda.h index 718e5f39c6..37d3f8e82e 100644 --- a/small/idlib/id896jda.h +++ b/small/idlib/id896jda.h @@ -3,7 +3,7 @@ #W id896jda.h GAP library of id's Hans Ulrich Besche ## Revision.id896jda_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 34 ] := rec( diff --git a/small/idlib/id896jda.n b/small/idlib/id896jda.n index eb15aaa3d7..b4641df1fd 100644 --- a/small/idlib/id896jda.n +++ b/small/idlib/id896jda.n @@ -3,7 +3,7 @@ #W id896jda.n GAP library of id's Hans Ulrich Besche ## Revision.id896jda_n := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 40 ] := rec( diff --git a/small/idlib/id896jda.r b/small/idlib/id896jda.r index 518131381d..69cf0d59bf 100644 --- a/small/idlib/id896jda.r +++ b/small/idlib/id896jda.r @@ -3,7 +3,7 @@ #W id896jda.r GAP library of id's Hans Ulrich Besche ## Revision.id896jda_r := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 44 ] := rec( diff --git a/small/idlib/id896jda.u b/small/idlib/id896jda.u index a7b4fd654e..3c770a7d64 100644 --- a/small/idlib/id896jda.u +++ b/small/idlib/id896jda.u @@ -3,7 +3,7 @@ #W id896jda.u GAP library of id's Hans Ulrich Besche ## Revision.id896jda_u := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 47 ] := rec( diff --git a/small/idlib/id896jda.y b/small/idlib/id896jda.y index 59935d215d..c68d1cf746 100644 --- a/small/idlib/id896jda.y +++ b/small/idlib/id896jda.y @@ -3,7 +3,7 @@ #W id896jda.y GAP library of id's Hans Ulrich Besche ## Revision.id896jda_y := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 51 ] := rec( diff --git a/small/idlib/id896jda.z b/small/idlib/id896jda.z index 38d146d786..8678fb0cf5 100644 --- a/small/idlib/id896jda.z +++ b/small/idlib/id896jda.z @@ -3,7 +3,7 @@ #W id896jda.z GAP library of id's Hans Ulrich Besche ## Revision.id896jda_z := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 52 ] := rec( diff --git a/small/idlib/id896jdb.f b/small/idlib/id896jdb.f index 2bdaffcdc1..94ea0b33e3 100644 --- a/small/idlib/id896jdb.f +++ b/small/idlib/id896jdb.f @@ -3,7 +3,7 @@ #W id896jdb.f GAP library of id's Hans Ulrich Besche ## Revision.id896jdb_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 58 ] := rec( diff --git a/small/idlib/id896jdb.k b/small/idlib/id896jdb.k index 7c0bc65c58..5b7205d909 100644 --- a/small/idlib/id896jdb.k +++ b/small/idlib/id896jdb.k @@ -3,7 +3,7 @@ #W id896jdb.k GAP library of id's Hans Ulrich Besche ## Revision.id896jdb_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 63 ] := rec( diff --git a/small/idlib/id896jdb.o b/small/idlib/id896jdb.o index 2e04dae277..c854eefb55 100644 --- a/small/idlib/id896jdb.o +++ b/small/idlib/id896jdb.o @@ -3,7 +3,7 @@ #W id896jdb.o GAP library of id's Hans Ulrich Besche ## Revision.id896jdb_o := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 67 ] := rec( diff --git a/small/idlib/id896jdb.t b/small/idlib/id896jdb.t index 7ea3818f1d..0a131e38d0 100644 --- a/small/idlib/id896jdb.t +++ b/small/idlib/id896jdb.t @@ -3,7 +3,7 @@ #W id896jdb.t GAP library of id's Hans Ulrich Besche ## Revision.id896jdb_t := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 72 ] := rec( diff --git a/small/idlib/id896jdb.w b/small/idlib/id896jdb.w index 93b4073781..d5606dc864 100644 --- a/small/idlib/id896jdb.w +++ b/small/idlib/id896jdb.w @@ -3,7 +3,7 @@ #W id896jdb.w GAP library of id's Hans Ulrich Besche ## Revision.id896jdb_w := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 75 ] := rec( diff --git a/small/idlib/id896jdb.y b/small/idlib/id896jdb.y index 89029d71d2..052869610b 100644 --- a/small/idlib/id896jdb.y +++ b/small/idlib/id896jdb.y @@ -3,7 +3,7 @@ #W id896jdb.y GAP library of id's Hans Ulrich Besche ## Revision.id896jdb_y := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 77 ] := rec( diff --git a/small/idlib/id896jdc.d b/small/idlib/id896jdc.d index 954bb17da0..d9a3a9759b 100644 --- a/small/idlib/id896jdc.d +++ b/small/idlib/id896jdc.d @@ -3,7 +3,7 @@ #W id896jdc.d GAP library of id's Hans Ulrich Besche ## Revision.id896jdc_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 82 ] := rec( diff --git a/small/idlib/id896jdc.h b/small/idlib/id896jdc.h index 1cfbb5dcb9..489af81dfd 100644 --- a/small/idlib/id896jdc.h +++ b/small/idlib/id896jdc.h @@ -3,7 +3,7 @@ #W id896jdc.h GAP library of id's Hans Ulrich Besche ## Revision.id896jdc_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 86 ] := rec( diff --git a/small/idlib/id896jdc.l b/small/idlib/id896jdc.l index e66911bc13..0977bb447c 100644 --- a/small/idlib/id896jdc.l +++ b/small/idlib/id896jdc.l @@ -3,7 +3,7 @@ #W id896jdc.l GAP library of id's Hans Ulrich Besche ## Revision.id896jdc_l := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 90 ] := rec( diff --git a/small/idlib/id896jdc.o b/small/idlib/id896jdc.o index 4d8dcd3be1..cef9bf87e4 100644 --- a/small/idlib/id896jdc.o +++ b/small/idlib/id896jdc.o @@ -3,7 +3,7 @@ #W id896jdc.o GAP library of id's Hans Ulrich Besche ## Revision.id896jdc_o := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 93 ] := rec( diff --git a/small/idlib/id896jdc.t b/small/idlib/id896jdc.t index cac81c6e97..cb35257d80 100644 --- a/small/idlib/id896jdc.t +++ b/small/idlib/id896jdc.t @@ -3,7 +3,7 @@ #W id896jdc.t GAP library of id's Hans Ulrich Besche ## Revision.id896jdc_t := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 98 ] := rec( diff --git a/small/idlib/id896jdc.u b/small/idlib/id896jdc.u index 3f1e86b7c3..cd79b1ae58 100644 --- a/small/idlib/id896jdc.u +++ b/small/idlib/id896jdc.u @@ -3,7 +3,7 @@ #W id896jdc.u GAP library of id's Hans Ulrich Besche ## Revision.id896jdc_u := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 99 ] := rec( diff --git a/small/idlib/id896jdc.w b/small/idlib/id896jdc.w index 253b33ce75..2bfa1cee01 100644 --- a/small/idlib/id896jdc.w +++ b/small/idlib/id896jdc.w @@ -3,7 +3,7 @@ #W id896jdc.w GAP library of id's Hans Ulrich Besche ## Revision.id896jdc_w := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 101 ] := rec( diff --git a/small/idlib/id896jdd.b b/small/idlib/id896jdd.b index e104124116..945aa34d10 100644 --- a/small/idlib/id896jdd.b +++ b/small/idlib/id896jdd.b @@ -3,7 +3,7 @@ #W id896jdd.b GAP library of id's Hans Ulrich Besche ## Revision.id896jdd_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 106 ] := rec( diff --git a/small/idlib/id896jdd.g b/small/idlib/id896jdd.g index aeea99ed3c..c0d3ce8de1 100644 --- a/small/idlib/id896jdd.g +++ b/small/idlib/id896jdd.g @@ -3,7 +3,7 @@ #W id896jdd.g GAP library of id's Hans Ulrich Besche ## Revision.id896jdd_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 111 ] := rec( diff --git a/small/idlib/id896jdd.k b/small/idlib/id896jdd.k index 8172670f5f..010e18f1c3 100644 --- a/small/idlib/id896jdd.k +++ b/small/idlib/id896jdd.k @@ -3,7 +3,7 @@ #W id896jdd.k GAP library of id's Hans Ulrich Besche ## Revision.id896jdd_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 115 ] := rec( diff --git a/small/idlib/id896jdd.o b/small/idlib/id896jdd.o index 31f64de192..e489025dd7 100644 --- a/small/idlib/id896jdd.o +++ b/small/idlib/id896jdd.o @@ -3,7 +3,7 @@ #W id896jdd.o GAP library of id's Hans Ulrich Besche ## Revision.id896jdd_o := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 119 ] := rec( diff --git a/small/idlib/id896jdd.q b/small/idlib/id896jdd.q index f57f51aaaf..94f0bd076e 100644 --- a/small/idlib/id896jdd.q +++ b/small/idlib/id896jdd.q @@ -3,7 +3,7 @@ #W id896jdd.q GAP library of id's Hans Ulrich Besche ## Revision.id896jdd_q := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 121 ] := rec( diff --git a/small/idlib/id896jdd.r b/small/idlib/id896jdd.r index 32fc91b471..4cf84d7f68 100644 --- a/small/idlib/id896jdd.r +++ b/small/idlib/id896jdd.r @@ -3,7 +3,7 @@ #W id896jdd.r GAP library of id's Hans Ulrich Besche ## Revision.id896jdd_r := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 122 ] := rec( diff --git a/small/idlib/id896jdd.u b/small/idlib/id896jdd.u index c070c108f2..6c87f52343 100644 --- a/small/idlib/id896jdd.u +++ b/small/idlib/id896jdd.u @@ -3,7 +3,7 @@ #W id896jdd.u GAP library of id's Hans Ulrich Besche ## Revision.id896jdd_u := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 125 ] := rec( diff --git a/small/idlib/id896jdd.z b/small/idlib/id896jdd.z index e445bfe24f..7ec6d1f4a8 100644 --- a/small/idlib/id896jdd.z +++ b/small/idlib/id896jdd.z @@ -3,7 +3,7 @@ #W id896jdd.z GAP library of id's Hans Ulrich Besche ## Revision.id896jdd_z := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 130 ] := rec( diff --git a/small/idlib/id896jde.h b/small/idlib/id896jde.h index 625ee4f367..9ad81c2c8a 100644 --- a/small/idlib/id896jde.h +++ b/small/idlib/id896jde.h @@ -3,7 +3,7 @@ #W id896jde.h GAP library of id's Hans Ulrich Besche ## Revision.id896jde_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 138 ] := rec( diff --git a/small/idlib/id896jde.k b/small/idlib/id896jde.k index 26cc924995..24e628da96 100644 --- a/small/idlib/id896jde.k +++ b/small/idlib/id896jde.k @@ -3,7 +3,7 @@ #W id896jde.k GAP library of id's Hans Ulrich Besche ## Revision.id896jde_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 141 ] := rec( diff --git a/small/idlib/id896jde.m b/small/idlib/id896jde.m index d2b697ec95..7df44b921f 100644 --- a/small/idlib/id896jde.m +++ b/small/idlib/id896jde.m @@ -3,7 +3,7 @@ #W id896jde.m GAP library of id's Hans Ulrich Besche ## Revision.id896jde_m := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 143 ] := rec( diff --git a/small/idlib/id896jde.x b/small/idlib/id896jde.x index 81f03f8d8a..1bc5504c45 100644 --- a/small/idlib/id896jde.x +++ b/small/idlib/id896jde.x @@ -3,7 +3,7 @@ #W id896jde.x GAP library of id's Hans Ulrich Besche ## Revision.id896jde_x := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 154 ] := rec( diff --git a/small/idlib/id896jdf.f b/small/idlib/id896jdf.f index 31507c1d2e..aab431afae 100644 --- a/small/idlib/id896jdf.f +++ b/small/idlib/id896jdf.f @@ -3,7 +3,7 @@ #W id896jdf.f GAP library of id's Hans Ulrich Besche ## Revision.id896jdf_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 10 ].next[ 4 ].next[ 162 ] := rec( diff --git a/small/idlib/id896l.b b/small/idlib/id896l.b index d59a28eb0e..fedd5a8375 100644 --- a/small/idlib/id896l.b +++ b/small/idlib/id896l.b @@ -3,7 +3,7 @@ #W id896l.b GAP library of id's Hans Ulrich Besche ## Revision.id896l_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 12 ].next[ 2 ] := rec( diff --git a/small/idlib/id896l.c b/small/idlib/id896l.c index a6a3e4522f..225059bc60 100644 --- a/small/idlib/id896l.c +++ b/small/idlib/id896l.c @@ -3,7 +3,7 @@ #W id896l.c GAP library of id's Hans Ulrich Besche ## Revision.id896l_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 12 ].next[ 3 ] := rec( diff --git a/small/idlib/id896l.d b/small/idlib/id896l.d index d6000890a2..7ba2535298 100644 --- a/small/idlib/id896l.d +++ b/small/idlib/id896l.d @@ -3,7 +3,7 @@ #W id896l.d GAP library of id's Hans Ulrich Besche ## Revision.id896l_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 12 ].next[ 4 ] := rec( diff --git a/small/idlib/id896l.e b/small/idlib/id896l.e index 8de6475851..192ddb1ddb 100644 --- a/small/idlib/id896l.e +++ b/small/idlib/id896l.e @@ -3,7 +3,7 @@ #W id896l.e GAP library of id's Hans Ulrich Besche ## Revision.id896l_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 12 ].next[ 5 ] := rec( diff --git a/small/idlib/id896lca.a b/small/idlib/id896lca.a index e61f13ff34..c539f5ace9 100644 --- a/small/idlib/id896lca.a +++ b/small/idlib/id896lca.a @@ -3,7 +3,7 @@ #W id896lca.a GAP library of id's Hans Ulrich Besche ## Revision.id896lca_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 896 ].next[ 12 ].next[ 3 ].next[ 27 ] := rec( diff --git a/small/idlib/id90.0 b/small/idlib/id90.0 index 81a2aa2de8..f1ce9f86fb 100644 --- a/small/idlib/id90.0 +++ b/small/idlib/id90.0 @@ -3,7 +3,7 @@ #W id90.0 GAP library of id's Hans Ulrich Besche ## Revision.id90_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 900 ] := rec( diff --git a/small/idlib/id90.4 b/small/idlib/id90.4 index 0a8be23f76..c6c092f058 100644 --- a/small/idlib/id90.4 +++ b/small/idlib/id90.4 @@ -3,7 +3,7 @@ #W id90.4 GAP library of id's Hans Ulrich Besche ## Revision.id90_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 904 ] := rec( diff --git a/small/idlib/id91.0 b/small/idlib/id91.0 index 6d8d1ca149..c2929bb6b3 100644 --- a/small/idlib/id91.0 +++ b/small/idlib/id91.0 @@ -3,7 +3,7 @@ #W id91.0 GAP library of id's Hans Ulrich Besche ## Revision.id91_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 910 ] := rec( diff --git a/small/idlib/id91.2 b/small/idlib/id91.2 index 73e4800830..b3fad00c3c 100644 --- a/small/idlib/id91.2 +++ b/small/idlib/id91.2 @@ -3,7 +3,7 @@ #W id91.2 GAP library of id's Hans Ulrich Besche ## Revision.id91_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 912 ] := rec( diff --git a/small/idlib/id91.8 b/small/idlib/id91.8 index 7d705a521b..171372bfc4 100644 --- a/small/idlib/id91.8 +++ b/small/idlib/id91.8 @@ -3,7 +3,7 @@ #W id91.8 GAP library of id's Hans Ulrich Besche ## Revision.id91_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 918 ] := rec( diff --git a/small/idlib/id92.0 b/small/idlib/id92.0 index 454dc02b99..acdbe8cb59 100644 --- a/small/idlib/id92.0 +++ b/small/idlib/id92.0 @@ -3,7 +3,7 @@ #W id92.0 GAP library of id's Hans Ulrich Besche ## Revision.id92_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 920 ] := rec( diff --git a/small/idlib/id92.4 b/small/idlib/id92.4 index a91bfcb715..ed87dae5e4 100644 --- a/small/idlib/id92.4 +++ b/small/idlib/id92.4 @@ -3,7 +3,7 @@ #W id92.4 GAP library of id's Hans Ulrich Besche ## Revision.id92_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 924 ] := rec( diff --git a/small/idlib/id92.8 b/small/idlib/id92.8 index 7275742ab5..0d695d898d 100644 --- a/small/idlib/id92.8 +++ b/small/idlib/id92.8 @@ -3,7 +3,7 @@ #W id92.8 GAP library of id's Hans Ulrich Besche ## Revision.id92_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 928 ] := rec( diff --git a/small/idlib/id93.0 b/small/idlib/id93.0 index 904d100b10..57875c1f5f 100644 --- a/small/idlib/id93.0 +++ b/small/idlib/id93.0 @@ -3,7 +3,7 @@ #W id93.0 GAP library of id's Hans Ulrich Besche ## Revision.id93_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 930 ] := rec( diff --git a/small/idlib/id93.6 b/small/idlib/id93.6 index 58589b7f18..6de680de60 100644 --- a/small/idlib/id93.6 +++ b/small/idlib/id93.6 @@ -3,7 +3,7 @@ #W id93.6 GAP library of id's Hans Ulrich Besche ## Revision.id93_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 936 ] := rec( diff --git a/small/idlib/id94.0 b/small/idlib/id94.0 index 8265f9b823..a9465a9b2b 100644 --- a/small/idlib/id94.0 +++ b/small/idlib/id94.0 @@ -3,7 +3,7 @@ #W id94.0 GAP library of id's Hans Ulrich Besche ## Revision.id94_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 940 ] := rec( diff --git a/small/idlib/id94.4 b/small/idlib/id94.4 index b178602b50..0b9a41f822 100644 --- a/small/idlib/id94.4 +++ b/small/idlib/id94.4 @@ -3,7 +3,7 @@ #W id94.4 GAP library of id's Hans Ulrich Besche ## Revision.id94_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 944 ] := rec( diff --git a/small/idlib/id94.5 b/small/idlib/id94.5 index c69aa9324a..c01e924986 100644 --- a/small/idlib/id94.5 +++ b/small/idlib/id94.5 @@ -3,7 +3,7 @@ #W id94.5 GAP library of id's Hans Ulrich Besche ## Revision.id94_5 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 945 ] := rec( diff --git a/small/idlib/id94.8 b/small/idlib/id94.8 index 9b3bac508a..6964bb3f28 100644 --- a/small/idlib/id94.8 +++ b/small/idlib/id94.8 @@ -3,7 +3,7 @@ #W id94.8 GAP library of id's Hans Ulrich Besche ## Revision.id94_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 948 ] := rec( diff --git a/small/idlib/id95.0 b/small/idlib/id95.0 index 628bd7b9d6..a2cfdb954c 100644 --- a/small/idlib/id95.0 +++ b/small/idlib/id95.0 @@ -3,7 +3,7 @@ #W id95.0 GAP library of id's Hans Ulrich Besche ## Revision.id95_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 950 ] := rec( diff --git a/small/idlib/id95.2 b/small/idlib/id95.2 index 04d3b5ff9b..a9f19ca8a4 100644 --- a/small/idlib/id95.2 +++ b/small/idlib/id95.2 @@ -3,7 +3,7 @@ #W id95.2 GAP library of id's Hans Ulrich Besche ## Revision.id95_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 952 ] := rec( diff --git a/small/idlib/id95.4 b/small/idlib/id95.4 index 001d2eb0ec..7553620026 100644 --- a/small/idlib/id95.4 +++ b/small/idlib/id95.4 @@ -3,7 +3,7 @@ #W id95.4 GAP library of id's Hans Ulrich Besche ## Revision.id95_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 954 ] := rec( diff --git a/small/idlib/id96.0 b/small/idlib/id96.0 index f94961e44d..05e925cab4 100644 --- a/small/idlib/id96.0 +++ b/small/idlib/id96.0 @@ -3,7 +3,7 @@ #W id96.0 GAP library of id's Hans Ulrich Besche ## Revision.id96_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ] := rec( diff --git a/small/idlib/id96.6 b/small/idlib/id96.6 index f29471879d..28586eb261 100644 --- a/small/idlib/id96.6 +++ b/small/idlib/id96.6 @@ -3,7 +3,7 @@ #W id96.6 GAP library of id's Hans Ulrich Besche ## Revision.id96_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 966 ] := rec( diff --git a/small/idlib/id96.8 b/small/idlib/id96.8 index f0ebadccea..0f3b581175 100644 --- a/small/idlib/id96.8 +++ b/small/idlib/id96.8 @@ -3,7 +3,7 @@ #W id96.8 GAP library of id's Hans Ulrich Besche ## Revision.id96_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 968 ] := rec( diff --git a/small/idlib/id960.e b/small/idlib/id960.e index b094133576..61b08f3188 100644 --- a/small/idlib/id960.e +++ b/small/idlib/id960.e @@ -3,7 +3,7 @@ #W id960.e GAP library of id's Hans Ulrich Besche ## Revision.id960_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 5 ] := rec( diff --git a/small/idlib/id960.h b/small/idlib/id960.h index 375ccd481b..c3084d4e2c 100644 --- a/small/idlib/id960.h +++ b/small/idlib/id960.h @@ -3,7 +3,7 @@ #W id960.h GAP library of id's Hans Ulrich Besche ## Revision.id960_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 8 ] := rec( diff --git a/small/idlib/id960.i b/small/idlib/id960.i index 481d701daa..b6729ab0eb 100644 --- a/small/idlib/id960.i +++ b/small/idlib/id960.i @@ -3,7 +3,7 @@ #W id960.i GAP library of id's Hans Ulrich Besche ## Revision.id960_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 9 ] := rec( diff --git a/small/idlib/id960.j b/small/idlib/id960.j index a9e71229c3..a9db69b9fe 100644 --- a/small/idlib/id960.j +++ b/small/idlib/id960.j @@ -3,7 +3,7 @@ #W id960.j GAP library of id's Hans Ulrich Besche ## Revision.id960_j := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 10 ] := rec( diff --git a/small/idlib/id960.l b/small/idlib/id960.l index b248579c5f..b477844e93 100644 --- a/small/idlib/id960.l +++ b/small/idlib/id960.l @@ -3,7 +3,7 @@ #W id960.l GAP library of id's Hans Ulrich Besche ## Revision.id960_l := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 12 ] := rec( diff --git a/small/idlib/id960.m b/small/idlib/id960.m index 12315dab00..c2b1a07fd7 100644 --- a/small/idlib/id960.m +++ b/small/idlib/id960.m @@ -3,7 +3,7 @@ #W id960.m GAP library of id's Hans Ulrich Besche ## Revision.id960_m := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 13 ] := rec( diff --git a/small/idlib/id960.p b/small/idlib/id960.p index 303d13ca7f..333a399e6f 100644 --- a/small/idlib/id960.p +++ b/small/idlib/id960.p @@ -3,7 +3,7 @@ #W id960.p GAP library of id's Hans Ulrich Besche ## Revision.id960_p := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 16 ] := rec( diff --git a/small/idlib/id960.q b/small/idlib/id960.q index 4ae9163429..c46b158387 100644 --- a/small/idlib/id960.q +++ b/small/idlib/id960.q @@ -3,7 +3,7 @@ #W id960.q GAP library of id's Hans Ulrich Besche ## Revision.id960_q := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 17 ] := rec( diff --git a/small/idlib/id960.r b/small/idlib/id960.r index 35f3510a7f..f9c1e2d0ef 100644 --- a/small/idlib/id960.r +++ b/small/idlib/id960.r @@ -3,7 +3,7 @@ #W id960.r GAP library of id's Hans Ulrich Besche ## Revision.id960_r := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 18 ] := rec( diff --git a/small/idlib/id960.t b/small/idlib/id960.t index b9ab4ed591..ee9384a0ff 100644 --- a/small/idlib/id960.t +++ b/small/idlib/id960.t @@ -3,7 +3,7 @@ #W id960.t GAP library of id's Hans Ulrich Besche ## Revision.id960_t := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 20 ] := rec( diff --git a/small/idlib/id960.x b/small/idlib/id960.x index a6fcd998b1..50e66ca23e 100644 --- a/small/idlib/id960.x +++ b/small/idlib/id960.x @@ -3,7 +3,7 @@ #W id960.x GAP library of id's Hans Ulrich Besche ## Revision.id960_x := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 24 ] := rec( diff --git a/small/idlib/id960a.o b/small/idlib/id960a.o index b1601fb0f6..c796ebed69 100644 --- a/small/idlib/id960a.o +++ b/small/idlib/id960a.o @@ -3,7 +3,7 @@ #W id960a.o GAP library of id's Hans Ulrich Besche ## Revision.id960a_o := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 41 ] := rec( diff --git a/small/idlib/id960a.q b/small/idlib/id960a.q index 4502d319a5..eb4f5c10bf 100644 --- a/small/idlib/id960a.q +++ b/small/idlib/id960a.q @@ -3,7 +3,7 @@ #W id960a.q GAP library of id's Hans Ulrich Besche ## Revision.id960a_q := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 43 ] := rec( diff --git a/small/idlib/id960a.u b/small/idlib/id960a.u index 1c98af6194..1f5fb0f411 100644 --- a/small/idlib/id960a.u +++ b/small/idlib/id960a.u @@ -3,7 +3,7 @@ #W id960a.u GAP library of id's Hans Ulrich Besche ## Revision.id960a_u := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 47 ] := rec( diff --git a/small/idlib/id960l.a b/small/idlib/id960l.a index 78edf6f29f..995a1c8faa 100644 --- a/small/idlib/id960l.a +++ b/small/idlib/id960l.a @@ -3,7 +3,7 @@ #W id960l.a GAP library of id's Hans Ulrich Besche ## Revision.id960l_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 12 ].next[ 1 ] := rec( diff --git a/small/idlib/id960l.c b/small/idlib/id960l.c index 97ad885580..b56df37798 100644 --- a/small/idlib/id960l.c +++ b/small/idlib/id960l.c @@ -3,7 +3,7 @@ #W id960l.c GAP library of id's Hans Ulrich Besche ## Revision.id960l_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 12 ].next[ 3 ] := rec( diff --git a/small/idlib/id960o.b b/small/idlib/id960o.b index cb35805c9e..c72d1819f6 100644 --- a/small/idlib/id960o.b +++ b/small/idlib/id960o.b @@ -3,7 +3,7 @@ #W id960o.b GAP library of id's Hans Ulrich Besche ## Revision.id960o_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 15 ].next[ 2 ] := rec( diff --git a/small/idlib/id960o.c b/small/idlib/id960o.c index 9e5130e364..610466f57a 100644 --- a/small/idlib/id960o.c +++ b/small/idlib/id960o.c @@ -3,7 +3,7 @@ #W id960o.c GAP library of id's Hans Ulrich Besche ## Revision.id960o_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 15 ].next[ 3 ] := rec( diff --git a/small/idlib/id960o.d b/small/idlib/id960o.d index bc3318f829..302f413fe9 100644 --- a/small/idlib/id960o.d +++ b/small/idlib/id960o.d @@ -3,7 +3,7 @@ #W id960o.d GAP library of id's Hans Ulrich Besche ## Revision.id960o_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 15 ].next[ 4 ] := rec( diff --git a/small/idlib/id960p.a b/small/idlib/id960p.a index 088cf07a85..5fa54047e2 100644 --- a/small/idlib/id960p.a +++ b/small/idlib/id960p.a @@ -3,7 +3,7 @@ #W id960p.a GAP library of id's Hans Ulrich Besche ## Revision.id960p_a := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 16 ].next[ 1 ] := rec( diff --git a/small/idlib/id960p.b b/small/idlib/id960p.b index 2f0c135207..67ee242792 100644 --- a/small/idlib/id960p.b +++ b/small/idlib/id960p.b @@ -3,7 +3,7 @@ #W id960p.b GAP library of id's Hans Ulrich Besche ## Revision.id960p_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 16 ].next[ 2 ] := rec( diff --git a/small/idlib/id960q.c b/small/idlib/id960q.c index 68f1c2b434..f10533ce3e 100644 --- a/small/idlib/id960q.c +++ b/small/idlib/id960q.c @@ -3,7 +3,7 @@ #W id960q.c GAP library of id's Hans Ulrich Besche ## Revision.id960q_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 17 ].next[ 3 ] := rec( diff --git a/small/idlib/id960q.d b/small/idlib/id960q.d index 519b28f691..8486f88b84 100644 --- a/small/idlib/id960q.d +++ b/small/idlib/id960q.d @@ -3,7 +3,7 @@ #W id960q.d GAP library of id's Hans Ulrich Besche ## Revision.id960q_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 17 ].next[ 4 ] := rec( diff --git a/small/idlib/id960q.f b/small/idlib/id960q.f index 781c68c61d..5f5fdb7c2a 100644 --- a/small/idlib/id960q.f +++ b/small/idlib/id960q.f @@ -3,7 +3,7 @@ #W id960q.f GAP library of id's Hans Ulrich Besche ## Revision.id960q_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 17 ].next[ 6 ] := rec( diff --git a/small/idlib/id960q.k b/small/idlib/id960q.k index 67b6ccdab6..eb9ce9d0f5 100644 --- a/small/idlib/id960q.k +++ b/small/idlib/id960q.k @@ -3,7 +3,7 @@ #W id960q.k GAP library of id's Hans Ulrich Besche ## Revision.id960q_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 17 ].next[ 11 ] := rec( diff --git a/small/idlib/id960r.b b/small/idlib/id960r.b index 473ea9d415..61160be8d9 100644 --- a/small/idlib/id960r.b +++ b/small/idlib/id960r.b @@ -3,7 +3,7 @@ #W id960r.b GAP library of id's Hans Ulrich Besche ## Revision.id960r_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 18 ].next[ 2 ] := rec( diff --git a/small/idlib/id960r.c b/small/idlib/id960r.c index b767b71328..95d7d85305 100644 --- a/small/idlib/id960r.c +++ b/small/idlib/id960r.c @@ -3,7 +3,7 @@ #W id960r.c GAP library of id's Hans Ulrich Besche ## Revision.id960r_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 18 ].next[ 3 ] := rec( diff --git a/small/idlib/id960t.c b/small/idlib/id960t.c index 4e1c23e4a5..02deba0412 100644 --- a/small/idlib/id960t.c +++ b/small/idlib/id960t.c @@ -3,7 +3,7 @@ #W id960t.c GAP library of id's Hans Ulrich Besche ## Revision.id960t_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 20 ].next[ 3 ] := rec( diff --git a/small/idlib/id960t.d b/small/idlib/id960t.d index b130cfa61b..b691c94fe9 100644 --- a/small/idlib/id960t.d +++ b/small/idlib/id960t.d @@ -3,7 +3,7 @@ #W id960t.d GAP library of id's Hans Ulrich Besche ## Revision.id960t_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 20 ].next[ 4 ] := rec( diff --git a/small/idlib/id960t.e b/small/idlib/id960t.e index 212c8217a0..b0386b7a95 100644 --- a/small/idlib/id960t.e +++ b/small/idlib/id960t.e @@ -3,7 +3,7 @@ #W id960t.e GAP library of id's Hans Ulrich Besche ## Revision.id960t_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 20 ].next[ 5 ] := rec( diff --git a/small/idlib/id960t.f b/small/idlib/id960t.f index 7d69b34ed1..386e066cdb 100644 --- a/small/idlib/id960t.f +++ b/small/idlib/id960t.f @@ -3,7 +3,7 @@ #W id960t.f GAP library of id's Hans Ulrich Besche ## Revision.id960t_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 20 ].next[ 6 ] := rec( diff --git a/small/idlib/id960t.j b/small/idlib/id960t.j index b44cdddf23..bf2f97e91a 100644 --- a/small/idlib/id960t.j +++ b/small/idlib/id960t.j @@ -3,7 +3,7 @@ #W id960t.j GAP library of id's Hans Ulrich Besche ## Revision.id960t_j := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 20 ].next[ 10 ] := rec( diff --git a/small/idlib/id960t.l b/small/idlib/id960t.l index c878069bb0..d90cd4f3a7 100644 --- a/small/idlib/id960t.l +++ b/small/idlib/id960t.l @@ -3,7 +3,7 @@ #W id960t.l GAP library of id's Hans Ulrich Besche ## Revision.id960t_l := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 20 ].next[ 12 ] := rec( diff --git a/small/idlib/id960t.u b/small/idlib/id960t.u index bb2cdda6fe..743cae1514 100644 --- a/small/idlib/id960t.u +++ b/small/idlib/id960t.u @@ -3,7 +3,7 @@ #W id960t.u GAP library of id's Hans Ulrich Besche ## Revision.id960t_u := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 20 ].next[ 21 ] := rec( diff --git a/small/idlib/id960tf.w b/small/idlib/id960tf.w index 514830b4e9..76c5649dc3 100644 --- a/small/idlib/id960tf.w +++ b/small/idlib/id960tf.w @@ -3,7 +3,7 @@ #W id960tf.w GAP library of id's Hans Ulrich Besche ## Revision.id960tf_w := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 20 ].next[ 6 ].next[ 23 ] := rec( diff --git a/small/idlib/id960tfa.z b/small/idlib/id960tfa.z index 807deb4636..7b922d817d 100644 --- a/small/idlib/id960tfa.z +++ b/small/idlib/id960tfa.z @@ -3,7 +3,7 @@ #W id960tfa.z GAP library of id's Hans Ulrich Besche ## Revision.id960tfa_z := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 20 ].next[ 6 ].next[ 52 ] := rec( diff --git a/small/idlib/id960tfb.j b/small/idlib/id960tfb.j index 3e72f7ec19..79ca736331 100644 --- a/small/idlib/id960tfb.j +++ b/small/idlib/id960tfb.j @@ -3,7 +3,7 @@ #W id960tfb.j GAP library of id's Hans Ulrich Besche ## Revision.id960tfb_j := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 20 ].next[ 6 ].next[ 62 ] := rec( diff --git a/small/idlib/id960tfb.t b/small/idlib/id960tfb.t index 54a77c94c5..e56d425312 100644 --- a/small/idlib/id960tfb.t +++ b/small/idlib/id960tfb.t @@ -3,7 +3,7 @@ #W id960tfb.t GAP library of id's Hans Ulrich Besche ## Revision.id960tfb_t := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 20 ].next[ 6 ].next[ 72 ] := rec( diff --git a/small/idlib/id960tfd.w b/small/idlib/id960tfd.w index a3f83e318b..3ea496056c 100644 --- a/small/idlib/id960tfd.w +++ b/small/idlib/id960tfd.w @@ -3,7 +3,7 @@ #W id960tfd.w GAP library of id's Hans Ulrich Besche ## Revision.id960tfd_w := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 20 ].next[ 6 ].next[ 127 ] := rec( diff --git a/small/idlib/id960tfd.y b/small/idlib/id960tfd.y index 692a637cc0..806b322058 100644 --- a/small/idlib/id960tfd.y +++ b/small/idlib/id960tfd.y @@ -3,7 +3,7 @@ #W id960tfd.y GAP library of id's Hans Ulrich Besche ## Revision.id960tfd_y := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 20 ].next[ 6 ].next[ 129 ] := rec( diff --git a/small/idlib/id960tfe.i b/small/idlib/id960tfe.i index 8acca47fa5..5472058957 100644 --- a/small/idlib/id960tfe.i +++ b/small/idlib/id960tfe.i @@ -3,7 +3,7 @@ #W id960tfe.i GAP library of id's Hans Ulrich Besche ## Revision.id960tfe_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 20 ].next[ 6 ].next[ 139 ] := rec( diff --git a/small/idlib/id960tff.d b/small/idlib/id960tff.d index ff6fa42cdf..979799c752 100644 --- a/small/idlib/id960tff.d +++ b/small/idlib/id960tff.d @@ -3,7 +3,7 @@ #W id960tff.d GAP library of id's Hans Ulrich Besche ## Revision.id960tff_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 20 ].next[ 6 ].next[ 160 ] := rec( diff --git a/small/idlib/id960tff.k b/small/idlib/id960tff.k index 5f2ad87ffa..0c6c6237f3 100644 --- a/small/idlib/id960tff.k +++ b/small/idlib/id960tff.k @@ -3,7 +3,7 @@ #W id960tff.k GAP library of id's Hans Ulrich Besche ## Revision.id960tff_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 20 ].next[ 6 ].next[ 167 ] := rec( diff --git a/small/idlib/id960tff.o b/small/idlib/id960tff.o index 0a799efc42..ed3fad30e7 100644 --- a/small/idlib/id960tff.o +++ b/small/idlib/id960tff.o @@ -3,7 +3,7 @@ #W id960tff.o GAP library of id's Hans Ulrich Besche ## Revision.id960tff_o := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 20 ].next[ 6 ].next[ 171 ] := rec( diff --git a/small/idlib/id960tfg.q b/small/idlib/id960tfg.q index 6abce0a7d1..f425e17898 100644 --- a/small/idlib/id960tfg.q +++ b/small/idlib/id960tfg.q @@ -3,7 +3,7 @@ #W id960tfg.q GAP library of id's Hans Ulrich Besche ## Revision.id960tfg_q := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 20 ].next[ 6 ].next[ 199 ] := rec( diff --git a/small/idlib/id960tfh.f b/small/idlib/id960tfh.f index 8aad707029..ea8c34ca0f 100644 --- a/small/idlib/id960tfh.f +++ b/small/idlib/id960tfh.f @@ -3,7 +3,7 @@ #W id960tfh.f GAP library of id's Hans Ulrich Besche ## Revision.id960tfh_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 20 ].next[ 6 ].next[ 214 ] := rec( diff --git a/small/idlib/id960tfi.k b/small/idlib/id960tfi.k index 34c2fe129e..abbc031a49 100644 --- a/small/idlib/id960tfi.k +++ b/small/idlib/id960tfi.k @@ -3,7 +3,7 @@ #W id960tfi.k GAP library of id's Hans Ulrich Besche ## Revision.id960tfi_k := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 20 ].next[ 6 ].next[ 245 ] := rec( diff --git a/small/idlib/id960tfj.r b/small/idlib/id960tfj.r index 0f23f4840c..e37efa7f84 100644 --- a/small/idlib/id960tfj.r +++ b/small/idlib/id960tfj.r @@ -3,7 +3,7 @@ #W id960tfj.r GAP library of id's Hans Ulrich Besche ## Revision.id960tfj_r := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 20 ].next[ 6 ].next[ 278 ] := rec( diff --git a/small/idlib/id960tfk.c b/small/idlib/id960tfk.c index 4c53c4c2b5..1350f4e7a7 100644 --- a/small/idlib/id960tfk.c +++ b/small/idlib/id960tfk.c @@ -3,7 +3,7 @@ #W id960tfk.c GAP library of id's Hans Ulrich Besche ## Revision.id960tfk_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 20 ].next[ 6 ].next[ 289 ] := rec( diff --git a/small/idlib/id960tfk.g b/small/idlib/id960tfk.g index 97e29e5f02..8b65829b3b 100644 --- a/small/idlib/id960tfk.g +++ b/small/idlib/id960tfk.g @@ -3,7 +3,7 @@ #W id960tfk.g GAP library of id's Hans Ulrich Besche ## Revision.id960tfk_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 20 ].next[ 6 ].next[ 293 ] := rec( diff --git a/small/idlib/id960x.c b/small/idlib/id960x.c index 2ae1c4670b..4c7e18ac92 100644 --- a/small/idlib/id960x.c +++ b/small/idlib/id960x.c @@ -3,7 +3,7 @@ #W id960x.c GAP library of id's Hans Ulrich Besche ## Revision.id960x_c := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 24 ].next[ 3 ] := rec( diff --git a/small/idlib/id960x.d b/small/idlib/id960x.d index 4006734372..d4b015fd36 100644 --- a/small/idlib/id960x.d +++ b/small/idlib/id960x.d @@ -3,7 +3,7 @@ #W id960x.d GAP library of id's Hans Ulrich Besche ## Revision.id960x_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 24 ].next[ 4 ] := rec( diff --git a/small/idlib/id960x.e b/small/idlib/id960x.e index efb5e07126..8832047374 100644 --- a/small/idlib/id960x.e +++ b/small/idlib/id960x.e @@ -3,7 +3,7 @@ #W id960x.e GAP library of id's Hans Ulrich Besche ## Revision.id960x_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 24 ].next[ 5 ] := rec( diff --git a/small/idlib/id960x.f b/small/idlib/id960x.f index 283190b659..34b3efec06 100644 --- a/small/idlib/id960x.f +++ b/small/idlib/id960x.f @@ -3,7 +3,7 @@ #W id960x.f GAP library of id's Hans Ulrich Besche ## Revision.id960x_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 24 ].next[ 6 ] := rec( diff --git a/small/idlib/id960x.g b/small/idlib/id960x.g index d4591e6a1e..af3ab7914a 100644 --- a/small/idlib/id960x.g +++ b/small/idlib/id960x.g @@ -3,7 +3,7 @@ #W id960x.g GAP library of id's Hans Ulrich Besche ## Revision.id960x_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 24 ].next[ 7 ] := rec( diff --git a/small/idlib/id960x.i b/small/idlib/id960x.i index bcf2362310..5ae616b5c2 100644 --- a/small/idlib/id960x.i +++ b/small/idlib/id960x.i @@ -3,7 +3,7 @@ #W id960x.i GAP library of id's Hans Ulrich Besche ## Revision.id960x_i := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 24 ].next[ 9 ] := rec( diff --git a/small/idlib/id960x.j b/small/idlib/id960x.j index 2a8bb89525..c8a325368c 100644 --- a/small/idlib/id960x.j +++ b/small/idlib/id960x.j @@ -3,7 +3,7 @@ #W id960x.j GAP library of id's Hans Ulrich Besche ## Revision.id960x_j := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 960 ].next[ 24 ].next[ 10 ] := rec( diff --git a/small/idlib/id97.2 b/small/idlib/id97.2 index cc07f2cb4d..5a0eea4c09 100644 --- a/small/idlib/id97.2 +++ b/small/idlib/id97.2 @@ -3,7 +3,7 @@ #W id97.2 GAP library of id's Hans Ulrich Besche ## Revision.id97_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 972 ] := rec( diff --git a/small/idlib/id97.5 b/small/idlib/id97.5 index fd29167a21..bf81e3901a 100644 --- a/small/idlib/id97.5 +++ b/small/idlib/id97.5 @@ -3,7 +3,7 @@ #W id97.5 GAP library of id's Hans Ulrich Besche ## Revision.id97_5 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 975 ] := rec( diff --git a/small/idlib/id97.6 b/small/idlib/id97.6 index f9983e4b0b..2c2a89ff0f 100644 --- a/small/idlib/id97.6 +++ b/small/idlib/id97.6 @@ -3,7 +3,7 @@ #W id97.6 GAP library of id's Hans Ulrich Besche ## Revision.id97_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 976 ] := rec( diff --git a/small/idlib/id972.b b/small/idlib/id972.b index dad599d3a9..99f90ffbbb 100644 --- a/small/idlib/id972.b +++ b/small/idlib/id972.b @@ -3,7 +3,7 @@ #W id972.b GAP library of id's Hans Ulrich Besche ## Revision.id972_b := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 972 ].next[ 2 ] := rec( diff --git a/small/idlib/id972.d b/small/idlib/id972.d index 83ec38fedf..34480b5815 100644 --- a/small/idlib/id972.d +++ b/small/idlib/id972.d @@ -3,7 +3,7 @@ #W id972.d GAP library of id's Hans Ulrich Besche ## Revision.id972_d := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 972 ].next[ 4 ] := rec( diff --git a/small/idlib/id972.e b/small/idlib/id972.e index 5085a0504d..5318915c9c 100644 --- a/small/idlib/id972.e +++ b/small/idlib/id972.e @@ -3,7 +3,7 @@ #W id972.e GAP library of id's Hans Ulrich Besche ## Revision.id972_e := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 972 ].next[ 5 ] := rec( diff --git a/small/idlib/id972.f b/small/idlib/id972.f index 3a1224706d..7727805770 100644 --- a/small/idlib/id972.f +++ b/small/idlib/id972.f @@ -3,7 +3,7 @@ #W id972.f GAP library of id's Hans Ulrich Besche ## Revision.id972_f := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 972 ].next[ 6 ] := rec( diff --git a/small/idlib/id972.g b/small/idlib/id972.g index aa98877743..54727a7a60 100644 --- a/small/idlib/id972.g +++ b/small/idlib/id972.g @@ -3,7 +3,7 @@ #W id972.g GAP library of id's Hans Ulrich Besche ## Revision.id972_g := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 972 ].next[ 7 ] := rec( diff --git a/small/idlib/id972.h b/small/idlib/id972.h index 11b582e2c5..59c1bcba47 100644 --- a/small/idlib/id972.h +++ b/small/idlib/id972.h @@ -3,7 +3,7 @@ #W id972.h GAP library of id's Hans Ulrich Besche ## Revision.id972_h := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 972 ].next[ 8 ] := rec( diff --git a/small/idlib/id972.l b/small/idlib/id972.l index 98ae40efd8..6a0b4aab71 100644 --- a/small/idlib/id972.l +++ b/small/idlib/id972.l @@ -3,7 +3,7 @@ #W id972.l GAP library of id's Hans Ulrich Besche ## Revision.id972_l := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 972 ].next[ 12 ] := rec( diff --git a/small/idlib/id972.p b/small/idlib/id972.p index 4ee4e58d82..bebeecf389 100644 --- a/small/idlib/id972.p +++ b/small/idlib/id972.p @@ -3,7 +3,7 @@ #W id972.p GAP library of id's Hans Ulrich Besche ## Revision.id972_p := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 972 ].next[ 16 ] := rec( diff --git a/small/idlib/id98.0 b/small/idlib/id98.0 index 9477a8406d..926573e125 100644 --- a/small/idlib/id98.0 +++ b/small/idlib/id98.0 @@ -3,7 +3,7 @@ #W id98.0 GAP library of id's Hans Ulrich Besche ## Revision.id98_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 980 ] := rec( diff --git a/small/idlib/id98.4 b/small/idlib/id98.4 index 8a3c69f20f..6538adef55 100644 --- a/small/idlib/id98.4 +++ b/small/idlib/id98.4 @@ -3,7 +3,7 @@ #W id98.4 GAP library of id's Hans Ulrich Besche ## Revision.id98_4 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 984 ] := rec( diff --git a/small/idlib/id98.8 b/small/idlib/id98.8 index ad01fa9433..cf42548752 100644 --- a/small/idlib/id98.8 +++ b/small/idlib/id98.8 @@ -3,7 +3,7 @@ #W id98.8 GAP library of id's Hans Ulrich Besche ## Revision.id98_8 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 988 ] := rec( diff --git a/small/idlib/id99.0 b/small/idlib/id99.0 index 45ece266e3..7aface3874 100644 --- a/small/idlib/id99.0 +++ b/small/idlib/id99.0 @@ -3,7 +3,7 @@ #W id99.0 GAP library of id's Hans Ulrich Besche ## Revision.id99_0 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 990 ] := rec( diff --git a/small/idlib/id99.2 b/small/idlib/id99.2 index 54858b7bb5..ed161c8560 100644 --- a/small/idlib/id99.2 +++ b/small/idlib/id99.2 @@ -3,7 +3,7 @@ #W id99.2 GAP library of id's Hans Ulrich Besche ## Revision.id99_2 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 992 ] := rec( diff --git a/small/idlib/id99.6 b/small/idlib/id99.6 index bc3aa7864f..38d5289ef6 100644 --- a/small/idlib/id99.6 +++ b/small/idlib/id99.6 @@ -3,7 +3,7 @@ #W id99.6 GAP library of id's Hans Ulrich Besche ## Revision.id99_6 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 996 ] := rec( diff --git a/small/idlib/id99.9 b/small/idlib/id99.9 index 05737bcdf3..6ad2a1949f 100644 --- a/small/idlib/id99.9 +++ b/small/idlib/id99.9 @@ -3,7 +3,7 @@ #W id99.9 GAP library of id's Hans Ulrich Besche ## Revision.id99_9 := - "@(#)$Id:"; + "@(#)$Id$"; IdGroupTree.next[ 999 ] := rec( diff --git a/small/small.gd b/small/small.gd index 065b0d4c63..6e59b134cf 100644 --- a/small/small.gd +++ b/small/small.gd @@ -4,7 +4,7 @@ #W & Bettina Eick ## Revision.small_gd := - "@(#)$Id: "; + "@(#)$Id$"; InfoIdGroup := NewInfoClass( "InfoIdGroup" ); diff --git a/src/Makefile b/src/Makefile index f2a11f8dc0..79a836a604 100644 --- a/src/Makefile +++ b/src/Makefile @@ -70,19 +70,20 @@ SHELL = /bin/sh ## unknown: @echo "usage: 'make ' where target is one of" - @echo "'alpha-dec-OSF32-gcc2' for DECalpha under OSF 3.2 with GNU cc 2" - @echo "'mips-dec-ultrix-cc' for DECstation under Ultrix with cc" - @echo "'hppa1.1-hp-hpux-gcc2' for HP9000 under HP-UX with GNU cc 2" - @echo "'i386-ibm-freebsd-gcc2' for IBM PC under FreeBSD 2.x with GNU cc 2" - @echo " (GNU cc 2.6 comes with FreeBSD 2.0)" - @echo "'i386-ibm-linux-gcc2' for IBM PC under Linux with GNU cc 2" - @echo "'i386-ibm-nextstep-cc' for IBM PC under NeXTSTEP 3.x with GNU cc 2" - @echo " (GNU cc 2.5.8 comes with NeXTSTEP 3.3)" - @echo "'mips-sgi-irix-gcc2' for SGI Mips under IRIX 5/6 with GNU cc 2" - @echo "'mips-sgi-irix-cc' for SGI Mips under IRIX 5/6 with cc" - @echo "'power-ibm-aix-cc' for IBM RS/600 under AIX 4.2 with cc" - @echo "'sparc-sun-sunos-gcc2' fur Sun Sparc under SunOS with GCC 2" - @echo "'sparc-sun-solaris-gcc2' fur Sun Sparc under Solaris with GCC 2" + @echo "'alpha-dec-OSF32-gcc2' for DECalpha & OSF 3.2 with GNU cc 2" + @echo "'mips-dec-ultrix-cc' for DECstation & Ultrix with cc" + @echo "'hppa1.1-hp-hpux-gcc2' for HP9000 & HP-UX with GNU cc 2" + @echo "'i386-ibm-freebsd-gcc2' for IBM PC & FreeBSD 2.x with GNU cc 2" + @echo " (GNU cc 2.6 comes with FreeBSD 2.0)" + @echo "'i386-ibm-linux-gcc2' for IBM PC & Linux with GNU cc 2" + @echo "'i386-ibm-nextstep-cc' for IBM PC & NeXTSTEP 3.x with GNUcc 2" + @echo " (GNU cc 2.5.8 comes with NeXTSTEP 3.3)" + @echo "'ppc-generic-linux-gcc2' for generic PPC & Linux with GNU cc 2" + @echo "'mips-sgi-irix-gcc2' for SGI Mips & IRIX 5/6 with GNU cc 2" + @echo "'mips-sgi-irix-cc' for SGI Mips & IRIX 5/6 with cc" + @echo "'power-ibm-aix-gcc2' for IBM RS/6000 & AIX with GNU cc 2" + @echo "'sparc-sun-sunos-gcc2' for Sun Sparc & SunOS with GCC 2" + @echo "'sparc-sun-solaris-gcc2' for Sun Sparc & Solaris with GCC 2" @echo "" @echo " targets are listed according to preference, i.e.," @echo " 'mips-sgi-irix-gcc2' is better than 'mips-sgi-irix-cc'." @@ -144,7 +145,7 @@ mips-dec-ultrix-cc: @(cd ../bin/mips-dec-ultrix-cc; \ $(MAKE) -f ../../src/Makefile gap \ SRC="../../src" \ - CC="gcc -ansi -Wall" \ + CC="cc" \ LFLAGS="$(LOPTS)" \ CFLAGS="$(COPTS) -O2 -Olimit 1000" \ CFLAGS_SIG="-DSYS_HAS_SIGNALS" \ @@ -289,14 +290,15 @@ i386-ibm-linux-gcc2: @(cd ../bin/i386-ibm-linux-gcc2; \ $(MAKE) -f ../../src/Makefile gap \ SRC="../../src" \ - CC="gcc -ansi -Wall -g" \ + CC="gcc -ansi -Wall -g -O2" \ LFLAGS="$(LOPTS) -export-dynamic -ldl" \ - CFLAGS="$(COPTS) -O2" \ + CFLAGS="$(COPTS) " \ CFLAGS_SIG="-DSYS_HAS_SIGNALS" \ CFLAGS_SYS="$(COPTS) \ -DSYS_IS_USG \ -D_POSIX_SOURCE \ -D__USE_MISC \ + -D_USE_SVID \ -DSYS_HAS_STACK_ALIGN=2 \ -DSYS_HAS_STDIO_PROTO \ -DSYS_HAS_READ_PROTO \ @@ -320,6 +322,112 @@ i386-ibm-linux-gcc2: ) +############################################################################# +## +#F i386-ibm-linux-pgcc +## +## Linux with Portland group CC -- shares include files with gcc2 +## +## 'stdio.h' claims 'fgets' has second argument 'size_t' (ANSI says 'int') +## 'unistd.h' claims 'read' has third argument 'size_t' (UNIX says 'int') +## 'unistd.h' has 'sbrk' with argument 'ptrdiff_t' (but this lost when +## using -ansi) +## -D_POSIX_SOURCE is needed to prevent -ansi losing 'popen', 'pclose', +## and 'fileno' +## 'sys/signal.h' claims 'kill' has first argument 'pid_t' (UNIX says 'int') +## 'sys/times.h' claims 'times' has return value 'clock_t' +## + +i386-ibm-linux-pgcc: + @(if test ! -d ../bin; then mkdir ../bin; fi; \ + cd ../bin; \ + if test ! -d i386-ibm-linux-pgcc; then \ + mkdir i386-ibm-linux-pgcc; \ + fi; \ + cd ../bin/i386-ibm-linux-pgcc; \ + ) + @(cd ../bin/i386-ibm-linux-pgcc; \ + $(MAKE) -f ../../src/Makefile gap \ + SRC="../../src" \ + CC="pgcc -g -O2 -tp p6 -Minfo=all" \ + LFLAGS="$(LOPTS)" \ + CFLAGS="$(COPTS) " \ + CFLAGS_SIG="-DSYS_HAS_SIGNALS" \ + CFLAGS_SYS="$(COPTS) \ + -DSYS_IS_USG \ + -D_POSIX_SOURCE \ + -D__USE_MISC \ + -D_USE_SVID \ + -DSYS_HAS_STACK_ALIGN=2 \ + -DSYS_HAS_STDIO_PROTO \ + -DSYS_HAS_READ_PROTO \ + -DSYS_HAS_WAIT_PROTO \ + -DSYS_HAS_SIGNAL_PROTO \ + -DSYS_HAS_TIME_PROTO \ + -DSYS_HAS_WAITPID \ + -DSYS_ARCH='\"i386-ibm-linux-pgcc\"'" \ + ) + @(cd ../bin/i386-ibm-linux-pgcc; \ + $(MAKE) -f ../../src/Makefile gac \ + SRC="../../src" \ + CC="pgcc" \ + TARGET="i386-ibm-linux-pgcc" \ + COPTIONS="-ansi -Wall -O2" \ + ) + + +############################################################################# +## +#F ppc-generic-linux-gcc2 +## +## LinuxPPC with GNU CC version 2.1.y +## +## From: Michael Smith +## +ppc-generic-linux-gcc2: + @(if test ! -d ../bin; then mkdir ../bin; fi; \ + cd ../bin; \ + if test ! -d ppc-generic-linux-gcc2; then \ + mkdir ppc-generic-linux-gcc2; \ + fi; \ + cd ../bin/ppc-generic-linux-gcc2; \ + ) + @(cd ../bin/ppc-generic-linux-gcc2; \ + $(MAKE) -f ../../src/Makefile gap \ + SRC="../../src" \ + CC="gcc -ansi -Wall -g" \ + LFLAGS="$(LOPTS) -export-dynamic -ldl" \ + CFLAGS="$(COPTS) -O2" \ + CFLAGS_SIG="-DSYS_HAS_SIGNALS" \ + CFLAGS_SYS="$(COPTS) \ + -DSYS_IS_USG \ + -D_POSIX_SOURCE \ + -D__USE_MISC \ + -DSYS_HAS_STACK_ALIGN=2 \ + -DSYS_HAS_STDIO_PROTO \ + -DSYS_HAS_READ_PROTO \ + -DSYS_HAS_WAIT_PROTO \ + -DSYS_HAS_SIGNAL_PROTO \ + -DSYS_HAS_IOCTL_PROTO \ + -DSYS_HAS_TIME_PROTO \ + -DSYS_HAS_DL_LIBRARY \ + -DSYS_HAS_WAITPID \ + -DSYS_INIT_DYNAMIC='\"Init__Dynamic\"' \ + -DSYS_ARCH='\"ppc-generic-linux-gcc2\"'" \ + ) + @(cd ../bin/ppc-generic-linux-gcc2; \ + $(MAKE) -f ../../src/Makefile gac \ + SRC="../../src" \ + CC="gcc" \ + TARGET="ppc-generic-linux-gcc2" \ + COPTIONS="-ansi -Wall -O2" \ + CDYNOPTIONS="-fpic -ansi -Wall -O2" \ + CDYNLINKER="ld" \ + CDYNLINKING="-Bshareable -x" \ + ) + + + ############################################################################# ## #F i386-ibm-nextstep-cc @@ -398,52 +506,38 @@ i386-next-nextstep-cc-prof: ADIR="i386" EXTDIR="-prof" \ CDYNOPTIONS="-pg" - ############################################################################# ## -#F power-ibm-aix-cc +#F power-ibm-aix-gcc2 ## -## IBM RS/6000 with AIX 4.2 -## From: Jens Rosenboom -## -power-ibm-aix-cc: - (if test ! -d ../bin; then mkdir ../bin; fi; \ - cd ../bin; \ - if test ! -d power-ibm-aix-cc; then \ - mkdir power-ibm-aix-cc; \ - fi; \ - cd ../bin/power-ibm-aix-cc; \ +## IBM RS/6000 with AIX and GCC 2 +## From: Jan van den Heuvel +## +power-ibm-aix-gcc2: + @(if test ! -d ../bin; then mkdir ../bin; fi; \ + cd ../bin; \ + if test ! -d power-ibm-aix-gcc2; then \ + mkdir power-ibm-aix-gcc2; \ + fi; \ + cd ../bin/power-ibm-aix-gcc2; \ ) - (cd ../bin/power-ibm-aix-cc; \ + @(cd ../bin/power-ibm-aix-gcc2; \ $(MAKE) -f ../../src/Makefile gap \ SRC="../../src" \ - CC="cc" \ - LFLAGS="$(LOPTS) -g -bmaxdata:0x80000000 -ldl" \ - CFLAGS="$(COPTS) -g -O2" \ - CFLAGS_SIG="-DSYS_HAS_SIGNALS" \ - CFLAGS_SYS="$(COPTS) \ - -DSYS_IS_USG -DSYS_HAS_TIME_PROTO \ - -DSYS_HAS_DL_LIBRARY \ - -DSYS_HAS_READ_PROTO \ - -DSYS_HAS_SIGNAL_PROTO \ + CC="gcc" \ + LFLAGS="$(LOPTS)" \ + CFLAGS="$(COPTS) -O2 -fsigned-char" \ + CFLAGS_SIG="-DSYS_HAS_SIGNALS" \ + CFLAGS_SYS="$(COPTS) -fsigned-char\ + -DSYS_ARCH='\"power-ibm-aix-gcc2\"' \ + -DSYS_IS_USG \ + -DSYS_HAS_ANSI \ -DSYS_HAS_IOCTL_PROTO \ - -DSYS_HAS_STRING_PROTO \ -DSYS_HAS_MISC_PROTO \ - -DSYS_ARCH='\"power-ibm-aix-cc\"'" \ - ) - @(cd ../bin/power-ibm-aix-cc; \ - $(MAKE) -f ../../src/Makefile gac \ - SRC="../../src" \ - CC="cc" \ - TARGET="power-ibm-aix-cc" \ - COPTIONS="-g -O2" \ - CLINKER="cc -ldl" \ - CDYNOPTIONS="-g -brtl -O2" \ - CDYNLINKER="ld" \ - CDYNLINKING="-brtl " \ + -DSYS_HAS_READ_PROTO \ + -DSYS_HAS_NO_VFORK" \ ) - ############################################################################# ## #F mips-sgi-irix-gcc2 @@ -647,7 +741,6 @@ OBJECTS = \ bool.o \ calls.o \ code.o \ - compiled.o \ compiler.o \ costab.o \ cyclotom.o \ @@ -684,8 +777,10 @@ OBJECTS = \ stats.o \ streams.o \ string.o \ + tietze.o \ vars.o \ - vector.o + vector.o \ + weakptr.o gap: $(OBJECTS) compstat.o c_type.o c_methse.o $(CC) $(LFLAGS) -o gap $(OBJECTS) compstat.o c_type.o c_methse.o @@ -699,12 +794,25 @@ gap: $(OBJECTS) compstat.o c_type.o c_methse.o ## the commands needed to compile them (those must be given, because the ## implicit rules work only if the source is in the same directory). ## -c_type.o: $(SRC)/c_type.c $(SRC)/compstat.h $(SRC)/system.h +c_type.o: $(SRC)/c_type.c $(SRC)/compstat.h \ + $(SRC)/system.h $(SRC)/gasman.h $(SRC)/objects.h \ + $(SRC)/gvars.h $(SRC)/calls.h $(SRC)/ariths.h \ + $(SRC)/records.h $(SRC)/lists.h $(SRC)/bool.h \ + $(SRC)/integer.h $(SRC)/precord.h $(SRC)/plist.h \ + $(SRC)/string.h $(SRC)/code.h $(SRC)/vars.h \ + $(SRC)/gap.h $(SRC)/permutat.h $(CC) $(CFLAGS) -o c_type.o -c $(SRC)/c_type.c -c_methse.o: $(SRC)/c_methse.c $(SRC)/compstat.h $(SRC)/system.h +c_methse.o: $(SRC)/c_methse.c $(SRC)/compstat.h $(SRC)/system.h \ + $(SRC)/system.h $(SRC)/gasman.h $(SRC)/objects.h \ + $(SRC)/gvars.h $(SRC)/calls.h $(SRC)/ariths.h \ + $(SRC)/records.h $(SRC)/lists.h $(SRC)/bool.h \ + $(SRC)/integer.h $(SRC)/precord.h $(SRC)/plist.h \ + $(SRC)/string.h $(SRC)/code.h $(SRC)/vars.h \ + $(SRC)/gap.h $(SRC)/permutat.h $(CC) $(CFLAGS) -o c_methse.o -c $(SRC)/c_methse.c + system.o: $(SRC)/system.c $(SRC)/system.h $(CC) $(CFLAGS_SYS) $(CFLAGS_SIG) -o system.o -c $(SRC)/system.c @@ -712,30 +820,33 @@ sysfiles.o: $(SRC)/sysfiles.c $(SRC)/sysfiles.h \ $(SRC)/system.h $(CC) $(CFLAGS_SYS) $(CFLAGS_SIG) -o sysfiles.o -c $(SRC)/sysfiles.c -scanner.o: $(SRC)/scanner.c $(SRC)/scanner.h \ - $(SRC)/system.h - $(CC) $(CFLAGS) -o scanner.o -c $(SRC)/scanner.c -gasman.o: $(SRC)/gasman.c $(SRC)/gasman.h \ - $(SRC)/system.h - $(CC) $(CFLAGS) -o gasman.o -c $(SRC)/gasman.c +ariths.o: $(SRC)/ariths.c $(SRC)/ariths.h \ + $(SRC)/system.h \ + $(SRC)/gasman.h $(SRC)/objects.h \ + $(SRC)/gap.h \ + $(SRC)/gvars.h $(SRC)/calls.h $(SRC)/opers.h \ + $(SRC)/bool.h + $(CC) $(CFLAGS) -o ariths.o -c $(SRC)/ariths.c -objects.o: $(SRC)/objects.c $(SRC)/objects.h \ - $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ - $(SRC)/gvars.h \ - $(SRC)/calls.h $(SRC)/opers.h \ +blister.o: $(SRC)/blister.c $(SRC)/blister.h \ + $(SRC)/system.h \ + $(SRC)/gasman.h $(SRC)/objects.h $(SRC)/scanner.h \ + $(SRC)/gap.h \ + $(SRC)/gvars.h $(SRC)/calls.h $(SRC)/opers.h \ + $(SRC)/ariths.h \ $(SRC)/bool.h \ - $(SRC)/gap.h - $(CC) $(CFLAGS) -o objects.o -c $(SRC)/objects.c + $(SRC)/lists.h \ + $(SRC)/plist.h $(SRC)/set.h $(SRC)/range.h + $(CC) $(CFLAGS) -o blister.o -c $(SRC)/blister.c -gvars.o: $(SRC)/gvars.c $(SRC)/gvars.h \ - $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ - $(SRC)/objects.h \ - $(SRC)/calls.h \ - $(SRC)/lists.h \ - $(SRC)/plist.h $(SRC)/string.h \ - $(SRC)/gap.h - $(CC) $(CFLAGS) -o gvars.o -c $(SRC)/gvars.c +bool.o: $(SRC)/bool.c $(SRC)/bool.h \ + $(SRC)/system.h \ + $(SRC)/gasman.h $(SRC)/objects.h $(SRC)/scanner.h \ + $(SRC)/gap.h \ + $(SRC)/gvars.h $(SRC)/calls.h $(SRC)/opers.h \ + $(SRC)/ariths.h + $(CC) $(CFLAGS) -o bool.o -c $(SRC)/bool.c calls.o: $(SRC)/calls.c $(SRC)/calls.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ @@ -750,79 +861,83 @@ calls.o: $(SRC)/calls.c $(SRC)/calls.h \ $(SRC)/gap.h $(CC) $(CFLAGS) -o calls.o -c $(SRC)/calls.c -opers.o: $(SRC)/opers.c $(SRC)/opers.h \ +code.o: $(SRC)/code.c $(SRC)/code.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ - $(SRC)/objects.h $(SRC)/gvars.h \ - $(SRC)/ariths.h $(SRC)/calls.h \ - $(SRC)/bool.h \ - $(SRC)/plist.h $(SRC)/blister.h $(SRC)/string.h \ + $(SRC)/objects.h \ + $(SRC)/calls.h \ + $(SRC)/records.h \ + $(SRC)/integer.h \ + $(SRC)/plist.h \ + $(SRC)/vars.h \ + $(SRC)/funcs.h \ $(SRC)/gap.h - $(CC) $(CFLAGS) -o opers.o -c $(SRC)/opers.c + $(CC) $(CFLAGS) -o code.o -c $(SRC)/code.c -ariths.o: $(SRC)/ariths.c $(SRC)/ariths.h \ +compiler.o: $(SRC)/compiler.c $(SRC)/compiler.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ $(SRC)/objects.h $(SRC)/gvars.h \ - $(SRC)/calls.h $(SRC)/opers.h \ + $(SRC)/calls.h \ + $(SRC)/records.h \ $(SRC)/bool.h \ - $(SRC)/gap.h - $(CC) $(CFLAGS) -o ariths.o -c $(SRC)/ariths.c + $(SRC)/plist.h \ + $(SRC)/string.h \ + $(SRC)/code.h $(SRC)/vars.h + $(CC) $(CFLAGS) -o compiler.o -c $(SRC)/compiler.c -records.o: $(SRC)/records.c $(SRC)/records.h \ - $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ - $(SRC)/objects.h $(SRC)/gvars.h \ - $(SRC)/calls.h $(SRC)/opers.h \ - $(SRC)/plist.h $(SRC)/string.h \ - $(SRC)/gap.h - $(CC) $(CFLAGS) -o records.o -c $(SRC)/records.c +compstat.o: $(SRC)/compstat.c $(SRC)/compstat.h \ + $(SRC)/system.h + $(CC) $(CFLAGS) -o compstat.o -c $(SRC)/compstat.c -lists.o: $(SRC)/lists.c $(SRC)/lists.h \ - $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ - $(SRC)/objects.h $(SRC)/gvars.h \ - $(SRC)/calls.h $(SRC)/opers.h \ - $(SRC)/ariths.h $(SRC)/records.h \ - $(SRC)/bool.h \ - $(SRC)/precord.h \ - $(SRC)/plist.h $(SRC)/range.h \ - $(SRC)/gap.h - $(CC) $(CFLAGS) -o lists.o -c $(SRC)/lists.c +costab.o: $(SRC)/costab.c $(SRC)/costab.h \ + $(SRC)/system.h \ + $(SRC)/gasman.h $(SRC)/objects.h $(SRC)/scanner.h \ + $(SRC)/gap.h \ + $(SRC)/gvars.h $(SRC)/calls.h $(SRC)/opers.h \ + $(SRC)/integer.h $(SRC)/bool.h \ + $(SRC)/lists.h \ + $(SRC)/plist.h + $(CC) $(CFLAGS) -o costab.o -c $(SRC)/costab.c -bool.o: $(SRC)/bool.c $(SRC)/bool.h \ +cyclotom.o: $(SRC)/cyclotom.c $(SRC)/cyclotom.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ $(SRC)/objects.h $(SRC)/gvars.h \ $(SRC)/calls.h $(SRC)/opers.h \ - $(SRC)/ariths.h \ + $(SRC)/ariths.h $(SRC)/lists.h \ + $(SRC)/bool.h \ + $(SRC)/integer.h \ + $(SRC)/plist.h \ $(SRC)/gap.h - $(CC) $(CFLAGS) -o bool.o -c $(SRC)/bool.c + $(CC) $(CFLAGS) -o cyclotom.o -c $(SRC)/cyclotom.c -integer.o: $(SRC)/integer.c $(SRC)/integer.h \ +dt.o: $(SRC)/dt.c $(SRC)/dt.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ - $(SRC)/objects.h $(SRC)/gvars.h \ - $(SRC)/calls.h $(SRC)/opers.h \ - $(SRC)/ariths.h \ - $(SRC)/bool.h \ + $(SRC)/objects.h $(SRC)/bool.h $(SRC)/calls.h \ + $(SRC)/integer.h $(SRC)/gvars.h \ + $(SRC)/plist.h $(SRC)/lists.h $(SRC)/listfunc.h \ + $(SRC)/precord.h $(SRC)/records.h \ $(SRC)/gap.h - $(CC) $(CFLAGS) -o integer.o -c $(SRC)/integer.c + $(CC) $(CFLAGS) -o dt.o -c $(SRC)/dt.c -rational.o: $(SRC)/rational.c $(SRC)/rational.h \ +dteval.o: $(SRC)/dteval.c $(SRC)/dteval.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ - $(SRC)/objects.h $(SRC)/gvars.h \ - $(SRC)/calls.h $(SRC)/opers.h \ - $(SRC)/ariths.h \ - $(SRC)/bool.h \ - $(SRC)/integer.h \ + $(SRC)/objects.h $(SRC)/bool.h $(SRC)/calls.h \ + $(SRC)/integer.h $(SRC)/gvars.h $(SRC)/plist.h \ + $(SRC)/lists.h $(SRC)/listfunc.h $(SRC)/precord.h \ + $(SRC)/records.h \ $(SRC)/gap.h - $(CC) $(CFLAGS) -o rational.o -c $(SRC)/rational.c + $(CC) $(CFLAGS) -o dteval.o -c $(SRC)/dteval.c -cyclotom.o: $(SRC)/cyclotom.c $(SRC)/cyclotom.h \ +exprs.o: $(SRC)/exprs.c $(SRC)/exprs.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ $(SRC)/objects.h $(SRC)/gvars.h \ - $(SRC)/calls.h $(SRC)/opers.h \ - $(SRC)/ariths.h $(SRC)/lists.h \ + $(SRC)/ariths.h $(SRC)/records.h $(SRC)/lists.h \ $(SRC)/bool.h \ - $(SRC)/integer.h \ + $(SRC)/permutat.h \ $(SRC)/plist.h \ + $(SRC)/range.h $(SRC)/string.h \ + $(SRC)/code.h $(SRC)/vars.h \ $(SRC)/gap.h - $(CC) $(CFLAGS) -o cyclotom.o -c $(SRC)/cyclotom.c + $(CC) $(CFLAGS) -o exprs.o -c $(SRC)/exprs.c finfield.o: $(SRC)/finfield.c $(SRC)/finfield.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ @@ -835,32 +950,76 @@ finfield.o: $(SRC)/finfield.c $(SRC)/finfield.h \ $(SRC)/gap.h $(CC) $(CFLAGS) -o finfield.o -c $(SRC)/finfield.c -permutat.o: $(SRC)/permutat.c $(SRC)/permutat.h \ +funcs.o: $(SRC)/funcs.c $(SRC)/funcs.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ - $(SRC)/objects.h $(SRC)/gvars.h \ - $(SRC)/calls.h $(SRC)/opers.h \ - $(SRC)/ariths.h $(SRC)/lists.h \ - $(SRC)/bool.h \ - $(SRC)/integer.h \ + $(SRC)/objects.h \ + $(SRC)/calls.h \ + $(SRC)/lists.h \ $(SRC)/plist.h \ + $(SRC)/code.h $(SRC)/vars.h \ + $(SRC)/exprs.h $(SRC)/stats.h \ $(SRC)/gap.h - $(CC) $(CFLAGS) -o permutat.o -c $(SRC)/permutat.c + $(CC) $(CFLAGS) -o funcs.o -c $(SRC)/funcs.c -precord.o: $(SRC)/precord.c $(SRC)/precord.h \ +gap.o: $(SRC)/gap.c $(SRC)/gap.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ $(SRC)/objects.h $(SRC)/gvars.h \ $(SRC)/calls.h $(SRC)/opers.h \ - $(SRC)/ariths.h $(SRC)/lists.h \ + $(SRC)/ariths.h $(SRC)/records.h $(SRC)/lists.h \ $(SRC)/bool.h \ - $(SRC)/plist.h \ - $(SRC)/string.h \ - $(SRC)/gap.h - $(CC) $(CFLAGS) -o precord.o -c $(SRC)/precord.c - -listfunc.o: $(SRC)/listfunc.c $(SRC)/listfunc.h \ - $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ - $(SRC)/objects.h $(SRC)/gvars.h \ - $(SRC)/calls.h $(SRC)/opers.h \ + $(SRC)/integer.h $(SRC)/rational.h $(SRC)/cyclotom.h \ + $(SRC)/finfield.h $(SRC)/permutat.h \ + $(SRC)/listfunc.h $(SRC)/listoper.h \ + $(SRC)/plist.h $(SRC)/set.h $(SRC)/vector.h \ + $(SRC)/blister.h $(SRC)/range.h $(SRC)/string.h \ + $(SRC)/objfgelm.h $(SRC)/objscoll.h $(SRC)/sctable.h \ + $(SRC)/costab.h \ + $(SRC)/code.h $(SRC)/vars.h \ + $(SRC)/exprs.h $(SRC)/stats.h $(SRC)/funcs.h \ + $(SRC)/intrprtr.h $(SRC)/read.h $(SRC)/saveload.h \ + $(SRC)/weakptr.h + $(CC) $(CFLAGS) -o gap.o -c $(SRC)/gap.c + +gasman.o: $(SRC)/gasman.c $(SRC)/gasman.h \ + $(SRC)/system.h + $(CC) $(CFLAGS) -o gasman.o -c $(SRC)/gasman.c + +gvars.o: $(SRC)/gvars.c $(SRC)/gvars.h \ + $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ + $(SRC)/objects.h \ + $(SRC)/calls.h \ + $(SRC)/lists.h \ + $(SRC)/plist.h $(SRC)/string.h \ + $(SRC)/gap.h + $(CC) $(CFLAGS) -o gvars.o -c $(SRC)/gvars.c + +integer.o: $(SRC)/integer.c $(SRC)/integer.h \ + $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ + $(SRC)/objects.h $(SRC)/gvars.h \ + $(SRC)/calls.h $(SRC)/opers.h \ + $(SRC)/ariths.h \ + $(SRC)/bool.h \ + $(SRC)/gap.h + $(CC) $(CFLAGS) -o integer.o -c $(SRC)/integer.c + +intrprtr.o: $(SRC)/intrprtr.c $(SRC)/intrprtr.h \ + $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ + $(SRC)/objects.h $(SRC)/gvars.h \ + $(SRC)/calls.h $(SRC)/opers.h \ + $(SRC)/ariths.h $(SRC)/records.h $(SRC)/lists.h \ + $(SRC)/bool.h \ + $(SRC)/permutat.h \ + $(SRC)/plist.h \ + $(SRC)/range.h $(SRC)/string.h \ + $(SRC)/code.h $(SRC)/vars.h \ + $(SRC)/funcs.h \ + $(SRC)/gap.h $(SRC)/saveload.h + $(CC) $(CFLAGS) -o intrprtr.o -c $(SRC)/intrprtr.c + +listfunc.o: $(SRC)/listfunc.c $(SRC)/listfunc.h \ + $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ + $(SRC)/objects.h $(SRC)/gvars.h \ + $(SRC)/calls.h $(SRC)/opers.h \ $(SRC)/ariths.h $(SRC)/lists.h \ $(SRC)/bool.h \ $(SRC)/permutat.h \ @@ -878,71 +1037,85 @@ listoper.o: $(SRC)/listoper.c $(SRC)/listoper.h \ $(SRC)/gap.h $(CC) $(CFLAGS) -o listoper.o -c $(SRC)/listoper.c -plist.o: $(SRC)/plist.c $(SRC)/plist.h \ +lists.o: $(SRC)/lists.c $(SRC)/lists.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ $(SRC)/objects.h $(SRC)/gvars.h \ $(SRC)/calls.h $(SRC)/opers.h \ - $(SRC)/ariths.h $(SRC)/lists.h \ + $(SRC)/ariths.h $(SRC)/records.h \ $(SRC)/bool.h \ - $(SRC)/range.h \ + $(SRC)/precord.h \ + $(SRC)/plist.h $(SRC)/range.h \ $(SRC)/gap.h - $(CC) $(CFLAGS) -o plist.o -c $(SRC)/plist.c + $(CC) $(CFLAGS) -o lists.o -c $(SRC)/lists.c -set.o: $(SRC)/set.c $(SRC)/set.h \ +objects.o: $(SRC)/objects.c $(SRC)/objects.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ - $(SRC)/objects.h $(SRC)/gvars.h \ + $(SRC)/gvars.h \ $(SRC)/calls.h $(SRC)/opers.h \ - $(SRC)/ariths.h $(SRC)/lists.h \ $(SRC)/bool.h \ - $(SRC)/listfunc.h \ - $(SRC)/plist.h \ $(SRC)/gap.h - $(CC) $(CFLAGS) -o set.o -c $(SRC)/set.c + $(CC) $(CFLAGS) -o objects.o -c $(SRC)/objects.c -vector.o: $(SRC)/vector.c $(SRC)/vector.h \ +opers.o: $(SRC)/opers.c $(SRC)/opers.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ $(SRC)/objects.h $(SRC)/gvars.h \ - $(SRC)/ariths.h $(SRC)/lists.h \ + $(SRC)/ariths.h $(SRC)/calls.h \ $(SRC)/bool.h \ - $(SRC)/integer.h \ - $(SRC)/plist.h \ - $(SRC)/range.h \ - $(SRC)/listoper.h \ + $(SRC)/plist.h $(SRC)/blister.h $(SRC)/string.h \ $(SRC)/gap.h - $(CC) $(CFLAGS) -o vector.o -c $(SRC)/vector.c + $(CC) $(CFLAGS) -o opers.o -c $(SRC)/opers.c -blister.o: $(SRC)/blister.c $(SRC)/blister.h \ +range.o: $(SRC)/range.c $(SRC)/range.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ $(SRC)/objects.h $(SRC)/gvars.h \ $(SRC)/calls.h $(SRC)/opers.h \ $(SRC)/ariths.h $(SRC)/lists.h \ $(SRC)/bool.h \ - $(SRC)/plist.h $(SRC)/set.h \ - $(SRC)/range.h \ + $(SRC)/plist.h \ $(SRC)/gap.h - $(CC) $(CFLAGS) -o blister.o -c $(SRC)/blister.c + $(CC) $(CFLAGS) -o range.o -c $(SRC)/range.c -range.o: $(SRC)/range.c $(SRC)/range.h \ +rational.o: $(SRC)/rational.c $(SRC)/rational.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ $(SRC)/objects.h $(SRC)/gvars.h \ $(SRC)/calls.h $(SRC)/opers.h \ - $(SRC)/ariths.h $(SRC)/lists.h \ + $(SRC)/ariths.h \ $(SRC)/bool.h \ - $(SRC)/plist.h \ + $(SRC)/integer.h \ $(SRC)/gap.h - $(CC) $(CFLAGS) -o range.o -c $(SRC)/range.c + $(CC) $(CFLAGS) -o rational.o -c $(SRC)/rational.c -string.o: $(SRC)/string.c $(SRC)/string.h \ +records.o: $(SRC)/records.c $(SRC)/records.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ $(SRC)/objects.h $(SRC)/gvars.h \ $(SRC)/calls.h $(SRC)/opers.h \ - $(SRC)/ariths.h $(SRC)/lists.h \ - $(SRC)/bool.h \ - $(SRC)/plist.h \ - $(SRC)/range.h \ + $(SRC)/plist.h $(SRC)/string.h \ $(SRC)/gap.h + $(CC) $(CFLAGS) -o records.o -c $(SRC)/records.c + +scanner.o: $(SRC)/scanner.c $(SRC)/scanner.h \ + $(SRC)/system.h + $(CC) $(CFLAGS) -o scanner.o -c $(SRC)/scanner.c + +string.o: $(SRC)/string.c $(SRC)/string.h \ + $(SRC)/system.h \ + $(SRC)/gasman.h $(SRC)/objects.h $(SRC)/scanner.h \ + $(SRC)/gap.h \ + $(SRC)/gvars.h $(SRC)/calls.h $(SRC)/opers.h \ + $(SRC)/ariths.h \ + $(SRC)/bool.h \ + $(SRC)/lists.h \ + $(SRC)/plist.h $(SRC)/range.h $(CC) $(CFLAGS) -o string.o -c $(SRC)/string.c +objcftl.o: $(SRC)/objcftl.c $(SRC)/objcftl.h $(SRC)/dt.h \ + $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ + $(SRC)/objects.h $(SRC)/plist.h $(SRC)/gvars.h \ + $(SRC)/calls.h $(SRC)/records.h $(SRC)/precord.h \ + $(SRC)/gap.h $(SRC)/bool.h + $(CC) $(CFLAGS) -o objcftl.o -c $(SRC)/objcftl.c + + objfgelm.o: ${SRC}/objfgelm.c $(SRC)/objfgelm.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ $(SRC)/objects.h $(SRC)/gvars.h \ @@ -952,15 +1125,6 @@ objfgelm.o: ${SRC}/objfgelm.c $(SRC)/objfgelm.h \ $(SRC)/gap.h $(CC) $(CFLAGS) -o objfgelm.o -c $(SRC)/objfgelm.c -objscoll.o: ${SRC}/objscoll.c $(SRC)/objscoll.h \ - $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ - $(SRC)/objects.h $(SRC)/gvars.h \ - $(SRC)/calls.h \ - $(SRC)/lists.h $(SRC)/plist.h \ - $(SRC)/bool.h \ - $(SRC)/gap.h - $(CC) $(CFLAGS) -o objscoll.o -c $(SRC)/objscoll.c - objpcgel.o: ${SRC}/objpcgel.c $(SRC)/objpcgel.h $(SRC)/objfgelm.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ $(SRC)/objects.h $(SRC)/gvars.h \ @@ -970,84 +1134,81 @@ objpcgel.o: ${SRC}/objpcgel.c $(SRC)/objpcgel.h $(SRC)/objfgelm.h \ $(SRC)/gap.h $(CC) $(CFLAGS) -o objpcgel.o -c $(SRC)/objpcgel.c -sctable.o: $(SRC)/sctable.c $(SRC)/sctable.h \ +objscoll.o: ${SRC}/objscoll.c $(SRC)/objscoll.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ $(SRC)/objects.h $(SRC)/gvars.h \ $(SRC)/calls.h \ $(SRC)/lists.h $(SRC)/plist.h \ + $(SRC)/bool.h \ $(SRC)/gap.h - $(CC) $(CFLAGS) -o sctable.o -c $(SRC)/sctable.c + $(CC) $(CFLAGS) -o objscoll.o -c $(SRC)/objscoll.c -costab.o: $(SRC)/costab.c $(SRC)/costab.h \ +permutat.o: $(SRC)/permutat.c $(SRC)/permutat.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ $(SRC)/objects.h $(SRC)/gvars.h \ - $(SRC)/calls.h \ - $(SRC)/lists.h $(SRC)/plist.h \ + $(SRC)/calls.h $(SRC)/opers.h \ + $(SRC)/ariths.h $(SRC)/lists.h \ + $(SRC)/bool.h \ + $(SRC)/integer.h \ + $(SRC)/plist.h \ $(SRC)/gap.h - $(CC) $(CFLAGS) -o costab.o -c $(SRC)/costab.c - -objcftl.o: $(SRC)/objcftl.c $(SRC)/objcftl.h $(SRC)/dt.h \ - $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ - $(SRC)/objects.h $(SRC)/plist.h $(SRC)/gvars.h \ - $(SRC)/calls.h $(SRC)/records.h $(SRC)/precord.h \ - $(SRC)/gap.h $(SRC)/bool.h - $(CC) $(CFLAGS) -o objcftl.o -c $(SRC)/objcftl.c - + $(CC) $(CFLAGS) -o permutat.o -c $(SRC)/permutat.c -dt.o: $(SRC)/dt.c $(SRC)/dt.h \ +plist.o: $(SRC)/plist.c $(SRC)/plist.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ - $(SRC)/objects.h $(SRC)/bool.h $(SRC)/calls.h \ - $(SRC)/integer.h $(SRC)/gvars.h \ - $(SRC)/plist.h $(SRC)/lists.h $(SRC)/listfunc.h \ - $(SRC)/precord.h $(SRC)/records.h \ + $(SRC)/objects.h $(SRC)/gvars.h \ + $(SRC)/calls.h $(SRC)/opers.h \ + $(SRC)/ariths.h $(SRC)/lists.h \ + $(SRC)/bool.h \ + $(SRC)/range.h \ $(SRC)/gap.h - $(CC) $(CFLAGS) -o dt.o -c $(SRC)/dt.c + $(CC) $(CFLAGS) -o plist.o -c $(SRC)/plist.c -dteval.o: $(SRC)/dteval.c $(SRC)/dteval.h \ +precord.o: $(SRC)/precord.c $(SRC)/precord.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ - $(SRC)/objects.h $(SRC)/bool.h $(SRC)/calls.h \ - $(SRC)/integer.h $(SRC)/gvars.h $(SRC)/plist.h \ - $(SRC)/lists.h $(SRC)/listfunc.h $(SRC)/precord.h \ - $(SRC)/records.h \ + $(SRC)/objects.h $(SRC)/gvars.h \ + $(SRC)/calls.h $(SRC)/opers.h \ + $(SRC)/ariths.h $(SRC)/lists.h \ + $(SRC)/bool.h \ + $(SRC)/plist.h \ + $(SRC)/string.h \ $(SRC)/gap.h - $(CC) $(CFLAGS) -o dteval.o -c $(SRC)/dteval.c + $(CC) $(CFLAGS) -o precord.o -c $(SRC)/precord.c -code.o: $(SRC)/code.c $(SRC)/code.h \ +read.o: $(SRC)/read.c $(SRC)/read.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ - $(SRC)/objects.h \ + $(SRC)/objects.h $(SRC)/gvars.h \ $(SRC)/calls.h \ - $(SRC)/records.h \ - $(SRC)/integer.h \ + $(SRC)/records.h $(SRC)/lists.h \ $(SRC)/plist.h \ - $(SRC)/vars.h \ - $(SRC)/funcs.h \ + $(SRC)/string.h \ + $(SRC)/intrprtr.h \ $(SRC)/gap.h - $(CC) $(CFLAGS) -o code.o -c $(SRC)/code.c + $(CC) $(CFLAGS) -o read.o -c $(SRC)/read.c -vars.o: $(SRC)/vars.c $(SRC)/vars.h \ +saveload.o: $(SRC)/saveload.c $(SRC)/saveload.h $(SRC)/bool.h \ + $(SRC)/gap.h $(SRC)/objects.h $(SRC)/gasman.h \ + $(SRC)/system.h $(SRC)/calls.h $(SRC)/gvars.h + $(CC) $(CFLAGS) -o saveload.o -c $(SRC)/saveload.c + +sctable.o: $(SRC)/sctable.c $(SRC)/sctable.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ $(SRC)/objects.h $(SRC)/gvars.h \ $(SRC)/calls.h \ - $(SRC)/records.h $(SRC)/lists.h \ - $(SRC)/bool.h \ - $(SRC)/plist.h \ - $(SRC)/string.h \ - $(SRC)/code.h \ - $(SRC)/exprs.h $(SRC)/stats.h \ + $(SRC)/lists.h $(SRC)/plist.h \ $(SRC)/gap.h - $(CC) $(CFLAGS) -o vars.o -c $(SRC)/vars.c + $(CC) $(CFLAGS) -o sctable.o -c $(SRC)/sctable.c -exprs.o: $(SRC)/exprs.c $(SRC)/exprs.h \ +set.o: $(SRC)/set.c $(SRC)/set.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ $(SRC)/objects.h $(SRC)/gvars.h \ - $(SRC)/ariths.h $(SRC)/records.h $(SRC)/lists.h \ + $(SRC)/calls.h $(SRC)/opers.h \ + $(SRC)/ariths.h $(SRC)/lists.h \ $(SRC)/bool.h \ - $(SRC)/permutat.h \ + $(SRC)/listfunc.h \ $(SRC)/plist.h \ - $(SRC)/range.h $(SRC)/string.h \ - $(SRC)/code.h $(SRC)/vars.h \ $(SRC)/gap.h - $(CC) $(CFLAGS) -o exprs.o -c $(SRC)/exprs.c + $(CC) $(CFLAGS) -o set.o -c $(SRC)/set.c stats.o: $(SRC)/stats.c $(SRC)/stats.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ @@ -1058,102 +1219,59 @@ stats.o: $(SRC)/stats.c $(SRC)/stats.h \ $(SRC)/gap.h $(CC) $(CFLAGS) $(CFLAGS_SIG) -o stats.o -c $(SRC)/stats.c -funcs.o: $(SRC)/funcs.c $(SRC)/funcs.h \ - $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ - $(SRC)/objects.h \ - $(SRC)/calls.h \ - $(SRC)/lists.h \ - $(SRC)/plist.h \ - $(SRC)/code.h $(SRC)/vars.h \ - $(SRC)/exprs.h $(SRC)/stats.h \ - $(SRC)/gap.h - $(CC) $(CFLAGS) -o funcs.o -c $(SRC)/funcs.c - -intrprtr.o: $(SRC)/intrprtr.c $(SRC)/intrprtr.h \ - $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ - $(SRC)/objects.h $(SRC)/gvars.h \ - $(SRC)/calls.h $(SRC)/opers.h \ - $(SRC)/ariths.h $(SRC)/records.h $(SRC)/lists.h \ - $(SRC)/bool.h \ - $(SRC)/permutat.h \ - $(SRC)/plist.h \ - $(SRC)/range.h $(SRC)/string.h \ - $(SRC)/code.h $(SRC)/vars.h \ - $(SRC)/funcs.h \ - $(SRC)/gap.h $(SRC)/saveload.h - $(CC) $(CFLAGS) -o intrprtr.o -c $(SRC)/intrprtr.c - -compiler.o: $(SRC)/compiler.c $(SRC)/compiler.h \ - $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ - $(SRC)/objects.h $(SRC)/gvars.h \ - $(SRC)/calls.h \ - $(SRC)/records.h \ - $(SRC)/bool.h \ - $(SRC)/plist.h \ - $(SRC)/string.h \ - $(SRC)/code.h $(SRC)/vars.h - $(CC) $(CFLAGS) -o compiler.o -c $(SRC)/compiler.c +streams.o: $(SRC)/streams.c $(SRC)/streams.h \ + $(SRC)/system.h $(SRC)/sysfiles.h \ + $(SRC)/gasman.h $(SRC)/objects.h $(SRC)/scanner.h \ + $(SRC)/gap.h $(SRC)/read.h \ + $(SRC)/gvars.h $(SRC)/calls.h \ + $(SRC)/bool.h \ + $(SRC)/lists.h \ + $(SRC)/plist.h \ + $(SRC)/string.h + $(CC) $(CFLAGS) -o streams.o -c $(SRC)/streams.c -compiled.o: $(SRC)/compiled.c $(SRC)/compiled.h \ +tietze.o: $(SRC)/tietze.c $(SRC)/tietze.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ $(SRC)/objects.h $(SRC)/gvars.h \ - $(SRC)/calls.h \ - $(SRC)/ariths.h $(SRC)/records.h $(SRC)/lists.h \ + $(SRC)/calls.h $(SRC)/lists.h $(SRC)/plist.h \ + $(SRC)/ariths.h $(SRC)/records.h \ $(SRC)/bool.h \ - $(SRC)/integer.h \ $(SRC)/precord.h \ - $(SRC)/plist.h \ - $(SRC)/string.h \ - $(SRC)/code.h $(SRC)/vars.h \ + $(SRC)/plist.h $(SRC)/range.h \ $(SRC)/gap.h - $(CC) $(CFLAGS) -o compiled.o -c $(SRC)/compiled.c + $(CC) $(CFLAGS) -o tietze.o -c $(SRC)/tietze.c -read.o: $(SRC)/read.c $(SRC)/read.h \ +vars.o: $(SRC)/vars.c $(SRC)/vars.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ $(SRC)/objects.h $(SRC)/gvars.h \ $(SRC)/calls.h \ $(SRC)/records.h $(SRC)/lists.h \ + $(SRC)/bool.h \ $(SRC)/plist.h \ $(SRC)/string.h \ - $(SRC)/intrprtr.h \ + $(SRC)/code.h \ + $(SRC)/exprs.h $(SRC)/stats.h \ $(SRC)/gap.h - $(CC) $(CFLAGS) -o read.o -c $(SRC)/read.c + $(CC) $(CFLAGS) -o vars.o -c $(SRC)/vars.c -gap.o: $(SRC)/gap.c $(SRC)/gap.h \ +vector.o: $(SRC)/vector.c $(SRC)/vector.h \ $(SRC)/system.h $(SRC)/scanner.h $(SRC)/gasman.h \ $(SRC)/objects.h $(SRC)/gvars.h \ - $(SRC)/calls.h $(SRC)/opers.h \ - $(SRC)/ariths.h $(SRC)/records.h $(SRC)/lists.h \ + $(SRC)/ariths.h $(SRC)/lists.h \ $(SRC)/bool.h \ - $(SRC)/integer.h $(SRC)/rational.h $(SRC)/cyclotom.h \ - $(SRC)/finfield.h $(SRC)/permutat.h \ - $(SRC)/listfunc.h $(SRC)/listoper.h \ - $(SRC)/plist.h $(SRC)/set.h $(SRC)/vector.h \ - $(SRC)/blister.h $(SRC)/range.h $(SRC)/string.h \ - $(SRC)/objfgelm.h $(SRC)/objscoll.h $(SRC)/sctable.h \ - $(SRC)/costab.h \ - $(SRC)/code.h $(SRC)/vars.h \ - $(SRC)/exprs.h $(SRC)/stats.h $(SRC)/funcs.h \ - $(SRC)/intrprtr.h $(SRC)/read.h $(SRC)/saveload.h - $(CC) $(CFLAGS) -o gap.o -c $(SRC)/gap.c - -streams.o: $(SRC)/streams.c $(SRC)/streams.h \ - $(SRC)/system.h $(SRC)/sysfiles.h \ - $(SRC)/gasman.h $(SRC)/objects.h $(SRC)/scanner.h \ - $(SRC)/gap.h $(SRC)/read.h $(SRC)/gvars.h \ - $(SRC)/calls.h $(SRC)/lists.h $(SRC)/plist.h \ - $(SRC)/bool.h $(SRC)/string.h - $(CC) $(CFLAGS) -o streams.o -c $(SRC)/streams.c + $(SRC)/integer.h \ + $(SRC)/plist.h \ + $(SRC)/range.h \ + $(SRC)/listoper.h \ + $(SRC)/gap.h + $(CC) $(CFLAGS) -o vector.o -c $(SRC)/vector.c -compstat.o: $(SRC)/compstat.c $(SRC)/compstat.h \ - $(SRC)/system.h - $(CC) $(CFLAGS) -o compstat.o -c $(SRC)/compstat.c +weakptr.o: $(SRC)/weakptr.c $(SRC)/weakptr.h $(SRC)/objects.h \ + $(SRC)/gasman.h $(SRC)/system.h $(SRC)/gap.h \ + $(SRC)/gvars.h $(SRC)/bool.h $(SRC)/lists.h \ + $(SRC)/calls.h $(SRC)/opers.h $(SRC)/plist.h + $(CC) $(CFLAGS) -o weakptr.o -c $(SRC)/weakptr.c -saveload.o: $(SRC)/saveload.c $(SRC)/saveload.h $(SRC)/bool.h \ - $(SRC)/gap.h $(SRC)/objects.h $(SRC)/gasman.h \ - $(SRC)/system.h $(SRC)/calls.h $(SRC)/gvars.h - $(CC) $(CFLAGS) -o saveload.o -c $(SRC)/saveload.c - ############################################################################# ## diff --git a/src/ariths.c b/src/ariths.c index ac48b7f2aa..6e5045d5e2 100644 --- a/src/ariths.c +++ b/src/ariths.c @@ -18,11 +18,11 @@ SYS_CONST char * Revision_ariths_c = #include "objects.h" /* objects */ #include "scanner.h" /* scanner */ -#include "gap.h" /* error handling */ +#include "gap.h" /* error handling, initialisation */ #include "gvars.h" /* global variables */ #include "calls.h" /* generic call mechanism */ -#include "opers.h" /* operation, property, attribute */ +#include "opers.h" /* generic operations */ #define INCLUDE_DECLARATION_PART #include "ariths.h" /* basic arithmetic */ @@ -30,50 +30,11 @@ SYS_CONST char * Revision_ariths_c = #include "bool.h" /* booleans */ +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ -/**************************************************************************** -** - -*T CompaMethod . . . . . . . . . . type of methods for comparison operations -** -** 'CompaMethod' is the type of methods for comparison operations, i.e., a -** function accepting two arguments of type 'Obj' and returning an 'Int'. -** -** 'CompaMethod' is defined in the declaration part of this package as -** follows -** -typedef Int (* CompaMethod) ( Obj opL, Obj opR ); -*/ - - -/**************************************************************************** -** -*T ArithMethod1 . . . . . . . . . type of methods for arithmetic operations -** -** 'ArithMethod1' is the type of methods for unary arithmetic operations, -** i.e., a function accepting one argument of type 'Obj' and returning an -** 'Obj'. -** -** 'ArithMethod1' is defined in the declaration part of this package as -** follows -** -typedef Obj (* ArithMethod1) ( Obj op ); -*/ - - -/**************************************************************************** -** -*T ArithMethod2 . . . . . . . . . type of methods for arithmetic operations -** -** 'ArithMethod2' is the type of methods for binary arithmetic operations, -** i.e., a function accepting two arguments of type 'Obj' and returning an -** 'Obj'. -** -** 'ArithMethod2' is defined in the declaration part of this package as -** follows -** -typedef Obj (* ArithMethod2) ( Obj opL, Obj opR ); -*/ +#include "lists.h" /* generic lists */ +#include "string.h" /* strings */ /**************************************************************************** @@ -524,8 +485,8 @@ Int InUndefined ( { return (ErrorReturnObj( "operations: IN of %s and %s is not defined", - (Int)(InfoBags[TNUM_OBJ(opL)].name), - (Int)(InfoBags[TNUM_OBJ(opR)].name), + (Int)TNAM_OBJ(opL), + (Int)TNAM_OBJ(opR), "you can return a value for the result" ) == True); } @@ -1368,20 +1329,17 @@ void InstallModObject ( Int verb ) /**************************************************************************** ** -*F InitAriths() . . . . . . . initialize the arithmetic operations package +*F SetupAriths() . . . . . . . initialize the arithmetic operations package ** ** 'InitAriths' initializes the arithmetic operations package. */ -void InitAriths ( void ) +void SetupAriths ( void ) { UInt t1; /* type of left operand */ UInt t2; /* type of right operand */ /* make and install the 'ZERO' arithmetic operation */ - C_NEW_GVAR_ATTR( "ZERO", "op", ZeroAttr, ZeroHandler, - "src/ariths.c:ZERO" ); - for ( t1 = FIRST_REAL_TNUM; t1 <= LAST_VIRTUAL_TNUM; t1++ ) { ZeroFuncs[t1] = ZeroObject; } @@ -1389,9 +1347,6 @@ void InitAriths ( void ) /* make and install the 'AINV' arithmetic operation */ - C_NEW_GVAR_ATTR( "AINV", "op", AInvAttr, AInvHandler, - "src/ariths.c:AINV" ); - for ( t1 = FIRST_REAL_TNUM; t1 <= LAST_VIRTUAL_TNUM; t1++ ) { AInvFuncs[t1] = AInvObject; } @@ -1399,9 +1354,6 @@ void InitAriths ( void ) /* make and install the 'ONE' arithmetic operation */ - C_NEW_GVAR_ATTR( "ONE", "op", OneAttr, OneHandler, - "src/ariths.c:ONE" ); - for ( t1 = FIRST_REAL_TNUM; t1 <= LAST_VIRTUAL_TNUM; t1++ ) { OneFuncs[t1] = OneObject; } @@ -1409,9 +1361,6 @@ void InitAriths ( void ) /* make and install the 'INV' arithmetic operation */ - C_NEW_GVAR_ATTR( "INV", "op", InvAttr, InvHandler, - "src/ariths.c:INV" ); - for ( t1 = FIRST_REAL_TNUM; t1 <= LAST_VIRTUAL_TNUM; t1++ ) { InvFuncs[t1] = InvObject; } @@ -1419,9 +1368,6 @@ void InitAriths ( void ) /* make and install the 'EQ' comparison operation */ - C_NEW_GVAR_OPER( "EQ", 2L, "opL, opR", EqOper, EqHandler, - "src/ariths.c:EQ" ); - for ( t1 = FIRST_REAL_TNUM; t1 <= LAST_VIRTUAL_TNUM; t1++ ) { for ( t2 = FIRST_REAL_TNUM; t2 <= LAST_VIRTUAL_TNUM; t2++ ) { EqFuncs[t1][t2] = EqNot; @@ -1431,9 +1377,6 @@ void InitAriths ( void ) /* make and install the 'LT' comparison operation */ - C_NEW_GVAR_OPER( "LT", 2L, "opL, opR", LtOper, LtHandler, - "src/ariths.c:LT" ); - for ( t1 = FIRST_REAL_TNUM; t1 <= LAST_VIRTUAL_TNUM; t1++ ) { for ( t2 = FIRST_REAL_TNUM; t2 <= LAST_VIRTUAL_TNUM; t2++ ) { LtFuncs[t1][t2] = LtObject; @@ -1443,9 +1386,6 @@ void InitAriths ( void ) /* make and install the 'IN' comparison operation */ - C_NEW_GVAR_OPER( "IN", 2L, "opL, opR", InOper, InHandler, - "src/ariths.c:IN" ); - for ( t1 = FIRST_REAL_TNUM; t1 <= LAST_VIRTUAL_TNUM; t1++ ) { for ( t2 = FIRST_REAL_TNUM; t2 <= LAST_VIRTUAL_TNUM; t2++ ) { InFuncs[t1][t2] = InUndefined; @@ -1455,9 +1395,6 @@ void InitAriths ( void ) /* make and install the 'SUM' arithmetic operation */ - C_NEW_GVAR_OPER( "SUM", 2L, "opL, opR", SumOper, SumHandler, - "src/ariths.c:SUM" ); - for ( t1 = FIRST_REAL_TNUM; t1 <= LAST_VIRTUAL_TNUM; t1++ ) { for ( t2 = FIRST_REAL_TNUM; t2 <= LAST_VIRTUAL_TNUM; t2++ ) { SumFuncs[t1][t2] = SumObject; @@ -1467,11 +1404,6 @@ void InitAriths ( void ) /* make and install the 'DIFF' arithmetic operation */ - C_NEW_GVAR_OPER( "DIFF", 2L, "opL, opR", DiffOper, DiffHandler, - "src/ariths.c:DIFF" ); - C_NEW_GVAR_FUNC( "DIFF_DEFAULT", 2L, "opL, opR", DiffDefaultHandler, - "src/ariths.c:DIFF_DEFAULT" ); - for ( t1 = FIRST_REAL_TNUM; t1 <= LAST_VIRTUAL_TNUM; t1++ ) { for ( t2 = FIRST_REAL_TNUM; t2 <= LAST_VIRTUAL_TNUM; t2++ ) { DiffFuncs[t1][t2] = DiffDefault; @@ -1481,9 +1413,6 @@ void InitAriths ( void ) /* make and install the 'PROD' arithmetic operation */ - C_NEW_GVAR_OPER( "PROD", 2L, "opL, opR", ProdOper, ProdHandler, - "src/ariths.c:PROD" ); - for ( t1 = FIRST_REAL_TNUM; t1 <= LAST_VIRTUAL_TNUM; t1++ ) { for ( t2 = FIRST_REAL_TNUM; t2 <= LAST_VIRTUAL_TNUM; t2++ ) { ProdFuncs[t1][t2] = ProdObject; @@ -1493,11 +1422,6 @@ void InitAriths ( void ) /* make and install the 'QUO' arithmetic operation */ - C_NEW_GVAR_OPER( "QUO", 2L, "opL, opR", QuoOper, QuoHandler, - "src/ariths.c:QUO" ); - C_NEW_GVAR_FUNC( "QUO_DEFAULT", 2L, "opL, opR", QuoDefaultHandler, - "src/ariths.c:QUO_DEFAULT" ); - for ( t1 = FIRST_REAL_TNUM; t1 <= LAST_VIRTUAL_TNUM; t1++ ) { for ( t2 = FIRST_REAL_TNUM; t2 <= LAST_VIRTUAL_TNUM; t2++ ) { QuoFuncs[t1][t2] = QuoDefault; @@ -1507,11 +1431,6 @@ void InitAriths ( void ) /* make and install the 'LQUO' arithmetic operation */ - C_NEW_GVAR_OPER( "LQUO", 2L, "opL, opR", LQuoOper, LQuoHandler, - "src/ariths.c:LQUO" ); - C_NEW_GVAR_FUNC( "LQUO_DEFAULT", 2L, "opL, opR", LQuoDefaultHandler, - "src/ariths.c:LQUO_DEFAULT" ); - for ( t1 = FIRST_REAL_TNUM; t1 <= LAST_VIRTUAL_TNUM; t1++ ) { for ( t2 = FIRST_REAL_TNUM; t2 <= LAST_VIRTUAL_TNUM; t2++ ) { LQuoFuncs[t1][t2] = LQuoDefault; @@ -1521,11 +1440,6 @@ void InitAriths ( void ) /* make and install the 'POW' arithmetic operation */ - C_NEW_GVAR_OPER( "POW", 2L, "opL, opR", PowOper, PowHandler, - "src/ariths.c:POW" ); - C_NEW_GVAR_FUNC( "POW_DEFAULT", 2L, "opL, opR", PowDefaultHandler, - "src/ariths.c:POW_DEFAULT" ); - for ( t1 = FIRST_REAL_TNUM; t1 <= LAST_VIRTUAL_TNUM; t1++ ) { for ( t2 = FIRST_REAL_TNUM; t2 <= LAST_VIRTUAL_TNUM; t2++ ) { PowFuncs[t1][t2] = PowObject; @@ -1535,11 +1449,6 @@ void InitAriths ( void ) /* make and install the 'COMM' arithmetic operation */ - C_NEW_GVAR_OPER( "COMM", 2L, "opL, opR", CommOper, CommHandler, - "src/ariths.c:COMM" ); - C_NEW_GVAR_FUNC( "COMM_DEFAULT", 2L, "opL, opR", CommDefaultHandler, - "src/ariths.c:COMM_DEFAULT" ); - for ( t1 = FIRST_REAL_TNUM; t1 <= LAST_VIRTUAL_TNUM; t1++ ) { for ( t2 = FIRST_REAL_TNUM; t2 <= LAST_VIRTUAL_TNUM; t2++ ) { CommFuncs[t1][t2] = CommDefault; @@ -1549,9 +1458,6 @@ void InitAriths ( void ) /* make and install the 'MOD' arithmetic operation */ - C_NEW_GVAR_OPER( "MOD", 2L, "opL, opR", ModOper, ModHandler, - "src/ariths.c:MOD" ); - for ( t1 = FIRST_REAL_TNUM; t1 <= LAST_VIRTUAL_TNUM; t1++ ) { for ( t2 = FIRST_REAL_TNUM; t2 <= LAST_VIRTUAL_TNUM; t2++ ) { ModFuncs[t1][t2] = ModObject; @@ -1561,8 +1467,123 @@ void InitAriths ( void ) } +/**************************************************************************** +** +*F InitAriths() . . . . . . . initialize the arithmetic operations package +** +** 'InitAriths' initializes the arithmetic operations package. +*/ +void InitAriths ( void ) +{ + /* make and install the 'ZERO' arithmetic operation */ + C_NEW_GVAR_ATTR( "ZERO", "op", ZeroAttr, ZeroHandler, + "src/ariths.c:ZERO" ); + + + /* make and install the 'AINV' arithmetic operation */ + C_NEW_GVAR_ATTR( "AINV", "op", AInvAttr, AInvHandler, + "src/ariths.c:AINV" ); + + + /* make and install the 'ONE' arithmetic operation */ + C_NEW_GVAR_ATTR( "ONE", "op", OneAttr, OneHandler, + "src/ariths.c:ONE" ); + + + /* make and install the 'INV' arithmetic operation */ + C_NEW_GVAR_ATTR( "INV", "op", InvAttr, InvHandler, + "src/ariths.c:INV" ); + + + /* make and install the 'EQ' comparison operation */ + C_NEW_GVAR_OPER( "EQ", 2L, "opL, opR", EqOper, EqHandler, + "src/ariths.c:EQ" ); + + + /* make and install the 'LT' comparison operation */ + C_NEW_GVAR_OPER( "LT", 2L, "opL, opR", LtOper, LtHandler, + "src/ariths.c:LT" ); + + + /* make and install the 'IN' comparison operation */ + C_NEW_GVAR_OPER( "IN", 2L, "opL, opR", InOper, InHandler, + "src/ariths.c:IN" ); + + + /* make and install the 'SUM' arithmetic operation */ + C_NEW_GVAR_OPER( "SUM", 2L, "opL, opR", SumOper, SumHandler, + "src/ariths.c:SUM" ); + + + /* make and install the 'DIFF' arithmetic operation */ + C_NEW_GVAR_OPER( "DIFF", 2L, "opL, opR", DiffOper, DiffHandler, + "src/ariths.c:DIFF" ); + C_NEW_GVAR_FUNC( "DIFF_DEFAULT", 2L, "opL, opR", DiffDefaultHandler, + "src/ariths.c:DIFF_DEFAULT" ); + + + /* make and install the 'PROD' arithmetic operation */ + C_NEW_GVAR_OPER( "PROD", 2L, "opL, opR", ProdOper, ProdHandler, + "src/ariths.c:PROD" ); + + + /* make and install the 'QUO' arithmetic operation */ + C_NEW_GVAR_OPER( "QUO", 2L, "opL, opR", QuoOper, QuoHandler, + "src/ariths.c:QUO" ); + C_NEW_GVAR_FUNC( "QUO_DEFAULT", 2L, "opL, opR", QuoDefaultHandler, + "src/ariths.c:QUO_DEFAULT" ); + + + /* make and install the 'LQUO' arithmetic operation */ + C_NEW_GVAR_OPER( "LQUO", 2L, "opL, opR", LQuoOper, LQuoHandler, + "src/ariths.c:LQUO" ); + C_NEW_GVAR_FUNC( "LQUO_DEFAULT", 2L, "opL, opR", LQuoDefaultHandler, + "src/ariths.c:LQUO_DEFAULT" ); + + + /* make and install the 'POW' arithmetic operation */ + C_NEW_GVAR_OPER( "POW", 2L, "opL, opR", PowOper, PowHandler, + "src/ariths.c:POW" ); + C_NEW_GVAR_FUNC( "POW_DEFAULT", 2L, "opL, opR", PowDefaultHandler, + "src/ariths.c:POW_DEFAULT" ); + + + /* make and install the 'COMM' arithmetic operation */ + C_NEW_GVAR_OPER( "COMM", 2L, "opL, opR", CommOper, CommHandler, + "src/ariths.c:COMM" ); + C_NEW_GVAR_FUNC( "COMM_DEFAULT", 2L, "opL, opR", CommDefaultHandler, + "src/ariths.c:COMM_DEFAULT" ); + + + /* make and install the 'MOD' arithmetic operation */ + C_NEW_GVAR_OPER( "MOD", 2L, "opL, opR", ModOper, ModHandler, + "src/ariths.c:MOD" ); +} + + +/**************************************************************************** +** +*F CheckAriths() . check initialisation of the arithmetic operations package +*/ +void CheckAriths ( void ) +{ + SET_REVISION( "ariths_c", Revision_ariths_c ); + SET_REVISION( "ariths_h", Revision_ariths_h ); +} + + /**************************************************************************** ** *E ariths.c . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here */ + + + + + + + + + + diff --git a/src/ariths.h b/src/ariths.h index 16469401e5..606dc56f49 100644 --- a/src/ariths.h +++ b/src/ariths.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -*W ariths.c GAP source Frank Celler +*W ariths.h GAP source Frank Celler *W & Martin Schoenert ** *H @(#)$Id$ @@ -606,6 +606,15 @@ extern void InstallModObject ( Int ); /**************************************************************************** ** +*F SetupAriths() . . . . . . . initialize the arithmetic operations package +** +** 'InitAriths' initializes the arithmetic operations package. +*/ +extern void SetupAriths ( void ); + + +/**************************************************************************** +** *F InitAriths() . . . . . . . initialize the arithmetic operations package ** ** 'InitAriths' initializes the arithmetic operations package. @@ -613,6 +622,13 @@ extern void InstallModObject ( Int ); extern void InitAriths ( void ); +/**************************************************************************** +** +*F CheckAriths() . check initialisation of the arithmetic operations package +*/ +extern void CheckAriths ( void ); + + /**************************************************************************** ** diff --git a/src/blister.c b/src/blister.c index 2319493382..9ecaeb62a6 100644 --- a/src/blister.c +++ b/src/blister.c @@ -1,6 +1,7 @@ /**************************************************************************** ** -*W blister.c GAP source Martin Schoenert +*W blister.c GAP source Frank Celler +*W & Martin Schoenert ** *H @(#)$Id$ ** @@ -57,15 +58,15 @@ ** the other parts of the {\GAP} kernel can access and modify boolean lists ** without actually being aware that they are dealing with a boolean list. ** -** The third part consists of the functions 'IsBlist', 'FuncIsBlist', +** The third part consists of the functions 'IsBlistConv', 'FuncIsBlist', ** 'FuncBLIST_LIST', 'FuncLIST_BLIST', 'FuncSIZE_BLIST', 'FuncIS_SUB_BLIST', -** 'FuncUNITE_BLIST', 'FuncINTER_BLIST', and 'FuncSUBTR_BLIST'. These -** functions make it possible to make boolean lists, either by converting a +** 'FuncUNITE_BLIST', 'FuncINTER_BLIST', and 'FuncSUBTR_BLIST'. These +** functions make it possible to make boolean lists, either by converting a ** list to a boolean list, or by computing the characteristic boolean list -** of a sublist, or by computing the union, intersection or difference of +** of a sublist, or by computing the union, intersection or difference of ** two boolean lists. ** -*N 1992/12/16 martin should have 'LtBlist' +*N 1992/12/16 martin should have 'LtBlist' */ #include "system.h" /* system dependent part */ @@ -76,234 +77,49 @@ SYS_CONST char * Revision_blister_c = #include "objects.h" /* objects */ #include "scanner.h" /* scanner */ -#include "gap.h" /* error handling */ +#include "gap.h" /* error handling, initialisation */ #include "gvars.h" /* global variables */ #include "calls.h" /* generic call mechanism */ -#include "opers.h" /* generic operations package */ +#include "opers.h" /* generic operations */ #include "ariths.h" /* basic arithmetic */ -#include "lists.h" /* generic list package */ #include "bool.h" /* booleans */ +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ + +#include "lists.h" /* generic lists */ #include "plist.h" /* plain lists */ #include "set.h" /* plain sets */ - #define INCLUDE_DECLARATION_PART #include "blister.h" /* boolean lists */ #undef INCLUDE_DECLARATION_PART +#include "range.h" /* ranges */ +#include "string.h" /* strings */ -#include "range.h" /* GET_LEN_RANGE, GET_LOW_RANGE,...*/ - -#include "gap.h" /* Error */ - - -/**************************************************************************** -** -*V BIPEB . . . . . . . . . . . . . . . . . . . . . . . . . . bits per block -** -** 'BIPEB' is the number of bits per block, where a block fills a UInt, which -** must be the same size as a bag identifier. -** -** 'BIPEB' is defined in the declaration part of this package as -** follows: -** - -#define BIPEB (sizeof(UInt) * 8L) - -*/ - - - -/**************************************************************************** -** - -*F PLEN_SIZE_BLIST() . . physical length from size for a boolean list -** -** 'PLEN_SIZE_BLIST' computes the physical length (e.g. the number of -** elements that could be stored in a list) from the (as reported by -** 'SIZE') for a boolean list. -** -** Note that 'PLEN_SIZE_BLIST' is a macro, so do not call it with arguments -** that have sideeffects. -** -** 'PLEN_SIZE_BLIST' is defined in the declaration part of this package as -** follows: -** +#include "gap.h" /* error handling, initialisation */ - -#define PLEN_SIZE_BLIST(size) \ - ((((size)-sizeof(Obj))/sizeof(UInt)) * BIPEB) -*/ - -/**************************************************************************** -** -*F SIZE_PLEN_BLIST()size for a boolean list with given physical length -** -** 'SIZE_PLEN_BLIST' returns the size that a boolean list with room for -** elements must at least have. -** -** Note that 'SIZE_PLEN_BLIST' is a macro, so do not call it with arguments -** that have sideeffects. -** -** 'SIZE_PLEN_BLIST' is defined in the declaration part of this package as -** follows: -** -#define SIZE_PLEN_BLIST(plen) \ - (sizeof(Obj)+((plen)+BIPEB-1)/BIPEB*sizeof(UInt)) -*/ - - -/**************************************************************************** -** -*F LEN_BLIST() . . . . . . . . . . . . . . . length of a boolean list -** -** 'LEN_BLIST' returns the logical length of the boolean list , as a C -** integer. -** -** Note that 'LEN_BLIST' is a macro, so do not call it with arguments that -** have sideeffects. -** -** 'LEN_BLIST' is defined in the declaration part of this package as -** follows: -** -#define LEN_BLIST(list) \ - (INT_INTOBJ(ADDR_OBJ(list)[0])) -*/ - - -/*************************************************************************** -** -*F NUMBER_BLOCKS_BLIST() . . . . . . . number of UInt blocks in list -** -** -** 'NUMBER_BLOCKS_BLIST' is defined in the declaration part of this package -** as follows: -** -#define NUMBER_BLOCKS_BLIST( blist ) ((LEN_BLIST((blist)) + BIPEB -1)/BIPEB) -*/ - - -/**************************************************************************** -** -*F SET_LEN_BLIST(,) . . . . . . set the length of a boolean list -** -** 'SET_LEN_BLIST' sets the length of the boolean list to the value -** , which must be a positive C integer. -** -** Note that 'SET_LEN_BLIST' is a macro, so do not call it with arguments -** that have sideeffects. -** -** 'SET_LEN_BLIST' is defined in the declaration part of this package as -** follows: -** -#define SET_LEN_BLIST(list,len) \ - (ADDR_OBJ(list)[0] = INTOBJ_INT(len)) -*/ - -/**************************************************************************** -** -*F BLOCKS_BLIST( ) . . . . . . . . first block of a boolean list -** -** returns a pointer to the start of the data of the Boolean list -** -** - -#define BLOCKS_BLIST( list ) ((UInt*)(ADDR_OBJ(list)+1)) -*/ -/**************************************************************************** -** -*F BLOCK_ELM_BLIST(,) . . . . . . . . . .block of a boolean list -** -** 'BLOCK_ELM_BLIST' return the block containing the -th element of -** the boolean list as a UInt value, which is also a valid left -** hand side. -** must be a positive integer less than -** or equal to the length of . -** -** Note that 'BLOCK_ELM_BLIST' is a macro, so do not call it with arguments -** that have sideeffects. - - -#define BLOCK_ELM_BLIST(list, pos) (BLOCKS_BLIST( list )[((pos)-1)/BIPEB]) -*/ - -/**************************************************************************** -** -*F MASK_POS_BLIST() . . . . . .bit mask for position of a Boolean list -** -** MASK_POS_BLIST() returns a UInt with a single set bit in position -** (pos-1) % BIPEB, useful for accessing the pos'th element of a blist -** -** Note that 'MASK_POS_BLIST' is a macro, so do not call it with arguments -** that have sideeffects. -** -** 'MASK_POS_BLIST' is defined in the declaration part of this package as -** follows: -** - - -#define MASK_POS_BLIST( pos ) (((UInt) 1)<<((pos)-1)%BIPEB) - -*/ - -/**************************************************************************** -** -*F ELM_BLIST(,) . . . . . . . . . . . . element of a boolean list -** -** 'ELM_BLIST' return the -th element of the boolean list , which -** is either 'true' or 'false'. must be a positive integer less than -** or equal to the length of . -** -** Note that 'ELM_BLIST' is a macro, so do not call it with arguments that -** have sideeffects. -** -** 'ELM_BLIST' is defined in the declaration part of this package as -** follows: -** -#define ELM_BLIST(list,pos) \ - BLOCK_ELM_BLIST(list,pos) & MASK_POS_BLIST(pos) ? True : False -*/ +#include "saveload.h" /* saving and loading */ /**************************************************************************** ** -*F SET_ELM_BLIST(,,) . . . set an element of a boolean list -** -** 'SET_ELM_BLIST' sets the element at position in the boolean list -** to the value . must be a positive integer less than or -** equal to the length of . must be either 'true' or 'false'. -** -** Note that 'SET_ELM_BLIST' is a macro, so do not call it with arguments -** that have sideeffects. -** -** 'SET_ELM_BLIST' is defined in the declaration part of this package as -** follows: - -#define SET_ELM_BLIST(list,pos,val) \ - ((val) == True ? \ - (BLOCK_ELM_BLIST(list, pos) |= MASK_POS_BLIST(pos)) : \ - (BLOCK_ELM_BLIST(list, pos) &= ~MASK_POS_BLIST(pos))) -*/ - - -/**************************************************************************** -** *F TypeBlist() . . . . . . . . . . . . . . . . kind of a boolean list ** ** 'TypeBlist' returns the kind of a boolean list. ** ** 'TypeBlist' is the function in 'KindObjFuncs' for boolean lists. */ -extern Obj KIND_LIST_EMPTY_MUTABLE; -extern Obj KIND_LIST_EMPTY_IMMUTABLE; +extern Obj KIND_LIST_EMPTY_MUTABLE; +extern Obj KIND_LIST_EMPTY_IMMUTABLE; -extern Obj KIND_LIST_HOM; +extern Obj KIND_LIST_HOM; -Obj TypeBlist ( +Obj TypeBlist ( Obj list ) { Obj kind; /* kind, result */ @@ -313,7 +129,7 @@ Obj TypeBlist ( /* special case for the empty blist */ if ( LEN_BLIST(list) == 0 ) { - if ( ! IS_IMM_BLIST(list) ) { + if ( IS_MUTABLE_OBJ(list) ) { return TYPE_LIST_EMPTY_MUTABLE; } else { @@ -332,7 +148,7 @@ Obj TypeBlist ( kind = ELM0_LIST( kinds, ktype-T_BLIST+1 ); if ( kind == 0 ) { kind = CALL_2ARGS( TYPE_LIST_HOM, - family, INTOBJ_INT(ktype-T_BLIST+1) ); + family, INTOBJ_INT(ktype-T_BLIST+1) ); ASS_LIST( kinds, ktype-T_BLIST+1, kind ); } @@ -341,6 +157,49 @@ Obj TypeBlist ( } +/**************************************************************************** +** +*F SaveBlist( ) . . . . . . . . . . . . . . . . . . . . . save a blist +** +** The saving method for the blist tnums +*/ +void SaveBlist ( + Obj bl ) +{ + UInt i; + UInt * ptr; + + /* logical length */ + SaveSubObj(ADDR_OBJ(bl)[0]); + ptr = BLOCKS_BLIST(bl); + for (i = 1; i <= NUMBER_BLOCKS_BLIST( bl ); i++ ) + SaveUInt(*ptr); + return; +} + +/**************************************************************************** +** +*F LoadBlist( ) . . . . . . . . . . . . . . . . . . . . . load a blist +** +** The loading method for the blist tnums +*/ +void LoadBlist ( + Obj bl ) +{ + UInt i; + UInt * ptr; + + /* get the length back, then NUMBER_BLOCKS_BLIST is OK */ + ADDR_OBJ(bl)[0] = LoadSubObj(); + + /* Now load the real data */ + ptr = (UInt *)BLOCKS_BLIST(bl); + for (i = 1; i <= NUMBER_BLOCKS_BLIST( bl ); i++ ) + *ptr++ = LoadUInt(); + return; +} + + /**************************************************************************** ** @@ -374,8 +233,8 @@ Obj CopyBlist ( Int mut ) { Obj copy; /* handle of the copy, result */ - UInt * l; /* pointer into the list */ - UInt * c; /* pointer into the copy */ + UInt * l; /* pointer into the list */ + UInt * c; /* pointer into the copy */ UInt i; /* loop variable */ /* don't change immutable objects */ @@ -397,7 +256,7 @@ Obj CopyBlist ( CHANGED_BAG( list ); /* now it is copied */ - RetypeBag( list, TNUM_OBJ(list) + COPYING ); + MARK_LIST( list, COPYING ); /* copy the subvalues */ l = (UInt*)(ADDR_OBJ(list)+1); @@ -443,7 +302,7 @@ void CleanBlistCopy ( ADDR_OBJ(list)[0] = ADDR_OBJ( ADDR_OBJ(list)[0] )[0]; /* now it is cleaned */ - RetypeBag( list, TNUM_OBJ(list) - COPYING ); + UNMARK_LIST( list, COPYING ); } @@ -776,13 +635,13 @@ void AssBlist ( /* if is less than the logical length and is 'true' */ if ( pos <= LEN_BLIST(list) && val == True ) { SET_ELM_BLIST( list, pos, True ); - RetypeBag( list, T_BLIST ); + CLEAR_FILTS_LIST(list); } /* if is less than the logical length and is 'false' */ else if ( pos <= LEN_BLIST(list) && val == False ) { SET_ELM_BLIST( list, pos, False ); - RetypeBag( list, T_BLIST ); + CLEAR_FILTS_LIST(list); } /* if is one more than the logical length and is 'true' */ @@ -791,22 +650,22 @@ void AssBlist ( ResizeBag( list, SIZE_PLEN_BLIST(pos) ); SET_LEN_BLIST( list, pos ); SET_ELM_BLIST( list, pos, True ); - RetypeBag( list, T_BLIST ); + CLEAR_FILTS_LIST(list); } - /* if is one more than the logical length and is 'true' */ + /* if is one more than the logical length and is 'false' */ else if ( pos == LEN_BLIST(list)+1 && val == False ) { if ( SIZE_OBJ(list) < SIZE_PLEN_BLIST(pos) ) ResizeBag( list, SIZE_PLEN_BLIST(pos) ); SET_LEN_BLIST( list, pos ); SET_ELM_BLIST( list, pos, False ); - RetypeBag( list, T_BLIST ); + CLEAR_FILTS_LIST(list); } /* otherwise convert to ordinary list and assign as in 'AssList' */ else { - PLAIN_LIST( list ); - RetypeBag( list, T_PLIST ); + PLAIN_LIST(list); + CLEAR_FILTS_LIST(list); if ( LEN_PLIST(list) < pos ) { GROW_PLIST( list, (UInt)pos ); SET_LEN_PLIST( list, pos ); @@ -855,8 +714,8 @@ void AsssBlist ( Obj vals ) { /* convert to a plain list */ - PLAIN_LIST( list ); - RetypeBag( list, T_PLIST ); + PLAIN_LIST(list); + CLEAR_FILTS_LIST(list); /* and delegate */ ASSS_LIST( list, poss, vals ); @@ -879,91 +738,6 @@ void AsssBlistImm ( } -/**************************************************************************** -** -*F IsDenseBlist( ) . . . dense list test function for boolean lists -** -** 'IsDenseBlist' returns 1, since boolean lists are always dense. -** -** 'IsDenseBlist' is the function in 'IsDenseBlistFuncs' for boolean lists. -*/ -Int IsDenseBlist ( - Obj list ) -{ - return 1L; -} - - -/**************************************************************************** -** -*F IsHomogBlist( ) . . . . . . . . . . check if is homogenous -*/ -Int IsHomogBlist ( - Obj list ) -{ - return (0 < LEN_BLIST(list)); -} - - -/**************************************************************************** -** -*F IsSSortBlist( ) . . . . . . . check if is strictly sorted -*/ -Int IsSSortBlist ( - Obj list ) -{ - Int isSort; - if ( LEN_BLIST(list) <= 1 ) { - isSort = 1; - } - else if ( LEN_BLIST(list) == 2 ) { - isSort = (ELM_BLIST(list,1) == True && ELM_BLIST(list,2) == False); - } - else { - isSort = 0; - } - RetypeBag( list, (isSort ? T_BLIST_SSORT : T_BLIST_NSORT) - + IS_IMM_BLIST(list) ); - return isSort; -} - - -/**************************************************************************** -** -*F IsSSortBlistNot( ) . . . . . . . . . . . . . unsorted boolean list -*/ -Int IsSSortBlistNot ( - Obj list ) -{ - return 0L; -} - - -/**************************************************************************** -** -*F IsSSortBlistYes( ) . . . . . . . . . . . . . . sorted boolean list -*/ -Int IsSSortBlistYes ( - Obj list ) -{ - return 1L; -} - - -/**************************************************************************** -** -*F IsPossBlist( ) . . positions list test function for boolean lists -** -** 'IsPossBlist' returns 1 if is empty, and 0 otherwise, since a -** boolean list is a positions list if and only if it is empty. -*/ -Int IsPossBlist ( - Obj list ) -{ - return LEN_BLIST(list) == 0; -} - - /**************************************************************************** ** *F PosBlist( , , ) position of an elm in a boolean list @@ -1057,8 +831,8 @@ void PlainBlist ( UInt i; /* loop variable */ /* resize the list and retype it, in this order */ - len = LEN_BLIST( list ); - RetypeBag( list, T_PLIST ); + len = LEN_BLIST(list); + RetypeBag( list, IS_MUTABLE_OBJ(list) ? T_PLIST : T_PLIST+IMMUTABLE ); GROW_PLIST( list, (UInt)len ); SET_LEN_PLIST( list, len ); @@ -1071,32 +845,205 @@ void PlainBlist ( } + +/**************************************************************************** +** +*F IsPossBlist( ) . . positions list test function for boolean lists +** +** 'IsPossBlist' returns 1 if is empty, and 0 otherwise, since a +** boolean list is a positions list if and only if it is empty. +*/ +Int IsPossBlist ( + Obj list ) +{ + return LEN_BLIST(list) == 0; +} + + +/**************************************************************************** +** + +*F IsDenseBlist( ) . . . dense list test function for boolean lists +** +** 'IsDenseBlist' returns 1, since boolean lists are always dense. +** +** 'IsDenseBlist' is the function in 'IsDenseBlistFuncs' for boolean lists. +*/ +Int IsDenseBlist ( + Obj list ) +{ + return 1L; +} + + +/**************************************************************************** +** +*F IsHomogBlist( ) . . . . . . . . . . check if is homogenous +*/ +Int IsHomogBlist ( + Obj list ) +{ + return (0 < LEN_BLIST(list)); +} + + +/**************************************************************************** +** +*F IsSSortBlist( ) . . . . . . . check if is strictly sorted +*/ +Int IsSSortBlist ( + Obj list ) +{ + Int isSort; + + if ( LEN_BLIST(list) <= 1 ) { + isSort = 1; + } + else if ( LEN_BLIST(list) == 2 ) { + isSort = (ELM_BLIST(list,1) == True && ELM_BLIST(list,2) == False); + } + else { + isSort = 0; + } + SET_FILT_LIST( list, (isSort ? FN_IS_SSORT : FN_IS_NSORT) ); + + return isSort; +} + + +/**************************************************************************** +** +*F IsSSortBlistNot( ) . . . . . . . . . . . . . unsorted boolean list +*/ +Int IsSSortBlistNot ( + Obj list ) +{ + return 0L; +} + + +/**************************************************************************** +** +*F IsSSortBlistYes( ) . . . . . . . . . . . . . . sorted boolean list +*/ +Int IsSSortBlistYes ( + Obj list ) +{ + return 1L; +} + + +/**************************************************************************** +** + +*F ConvBlist( ) . . . . . . . . . convert a list into a boolean list +** +** `ConvBlist' changes the representation of boolean lists into the compact +** representation of type 'T_BLIST' described above. +*/ +void ConvBlist ( + Obj list ) +{ + Int len; /* logical length of the list */ + UInt block; /* one block of the boolean list */ + UInt bit; /* one bit of a block */ + UInt i; /* loop variable */ + + /* if is known to be a boolean list, it is very easy */ + if ( IS_BLIST_REP(list) ) { + return; + } + + /* change its representation */ + block = 0; + bit = 1; + len = LEN_LIST( list ); + for ( i = 1; i <= len; i++ ) { + if ( ELMW_LIST( list, (Int)i ) == True ) + block |= bit; + bit = bit << 1; + if ( bit == 0 || i == len ) { + BLOCK_ELM_BLIST(list,i) = block; + block = 0; + bit = 1; + } + } + RetypeBag( list, IS_MUTABLE_OBJ(list) ? T_BLIST : T_BLIST+IMMUTABLE ); + ResizeBag( list, SIZE_PLEN_BLIST(len) ); + SET_LEN_BLIST( list, len ); +} + + +/**************************************************************************** +** +*F IsBlist( ) . . . . . . . . . test whether a list is a boolean list +** +** 'IsBlist' returns 1 if the list is a boolean list, i.e., a +** list that has no holes and contains only 'true' and 'false', and 0 +** otherwise. +*/ +Int IsBlist ( + Obj list ) +{ + UInt isBlist; /* result of the test */ + Int len; /* logical length of the list */ + UInt i; /* loop variable */ + + /* if is known to be a boolean list, it is very easy */ + if ( IS_BLIST_REP(list) ) { + isBlist = 1; + } + + /* if is not a list, its not a boolean list (convert to list) */ + else if ( ! IS_LIST( list ) ) { + isBlist = 0; + } + + /* otherwise test if there are holes and if all elements are boolean */ + else { + + /* test that all elements are bound and either 'true' or 'false' */ + len = LEN_LIST( list ); + for ( i = 1; i <= len; i++ ) { + if ( ELMV0_LIST( list, (Int)i ) == 0 + || (ELMW_LIST( list, (Int)i ) != True + && ELMW_LIST( list, (Int)i ) != False) ) { + break; + } + } + + isBlist = (len < i); + } + + /* return the result */ + return isBlist; +} + + /**************************************************************************** ** -*F IsBlist( ) . . . . . . . . . test whether a list is a boolean list +*F IsBlistConv( ) . test whether a list is a boolean list and convert ** -** 'IsBlist' returns 1 if the list is a boolean list, i.e., a list -** that has no holes and contains only 'true' and 'false', and 0 otherwise. -** As a sideeffect 'IsBlist' changes the representation of boolean lists -** into the compact representation of type 'T_BLIST' described above. +** 'IsBlistConv' returns 1 if the list is a boolean list, i.e., a +** list that has no holes and contains only 'true' and 'false', and 0 +** otherwise. As a sideeffect 'IsBlistConv' changes the representation of +** boolean lists into the compact representation of type 'T_BLIST' described +** above. */ -Int IsBlist ( +Int IsBlistConv ( Obj list ) { UInt isBlist; /* result of the test */ Int len; /* logical length of the list */ - UInt block; /* one block of the boolean list */ - UInt bit; /* one bit of a block */ UInt i; /* loop variable */ /* if is known to be a boolean list, it is very easy */ - if ( T_BLIST <= TNUM_OBJ(list) - && TNUM_OBJ(list) <= T_BLIST_SSORT ) { + if ( IS_BLIST_REP(list) ) { isBlist = 1; } /* if is not a list, its not a boolean list (convert to list) */ - else if ( ! IS_LIST( list ) ) { + else if ( ! IS_LIST(list) ) { isBlist = 0; } @@ -1105,7 +1052,7 @@ Int IsBlist ( /* test that all elements are bound and either 'true' or 'false' */ len = LEN_LIST( list ); - for ( i = 1; i <= len; i++ ) { + for ( i = 1; i <= len; i++ ) { if ( ELMV0_LIST( list, (Int)i ) == 0 || (ELMW_LIST( list, (Int)i ) != True && ELMW_LIST( list, (Int)i ) != False) ) { @@ -1116,24 +1063,8 @@ Int IsBlist ( /* if is a boolean list, change its representation */ isBlist = (len < i); if ( isBlist ) { - block = 0; - bit = 1; - for ( i = 1; i <= len; i++ ) { - if ( ELMW_LIST( list, (Int)i ) == True ) - block |= bit; - bit = bit << 1; - if ( bit == 0 || i == len ) { - BLOCK_ELM_BLIST(list,i) = block; - block = 0; - bit = 1; - } - } - RetypeBag( list, (IS_MUTABLE_OBJ(list) ? - T_BLIST : T_BLIST+IMMUTABLE) ); - ResizeBag( list, SIZE_PLEN_BLIST( len ) ); - SET_LEN_BLIST( list, len ); + ConvBlist(list); } - } /* return the result */ @@ -1153,7 +1084,7 @@ Int IsBlist ( *F IsBlistHandler( , ) . . . . test if a value is a boolean list ** -** 'IsBlistHandler' implements the internal function 'IsBlist'. +** 'IsBlistHandler' handles the internal function 'IsBlist'. ** ** 'IsBlist( )' ** @@ -1172,6 +1103,114 @@ Obj IsBlistHandler ( } +/**************************************************************************** +** +*F SizeBlist( ) . . . . number of 'true' entries in a boolean list +** +** 'SizeBlist' returns the number of entries of the boolean list +** that are 'true'. +** +** The sequence to compute the number of bits in a block is quite clever. +** The idea is that after the -th instruction each subblock of $2^i$ bits +** holds the number of bits of this subblock in the original block . +** This is illustrated in the example below for a block of with 8 bits: +** +** // a b c d e f g h +** m = (m & 0x55) + ((m >> 1) & 0x55); +** // . b . d . f . h + . a . c . e . g = a+b c+d e+f g+h +** m = (m & 0x33) + ((m >> 2) & 0x33); +** // . . c+d . . g+h + . . a+b . . e+f = a+b+c+d e+f+g+h +** m = (m & 0x0f) + ((m >> 4) & 0x0f); +** // . . . . e+f+g+h + . . . . a+b+c+d = a+b+c+d+e+f+g+h +** +** In the actual code some unnecessary mask have been removed, improving +** performance quite a bit, because masks are 32 bit immediate values for +** which most RISC processors need two instructions to load them. Talking +** about performance. The code is close to optimal, it should compile to +** only about 22 MIPS or SPARC instructions. Dividing the block into 4 +** bytes and looking up the number of bits of a byte in a table may be 10% +** faster, but only if the table lives in the data cache. +** +*N 1992/12/15 martin this depends on 'BIPEB' being 32 +*N 1996/11/12 Steve altered to handle 64 bit also +** +** Introduced the SizeBlist function for kernel use, and the +** COUNT_TRUES_BLOCK( ) macro which replaces a block of bits in +** by the number of ones it contains. It will fail horribly if is not +** a variable. +*/ +#ifdef SYS_IS_64_BIT + +#define COUNT_TRUES_BLOCK( block ) \ + do { \ + (block) = ((block) & 0x5555555555555555L) + (((block) >> 1) & 0x5555555555555555L); \ + (block) = ((block) & 0x3333333333333333L) + (((block) >> 2) & 0x3333333333333333L); \ + (block) = ((block) + ((block) >> 4)) & 0x0f0f0f0f0f0f0f0fL; \ + (block) = ((block) + ((block) >> 8)); \ + (block) = ((block) + ((block) >> 16)); \ + (block) = ((block) + ((block) >> 32)) & 0x00000000000000ffL; } while (0) + +#else + +#define COUNT_TRUES_BLOCK( block ) \ + do { \ + (block) = ((block) & 0x55555555) + (((block) >> 1) & 0x55555555); \ + (block) = ((block) & 0x33333333) + (((block) >> 2) & 0x33333333); \ + (block) = ((block) + ((block) >> 4)) & 0x0f0f0f0f; \ + (block) = ((block) + ((block) >> 8)); \ + (block) = ((block) + ((block) >> 16)) & 0x000000ff; } while (0) +#endif + +UInt SizeBlist ( + Obj blist ) +{ + UInt * ptr; /* pointer to blist */ + UInt nrb; /* number of blocks in blist */ + UInt m; /* number of bits in a block */ + UInt n; /* number of bits in blist */ + UInt i; /* loop variable */ + + /* get the number of blocks and a pointer */ + nrb = NUMBER_BLOCKS_BLIST(blist); + ptr = BLOCKS_BLIST( blist ); + + /* loop over the blocks, adding the number of bits of each one */ + n = 0; + for ( i = 1; i <= nrb; i++ ) { + m = *ptr++; + COUNT_TRUES_BLOCK(m); + n += m; + } + + /* return the number of bits */ + return n; +} + + +/**************************************************************************** +** + +*F FuncSIZE_BLIST( , ) . . number of 'true' entries in +** +** 'FuncSIZE_BLIST' implements the internal function 'SizeBlist' +*/ +Obj FuncSIZE_BLIST ( + Obj self, + Obj blist ) +{ + /* get and check the argument */ + while ( ! IsBlistConv(blist) ) { + blist = ErrorReturnObj( + "SizeBlist: must be a boolean list (not a %s)", + (Int)TNAM_OBJ(blist), 0L, + "you can return a boolean list for " ); + } + + return INTOBJ_INT(SizeBlist(blist)); +} + + + /**************************************************************************** ** *F FuncBLIST_LIST( , , ) make boolean list from a sublist @@ -1207,13 +1246,13 @@ Obj FuncBLIST_LIST ( while ( ! IS_LIST(list) ) { list = ErrorReturnObj( "BlistList: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list)].name), 0L, + (Int)TNAM_OBJ(list), 0L, "you can return a list for " ); } while ( ! IS_LIST(sub) ) { sub = ErrorReturnObj( "BlistList: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(sub)].name), 0L, + (Int)TNAM_OBJ(sub), 0L, "you can return a list for " ); } @@ -1315,7 +1354,7 @@ Obj FuncBLIST_LIST ( /* set bit if [] was found at position k */ if ( k <= lenList && EQ( ADDR_OBJ(list)[k], ADDR_OBJ(sub)[l] ) ) - SET_ELM_BLIST( blist, k, True); + SET_ELM_BLIST( blist, k, True); } } @@ -1355,9 +1394,9 @@ Obj FuncBLIST_LIST ( /* if block is full add it to boolean list and start next */ bit = bit << 1; if ( bit == 0 || l == lenList ) { - BLOCK_ELM_BLIST( blist, l) = block; - block = 0; - bit = 1; + BLOCK_ELM_BLIST( blist, l) = block; + block = 0; + bit = 1; } } @@ -1429,112 +1468,7 @@ Obj FuncBLIST_LIST ( /**************************************************************************** ** -*F SizeBlist( ) . . . . . number of 'true' entries in a boolean list -*F FuncSIZE_BLIST(,) number of 'true' entries in a boolean list -** -** 'FuncSIZE_BLIST' implements the internal function 'SizeBlist' -** 'SizeBlist' is a C function that does the same calculation -** -** 'SizeBlist( )' -** -** 'SizeBlist' returns the number of entries of the boolean list -** that are 'true'. -** -** The sequence to compute the number of bits in a block is quite clever. -** The idea is that after the -th instruction each subblock of $2^i$ bits -** holds the number of bits of this subblock in the original block . -** This is illustrated in the example below for a block of with 8 bits: -** -** // a b c d e f g h -** m = (m & 0x55) + ((m >> 1) & 0x55); -** // . b . d . f . h + . a . c . e . g = a+b c+d e+f g+h -** m = (m & 0x33) + ((m >> 2) & 0x33); -** // . . c+d . . g+h + . . a+b . . e+f = a+b+c+d e+f+g+h -** m = (m & 0x0f) + ((m >> 4) & 0x0f); -** // . . . . e+f+g+h + . . . . a+b+c+d = a+b+c+d+e+f+g+h -** -** In the actual code some unnecessary mask have been removed, improving -** performance quite a bit, because masks are 32 bit immediate values for -** which most RISC processors need two instructions to load them. Talking -** about performance. The code is close to optimal, it should compile to -** only about 22 MIPS or SPARC instructions. Dividing the block into 4 -** bytes and looking up the number of bits of a byte in a table may be 10% -** faster, but only if the table lives in the data cache. -** -*N 1992/12/15 martin this depends on 'BIPEB' being 32 -*N 1996/11/12 Steve altered to handle 64 bit also -** -** Introduced the SizeBlist function for kernel use, and the -** COUNT_TRUES_BLOCK( ) macro which replaces a block of bits in -** by the number of ones it contains. It will fail horribly if is not -** a variable. -*/ - -#ifdef SYS_IS_64_BIT -#define COUNT_TRUES_BLOCK( block ) \ - do { \ - (block) = ((block) & 0x5555555555555555L) + (((block) >> 1) & 0x5555555555555555L); \ - (block) = ((block) & 0x3333333333333333L) + (((block) >> 2) & 0x3333333333333333L); \ - (block) = ((block) + ((block) >> 4)) & 0x0f0f0f0f0f0f0f0fL; \ - (block) = ((block) + ((block) >> 8)); \ - (block) = ((block) + ((block) >> 16)); \ - (block) = ((block) + ((block) >> 32)) & 0x00000000000000ffL; } while (0) -#else -#define COUNT_TRUES_BLOCK( block ) \ - do { \ - (block) = ((block) & 0x55555555) + (((block) >> 1) & 0x55555555); \ - (block) = ((block) & 0x33333333) + (((block) >> 2) & 0x33333333); \ - (block) = ((block) + ((block) >> 4)) & 0x0f0f0f0f; \ - (block) = ((block) + ((block) >> 8)); \ - (block) = ((block) + ((block) >> 16)) & 0x000000ff; } while (0) -#endif - -UInt SizeBlist ( - Obj blist ) -{ - UInt * ptr; /* pointer to blist */ - UInt nrb; /* number of blocks in blist */ - UInt m; /* number of bits in a block */ - UInt n; /* number of bits in blist */ - UInt i; /* loop variable */ - - /* get the number of blocks and a pointer */ - nrb = NUMBER_BLOCKS_BLIST(blist); - ptr = BLOCKS_BLIST( blist ); - - /* loop over the blocks, adding the number of bits of each one */ - n = 0; - for ( i = 1; i <= nrb; i++ ) { - m = *ptr++; - COUNT_TRUES_BLOCK(m); - n += m; - } - - /* return the number of bits */ - return n; -} - - -Obj FuncSIZE_BLIST ( - Obj self, - Obj blist ) -{ - /* get and check the argument */ - while ( TNUM_OBJ(blist) != T_BLIST && ! IsBlist(blist) ) { - blist = ErrorReturnObj( - "SizeBlist: must be a boolean list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(blist)].name), 0L, - "you can return a boolean list for " ); - } - - return INTOBJ_INT(SizeBlist(blist)); -} - - - -/**************************************************************************** -** -*F FuncListBlist(,,) make a sublist from a boolean list +*F FuncListBlist( , , ) . make a sublist from a ** ** 'FuncListBlist' implements the internal function 'ListBlist'. ** @@ -1561,14 +1495,14 @@ Obj FuncLIST_BLIST ( while ( ! IS_LIST( list ) ) { list = ErrorReturnObj( "ListBlist: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list)].name), 0L, + (Int)TNAM_OBJ(list), 0L, "you can return a list for " ); } /* get and check the second argument */ - if ( ! IsBlist( blist ) ) { + while ( ! IsBlistConv( blist ) ) { blist = ErrorReturnObj( "ListBlist: must be a boolean list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(blist)].name), 0L, + (Int)TNAM_OBJ(blist), 0L, "you can return a boolean list for " ); } while ( LEN_LIST( list ) != LEN_BLIST( blist ) ) { @@ -1606,7 +1540,7 @@ Obj FuncLIST_BLIST ( *F FuncPositionsTrueBlist( , ) . . . true positions in a blist ** *N 1992/12/15 martin this depends on 'BIPEB' being 32 -*N Fix up for 64 bit SL +*N Fix up for 64 bit SL */ Obj FuncPositionsTrueBlist ( Obj self, @@ -1622,10 +1556,10 @@ Obj FuncPositionsTrueBlist ( UInt i; /* loop variable */ /* get and check the first argument */ - if ( ! IsBlist( blist ) ) { + while ( ! IsBlistConv( blist ) ) { blist = ErrorReturnObj( "ListBlist: must be a boolean list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(blist)].name), 0L, + (Int)TNAM_OBJ(blist), 0L, "you can return a boolean list for " ); } @@ -1663,7 +1597,7 @@ Obj FuncPositionsTrueBlist ( /**************************************************************************** ** -*F FuncPositionNthTrueBlist( , , ) . . . find true value +*F FuncPositionNthTrueBlist( , , ) . . . find true value ** *N 1992/12/15 martin this depends on 'BIPEB' being 32 *N Fixed up for 64 SL @@ -1680,16 +1614,16 @@ Obj FuncPositionNthTrueBlist ( UInt * ptr; /* Check the arguments. */ - while ( ! IsBlist( blist ) ) { + while ( ! IsBlistConv( blist ) ) { blist = ErrorReturnObj( "ListBlist: must be a boolean list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(blist)].name), 0L, + (Int)TNAM_OBJ(blist), 0L, "you can return a boolean list for " ); } while ( ! IS_INTOBJ(Nth) || INT_INTOBJ(Nth) <= 0 ) { Nth = ErrorReturnObj( "Position: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(Nth)].name), 0L, + (Int)TNAM_OBJ(Nth), 0L, "you can return a positive integer for " ); } @@ -1706,8 +1640,8 @@ Obj FuncPositionNthTrueBlist ( nth -= m; pos += BIPEB; ptr++; - m = *ptr; - COUNT_TRUES_BLOCK(m); + m = *ptr; + COUNT_TRUES_BLOCK(m); } m = *ptr; mask = 0x1; @@ -1722,8 +1656,7 @@ Obj FuncPositionNthTrueBlist ( /**************************************************************************** ** -*F FuncIsSubsetBlist(,,) . . . . . . . . . . . . . . . . -*F . . . . . . . . . . . . . . . test if a boolean list is subset of another +*F FuncIsSubsetBlist( , , ) . . . . . . . . subset test ** ** 'FuncIsSubsetBlist' implements the internal function 'IsSubsetBlist'. ** @@ -1738,21 +1671,21 @@ Obj FuncIS_SUB_BLIST ( Obj list1, Obj list2 ) { - UInt * ptr1; /* pointer to the first argument */ - UInt * ptr2; /* pointer to the second argument */ + UInt * ptr1; /* pointer to the first argument */ + UInt * ptr2; /* pointer to the second argument */ UInt i; /* loop variable */ /* get and check the arguments */ - while ( ! IsBlist( list1 ) ) { + while ( ! IsBlistConv( list1 ) ) { list1 = ErrorReturnObj( "IsSubsetBlist: must be a boolean list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list1)].name), 0L, + (Int)TNAM_OBJ(list1), 0L, "you can return a boolean list for " ); } - while ( ! IsBlist( list2 ) ) { + while ( ! IsBlistConv( list2 ) ) { list2 = ErrorReturnObj( "IsSubsetBlist: must be a boolean list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list2)].name), 0L, + (Int)TNAM_OBJ(list2), 0L, "you can return a boolean list for " ); } while ( LEN_BLIST(list1) != LEN_BLIST(list2) ) { @@ -1794,21 +1727,21 @@ Obj FuncUNITE_BLIST ( Obj list1, Obj list2 ) { - UInt * ptr1; /* pointer to the first argument */ - UInt * ptr2; /* pointer to the second argument */ + UInt * ptr1; /* pointer to the first argument */ + UInt * ptr2; /* pointer to the second argument */ UInt i; /* loop variable */ /* get and check the arguments */ - while ( ! IsBlist( list1 ) ) { + while ( ! IsBlistConv( list1 ) ) { list1 = ErrorReturnObj( "UniteBlist: must be a boolean list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list1)].name), 0L, + (Int)TNAM_OBJ(list1), 0L, "you can return a boolean list for " ); } - while ( ! IsBlist( list2 ) ) { + while ( ! IsBlistConv( list2 ) ) { list2 = ErrorReturnObj( "UniteBlist: must be a boolean list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list2)].name), 0L, + (Int)TNAM_OBJ(list2), 0L, "you can return a boolean list for " ); } while ( LEN_BLIST(list1) != LEN_BLIST(list2) ) { @@ -1852,16 +1785,16 @@ Obj FuncINTER_BLIST ( UInt i; /* loop variable */ /* get and check the arguments */ - while ( ! IsBlist( list1 ) ) { + while ( ! IsBlistConv( list1 ) ) { list1 = ErrorReturnObj( "IntersectBlist: must be a boolean list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list1)].name), 0L, + (Int)TNAM_OBJ(list1), 0L, "you can return a boolean list for " ); } - while ( ! IsBlist( list2 ) ) { + while ( ! IsBlistConv( list2 ) ) { list2 = ErrorReturnObj( "IntersectBlist: must be a boolean list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list2)].name), 0L, + (Int)TNAM_OBJ(list2), 0L, "you can return a boolean list for " ); } while ( LEN_BLIST(list1) != LEN_BLIST(list2) ) { @@ -1885,7 +1818,7 @@ Obj FuncINTER_BLIST ( /**************************************************************************** ** -*F FuncSUBTR_BLIST( , , ) . . . . . . - +*F FuncSUBTR_BLIST( , , ) . . . . . . - ** ** 'FuncSUBTR_BLIST' implements the internal function 'SubtractBlist'. ** @@ -1900,21 +1833,21 @@ Obj FuncSUBTR_BLIST ( Obj list1, Obj list2 ) { - UInt * ptr1; /* pointer to the first argument */ - UInt * ptr2; /* pointer to the second argument */ + UInt * ptr1; /* pointer to the first argument */ + UInt * ptr2; /* pointer to the second argument */ UInt i; /* loop variable */ /* get and check the arguments */ - while ( ! IsBlist( list1 ) ) { + while ( ! IsBlistConv( list1 ) ) { list1 = ErrorReturnObj( "SubtractBlist: must be a boolean list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list1)].name), 0L, + (Int)TNAM_OBJ(list1), 0L, "you can return a boolean list for " ); } - while ( ! IsBlist( list2 ) ) { + while ( ! IsBlistConv( list2 ) ) { list2 = ErrorReturnObj( "SubtractBlist: must be a boolean list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list2)].name), 0L, + (Int)TNAM_OBJ(list2), 0L, "you can return a boolean list for " ); } while ( LEN_BLIST(list1) != LEN_BLIST(list2) ) { @@ -1929,47 +1862,278 @@ Obj FuncSUBTR_BLIST ( ptr2 = BLOCKS_BLIST(list2); for ( i = NUMBER_BLOCKS_BLIST(list1); 0 < i; i-- ) { - *ptr1++ &= ~ *ptr2++; + *ptr1++ &= ~ *ptr2++; } /* return nothing, this function is a procedure */ return 0; } +/**************************************************************************** +** +** +*F FuncCONV_BLIST( , ) . . . . convert into a boolean list rep +*/ +Obj FuncCONV_BLIST ( + Obj self, + Obj blist ) +{ + /* check whether is a boolean list */ + while ( ! IsBlistConv(blist) ) { + blist = ErrorReturnObj( + "CONV_BLIST: must be a boolean list (not a %s)", + (Int)TNAM_OBJ(blist), 0L, + "you can return a blist for " ); + } + + /* return nothing */ + return 0; +} /**************************************************************************** ** +** -*F InitBlist() . . . . . . . . . . . . . initialize the boolean list package +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** ** -** 'InitBlist' initializes the boolean list package. + +*F SetupBlist() . . . . . . . . . . . . initialize the boolean list package */ -void InitBlist ( void ) +void SetupBlist ( void ) { UInt t1; UInt t2; /* install the names */ - for ( t1 = T_BLIST; t1 <= T_BLIST_SSORT; t1 += 2 ) { - InfoBags[t1 ].name="list (boolean list)"; - InfoBags[t1+IMMUTABLE ].name="list (boolean list,imm)"; - InfoBags[t1 +COPYING].name="list (boolean list,copied)"; - InfoBags[t1+IMMUTABLE+COPYING].name="list (boolean list,imm,copied)"; - } + InfoBags[T_BLIST ].name = "list (boolean)"; + InfoBags[T_BLIST +IMMUTABLE ].name = "list (boolean,imm)"; + InfoBags[T_BLIST +COPYING].name = "list (boolean,copied)"; + InfoBags[T_BLIST +IMMUTABLE +COPYING].name = "list (boolean,imm,copied)"; + InfoBags[T_BLIST_NSORT ].name = "list (boolean,nsort)"; + InfoBags[T_BLIST_NSORT +IMMUTABLE ].name = "list (boolean,nsort,imm)"; + InfoBags[T_BLIST_NSORT +COPYING].name = "list (boolean,nsort,copied)"; + InfoBags[T_BLIST_NSORT +IMMUTABLE +COPYING].name = "list (boolean,nsort,imm,copied)"; - /* install the marking function */ - for ( t1 = T_BLIST; t1 <= T_BLIST_SSORT; t1 += 2 ) { - InitMarkFuncBags( t1, MarkNoSubBags ); - InitMarkFuncBags( t1 +IMMUTABLE, MarkNoSubBags ); - InitMarkFuncBags( t1 +COPYING , MarkOneSubBags ); - InitMarkFuncBags( t1 +IMMUTABLE +COPYING , MarkOneSubBags ); - } + InfoBags[T_BLIST_SSORT ].name = "list (boolean,ssort)"; + InfoBags[T_BLIST_SSORT +IMMUTABLE ].name = "list (boolean,ssort,imm)"; + InfoBags[T_BLIST_SSORT +COPYING].name = "list (boolean,ssort,copied)"; + InfoBags[T_BLIST_SSORT +IMMUTABLE +COPYING].name = "list (boolean,ssort,imm,copied)"; - /* install the type method */ + /* install the marking function */ for ( t1 = T_BLIST; t1 <= T_BLIST_SSORT; t1 += 2 ) { - TypeObjFuncs[ t1 ] = TypeBlist; - TypeObjFuncs[ t1 +IMMUTABLE ] = TypeBlist; + InitMarkFuncBags( t1, MarkNoSubBags ); + InitMarkFuncBags( t1 +IMMUTABLE, MarkNoSubBags ); + InitMarkFuncBags( t1 +COPYING , MarkOneSubBags ); + InitMarkFuncBags( t1 +IMMUTABLE +COPYING , MarkOneSubBags ); + } + + + /* install the filter and property maps */ + ClearFiltsTNums [T_BLIST ] = T_BLIST; + ClearFiltsTNums [T_BLIST +IMMUTABLE] = T_BLIST+IMMUTABLE; + ClearFiltsTNums [T_BLIST_NSORT ] = T_BLIST; + ClearFiltsTNums [T_BLIST_NSORT+IMMUTABLE] = T_BLIST+IMMUTABLE; + ClearFiltsTNums [T_BLIST_SSORT ] = T_BLIST; + ClearFiltsTNums [T_BLIST_SSORT+IMMUTABLE] = T_BLIST+IMMUTABLE; + + /* mutable boolean list */ + HasFiltListTNums [T_BLIST ][FN_IS_MUTABLE] = 1; + HasFiltListTNums [T_BLIST ][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_BLIST ][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_BLIST ][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_BLIST ][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_BLIST ][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_BLIST ][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_BLIST ][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_BLIST ][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_BLIST ][FN_IS_MUTABLE] = T_BLIST; + SetFiltListTNums [T_BLIST ][FN_IS_EMPTY ] = T_BLIST_SSORT; + SetFiltListTNums [T_BLIST ][FN_IS_DENSE ] = T_BLIST; + SetFiltListTNums [T_BLIST ][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_BLIST ][FN_IS_HOMOG ] = T_BLIST; + SetFiltListTNums [T_BLIST ][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_BLIST ][FN_IS_TABLE ] = -1; + SetFiltListTNums [T_BLIST ][FN_IS_SSORT ] = T_BLIST_SSORT; + SetFiltListTNums [T_BLIST ][FN_IS_NSORT ] = T_BLIST_NSORT; + + ResetFiltListTNums[T_BLIST ][FN_IS_MUTABLE] = T_BLIST +IMMUTABLE; + ResetFiltListTNums[T_BLIST ][FN_IS_EMPTY ] = T_BLIST; + ResetFiltListTNums[T_BLIST ][FN_IS_DENSE ] = -1; + ResetFiltListTNums[T_BLIST ][FN_IS_NDENSE ] = T_BLIST; + ResetFiltListTNums[T_BLIST ][FN_IS_HOMOG ] = -1; + ResetFiltListTNums[T_BLIST ][FN_IS_NHOMOG ] = T_BLIST; + ResetFiltListTNums[T_BLIST ][FN_IS_TABLE ] = T_BLIST; + ResetFiltListTNums[T_BLIST ][FN_IS_SSORT ] = T_BLIST; + ResetFiltListTNums[T_BLIST ][FN_IS_NSORT ] = T_BLIST; + + /* immutable boolean list */ + HasFiltListTNums [T_BLIST +IMMUTABLE][FN_IS_MUTABLE] = 0; + HasFiltListTNums [T_BLIST +IMMUTABLE][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_BLIST +IMMUTABLE][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_BLIST +IMMUTABLE][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_BLIST +IMMUTABLE][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_BLIST +IMMUTABLE][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_BLIST +IMMUTABLE][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_BLIST +IMMUTABLE][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_BLIST +IMMUTABLE][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_BLIST +IMMUTABLE][FN_IS_MUTABLE] = T_BLIST; + SetFiltListTNums [T_BLIST +IMMUTABLE][FN_IS_EMPTY ] = T_BLIST_SSORT+IMMUTABLE; + SetFiltListTNums [T_BLIST +IMMUTABLE][FN_IS_DENSE ] = T_BLIST +IMMUTABLE; + SetFiltListTNums [T_BLIST +IMMUTABLE][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_BLIST +IMMUTABLE][FN_IS_HOMOG ] = T_BLIST +IMMUTABLE; + SetFiltListTNums [T_BLIST +IMMUTABLE][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_BLIST +IMMUTABLE][FN_IS_TABLE ] = -1; + SetFiltListTNums [T_BLIST +IMMUTABLE][FN_IS_SSORT ] = T_BLIST_SSORT+IMMUTABLE; + SetFiltListTNums [T_BLIST +IMMUTABLE][FN_IS_NSORT ] = T_BLIST_NSORT+IMMUTABLE; + + ResetFiltListTNums[T_BLIST +IMMUTABLE][FN_IS_MUTABLE] = T_BLIST +IMMUTABLE; + ResetFiltListTNums[T_BLIST +IMMUTABLE][FN_IS_EMPTY ] = T_BLIST +IMMUTABLE; + ResetFiltListTNums[T_BLIST +IMMUTABLE][FN_IS_DENSE ] = -1; + ResetFiltListTNums[T_BLIST +IMMUTABLE][FN_IS_NDENSE ] = T_BLIST +IMMUTABLE; + ResetFiltListTNums[T_BLIST +IMMUTABLE][FN_IS_HOMOG ] = -1; + ResetFiltListTNums[T_BLIST +IMMUTABLE][FN_IS_NHOMOG ] = T_BLIST +IMMUTABLE; + ResetFiltListTNums[T_BLIST +IMMUTABLE][FN_IS_NSORT ] = T_BLIST +IMMUTABLE; + ResetFiltListTNums[T_BLIST +IMMUTABLE][FN_IS_SSORT ] = T_BLIST +IMMUTABLE; + ResetFiltListTNums[T_BLIST +IMMUTABLE][FN_IS_TABLE ] = T_BLIST +IMMUTABLE; + + /* nsort mutable boolean list */ + HasFiltListTNums [T_BLIST_NSORT ][FN_IS_MUTABLE] = 1; + HasFiltListTNums [T_BLIST_NSORT ][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_BLIST_NSORT ][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_BLIST_NSORT ][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_BLIST_NSORT ][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_BLIST_NSORT ][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_BLIST_NSORT ][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_BLIST_NSORT ][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_BLIST_NSORT ][FN_IS_NSORT ] = 1; + + SetFiltListTNums [T_BLIST_NSORT ][FN_IS_MUTABLE] = T_BLIST_NSORT; + SetFiltListTNums [T_BLIST_NSORT ][FN_IS_EMPTY ] = -1; + SetFiltListTNums [T_BLIST_NSORT ][FN_IS_DENSE ] = T_BLIST_NSORT; + SetFiltListTNums [T_BLIST_NSORT ][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_BLIST_NSORT ][FN_IS_HOMOG ] = T_BLIST_NSORT; + SetFiltListTNums [T_BLIST_NSORT ][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_BLIST_NSORT ][FN_IS_TABLE ] = -1; + SetFiltListTNums [T_BLIST_NSORT ][FN_IS_SSORT ] = -1; + SetFiltListTNums [T_BLIST_NSORT ][FN_IS_NSORT ] = T_BLIST_NSORT; + + ResetFiltListTNums[T_BLIST_NSORT ][FN_IS_MUTABLE] = T_BLIST_NSORT+IMMUTABLE; + ResetFiltListTNums[T_BLIST_NSORT ][FN_IS_EMPTY ] = T_BLIST_NSORT; + ResetFiltListTNums[T_BLIST_NSORT ][FN_IS_DENSE ] = -1; + ResetFiltListTNums[T_BLIST_NSORT ][FN_IS_NDENSE ] = T_BLIST_NSORT; + ResetFiltListTNums[T_BLIST_NSORT ][FN_IS_HOMOG ] = -1; + ResetFiltListTNums[T_BLIST_NSORT ][FN_IS_NHOMOG ] = T_BLIST_NSORT; + ResetFiltListTNums[T_BLIST_NSORT ][FN_IS_TABLE ] = T_BLIST_NSORT; + ResetFiltListTNums[T_BLIST_NSORT ][FN_IS_SSORT ] = T_BLIST_NSORT; + ResetFiltListTNums[T_BLIST_NSORT ][FN_IS_NSORT ] = T_BLIST; + + /* nsort immutable boolean list */ + HasFiltListTNums [T_BLIST_NSORT+IMMUTABLE][FN_IS_MUTABLE] = 0; + HasFiltListTNums [T_BLIST_NSORT+IMMUTABLE][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_BLIST_NSORT+IMMUTABLE][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_BLIST_NSORT+IMMUTABLE][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_BLIST_NSORT+IMMUTABLE][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_BLIST_NSORT+IMMUTABLE][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_BLIST_NSORT+IMMUTABLE][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_BLIST_NSORT+IMMUTABLE][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_BLIST_NSORT+IMMUTABLE][FN_IS_NSORT ] = 1; + + SetFiltListTNums [T_BLIST_NSORT+IMMUTABLE][FN_IS_MUTABLE] = T_BLIST_NSORT; + SetFiltListTNums [T_BLIST_NSORT+IMMUTABLE][FN_IS_EMPTY ] = -1; + SetFiltListTNums [T_BLIST_NSORT+IMMUTABLE][FN_IS_DENSE ] = T_BLIST_NSORT+IMMUTABLE; + SetFiltListTNums [T_BLIST_NSORT+IMMUTABLE][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_BLIST_NSORT+IMMUTABLE][FN_IS_HOMOG ] = T_BLIST_NSORT+IMMUTABLE; + SetFiltListTNums [T_BLIST_NSORT+IMMUTABLE][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_BLIST_NSORT+IMMUTABLE][FN_IS_TABLE ] = -1; + SetFiltListTNums [T_BLIST_NSORT+IMMUTABLE][FN_IS_SSORT ] = -1; + SetFiltListTNums [T_BLIST_NSORT+IMMUTABLE][FN_IS_NSORT ] = T_BLIST_NSORT+IMMUTABLE; + + ResetFiltListTNums[T_BLIST_NSORT+IMMUTABLE][FN_IS_MUTABLE] = T_BLIST_NSORT+IMMUTABLE; + ResetFiltListTNums[T_BLIST_NSORT+IMMUTABLE][FN_IS_EMPTY ] = T_BLIST_NSORT+IMMUTABLE; + ResetFiltListTNums[T_BLIST_NSORT+IMMUTABLE][FN_IS_DENSE ] = -1; + ResetFiltListTNums[T_BLIST_NSORT+IMMUTABLE][FN_IS_NDENSE ] = T_BLIST_NSORT+IMMUTABLE; + ResetFiltListTNums[T_BLIST_NSORT+IMMUTABLE][FN_IS_HOMOG ] = -1; + ResetFiltListTNums[T_BLIST_NSORT+IMMUTABLE][FN_IS_NHOMOG ] = T_BLIST_NSORT+IMMUTABLE; + ResetFiltListTNums[T_BLIST_NSORT+IMMUTABLE][FN_IS_TABLE ] = T_BLIST_NSORT+IMMUTABLE; + ResetFiltListTNums[T_BLIST_NSORT+IMMUTABLE][FN_IS_SSORT ] = T_BLIST_NSORT+IMMUTABLE; + ResetFiltListTNums[T_BLIST_NSORT+IMMUTABLE][FN_IS_NSORT ] = T_BLIST +IMMUTABLE; + + /* ssort mutable boolean list */ + HasFiltListTNums [T_BLIST_SSORT ][FN_IS_MUTABLE] = 1; + HasFiltListTNums [T_BLIST_SSORT ][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_BLIST_SSORT ][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_BLIST_SSORT ][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_BLIST_SSORT ][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_BLIST_SSORT ][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_BLIST_SSORT ][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_BLIST_SSORT ][FN_IS_SSORT ] = 1; + HasFiltListTNums [T_BLIST_SSORT ][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_BLIST_SSORT ][FN_IS_MUTABLE] = T_BLIST_SSORT; + SetFiltListTNums [T_BLIST_SSORT ][FN_IS_EMPTY ] = T_BLIST_SSORT; + SetFiltListTNums [T_BLIST_SSORT ][FN_IS_DENSE ] = T_BLIST_SSORT; + SetFiltListTNums [T_BLIST_SSORT ][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_BLIST_SSORT ][FN_IS_HOMOG ] = T_BLIST_SSORT; + SetFiltListTNums [T_BLIST_SSORT ][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_BLIST_SSORT ][FN_IS_TABLE ] = -1; + SetFiltListTNums [T_BLIST_SSORT ][FN_IS_SSORT ] = T_BLIST_SSORT; + SetFiltListTNums [T_BLIST_SSORT ][FN_IS_NSORT ] = -1; + + ResetFiltListTNums[T_BLIST_SSORT ][FN_IS_MUTABLE] = T_BLIST_SSORT+IMMUTABLE; + ResetFiltListTNums[T_BLIST_SSORT ][FN_IS_EMPTY ] = T_BLIST_SSORT; + ResetFiltListTNums[T_BLIST_SSORT ][FN_IS_DENSE ] = -1; + ResetFiltListTNums[T_BLIST_SSORT ][FN_IS_NDENSE ] = T_BLIST_SSORT; + ResetFiltListTNums[T_BLIST_SSORT ][FN_IS_HOMOG ] = -1; + ResetFiltListTNums[T_BLIST_SSORT ][FN_IS_NHOMOG ] = T_BLIST_SSORT; + ResetFiltListTNums[T_BLIST_SSORT ][FN_IS_TABLE ] = T_BLIST_SSORT; + ResetFiltListTNums[T_BLIST_SSORT ][FN_IS_SSORT ] = T_BLIST; + ResetFiltListTNums[T_BLIST_SSORT ][FN_IS_NSORT ] = T_BLIST_SSORT; + + /* ssort immutable boolean list */ + HasFiltListTNums [T_BLIST_SSORT+IMMUTABLE][FN_IS_MUTABLE] = 0; + HasFiltListTNums [T_BLIST_SSORT+IMMUTABLE][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_BLIST_SSORT+IMMUTABLE][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_BLIST_SSORT+IMMUTABLE][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_BLIST_SSORT+IMMUTABLE][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_BLIST_SSORT+IMMUTABLE][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_BLIST_SSORT+IMMUTABLE][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_BLIST_SSORT+IMMUTABLE][FN_IS_SSORT ] = 1; + HasFiltListTNums [T_BLIST_SSORT+IMMUTABLE][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_BLIST_SSORT+IMMUTABLE][FN_IS_MUTABLE] = T_BLIST_SSORT; + SetFiltListTNums [T_BLIST_SSORT+IMMUTABLE][FN_IS_EMPTY ] = T_BLIST_SSORT+IMMUTABLE; + SetFiltListTNums [T_BLIST_SSORT+IMMUTABLE][FN_IS_DENSE ] = T_BLIST_SSORT+IMMUTABLE; + SetFiltListTNums [T_BLIST_SSORT+IMMUTABLE][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_BLIST_SSORT+IMMUTABLE][FN_IS_HOMOG ] = T_BLIST_SSORT+IMMUTABLE; + SetFiltListTNums [T_BLIST_SSORT+IMMUTABLE][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_BLIST_SSORT+IMMUTABLE][FN_IS_TABLE ] = -1; + SetFiltListTNums [T_BLIST_SSORT+IMMUTABLE][FN_IS_SSORT ] = T_BLIST_SSORT+IMMUTABLE; + SetFiltListTNums [T_BLIST_SSORT+IMMUTABLE][FN_IS_NSORT ] = -1; + + ResetFiltListTNums[T_BLIST_SSORT+IMMUTABLE][FN_IS_MUTABLE] = T_BLIST_SSORT+IMMUTABLE; + ResetFiltListTNums[T_BLIST_SSORT+IMMUTABLE][FN_IS_EMPTY ] = T_BLIST_SSORT+IMMUTABLE; + ResetFiltListTNums[T_BLIST_SSORT+IMMUTABLE][FN_IS_DENSE ] = -1; + ResetFiltListTNums[T_BLIST_SSORT+IMMUTABLE][FN_IS_NDENSE ] = T_BLIST_SSORT+IMMUTABLE; + ResetFiltListTNums[T_BLIST_SSORT+IMMUTABLE][FN_IS_HOMOG ] = -1; + ResetFiltListTNums[T_BLIST_SSORT+IMMUTABLE][FN_IS_NHOMOG ] = T_BLIST_SSORT+IMMUTABLE; + ResetFiltListTNums[T_BLIST_SSORT+IMMUTABLE][FN_IS_TABLE ] = T_BLIST_SSORT+IMMUTABLE; + ResetFiltListTNums[T_BLIST_SSORT+IMMUTABLE][FN_IS_SSORT ] = T_BLIST +IMMUTABLE; + ResetFiltListTNums[T_BLIST_SSORT+IMMUTABLE][FN_IS_NSORT ] = T_BLIST_SSORT+IMMUTABLE; + + + /* Install the saving functions -- cannot save while copying */ + for ( t1 = T_BLIST; t1 <= T_BLIST_SSORT; t1 += 2 ) { + SaveObjFuncs[ t1 ] = SaveBlist; + SaveObjFuncs[ t1 +IMMUTABLE ] = SaveBlist; + LoadObjFuncs[ t1 ] = LoadBlist; + LoadObjFuncs[ t1 +IMMUTABLE ] = LoadBlist; } @@ -2035,6 +2199,22 @@ void InitBlist ( void ) IsSSortListFuncs[ T_BLIST_NSORT +IMMUTABLE ] = IsSSortBlistNot; IsSSortListFuncs[ T_BLIST_SSORT ] = IsSSortBlistYes; IsSSortListFuncs[ T_BLIST_SSORT +IMMUTABLE ] = IsSSortBlistYes; +} + + +/**************************************************************************** +** +*F InitBlist() . . . . . . . . . . . . . initialize the boolean list package +*/ +void InitBlist ( void ) +{ + UInt t1; + + /* install the type method */ + for ( t1 = T_BLIST; t1 <= T_BLIST_SSORT; t1 += 2 ) { + TypeObjFuncs[ t1 ] = TypeBlist; + TypeObjFuncs[ t1 +IMMUTABLE ] = TypeBlist; + } /* install the internal functions */ @@ -2046,7 +2226,7 @@ void InitBlist ( void ) "src/blister.c:BLIST_LIST" ); C_NEW_GVAR_FUNC( "LIST_BLIST", 2L, "list, blist", - FuncLIST_BLIST, + FuncLIST_BLIST, "src/blister.c:LIST_BLIST" ); C_NEW_GVAR_FUNC( "SIZE_BLIST", 1L, "blist", @@ -2054,11 +2234,11 @@ void InitBlist ( void ) "src/blister.c:SIZE_BLIST" ); C_NEW_GVAR_FUNC( "IS_SUB_BLIST", 2L, "blist1, blist2", - FuncIS_SUB_BLIST, + FuncIS_SUB_BLIST, "src/blister.c:IS_SUB_BLIST" ); C_NEW_GVAR_FUNC( "UNITE_BLIST", 2L, "blist1, blist2", - FuncUNITE_BLIST, + FuncUNITE_BLIST, "src/blister.c:UNITE_BLIST" ); C_NEW_GVAR_FUNC( "INTER_BLIST", 2L, "blist1, blist2", @@ -2066,16 +2246,31 @@ void InitBlist ( void ) "src/blister.c:INTER_BLIST" ); C_NEW_GVAR_FUNC( "SUBTR_BLIST", 2L, "blist1, blist2", - FuncSUBTR_BLIST, + FuncSUBTR_BLIST, "src/blister.c:SUBTR_BLIST" ); C_NEW_GVAR_FUNC( "PositionNthTrueBlist", 2L, "blist, nth", - FuncPositionNthTrueBlist, + FuncPositionNthTrueBlist, "src/blister.c:PositionNthTrueBlist" ); C_NEW_GVAR_FUNC( "PositionsTrueBlist", 1L, "blist", FuncPositionsTrueBlist, "src/blister.c:PositionsTrueBlist" ); + + C_NEW_GVAR_FUNC( "CONV_BLIST", 1L, "blist", + FuncCONV_BLIST, + "src/blister.c:CONV_BLIST" ); +} + + +/**************************************************************************** +** +*F CheckBlist() . . . check the initialisation of the boolean list package +*/ +void CheckBlist ( void ) +{ + SET_REVISION( "blister_c", Revision_blister_c ); + SET_REVISION( "blister_h", Revision_blister_h ); } diff --git a/src/blister.h b/src/blister.h index aff35990bb..0ca123b916 100644 --- a/src/blister.h +++ b/src/blister.h @@ -20,21 +20,19 @@ SYS_CONST char * Revision_blister_h = "@(#)$Id$"; #endif + /**************************************************************************** ** *V BIPEB . . . . . . . . . . . . . . . . . . . . . . . . . . bits per block ** -** 'BIPEB' is the number of bits per block, where a block fills a UInt, which -** must be the same size as a bag identifier. +** 'BIPEB' is the number of bits per block, where a block fills a UInt, +** which must be the same size as a bag identifier. ** */ - #define BIPEB (sizeof(UInt) * 8L) - - /**************************************************************************** ** @@ -75,16 +73,14 @@ SYS_CONST char * Revision_blister_h = ** Note that 'LEN_BLIST' is a macro, so do not call it with arguments that ** have sideeffects. */ -#define LEN_BLIST(list) \ - (INT_INTOBJ(ADDR_OBJ(list)[0])) +#define LEN_BLIST(list) (INT_INTOBJ(ADDR_OBJ(list)[0])) /*************************************************************************** ** -*F NUMBER_BLOCKS_BLIST() . . . . . . . number of UInt blocks in list +*F NUMBER_BLOCKS_BLIST() . . . . . . . . number of UInt blocks in list ** ** */ - #define NUMBER_BLOCKS_BLIST( blist ) ((LEN_BLIST((blist)) + BIPEB -1)/BIPEB) @@ -103,49 +99,45 @@ SYS_CONST char * Revision_blister_h = /**************************************************************************** ** -*F BLOCKS_BLIST( ) . . . . . . . . first block of a boolean list +*F BLOCKS_BLIST( ) . . . . . . . . . . first block of a boolean list ** ** returns a pointer to the start of the data of the Boolean list ** */ - #define BLOCKS_BLIST( list ) ((UInt*)(ADDR_OBJ(list)+1)) + /**************************************************************************** ** -*F BLOCK_ELM_BLIST(,) . . . . . . . . . .block of a boolean list +*F BLOCK_ELM_BLIST( , ) . . . . . . . .block of a boolean list ** -** 'BLOCK_ELM_BLIST' return the block containing the -th element of -** the boolean list as a UInt value, which is also a valid left -** hand side. -** must be a positive integer less than -** or equal to the length of . +** 'BLOCK_ELM_BLIST' return the block containing the -th element of the +** boolean list as a UInt value, which is also a valid left hand +** side. must be a positive integer less than or equal to the length +** of . ** ** Note that 'BLOCK_ELM_BLIST' is a macro, so do not call it with arguments ** that have sideeffects. */ - #define BLOCK_ELM_BLIST(list, pos) (BLOCKS_BLIST( list )[((pos)-1)/BIPEB]) /**************************************************************************** ** -*F MASK_POS_BLIST() . . . . . .bit mask for position of a Boolean list +*F MASK_POS_BLIST( ) . . . . bit mask for position of a Boolean list ** -** MASK_POS_BLIST() returns a UInt with a single set bit in position +** MASK_POS_BLIST() returns a UInt with a single set bit in position ** (pos-1) % BIPEB, useful for accessing the pos'th element of a blist ** -** Note that 'MASK_POS_BLIST' is a macro, so do not call it with arguments +** Note that 'MASK_POS_BLIST' is a macro, so do not call it with arguments ** that have sideeffects. */ - #define MASK_POS_BLIST( pos ) (((UInt) 1)<<((pos)-1)%BIPEB) - /**************************************************************************** ** -*F ELM_BLIST(,) . . . . . . . . . . . . element of a boolean list +*F ELM_BLIST( , ) . . . . . . . . . . element of a boolean list ** ** 'ELM_BLIST' return the -th element of the boolean list , which ** is either 'true' or 'false'. must be a positive integer less than @@ -178,9 +170,10 @@ SYS_CONST char * Revision_blister_h = /**************************************************************************** ** -*F IS_IMM_BLIST( ) . . . . . . check if boolean is immutable +*F IS_BLIST_REP( ) . . . . . check if is in boolean list rep */ -#define IS_IMM_BLIST(list) ((TNUM_OBJ(list) - T_BLIST) % 2) +#define IS_BLIST_REP(list) \ + ( T_BLIST <= TNUM_OBJ(list) && TNUM_OBJ(list) <= T_BLIST_SSORT+IMMUTABLE ) /**************************************************************************** @@ -191,12 +184,24 @@ SYS_CONST char * Revision_blister_h = /**************************************************************************** ** -*F InitBlist() . . . . . . . . . . . . . initialize the boolean list package + +*F SetupBlist() . . . . . . . . . . . . initialize the boolean list package +*/ +extern void SetupBlist ( void ); + + +/**************************************************************************** ** -** 'InitBlist' initializes the boolean list package. +*F InitBlist() . . . . . . . . . . . . . initialize the boolean list package */ -extern void InitBlist ( void ); +extern void InitBlist ( void ); + +/**************************************************************************** +** +*F CheckBlist() . . . check the initialisation of the boolean list package +*/ +extern void CheckBlist ( void ); /**************************************************************************** diff --git a/src/bool.c b/src/bool.c index c9e1e84989..045a93f9b8 100644 --- a/src/bool.c +++ b/src/bool.c @@ -7,6 +7,10 @@ *Y Copyright (C) 1996, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany ** ** This file contains the functions for the boolean package. +** +** Note that boolean objects actually contain no data. The three of them +** are distinguished by their addresses, kept in the C globals False, +** True and Fail. */ #include "system.h" /* system dependent part */ @@ -17,11 +21,11 @@ SYS_CONST char * Revision_bool_c = #include "objects.h" /* objects */ #include "scanner.h" /* scanner */ -#include "gap.h" /* error handling */ +#include "gap.h" /* error handling, initialisation */ #include "gvars.h" /* global variables */ #include "calls.h" /* generic call mechanism */ -#include "opers.h" /* generic operations package */ +#include "opers.h" /* generic operations */ #include "ariths.h" /* basic arithmetic */ @@ -29,6 +33,12 @@ SYS_CONST char * Revision_bool_c = #include "bool.h" /* booleans */ #undef INCLUDE_DECLARATION_PART +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ + +#include "lists.h" /* generic lists */ +#include "string.h" /* strings */ + /**************************************************************************** ** @@ -173,14 +183,7 @@ Obj IsBoolHandler ( /**************************************************************************** ** -*F ReturnTrueFunc . . . . . . . . . . . . . . function that returns 'True' -*/ -Obj ReturnTrueFunc; - - -/**************************************************************************** -** -*f ReturnTrue1( ) . . . . . . . . . . . . . . . . . . return 'True' +*F ReturnTrue1( ) . . . . . . . . . . . . . . . . . . return 'True' ** ** 'ReturnTrue?' simply return 'True' independent of the values of the ** arguments. @@ -198,7 +201,7 @@ Obj ReturnTrue1 ( /**************************************************************************** ** -*f ReturnTrue2( , ) . . . . . . . . . . . . . . return 'True' +*F ReturnTrue2( , ) . . . . . . . . . . . . . . return 'True' */ Obj ReturnTrue2 ( Obj self, @@ -211,7 +214,7 @@ Obj ReturnTrue2 ( /**************************************************************************** ** -*f ReturnTrue3( , , ) . . . . . . . . . . return 'True' +*F ReturnTrue3( , , ) . . . . . . . . . . return 'True' */ Obj ReturnTrue3 ( Obj self, @@ -225,14 +228,7 @@ Obj ReturnTrue3 ( /**************************************************************************** ** -*F ReturnFalseFunc . . . . . . . . . . . . . . function that returns 'False' -*/ -Obj ReturnFalseFunc; - - -/**************************************************************************** -** -*f ReturnFalse1( ) . . . . . . . . . . . . . . . . . return 'False' +*F ReturnFalse1( ) . . . . . . . . . . . . . . . . . return 'False' ** ** 'ReturnFalse?' likewise return 'False'. */ @@ -246,7 +242,7 @@ Obj ReturnFalse1 ( /**************************************************************************** ** -*f ReturnFalse2( , ) . . . . . . . . . . . . . return 'False' +*F ReturnFalse2( , ) . . . . . . . . . . . . . return 'False' */ Obj ReturnFalse2 ( Obj self, @@ -259,7 +255,7 @@ Obj ReturnFalse2 ( /**************************************************************************** ** -*f ReturnFalse3( , , ) . . . . . . . . . return 'False' +*F ReturnFalse3( , , ) . . . . . . . . . return 'False' */ Obj ReturnFalse3 ( Obj self, @@ -273,14 +269,7 @@ Obj ReturnFalse3 ( /**************************************************************************** ** -*F ReturnFailFunc . . . . . . . . . . . . . . function that returns 'Fail' -*/ -Obj ReturnFailFunc; - - -/**************************************************************************** -** -*f ReturnFail1( ) . . . . . . . . . . . . . . . . . . return 'Fail' +*F ReturnFail1( ) . . . . . . . . . . . . . . . . . . return 'Fail' ** ** 'ReturnFail?' likewise return 'Fail'. */ @@ -294,7 +283,7 @@ Obj ReturnFail1 ( /**************************************************************************** ** -*f ReturnFail2( , ) . . . . . . . . . . . . . . return 'Fail' +*F ReturnFail2( , ) . . . . . . . . . . . . . . return 'Fail' */ Obj ReturnFail2 ( Obj self, @@ -307,7 +296,7 @@ Obj ReturnFail2 ( /**************************************************************************** ** -*f ReturnFail3( , , ) . . . . . . . . . . return 'Fail' +*F ReturnFail3( , , ) . . . . . . . . . . return 'Fail' */ Obj ReturnFail3 ( Obj self, @@ -322,28 +311,51 @@ Obj ReturnFail3 ( /**************************************************************************** ** -*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*F SaveBool( ) . . . . . . . . . . . . . . . . . . . . save a Boolean +** +** Actually, there is nothing to do */ +void SaveBool( Obj obj ) +{ + return; +} + /**************************************************************************** ** - -*E InitBool() . . . . . . . . . . . . . . . initialize the booleans package +*F LoadBool( ) . . . . . . . . . . . . . . . . . . . . save a Boolean ** -** 'InitBool' initializes the boolean package. +** Actually, there is nothing to do */ -void InitBool ( void ) + +void LoadBool( Obj obj ) { - UInt gvar; + return; +} +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + +*E SetupBool() . . . . . . . . . . . . . . . initialize the booleans package +*/ +void SetupBool ( void ) +{ /* install the marking functions for boolean values */ - InfoBags[ T_BOOL ].name = "boolean"; + InfoBags[ T_BOOL ].name = "boolean"; InitMarkFuncBags( T_BOOL, MarkNoSubBags ); - /* install the kind function */ - ImportGVarFromLibrary( "TYPE_BOOL", &TYPE_BOOL ); - TypeObjFuncs[ T_BOOL ] = TypeBool; + /* install the saving functions */ + SaveObjFuncs[ T_BOOL ] = SaveBool; + + /* install the loading functions */ + LoadObjFuncs[ T_BOOL ] = LoadBool; /* install the printer for boolean values */ @@ -353,16 +365,43 @@ void InitBool ( void ) /* install the comparison functions */ EqFuncs[ T_BOOL ][ T_BOOL ] = EqBool; LtFuncs[ T_BOOL ][ T_BOOL ] = LtBool; +} + + +/**************************************************************************** +** +*E InitBool() . . . . . . . . . . . . . . . initialize the booleans package +** +** 'InitBool' initializes the boolean package. +*/ +void InitBool ( void ) +{ + UInt gvar; + Obj tmp; + + /* install the kind function */ + ImportGVarFromLibrary( "TYPE_BOOL", &TYPE_BOOL ); + TypeObjFuncs[ T_BOOL ] = TypeBool; /* make the three boolean bags */ - InitGlobalBag( &True, "TRUE" ); True = NewBag( T_BOOL, 0L ); - InitGlobalBag( &False, "FALSE" ); False = NewBag( T_BOOL, 0L ); - InitGlobalBag( &Fail, "FAIL" ); Fail = NewBag( T_BOOL, 0L ); + InitGlobalBag( &True, "src/bool.c:TRUE" ); + InitGlobalBag( &False, "src/bool.c:FALSE" ); + InitGlobalBag( &Fail, "src/bool.c:FAIL" ); + + if ( ! SyRestoring ) { + True = NewBag( T_BOOL, 0L ); + False = NewBag( T_BOOL, 0L ); + Fail = NewBag( T_BOOL, 0L ); + } - gvar = GVarName( "fail" ); - AssGVar( gvar, Fail ); - MakeReadOnlyGVar(gvar); + + /* `fail' is a variable not a language construct */ + if ( ! SyRestoring ) { + gvar = GVarName( "fail" ); + AssGVar( gvar, Fail ); + MakeReadOnlyGVar(gvar); + } /* make and install the 'IS_BOOL' filter*/ @@ -371,41 +410,61 @@ void InitBool ( void ) /* make and install the 'RETURN_TRUE' function */ - InitHandlerFunc( ReturnTrue1, "src/bool.c:ReturnTrue1"); - InitHandlerFunc( ReturnTrue2, "src/bool.c:ReturnTrue2"); - InitHandlerFunc( ReturnTrue3, "src/bool.c:ReturnTrue"); - - ReturnTrueFunc = NewFunctionC( "RETURN_TRUE", -1L, "args", ReturnTrue1 ); - HDLR_FUNC( ReturnTrueFunc, 1 ) = ReturnTrue1; - HDLR_FUNC( ReturnTrueFunc, 2 ) = ReturnTrue2; - HDLR_FUNC( ReturnTrueFunc, 3 ) = ReturnTrue3; - AssGVar( GVarName( "RETURN_TRUE" ), ReturnTrueFunc ); + InitHandlerFunc( ReturnTrue1, "src/bool.c:ReturnTrue1" ); + InitHandlerFunc( ReturnTrue2, "src/bool.c:ReturnTrue2" ); + InitHandlerFunc( ReturnTrue3, "src/bool.c:ReturnTrue3" ); + + if ( ! SyRestoring ) { + tmp = NewFunctionC( "RETURN_TRUE", -1L, "args", ReturnTrue1 ); + HDLR_FUNC( tmp, 1 ) = ReturnTrue1; + HDLR_FUNC( tmp, 2 ) = ReturnTrue2; + HDLR_FUNC( tmp, 3 ) = ReturnTrue3; + AssGVar( GVarName("RETURN_TRUE"), tmp ); + } /* make and install the 'RETURN_FALSE' function */ - InitHandlerFunc( ReturnFalse1, "src/bool.c:ReturnFalse1"); - InitHandlerFunc( ReturnFalse2, "src/bool.c:ReturnFalse2"); - InitHandlerFunc( ReturnFalse3, "src/bool.c:ReturnFalse3"); - - ReturnFalseFunc = NewFunctionC("RETURN_FALSE",-1L,"args",ReturnFalse1); - HDLR_FUNC( ReturnFalseFunc, 1 ) = ReturnFalse1; - HDLR_FUNC( ReturnFalseFunc, 2 ) = ReturnFalse2; - HDLR_FUNC( ReturnFalseFunc, 3 ) = ReturnFalse3; - AssGVar( GVarName( "RETURN_FALSE" ), ReturnFalseFunc ); + InitHandlerFunc( ReturnFalse1, "src/bool.c:ReturnFalse1" ); + InitHandlerFunc( ReturnFalse2, "src/bool.c:ReturnFalse2" ); + InitHandlerFunc( ReturnFalse3, "src/bool.c:ReturnFalse3" ); + + if ( ! SyRestoring ) { + tmp = NewFunctionC("RETURN_FALSE",-1L,"args",ReturnFalse1); + HDLR_FUNC( tmp, 1 ) = ReturnFalse1; + HDLR_FUNC( tmp, 2 ) = ReturnFalse2; + HDLR_FUNC( tmp, 3 ) = ReturnFalse3; + AssGVar( GVarName( "RETURN_FALSE" ), tmp ); + } /* make and install the 'RETURN_FAIL' function */ - InitHandlerFunc( ReturnFail1, "src/bool.c:ReturnFail1"); - InitHandlerFunc( ReturnFail2, "src/bool.c:ReturnFail2"); - InitHandlerFunc( ReturnFail3, "src/bool.c:ReturnFail3"); - - ReturnFailFunc = NewFunctionC("RETURN_FAIL", -1L, "args", ReturnFail1); - HDLR_FUNC( ReturnFailFunc, 1 ) = ReturnFail1; - HDLR_FUNC( ReturnFailFunc, 2 ) = ReturnFail2; - HDLR_FUNC( ReturnFailFunc, 3 ) = ReturnFail3; - AssGVar( GVarName( "RETURN_FAIL" ), ReturnFailFunc ); + InitHandlerFunc( ReturnFail1, "src/bool.c:ReturnFail1" ); + InitHandlerFunc( ReturnFail2, "src/bool.c:ReturnFail2" ); + InitHandlerFunc( ReturnFail3, "src/bool.c:ReturnFail3" ); + + if ( ! SyRestoring ) { + tmp = NewFunctionC("RETURN_FAIL", -1L, "args", ReturnFail1); + HDLR_FUNC( tmp, 1 ) = ReturnFail1; + HDLR_FUNC( tmp, 2 ) = ReturnFail2; + HDLR_FUNC( tmp, 3 ) = ReturnFail3; + AssGVar( GVarName( "RETURN_FAIL" ), tmp ); + } } + +/**************************************************************************** +** +*E CheckBool() . check the initialisation of initialize the booleans package +** +** 'InitBool' initializes the boolean package. +*/ +void CheckBool ( void ) +{ + SET_REVISION( "bool_c", Revision_bool_c ); + SET_REVISION( "bool_h", Revision_bool_h ); +} + + /**************************************************************************** ** diff --git a/src/bool.h b/src/bool.h index 254124e9ff..0f4003229f 100644 --- a/src/bool.h +++ b/src/bool.h @@ -45,82 +45,41 @@ extern Obj Fail; /**************************************************************************** ** -*F ReturnTrue1( ) . . . . . . . . . . . . . . . . . . return 'True' -*F ReturnTrue2( , ) . . . . . . . . . . . . . . return 'True' -*F ReturnTrue3( , , ) . . . . . . . . . . return 'True' -*F ReturnFalse1( ) . . . . . . . . . . . . . . . . . return 'False' -*F ReturnFalse2( , ) . . . . . . . . . . . . . return 'False' -*F ReturnFalse3( , , ) . . . . . . . . . return 'False' -*F ReturnFail1( ) . . . . . . . . . . . . . . . . . . return 'Fail' -*F ReturnFail2( , ) . . . . . . . . . . . . . . return 'Fail' -*F ReturnFail3( , , ) . . . . . . . . . . return 'Fail' -** -** 'ReturnTrue?' simply return 'True' independent of the values of the -** arguments. -** -** 'ReturnFalse?' likewise return 'False'. -** -** 'ReturnFail?' likewise return 'Fail'. -** -** Those functions are useful for dispatcher tables if the types already -** determine the outcome. +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * */ -extern Obj ReturnTrue1 ( - Obj self, - Obj val1 ); - -extern Obj ReturnTrue2 ( - Obj self, - Obj val1, - Obj val2 ); - -extern Obj ReturnTrue3 ( - Obj self, - Obj val1, - Obj val2, - Obj val3 ); - -extern Obj ReturnFalse1 ( - Obj self, - Obj val1 ); - -extern Obj ReturnFalse2 ( - Obj self, - Obj val1, - Obj val2 ); +/**************************************************************************** +** -extern Obj ReturnFalse3 ( - Obj self, - Obj val1, - Obj val2, - Obj val3 ); +*E SetupBool() . . . . . . . . . . . . . . . initialize the booleans package +*/ +extern void SetupBool ( void ); -extern Obj ReturnFail1 ( - Obj self, - Obj val1 ); +/**************************************************************************** +** +*E InitBool() . . . . . . . . . . . . . . . initialize the booleans package +** +** 'InitBool' initializes the boolean package. +*/ +extern void InitBool ( void ); -extern Obj ReturnFail2 ( - Obj self, - Obj val1, - Obj val2 ); -extern Obj ReturnFail3 ( - Obj self, - Obj val1, - Obj val2, - Obj val3 ); +/**************************************************************************** +** +*E CheckBool() . check the initialisation of initialize the booleans package +** +** 'InitBool' initializes the boolean package. +*/ +extern void CheckBool ( void ); /**************************************************************************** ** -*E InitBool() . . . . . . . . . . . . . . . initialize the booleans package -** -** 'InitBool' initializes the boolean package. +*E bool.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here */ -extern void InitBool ( void ); + diff --git a/src/calls.c b/src/calls.c index c292b1454b..8fffd73e27 100644 --- a/src/calls.c +++ b/src/calls.c @@ -42,7 +42,7 @@ SYS_CONST char * Revision_calls_c = #include "objects.h" /* objects */ #include "scanner.h" /* scanner */ -#include "gap.h" /* error handling */ +#include "gap.h" /* error handling, initialisation */ #include "gvars.h" /* global variables */ @@ -50,19 +50,24 @@ SYS_CONST char * Revision_calls_c = #include "calls.h" /* generic call mechanism */ #undef INCLUDE_DECLARATION_PART -#include "opers.h" /* generic operations package */ +#include "opers.h" /* generic operations */ -#include "lists.h" /* generic list package */ +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ + +#include "lists.h" /* generic lists */ #include "bool.h" /* booleans */ #include "plist.h" /* plain lists */ -#include "string.h" /* strings and characters */ +#include "string.h" /* strings */ + +#include "code.h" /* coder */ +#include "vars.h" /* variables */ -#include "code.h" /* coder package */ -#include "vars.h" /* local variables */ +#include "stats.h" /* statements */ -#include "stats.h" /* statment package */ +#include "saveload.h" /* saving and loading */ /**************************************************************************** @@ -883,24 +888,27 @@ Obj DoProfXargs ( #endif typedef struct { - ObjFunc hdlr; + ObjFunc hdlr; SYS_CONST Char * cookie; } -TNumHandlerInfo; +TypeHandlerInfo; + +static UInt HandlerSortingStatus = 0; -static TNumHandlerInfo HandlerFuncs[MAX_HANDLERS]; +static TypeHandlerInfo HandlerFuncs[MAX_HANDLERS]; static UInt NHandlerFuncs = 0; void InitHandlerFunc ( - ObjFunc hdlr, - SYS_CONST Char * cookie ) + ObjFunc hdlr, + SYS_CONST Char * cookie ) { if ( NHandlerFuncs >= MAX_HANDLERS ) { - Pr( "No room left for function handler\n", 0L, 0L ); - SyExit(1); + Pr( "No room left for function handler\n", 0L, 0L ); + SyExit(1); } HandlerFuncs[NHandlerFuncs].hdlr = hdlr; HandlerFuncs[NHandlerFuncs].cookie = cookie; + HandlerSortingStatus = 0; /* no longer sorted by handler or cookie */ NHandlerFuncs++; } @@ -911,45 +919,155 @@ void InitHandlerFunc ( *f CheckHandlersBag( ) . . . . . . check that handlers are initialised */ static void CheckHandlersBag( - Bag bag ) + Bag bag ) { #ifdef DEBUG_HANDLER_REGISTRATION - UInt i; - UInt j; - ObjFunc hdlr; + UInt i; + UInt j; + ObjFunc hdlr; if ( TNUM_BAG(bag) == T_FUNCTION ) { - for ( j = 0; j < 8; j++ ) { - hdlr = HDLR_FUNC(bag,j); - - /* zero handlers are used in a few odd places */ - if ( hdlr != 0 ) { - for ( i = 0; i < NHandlerFuncs; i++ ) { - if ( hdlr == HandlerFuncs[i].hdlr ) - break; - } - if ( i == NHandlerFuncs ) { - Pr("Unregistered Handler %d args ", j, 0L); - PrintObj(NAME_FUNC(bag)); - Pr("\n",0L,0L); - } - } - } + for ( j = 0; j < 8; j++ ) { + hdlr = HDLR_FUNC(bag,j); + + /* zero handlers are used in a few odd places */ + if ( hdlr != 0 ) { + for ( i = 0; i < NHandlerFuncs; i++ ) { + if ( hdlr == HandlerFuncs[i].hdlr ) + break; + } + if ( i == NHandlerFuncs ) { + Pr("Unregistered Handler %d args ", j, 0L); + PrintObj(NAME_FUNC(bag)); + Pr("\n",0L,0L); + } + } + } } #endif + return; +} + +void CheckAllHandlers( + void ) +{ + CallbackForAllBags( CheckHandlersBag); return; } -/**************************************************************************** -** -*F CheckAllHandlers() . . . . . . . . . . . . . check all function handlers -*/ -void CheckAllHandlers( void ) +static int IsLessHandlerInfo( TypeHandlerInfo *h1, + TypeHandlerInfo *h2, + UInt byWhat) { - CallbackForAllBags(CheckHandlersBag); + switch(byWhat) { + case 1: + return h1->hdlr < h2->hdlr; + case 2: + return SyStrcmp(h1->cookie, h2->cookie) < 0; + default: + ErrorQuit("Invalid sort mode %u", byWhat,0L); + return 0; /* please lint */ + } } +void SortHandlers( UInt byWhat ) +{ + TypeHandlerInfo tmp; + UInt len, h, i, k; + if (HandlerSortingStatus == byWhat) + return; + len = NHandlerFuncs; + h = 1; + while ( 9*h + 4 < len ) + { h = 3*h + 1; } + while ( 0 < h ) { + for ( i = h; i < len; i++ ) { + tmp = HandlerFuncs[i]; + k = i; + while ( h <= k && IsLessHandlerInfo(&tmp, HandlerFuncs+(k-h), byWhat)) + { + HandlerFuncs[k] = HandlerFuncs[k-h]; + k -= h; + } + HandlerFuncs[k] = tmp; + } + h = h / 3; + } + HandlerSortingStatus = byWhat; + return; +} + + +SYS_CONST Char * CookieOfHandler( + ObjFunc hdlr ) +{ + UInt i, top, bottom, middle; + if (HandlerSortingStatus != 1) + { + for (i = 0; i < NHandlerFuncs; i++) + { + if (hdlr == HandlerFuncs[i].hdlr) + return HandlerFuncs[i].cookie; + } + ErrorQuit("No Cookie for Handler", 0L, 0L); + return (Char *)0L; + } + else + { + top = NHandlerFuncs; + bottom = 0; + while (top >= bottom) { + middle = (top + bottom)/2; + if (hdlr < HandlerFuncs[middle].hdlr) + top = middle-1; + else if (hdlr > HandlerFuncs[middle].hdlr) + bottom = middle+1; + else + return HandlerFuncs[middle].cookie; + } + ErrorQuit("No Cookie for Handler", 0L, 0L); + return (Char *)0L; + } +} + + +ObjFunc HandlerOfCookie( + SYS_CONST Char * cookie ) +{ + UInt i,top,bottom,middle; + Int res; + if (HandlerSortingStatus != 2) + { + for (i = 0; i < NHandlerFuncs; i++) + { + if (SyStrcmp(cookie, HandlerFuncs[i].cookie) == 0) + return HandlerFuncs[i].hdlr; + } + ErrorQuit("No Handler for Cookie", 0L, 0L); + return (ObjFunc)0L; + } + else + { + top = NHandlerFuncs; + bottom = 0; + while (top >= bottom) { + middle = (top + bottom)/2; + res = SyStrcmp(cookie,HandlerFuncs[middle].cookie); + if (res < 0) + top = middle-1; + else if (res > 0) + bottom = middle+1; + else + return HandlerFuncs[middle].hdlr; + } + ErrorQuit("No Handler for Cookie", 0L, 0L); + return (ObjFunc)0L; + } +} + + + /**************************************************************************** ** @@ -1101,6 +1219,7 @@ Obj NewFunctionCT ( } name_o = NEW_STRING( l-k ); SyStrncat( CSTR_STRING(name_o), nams_c+k, (UInt)(l-k) ); + RESET_FILT_LIST( name_o, FN_IS_MUTABLE ); SET_ELM_PLIST( nams_o, i, name_o ); k = l; } @@ -1109,6 +1228,7 @@ Obj NewFunctionCT ( len = SyStrlen( name_c ); name_o = NEW_STRING(len); SyStrncat( CSTR_STRING(name_o), name_c, (UInt)len ); + RESET_FILT_LIST( name_o, FN_IS_MUTABLE ); /* make the function */ return NewFunctionT( type, size, name_o, narg, nams_o, hdlr ); @@ -1157,7 +1277,7 @@ void PrintFunction ( /* complete the function if necessary */ if ( IS_UNCOMPLETED_FUNC(func) ) { - COMPLETE_FUNC(func); + COMPLETE_FUNC(func); } /* print 'function (' */ @@ -1195,12 +1315,12 @@ void PrintFunction ( if ( i != nloc ) Pr("%<, %>",0L,0L); } Pr("%<;\n",0L,0L); - } + } /* print the body */ - if ( IS_UNCOMPLETED_FUNC(func) ) { - Pr( "<>", 0L, 0L ); - } + if ( IS_UNCOMPLETED_FUNC(func) ) { + Pr( "<>", 0L, 0L ); + } else if ( BODY_FUNC(func) == 0 || SIZE_OBJ(BODY_FUNC(func)) == 0 ) { Pr("<>",0L,0L); } @@ -1442,7 +1562,7 @@ Obj FuncNAME_FUNC ( if ( name == 0 ) { name = NEW_STRING(SyStrlen(deflt)); SyStrncat( CSTR_STRING(name), deflt, SyStrlen(deflt) ); - RetypeBag( name, IMMUTABLE_TNUM(TNUM_OBJ(name)) ); + RESET_FILT_LIST( name, FN_IS_MUTABLE ); NAME_FUNC(func) = name; } @@ -1466,12 +1586,12 @@ Obj FuncNARG_FUNC ( { if ( TNUM_OBJ(func) == T_FUNCTION ) { if ( IS_UNCOMPLETED_FUNC(func) ) { - COMPLETE_FUNC(func); - if ( IS_UNCOMPLETED_FUNC(func) ) { - ErrorQuit( " did not complete", 0L, 0L ); - return 0; - } - } + COMPLETE_FUNC(func); + if ( IS_UNCOMPLETED_FUNC(func) ) { + ErrorQuit( " did not complete", 0L, 0L ); + return 0; + } + } return INTOBJ_INT( NARG_FUNC(func) ); } else { @@ -1492,12 +1612,12 @@ Obj FuncNAMS_FUNC ( { if ( TNUM_OBJ(func) == T_FUNCTION ) { if ( IS_UNCOMPLETED_FUNC(func) ) { - COMPLETE_FUNC(func); - if ( IS_UNCOMPLETED_FUNC(func) ) { - ErrorQuit( " did not complete", 0L, 0L ); - return 0; - } - } + COMPLETE_FUNC(func); + if ( IS_UNCOMPLETED_FUNC(func) ) { + ErrorQuit( " did not complete", 0L, 0L ); + return 0; + } + } return NAMS_FUNC(func); } else { @@ -1549,11 +1669,11 @@ Obj FuncCLEAR_PROFILE_FUNC( return 0; } if ( IS_UNCOMPLETED_FUNC(func) ) { - COMPLETE_FUNC(func); - if ( IS_UNCOMPLETED_FUNC(func) ) { - ErrorQuit( " did not complete", 0L, 0L ); - return 0; - } + COMPLETE_FUNC(func); + if ( IS_UNCOMPLETED_FUNC(func) ) { + ErrorQuit( " did not complete", 0L, 0L ); + return 0; + } } /* clear profile info */ @@ -1596,11 +1716,11 @@ Obj FuncPROFILE_FUNC( return 0; } if ( IS_UNCOMPLETED_FUNC(func) ) { - COMPLETE_FUNC(func); - if ( IS_UNCOMPLETED_FUNC(func) ) { - ErrorQuit( " did not complete", 0L, 0L ); - return 0; - } + COMPLETE_FUNC(func); + if ( IS_UNCOMPLETED_FUNC(func) ) { + ErrorQuit( " did not complete", 0L, 0L ); + return 0; + } } /* uninstall trace handler */ @@ -1654,11 +1774,11 @@ Obj FuncIS_PROFILED_FUNC( return 0; } if ( IS_UNCOMPLETED_FUNC(func) ) { - COMPLETE_FUNC(func); - if ( IS_UNCOMPLETED_FUNC(func) ) { - ErrorQuit( " did not complete", 0L, 0L ); - return 0; - } + COMPLETE_FUNC(func); + if ( IS_UNCOMPLETED_FUNC(func) ) { + ErrorQuit( " did not complete", 0L, 0L ); + return 0; + } } return ( TNUM_OBJ(PROF_FUNC(func)) != T_FUNCTION ) ? False : True; } @@ -1680,11 +1800,11 @@ Obj FuncUNPROFILE_FUNC( return 0; } if ( IS_UNCOMPLETED_FUNC(func) ) { - COMPLETE_FUNC(func); - if ( IS_UNCOMPLETED_FUNC(func) ) { - ErrorQuit( " did not complete", 0L, 0L ); - return 0; - } + COMPLETE_FUNC(func); + if ( IS_UNCOMPLETED_FUNC(func) ) { + ErrorQuit( " did not complete", 0L, 0L ); + return 0; + } } /* uninstall trace handler */ @@ -1708,6 +1828,52 @@ Obj FuncUNPROFILE_FUNC( return (Obj)0; } +/**************************************************************************** +** +*F SaveFunction( ) save a function +** +*/ + +void SaveFunction( Obj func) +{ + UInt i; + for (i = 0; i <= 7; i++) + SaveHandler(HDLR_FUNC(func,i)); + SaveSubObj(NAME_FUNC(func)); + SaveUInt(NARG_FUNC(func)); + SaveSubObj(NAMS_FUNC(func)); + SaveSubObj(PROF_FUNC(func)); + SaveUInt(NLOC_FUNC(func)); + SaveSubObj(BODY_FUNC(func)); + SaveSubObj(ENVI_FUNC(func)); + SaveSubObj(FEXS_FUNC(func)); + if (SIZE_OBJ(func) != SIZE_FUNC) + SaveOperationExtras( func ); +} + +/**************************************************************************** +** +*F LoadFunction( ) Load a function +** +*/ + +void LoadFunction( Obj func) +{ + UInt i; + for (i = 0; i <= 7; i++) + HDLR_FUNC(func,i) = LoadHandler(); + NAME_FUNC(func) = LoadSubObj(); + NARG_FUNC(func) = LoadUInt(); + NAMS_FUNC(func) = LoadSubObj(); + PROF_FUNC(func) = LoadSubObj(); + NLOC_FUNC(func) = LoadUInt(); + BODY_FUNC(func) = LoadSubObj(); + ENVI_FUNC(func) = LoadSubObj(); + FEXS_FUNC(func) = LoadSubObj(); + if (SIZE_OBJ(func) != SIZE_FUNC) + LoadOperationExtras( func ); +} + /**************************************************************************** ** @@ -1718,25 +1884,36 @@ Obj FuncUNPROFILE_FUNC( /**************************************************************************** ** -*F InitCalls() . . . . . . . . . . . . . . . . . initialize the call package -** -** 'InitCalls' initializes the call package. +*F SetupCalls() . . . . . . . . . . . . . . . . initialize the call package */ -void InitCalls () +void SetupCalls ( void ) { /* install the marking functions */ InfoBags[ T_FUNCTION ].name = "function"; InitMarkFuncBags( T_FUNCTION , MarkAllSubBags ); - /* install the kind function */ - ImportGVarFromLibrary( "TYPE_FUNCTION", &TYPE_FUNCTION ); - ImportGVarFromLibrary( "TYPE_OPERATION", &TYPE_OPERATION ); - TypeObjFuncs[ T_FUNCTION ] = TypeFunction; + /* and the saving function */ + SaveObjFuncs[ T_FUNCTION ] = SaveFunction; /* install the printer */ PrintObjFuncs[ T_FUNCTION ] = PrintFunction; +} + + +/**************************************************************************** +** +*F InitCalls() . . . . . . . . . . . . . . . . . initialize the call package +** +** 'InitCalls' initializes the call package. +*/ +void InitCalls ( void ) +{ + /* install the kind function */ + ImportGVarFromLibrary( "TYPE_FUNCTION", &TYPE_FUNCTION ); + ImportGVarFromLibrary( "TYPE_OPERATION", &TYPE_OPERATION ); + TypeObjFuncs[ T_FUNCTION ] = TypeFunction; /* make and install the 'IS_FUNCTION' filter */ @@ -1752,7 +1929,7 @@ void InitCalls () /* make and install the 'CALL_FUNC_LIST' operation */ C_NEW_GVAR_OPER( "CALL_FUNC_LIST", 2L, "func, list", - CallFuncListOper, CallFuncListHandler, + CallFuncListOper, CallFuncListHandler, "src/calls.c:CALL_FUNC_LIST" ); @@ -1777,47 +1954,59 @@ void InitCalls () /* make and install the profile functions */ C_NEW_GVAR_FUNC( "CLEAR_PROFILE_FUNC", 1L, "func", FuncCLEAR_PROFILE_FUNC, - "src/calls.c:CLEAR_PROFILE_FUNC" ); + "src/calls.c:CLEAR_PROFILE_FUNC" ); C_NEW_GVAR_FUNC( "IS_PROFILED_FUNC", 1L, "func", FuncIS_PROFILED_FUNC, - "src/calls.c:IS_PROFILED_FUNC" ); + "src/calls.c:IS_PROFILED_FUNC" ); C_NEW_GVAR_FUNC( "PROFILE_FUNC", 1L, "func", FuncPROFILE_FUNC, - "src/calls.c:PROFILE_FUNC" ); + "src/calls.c:PROFILE_FUNC" ); C_NEW_GVAR_FUNC( "UNPROFILE_FUNC", 1L, "func", FuncUNPROFILE_FUNC, - "src/calls.c:UNPROFILE_FUNC" ); - - - /* initialise all 'Doargs' handlers */ - InitHandlerFunc( DoFail0args, "src/calls.c:DoFail0args" ); - InitHandlerFunc( DoFail1args, "src/calls.c:DoFail1args" ); - InitHandlerFunc( DoFail2args, "src/calls.c:DoFail2args" ); - InitHandlerFunc( DoFail3args, "src/calls.c:DoFail3args" ); - InitHandlerFunc( DoFail4args, "src/calls.c:DoFail4args" ); - InitHandlerFunc( DoFail5args, "src/calls.c:DoFail5args" ); - InitHandlerFunc( DoFail6args, "src/calls.c:DoFail6args" ); - InitHandlerFunc( DoFailXargs, "src/calls.c:DoFailXargs" ); - - InitHandlerFunc( DoWrap0args, "src/calls.c:DoWrap0args" ); - InitHandlerFunc( DoWrap1args, "src/calls.c:DoWrap1args" ); - InitHandlerFunc( DoWrap2args, "src/calls.c:DoWrap2args" ); - InitHandlerFunc( DoWrap3args, "src/calls.c:DoWrap3args" ); - InitHandlerFunc( DoWrap4args, "src/calls.c:DoWrap4args" ); - InitHandlerFunc( DoWrap5args, "src/calls.c:DoWrap5args" ); - InitHandlerFunc( DoWrap6args, "src/calls.c:DoWrap6args" ); - - InitHandlerFunc( DoProf0args, "src/calls.c:DoProf0args" ); - InitHandlerFunc( DoProf1args, "src/calls.c:DoProf1args" ); - InitHandlerFunc( DoProf2args, "src/calls.c:DoProf2args" ); - InitHandlerFunc( DoProf3args, "src/calls.c:DoProf3args" ); - InitHandlerFunc( DoProf4args, "src/calls.c:DoProf4args" ); - InitHandlerFunc( DoProf5args, "src/calls.c:DoProf5args" ); - InitHandlerFunc( DoProf6args, "src/calls.c:DoProf6args" ); - InitHandlerFunc( DoProfXargs, "src/calls.c:DoProfXargs" ); + "src/calls.c:UNPROFILE_FUNC" ); + + + /* initialise all 'Doargs' handlers, give the most */ + /* common ones short cookies to save space in in the saved workspace */ + InitHandlerFunc( DoFail0args, "f0" ); + InitHandlerFunc( DoFail1args, "f1" ); + InitHandlerFunc( DoFail2args, "f2" ); + InitHandlerFunc( DoFail3args, "f3" ); + InitHandlerFunc( DoFail4args, "f4" ); + InitHandlerFunc( DoFail5args, "f5" ); + InitHandlerFunc( DoFail6args, "f6" ); + InitHandlerFunc( DoFailXargs, "f7" ); + + InitHandlerFunc( DoWrap0args, "w0" ); + InitHandlerFunc( DoWrap1args, "w1" ); + InitHandlerFunc( DoWrap2args, "w2" ); + InitHandlerFunc( DoWrap3args, "w3" ); + InitHandlerFunc( DoWrap4args, "w4" ); + InitHandlerFunc( DoWrap5args, "w5" ); + InitHandlerFunc( DoWrap6args, "w6" ); + + InitHandlerFunc( DoProf0args, "p0" ); + InitHandlerFunc( DoProf1args, "p1" ); + InitHandlerFunc( DoProf2args, "p2" ); + InitHandlerFunc( DoProf3args, "p3" ); + InitHandlerFunc( DoProf4args, "p4" ); + InitHandlerFunc( DoProf5args, "p5" ); + InitHandlerFunc( DoProf6args, "p6" ); + InitHandlerFunc( DoProfXargs, "pX" ); +} + + +/**************************************************************************** +** +*F CheckCalls() . . . . . . . check the initialisation of the call package +*/ +void CheckCalls ( void ) +{ + SET_REVISION( "calls_c", Revision_calls_c ); + SET_REVISION( "calls_h", Revision_calls_h ); } diff --git a/src/calls.h b/src/calls.h index bda15537e6..315fc9eeb7 100644 --- a/src/calls.h +++ b/src/calls.h @@ -234,46 +234,6 @@ typedef Obj (* ObjFunc) (/*arguments*/); #define LEN_PROF 5 -/**************************************************************************** -** - -*F C_NEW_GVAR_FUNC( , , , , ) -*/ -#define C_NEW_GVAR_FUNC( name, nargs, nams, hdlr, cookie ) \ - InitHandlerFunc( hdlr, cookie ); \ - AssGVar( GVarName( name ), NewFunctionC( name, nargs, nams, hdlr ) ) - - -/**************************************************************************** -** -*F C_NEW_GVAR_ATTR( , , , , ) -*/ -#define C_NEW_GVAR_ATTR( name, nams, attr, hdlr, cookie ) \ - InitHandlerFunc( hdlr, cookie ); \ - attr = NewAttributeC( name, 1L, nams, hdlr ); \ - AssGVar( GVarName( name ), attr ) - - -/**************************************************************************** -** -*F C_NEW_GVAR_OPER( , , , , , ) -*/ -#define C_NEW_GVAR_OPER( name, nargs, nams, oper, hdlr, cookie ) \ - InitHandlerFunc( hdlr, cookie ); \ - oper = NewOperationC( name, nargs, nams, hdlr ); \ - AssGVar( GVarName( name ), oper ) - - -/**************************************************************************** -** -*F C_NEW_GVAR_FILT( , , , , ) -*/ -#define C_NEW_GVAR_FILT( name, nams, filt, hdlr, cookie ) \ - InitHandlerFunc( hdlr, cookie ); \ - filt = NewFilterC( name, 1L, nams, hdlr ); \ - AssGVar( GVarName( name ), filt ) - - /**************************************************************************** ** @@ -292,8 +252,15 @@ typedef Obj (* ObjFunc) (/*arguments*/); */ extern void InitHandlerFunc ( ObjFunc hdlr, - SYS_CONST Char * cookie ); + SYS_CONST Char * cookie ); +extern SYS_CONST Char * CookieOfHandler( + ObjFunc hdlr ); + +extern ObjFunc HandlerOfCookie ( + SYS_CONST Char * cookie ); + +extern void SortHandlers( UInt byWhat ); /**************************************************************************** ** @@ -392,11 +359,25 @@ extern Obj CallFuncListHandler ( /**************************************************************************** ** +*F SetupCalls() . . . . . . . . . . . . . . . . initialize the call package +*/ +extern void SetupCalls ( void ); + + +/**************************************************************************** +** *F InitCalls() . . . . . . . . . . . . . . . . . initialize the call package ** ** 'InitCalls' initializes the call package. */ -extern void InitCalls ( void ); +extern void InitCalls (); + + +/**************************************************************************** +** +*F CheckCalls() . . . . . . . check the initialisation of the call package +*/ +extern void CheckCalls ( void ); /**************************************************************************** diff --git a/src/code.c b/src/code.c index 122c4e9e98..0d08d3debc 100644 --- a/src/code.c +++ b/src/code.c @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A code.c GAP source Martin Schoenert +*W code.c GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -11,35 +11,41 @@ ** The coder package is the part of the interpreter that creates the ** expressions. Its functions are called from the reader. */ -char * Revision_code_c = - "@(#)$Id$"; - #include /* assert */ - #include "system.h" /* Ints, UInts */ -#include "gasman.h" /* NewBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, types */ -#include "scanner.h" /* Pr ?*/ +SYS_CONST char * Revision_code_c = + "@(#)$Id$"; + +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ + +#include "gap.h" /* error handling, initialisation */ -#include "calls.h" /* NARG_FUNC, NLOC_FUNC, NAMS_FU...*/ +#include "calls.h" /* generic call mechanism */ /*N 1996/06/16 mschoene func expressions should be different from funcs */ -#include "records.h" /* RNamIntg */ +#include "records.h" /* generic records */ -#include "integer.h" /* SumInt, ProdInt */ +#include "integer.h" /* integers */ -#include "plist.h" /* LEN_PLIST, ELM_PLIST, ... */ +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ -#include "funcs.h" /* MakeFunction */ +#include "lists.h" /* generic lists */ +#include "plist.h" /* plain lists */ +#include "string.h" /* strings */ + +#include "funcs.h" /* functions */ #define INCLUDE_DECLARATION_PART -#include "code.h" /* declaration part of the package */ +#include "code.h" /* coder */ #undef INCLUDE_DECLARATION_PART -#include "vars.h" /* SWITCH_TO_NEW_LVARS, ... */ +#include "vars.h" /* variables */ -#include "gap.h" /* CompNowFuncs, CompNowCount */ +#include "saveload.h" /* saving and loading */ /**************************************************************************** @@ -567,7 +573,7 @@ void CodeFuncExprEnd ( PushStat( stat1 ); if ( TNUM_STAT(stat1) != T_RETURN_VOID && TNUM_STAT(stat1) != T_RETURN_OBJ ) - { + { CodeReturnVoid(); nr++; } @@ -872,8 +878,8 @@ void CodeWhileEndBody ( /* collect the statements into a statement sequence if necessary */ if ( nr == 0 ) { - ErrorQuit( "Error, statement expected between while/od", - 0L, 0L ); + ErrorQuit( "Error, statement expected between while/od", + 0L, 0L ); } if ( 3 < nr ) { PushStat( PopSeqStat( nr ) ); @@ -959,8 +965,8 @@ void CodeRepeatEnd ( void ) /* collect the statements into a statement sequence if necessary */ if ( nr == 0 ) { - ErrorQuit( "Error, statement expected between repeat/until", - 0L, 0L ); + ErrorQuit( "Error, statement expected between repeat/until", + 0L, 0L ); } if ( 3 < nr ) { PushStat( PopSeqStat( nr ) ); @@ -2594,7 +2600,7 @@ void CodeIsbComObjName ( /**************************************************************************** ** -*F CodeIsbComObjExpr() . . . . . . . . . . code bound com object expr check +*F CodeIsbComObjExpr() . . . . . . . . . . code bound com object expr check */ void CodeIsbComObjExpr ( void ) { @@ -2705,6 +2711,47 @@ void CodeAssertEnd3Args ( void ) PushStat( stat ); } +/**************************************************************************** +** +*F SaveBody( ) . . . . . . . . . . . . . . . workspace saving method +** +** A body is made up of statements and expressions, and these are all +** organised to regular boundaries based on the types Stat and Expr, which +** are currently both UInt +** +** String literals should really be saved byte-wise, to be safe across machines +** of different endianness, but this would mean parsing the bag as we save it +** which it would be nice to avoid just now. +*/ +void SaveBody ( Obj body ) +{ + UInt i; + UInt *ptr; + ptr = (UInt *) ADDR_OBJ(body); + for (i = 0; i < (SIZE_OBJ(body)+sizeof(UInt)-1)/sizeof(UInt); i++) + SaveUInt(*ptr++); +} + +/**************************************************************************** +** +*F LoadBody( ) . . . . . . . . . . . . . . . workspace loading method +** +** A body is made up of statements and expressions, and these are all +** organised to regular boundaries based on the types Stat and Expr, which +** are currently both UInt +** +*/ +void LoadBody ( Obj body ) +{ + UInt i; + UInt *ptr; + ptr = (UInt *) ADDR_OBJ(body); + for (i = 0; i < (SIZE_OBJ(body)+sizeof(UInt)-1)/sizeof(UInt); i++) + *ptr++ = LoadUInt(); +} + + + /**************************************************************************** ** @@ -2715,24 +2762,48 @@ void CodeAssertEnd3Args ( void ) /**************************************************************************** ** +*F SetupCode() . . . . . . . . . . . . . . . . initialize the coder package +*/ +void SetupCode ( void ) +{ + /* install the marking functions for function body bags */ + InfoBags[ T_BODY ].name = "function body bag"; + InitMarkFuncBags( T_BODY , MarkNoSubBags ); + + SaveObjFuncs[ T_BODY ] = SaveBody; + LoadObjFuncs[ T_BODY ] = LoadBody; +} + + +/**************************************************************************** +** *F InitCode() . . . . . . . . . . . . . . . . initialize the coder package ** ** 'InitCode' initializes the coder package. */ -void InitCode ( void ) +void InitCode ( void ) { /* make the result variable known to Gasman */ InitGlobalBag( &CodeResult, "CodeResult" ); /* allocate the statements and expressions stacks */ InitGlobalBag( &StackStat, "StackStat" ); - StackStat = NewBag( T_BODY, 64*sizeof(Stat) ); InitGlobalBag( &StackExpr, "StackExpr" ); - StackExpr = NewBag( T_BODY, 64*sizeof(Expr) ); + if ( ! SyRestoring ) { + StackStat = NewBag( T_BODY, 64*sizeof(Stat) ); + StackExpr = NewBag( T_BODY, 64*sizeof(Expr) ); + } +} - /* install the marking functions for function body bags */ - InfoBags[ T_BODY ].name = "function body bag"; - InitMarkFuncBags( T_BODY , MarkNoSubBags ); + +/**************************************************************************** +** +*F CheckCode() . . . . . . . . check the initialisation of the coder package +*/ +void CheckCode ( void ) +{ + SET_REVISION( "code_c", Revision_code_c ); + SET_REVISION( "code_h", Revision_code_h ); } diff --git a/src/code.h b/src/code.h index b352abd393..f8d26c7725 100644 --- a/src/code.h +++ b/src/code.h @@ -36,7 +36,7 @@ SYS_CONST char * Revision_code_h = ** If 'Stat' is different from 'Expr', then a lot of things will probably ** break. */ -#define Stat UInt4 +#define Stat UInt /**************************************************************************** @@ -1205,11 +1205,25 @@ extern void CodeAssertEnd3Args ( void ); /**************************************************************************** ** +*F SetupCode() . . . . . . . . . . . . . . . . initialize the coder package +*/ +extern void SetupCode ( void ); + + +/**************************************************************************** +** *F InitCode() . . . . . . . . . . . . . . . . initialize the coder package ** ** 'InitCode' initializes the coder package. */ -extern void InitCode ( void ); +extern void InitCode ( void ); + + +/**************************************************************************** +** +*F CheckCode() . . . . . . . . check the initialisation of the coder package +*/ +extern void CheckCode ( void ); /**************************************************************************** diff --git a/src/compiled.c b/src/compiled.c deleted file mode 100644 index dd20e1b9cc..0000000000 --- a/src/compiled.c +++ /dev/null @@ -1,385 +0,0 @@ -/**************************************************************************** -** -*W compiled.c GAP source Martin Schoenert -** -** This package defines macros and functions that are used by compiled code. -** Those macros and functions should go into the appropriate packages. -*/ - -#include "system.h" -#include "gasman.h" -#include "objects.h" -#include "gvars.h" -#include "calls.h" -#include "ariths.h" -#include "records.h" -#include "lists.h" -#include "bool.h" -#include "integer.h" -#include "precord.h" -#include "plist.h" -#include "range.h" -#include "string.h" -#include "code.h" -#include "vars.h" -#include "gap.h" -#include "permutat.h" - - -/* checks, should go into 'gap.c' * * * * * * * * * * * * * * * * * * * * */ - -void ErrorQuitBound ( - Char * name ) -{ - ErrorQuit( - "variable '%s' must have an assigned value", - (Int)name, 0L ); -} - -void ErrorQuitFuncResult ( void ) -{ - ErrorQuit( - "function must return a value", - 0L, 0L ); -} - -void ErrorQuitIntSmall ( - Obj obj ) -{ - ErrorQuit( - " must be a small integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(obj)].name), 0L ); -} - -void ErrorQuitIntSmallPos ( - Obj obj ) -{ - ErrorQuit( - " must be a positive small integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(obj)].name), 0L ); -} - -void ErrorQuitBool ( - Obj obj ) -{ - ErrorQuit( - " must be 'true' or 'false' (not a %s)", - (Int)(InfoBags[TNUM_OBJ(obj)].name), 0L ); -} - -void ErrorQuitFunc ( - Obj obj ) -{ - ErrorQuit( - " must be a function (not a %s)", - (Int)(InfoBags[TNUM_OBJ(obj)].name), 0L ); -} - -void ErrorQuitNrArgs ( - Int narg, - Obj args ) -{ - ErrorQuit( - "Function Calls: number of arguments must be %d (not %d)", - narg, LEN_PLIST( args ) ); -} - - -/* lists, should go into 'lists.c' * * * * * * * * * * * * * * * * * * * * */ - -Obj ElmsListCheck ( - Obj list, - Obj poss ) -{ - if ( ! IS_POSS_LIST(poss) ) { - ErrorQuit( - "List Elements: must be a dense list of positive integers", - 0L, 0L ); - } - return ELMS_LIST( list, poss ); -} - -void ElmsListLevelCheck ( - Obj lists, - Obj poss, - Int level ) -{ - if ( ! IS_POSS_LIST(poss) ) { - ErrorQuit( - "List Elements: must be a dense list of positive integers", - 0L, 0L ); - } - ElmsListLevel( lists, poss, level ); -} - -void AsssListCheck ( - Obj list, - Obj poss, - Obj rhss ) -{ - if ( ! IS_POSS_LIST(poss) ) { - ErrorQuit( - "List Assignment: must be a dense list of positive integers", - 0L, 0L ); - } - if ( ! IS_DENSE_LIST(rhss) ) { - ErrorQuit( - "List Assignment: must be a dense list", - 0L, 0L ); - } - if ( LEN_LIST( poss ) != LEN_LIST( rhss ) ) { - ErrorQuit( - "List Assignment: must have the same length as (%d)", - (Int)LEN_LIST(poss), 0L ); - } - ASSS_LIST( list, poss, rhss ); -} - -void AsssPosObjCheck ( - Obj list, - Obj poss, - Obj rhss ) -{ - if ( ! IS_POSS_LIST(poss) ) { - ErrorQuit( - "List Assignment: must be a dense list of positive integers", - 0L, 0L ); - } - if ( ! IS_DENSE_LIST(rhss) ) { - ErrorQuit( - "List Assignment: must be a dense list", - 0L, 0L ); - } - if ( LEN_LIST( poss ) != LEN_LIST( rhss ) ) { - ErrorQuit( - "List Assignment: must have the same length as (%d)", - (Int)LEN_LIST(poss), 0L ); - } - if ( TNUM_OBJ(list) == T_POSOBJ ) { - ErrorQuit( "sorry: !{} not yet implemented", 0L, 0L ); - } - else { - ASSS_LIST( list, poss, rhss ); - } -} - -void AsssListLevelCheck ( - Obj lists, - Obj poss, - Obj rhss, - Int level ) -{ - if ( ! IS_POSS_LIST(poss) ) { - ErrorQuit( - "List Assignment: must be a dense list of positive integers", - 0L, 0L ); - } - AsssListLevel( lists, poss, rhss, level ); -} - - -/* ranges, should go into 'range.c' * * * * * * * * * * * * * * * * * * * */ - -Obj Range2Check ( - Obj first, - Obj last ) -{ - Obj range; - Int f, l; - if ( ! IS_INTOBJ(first) ) { - ErrorQuit( - "Range: must be a positive small integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(first)].name), 0L ); - } - f = INT_INTOBJ(first); - if ( ! IS_INTOBJ(last) ) { - ErrorQuit( - "Range: must be a positive small integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(last)].name), 0L ); - } - l = INT_INTOBJ(last); - if ( f > l ) { - range = NEW_PLIST( T_PLIST, 0 ); - SET_LEN_PLIST( range, 0 ); - } - else if ( f == l ) { - range = NEW_PLIST( T_PLIST, 1 ); - SET_LEN_PLIST( range, 1 ); - SET_ELM_PLIST( range, 1, first ); - } - else { - range = NEW_RANGE_SSORT(); - SET_LEN_RANGE( range, (l-f) + 1 ); - SET_LOW_RANGE( range, f ); - SET_INC_RANGE( range, 1 ); - } - return range; -} - -Obj Range3Check ( - Obj first, - Obj second, - Obj last ) -{ - Obj range; - Int f, i, l; - if ( ! IS_INTOBJ(first) ) { - ErrorQuit( - "Range: must be a positive small integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(first)].name), 0L ); - } - f = INT_INTOBJ(first); - if ( ! IS_INTOBJ(second) ) { - ErrorQuit( - "Range: must be a positive small integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(second)].name), 0L ); - } - if ( first == second ) { - ErrorQuit( - "Range: must not be equal to (%d)", - (Int)INT_INTOBJ(first), 0L ); - } - i = INT_INTOBJ(second) - f; - if ( ! IS_INTOBJ(last) ) { - ErrorQuit( - "Range: must be a positive small integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(last)].name), 0L ); - } - l = INT_INTOBJ(last); - if ( (l - f) % i != 0 ) { - ErrorQuit( - "Range: - (%d) must be divisible by (%d)", - (Int)(l - f), (Int)i ); - } - if ( (0 < i && f > l) || (i < 0 && f < l) ) { - range = NEW_PLIST( T_PLIST, 0 ); - SET_LEN_PLIST( range, 0 ); - } - else if ( f == l ) { - range = NEW_PLIST( T_PLIST, 1 ); - SET_LEN_PLIST( range, 1 ); - SET_ELM_PLIST( range, 1, first ); - } - else { - if ( 0 < i ) - range = NEW_RANGE_SSORT(); - else - range = NEW_RANGE_NSORT(); - SET_LEN_RANGE( range, (l - f) / i + 1 ); - SET_LOW_RANGE( range, f ); - SET_INC_RANGE( range, i ); - } - return range; -} - - -Obj Array2Perm ( - Obj array ) -{ - Obj perm; /* permutation, result */ - UInt4 * ptr4; /* pointer into perm */ - UInt2 * ptr2; /* pointer into perm */ - Obj val; /* one entry as value */ - UInt c, p, l; /* entries in permutation */ - UInt m; /* maximal entry in permutation */ - Obj cycle; /* one cycle of permutation */ - UInt i, j, k; /* loop variable */ - - /* special case for identity permutation */ - if ( LEN_LIST(array) == 0 ) { - return IdentityPerm; - } - - /* allocate the new permutation */ - m = 0; - perm = NEW_PERM4( 0 ); - - /* loop over the cycles */ - for ( i = 1; i <= LEN_LIST(array); i++ ) { - cycle = ELM_LIST( array, i ); - while ( ! IS_LIST(cycle) ) { - cycle = ErrorReturnObj( - "Arra2Perm: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(cycle)].name), 0L, - "you can return a list" ); - } - - /* loop over the entries of the cycle */ - c = p = l = 0; - for ( j = LEN_LIST(cycle); 1 <= j; j-- ) { - - /* get and check current entry for the cycle */ - val = ELM_LIST( cycle, j ); - while ( ! IS_INTOBJ(val) || INT_INTOBJ(val) <= 0 ) { - val = ErrorReturnObj( - "Permutation: must be a positive integer (not to a %s)", - (Int)(InfoBags[TNUM_OBJ(val)].name), 0L, - "you can return a positive integer" ); - } - c = INT_INTOBJ(val); - - /* if necessary resize the permutation */ - if ( SIZE_OBJ(perm)/sizeof(UInt4) < c ) { - ResizeBag( perm, (c + 1023) / 1024 * 1024 * sizeof(UInt4) ); - ptr4 = ADDR_PERM4( perm ); - for ( k = m+1; k <= SIZE_OBJ(perm)/sizeof(UInt4); k++ ) { - ptr4[k-1] = k-1; - } - } - if ( m < c ) { - m = c; - } - - /* check that the cycles are disjoint */ - ptr4 = ADDR_PERM4( perm ); - if ( (p != 0 && p == c) || (ptr4[c-1] != c-1) ) { - return ErrorReturnObj( - "Permutation: cycles must be disjoint", - 0L, 0L, - "you can return a permutation" ); - } - - /* enter the previous entry at current location */ - ptr4 = ADDR_PERM4( perm ); - if ( p != 0 ) { ptr4[c-1] = p-1; } - else { l = c; } - - /* remember current entry for next round */ - p = c; - } - - /* enter first (last popped) entry at last (first popped) location */ - ptr4 = ADDR_PERM4( perm ); - ptr4[l-1] = p-1; - - } - - /* if possible represent the permutation with short entries */ - if ( m <= 65536UL ) { - ptr2 = ADDR_PERM2( perm ); - ptr4 = ADDR_PERM4( perm ); - for ( k = 1; k <= m; k++ ) { - ptr2[k-1] = ptr4[k-1]; - }; - RetypeBag( perm, T_PERM2 ); - ResizeBag( perm, m * sizeof(UInt2) ); - } - - /* otherwise just shorten the permutation */ - else { - ResizeBag( perm, m * sizeof(UInt4) ); - } - - /* return the permutation */ - return perm; -} - - - -/**************************************************************************** -** -*E compiled.c . . . . . . . . . . . . . . . . . . . . . . . . . . ends here -*/ - - - diff --git a/src/compiled.h b/src/compiled.h index c9ac6bc6a9..92ed26c963 100644 --- a/src/compiled.h +++ b/src/compiled.h @@ -5,23 +5,74 @@ ** This package defines macros and functions that are used by compiled code. ** Those macros and functions should go into the appropriate packages. */ -#include "system.h" -#include "gasman.h" -#include "objects.h" -#include "gvars.h" -#include "calls.h" -#include "ariths.h" -#include "records.h" -#include "lists.h" -#include "bool.h" -#include "integer.h" -#include "precord.h" -#include "plist.h" -#include "string.h" -#include "code.h" -#include "vars.h" -#include "gap.h" -#include "permutat.h" +#include "system.h" /* system dependent part */ + +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ + +#include "gap.h" /* error handling, initialisation */ + +#include "read.h" /* reader */ + +#include "gvars.h" /* global variables */ +#include "calls.h" /* generic call mechanism */ +#include "opers.h" /* generic operations */ + +#include "ariths.h" /* basic arithmetic */ + +#include "integer.h" /* integers */ +#include "rational.h" /* rationals */ +#include "cyclotom.h" /* cyclotomics */ +#include "finfield.h" /* finite fields and ff elements */ + +#include "bool.h" /* booleans */ +#include "permutat.h" /* permutations */ + +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ + +#include "lists.h" /* generic lists */ +#include "listoper.h" /* operations for generic lists */ +#include "listfunc.h" /* functions for generic lists */ +#include "plist.h" /* plain lists */ +#include "set.h" /* plain sets */ +#include "vector.h" /* functions for plain vectors */ +#include "blister.h" /* boolean lists */ +#include "range.h" /* ranges */ +#include "string.h" /* strings */ + +#include "objfgelm.h" /* objects of free groups */ +#include "objpcgel.h" /* objects of polycyclic groups */ +#include "objscoll.h" /* single collector */ +#include "objcftl.h" /* from the left collect */ + +#include "dt.h" /* deep thought */ +#include "dteval.h" /* deep though evaluation */ + +#include "sctable.h" /* structure constant table */ +#include "costab.h" /* coset table */ +#include "tietze.h" /* tietze helper functions */ + +#include "code.h" /* coder */ + +#include "vars.h" /* variables */ +#include "exprs.h" /* expressions */ +#include "stats.h" /* statements */ +#include "funcs.h" /* functions */ + + +#include "intrprtr.h" /* interpreter */ + +#include "compiler.h" /* compiler */ + +#include "compstat.h" /* statically linked modules */ + +#include "saveload.h" /* saving and loading */ + +#include "streams.h" /* streams package */ +#include "sysfiles.h" /* file input/output */ +#include "weakptr.h" /* weak pointers */ extern Obj InfoDecision; @@ -33,10 +84,6 @@ extern Obj NewAndFilter ( Obj oper2 ); -extern Obj Array2Perm( - Obj array ); - - /* types, should go into 'gvars.c' and 'records.c' * * * * * * * * * * * * */ typedef UInt GVar; @@ -49,45 +96,24 @@ typedef UInt RNam; #define CHECK_BOUND(obj,name) \ if ( obj == 0 ) ErrorQuitBound(name); -extern void ErrorQuitBound ( - Char * name ); - #define CHECK_FUNC_RESULT(obj) \ if ( obj == 0 ) ErrorQuitFuncResult(); -extern void ErrorQuitFuncResult ( void ); - #define CHECK_INT_SMALL(obj) \ if ( ! IS_INTOBJ(obj) ) ErrorQuitIntSmall(obj); -extern void ErrorQuitIntSmall ( - Obj obj ); - #define CHECK_INT_SMALL_POS(obj) \ if ( ! IS_INTOBJ(obj) || INT_INTOBJ(obj) <= 0 ) ErrorQuitIntSmallPos(obj); -extern void ErrorQuitIntSmallPos ( - Obj obj ); - #define CHECK_BOOL(obj) \ if ( obj != True && obj != False ) ErrorQuitBool(obj); -extern void ErrorQuitBool ( - Obj obj ); - #define CHECK_FUNC(obj) \ if ( TNUM_OBJ(obj) != T_FUNCTION ) ErrorQuitFunc(obj); -extern void ErrorQuitFunc ( - Obj obj ); - #define CHECK_NR_ARGS(narg,args) \ if ( narg != LEN_PLIST(args) ) ErrorQuitNrArgs(narg,args); -extern void ErrorQuitNrArgs ( - Int narg, - Obj args ); - /* higher variables, should go into 'vars.c' * * * * * * * * * * * * * * * */ @@ -270,40 +296,6 @@ extern Obj GF_ITERATOR; extern Obj GF_IS_DONE_ITER; extern Obj GF_NEXT_ITER; -extern Obj ElmsListCheck ( - Obj list, - Obj poss ); - -extern void ElmsListLevelCheck ( - Obj lists, - Obj poss, - Int level ); - -extern void AsssListCheck ( - Obj list, - Obj poss, - Obj rhss ); - -extern void AsssListLevelCheck ( - Obj lists, - Obj poss, - Obj rhss, - Int level ); - - -/* strings, should go into 'string.c' * * * * * * * * * * * * * * * * * * */ - -/* ranges, should go into 'range.c' * * * * * * * * * * * * * * * * * * * */ - -extern Obj Range2Check ( - Obj first, - Obj last ); - -extern Obj Range3Check ( - Obj first, - Obj second, - Obj last ); - /**************************************************************************** ** diff --git a/src/compiler.c b/src/compiler.c index 40e751070a..7f802ce7e3 100644 --- a/src/compiler.c +++ b/src/compiler.c @@ -10,44 +10,44 @@ ** ** This file contains the GAP to C compiler. */ -char * Revision_compiler_c = - "@(#)$Id$"; +#include /* variable argument list macros */ +#include "system.h" /* Ints, UInts */ +SYS_CONST char * Revision_compiler_c = + "@(#)$Id$"; -#include /* variable argument list macros */ -#include "system.h" /* Ints, UInts */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ -#include "gasman.h" /* NewBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, types */ -#include "scanner.h" /* Pr */ +#include "gvars.h" /* global variables */ -#include "gvars.h" /* InitGVars */ +#include "gap.h" /* error handling, initialisation */ -#include "calls.h" /* NARG_FUNC, NLOC_FUNC, NAMS_FU...*/ +#include "calls.h" /* generic call mechanism */ /*N 1996/06/16 mschoene func expressions should be different from funcs */ -#include "lists.h" /* ELM_LIST */ +#include "lists.h" /* generic lists */ -#include "records.h" /* RNamIntg */ +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ -#include "plist.h" /* LEN_PLIST, ELM_PLIST, ... */ +#include "plist.h" /* plain lists */ -#include "string.h" /* LEN_STRING, CSTR_STRING, ... */ +#include "string.h" /* strings */ -#include "code.h" /* Stat, Expr, TNUM_EXPR, ADDR_E...*/ +#include "code.h" /* coder */ -#include "exprs.h" /* PrintExpr */ -#include "stats.h" /* PrintStat */ +#include "exprs.h" /* expressions */ +#include "stats.h" /* statements */ -#include "vars.h" /* SWITCH_TO_NEW_LVARS, ... */ +#include "vars.h" /* variables */ #define INCLUDE_DECLARATION_PART -#include "compiler.h" /* declaration part of the package */ +#include "compiler.h" /* compiler */ #undef INCLUDE_DECLARATION_PART -#include "gap.h" /* Error */ - /**************************************************************************** ** @@ -5471,11 +5471,11 @@ Int CompileFunc ( NameGVar(i), NameGVar(i) ); } if ( CompGetUseGVar( i ) & COMP_USE_GVAR_COPY ) { - Emit( "InitCopyGVar( G_%n, &GC_%n );\n", + Emit( "InitCopyGVar( \"%s\", &GC_%n );\n", NameGVar(i), NameGVar(i) ); } if ( CompGetUseGVar( i ) & COMP_USE_GVAR_FOPY ) { - Emit( "InitFopyGVar( G_%n, &GF_%n );\n", + Emit( "InitFopyGVar( \"%s\", &GF_%n );\n", NameGVar(i), NameGVar(i) ); } } @@ -5586,8 +5586,6 @@ Int CompileFunc ( ** *F CompileFuncHandle( , , , , , ) */ -Obj CompileFuncFunc; - Obj CompileFuncHandler ( Obj self, Obj output, @@ -5634,9 +5632,9 @@ Obj CompileFuncHandler ( /**************************************************************************** ** -*F InitCompiler() . . . . . . . . . . . . . . . . . initialize the compiler +*F SetupCompiler() . . . . . . . . . . . . . . . . . initialize the compiler */ -void InitCompiler ( void ) +void SetupCompiler ( void ) { Int i; /* loop variable */ @@ -5839,26 +5837,41 @@ void InitCompiler ( void ) CompStatFuncs[ T_INFO ] = CompInfo; CompStatFuncs[ T_ASSERT_2ARGS ] = CompAssert2; CompStatFuncs[ T_ASSERT_3ARGS ] = CompAssert3; +} +/**************************************************************************** +** +*F InitCompiler() . . . . . . . . . . . . . . . . . initialize the compiler +*/ +void InitCompiler ( void ) +{ /* get the identifiers of 'Length' and 'Add' (for inlining) */ G_Length = GVarName( "Length" ); - G_Add = GVarName( "Add" ); + G_Add = GVarName( "Add" ); /* announce the global variables */ - InitGlobalBag( &CompInfoGVar, "CompInfoGVar" ); - InitGlobalBag( &CompInfoRNam, "CompInfoRNam" ); - InitGlobalBag( &CompFunctions, "CompFunctions" ); + InitGlobalBag( &CompInfoGVar, "src/compiler.c:CompInfoGVar" ); + InitGlobalBag( &CompInfoRNam, "src/compiler.c:CompInfoRNam" ); + InitGlobalBag( &CompFunctions, "src/compiler.c:CompFunctions" ); /* make the compile function */ - InitHandlerFunc(CompileFuncHandler,"Compile function"); - CompileFuncFunc = NewFunctionC( - "CompileFunc", 5L, "output, func, name, magic1, magic2", - CompileFuncHandler ); - AssGVar( GVarName( "CompileFunc" ), - CompileFuncFunc ); + C_NEW_GVAR_FUNC( "CompileFunc", 5, "output, func, name, magic1, magic2", + CompileFuncHandler, + "src/compiler.c:CompileFunc" ); +} + + +/**************************************************************************** +** +*F CheckCompiler() . . . . . . . . check the initialisation of the compiler +*/ +void CheckCompiler ( void ) +{ + SET_REVISION( "compiler_c", Revision_compiler_c ); + SET_REVISION( "compiler_h", Revision_compiler_h ); } diff --git a/src/compiler.h b/src/compiler.h index d66990d234..873ddc51fc 100644 --- a/src/compiler.h +++ b/src/compiler.h @@ -10,13 +10,14 @@ ** This file declares the functions of the GAP to C compiler. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_compiler_h = +SYS_CONST char * Revision_compiler_h = "@(#)$Id$"; #endif /**************************************************************************** ** + *F CompileFunc(,,,,) . . . . . . compile */ extern Int CompileFunc ( @@ -27,6 +28,20 @@ extern Int CompileFunc ( Char * magic2 ); +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + +*F SetupCompiler() . . . . . . . . . . . . . . . . . initialize the compiler +*/ +extern void SetupCompiler ( void ); + + /**************************************************************************** ** *F InitCompiler() . . . . . . . . . . . . . . . . . initialize the compiler @@ -36,6 +51,14 @@ extern void InitCompiler ( void ); /**************************************************************************** ** +*F CheckCompiler() . . . . . . . . check the initialisation of the compiler +*/ +extern void CheckCompiler ( void ); + + +/**************************************************************************** +** + *E compiler.h . . . . . . . . . . . . . . . . . . . . . . . . . . ends here */ diff --git a/src/compstat.c b/src/compstat.c index 62bc1d9ac5..cbdbce69dd 100644 --- a/src/compstat.c +++ b/src/compstat.c @@ -7,7 +7,7 @@ *Y Copyright (C) 1996, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany */ #include "system.h" -#include "compstat.h" +#include "compstat.h" /* statically linked modules */ /**************************************************************************** @@ -15,7 +15,7 @@ *V CompInitFuncs . . . . . . . . . . list of compiled module init functions ** -** This a dummy list in case no module statically linked. +** This a dummy list in case no module is statically linked. */ #ifdef USE_PRECOMPILED extern StructCompInitInfo * Init_lib_methsel_g ( void ); diff --git a/src/compstat.h b/src/compstat.h index d88cc42e55..efc1292b20 100644 --- a/src/compstat.h +++ b/src/compstat.h @@ -13,7 +13,7 @@ *V CompInitFuncs . . . . . . . . . . list of compiled module init functions ** -** This a dummy list in case no module statically linked. +** This a dummy list in case no module is statically linked. */ extern CompInitFunc CompInitFuncs []; diff --git a/src/costab.c b/src/costab.c index 79235b5cb4..dd5aa74ae1 100644 --- a/src/costab.c +++ b/src/costab.c @@ -10,30 +10,33 @@ ** ** This file contains the functions of for coset tables. */ -char * Revision_costab_c = - "@(#)$Id$"; +#include "system.h" /* system dependent part */ +SYS_CONST char * Revision_costab_c = + "@(#)$Id$"; -#include "system.h" /* Ints, UInts, SyIsIntr */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ -#include "gasman.h" /* Retype */ -#include "objects.h" /* Obj, TNUM_OBJ, types */ -#include "scanner.h" /* Pr */ +#include "gap.h" /* error handling, initialisation */ -#include "gvars.h" /* AssGVar, GVarName */ -#include "gap.h" /* Error */ +#include "gvars.h" /* global variables */ +#include "calls.h" /* generic call mechanism */ +#include "opers.h" /* generic operations */ -#include "calls.h" /* NAMI_FUNC, ENVI_FUNC */ +#include "integer.h" /* integers */ +#include "bool.h" /* booleans */ -#include "bool.h" /* True, False */ -#include "lists.h" /* lists */ +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ +#include "lists.h" /* generic lists */ #include "plist.h" /* plain lists */ - -#include "integer.h" /* integers */ +#include "string.h" /* strings */ #define INCLUDE_DECLARATION_PART -#include "costab.h" /* declaration part */ +#include "costab.h" /* coset table */ #undef INCLUDE_DECLARATION_PART @@ -106,7 +109,7 @@ Obj FuncApplyRel ( /*T 1996/12/03 fceller this should be replaced by 'PlistConv' */ if ( ! IS_PLIST(app) ) { ErrorQuit( " must be a plain list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(app)].name), 0L ); + (Int)TNAM_OBJ(app), 0L ); return 0; } if ( LEN_PLIST(app) != 4 ) { @@ -125,7 +128,7 @@ Obj FuncApplyRel ( /*T 1996/12/03 fceller this should be replaced by 'PlistConv' */ if ( ! IS_PLIST(rel) ) { ErrorQuit( " must be a plain list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(rel)].name), 0L ); + (Int)TNAM_OBJ(rel), 0L ); return 0; } @@ -152,7 +155,6 @@ Obj FuncApplyRel ( SET_ELM_PLIST( app, 2, INTOBJ_INT( lc ) ); SET_ELM_PLIST( app, 3, INTOBJ_INT( rp ) ); SET_ELM_PLIST( app, 4, INTOBJ_INT( rc ) ); - CHANGED_BAG(app); /* return 'true' if a coincidence or deduction was found */ if ( lp == rp+1 @@ -396,7 +398,7 @@ Obj FuncMakeConsequences ( /*T 1996/12/03 fceller this should be replaced by 'PlistConv' */ if ( ! IS_PLIST(list) ) { ErrorQuit( " must be a plain list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list)].name), 0L ); + (Int)TNAM_OBJ(list), 0L ); return 0; } @@ -534,7 +536,6 @@ Obj FuncMakeConsequences ( SET_ELM_PLIST( list, 7, INTOBJ_INT( lastFree ) ); SET_ELM_PLIST( list, 8, INTOBJ_INT( firstDef ) ); SET_ELM_PLIST( list, 9, INTOBJ_INT( lastDef ) ); - CHANGED_BAG(list); return INTOBJ_INT( nrdel ); } @@ -564,7 +565,7 @@ Obj FuncStandardizeTable ( objTable = list; if ( ! IS_PLIST(objTable) ) { ErrorQuit( "

must be a plain list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(objTable)].name), 0L ); + (Int)TNAM_OBJ(objTable), 0L ); return 0; } ptTable = &(ELM_PLIST(objTable,1)) - 1; @@ -574,7 +575,7 @@ Obj FuncStandardizeTable ( ErrorQuit( "
[%d] must be a plain list (not a %s)", (Int)j, - (Int)(InfoBags[TNUM_OBJ(ptTable[j])].name) ); + (Int)TNAM_OBJ(ptTable[j]) ); return 0; } } @@ -631,10 +632,7 @@ Obj FuncStandardizeTable ( for ( j = 1; j <= nrgen; j++ ) { SET_LEN_PLIST( ptTable[2*j-1], lcos ); SET_LEN_PLIST( ptTable[2*j ], lcos ); - CHANGED_BAG(ptTable[2*j-1]); - CHANGED_BAG(ptTable[2*j ]); } - CHANGED_BAG(objTable); /* return void */ return 0; @@ -667,7 +665,6 @@ static void InitializeCosetFactorWord ( void ) for ( i = 1; i <= treeWordLength; i++ ) { ptWord[i] = INTOBJ_INT(0); } - CHANGED_BAG(objTree2); } /* handle the general case */ @@ -762,12 +759,12 @@ static Int TreeEntryC ( void ) if ( treesize < numgens ) { treesize = 2 * treesize; GROW_PLIST( objTree1, treesize ); + CHANGED_BAG(objTree); } objNew = NEW_PLIST( T_PLIST, leng ); SET_LEN_PLIST( objNew, leng ); SET_ELM_PLIST( objTree, 3, INTOBJ_INT(numgens) ); - CHANGED_BAG(objTree); SET_LEN_PLIST( objTree1, treesize ); SET_ELM_PLIST( objTree1, numgens, objNew ); @@ -780,7 +777,6 @@ static Int TreeEntryC ( void ) ptNew[leng] = ptWord[leng]; leng--; } - CHANGED_BAG(objNew); return sign * numgens; } @@ -869,13 +865,11 @@ static Int TreeEntryC ( void ) ptTree2 = &(ELM_PLIST(objTree2,1)) - 1; SET_LEN_PLIST( objTree1, treesize ); SET_LEN_PLIST( objTree2, treesize ); + CHANGED_BAG(objTree); } ptTree1[numgens] = INTOBJ_INT( t1 ); ptTree2[numgens] = INTOBJ_INT( t2 ); SET_ELM_PLIST( objTree, 3, INTOBJ_INT(numgens) ); - CHANGED_BAG(objTree); - CHANGED_BAG(objTree1); - CHANGED_BAG(objTree2); } gen = ( u > - v ) ? -k : k; break; @@ -940,7 +934,6 @@ static void AddCosetFactor2 ( ptWord[i] = sum; } } - CHANGED_BAG(objTree2); } /* handle the general case */ @@ -1003,7 +996,7 @@ Obj FuncApplyRel2 ( /* get and check the application list */ if ( ! IS_PLIST(app) ) { ErrorQuit( " must be a plain list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(app)].name), 0L ); + (Int)TNAM_OBJ(app), 0L ); return 0; } if ( LEN_PLIST(app) != 9 ) { @@ -1023,7 +1016,7 @@ Obj FuncApplyRel2 ( objRel = rel; if ( ! IS_PLIST(rel) ) { ErrorQuit( " must be a plain list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(rel)].name), 0L ); + (Int)TNAM_OBJ(rel), 0L ); return 0; } @@ -1035,7 +1028,7 @@ Obj FuncApplyRel2 ( objNums = nums; if ( ! IS_PLIST(objNums) ) { ErrorQuit( " must be a plain list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(objNums)].name), 0L ); + (Int)TNAM_OBJ(objNums), 0L ); return 0; } @@ -1043,7 +1036,7 @@ Obj FuncApplyRel2 ( objTable2 = ptApp[6]; if ( ! IS_PLIST(objTable2) ) { ErrorQuit( " must be a plain list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(objTable2)].name), 0L ); + (Int)TNAM_OBJ(objTable2), 0L ); return 0; } @@ -1093,7 +1086,7 @@ Obj FuncApplyRel2 ( word = ptApp[7]; if ( ! IS_PLIST(word) ) { ErrorQuit( " must be a plain list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(word)].name), 0L ); + (Int)TNAM_OBJ(word), 0L ); return 0; } @@ -1156,7 +1149,6 @@ Obj FuncApplyRel2 ( ptWord[i] = ptTree2[i]; } SET_LEN_PLIST( word, LEN_PLIST(objTree2) ); - CHANGED_BAG(word); } } @@ -1169,6 +1161,7 @@ Obj FuncApplyRel2 ( if ( size < bound ) { size = ( bound > 2 * size ) ? bound : 2 * size; GROW_PLIST( word, size ); + CHANGED_BAG(app); } /* initialize some local variables */ @@ -1227,7 +1220,6 @@ Obj FuncApplyRel2 ( /* save the word length */ SET_LEN_PLIST( word, last ); - CHANGED_BAG(word); } } @@ -1236,7 +1228,6 @@ Obj FuncApplyRel2 ( SET_ELM_PLIST( app, 2, INTOBJ_INT( lc ) ); SET_ELM_PLIST( app, 3, INTOBJ_INT( rp ) ); SET_ELM_PLIST( app, 4, INTOBJ_INT( rc ) ); - CHANGED_BAG(app); /* return nothing */ return 0; @@ -1262,7 +1253,7 @@ Obj FuncCopyRel ( /* Get and check argument */ if ( ! IS_PLIST(rel) ) { ErrorQuit( " must be a plain list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(rel)].name), 0L ); + (Int)TNAM_OBJ(rel), 0L ); return 0; } leng = LEN_PLIST(rel); @@ -1306,7 +1297,7 @@ Obj FuncMakeCanonical ( /* Get and check the argument */ if ( ! IS_PLIST(rel) ) { ErrorQuit( " must be a plain list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(rel)].name), 0L ); + (Int)TNAM_OBJ(rel), 0L ); return 0; } ptRel = &(ELM_PLIST(rel,1)); @@ -1330,7 +1321,7 @@ Obj FuncMakeCanonical ( /* Loop over the relator and find the maximal postitve and negative */ /* entries */ - max = min = INT_INTOBJ( ptRel[0] ); + max = min = INT_INTOBJ(ptRel[0]); i = 0; j = 0; for ( k = 1; k < leng; k++ ) { next = INT_INTOBJ( ptRel[k] ); @@ -1536,7 +1527,7 @@ Obj FuncTreeEntry( for ( k = 1; k <= numgens; k++ ) { ptFac = &(ELM_PLIST(ptTree1[k],1)) - 1; - if ( INT_INTOBJ( ptFac[0] ) == leng ) { + if ( LEN_PLIST(ptTree1[k]) == leng ) { for ( i = 1; i <= leng; i++ ) { if ( ptFac[i] != ptWord[i] ) { break; @@ -1554,12 +1545,14 @@ Obj FuncTreeEntry( treesize = 2 * treesize; GROW_PLIST( objTree1, treesize ); SET_LEN_PLIST( objTree1, treesize ); + CHANGED_BAG(objTree); } new = NEW_PLIST( T_PLIST, leng ); SET_LEN_PLIST( new, leng ); SET_ELM_PLIST( objTree, 3, INTOBJ_INT(numgens) ); SET_ELM_PLIST( objTree1, numgens, new ); + CHANGED_BAG(objTree1); /* copy the word to the new bag */ ptWord = &(ELM_PLIST(objTree2,1)) - 1; @@ -1689,6 +1682,7 @@ Obj FuncTreeEntry( SET_LEN_PLIST( objTree2, treesize ); ptTree1 = &(ELM_PLIST(objTree1,1)) - 1; ptTree2 = &(ELM_PLIST(objTree2,1)) - 1; + CHANGED_BAG(objTree); } ptTree1[numgens] = INTOBJ_INT( t1 ); ptTree2[numgens] = INTOBJ_INT( t2 ); @@ -2155,7 +2149,7 @@ Obj FuncMakeConsequences2 ( /* get the list of arguments */ if ( ! IS_PLIST(list) ) { ErrorQuit( " must be a plain list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list)].name), 0L ); + (Int)TNAM_OBJ(list), 0L ); return 0; } if ( LEN_PLIST(list) != 16 ) { @@ -2497,7 +2491,7 @@ Obj FuncMakeConsequences2 ( objRep = ELM_PLIST(objRep,lc); rep = INT_INTOBJ(objRep); if ( rep != 0 ) { - AddCosetFactor2(rep); + AddCosetFactor2(-rep); } lc = tc; lp = lp + 2; @@ -2644,7 +2638,7 @@ Obj FuncStandardizeTable2 ( objTable = list; if ( ! IS_PLIST(objTable) ) { ErrorQuit( "
must be a plain list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(objTable)].name), 0L ); + (Int)TNAM_OBJ(objTable), 0L ); return 0; } ptTable = &(ELM_PLIST(objTable,1)) - 1; @@ -2654,14 +2648,14 @@ Obj FuncStandardizeTable2 ( ErrorQuit( "
[%d] must be a plain list (not a %s)", (Int)j, - (Int)(InfoBags[TNUM_OBJ(ptTable[j])].name) ); + (Int)TNAM_OBJ(ptTable[j]) ); return 0; } } objTable2 = list2; if ( ! IS_PLIST(objTable2) ) { ErrorQuit( " must be a plain list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(objTable)].name), 0L ); + (Int)TNAM_OBJ(objTable), 0L ); return 0; } ptTabl2 = &(ELM_PLIST(objTable2,1)) - 1; @@ -2728,13 +2722,7 @@ Obj FuncStandardizeTable2 ( SET_LEN_PLIST( ptTable[2*j ], lcos ); SET_LEN_PLIST( ptTabl2[2*j-1], lcos ); SET_LEN_PLIST( ptTabl2[2*j ], lcos ); - CHANGED_BAG(ptTable[2*j-1]); - CHANGED_BAG(ptTable[2*j ]); - CHANGED_BAG(ptTabl2[2*j-1]); - CHANGED_BAG(ptTabl2[2*j ]); } - CHANGED_BAG(objTable); - CHANGED_BAG(objTable2); /* return void */ return 0; @@ -2763,13 +2751,13 @@ Obj FuncAddAbelianRelator ( /* check the arguments */ if ( ! IS_PLIST(rels) ) { ErrorQuit( " must be a plain list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(rels)].name), 0L ); + (Int)TNAM_OBJ(rels), 0L ); return 0; } ptRels = &(ELM_PLIST(rels,1)) - 1; if ( TNUM_OBJ(number) != T_INT ) { ErrorQuit( " must be a small integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(number)].name), 0L ); + (Int)TNAM_OBJ(number), 0L ); return 0; } @@ -2832,76 +2820,92 @@ Obj FuncAddAbelianRelator ( /**************************************************************************** ** -*F InitCosetTable() +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + +*F SetupCosetTable() . . . . . . . . . . initialize the coset table package +*/ +void SetupCosetTable ( void ) +{ +} + + +/**************************************************************************** +** +*F InitCosetTable() . . . . . . . . . . initialize the coset table package */ void InitCosetTable ( void ) { /* functions for coset tables */ - InitHandlerFunc( FuncApplyRel, "costab: apply relator"); - AssGVar( GVarName( "ApplyRel" ), - NewFunctionC( "ApplyRel", 2L, "app, relator", - FuncApplyRel ) ); - - InitHandlerFunc( FuncMakeConsequences, "costab: make consequences"); - AssGVar( GVarName( "MakeConsequences" ), - NewFunctionC( "MakeConsequences", 1L, "list", - FuncMakeConsequences ) ); - - InitHandlerFunc( FuncStandardizeTable, "costab: standardize table"); - AssGVar( GVarName( "StandardizeTable" ), - NewFunctionC( "StandardizeTable", 1L, "table", - FuncStandardizeTable ) ); - - InitHandlerFunc( FuncApplyRel2, "costab: apply rel 2"); - AssGVar( GVarName( "ApplyRel2" ), - NewFunctionC( "ApplyRel2", 3L, "app, relator, nums", - FuncApplyRel2 ) ); - - InitHandlerFunc( FuncCopyRel, "costab: copy relator"); - AssGVar( GVarName( "CopyRel" ), - NewFunctionC( "CopyRel", 1L, "relator", - FuncCopyRel ) ); - - InitHandlerFunc( FuncMakeCanonical, "costab: make canonical"); - AssGVar( GVarName( "MakeCanonical" ), - NewFunctionC( "MakeCanonical", 1L, "relator", - FuncMakeCanonical ) ); - - InitHandlerFunc( FuncTreeEntry, "costab: tree entry"); - AssGVar( GVarName( "TreeEntry" ), - NewFunctionC( "TreeEntry", 2L, "relator, word", - FuncTreeEntry ) ); - - InitHandlerFunc( FuncMakeConsequences2, "costab: make consequences 2"); - AssGVar( GVarName( "MakeConsequences2" ), - NewFunctionC( "MakeConsequences2", 1L, "list", - FuncMakeConsequences2 ) ); - - InitHandlerFunc( FuncStandardizeTable2, "costab: standardize table 2"); - AssGVar( GVarName( "StandardizeTable2" ), - NewFunctionC( "StandardizeTable2", 2L, "table, table", - FuncStandardizeTable2 ) ); - - InitHandlerFunc( FuncAddAbelianRelator, "costab: add abelian relator"); - AssGVar( GVarName( "AddAbelianRelator" ), - NewFunctionC( "AddAbelianRelator", 2L, "rels, number", - FuncAddAbelianRelator ) ); + C_NEW_GVAR_FUNC( "ApplyRel", 2, "app, relator", + FuncApplyRel, + "src/costab.c:ApplyRel" ); + + C_NEW_GVAR_FUNC( "MakeConsequences", 1, "list", + FuncMakeConsequences, + "src/costab.c:MakeConsequences" ); + + C_NEW_GVAR_FUNC( "StandardizeTable", 1, "table", + FuncStandardizeTable, + "src/costab.c:StandardizeTable" ); + + C_NEW_GVAR_FUNC( "ApplyRel2", 3, "app, relators, nums", + FuncApplyRel2, + "src/costab.c:ApplyRel2" ); + + C_NEW_GVAR_FUNC( "CopyRel", 1, "relator", + FuncCopyRel, + "src/costab.c:CopyRel" ); + + C_NEW_GVAR_FUNC( "MakeCanonical", 1, "relator", + FuncMakeCanonical, + "src/costab.c:MakeCanonical" ); + + C_NEW_GVAR_FUNC( "TreeEntry", 2, "relator, word", + FuncTreeEntry, + "src/costab.c:TreeEntry" ); + + C_NEW_GVAR_FUNC( "MakeConsequences2", 1, "list", + FuncMakeConsequences2, + "src/costab.c:MakeConsequences2" ); + + C_NEW_GVAR_FUNC( "StandardizeTable2", 2, "table, table", + FuncStandardizeTable2, + "src/costab.c:StandardizeTable2" ); + + C_NEW_GVAR_FUNC( "AddAbelianRelator", 2, "rels, number", + FuncAddAbelianRelator, + "src/costab.c:AddAbelianRelator" ); /* static variables */ - InitGlobalBag( &objRel , "costab: relator" ); - InitGlobalBag( &objNums , "costab: parallel numbers list" ); - InitGlobalBag( &objFactor , "costab: factor" ); - InitGlobalBag( &objTable , "costab: table" ); - InitGlobalBag( &objTable2 , "costab: factor table" ); - InitGlobalBag( &objNext , "costab: next" ); - InitGlobalBag( &objPrev , "costab: prev" ); - InitGlobalBag( &objTree , "costab: subgroup gens tree" ); - InitGlobalBag( &objTree1 , "costab: first tree compt" ); - InitGlobalBag( &objTree2 , "costab: second tree compt" ); - InitGlobalBag( &objWordValue, "costab: word value" ); - InitGlobalBag( &objExponent , "costab: subgroup order" ); + InitGlobalBag( &objRel , "src/costab.c:objRel" ); + InitGlobalBag( &objNums , "src/costab.c:objNums" ); + InitGlobalBag( &objFactor , "src/costab.c:objFactor" ); + InitGlobalBag( &objTable , "src/costab.c:objTable" ); + InitGlobalBag( &objTable2 , "src/costab.c:objTable2" ); + InitGlobalBag( &objNext , "src/costab.c:objNext" ); + InitGlobalBag( &objPrev , "src/costab.c:objPrev" ); + InitGlobalBag( &objTree , "src/costab.c:objTree" ); + InitGlobalBag( &objTree1 , "src/costab.c:objTree1" ); + InitGlobalBag( &objTree2 , "src/costab.c:objTree2" ); + InitGlobalBag( &objWordValue, "src/costab.c:objWordValue" ); + InitGlobalBag( &objExponent , "src/costab.c:objExponent" ); +} + + +/**************************************************************************** +** +*F CheckCosetTable() . . check the initialisation of the coset table package +*/ +void CheckCosetTable ( void ) +{ + SET_REVISION( "costab_c", Revision_costab_c ); + SET_REVISION( "costab_h", Revision_costab_h ); } diff --git a/src/costab.h b/src/costab.h index b3764ece93..f4744a6c67 100644 --- a/src/costab.h +++ b/src/costab.h @@ -11,7 +11,7 @@ ** This file contains the functions for coset tables. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_costab_h = +SYS_CONST char * Revision_costab_h = "@(#)$Id$"; #endif @@ -19,11 +19,31 @@ char * Revision_costab_h = /**************************************************************************** ** -*F InitCosetTable() +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + +*F SetupCosetTable() . . . . . . . . . . initialize the coset table package +*/ +extern void SetupCosetTable ( void ); + + +/**************************************************************************** +** +*F InitCosetTable() . . . . . . . . . . initialize the coset table package */ extern void InitCosetTable ( void ); +/**************************************************************************** +** +*F CheckCosetTable() . . check the initialisation of the coset table package +*/ +extern void CheckCosetTable ( void ); + + /**************************************************************************** ** diff --git a/src/cyclotom.c b/src/cyclotom.c index fb38d8f66d..6547299788 100644 --- a/src/cyclotom.c +++ b/src/cyclotom.c @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A cyclotom.c GAP source Martin Schoenert +*W cyclotom.c GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -85,34 +85,42 @@ ** The terms are sorted with respect to the exponent. Note that none of the ** arithmetic functions need this, but it makes the equality test simpler. */ -char * Revision_cyclotom_c = +#include "system.h" /* Ints, UInts */ + +SYS_CONST char * Revision_cyclotom_c = "@(#)$Id$"; -#include "system.h" /* Ints, UInts */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ -#include "gasman.h" /* NewBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, types */ -#include "scanner.h" /* Pr */ +#include "gap.h" /* error handling, initialisation */ -#include "gvars.h" /* AssGVar, GVarName */ +#include "gvars.h" /* global variables */ -#include "calls.h" /* NewFunctionC */ -#include "opers.h" /* NewFilterC, NewOperationC */ +#include "calls.h" /* generic call mechanism */ +#include "opers.h" /* generic operations */ -#include "ariths.h" /* generic operations package */ -#include "lists.h" /* generic lists package */ +#include "ariths.h" /* basic arithmetic */ -#include "bool.h" /* True, False */ +#include "bool.h" /* booleans */ -#include "integer.h" /* SumInt, DiffInt, ProdInt, Quo...*/ +#include "integer.h" /* integers */ #define INCLUDE_DECLARATION_PART -#include "cyclotom.h" /* declaration part of the package */ +#include "cyclotom.h" /* cyclotomics */ #undef INCLUDE_DECLARATION_PART +#include "gap.h" /* error handling, initialisation */ + +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ + +#include "lists.h" /* generic lists */ #include "plist.h" /* plain lists */ +#include "string.h" /* strings */ -#include "gap.h" /* Error */ +#include "saveload.h" /* saving and loading */ /**************************************************************************** @@ -127,6 +135,7 @@ char * Revision_cyclotom_c = /**************************************************************************** ** + *V ResultCyc . . . . . . . . . . . . temporary buffer for the result, local ** ** 'ResultCyc' is used by all the arithmetic functions as a buffer for the @@ -1413,7 +1422,7 @@ Obj EHandler ( while ( TNUM_OBJ(n) != T_INT || INT_INTOBJ(n) <= 0 ) { n = ErrorReturnObj( "E: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(n)].name), 0L, + (Int)TNAM_OBJ(n), 0L, "you can return a positive integer for " ); } @@ -1558,7 +1567,7 @@ Obj NofCycHandler ( && ! IS_LIST(cyc) ) { cyc = ErrorReturnObj( "NofCyc: must be a cyclotomic or a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(cyc)].name), 0L, + (Int)TNAM_OBJ(cyc), 0L, "you can return a cyclotomic or a list for " ); } @@ -1582,7 +1591,7 @@ Obj NofCycHandler ( && TNUM_OBJ(cyc) != T_CYC ) { cyc = ErrorReturnObj( "NofCyc: [%d] must be a cyclotomic (not a %s)", - (Int)i, (Int)(InfoBags[TNUM_OBJ(cyc)].name), + (Int)i, (Int)TNAM_OBJ(cyc), "you can return a cyclotomic for the list element" ); } if ( TNUM_OBJ(cyc) == T_INT || TNUM_OBJ(cyc) == T_RAT @@ -1639,7 +1648,7 @@ Obj CoeffsCycHandler ( && TNUM_OBJ(cyc) != T_CYC ) { cyc = ErrorReturnObj( "COEFFSCYC: must be a cyclotomic (not a %s)", - (Int)(InfoBags[TNUM_OBJ(cyc)].name), 0L, + (Int)TNAM_OBJ(cyc), 0L, "you can return a cyclotomic for " ); } @@ -1716,7 +1725,7 @@ Obj GaloisCycHandler ( while ( TNUM_OBJ(ord) != T_INT ) { ord = ErrorReturnObj( "GaloisCyc: must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(ord)].name), 0L, + (Int)TNAM_OBJ(ord), 0L, "you can return an integer for " ); } o = INT_INTOBJ(ord); @@ -1727,7 +1736,7 @@ Obj GaloisCycHandler ( && TNUM_OBJ(cyc) != T_CYC ) { cyc = ErrorReturnObj( "GaloisCyc: must be a cyclotomic (not a %s)", - (Int)(InfoBags[TNUM_OBJ(cyc)].name), 0L, + (Int)TNAM_OBJ(cyc), 0L, "you can return a cyclotomic for " ); } @@ -1878,35 +1887,80 @@ void MarkCycSubBags ( /**************************************************************************** ** -*F InitCyc() . . . . . . . . . . . . . . . initialize the cyclotomic package +*F SaveCyc() . . . . . . . . . . . . . . . save a cyclotyomic ** -** 'InitCyc' initializes the cyclotomic package. +** We do not save the XXX_CYC field, since it is not used. */ -void InitCyc ( void ) + +void SaveCyc( Obj cyc) { - Obj * res; /* pointer into the result */ - UInt i; /* loop variable */ + UInt len, i; + Obj *coefs; + UInt2 *expos; + len = SIZE_CYC(cyc); + coefs = COEFS_CYC(cyc); + for (i = 0; i < len; i++) + SaveSubObj(*coefs++); + expos = EXPOS_CYC(cyc,len); + expos++; /*Skip past the XXX */ + for (i = 1; i < len; i++) + SaveUInt2(*expos++); + return; +} + +/**************************************************************************** +** +*F LoadCyc() . . . . . . . . . . . . . . . load a cyclotyomic +** +** We do not load the XXX_CYC field, since it is not used. +*/ + +void LoadCyc( Obj cyc) +{ + UInt len, i; + Obj *coefs; + UInt2 *expos; + len = SIZE_CYC(cyc); + coefs = COEFS_CYC(cyc); + for (i = 0; i < len; i++) + *coefs++ = LoadSubObj(); + expos = EXPOS_CYC(cyc,len); + expos++; /*Skip past the XXX */ + for (i = 1; i < len; i++) + *expos++ = LoadUInt2(); + return; +} + +/**************************************************************************** +** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + +*F SetupCyc() . . . . . . . . . . . . . . initialize the cyclotomic package +*/ +void SetupCyc ( void ) +{ /* install the marking function */ InfoBags[ T_CYC ].name = "cyclotomic"; InitMarkFuncBags( T_CYC , MarkCycSubBags ); - /* create the result buffer */ - ResultCyc = NEW_PLIST( T_PLIST, 1024 ); - InitGlobalBag( &ResultCyc , "cyclotomic result buffer"); - res = ADDR_OBJ( ResultCyc ); - for ( i = 0; i < 1024; i++ ) { res[i] = INTOBJ_INT(0); } - /* tell Gasman about the place were we remember the primitive root */ - InitGlobalBag( &LastECyc, "cyclotomic: primitive root"); + /* and the saving function */ + SaveObjFuncs[ T_CYC ] = SaveCyc; + LoadObjFuncs[ T_CYC ] = LoadCyc; - /* install the kind function */ - ImportGVarFromLibrary( "TYPE_CYC", &TYPE_CYC ); - TypeObjFuncs[ T_CYC ] = TypeCyc; /* install the evaluation and print function */ PrintObjFuncs[ T_CYC ] = PrintCyc; + /* install the comparison methods */ EqFuncs[ T_CYC ][ T_CYC ] = EqCyc; LtFuncs[ T_CYC ][ T_CYC ] = LtCyc; @@ -1919,12 +1973,14 @@ void InitCyc ( void ) LtFuncs[ T_CYC ][ T_INTNEG ] = LtCycNot; LtFuncs[ T_CYC ][ T_RAT ] = LtCycNot; + /* install the unary arithmetic methods */ ZeroFuncs[ T_CYC ] = ZeroCyc; AInvFuncs[ T_CYC ] = AInvCyc; OneFuncs [ T_CYC ] = OneCyc; InvFuncs [ T_CYC ] = InvCyc; + /* install the arithmetic methods */ SumFuncs[ T_CYC ][ T_CYC ] = SumCyc; SumFuncs[ T_INT ][ T_CYC ] = SumCyc; @@ -1953,37 +2009,75 @@ void InitCyc ( void ) ProdFuncs[ T_CYC ][ T_INTPOS ] = ProdCycInt; ProdFuncs[ T_CYC ][ T_INTNEG ] = ProdCycInt; ProdFuncs[ T_CYC ][ T_RAT ] = ProdCycInt; +} - /* and finally install the internal functions */ - InitHandlerFunc( EHandler, "E" ); - EOper = NewOperationC( "E", 1L, "n", - EHandler ); - AssGVar( GVarName( "E" ), EOper ); - InitHandlerFunc( IsCycHandler, "IS_CYC" ); - IsCycFilt = NewFilterC( "IS_CYC", 1L, "obj", - IsCycHandler ); - AssGVar( GVarName( "IS_CYC" ), IsCycFilt ); +/**************************************************************************** +** +*F InitCyc() . . . . . . . . . . . . . . . initialize the cyclotomic package +** +** 'InitCyc' initializes the cyclotomic package. +*/ +void InitCyc ( void ) +{ + Obj * res; /* pointer into the result */ + UInt i; /* loop variable */ + + /* create the result buffer */ + InitGlobalBag( &ResultCyc , "src/cyclotom.c:ResultCyc" ); + if ( ! SyRestoring ) { + ResultCyc = NEW_PLIST( T_PLIST, 1024 ); + res = ADDR_OBJ( ResultCyc ); + for ( i = 0; i < 1024; i++ ) { res[i] = INTOBJ_INT(0); } + } + + + /* tell Gasman about the place were we remember the primitive root */ + InitGlobalBag( &LastECyc, "src/cyclotom.c:LastECyc" ); - InitHandlerFunc( IsCycIntHandler, "IS_CYC_INT" ); - IsCycIntOper = NewOperationC( "IS_CYC_INT", 1L, "obj", - IsCycIntHandler ); - AssGVar( GVarName( "IS_CYC_INT" ), IsCycIntOper ); + /* install the kind function */ + ImportGVarFromLibrary( "TYPE_CYC", &TYPE_CYC ); + TypeObjFuncs[ T_CYC ] = TypeCyc; + + + /* and finally install the internal functions */ + C_NEW_GVAR_OPER( "E", 1, "n", EOper, EHandler, + "src/cyclotom.c:E" ); + + C_NEW_GVAR_FILT( "IS_CYC", "obj", IsCycFilt, IsCycHandler, + "src/cyclotom.c:IS_CYC" ); + + C_NEW_GVAR_OPER( "IS_CYC_INT", 1, "obj", IsCycIntOper, IsCycIntHandler, + "src/cyclotom.c:IS_CYC_INT" ); + C_NEW_GVAR_ATTR( "CONDUCTOR", "cyc", NofCycAttr, NofCycHandler, - "src/cyclotom.c:NofCycHandler" ); + "src/cyclotom.c:CONDUCTOR" ); - InitHandlerFunc( CoeffsCycHandler, "COEFFS_CYC" ); - CoeffsCycOper = NewOperationC( "COEFFS_CYC", 1L, "cyc", - CoeffsCycHandler ); - AssGVar( GVarName( "COEFFS_CYC" ), CoeffsCycOper ); + C_NEW_GVAR_OPER( "COEFFS_CYC", 1, "cyc", CoeffsCycOper, CoeffsCycHandler, + "src/cyclotom.c:COEFFS_CYC" ); + + C_NEW_GVAR_OPER( "GALOIS_CYC", 2, "cyc, n", GaloisCycOper, + GaloisCycHandler, + "src/cyclotom.c:GALOIS_CYC" ); +} - InitHandlerFunc( GaloisCycHandler, "GALOIS_CYC" ); - GaloisCycOper = NewOperationC( "GALOIS_CYC", 2L, "cyc, n", - GaloisCycHandler ); - AssGVar( GVarName( "GALOIS_CYC" ), GaloisCycOper ); +/**************************************************************************** +** +*F CheckCyc() . . . . . check the initialisation of the cyclotomic package +** +** 'InitCyc' initializes the cyclotomic package. +*/ +void CheckCyc ( void ) +{ + SET_REVISION( "cyclotom_c", Revision_cyclotom_c ); + SET_REVISION( "cyclotom_h", Revision_cyclotom_h ); } +/**************************************************************************** +** +*E cyclotom.c . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/cyclotom.h b/src/cyclotom.h index 15c70dc3bd..418cf78966 100644 --- a/src/cyclotom.h +++ b/src/cyclotom.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A cyclotom.h GAP source Martin Schoenert +*W cyclotom.h GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -10,18 +10,49 @@ ** $Q(e^{{2 \pi i}/n}) = Q(e_n)$, which we call cyclotomics for short. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_cyclotom_h = +SYS_CONST char * Revision_cyclotom_h = "@(#)$Id$"; #endif +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + +*F SetupCyc() . . . . . . . . . . . . . . initialize the cyclotomic package +*/ +extern void SetupCyc ( void ); + + /**************************************************************************** ** *F InitCyc() . . . . . . . . . . . . . . . initialize the cyclotomic package ** ** 'InitCyc' initializes the cyclotomic package. */ -extern void InitCyc ( void ); +extern void InitCyc ( void ); + +/**************************************************************************** +** +*F CheckCyc() . . . . . check the initialisation of the cyclotomic package +** +** 'InitCyc' initializes the cyclotomic package. +*/ +extern void CheckCyc ( void ); + + +/**************************************************************************** +** + +*E cyclotom.h . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ + diff --git a/src/dt.c b/src/dt.c index b15364324c..7cdb394ced 100644 --- a/src/dt.c +++ b/src/dt.c @@ -50,35 +50,37 @@ ** entry contains num( ) and the last entry finally gives a boundary ** for pos( ) for all trees which are represented by . */ -char * Revision_dt_c = - "@(#)$Id$"; - - +#include "system.h" +SYS_CONST char * Revision_dt_c = + "@(#)$Id$"; -#include "system.h" -#include "gasman.h" -#include "objects.h" -#include "scanner.h" -#include "bool.h" -#include "calls.h" -#include "gap.h" -#include "gvars.h" -#include "plist.h" -#include "lists.h" -#include "listfunc.h" -#include "precord.h" -#include "records.h" -#include "integer.h" +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ +#include "bool.h" /* booleans */ +#include "calls.h" /* generic call mechanism */ +#include "gap.h" /* error handling, initialisation */ +#include "gvars.h" /* global variables */ +#include "integer.h" /* integers */ #define INCLUDE_DECLARATION_PART -#include "dt.h" +#include "dt.h" /* deep thought */ #undef INCLUDE_DECLARATION_PART +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ + +#include "lists.h" /* generic lists */ +#include "listfunc.h" /* functions for generic lists */ +#include "plist.h" /* plain lists */ +#include "string.h" /* strings */ + /**************************************************************************** ** + *F DT_POS(tree, index) . . . . . . . . . . . . . position of (, index) ** ** 'DT_POS' returns pos() where is the subtree of rooted at @@ -315,27 +317,27 @@ UInt Mark( ** num(, i) > num(, index) */ while( i < len && DT_GEN(tree, i) > refgen ) - i++; - if ( AlmostEqual(tree, i, reftree, index) ) - { - DT_MARK(tree, i); - if ( m < INT_INTOBJ( DT_POS(tree, i) ) ) - m = INT_INTOBJ( DT_POS(tree, i) ); - } - /* Since num(a) < num(b) holds for all subtrees of an arbitrary - ** tree we can now skip the whole tree rooted at (, i). + i++; + if ( AlmostEqual(tree, i, reftree, index) ) + { + DT_MARK(tree, i); + if ( m < INT_INTOBJ( DT_POS(tree, i) ) ) + m = INT_INTOBJ( DT_POS(tree, i) ); + } + /* Since num(a) < num(b) holds for all subtrees of an arbitrary + ** tree we can now skip the whole tree rooted at (, i). ** If (, i) is the left subnode of another node we can even ** skip the tree rooted at that node, because of ** num( right(a) ) < num( left(a) ) for all trees . ** Note that (, i) is the left subnode of another node, if and ** only if the previous node (, i-1) is not an atom. in this ** case (, i) is the left subnode of (, i-1). */ - if ( DT_LENGTH(tree, i-1) == 1 ) - /* skip the tree rooted at (, i). */ - i = i + DT_LENGTH(tree, i); - else - /* skip the tree rooted at (, i-1) */ - i = i - 1 + DT_LENGTH(tree, i-1); + if ( DT_LENGTH(tree, i-1) == 1 ) + /* skip the tree rooted at (, i). */ + i = i + DT_LENGTH(tree, i); + else + /* skip the tree rooted at (, i-1) */ + i = i - 1 + DT_LENGTH(tree, i-1); } return m; } @@ -499,17 +501,17 @@ Obj Mark2( } /* add i to [ pos(tree(, i)) ] */ else - { - new = ELM_PLIST(list, INT_INTOBJ( DT_POS(tree, i) ) ); - GROW_PLIST(new, LEN_PLIST(new) + 1); - SET_LEN_PLIST(new, LEN_PLIST(new) + 1); - SET_ELM_PLIST(new, LEN_PLIST(new), INTOBJ_INT(i) ); - /* tell gasman that new has changed */ - CHANGED_BAG(new); - } - } - /* Since num(a) < num(b) holds for all subtrees of an arbitrary - ** tree we can now skip the whole tree rooted at (, i). + { + new = ELM_PLIST(list, INT_INTOBJ( DT_POS(tree, i) ) ); + GROW_PLIST(new, LEN_PLIST(new) + 1); + SET_LEN_PLIST(new, LEN_PLIST(new) + 1); + SET_ELM_PLIST(new, LEN_PLIST(new), INTOBJ_INT(i) ); + /* tell gasman that new has changed */ + CHANGED_BAG(new); + } + } + /* Since num(a) < num(b) holds for all subtrees of an arbitrary + ** tree we can now skip the whole tree rooted at (, i). ** If (, i) is the left subnode of another node we can even ** skip the tree rooted at that node, because of ** num( right(a) ) < num( left(a) ) for all trees . @@ -873,31 +875,31 @@ void GetPols( lenl = LEN_PLIST(lreps); for (i=1; i<=lenl; i++) for (j=1; j<=lenr; j++) - { - /* now get all representatives, which can be constructed from - ** [] and [] and add the corresponding - ** deep thought monomials to */ - k = LEN_PLIST( ELM_PLIST(lreps, i) ) - + LEN_PLIST( ELM_PLIST(rreps, j) ) + 5;/* m"ogliche Inkom-*/ - tree = NEW_PLIST(T_PLIST, k); /* patibilit"at nach*/ - SET_LEN_PLIST(tree, k); /*"Anderung der Datenstruktur */ - SET_ELM_PLIST(tree, 1, INTOBJ_INT(1) ); - SET_ELM_PLIST(tree, 2, ELM_PLIST( list, 3) ); - SET_ELM_PLIST(tree, 3, INTOBJ_INT(0) ); - SET_ELM_PLIST(tree, 4, INTOBJ_INT((int)(k/5)) ); - SET_ELM_PLIST(tree, 5, INTOBJ_INT(0) ); - tree1 = ELM_PLIST(lreps, i); - len = LEN_PLIST( tree1 ); - for (l=1; l<=len; l++) - SET_ELM_PLIST(tree, l+5, ELM_PLIST(tree1, l) ); - k = LEN_PLIST(tree1) + 5; - tree1 = ELM_PLIST(rreps, j); - len = LEN_PLIST( tree1 ); - for (l=1; l<=len; l++) - SET_ELM_PLIST(tree, l+k, ELM_PLIST(tree1, l) ); - UnmarkTree(tree); - FindNewReps2(tree, pols, pr); - } + { + /* now get all representatives, which can be constructed from + ** [] and [] and add the corresponding + ** deep thought monomials to */ + k = LEN_PLIST( ELM_PLIST(lreps, i) ) + + LEN_PLIST( ELM_PLIST(rreps, j) ) + 5;/* m"ogliche Inkom-*/ + tree = NEW_PLIST(T_PLIST, k); /* patibilit"at nach*/ + SET_LEN_PLIST(tree, k); /*"Anderung der Datenstruktur */ + SET_ELM_PLIST(tree, 1, INTOBJ_INT(1) ); + SET_ELM_PLIST(tree, 2, ELM_PLIST( list, 3) ); + SET_ELM_PLIST(tree, 3, INTOBJ_INT(0) ); + SET_ELM_PLIST(tree, 4, INTOBJ_INT((int)(k/5)) ); + SET_ELM_PLIST(tree, 5, INTOBJ_INT(0) ); + tree1 = ELM_PLIST(lreps, i); + len = LEN_PLIST( tree1 ); + for (l=1; l<=len; l++) + SET_ELM_PLIST(tree, l+5, ELM_PLIST(tree1, l) ); + k = LEN_PLIST(tree1) + 5; + tree1 = ELM_PLIST(rreps, j); + len = LEN_PLIST( tree1 ); + for (l=1; l<=len; l++) + SET_ELM_PLIST(tree, l+k, ELM_PLIST(tree1, l) ); + UnmarkTree(tree); + FindNewReps2(tree, pols, pr); + } } @@ -935,8 +937,8 @@ Obj FuncGetPols( */ void GetReps( - Obj list, - Obj reps ) + Obj list, + Obj reps ) { Obj lreps, rreps, @@ -963,9 +965,9 @@ void GetReps( lenr = LEN_PLIST( rreps ); for (i=1; i<=lenl; i++) for (j=1; j<=lenr; j++) - { - /* compute all representatives which can be constructed from - ** [] and [] and add them to . */ + { + /* compute all representatives which can be constructed from + ** [] and [] and add them to . */ k = LEN_PLIST( ELM_PLIST(lreps, i) ) + LEN_PLIST( ELM_PLIST(rreps, j) ) + 5;/* m"ogliche Inkom-*/ tree = NEW_PLIST(T_PLIST, k); /* patibilit"at nach*/ @@ -1770,40 +1772,69 @@ Obj Funcposition(Obj self, /**************************************************************************** ** -*F InitDeepThought() . . . . . . . . . . . . initialize Deep Thought package + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + +*F SetupDeepThought() . . . . . . . . . initialize the Deep Thought package +*/ +void SetupDeepThought ( void ) +{ +} + + +/**************************************************************************** +** +*F InitDeepThought() . . . . . . . . . . initialize the Deep Thought package ** ** 'InitDeepThought' initializes the Deep Thought package. */ -void InitDeepThought( void ) +void InitDeepThought ( void ) { /* install the internal functions */ - InitHandlerFunc( FuncMakeFormulaVector, "dt: make formula vector"); - AssGVar( GVarName( "MakeFormulaVector" ), NewFunctionC("MakeFormulaVector", - 2L, "tree, presentation", FuncMakeFormulaVector ) ); - - InitHandlerFunc( FuncFindNewReps, "dt: find new reps"); - AssGVar( GVarName( "FindNewReps" ), NewFunctionC("FindNewReps", - 4L, "tree, representatives, presentation, maximum", - FuncFindNewReps ) ); - - InitHandlerFunc( FuncUnmarkTree, "dt: unmark tree"); - AssGVar( GVarName( "UnmarkTree" ), NewFunctionC("UnmarkTree", - 1L, "tree", FuncUnmarkTree ) ); - - InitHandlerFunc( FuncGetPols, "dt: get polynomials"); - AssGVar( GVarName( "GetPols" ), NewFunctionC(" GetPols", - 3L, "list, presentation, polynomials", FuncGetPols) ); + C_NEW_GVAR_FUNC( "MakeFormulaVector", 2, "tree, presentation", + FuncMakeFormulaVector, + "src/dt.c:MakeFormulaVector" ); + + C_NEW_GVAR_FUNC( "FindNewReps", 4, "tree, representatives, presentation, maximum", + FuncFindNewReps, + "src/dt.c:FindNewReps" ); + + C_NEW_GVAR_FUNC( "UnmarkTree", 1, "tree", + FuncUnmarkTree, + "src/dt.c:UnmarkTree" ); + + C_NEW_GVAR_FUNC( "GetPols", 3, "list, presentation, polynomial", + FuncGetPols, + "src/dt.c:GetPols" ); - InitHandlerFunc( Funcposition, "dt: evaluation"); - AssGVar( GVarName( "DT_evaluation" ), NewFunctionC( "DT_evaluation", - 1L, "vector", Funcposition) ); - InitFopyGVar( GVarName( "dt_add" ), &Dt_add ); + C_NEW_GVAR_FUNC( "DT_evaluation", 1, "vector", + Funcposition, + "src/dt.c:DT_evaluation" ); + + InitFopyGVar( "dt_add" , &Dt_add ); +} + + +/**************************************************************************** +** +*F CheckDeepThought() check the initialisation of the Deep Thought package +*/ +void CheckDeepThought ( void ) +{ + SET_REVISION( "dt_c", Revision_dt_c ); + SET_REVISION( "dt_h", Revision_dt_h ); } /**************************************************************************** ** + *E dt.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here ** */ diff --git a/src/dt.h b/src/dt.h index 30038ef8cb..d4ce069398 100644 --- a/src/dt.h +++ b/src/dt.h @@ -1,5 +1,5 @@ #ifdef INCLUDE_DECLARATION_PART -char * Revision_dt_h = +SYS_CONST char * Revision_dt_h = "@(#)$Id$"; #endif @@ -120,8 +120,6 @@ extern Obj Part( -extern void InitDeepThought( void ); - /* ** Functions from dteval.c. */ @@ -135,3 +133,42 @@ extern Obj Power( Obj x, Obj n, Obj pseudoreps ); + + +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + +*F SetupDeepThought() . . . . . . . . . initialize the Deep Thought package +*/ +extern void SetupDeepThought( void ); + + +/**************************************************************************** +** +*F InitDeepThought() . . . . . . . . . . initialize the Deep Thought package +** +** 'InitDeepThought' initializes the Deep Thought package. +*/ +extern void InitDeepThought( void ); + + +/**************************************************************************** +** +*F CheckDeepThought() check the initialisation of the Deep Thought package +*/ +extern void CheckDeepThought( void ); + + +/**************************************************************************** +** + +*E dt.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +** +*/ diff --git a/src/dteval.c b/src/dteval.c index b8b85eb8e7..a478a03b4f 100644 --- a/src/dteval.c +++ b/src/dteval.c @@ -22,32 +22,39 @@ ** and f_{ij} = x_j (j<>i), then [i] is either 1 or 0. [i] ** is 0 if also the polynomials f_{m1},...,f_{mn} for (m > i) are trivial . */ -char * Revision_dteval_c = +#include "system.h" + +SYS_CONST char * Revision_dteval_c = "@(#)$Id$"; -#include "system.h" -#include "gasman.h" -#include "objects.h" -#include "scanner.h" -#include "bool.h" -#include "calls.h" -#include "gap.h" -#include "gvars.h" -#include "plist.h" -#include "lists.h" -#include "listfunc.h" -#include "precord.h" -#include "records.h" -#include "integer.h" -#include "dt.h" -#include "objcftl.h" +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ +#include "bool.h" /* booleans */ +#include "calls.h" /* generic call mechanism */ +#include "gap.h" /* error handling, initialisation */ +#include "gvars.h" /* global variables */ +#include "precord.h" /* plain records */ +#include "records.h" /* generic records */ +#include "integer.h" /* integers */ +#include "dt.h" /* deep thought */ +#include "objcftl.h" /* from the left collect */ #define INCLUDE_DECLARATION_PART -#include "dteval.h" +#include "dteval.h" /* deep though evaluation */ #undef INCLUDE_DECLARATION_PART #define CELM(list, pos) ( INT_INTOBJ( ELM_PLIST(list, pos) ) ) +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ + +#include "lists.h" /* generic lists */ +#include "listfunc.h" /* functions for generic lists */ +#include "plist.h" /* plain lists */ +#include "string.h" /* strings */ + + static int evlist, evlistvec; extern Obj ShallowCopyPlist( Obj list ); @@ -55,6 +62,7 @@ extern Obj ShallowCopyPlist( Obj list ); /**************************************************************************** ** + *F MultGen( , , , ) ** ** MultGen multiplies the word given by the exponent vector with @@ -94,19 +102,19 @@ void MultGen( i++ ) { /* evaluate the deep thought monomial [], */ - ord = Evaluation( ELM_PLIST( sum, i), copy, power ); + ord = Evaluation( ELM_PLIST( sum, i), copy, power ); if ( !IS_INTOBJ(ord) || INT_INTOBJ(ord) != 0 ) { help = ELM_PLIST(sum1, i); len2 = LEN_PLIST(help); for ( j=1; j < len2; - j+=2 ) - { - /* and add the result multiplicated with the right coefficient - ** to [ [j] ]. */ - prod = ProdInt( ord, ELM_PLIST( help, j+1 ) ); - sum2 = SumInt(ELM_PLIST( xk, CELM( help,j ) ), + j+=2 ) + { + /* and add the result multiplicated with the right coefficient + ** to [ [j] ]. */ + prod = ProdInt( ord, ELM_PLIST( help, j+1 ) ); + sum2 = SumInt(ELM_PLIST( xk, CELM( help,j ) ), prod); SET_ELM_PLIST(xk, CELM( help, j ), sum2 ); @@ -208,56 +216,56 @@ Obj Multiplybound( CELM(dtpols, CELM(y, anf) ) == 0 ) { res = NEW_PLIST( T_PLIST, 2*LEN_PLIST( dtpols ) ); - len = LEN_PLIST(x); - j = 1; - k = anf; - i = 1; - while ( j=len ) - while ( k=len ) + while ( k= INT_INTOBJ(potenz) || INT_INTOBJ(quo)<0 ) - { - /* reduce the exponent of the generator */ - mod = ModInt( quo, potenz ); - SET_ELM_PLIST(x, i+1, mod); - CHANGED_BAG(x); - if ( gen <= lenpow && + { + /* reduce the exponent of the generator */ + mod = ModInt( quo, potenz ); + SET_ELM_PLIST(x, i+1, mod); + CHANGED_BAG(x); + if ( gen <= lenpow && (prel = ELM_PLIST( powers, gen) ) != 0 ) - { - if ( ( IS_INTOBJ(quo) && INT_INTOBJ(quo) >= INT_INTOBJ(potenz) ) || - TNUM_OBJ(quo) == T_INTPOS ) - { - help = Powerred( prel, - QuoInt(quo, potenz), - pcp ); - help = Multiplyboundred( help, x, i+2, flag, pcp); - } - else - { - quo = INT_INTOBJ(mod) == 0? QuoInt(quo,potenz):SumInt(QuoInt(quo, potenz),INTOBJ_INT(-1)); - help = Powerred( prel, + { + if ( ( IS_INTOBJ(quo) && INT_INTOBJ(quo) >= INT_INTOBJ(potenz) ) || + TNUM_OBJ(quo) == T_INTPOS ) + { + help = Powerred( prel, + QuoInt(quo, potenz), + pcp ); + help = Multiplyboundred( help, x, i+2, flag, pcp); + } + else + { + quo = INT_INTOBJ(mod) == 0? QuoInt(quo,potenz):SumInt(QuoInt(quo, potenz),INTOBJ_INT(-1)); + help = Powerred( prel, quo, pcp ); - help = Multiplyboundred( help, x, i+2, flag, pcp); - } - len = LEN_PLIST(help); - for (j=1; j<=len; j++) - SET_ELM_PLIST(x, j+i+1, ELM_PLIST(help, j) ); - CHANGED_BAG(x); - flag = i+len+1; - /*SET_LEN_PLIST(x, flag);*/ - } - } - } + help = Multiplyboundred( help, x, i+2, flag, pcp); + } + len = LEN_PLIST(help); + for (j=1; j<=len; j++) + SET_ELM_PLIST(x, j+i+1, ELM_PLIST(help, j) ); + CHANGED_BAG(x); + flag = i+len+1; + /*SET_LEN_PLIST(x, flag);*/ + } + } + } } SET_LEN_PLIST(x, flag); SHRINK_PLIST(x, flag); @@ -894,9 +902,9 @@ void ReduceWord( Obj x, */ Obj FuncDTMultiply( Obj self, - Obj x, - Obj y, - Obj pcp ) + Obj x, + Obj y, + Obj pcp ) { Obj Multiplyboundred(), res; void ReduceWord(); @@ -925,9 +933,9 @@ Obj FuncDTMultiply( Obj self, */ Obj FuncDTPower( Obj self, - Obj x, - Obj n, - Obj pcp ) + Obj x, + Obj n, + Obj pcp ) { Obj Powerred(), res; void ReduceWord(); @@ -952,9 +960,9 @@ Obj FuncDTPower( Obj self, */ Obj FuncDTSolution( Obj self, - Obj x, - Obj y, - Obj pcp ) + Obj x, + Obj y, + Obj pcp ) { Obj Solutionred(), res; void ReduceWord(); @@ -982,8 +990,8 @@ Obj FuncDTSolution( Obj self, Obj FuncDTCommutator( Obj self, Obj x, - Obj y, - Obj pcp ) + Obj y, + Obj pcp ) { Obj res, Commutatorred(); void ReduceWord(); @@ -1009,8 +1017,8 @@ Obj FuncDTCommutator( Obj self, Obj FuncDTConjugate( Obj self, Obj x, - Obj y, - Obj pcp ) + Obj y, + Obj pcp ) { Obj res, Conjugatered(); void ReduceWord(); @@ -1037,9 +1045,9 @@ Obj FuncDTConjugate( Obj self, */ Obj FuncDTQuotient( Obj self, - Obj x, - Obj y, - Obj pcp ) + Obj x, + Obj y, + Obj pcp ) { Obj Solutionred(), Multiplyboundred(), help, res; void ReduceWord(); @@ -1058,58 +1066,86 @@ Obj FuncDTQuotient( Obj self, /**************************************************************************** ** -*F InitDTEvaluation() -** -** InitDTEvaluation initializes the deep thought multiplication package. + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * */ -void InitDTEvaluation(void) + +/**************************************************************************** +** + +*F SetupDTEvaluation() . . . . . . . initialize the Deep Thought Evaluation +*/ +void SetupDTEvaluation ( void ) { +} - evlist = RNamName("evlist"); + + +/**************************************************************************** +** +*F InitDTEvaluation() . . . . . . . initialize the Deep Thought Evaluation +** +** InitDTEvaluation initializes the deep thought multiplication package. +*/ +void InitDTEvaluation ( void ) +{ + evlist = RNamName("evlist"); evlistvec = RNamName("evlistvec"); - InitHandlerFunc( Funccompress, "dteval: compress"); - AssGVar( GVarName("Compress"), NewFunctionC("Compress", 1L, - "list", Funccompress) ); + C_NEW_GVAR_FUNC( "Compress", 1, "list", + Funccompress, + "src/dteval.c:Compress" ); - InitHandlerFunc( FuncMultiply, "dteval: multiply"); - AssGVar( GVarName("Multiply"), NewFunctionC("Multiply", 3L, - "lword, rword, representatives", FuncMultiply) ); + C_NEW_GVAR_FUNC( "Multiply", 3, "lword, rword, representatives", + FuncMultiply, + "src/dteval.c:Multiply" ); - InitHandlerFunc( FuncPower, "dteval: power"); - AssGVar( GVarName("Pover"), NewFunctionC("Pover", 3L, - "word, exponent, representatives", FuncPower) ); + C_NEW_GVAR_FUNC( "Pover", 3, "word, exponent, representatives", + FuncPower, + "src/dteval.c:Pover" ); - InitHandlerFunc( FuncDTMultiply, "dteval: DTMultiply"); - AssGVar( GVarName("DTMultiply"), NewFunctionC("DTMultiply", 3L, - "lword, rword, rewritingsystem", FuncDTMultiply) ); + C_NEW_GVAR_FUNC( "DTMultiply", 3, "lword, rword, rws", + FuncDTMultiply, + "src/dteval.c:DTMultiply" ); - InitHandlerFunc( FuncDTPower, "dteval: DTPower"); - AssGVar( GVarName("DTPower"), NewFunctionC("DTPower", 3L, - "word, exponent, rewritingsytem", FuncDTPower) ); + C_NEW_GVAR_FUNC( "DTPower", 3, "word, exponent, rws", + FuncDTPower, + "src/dteval.c:DTPower" ); - InitHandlerFunc( FuncDTSolution, "dteval: DTSolution"); - AssGVar( GVarName("DTSolution"), NewFunctionC("DTSolution", 3L, - "lword, rword, rewritingsystem", FuncDTSolution) ); + C_NEW_GVAR_FUNC( "DTSolution", 3, "lword, rword, rws", + FuncDTSolution, + "src/dteval.c:DTSolution" ); - InitHandlerFunc( FuncDTCommutator, "dteval: DTCommutator"); - AssGVar( GVarName("DTCommutator"), NewFunctionC("DTCommutator", 3L, - "lword, rword, rewritingsystem", FuncDTCommutator) ); + C_NEW_GVAR_FUNC( "DTCommutator", 3, "lword, rword, rws", + FuncDTCommutator, + "src/dteval.c:DTCommutator" ); - InitHandlerFunc( FuncDTQuotient, "dteval: DTQuotient"); - AssGVar( GVarName("DTQuotient"), NewFunctionC("DTQuotient", 3L, - "lword, rword, rewritingsystem", FuncDTQuotient) ); + C_NEW_GVAR_FUNC( "DTQuotient", 3, "lword, rword, rws", + FuncDTQuotient, + "src/dteval.c:DTQuotient" ); - InitHandlerFunc( FuncDTConjugate, "dteval: DTConjugate"); - AssGVar( GVarName("DTConjugate"), NewFunctionC("DTConjugate", 3L, - "lword, rword, rewritingsystem", FuncDTConjugate) ); + C_NEW_GVAR_FUNC( "DTConjugate", 3, "lword, rword, rws", + FuncDTConjugate, + "src/dteval.c:DTConjugate" ); } /**************************************************************************** ** +*F CheckDTEvaluation() check the initialisation of Deep Thought Evaluation +*/ +void CheckDTEvaluation( void ) +{ + SET_REVISION( "dteval_c", Revision_dteval_c ); + SET_REVISION( "dteval_h", Revision_dteval_h ); +} + + +/**************************************************************************** +** + *E dteval.c . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here ** */ diff --git a/src/dteval.h b/src/dteval.h index 2fb591e09c..e464952207 100644 --- a/src/dteval.h +++ b/src/dteval.h @@ -1,6 +1,44 @@ #ifdef INCLUDE_DECLARATION_PART -char * Revision_dteval_h = +SYS_CONST char * Revision_dteval_h = "@(#)$Id$"; #endif -extern void InitDTEvaluation( void ); + +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + +*F SetupDTEvaluation() . . . . . . . initialize the Deep Thought Evaluation +*/ +extern void SetupDTEvaluation ( void ); + + +/**************************************************************************** +** +*F InitDTEvaluation() . . . . . . . initialize the Deep Thought Evaluation +** +** InitDTEvaluation initializes the deep thought multiplication package. +*/ +extern void InitDTEvaluation ( void ); + + +/**************************************************************************** +** +*F CheckDTEvaluation() check the initialisation of Deep Thought Evaluation +*/ +extern void CheckDTEvaluation( void ); + + + +/**************************************************************************** +** + +*E dteval.h . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +** +*/ diff --git a/src/exprs.c b/src/exprs.c index 0f08a0c8fa..f328853a14 100644 --- a/src/exprs.c +++ b/src/exprs.c @@ -11,39 +11,41 @@ ** The expressions package is the part of the interpreter that evaluates ** expressions to their values and prints expressions. */ -char * Revision_exprs_c = +#include "system.h" /* Ints, UInts */ + +SYS_CONST char * Revision_exprs_c = "@(#)$Id$"; -#include "system.h" /* Ints, UInts */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ -#include "gasman.h" /* NewBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, types */ -#include "scanner.h" /* Pr */ +#include "gap.h" /* error handling, initialisation */ -#include "gvars.h" /* Tilde, VAL_GVAR, AssGVar, GVa...*/ +#include "gvars.h" /* global variables */ -#include "ariths.h" /* generic operations */ +#include "ariths.h" /* basic arithmetic */ #include "records.h" /* generic records */ -#include "lists.h" /* POS_LIST */ +#include "lists.h" /* generic lists */ -#include "bool.h" /* True, False */ +#include "bool.h" /* booleans */ -#include "permutat.h" /* NEW_PERM4, ADDR_PERM4, ... */ +#include "permutat.h" /* permutations */ -#include "precord.h" /* SET_RNAM_PREC, SET_ELM_PREC, ...*/ +#include "precord.h" /* plain records */ -#include "plist.h" /* SET_LEN_PLIST, SET_ELM_PLIST,...*/ -#include "range.h" /* NEW_RANGE, SET_LEN_RANGE, SET...*/ -#include "string.h" /* NEW_STRING, CSTR_STRING */ +#include "plist.h" /* plain lists */ +#include "range.h" /* ranges */ +#include "string.h" /* strings */ -#include "code.h" /* Expr, TNUM_EXPR, SIZE_EXPR, ...*/ -#include "vars.h" /* used by EVAL_EXPR */ +#include "code.h" /* coder */ +#include "vars.h" /* variables */ #define INCLUDE_DECLARATION_PART -#include "exprs.h" /* declaration part of the package */ +#include "exprs.h" /* expressions */ #undef INCLUDE_DECLARATION_PART -#include "gap.h" /* Error */ +#include "gap.h" /* error handling, initialisation */ /**************************************************************************** @@ -199,7 +201,7 @@ Obj EvalUnknownBool ( while ( val != True && val != False ) { val = ErrorReturnObj( " must be 'true' or 'false' (not to a %s)", - (Int)(InfoBags[TNUM_OBJ(val)].name), 0L, + (Int)TNAM_OBJ(val), 0L, "you can return 'true' or 'false'" ); } @@ -289,7 +291,7 @@ Obj EvalAnd ( else { ErrorQuit( " must be 'true' or 'false' (not to a %s)", - (Int)(InfoBags[TNUM_OBJ(opL)].name), 0L ); + (Int)TNAM_OBJ(opL), 0L ); } } @@ -297,7 +299,7 @@ Obj EvalAnd ( else { ErrorQuit( " must be 'true' or 'false' (not to a %s)", - (Int)(InfoBags[TNUM_OBJ(opL)].name), 0L ); + (Int)TNAM_OBJ(opL), 0L ); } /* please 'lint' */ @@ -949,7 +951,7 @@ Obj EvalPermExpr ( while ( ! IS_INTOBJ(val) || INT_INTOBJ(val) <= 0 ) { val = ErrorReturnObj( "Permutation: must be a positive integer (not to a %s)", - (Int)(InfoBags[TNUM_OBJ(val)].name), 0L, + (Int)TNAM_OBJ(val), 0L, "you can return a positive integer" ); } c = INT_INTOBJ(val); @@ -1184,7 +1186,7 @@ Obj EvalRangeExpr ( while ( ! IS_INTOBJ(val) ) { val = ErrorReturnObj( "Range: must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(val)].name), 0L, + (Int)TNAM_OBJ(val), 0L, "you can return an integer for " ); } low = INT_INTOBJ( val ); @@ -1196,7 +1198,7 @@ Obj EvalRangeExpr ( if ( ! IS_INTOBJ(val) ) { val = ErrorReturnObj( "Range: must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(val)].name), 0L, + (Int)TNAM_OBJ(val), 0L, "you can return an integer for " ); } else { @@ -1218,7 +1220,7 @@ Obj EvalRangeExpr ( if ( ! IS_INTOBJ(val) ) { val = ErrorReturnObj( "Range: must be an integer (not a %d)", - (Int)(InfoBags[TNUM_OBJ(val)].name), 0L, + (Int)TNAM_OBJ(val), 0L, "you can return an integer for " ); } else { @@ -1826,11 +1828,17 @@ void PrintRecExpr ( /**************************************************************************** ** -*F InitExprs . . . . . . . . . . . . . . initialize the expressions package + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** ** -** 'InitExprs' initializes the expressions package. + +*F SetupExprs() . . . . . . . . . . . . initialize the expressions package */ -void InitExprs ( void ) +void SetupExprs ( void ) { UInt type; /* loop variable */ @@ -1940,4 +1948,32 @@ void InitExprs ( void ) } +/**************************************************************************** +** +*F InitExprs() . . . . . . . . . . . . . initialize the expressions package +** +** 'InitExprs' initializes the expressions package. +*/ +void InitExprs ( void ) +{ +} + +/**************************************************************************** +** +*F CheckExprs() . . . . check the initialisation of the expressions package +** +** 'InitExprs' initializes the expressions package. +*/ +void CheckExprs ( void ) +{ + SET_REVISION( "exprs_c", Revision_exprs_c ); + SET_REVISION( "exprs_h", Revision_exprs_h ); +} + + +/**************************************************************************** +** + +*E exprs.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/exprs.h b/src/exprs.h index 4137a1bb17..24fec18f00 100644 --- a/src/exprs.h +++ b/src/exprs.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A exprs.h GAP source Martin Schoenert +*W exprs.h GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -12,7 +12,7 @@ ** expressions to their values and prints expressions. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_exprs_h = +SYS_CONST char * Revision_exprs_h = "@(#)$Id$"; #endif @@ -147,11 +147,39 @@ extern void (* PrintExprFuncs [256] ) ( Expr expr ); /**************************************************************************** ** -*F InitExprs . . . . . . . . . . . . . . initialize the expressions package + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** ** -** 'InitEval' initializes the expressions package. + +*F SetupExprs() . . . . . . . . . . . . initialize the expressions package */ -extern void InitExprs ( void ); +extern void SetupExprs ( void ); +/**************************************************************************** +** +*F InitExprs() . . . . . . . . . . . . . initialize the expressions package +** +** 'InitExprs' initializes the expressions package. +*/ +extern void InitExprs ( void ); + +/**************************************************************************** +** +*F CheckExprs() . . . . check the initialisation of the expressions package +** +** 'InitExprs' initializes the expressions package. +*/ +extern void CheckExprs ( void ); + + +/**************************************************************************** +** + +*E exprs.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/finfield.c b/src/finfield.c index efbc89559b..ff658e84a7 100644 --- a/src/finfield.c +++ b/src/finfield.c @@ -48,34 +48,40 @@ ** Zech-Logarithm table. The zeroth entry in the finite field bag is the ** order of the finite field minus one. */ -char * Revision_finfield_c = +#include "system.h" /* Ints, UInts */ + +SYS_CONST char * Revision_finfield_c = "@(#)$Id$"; -#include "system.h" /* Ints, UInts */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ -#include "gasman.h" /* NewBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, types */ -#include "scanner.h" /* Pr */ +#include "gap.h" /* error handling, initialisation */ -#include "gvars.h" /* AssGVar, GVarName */ +#include "gvars.h" /* global variables */ -#include "calls.h" /* NewFunctionC */ -#include "opers.h" /* NewFilterC, NewOperationC */ +#include "calls.h" /* generic call mechanism */ +#include "opers.h" /* generic operations */ -#include "ariths.h" /* generic operations package */ -#include "lists.h" /* generic lists package */ +#include "ariths.h" /* basic arithmetic */ -#include "bool.h" /* True, False */ +#include "bool.h" /* booleans */ -#include "integer.h" /* SumInt, DiffInt, ProdInt, Quo...*/ +#include "integer.h" /* integers */ #define INCLUDE_DECLARATION_PART -#include "finfield.h" /* declaration part of the package */ +#include "finfield.h" /* finite fields and ff elements */ #undef INCLUDE_DECLARATION_PART -#include "plist.h" /* plain lists */ +#include "gap.h" /* error handling, initialisation */ -#include "gap.h" /* Error */ +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ + +#include "lists.h" /* generic lists */ +#include "plist.h" /* plain lists */ +#include "string.h" /* strings */ /**************************************************************************** @@ -1853,7 +1859,7 @@ Obj ZHandler ( if ( TNUM_OBJ(q)!=T_INT || INT_INTOBJ(q)<=1 || 65536 must be a positive prime power (not a %s)", - (Int)(InfoBags[TNUM_OBJ(q)].name), 0L, + (Int)TNAM_OBJ(q), 0L, "you can return a positive integer for " ); return ZHandler( self, q ); } @@ -1877,7 +1883,7 @@ Obj ZHandler ( if ( r != INT_INTOBJ(q) ) { q = ErrorReturnObj( "Z: must be a positive prime power (not a %s)", - (Int)(InfoBags[TNUM_OBJ(q)].name), 0L, + (Int)TNAM_OBJ(q), 0L, "you can return a positive integer for " ); return ZHandler( self, q ); } @@ -1892,27 +1898,32 @@ Obj ZHandler ( /**************************************************************************** ** -*F InitFinfield() . . . . . . . . . . . . . initialize finite field package + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** ** -** 'InitFinfield' initializes the finite field package. + +*F SetupFinfield() . . . . . . . . . . . initialize the finite field package */ -void InitFinfield ( void ) +void SetupFinfield ( void ) { /* install the marking function */ - InfoBags[ T_FFE ].name = "finite field element"; - InitMarkFuncBags( T_FFE , MarkNoSubBags ); + InfoBags[ T_FFE ].name = "ffe should never happen"; + /* InitMarkFuncBags( T_FFE, MarkNoSubBags ); */ - /* install the kind function */ - ImportFuncFromLibrary( "TYPE_FFE", &TYPE_FFE ); - TypeObjFuncs[ T_FFE ] = TypeFFE; /* install the printing method */ PrintObjFuncs[ T_FFE ] = PrFFE; + /* install the comparison methods */ EqFuncs[ T_FFE ][ T_FFE ] = EqFFE; LtFuncs[ T_FFE ][ T_FFE ] = LtFFE; + /* install the arithmetic methods */ ZeroFuncs[ T_FFE ] = ZeroFFE; AInvFuncs[ T_FFE ] = AInvFFE; @@ -1932,23 +1943,53 @@ void InitFinfield ( void ) QuoFuncs[ T_INT ][ T_FFE ] = QuoIntFFE; PowFuncs[ T_FFE ][ T_INT ] = PowFFEInt; PowFuncs[ T_FFE ][ T_FFE ] = PowFFEFFE; +} + + +/**************************************************************************** +** +*F InitFinfield() . . . . . . . . . . . initialize the finite field package +** +** 'InitFinfield' initializes the finite field package. +*/ +void InitFinfield ( void ) +{ + /* install the kind function */ + ImportFuncFromLibrary( "TYPE_FFE", &TYPE_FFE ); + TypeObjFuncs[ T_FFE ] = TypeFFE; + /* create the fields and integer conversion bags */ - CharFF = NEW_PLIST( T_PLIST, 0 ); - SET_LEN_PLIST( CharFF, 0 ); - InitGlobalBag( &CharFF, "finfield: characteristics" ); - DegrFF = NEW_PLIST( T_PLIST, 0 ); - SET_LEN_PLIST( DegrFF, 0 ); - InitGlobalBag( &DegrFF, "finfield: degree" ); - SuccFF = NEW_PLIST( T_PLIST, 0 ); - SET_LEN_PLIST( SuccFF, 0 ); - InitGlobalBag( &SuccFF, "finfield: successor" ); - TypeFF = NEW_PLIST( T_PLIST, 0 ); - SET_LEN_PLIST( TypeFF, 0 ); - InitGlobalBag( &TypeFF, "finfield: element kinds" ); - IntFF = NEW_PLIST( T_PLIST, 0 ); - SET_LEN_PLIST( IntFF, 0 ); - InitGlobalBag( &IntFF, "finifield: integer conversion" ); + InitGlobalBag( &CharFF, "src/finfield.c:CharFF" ); + if ( ! SyRestoring ) { + CharFF = NEW_PLIST( T_PLIST, 0 ); + SET_LEN_PLIST( CharFF, 0 ); + } + + InitGlobalBag( &DegrFF, "src/finfield.c:DegrFF" ); + if ( ! SyRestoring ) { + DegrFF = NEW_PLIST( T_PLIST, 0 ); + SET_LEN_PLIST( DegrFF, 0 ); + } + + InitGlobalBag( &SuccFF, "src/finfield.c:SuccFF" ); + if ( ! SyRestoring ) { + SuccFF = NEW_PLIST( T_PLIST, 0 ); + SET_LEN_PLIST( SuccFF, 0 ); + } + + InitGlobalBag( &TypeFF, "src/finfield.c:TypeFF" ); + if ( ! SyRestoring ) { + TypeFF = NEW_PLIST( T_PLIST, 0 ); + SET_LEN_PLIST( TypeFF, 0 ); + } + + InitGlobalBag( &IntFF, "src/finifield.c:IntFF" ); + if ( ! SyRestoring ) { + IntFF = NEW_PLIST( T_PLIST, 0 ); + SET_LEN_PLIST( IntFF, 0 ); + } + /* install the functions that handle overflow */ ImportFuncFromLibrary( "SUM_FFE_LARGE", &SUM_FFE_LARGE ); @@ -1957,35 +1998,46 @@ void InitFinfield ( void ) ImportFuncFromLibrary( "QUO_FFE_LARGE", &QUO_FFE_LARGE ); ImportFuncFromLibrary( "LOG_FFE_LARGE", &LOG_FFE_LARGE ); + /* install the internal functions */ - InitHandlerFunc( IsFFEHandler, "IS_FFE" ); - IsFFEFilt = NewFilterC( - "IS_FFE", 1L, "obj", IsFFEHandler ); - AssGVar( GVarName( "IS_FFE" ), IsFFEFilt ); - - InitHandlerFunc( CharFFEDefaultHandler, "ffe: characteristic of FFE default"); - CharFFEDefaultFunc = NewFunctionC( - "CHAR_FFE_DEFAULT", 1L, "z", CharFFEDefaultHandler ); - AssGVar( GVarName( "CHAR_FFE_DEFAULT" ), CharFFEDefaultFunc ); - - InitHandlerFunc( DegreeFFEDefaultHandler, "ffe: degree of FFE default"); - DegreeFFEDefaultFunc = NewFunctionC( - "DEGREE_FFE_DEFAULT", 1L, "z", DegreeFFEDefaultHandler ); - AssGVar( GVarName( "DEGREE_FFE_DEFAULT" ), DegreeFFEDefaultFunc ); - - InitHandlerFunc( LogFFEDefaultHandler, "ffe: log in FFE default"); - LogFFEDefaultFunc = NewFunctionC( - "LOG_FFE_DEFAULT", 2L, "z, r", LogFFEDefaultHandler ); - AssGVar( GVarName( "LOG_FFE_DEFAULT" ), LogFFEDefaultFunc ); - - InitHandlerFunc( IntFFEDefaultHandler, "ffe: int -> FFE default"); - IntFFEDefaultFunc = NewFunctionC( - "INT_FFE_DEFAULT", 1L, "z", IntFFEDefaultHandler ); - AssGVar( GVarName( "INT_FFE_DEFAULT" ), IntFFEDefaultFunc ); - - InitHandlerFunc( ZHandler, "ffe: Z function"); - ZFunc = NewFunctionC( - "Z", 1L, "q", ZHandler ); - AssGVar( GVarName( "Z" ), ZFunc ); + C_NEW_GVAR_FILT( "IS_FFE", "obj", IsFFEFilt, IsFFEHandler, + "src/finifield.c:IS_FFE" ); + + C_NEW_GVAR_FUNC( "CHAR_FFE_DEFAULT", 1, "z", + CharFFEDefaultHandler, + "src/finifield.c:CHAR_FFE_DEFAULT" ); + + C_NEW_GVAR_FUNC( "DEGREE_FFE_DEFAULT", 1, "z", + DegreeFFEDefaultHandler, + "src/finifield.c:DEGREE_FFE_DEFAULT" ); + + C_NEW_GVAR_FUNC( "LOG_FFE_DEFAULT", 2, "z, root", + LogFFEDefaultHandler, + "src/finifield.c:LOG_FFE_DEFAULT" ); + C_NEW_GVAR_FUNC( "INT_FFE_DEFAULT", 1, "z", + IntFFEDefaultHandler, + "src/finifield.c:INT_FFE_DEFAULT" ); + + C_NEW_GVAR_FUNC( "Z", 1, "q", + ZHandler, + "src/finifield.c:Z" ); +} + + +/**************************************************************************** +** +*F CheckFinfield() . . check the initialisation of the finite field package +*/ +void CheckFinfield ( void ) +{ + SET_REVISION( "finfield_c", Revision_finfield_c ); + SET_REVISION( "finfield_h", Revision_finfield_h ); } + + +/**************************************************************************** +** + +*E finfield.c . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/finfield.h b/src/finfield.h index da84c2fdab..372aebaa80 100644 --- a/src/finfield.h +++ b/src/finfield.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A finfield.h GAP source Werner Nickel +*W finfield.h GAP source Werner Nickel ** & Martin Schoenert ** *H @(#)$Id$ @@ -49,7 +49,7 @@ ** order of the finite field minus one. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_finfield_h = +SYS_CONST char * Revision_finfield_h = "@(#)$Id$"; #endif @@ -392,11 +392,37 @@ extern Obj TypeFFE ( /**************************************************************************** ** -*F InitFinfield() . . . . . . . . . . . . . initialize finite field package + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + +*F SetupFinfield() . . . . . . . . . . . initialize the finite field package +*/ +extern void SetupFinfield ( void ); + + +/**************************************************************************** +** +*F InitFinfield() . . . . . . . . . . . initialize the finite field package ** ** 'InitFinfield' initializes the finite field package. */ -extern void InitFinfield ( void ); +extern void InitFinfield ( void ); + + +/**************************************************************************** +** +*F CheckFinfield() . . check the initialisation of the finite field package +*/ +extern void CheckFinfield ( void ); +/**************************************************************************** +** +*E finfield.h . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/funcs.c b/src/funcs.c index f841523ac1..90038ca031 100644 --- a/src/funcs.c +++ b/src/funcs.c @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A funcs.c GAP source Martin Schoenert +*W funcs.c GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -14,37 +14,46 @@ ** ** It uses the function call mechanism defined by the calls package. */ -char * Revision_funcs_c = - "@(#)$Id$"; - #include /* assert */ - #include "system.h" /* Ints, UInts */ -#include "gasman.h" /* NewBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, types */ -#include "scanner.h" /* Pr */ +SYS_CONST char * Revision_funcs_c = + "@(#)$Id$"; -#include "calls.h" /* CALL_ARGS, Function, ObjFunc */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ -#include "lists.h" /* ELM_LIST, LEN_LIST */ +#include "gap.h" /* error handling, initialisation */ -#include "plist.h" /* SET_ELM_PLIST, SET_LEN_PLIST,...*/ +#include "calls.h" /* generic call mechanism */ -#include "code.h" /* Stat, Expr, FUNC_CALL, ARGI_C...*/ -#include "vars.h" /* ASS_LVAR, SWITCH_TO_NEW_LVARS...*/ -#include "exprs.h" /* EVAL_EXPR, EvalExprFuncs */ -#include "stats.h" /* EXEC_STAT, ReturnObjStat, ... */ +#include "code.h" /* coder */ +#include "vars.h" /* variables */ +#include "exprs.h" /* expressions */ +#include "stats.h" /* statements */ #define INCLUDE_DECLARATION_PART -#include "funcs.h" /* declaration part of the package */ +#include "funcs.h" /* functions */ #undef INCLUDE_DECLARATION_PART -#include "gap.h" /* Error */ +#include "gap.h" /* error handling, initialisation */ + +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ + +#include "lists.h" /* generic lists */ +#include "plist.h" /* plain lists */ +#include "string.h" /* strings */ + +#include "saveload.h" /* saving and loading */ + +#include "opers.h" /* generic operations */ /**************************************************************************** ** + *F ExecProccall0args() . execute a procedure call with 0 arguments *F ExecProccall1args() . execute a procedure call with 1 arguments *F ExecProccall2args() . execute a procedure call with 2 arguments @@ -69,7 +78,7 @@ UInt ExecProccall0args ( while ( TNUM_OBJ( func ) != T_FUNCTION ) { func = ErrorReturnObj( "Function Calls: must be a function (not a %s)", - (Int)(InfoBags[TNUM_OBJ(func)].name), 0L, + (Int)TNAM_OBJ(func), 0L, "you can return a function for " ); } @@ -93,7 +102,7 @@ UInt ExecProccall1args ( while ( TNUM_OBJ( func ) != T_FUNCTION ) { func = ErrorReturnObj( "Function Calls: must be a function (not a %s)", - (Int)(InfoBags[TNUM_OBJ(func)].name), 0L, + (Int)TNAM_OBJ(func), 0L, "you can return a function for " ); } @@ -121,7 +130,7 @@ UInt ExecProccall2args ( while ( TNUM_OBJ( func ) != T_FUNCTION ) { func = ErrorReturnObj( "Function Calls: must be a function (not a %s)", - (Int)(InfoBags[TNUM_OBJ(func)].name), 0L, + (Int)TNAM_OBJ(func), 0L, "you can return a function for " ); } @@ -151,7 +160,7 @@ UInt ExecProccall3args ( while ( TNUM_OBJ( func ) != T_FUNCTION ) { func = ErrorReturnObj( "Function Calls: must be a function (not a %s)", - (Int)(InfoBags[TNUM_OBJ(func)].name), 0L, + (Int)TNAM_OBJ(func), 0L, "you can return a function for " ); } @@ -183,7 +192,7 @@ UInt ExecProccall4args ( while ( TNUM_OBJ( func ) != T_FUNCTION ) { func = ErrorReturnObj( "Function Calls: must be a function (not a %s)", - (Int)(InfoBags[TNUM_OBJ(func)].name), 0L, + (Int)TNAM_OBJ(func), 0L, "you can return a function for " ); } @@ -217,7 +226,7 @@ UInt ExecProccall5args ( while ( TNUM_OBJ( func ) != T_FUNCTION ) { func = ErrorReturnObj( "Function Calls: must be a function (not a %s)", - (Int)(InfoBags[TNUM_OBJ(func)].name), 0L, + (Int)TNAM_OBJ(func), 0L, "you can return a function for " ); } @@ -253,7 +262,7 @@ UInt ExecProccall6args ( while ( TNUM_OBJ( func ) != T_FUNCTION ) { func = ErrorReturnObj( "Function Calls: must be a function (not a %s)", - (Int)(InfoBags[TNUM_OBJ(func)].name), 0L, + (Int)TNAM_OBJ(func), 0L, "you can return a function for " ); } @@ -287,7 +296,7 @@ UInt ExecProccallXargs ( while ( TNUM_OBJ( func ) != T_FUNCTION ) { func = ErrorReturnObj( "Function Calls: must be a function (not a %s)", - (Int)(InfoBags[TNUM_OBJ(func)].name), 0L, + (Int)TNAM_OBJ(func), 0L, "you can return a function for " ); } @@ -335,7 +344,7 @@ Obj EvalFunccall0args ( while ( TNUM_OBJ( func ) != T_FUNCTION ) { func = ErrorReturnObj( "Function Calls: must be a function (not a %s)", - (Int)(InfoBags[TNUM_OBJ(func)].name), 0L, + (Int)TNAM_OBJ(func), 0L, "you can return a function for " ); } @@ -363,7 +372,7 @@ Obj EvalFunccall1args ( while ( TNUM_OBJ( func ) != T_FUNCTION ) { func = ErrorReturnObj( "Function Calls: must be a function (not a %s)", - (Int)(InfoBags[TNUM_OBJ(func)].name), 0L, + (Int)TNAM_OBJ(func), 0L, "you can return a function for " ); } @@ -395,7 +404,7 @@ Obj EvalFunccall2args ( while ( TNUM_OBJ( func ) != T_FUNCTION ) { func = ErrorReturnObj( "Function Calls: must be a function (not a %s)", - (Int)(InfoBags[TNUM_OBJ(func)].name), 0L, + (Int)TNAM_OBJ(func), 0L, "you can return a function for " ); } @@ -429,7 +438,7 @@ Obj EvalFunccall3args ( while ( TNUM_OBJ( func ) != T_FUNCTION ) { func = ErrorReturnObj( "Function Calls: must be a function (not a %s)", - (Int)(InfoBags[TNUM_OBJ(func)].name), 0L, + (Int)TNAM_OBJ(func), 0L, "you can return a function for " ); } @@ -465,7 +474,7 @@ Obj EvalFunccall4args ( while ( TNUM_OBJ( func ) != T_FUNCTION ) { func = ErrorReturnObj( "Function Calls: must be a function (not a %s)", - (Int)(InfoBags[TNUM_OBJ(func)].name), 0L, + (Int)TNAM_OBJ(func), 0L, "you can return a function for " ); } @@ -503,7 +512,7 @@ Obj EvalFunccall5args ( while ( TNUM_OBJ( func ) != T_FUNCTION ) { func = ErrorReturnObj( "Function Calls: must be a function (not a %s)", - (Int)(InfoBags[TNUM_OBJ(func)].name), 0L, + (Int)TNAM_OBJ(func), 0L, "you can return a function for " ); } @@ -543,7 +552,7 @@ Obj EvalFunccall6args ( while ( TNUM_OBJ( func ) != T_FUNCTION ) { func = ErrorReturnObj( "Function Calls: must be a function (not a %s)", - (Int)(InfoBags[TNUM_OBJ(func)].name), 0L, + (Int)TNAM_OBJ(func), 0L, "you can return a function for " ); } @@ -581,7 +590,7 @@ Obj EvalFunccallXargs ( while ( TNUM_OBJ( func ) != T_FUNCTION ) { func = ErrorReturnObj( "Function Calls: must be a function (not a %s)", - (Int)(InfoBags[TNUM_OBJ(func)].name), 0L, + (Int)TNAM_OBJ(func), 0L, "you can return a function for " ); } @@ -634,12 +643,36 @@ Obj EvalFunccallXargs ( ** Note that these functions are never called directly, they are only called ** through the function call mechanism. */ -Obj DoExecFunc0args ( +#ifdef DEBUG_RECURSION +static Int RecursionDepth; +#define CHECK_RECURSION_BEFORE { \ + RecursionDepth++; \ + if ( RecursionDepth == DEBUG_RECURSION ) { \ + RecursionDepth = 0; \ + ErrorReturnVoid( "recursion depth overflow (%d)\n", \ + (Int)DEBUG_RECURSION, 0L, \ + "you may return" ); \ + } \ +} +#define CHECK_RECURSION_AFTER { \ + RecursionDepth--; \ + if ( RecursionDepth == -1 ) { \ + RecursionDepth = 0; \ + } \ +} +#else +#define CHECK_RECURSION_BEFORE /* NO CHECK */ +#define CHECK_RECURSION_AFTER /* NO CHECK */ +#endif + +Obj DoExecFunc0args ( Obj func ) { Bag oldLvars; /* old values bag */ OLD_BRK_CURR_STAT /* old executing statement */ + CHECK_RECURSION_BEFORE + /* switch to a new values bag */ SWITCH_TO_NEW_LVARS( func, 0, NLOC_FUNC(func), oldLvars ); @@ -651,6 +684,8 @@ Obj DoExecFunc0args ( /* switch back to the old values bag */ SWITCH_TO_OLD_LVARS( oldLvars ); + CHECK_RECURSION_AFTER + /* return the result */ return ReturnObjStat; } @@ -662,6 +697,8 @@ Obj DoExecFunc1args ( Bag oldLvars; /* old values bag */ OLD_BRK_CURR_STAT /* old executing statement */ + CHECK_RECURSION_BEFORE + /* switch to a new values bag */ SWITCH_TO_NEW_LVARS( func, 1, NLOC_FUNC(func), oldLvars ); @@ -676,6 +713,8 @@ Obj DoExecFunc1args ( /* switch back to the old values bag */ SWITCH_TO_OLD_LVARS( oldLvars ); + CHECK_RECURSION_AFTER + /* return the result */ return ReturnObjStat; } @@ -688,6 +727,8 @@ Obj DoExecFunc2args ( Bag oldLvars; /* old values bag */ OLD_BRK_CURR_STAT /* old executing statement */ + CHECK_RECURSION_BEFORE + /* switch to a new values bag */ SWITCH_TO_NEW_LVARS( func, 2, NLOC_FUNC(func), oldLvars ); @@ -703,6 +744,8 @@ Obj DoExecFunc2args ( /* switch back to the old values bag */ SWITCH_TO_OLD_LVARS( oldLvars ); + CHECK_RECURSION_AFTER + /* return the result */ return ReturnObjStat; } @@ -716,6 +759,8 @@ Obj DoExecFunc3args ( Bag oldLvars; /* old values bag */ OLD_BRK_CURR_STAT /* old executing statement */ + CHECK_RECURSION_BEFORE + /* switch to a new values bag */ SWITCH_TO_NEW_LVARS( func, 3, NLOC_FUNC(func), oldLvars ); @@ -732,6 +777,8 @@ Obj DoExecFunc3args ( /* switch back to the old values bag */ SWITCH_TO_OLD_LVARS( oldLvars ); + CHECK_RECURSION_AFTER + /* return the result */ return ReturnObjStat; } @@ -746,6 +793,8 @@ Obj DoExecFunc4args ( Bag oldLvars; /* old values bag */ OLD_BRK_CURR_STAT /* old executing statement */ + CHECK_RECURSION_BEFORE + /* switch to a new values bag */ SWITCH_TO_NEW_LVARS( func, 4, NLOC_FUNC(func), oldLvars ); @@ -763,6 +812,8 @@ Obj DoExecFunc4args ( /* switch back to the old values bag */ SWITCH_TO_OLD_LVARS( oldLvars ); + CHECK_RECURSION_AFTER + /* return the result */ return ReturnObjStat; } @@ -778,6 +829,8 @@ Obj DoExecFunc5args ( Bag oldLvars; /* old values bag */ OLD_BRK_CURR_STAT /* old executing statement */ + CHECK_RECURSION_BEFORE + /* switch to a new values bag */ SWITCH_TO_NEW_LVARS( func, 5, NLOC_FUNC(func), oldLvars ); @@ -796,6 +849,8 @@ Obj DoExecFunc5args ( /* switch back to the old values bag */ SWITCH_TO_OLD_LVARS( oldLvars ); + CHECK_RECURSION_AFTER + /* return the result */ return ReturnObjStat; } @@ -812,6 +867,8 @@ Obj DoExecFunc6args ( Bag oldLvars; /* old values bag */ OLD_BRK_CURR_STAT /* old executing statement */ + CHECK_RECURSION_BEFORE + /* switch to a new values bag */ SWITCH_TO_NEW_LVARS( func, 6, NLOC_FUNC(func), oldLvars ); @@ -831,6 +888,8 @@ Obj DoExecFunc6args ( /* switch back to the old values bag */ SWITCH_TO_OLD_LVARS( oldLvars ); + CHECK_RECURSION_AFTER + /* return the result */ return ReturnObjStat; } @@ -844,6 +903,8 @@ Obj DoExecFuncXargs ( UInt len; /* number of arguments */ UInt i; /* loop variable */ + CHECK_RECURSION_BEFORE + /* check the number of arguments */ len = NARG_FUNC( func ); while ( len != LEN_PLIST( args ) ) { @@ -870,6 +931,8 @@ Obj DoExecFuncXargs ( /* switch back to the old values bag */ SWITCH_TO_OLD_LVARS( oldLvars ); + CHECK_RECURSION_AFTER + /* return the result */ return ReturnObjStat; } @@ -1056,20 +1119,18 @@ void ExecEnd ( /**************************************************************************** ** -*F InitFuncs() . . . . . . . . . . . . . . . . . initialize function package + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** ** -** 'InitFuncs' installs the executing functions that are needed by the -** executor to execute procedure calls, the evaluating functions that are -** needed by the evaluator to evaluate function calls, and the evaluating -** function that is needed by the evaluator to evaluate function -** expressions. It also installs the printing functions for procedure -** calls, function calls, and function expressions. + +*F SetupFuncs() . . . . . . . . . . . . . . . . initialize function package */ -void InitFuncs ( void ) +void SetupFuncs ( void ) { - /* make the global variable known to Gasman */ - InitGlobalBag( &ExecState, "funcs: ExecState" ); - /* install the evaluators and executors */ ExecStatFuncs [ T_PROCCALL_0ARGS ] = ExecProccall0args; ExecStatFuncs [ T_PROCCALL_1ARGS ] = ExecProccall1args; @@ -1107,21 +1168,52 @@ void InitFuncs ( void ) PrintExprFuncs[ T_FUNCCALL_6ARGS ] = PrintFunccall; PrintExprFuncs[ T_FUNCCALL_XARGS ] = PrintFunccall; PrintExprFuncs[ T_FUNC_EXPR ] = PrintFuncExpr; +} + + +/**************************************************************************** +** +*F InitFuncs() . . . . . . . . . . . . . . . . . initialize function package +** +** 'InitFuncs' installs the executing functions that are needed by the +** executor to execute procedure calls, the evaluating functions that are +** needed by the evaluator to evaluate function calls, and the evaluating +** function that is needed by the evaluator to evaluate function +** expressions. It also installs the printing functions for procedure +** calls, function calls, and function expressions. +*/ +void InitFuncs ( void ) +{ + /* make the global variable known to Gasman */ + InitGlobalBag( &ExecState, "src/funcs.c:ExecState" ); + + + /* Use short cookies to save space in saved workspace */ + InitHandlerFunc( DoExecFunc0args, "i0"); + InitHandlerFunc( DoExecFunc1args, "i1"); + InitHandlerFunc( DoExecFunc2args, "i2"); + InitHandlerFunc( DoExecFunc3args, "i3"); + InitHandlerFunc( DoExecFunc4args, "i4"); + InitHandlerFunc( DoExecFunc5args, "i5"); + InitHandlerFunc( DoExecFunc6args, "i6"); + InitHandlerFunc( DoExecFuncXargs, "iX"); +} - InitHandlerFunc( DoExecFunc0args, "0 arg interpreted function"); - InitHandlerFunc( DoExecFunc1args, "1 arg interpreted function"); - InitHandlerFunc( DoExecFunc2args, "2 arg interpreted function"); - InitHandlerFunc( DoExecFunc3args, "3 arg interpreted function"); - InitHandlerFunc( DoExecFunc4args, "4 arg interpreted function"); - InitHandlerFunc( DoExecFunc5args, "5 arg interpreted function"); - InitHandlerFunc( DoExecFunc6args, "6 arg interpreted function"); - InitHandlerFunc( DoExecFuncXargs, "X arg interpreted function"); +/**************************************************************************** +** +*F CheckFuncs() . . . . . check the initialisation of the function package +*/ +void CheckFuncs ( void ) +{ + SET_REVISION( "funcs_c", Revision_funcs_c ); + SET_REVISION( "funcs_h", Revision_funcs_h ); } /**************************************************************************** ** + *E funcs.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here */ diff --git a/src/funcs.h b/src/funcs.h index d956f8c037..3caaf7a63a 100644 --- a/src/funcs.h +++ b/src/funcs.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A funcs.h GAP source Martin Schoenert +*W funcs.h GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -13,13 +13,14 @@ ** expressions, and the handlers for the execution of function bodies. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_funcs_h = +SYS_CONST char * Revision_funcs_h = "@(#)$Id$"; #endif /**************************************************************************** ** + *F MakeFunction() . . . . . . . . . . . . . . . . . . make a function ** ** 'MakeFunction' makes a function from the function expression bag . @@ -39,6 +40,21 @@ extern void ExecEnd ( UInt error ); +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + +*F SetupFuncs() . . . . . . . . . . . . . . . . initialize function package +*/ +extern void SetupFuncs ( void ); + + /**************************************************************************** ** *F InitFuncs() . . . . . . . . . . . . . . . . . initialize function package @@ -50,7 +66,21 @@ extern void ExecEnd ( ** expressions. It also installs the printing functions for procedure ** calls, function calls, and function expressions. */ -extern void InitFuncs ( void ); +extern void InitFuncs ( void ); + + +/**************************************************************************** +** +*F CheckFuncs() . . . . . check the initialisation of the function package +*/ +extern void CheckFuncs ( void ); + + +/**************************************************************************** +** + +*E funcs.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/gap.c b/src/gap.c index 2531ce56f2..678d6c8021 100644 --- a/src/gap.c +++ b/src/gap.c @@ -9,74 +9,76 @@ ** ** This file contains the various read-eval-print loops and related stuff. */ -char * Revision_gap_c = - "@(#)$Id$"; - - #include #include /* jmp_buf, setjmp, longjmp */ -#include "system.h" /* Ints, UInts */ +#include "system.h" /* system dependent part */ -extern char * In; -#include "gasman.h" /* NewBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, types */ -#include "scanner.h" /* Pr */ +SYS_CONST char * Revision_gap_c = + "@(#)$Id$"; -#include "gvars.h" /* InitGVars */ +extern char * In; -#include "calls.h" /* InitCalls */ -#include "opers.h" /* InitOpers */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ -#include "ariths.h" /* InitAriths */ -#include "records.h" /* InitRecords */ -#include "lists.h" /* InitLists */ +#define INCLUDE_DECLARATION_PART +#include "gap.h" /* error handling, initialisation */ +#undef INCLUDE_DECLARATION_PART -#include "bool.h" /* InitBool */ +#include "read.h" /* reader */ -#include "integer.h" /* InitInt */ -#include "rational.h" /* InitRat */ -#include "cyclotom.h" /* InitCyc */ +#include "gvars.h" /* global variables */ +#include "calls.h" /* generic call mechanism */ +#include "opers.h" /* generic operations */ -#include "finfield.h" /* InitFinfield */ -#include "permutat.h" /* InitPermutat */ +#include "ariths.h" /* basic arithmetic */ -#include "precord.h" /* InitPRecord */ +#include "integer.h" /* integers */ +#include "rational.h" /* rationals */ +#include "cyclotom.h" /* cyclotomics */ +#include "finfield.h" /* finite fields and ff elements */ -#include "listoper.h" /* InitListOper */ -#include "listfunc.h" /* InitListFunc */ +#include "bool.h" /* booleans */ +#include "permutat.h" /* permutations */ -#include "plist.h" /* InitPlist */ -#include "set.h" /* InitSet */ -#include "vector.h" /* InitVector */ +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ -#include "blister.h" /* InitBlist */ -#include "range.h" /* InitRange */ -#include "string.h" /* InitString */ +#include "lists.h" /* generic lists */ +#include "listoper.h" /* operations for generic lists */ +#include "listfunc.h" /* functions for generic lists */ +#include "plist.h" /* plain lists */ +#include "set.h" /* plain sets */ +#include "vector.h" /* functions for plain vectors */ +#include "blister.h" /* boolean lists */ +#include "range.h" /* ranges */ +#include "string.h" /* strings */ -#include "objfgelm.h" /* InitFreeGroupElements */ -#include "objscoll.h" /* InitSingleCollector */ -#include "objpcgel.h" /* InitPcElements */ -#include "objcftl.h" /* Init polycyclic collector */ +#include "objfgelm.h" /* objects of free groups */ +#include "objpcgel.h" /* objects of polycyclic groups */ +#include "objscoll.h" /* single collector */ +#include "objcftl.h" /* from the left collect */ -#include "sctable.h" /* InitSCTable */ -#include "costab.h" /* InitCosetTable */ +#include "dt.h" /* deep thought */ +#include "dteval.h" /* deep though evaluation */ -#include "code.h" /* InitCode */ +#include "sctable.h" /* structure constant table */ +#include "costab.h" /* coset table */ +#include "tietze.h" /* tietze helper functions */ -#include "vars.h" /* InitVars */ -#include "exprs.h" /* InitExprs */ -#include "stats.h" /* InitStats */ -#include "funcs.h" /* InitFuncs */ +#include "code.h" /* coder */ -#include "dt.h" /* InitDeepThought */ -#include "dteval.h" /* InitDTEvaluation */ +#include "vars.h" /* variables */ +#include "exprs.h" /* expressions */ +#include "stats.h" /* statements */ +#include "funcs.h" /* functions */ -#include "intrprtr.h" /* InitInterpreter */ -#include "compiler.h" /* InitCompiler */ +#include "intrprtr.h" /* interpreter */ -#include "read.h" /* ReadEvalCommand, ReadEvalResult */ +#include "compiler.h" /* compiler */ #include "compstat.h" /* statically linked modules */ @@ -84,10 +86,7 @@ extern char * In; #include "streams.h" /* streams package */ #include "sysfiles.h" /* file input/output */ - -#define INCLUDE_DECLARATION_PART -#include "gap.h" /* declaration part of the package */ -#undef INCLUDE_DECLARATION_PART +#include "weakptr.h" /* weak pointers */ /**************************************************************************** @@ -143,7 +142,7 @@ UInt ViewObjGVar; void ViewObjHandler ( Obj obj ) { volatile Obj func; - jmp_buf readJmpError; + jmp_buf readJmpError; /* get the function */ func = ValAutoGVar(ViewObjGVar); @@ -151,17 +150,17 @@ void ViewObjHandler ( Obj obj ) /* if non-zero use this function, otherwise use `PrintObj' */ memcpy( readJmpError, ReadJmpError, sizeof(jmp_buf) ); if ( ! READ_ERROR() ) { - if ( func == 0 || TNUM_OBJ(func) != T_FUNCTION ) { - PrintObj(obj); - } - else { - CALL_1ARGS( func, obj ); - } - Pr( "\n", 0L, 0L ); - memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); + if ( func == 0 || TNUM_OBJ(func) != T_FUNCTION ) { + PrintObj(obj); + } + else { + CALL_1ARGS( func, obj ); + } + Pr( "\n", 0L, 0L ); + memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); } else { - memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); + memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); } } @@ -179,11 +178,11 @@ int main ( UInt type; /* type of command */ UInt time; /* start time */ Obj func; /* function (compiler) */ - UInt4 crc; /* crc of file to compile */ + Int4 crc; /* crc of file to compile */ volatile UInt i; /* loop variable */ /* initialize everything */ - InitGap( &argc, argv ); + InitializeGap( &argc, argv ); /* maybe compile */ if ( SyCompilePlease ) { @@ -210,7 +209,7 @@ int main ( /* read and evaluate one command */ Prompt = "gap> "; - ClearError(); + ClearError(); type = ReadEvalCommand(); /* stop the stopwatch */ @@ -226,7 +225,7 @@ int main ( /* print the result */ if ( ! DualSemicolon ) { - ViewObjHandler( ReadEvalResult ); + ViewObjHandler( ReadEvalResult ); } } @@ -246,10 +245,10 @@ int main ( /* call the exit functions */ BreakOnError = 0; for ( i = 1; i <= LEN_PLIST(AtExitFunctions); i++ ) { - if ( setjmp(ReadJmpError) == 0 ) { - func = ELM_PLIST( AtExitFunctions, i ); - CALL_0ARGS(func); - } + if ( setjmp(ReadJmpError) == 0 ) { + func = ELM_PLIST( AtExitFunctions, i ); + CALL_0ARGS(func); + } } /* exit to the operating system, the return is there to please lint */ @@ -401,7 +400,7 @@ Obj FuncSizeScreen ( /**************************************************************************** ** -*F FuncDownEnv( <, level> ) . . . . . . . . . change the environment +*F FuncDownEnv( , ) . . . . . . . . . change the environment */ UInt ErrorLevel; @@ -429,8 +428,8 @@ Obj FuncDownEnv ( return 0; } if ( ErrorLVars == 0 ) { - Pr( "not in any function\n", 0L, 0L ); - return 0; + Pr( "not in any function\n", 0L, 0L ); + return 0; } /* if we really want to go up */ @@ -487,7 +486,7 @@ Obj FuncWhere ( currLVars = CurrLVars; - if ( ErrorLVars != BottomLVars ) { + if ( ErrorLVars != 0 ) { SWITCH_TO_OLD_LVARS( ErrorLVars ); SWITCH_TO_OLD_LVARS( BRK_CALL_FROM() ); while ( CurrLVars != BottomLVars && 0 < depth ) { @@ -628,7 +627,7 @@ Obj ErrorMode ( } /* read and evaluate one command */ - ClearError(); + ClearError(); DualSemicolon = 0; type = ReadEvalCommand(); @@ -639,9 +638,9 @@ Obj ErrorMode ( AssGVar( Last, ReadEvalResult ); /* print the result */ - if ( ! DualSemicolon ) { - ViewObjHandler( ReadEvalResult ); - } + if ( ! DualSemicolon ) { + ViewObjHandler( ReadEvalResult ); + } } @@ -653,7 +652,7 @@ Obj ErrorMode ( ErrorLVars = errorLVars; ErrorLLevel = errorLLevel; CloseInput(); - ClearError(); + ClearError(); CloseOutput(); return ReadEvalResult; } @@ -671,7 +670,7 @@ Obj ErrorMode ( ErrorLVars = errorLVars; ErrorLLevel = errorLLevel; CloseInput(); - ClearError(); + ClearError(); CloseOutput(); return (Obj)0; } @@ -716,6 +715,97 @@ void ErrorQuit ( } +/**************************************************************************** +** +*F ErrorQuitBound( ) . . . . . . . . . . . . . . . unbound variable +*/ +void ErrorQuitBound ( + Char * name ) +{ + ErrorQuit( + "variable '%s' must have an assigned value", + (Int)name, 0L ); +} + + +/**************************************************************************** +** +*F ErrorQuitFuncResult() . . . . . . . . . . . . . . . . must return a value +*/ +void ErrorQuitFuncResult ( void ) +{ + ErrorQuit( + "function must return a value", + 0L, 0L ); +} + + +/**************************************************************************** +** +*F ErrorQuitIntSmall( ) . . . . . . . . . . . . . not a small integer +*/ +void ErrorQuitIntSmall ( + Obj obj ) +{ + ErrorQuit( + " must be a small integer (not a %s)", + (Int)TNAM_OBJ(obj), 0L ); +} + + +/**************************************************************************** +** +*F ErrorQuitIntSmallPos( ) . . . . . . . not a positive small integer +*/ +void ErrorQuitIntSmallPos ( + Obj obj ) +{ + ErrorQuit( + " must be a positive small integer (not a %s)", + (Int)TNAM_OBJ(obj), 0L ); +} + + +/**************************************************************************** +** +*F ErrorQuitBool( ) . . . . . . . . . . . . . . . . . . not a boolean +*/ +void ErrorQuitBool ( + Obj obj ) +{ + ErrorQuit( + " must be 'true' or 'false' (not a %s)", + (Int)TNAM_OBJ(obj), 0L ); +} + + +/**************************************************************************** +** +*F ErrorQuitFunc( ) . . . . . . . . . . . . . . . . . not a function +*/ +void ErrorQuitFunc ( + Obj obj ) +{ + ErrorQuit( + " must be a function (not a %s)", + (Int)TNAM_OBJ(obj), 0L ); +} + + +/**************************************************************************** +** +*F ErrorQuitNrArgs( , ) . . . . . . . wrong number of arguments +*/ +void ErrorQuitNrArgs ( + Int narg, + Obj args ) +{ + ErrorQuit( + "Function Calls: number of arguments must be %d (not %d)", + narg, LEN_PLIST( args ) ); +} + + /**************************************************************************** ** *F ErrorReturnObj( , , , ) . . print and return obj @@ -771,22 +861,35 @@ Obj FuncError ( *F Complete( ) . . . . . . . . . . . . . . . . . . . complete a file */ Obj CompNowFuncs; - UInt CompNowCount; +Obj CompLists; +Obj CompThenFuncs; + +#define COMP_THEN_OFFSET 2 void Complete ( Obj list ) { Obj filename; UInt type; + Int4 crc; + Int4 crc1; - /* get and check the filename */ + /* get the filename */ filename = ELM_PLIST( list, 1 ); - while ( ! IsStringConv( filename ) ) { - filename = ErrorReturnObj( - "COMPLETE: must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(filename)].name), 0L, - "you can return a string for " ); + + /* and the crc value */ + crc = INT_INTOBJ( ELM_PLIST( list, 2 ) ); + + /* check the crc value */ + if ( SyCheckCompletionCrcRead ) { + crc1 = SyGAPCRC( CSTR_STRING(filename) ); + if ( crc != crc1 ) { + ErrorQuit( + "Error, crc value of \"%s\" does not match completion file", + (Int)CSTR_STRING(filename), 0L ); + return; + } } /* try to open the file */ @@ -800,7 +903,7 @@ void Complete ( Pr( "#I completing '%s'\n", (Int)CSTR_STRING(filename), 0L ); } CompNowFuncs = list; - CompNowCount = 1; + CompNowCount = COMP_THEN_OFFSET; /* now do the reading */ while ( 1 ) { @@ -963,9 +1066,6 @@ Obj DoCompleteXargs ( ** *F FuncCOM_FILE( , , ) . . . . . . . . . set filename */ -Obj CompLists; -Obj CompThenFuncs; - Obj FuncCOM_FILE ( Obj self, Obj filename, @@ -973,7 +1073,8 @@ Obj FuncCOM_FILE ( { Int len; StructCompInitInfo* info; - UInt4 crc1; + Int4 crc1; + Int4 crc2; Char result[256]; Int res; Obj func; @@ -983,27 +1084,25 @@ Obj FuncCOM_FILE ( while ( ! IsStringConv(filename) ) { filename = ErrorReturnObj( " must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(filename)].name), 0L, + (Int)TNAM_OBJ(filename), 0L, "you can return a string for " ); } - while ( TNUM_OBJ(crc)!=T_INTPOS && !IS_INTOBJ(crc) ) { + while ( ! IS_INTOBJ(crc) ) { crc = ErrorReturnObj( - " must be an positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(crc)].name), 0L, - "you can return an integer or 'false' for " ); + " must be a small integer (not a %s)", + (Int)TNAM_OBJ(crc), 0L, + "you can return an integer for " ); } /* check if have a statically or dynamically loadable module */ - crc1 = INT_INTOBJ( QuoInt( crc, INTOBJ_INT( 1 << 16 ) ) ); - crc1 = crc1 << 16; - crc1 = crc1 + INT_INTOBJ( RemInt( crc, INTOBJ_INT( 1 << 16 ) ) ); - res = SyFindOrLinkGapRootFile(CSTR_STRING(filename), crc1, result, 256); + crc1 = INT_INTOBJ(crc); + res = SyFindOrLinkGapRootFile(CSTR_STRING(filename), crc1, result, 256); /* not found */ if ( res == 0 ) { ErrorQuit( "cannot find module or file '%s'", (Int)CSTR_STRING(filename), 0L ); - return 0; + return Fail; } /* dynamically linked */ @@ -1035,12 +1134,21 @@ Obj FuncCOM_FILE ( /* we have to read the GAP file */ else if ( res == 3 ) { + + /* compute the crc value of the original and compare */ + if ( SyCheckCompletionCrcComp ) { + crc2 = SyGAPCRC(result); + if ( crc1 != crc2 ) { + return INTOBJ_INT(4); + } + } filename = NEW_STRING( SyStrlen(result) ); SyStrncat( CSTR_STRING(filename), result, SyStrlen(result) ); - CompThenFuncs = NEW_PLIST( T_PLIST, 1 ); - SET_LEN_PLIST( CompThenFuncs, 1 ); + CompThenFuncs = NEW_PLIST( T_PLIST, COMP_THEN_OFFSET ); + SET_LEN_PLIST( CompThenFuncs, COMP_THEN_OFFSET ); SET_ELM_PLIST( CompThenFuncs, 1, filename ); + SET_ELM_PLIST( CompThenFuncs, 2, INTOBJ_INT(crc1) ); len = LEN_PLIST( CompLists ); GROW_PLIST( CompLists, len+1 ); @@ -1054,7 +1162,7 @@ Obj FuncCOM_FILE ( /* don't know */ else { ErrorQuit( "unknown result code %d from 'SyFindGapRoot'", res, 0L ); - return 0; + return Fail; } } @@ -1071,12 +1179,12 @@ Obj FuncCOM_FUN ( Int n; /* if the file is not yet completed then make a new function */ - n = INT_INTOBJ(num) + 1; + n = INT_INTOBJ(num) + COMP_THEN_OFFSET; if ( LEN_PLIST( CompThenFuncs ) < n ) { /* make the function */ - func = NewFunctionCT( T_FUNCTION, SIZE_FUNC, "", -1, "uncompleted", - 0L ); + func = NewFunctionCT( T_FUNCTION, SIZE_FUNC, "", -1, "uncompleted", + 0L ); HDLR_FUNC( func, 0 ) = DoComplete0args; HDLR_FUNC( func, 1 ) = DoComplete1args; HDLR_FUNC( func, 2 ) = DoComplete2args; @@ -1100,28 +1208,6 @@ Obj FuncCOM_FUN ( } -/**************************************************************************** -** -*F CompList( ) . . . . . . . . . . . . . . . . find list with -*/ -Obj CompList ( - Char * name ) -{ - UInt i; - Obj list; - Obj string; - - for ( i = 1; i <= LEN_LIST(CompLists); i++ ) { - list = ELM_LIST( CompLists, i ); - string = ELM_LIST( list, 1 ); - if ( ! SyStrcmp( name, CSTR_STRING(string) ) ) { - return list; - } - } - return (Obj)0; -} - - /**************************************************************************** ** *F FuncMAKE_INIT( , , ... ) . . . . . . . . . . generate init file @@ -1142,14 +1228,14 @@ Obj FuncMAKE_INIT ( { volatile UInt level; volatile UInt symbol; - Char value [1024]; + Char value [1024]; volatile UInt funcNum; - jmp_buf readJmpError; + jmp_buf readJmpError; /* check the argument */ if ( ! IsStringConv( filename ) ) { - ErrorQuit( "%d.th argument must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(filename)].name), 0L ); + ErrorQuit( "%d.th argument must be a string (not a %s)", + (Int)TNAM_OBJ(filename), 0L ); } /* try to open the output */ @@ -1160,9 +1246,9 @@ Obj FuncMAKE_INIT ( /* try to open the file */ if ( ! OpenInput( CSTR_STRING(filename) ) ) { - CloseOutput(); - ErrorQuit( "'%s' must exist and be readable", - (Int)CSTR_STRING(filename), 0L ); + CloseOutput(); + ErrorQuit( "'%s' must exist and be readable", + (Int)CSTR_STRING(filename), 0L ); } ClearError(); @@ -1174,38 +1260,38 @@ Obj FuncMAKE_INIT ( MAKE_INIT_GET_SYMBOL; while ( symbol != S_EOF ) { - memcpy( readJmpError, ReadJmpError, sizeof(jmp_buf) ); - if ( READ_ERROR() ) { - memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); - CloseInput(); - CloseOutput(); - ReadEvalError(); - } - memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); - - /* handle function beginning and ending */ - if ( symbol == S_FUNCTION ) { - Pr( "COM_FUN(%d)", funcNum++, 0L ); - MAKE_INIT_GET_SYMBOL; - level = 0; - while ( level != 0 || symbol != S_END ) { - if ( symbol == S_FUNCTION ) - level++; - if ( symbol == S_END ) - level--; - MAKE_INIT_GET_SYMBOL; - } - MAKE_INIT_GET_SYMBOL; - } - - /* handle -> expressions */ - else if ( symbol == S_IDENT && Symbol == S_MAPTO ) { - Pr( "COM_FUN(%d)", funcNum++, 0L ); - symbol = Symbol; if ( Symbol != S_EOF ) GetSymbol(); - MAKE_INIT_GET_SYMBOL; - level = 0; - while ( level != 0 - || (symbol != S_RBRACK && symbol != S_RBRACE + memcpy( readJmpError, ReadJmpError, sizeof(jmp_buf) ); + if ( READ_ERROR() ) { + memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); + CloseInput(); + CloseOutput(); + ReadEvalError(); + } + memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); + + /* handle function beginning and ending */ + if ( symbol == S_FUNCTION ) { + Pr( "COM_FUN(%d)", funcNum++, 0L ); + MAKE_INIT_GET_SYMBOL; + level = 0; + while ( level != 0 || symbol != S_END ) { + if ( symbol == S_FUNCTION ) + level++; + if ( symbol == S_END ) + level--; + MAKE_INIT_GET_SYMBOL; + } + MAKE_INIT_GET_SYMBOL; + } + + /* handle -> expressions */ + else if ( symbol == S_IDENT && Symbol == S_MAPTO ) { + Pr( "COM_FUN(%d)", funcNum++, 0L ); + symbol = Symbol; if ( Symbol != S_EOF ) GetSymbol(); + MAKE_INIT_GET_SYMBOL; + level = 0; + while ( level != 0 + || (symbol != S_RBRACK && symbol != S_RBRACE && symbol != S_RPAREN && symbol != S_COMMA && symbol != S_DOTDOT && symbol != S_SEMICOLON) ) { @@ -1217,101 +1303,101 @@ Obj FuncMAKE_INIT ( || symbol == S_RPAREN || symbol == S_END ) level--; MAKE_INIT_GET_SYMBOL; - } - } + } + } - /* handle the other symbols */ - else { - - switch ( symbol ) { - - case S_IDENT: Pr( "%I", (Int)value, 0L ); break; - case S_UNBIND: Pr( "Unbind", 0L, 0L ); break; - case S_ISBOUND: Pr( "IsBound", 0L, 0L ); break; - - case S_LBRACK: Pr( "[", 0L, 0L ); break; - case S_RBRACK: Pr( "]", 0L, 0L ); break; - case S_LBRACE: Pr( "{", 0L, 0L ); break; - case S_RBRACE: Pr( "}", 0L, 0L ); break; - case S_DOT: Pr( ".", 0L, 0L ); break; - case S_LPAREN: Pr( "(", 0L, 0L ); break; - case S_RPAREN: Pr( ")", 0L, 0L ); break; - case S_COMMA: Pr( ",", 0L, 0L ); break; - case S_DOTDOT: Pr( "..", 0L, 0L ); break; - - case S_BDOT: Pr( "!.", 0L, 0L ); break; - case S_BLBRACK: Pr( "![", 0L, 0L ); break; - case S_BLBRACE: Pr( "!{", 0L, 0L ); break; - - case S_INT: Pr( "%s", (Int)value, 0L ); break; - case S_TRUE: Pr( "true", 0L, 0L ); break; - case S_FALSE: Pr( "false", 0L, 0L ); break; - case S_CHAR: Pr( "'%c'", (Int)value[0], 0L ); break; - case S_STRING: Pr( "\"%S\"", (Int)value, 0L ); break; - - case S_REC: Pr( "rec", 0L, 0L ); break; - - case S_FUNCTION: /* handled above */ break; - case S_LOCAL: /* shouldn't happen */ break; - case S_END: /* handled above */ break; - case S_MAPTO: /* handled above */ break; - - case S_MULT: Pr( "*", 0L, 0L ); break; - case S_DIV: Pr( "/", 0L, 0L ); break; - case S_MOD: Pr( " mod ", 0L, 0L ); break; - case S_POW: Pr( "^", 0L, 0L ); break; - - case S_PLUS: Pr( "+", 0L, 0L ); break; - case S_MINUS: Pr( "-", 0L, 0L ); break; - - case S_EQ: Pr( "=", 0L, 0L ); break; - case S_LT: Pr( "<", 0L, 0L ); break; - case S_GT: Pr( ">", 0L, 0L ); break; - case S_NE: Pr( "<>", 0L, 0L ); break; - case S_LE: Pr( "<=", 0L, 0L ); break; - case S_GE: Pr( ">=", 0L, 0L ); break; - case S_IN: Pr( " in ", 0L, 0L ); break; - - case S_NOT: Pr( "not ", 0L, 0L ); break; - case S_AND: Pr( " and ", 0L, 0L ); break; - case S_OR: Pr( " or ", 0L, 0L ); break; - - case S_ASSIGN: Pr( ":=", 0L, 0L ); break; - - case S_IF: Pr( "if ", 0L, 0L ); break; - case S_FOR: Pr( "for ", 0L, 0L ); break; - case S_WHILE: Pr( "while ", 0L, 0L ); break; - case S_REPEAT: Pr( "repeat ", 0L, 0L ); break; - - case S_THEN: Pr( " then\n", 0L, 0L ); break; - case S_ELIF: Pr( "elif ", 0L, 0L ); break; - case S_ELSE: Pr( "else\n", 0L, 0L ); break; - case S_FI: Pr( "fi", 0L, 0L ); break; - case S_DO: Pr( " do\n", 0L, 0L ); break; - case S_OD: Pr( "od", 0L, 0L ); break; - case S_UNTIL: Pr( "until ", 0L, 0L ); break; - - case S_BREAK: Pr( "break", 0L, 0L ); break; - case S_RETURN: Pr( "return ", 0L, 0L ); break; - case S_QUIT: Pr( "quit", 0L, 0L ); break; - - case S_SEMICOLON: Pr( ";\n", 0L, 0L ); break; - - default: CloseInput(); - CloseOutput(); - ClearError(); - ErrorQuit( "unknown symbol %d", (Int)symbol, 0L ); - - } - - /* get the next symbol */ - MAKE_INIT_GET_SYMBOL; - } + /* handle the other symbols */ + else { + + switch ( symbol ) { + + case S_IDENT: Pr( "%I", (Int)value, 0L ); break; + case S_UNBIND: Pr( "Unbind", 0L, 0L ); break; + case S_ISBOUND: Pr( "IsBound", 0L, 0L ); break; + + case S_LBRACK: Pr( "[", 0L, 0L ); break; + case S_RBRACK: Pr( "]", 0L, 0L ); break; + case S_LBRACE: Pr( "{", 0L, 0L ); break; + case S_RBRACE: Pr( "}", 0L, 0L ); break; + case S_DOT: Pr( ".", 0L, 0L ); break; + case S_LPAREN: Pr( "(", 0L, 0L ); break; + case S_RPAREN: Pr( ")", 0L, 0L ); break; + case S_COMMA: Pr( ",", 0L, 0L ); break; + case S_DOTDOT: Pr( "..", 0L, 0L ); break; + + case S_BDOT: Pr( "!.", 0L, 0L ); break; + case S_BLBRACK: Pr( "![", 0L, 0L ); break; + case S_BLBRACE: Pr( "!{", 0L, 0L ); break; + + case S_INT: Pr( "%s", (Int)value, 0L ); break; + case S_TRUE: Pr( "true", 0L, 0L ); break; + case S_FALSE: Pr( "false", 0L, 0L ); break; + case S_CHAR: Pr( "'%c'", (Int)value[0], 0L ); break; + case S_STRING: Pr( "\"%S\"", (Int)value, 0L ); break; + + case S_REC: Pr( "rec", 0L, 0L ); break; + + case S_FUNCTION: /* handled above */ break; + case S_LOCAL: /* shouldn't happen */ break; + case S_END: /* handled above */ break; + case S_MAPTO: /* handled above */ break; + + case S_MULT: Pr( "*", 0L, 0L ); break; + case S_DIV: Pr( "/", 0L, 0L ); break; + case S_MOD: Pr( " mod ", 0L, 0L ); break; + case S_POW: Pr( "^", 0L, 0L ); break; + + case S_PLUS: Pr( "+", 0L, 0L ); break; + case S_MINUS: Pr( "-", 0L, 0L ); break; + + case S_EQ: Pr( "=", 0L, 0L ); break; + case S_LT: Pr( "<", 0L, 0L ); break; + case S_GT: Pr( ">", 0L, 0L ); break; + case S_NE: Pr( "<>", 0L, 0L ); break; + case S_LE: Pr( "<=", 0L, 0L ); break; + case S_GE: Pr( ">=", 0L, 0L ); break; + case S_IN: Pr( " in ", 0L, 0L ); break; + + case S_NOT: Pr( "not ", 0L, 0L ); break; + case S_AND: Pr( " and ", 0L, 0L ); break; + case S_OR: Pr( " or ", 0L, 0L ); break; + + case S_ASSIGN: Pr( ":=", 0L, 0L ); break; + + case S_IF: Pr( "if ", 0L, 0L ); break; + case S_FOR: Pr( "for ", 0L, 0L ); break; + case S_WHILE: Pr( "while ", 0L, 0L ); break; + case S_REPEAT: Pr( "repeat ", 0L, 0L ); break; + + case S_THEN: Pr( " then\n", 0L, 0L ); break; + case S_ELIF: Pr( "elif ", 0L, 0L ); break; + case S_ELSE: Pr( "else\n", 0L, 0L ); break; + case S_FI: Pr( "fi", 0L, 0L ); break; + case S_DO: Pr( " do\n", 0L, 0L ); break; + case S_OD: Pr( "od", 0L, 0L ); break; + case S_UNTIL: Pr( "until ", 0L, 0L ); break; + + case S_BREAK: Pr( "break", 0L, 0L ); break; + case S_RETURN: Pr( "return ", 0L, 0L ); break; + case S_QUIT: Pr( "quit", 0L, 0L ); break; + + case S_SEMICOLON: Pr( ";\n", 0L, 0L ); break; + + default: CloseInput(); + CloseOutput(); + ClearError(); + ErrorQuit( "unknown symbol %d", (Int)symbol, 0L ); + + } + + /* get the next symbol */ + MAKE_INIT_GET_SYMBOL; + } } /* close the input file again */ if ( ! CloseInput() ) { - ErrorQuit( + ErrorQuit( "Panic: MAKE_INIT cannot close input, this should not happen", 0L, 0L ); } @@ -1341,22 +1427,16 @@ Obj FuncGAP_CRC ( Obj self, Obj filename ) { - UInt4 crc; - Obj crc1; - /* check the argument */ while ( ! IsStringConv( filename ) ) { filename = ErrorReturnObj( " must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(filename)].name), 0L, + (Int)TNAM_OBJ(filename), 0L, "you can return a string for " ); } /* compute the crc value */ - crc = SyGAPCRC( CSTR_STRING(filename) ); - crc1 = INTOBJ_INT( crc >> 16 ); - crc1 = PROD( INTOBJ_INT(1<<16), crc1 ); - return SUM( crc1, INTOBJ_INT( crc & 0xFFFFL ) ); + return INTOBJ_INT( SyGAPCRC( CSTR_STRING(filename) ) ); } @@ -1378,14 +1458,14 @@ Obj FuncLOAD_DYN ( while ( ! IsStringConv( filename ) ) { filename = ErrorReturnObj( " must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(filename)].name), 0L, + (Int)TNAM_OBJ(filename), 0L, "you can return a string for " ); } - while ( TNUM_OBJ(crc)!=T_INTPOS && !IS_INTOBJ(crc) && crc!=False ) { + while ( ! IS_INTOBJ(crc) && crc!=False ) { crc = ErrorReturnObj( - " must be an integer or 'false' (not a %s)", - (Int)(InfoBags[TNUM_OBJ(crc)].name), 0L, - "you can return an integer or 'false' for " ); + " must be a small integer or 'false' (not a %s)", + (Int)TNAM_OBJ(crc), 0L, + "you can return a small integer or 'false' for " ); } /* try to read the module */ @@ -1412,9 +1492,7 @@ Obj FuncLOAD_DYN ( /* check the crc value */ if ( crc != False ) { - crc1 = INTOBJ_INT( info->magic1 >> 16 ); - crc1 = PROD( INTOBJ_INT(1<<16), crc1 ); - crc1 = SUM( crc1, INTOBJ_INT( info->magic1 & 0xFFFFL ) ); + crc1 = INTOBJ_INT( info->magic1 ); if ( ! EQ( crc, crc1 ) ) { if ( SyDebugLoading ) { Pr( "#I LOAD_DYN: crc values do not match, gap ", 0L, 0L ); @@ -1432,6 +1510,7 @@ Obj FuncLOAD_DYN ( func = (Obj)(info->function1)(); CALL_0ARGS(func); + RecordLoadedModule(filename, INT_INTOBJ(crc)); return True; } @@ -1454,14 +1533,14 @@ Obj FuncLOAD_STAT ( while ( ! IsStringConv( filename ) ) { filename = ErrorReturnObj( " must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(filename)].name), 0L, + (Int)TNAM_OBJ(filename), 0L, "you can return a string for " ); } - while ( TNUM_OBJ(crc)!=T_INTPOS && !IS_INTOBJ(crc) && crc!=False ) { + while ( !IS_INTOBJ(crc) && crc!=False ) { crc = ErrorReturnObj( - " must be an integer or 'false' (not a %s)", - (Int)(InfoBags[TNUM_OBJ(crc)].name), 0L, - "you can return an integer or 'false' for " ); + " must be a small integer or 'false' (not a %s)", + (Int)TNAM_OBJ(crc), 0L, + "you can return a small integer or 'false' for " ); } /* try to find the module */ @@ -1484,9 +1563,7 @@ Obj FuncLOAD_STAT ( /* check the crc value */ if ( crc != False ) { - crc1 = INTOBJ_INT( info->magic1 >> 16 ); - crc1 = PROD( INTOBJ_INT(1<<16), crc1 ); - crc1 = SUM( crc1, INTOBJ_INT( info->magic1 & 0xFFFFL ) ); + crc1 = INTOBJ_INT( info->magic1 ); if ( ! EQ( crc, crc1 ) ) { if ( SyDebugLoading ) { Pr( "#I LOAD_STAT: crc values do not match, gap ", 0L, 0L ); @@ -1504,6 +1581,8 @@ Obj FuncLOAD_STAT ( func = (Obj)(info->function1)(); CALL_0ARGS(func); + RecordLoadedModule(filename, INT_INTOBJ(crc)); + return True; } @@ -1545,9 +1624,7 @@ Obj FuncSHOW_STAT ( SET_ELM_PLIST( modules, im, name ); /* compute the crc value */ - crc1 = INTOBJ_INT( info->magic1 >> 16 ); - crc1 = PROD( INTOBJ_INT(1<<16), crc1 ); - crc1 = SUM( crc1, INTOBJ_INT( info->magic1 & 0xFFFFL ) ); + crc1 = INTOBJ_INT( info->magic1 ); SET_ELM_PLIST( modules, im+1, crc1 ); im += 2; } @@ -1597,7 +1674,7 @@ Obj FuncGASMAN ( while ( ! IsStringConv(cmd) ) { cmd = ErrorReturnObj( "GASMAN: must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(cmd)].name), 0L, + (Int)TNAM_OBJ(cmd), 0L, "you can return a string for " ); } @@ -1702,7 +1779,7 @@ Obj FuncTNUM_OBJ ( /* set the type */ SET_ELM_PLIST( res, 1, INTOBJ_INT( TNUM_OBJ(obj) ) ); - cst = InfoBags[TNUM_OBJ(obj)].name; + cst = TNAM_OBJ(obj); str = NEW_STRING( SyStrlen(cst) ); SyStrncat( CSTR_STRING(str), cst, SyStrlen(cst) ); SET_ELM_PLIST( res, 2, str ); @@ -1853,23 +1930,23 @@ static UInt NrImportedGVars = 0; void ImportGVarFromLibrary( - SYS_CONST Char * name, + SYS_CONST Char * name, Obj * address ) { if ( NrImportedGVars == 1024 ) { if ( ! SyQuiet ) { Pr( "#W warning: too many imported GVars\n", 0L, 0L ); } - if ( address != 0 ) { - InitCopyGVar( GVarName(name), address ); - } + if ( address != 0 ) { + InitCopyGVar( (Char *)name, address ); + } } else { ImportedGVars[NrImportedGVars] = GVarName(name); ImportedGVarAddrs[NrImportedGVars] = address; - if ( address != 0 ) { - InitCopyGVar( ImportedGVars[NrImportedGVars], address ); - } + if ( address != 0 ) { + InitCopyGVar( (Char *)name, address ); + } NrImportedGVars++; } } @@ -1885,23 +1962,23 @@ static UInt NrImportedFuncs = 0; void ImportFuncFromLibrary( - SYS_CONST Char * name, + SYS_CONST Char * name, Obj * address ) { if ( NrImportedFuncs == 1024 ) { if ( ! SyQuiet ) { Pr( "#W warning: too many imported Funcs\n", 0L, 0L ); } - if ( address != 0 ) { - InitFopyGVar( GVarName(name), address ); - } + if ( address != 0 ) { + InitFopyGVar( (Char *)name, address ); + } } else { ImportedFuncs[NrImportedFuncs] = GVarName(name); ImportedFuncAddrs[NrImportedFuncs] = address; - if ( address != 0 ) { - InitFopyGVar( ImportedFuncs[NrImportedFuncs], address ); - } + if ( address != 0 ) { + InitFopyGVar( (Char *)name, address ); + } NrImportedFuncs++; } } @@ -1919,16 +1996,16 @@ Obj FuncExportToKernelFinished ( Obj val; for ( i = 0; i < NrImportedGVars; i++ ) { - if ( ImportedGVarAddrs[i] == 0 ) { - val = ValAutoGVar(ImportedGVars[i]); - if ( val == 0 ) { - errs++; - if ( ! SyQuiet ) { - Pr( "#W global variable '%s' has not been defined\n", - (Int)NameGVar(ImportedFuncs[i]), 0L ); - } - } - } + if ( ImportedGVarAddrs[i] == 0 ) { + val = ValAutoGVar(ImportedGVars[i]); + if ( val == 0 ) { + errs++; + if ( ! SyQuiet ) { + Pr( "#W global variable '%s' has not been defined\n", + (Int)NameGVar(ImportedFuncs[i]), 0L ); + } + } + } else if ( *ImportedGVarAddrs[i] == 0 ) { errs++; if ( ! SyQuiet ) { @@ -1937,21 +2014,21 @@ Obj FuncExportToKernelFinished ( } } else { - MakeReadOnlyGVar(ImportedGVars[i]); + MakeReadOnlyGVar(ImportedGVars[i]); } } for ( i = 0; i < NrImportedFuncs; i++ ) { - if ( ImportedFuncAddrs[i] == 0 ) { - val = ValAutoGVar(ImportedFuncs[i]); - if ( val == 0 || TNUM_OBJ(val) != T_FUNCTION ) { - errs++; - if ( ! SyQuiet ) { - Pr( "#W global function '%s' has not been defined\n", - (Int)NameGVar(ImportedFuncs[i]), 0L ); - } - } - } + if ( ImportedFuncAddrs[i] == 0 ) { + val = ValAutoGVar(ImportedFuncs[i]); + if ( val == 0 || TNUM_OBJ(val) != T_FUNCTION ) { + errs++; + if ( ! SyQuiet ) { + Pr( "#W global function '%s' has not been defined\n", + (Int)NameGVar(ImportedFuncs[i]), 0L ); + } + } + } else if ( *ImportedFuncAddrs[i] == ErrorMustEvalToFuncFunc || *ImportedFuncAddrs[i] == ErrorMustHaveAssObjFunc ) { @@ -1962,7 +2039,7 @@ Obj FuncExportToKernelFinished ( } } else { - MakeReadOnlyGVar(ImportedFuncs[i]); + MakeReadOnlyGVar(ImportedFuncs[i]); } } @@ -1972,249 +2049,212 @@ Obj FuncExportToKernelFinished ( /**************************************************************************** ** -*F SET_REVISION( , ) +*V Revisions . . . . . . . . . . . . . . . . . . record of revision numbers */ -char * Revisions[1024]; -UInt RevisionsSize = 0; - -#define SET_REVISION( file, revision ) \ - do { \ - extern char * revision; \ - Revisions[RevisionsSize++] = file; \ - Revisions[RevisionsSize++] = revision; \ - } while (0) +Obj Revisions; /**************************************************************************** ** -*F InitGap() . . . . . . . . . . . . . . . . . . . . . . . . . intialize GAP +*F SetupGap() . . . . . . . . . . . . . . . . . . . . setup internal tables +** +** - setup any tables like gasman marking functions, gasman bag names, list +** dispatchers, list filter maps, etc. +** +** - do not create *any* new bag, global variable, fopies or copies, rnams. +** +** After the setup the basic stuff of each package should work, for example +** it should be possible to create and handle plain lists and records. +** However, functions like "type of list" will not yet work because they +** need to interact with library, `OnePerm' will not work because it needs a +** global `()' permutation. */ -extern TNumMarkFuncBags TabMarkFuncBags [ 256 ]; - -void InitGap ( - int * pargc, - char * argv [] ) +void SetupGap ( void ) { - UInt type; - Char * version; - Obj string; - Obj record; - UInt rnam; UInt i; - UInt var; - - - /* initialize the basic system and gasman */ - InitSystem( *pargc, argv ); - InitBags( SyAllocBags, SyStorMin, - 0, (Bag*)pargc, SyStackAlign, - SyCacheSize, 0, SyAbortBags ); - InitMsgsFuncBags( SyMsgsBags ); + /* global variables */ + SetupGVars(); + + /* objects */ + SetupObjects(); + + /* scanner, reader, interpreter, coder, caller, compiler */ + SetupScanner(); + SetupRead(); + SetupCalls(); + SetupExprs(); + SetupStats(); + SetupCode(); + SetupVars(); /* must come after InitExpr and InitStats */ + SetupFuncs(); + SetupOpers(); + SetupIntrprtr(); + SetupCompiler(); + + /* arithmetic operations */ + SetupAriths(); + SetupInt(); + SetupRat(); + SetupCyc(); + SetupFinfield(); + SetupPermutat(); + SetupBool(); + + /* record packages */ + SetupRecords(); + SetupPRecord(); + + /* list packages */ + SetupLists(); + SetupListOper(); + SetupListFunc(); + SetupPlist(); + SetupSet(); + SetupVector(); + SetupBlist(); + SetupRange(); + SetupString(); + + /* free and presented groups */ + SetupFreeGroupElements(); + SetupCosetTable(); + SetupTietze(); + SetupPcElements(); + SetupSingleCollector(); + SetupPcc(); + SetupDeepThought(); + SetupDTEvaluation(); + + /* algebras */ + SetupSCTable(); + + /* input and output */ + SetupStreams(); + + /* save and load workspace, weak pointers */ + SetupWeakPtr(); + SetupSaveLoad(); + + + /* you should set 'COUNT_BAGS' as well */ +#ifdef DEBUG_RESTORE + if ( SyRestoring ) { + Pr( "#W after setup\n", 0L, 0L ); + Pr( "#W %36s ", (Int)"type", 0L ); + Pr( "%8s %8s ", (Int)"alive", (Int)"kbyte" ); + Pr( "%8s %8s\n", (Int)"total", (Int)"kbyte" ); + for ( i = 0; i < 256; i++ ) { + if ( InfoBags[i].name != 0 && InfoBags[i].nrAll != 0 ) { + char buf[41]; + + buf[0] = '\0'; + SyStrncat( buf, InfoBags[i].name, 40 ); + Pr("#W %36s ", (Int)buf, 0L ); + Pr("%8d %8d ", (Int)InfoBags[i].nrLive, + (Int)(InfoBags[i].sizeLive/1024)); + Pr("%8d %8d\n",(Int)InfoBags[i].nrAll, + (Int)(InfoBags[i].sizeAll/1024)); + } + } + } +#endif +} - SET_REVISION( "system_c", Revision_system_c ); - SET_REVISION( "system_h", Revision_system_h ); - SET_REVISION( "gasman_c", Revision_gasman_c ); - SET_REVISION( "gasman_h", Revision_gasman_h ); - SET_REVISION( "gap_c", Revision_gap_c ); - SET_REVISION( "gap_h", Revision_gap_h ); +/**************************************************************************** +** +*F InitGap() . . . . . . . . . . . . . . . . . . . . initialise the packages +** +** - create any global bags needed, +** - export handlers, setup GAP functions, import library functions, +** - initialise fopies and copies, +** - assign global variables, +** - precompute record names +** +** This step is allowed to create new bags. If we are restoring the +** creating part will be skipped. +*/ +void InitGap ( void ) +{ + Char * version = "v4r0p0 1996/06/06"; + Obj string; + UInt i; + UInt var; - /* initialise the global variables */ + /* global variables */ InitGVars(); - SET_REVISION( "gvars_c", Revision_gvars_c ); - SET_REVISION( "gvars_h", Revision_gvars_h ); - - - /* now initialise the important filter/properties */ -#if 0 - RESERVE_FILTER( IsMutableObjFilt, F_MUTABLE ); - RESERVE_PROPERTY( IsEmptyProp, F_EMPTY, F_NOT_EMPTY ); - RESERVE_PROPERTY( IsSSortProp, F_SSORT, F_NOT_SSORT ); - RESERVE_PROPERTY( IsDenseProp, F_DENSE, F_NOT_DENSE ); - RESERVE_PROPERTY( IsHomogProp, F_HOMOG, F_NOT_HOMOG ); - RESERVE_PROPERTY( IsTableProp, F_TABLE, F_NOT_TABLE ); -#endif - - /* read all the other packages */ + /* objects */ InitObjects(); - SET_REVISION( "objects_c", Revision_objects_c ); - SET_REVISION( "objects_h", Revision_objects_h ); + /* scanner, reader, interpreter, coder, caller, compiler */ + InitScanner(); + InitRead(); InitCalls(); - SET_REVISION( "calls_c", Revision_calls_c ); - SET_REVISION( "calls_h", Revision_calls_h ); - + InitExprs(); + InitStats(); + InitCode(); + InitVars(); /* must come after InitExpr and InitStats */ + InitFuncs(); InitOpers(); - SET_REVISION( "opers_c", Revision_opers_c ); - SET_REVISION( "opers_h", Revision_opers_h ); + InitIntrprtr(); + InitCompiler(); + /* arithmetic operations */ InitAriths(); - SET_REVISION( "ariths_c", Revision_ariths_c ); - SET_REVISION( "ariths_h", Revision_ariths_h ); - - InitRecords(); - SET_REVISION( "records_c", Revision_records_c ); - SET_REVISION( "records_h", Revision_records_h ); - - InitLists(); - SET_REVISION( "lists_c", Revision_lists_c ); - SET_REVISION( "lists_h", Revision_lists_h ); - - InitBool(); - SET_REVISION( "bool_c", Revision_bool_c ); - SET_REVISION( "bool_h", Revision_bool_h ); - InitInt(); - SET_REVISION( "integer_c", Revision_integer_c ); - SET_REVISION( "integer_h", Revision_integer_h ); - InitRat(); - SET_REVISION( "rational_c", Revision_rational_c ); - SET_REVISION( "rational_h", Revision_rational_h ); - InitCyc(); - SET_REVISION( "cyclotom_c", Revision_cyclotom_c ); - SET_REVISION( "cyclotom_h", Revision_cyclotom_h ); - InitFinfield(); - SET_REVISION( "finfield_c", Revision_finfield_c ); - SET_REVISION( "finfield_h", Revision_finfield_h ); - InitPermutat(); - SET_REVISION( "permutat_c", Revision_permutat_c ); - SET_REVISION( "permutat_h", Revision_permutat_h ); + InitBool(); + + /* record packages */ + InitRecords(); InitPRecord(); - SET_REVISION( "precord_c", Revision_precord_c ); - SET_REVISION( "precord_h", Revision_precord_h ); + /* list packages */ + InitLists(); InitListOper(); - SET_REVISION( "listoper_c", Revision_listoper_c ); - SET_REVISION( "listoper_h", Revision_listoper_h ); - InitListFunc(); - SET_REVISION( "listfunc_c", Revision_listfunc_c ); - SET_REVISION( "listfunc_h", Revision_listfunc_h ); - InitPlist(); - SET_REVISION( "plist_c", Revision_plist_c ); - SET_REVISION( "plist_h", Revision_plist_h ); - InitSet(); - SET_REVISION( "set_c", Revision_set_c ); - SET_REVISION( "set_h", Revision_set_h ); - InitVector(); - SET_REVISION( "vector_c", Revision_vector_c ); - SET_REVISION( "vector_h", Revision_vector_h ); - InitBlist(); - SET_REVISION( "blister_c", Revision_blister_c ); - SET_REVISION( "blister_h", Revision_blister_h ); - InitRange(); - SET_REVISION( "range_c", Revision_range_c ); - SET_REVISION( "range_h", Revision_range_h ); - InitString(); - SET_REVISION( "string_c", Revision_string_c ); - SET_REVISION( "string_h", Revision_string_h ); + /* free and presented groups */ InitFreeGroupElements(); - SET_REVISION( "objfgelm_c", Revision_objfgelm_c ); - SET_REVISION( "objfgelm_h", Revision_objfgelm_h ); - - InitSingleCollector(); - SET_REVISION( "objscoll_c", Revision_objscoll_c ); - SET_REVISION( "objscoll_h", Revision_objscoll_h ); - - InitPcElements(); - SET_REVISION( "objpcgel_c", Revision_objpcgel_c ); - SET_REVISION( "objpcgel_h", Revision_objpcgel_h ); - - InitSCTable(); - SET_REVISION( "sctable_c", Revision_sctable_c ); - SET_REVISION( "sctable_h", Revision_sctable_h ); - InitCosetTable(); - SET_REVISION( "costab_c", Revision_costab_c ); - SET_REVISION( "costab_h", Revision_costab_h ); - - InitCode(); - SET_REVISION( "code_c", Revision_code_c ); - SET_REVISION( "code_h", Revision_code_h ); - - InitExprs(); - SET_REVISION( "exprs_c", Revision_exprs_c ); - SET_REVISION( "exprs_h", Revision_exprs_h ); - - InitStats(); - SET_REVISION( "stats_c", Revision_stats_c ); - SET_REVISION( "stats_h", Revision_stats_h ); - - - /* must come after InitExpr and InitStats */ - InitVars(); - SET_REVISION( "vars_c", Revision_vars_c ); - SET_REVISION( "vars_h", Revision_vars_h ); - - InitFuncs(); - SET_REVISION( "funcs_c", Revision_funcs_c ); - SET_REVISION( "funcs_h", Revision_funcs_h ); - + InitTietze(); + InitPcElements(); + InitSingleCollector(); InitPcc(); - InitDeepThought(); - SET_REVISION( "dt_c", Revision_dt_c ); - SET_REVISION( "dt_h", Revision_dt_h ); - InitDTEvaluation(); - SET_REVISION( "dteval.c", Revision_dteval_c ); - SET_REVISION( "dteval.h", Revision_dteval_h ); - - InitIntrprtr(); - SET_REVISION( "intrprtr_c", Revision_intrprtr_c ); - SET_REVISION( "intrprtr_h", Revision_intrprtr_h ); - - InitCompiler(); - SET_REVISION( "compiler_c", Revision_compiler_c ); - SET_REVISION( "compiler_h", Revision_compiler_h ); - - InitScanner(); - SET_REVISION( "scanner_c", Revision_scanner_c ); - SET_REVISION( "scanner_h", Revision_scanner_h ); - InitRead(); - SET_REVISION( "read_c", Revision_read_c ); - SET_REVISION( "read_h", Revision_read_h ); + /* algebras */ + InitSCTable(); + /* input and output */ InitStreams(); - SET_REVISION( "streams_c", Revision_streams_c ); - SET_REVISION( "streams_h", Revision_streams_h ); - - InitSysFiles(); - SET_REVISION( "sysfiles_c", Revision_sysfiles_c ); - SET_REVISION( "sysfiles_h", Revision_sysfiles_h ); + /* save and load workspace, weak pointers */ InitSaveLoad(); - SET_REVISION( "saveload_c", Revision_saveload_c ); - SET_REVISION( "saveload_h", Revision_saveload_h ); - - - /* and now for a special hack */ - for ( i = LAST_CONSTANT_TNUM+1; i <= LAST_REAL_TNUM; i++ ) { - TabMarkFuncBags[ i+COPYING ] = TabMarkFuncBags[ i ]; - } - + InitWeakPtr(); + InitSysFiles(); /* init the completion function */ - InitGlobalBag( &CompNowFuncs, "src/gap.c:CompNowFuncs" ); - InitGlobalBag( &CompThenFuncs,"src/gap.c:CompThenFuncs" ); - InitGlobalBag( &CompLists, "src/gap.c:CompLists" ); - CompLists = NEW_PLIST( T_PLIST, 0 ); - SET_LEN_PLIST( CompLists, 0 ); + InitGlobalBag( &CompNowFuncs, "src/gap.c:CompNowFuncs" ); + InitGlobalBag( &CompThenFuncs, "src/gap.c:CompThenFuncs" ); + InitGlobalBag( &CompLists, "src/gap.c:CompLists" ); + if ( ! SyRestoring ) { + CompLists = NEW_PLIST( T_PLIST, 0 ); + SET_LEN_PLIST( CompLists, 0 ); + } /* construct the `ViewObj' variable */ @@ -2229,105 +2269,97 @@ void InitGap ( /* version info */ - version = "v4r0p0 1996/06/06"; - string = NEW_STRING( SyStrlen(version) ); - SyStrncat( CSTR_STRING(string), version, SyStrlen(version) ); - var = GVarName( "VERSRC" ); - AssGVar( var, string ); - MakeReadOnlyGVar(var); - - string = NEW_STRING( SyStrlen(SyFlags) ); - SyStrncat( CSTR_STRING(string), SyFlags, SyStrlen(SyFlags) ); - var = GVarName( "VERSYS" ); - AssGVar( var, string ); - MakeReadOnlyGVar(var); - - record = NEW_PREC(0); - for ( i = 0; i < RevisionsSize; i += 2 ) { - rnam = RNamName(Revisions[i]); - string = NEW_STRING( SyStrlen(Revisions[i+1]) ); - SyStrncat( CSTR_STRING(string), Revisions[i+1], - SyStrlen(Revisions[i+1]) ); - AssPRec( record, rnam, string ); - CHANGED_BAG(record); + if ( ! SyRestoring ) { + string = NEW_STRING( SyStrlen(version) ); + SyStrncat( CSTR_STRING(string), version, SyStrlen(version) ); + var = GVarName( "VERSRC" ); + AssGVar( var, string ); + MakeReadOnlyGVar(var); + string = NEW_STRING( SyStrlen(SyFlags) ); + SyStrncat( CSTR_STRING(string), SyFlags, SyStrlen(SyFlags) ); + var = GVarName( "VERSYS" ); + AssGVar( var, string ); + MakeReadOnlyGVar(var); } - var = GVarName( "Revision" ); - AssGVar( var, record ); - MakeReadOnlyGVar(var); /* library name and other stuff */ - var = GVarName( "QUIET" ); - AssGVar( var, (SyQuiet ? True : False) ); - MakeReadOnlyGVar(var); + if ( ! SyRestoring ) { + var = GVarName( "QUIET" ); + AssGVar( var, (SyQuiet ? True : False) ); + MakeReadOnlyGVar(var); - var = GVarName( "BANNER" ); - AssGVar( var, (SyBanner ? True : False) ); - MakeReadOnlyGVar(var); + var = GVarName( "BANNER" ); + AssGVar( var, (SyBanner ? True : False) ); + MakeReadOnlyGVar(var); - var = GVarName( "DEBUG_LOADING" ); - AssGVar( var, (SyDebugLoading ? True : False) ); - MakeReadOnlyGVar(var); + var = GVarName( "DEBUG_LOADING" ); + AssGVar( var, (SyDebugLoading ? True : False) ); + MakeReadOnlyGVar(var); - var = GVarName( "CHECK_FOR_COMP_FILES" ); - AssGVar( var, (SyCheckForCompletion ? True : False) ); - MakeReadOnlyGVar(var); + var = GVarName( "CHECK_FOR_COMP_FILES" ); + AssGVar( var, (SyCheckForCompletion ? True : False) ); + MakeReadOnlyGVar(var); + } /* list of exit functions */ - AtExitFunctions = NEW_PLIST( T_PLIST, 0 ); - SET_LEN_PLIST( AtExitFunctions, 0 ); - var = GVarName( "AT_EXIT_FUNCS" ); - AssGVar( var, AtExitFunctions ); - MakeReadOnlyGVar(var); + InitGlobalBag( &AtExitFunctions, "src/gap.c:AtExitFunctions" ); + if ( ! SyRestoring ) { + AtExitFunctions = NEW_PLIST( T_PLIST, 0 ); + SET_LEN_PLIST( AtExitFunctions, 0 ); + var = GVarName( "AT_EXIT_FUNCS" ); + AssGVar( var, AtExitFunctions ); + MakeReadOnlyGVar(var); + } /* init handlers */ - InitHandlerFunc( DoComplete0args, "src/gap.c:DoComplete0args"); - InitHandlerFunc( DoComplete1args, "src/gap.c:DoComplete1args"); - InitHandlerFunc( DoComplete2args, "src/gap.c:DoComplete2args"); - InitHandlerFunc( DoComplete3args, "src/gap.c:DoComplete3args"); - InitHandlerFunc( DoComplete4args, "src/gap.c:DoComplete4args"); - InitHandlerFunc( DoComplete5args, "src/gap.c:DoComplete5args"); - InitHandlerFunc( DoComplete6args, "src/gap.c:DoComplete6args"); - InitHandlerFunc( DoCompleteXargs, "src/gap.c:DoCompleteXargs"); + InitHandlerFunc( DoComplete0args, "src/gap.c:DoComplete0args" ); + InitHandlerFunc( DoComplete1args, "src/gap.c:DoComplete1args" ); + InitHandlerFunc( DoComplete2args, "src/gap.c:DoComplete2args" ); + InitHandlerFunc( DoComplete3args, "src/gap.c:DoComplete3args" ); + InitHandlerFunc( DoComplete4args, "src/gap.c:DoComplete4args" ); + InitHandlerFunc( DoComplete5args, "src/gap.c:DoComplete5args" ); + InitHandlerFunc( DoComplete6args, "src/gap.c:DoComplete6args" ); + InitHandlerFunc( DoCompleteXargs, "src/gap.c:DoCompleteXargs" ); /* install the internal functions */ C_NEW_GVAR_FUNC( "Runtime", 0L, "", - FuncRuntime, + FuncRuntime, "src/gap.c:Runtime" ); C_NEW_GVAR_FUNC( "SizeScreen", -1L, "args", - FuncSizeScreen, + FuncSizeScreen, "src/gap.c:SizeScreen" ); C_NEW_GVAR_FUNC( "ID_FUNC", 1L, "object", - FuncID_FUNC, + FuncID_FUNC, "src/gap.c:ID_FUNC" ); C_NEW_GVAR_FUNC( "ExportToKernelFinished", 0L, "", - FuncExportToKernelFinished, + FuncExportToKernelFinished, "src/gap.c:ExportToKernelFinished" ); /* install the error functions */ C_NEW_GVAR_FUNC( "DownEnv", -1L, "args", - FuncDownEnv, + FuncDownEnv, "src/gap.c:DownEnv" ); C_NEW_GVAR_FUNC( "Where", -1L, "args", - FuncWhere, + FuncWhere, "src/gap.c:Where" ); C_NEW_GVAR_FUNC( "Error", -1L, "args", - FuncError, + FuncError, "src/gap.c:Error" ); /* install the functions for creating the init file */ C_NEW_GVAR_FUNC( "COM_FILE", 2L, "filename, crc", - FuncCOM_FILE, + FuncCOM_FILE, "src/gap.c:COM_FILE" ); C_NEW_GVAR_FUNC( "COM_FUN", 1L, "number", @@ -2386,10 +2418,172 @@ void InitGap ( FuncSWAP_MPTR, "src/gap.c:SWAP_MPTR" ); + + /* you should set 'COUNT_BAGS' as well */ +#ifdef DEBUG_RESTORE + if ( SyRestoring ) { + Pr( "#W after init\n", 0L, 0L ); + Pr( "#W %36s ", (Int)"type", 0L ); + Pr( "%8s %8s ", (Int)"alive", (Int)"kbyte" ); + Pr( "%8s %8s\n", (Int)"total", (Int)"kbyte" ); + for ( i = 0; i < 256; i++ ) { + if ( InfoBags[i].name != 0 && InfoBags[i].nrAll != 0 ) { + char buf[41]; + + buf[0] = '\0'; + SyStrncat( buf, InfoBags[i].name, 40 ); + Pr("#W %36s ", (Int)buf, 0L ); + Pr("%8d %8d ", (Int)InfoBags[i].nrLive, + (Int)(InfoBags[i].sizeLive/1024)); + Pr("%8d %8d\n",(Int)InfoBags[i].nrAll, + (Int)(InfoBags[i].sizeAll/1024)); + } + } + } +#endif +} + + +/**************************************************************************** +** +*F CheckGap() . . . . . . . . . . check the initialisation of the packages +** +** Do any sanity checks. For example, the generic list package might check +** that all tables are filled, while the arithmitic package might want to +** check that special packages didn't mess up the arithmitic tables. +** +** This step is optional. It should not fix errors without warnings, that +** is to say, if no warning or error messages are produced then this step +** can be skipped. +*/ +void CheckGap ( void ) +{ + SET_REVISION( "gap_c", Revision_gap_c ); + SET_REVISION( "gap_h", Revision_gap_h ); + + /* global variables */ + CheckGVars(); + + /* scanner, reader, interpreter, coder, caller, compiler */ + CheckScanner(); + CheckRead(); + CheckExprs(); + CheckStats(); + CheckCode(); + CheckCalls(); + CheckVars(); + CheckFuncs(); + CheckOpers(); + CheckIntrprtr(); + CheckCompiler(); + + /* objects */ + CheckObjects(); + + /* arithmetic operations */ + CheckAriths(); + CheckInt(); + CheckRat(); + CheckCyc(); + CheckFinfield(); + CheckPermutat(); + CheckBool(); + + /* record packages */ + CheckRecords(); + CheckPRecord(); + + /* list packages */ + CheckLists(); + CheckListOper(); + CheckListFunc(); + CheckPlist(); + CheckSet(); + CheckVector(); + CheckBlist(); + CheckRange(); + CheckString(); + + /* free and presented groups */ + CheckFreeGroupElements(); + CheckCosetTable(); + CheckTietze(); + CheckPcElements(); + CheckSingleCollector(); + CheckPcc(); + CheckDeepThought(); + CheckDTEvaluation(); + + /* algebras */ + CheckSCTable(); + + /* input and output */ + CheckStreams(); + + /* save and load workspace, weak pointers */ + CheckWeakPtr(); + CheckSaveLoad(); + + /* check function handlers */ #ifdef DEBUG_HANDLER_REGISTRATION CheckAllHandlers(); #endif - +} + + +/**************************************************************************** +** +*F InitializeGap() . . . . . . . . . . . . . . . . . . . . . . intialize GAP +*/ +extern TNumMarkFuncBags TabMarkFuncBags [ 256 ]; + +void InitializeGap ( + int * pargc, + char * argv [] ) +{ + UInt type; + UInt i; + UInt var; + + + /* initialize the basic system and gasman */ + InitSystem( *pargc, argv ); + + InitBags( SyAllocBags, SyStorMin, + 0, (Bag*)pargc, SyStackAlign, + SyCacheSize, 0, SyAbortBags ); + InitMsgsFuncBags( SyMsgsBags ); + + + /* setup internal tables */ + SetupGap(); + + + /* and now for a special hack */ + for ( i = LAST_CONSTANT_TNUM+1; i <= LAST_REAL_TNUM; i++ ) { + TabMarkFuncBags[ i+COPYING ] = TabMarkFuncBags[ i ]; + } + + + /* initialize packages */ + InitGap(); + + + /* check the initialisation of the packages */ + Revisions = NEW_PREC(0); + var = GVarName( "Revision" ); + AssGVar( var, Revisions ); + MakeReadOnlyGVar(var); + + CheckGap(); + + + SET_REVISION( "system_c", Revision_system_c ); + SET_REVISION( "system_h", Revision_system_h ); + SET_REVISION( "gasman_c", Revision_gasman_c ); + SET_REVISION( "gasman_h", Revision_gasman_h ); + + /* read the init files */ if ( SySystemInitFile[0] ) { if ( READ_GAP_ROOT(SySystemInitFile) == 0 ) { @@ -2403,7 +2597,7 @@ void InitGap ( for ( i = 0; i < sizeof(SyInitfiles)/sizeof(SyInitfiles[0]); i++ ) { if ( SyInitfiles[i][0] != '\0' ) { if ( OpenInput( SyInitfiles[i] ) ) { - ClearError(); + ClearError(); while ( 1 ) { type = ReadEvalCommand(); if ( type == 1 || type == 2 ) { @@ -2414,7 +2608,7 @@ void InitGap ( } } CloseInput(); - ClearError(); + ClearError(); } else { Pr( "Error, file \"%s\" must exist and be readable\n", @@ -2422,7 +2616,6 @@ void InitGap ( } } } - } diff --git a/src/gap.h b/src/gap.h index 80de178af5..65765b22cc 100644 --- a/src/gap.h +++ b/src/gap.h @@ -9,7 +9,7 @@ ** This file declares the various read-eval-print loops and related stuff. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_gap_h = +SYS_CONST char * Revision_gap_h = "@(#)$Id$"; #endif @@ -87,6 +87,62 @@ extern void ErrorQuit ( Int arg2 ); +/**************************************************************************** +** +*F ErrorQuitBound( ) . . . . . . . . . . . . . . . unbound variable +*/ +extern void ErrorQuitBound ( + Char * name ); + + +/**************************************************************************** +** +*F ErrorQuitFuncResult() . . . . . . . . . . . . . . . . must return a value +*/ +extern void ErrorQuitFuncResult ( void ); + + +/**************************************************************************** +** +*F ErrorQuitIntSmall( ) . . . . . . . . . . . . . not a small integer +*/ +extern void ErrorQuitIntSmall ( + Obj obj ); + + +/**************************************************************************** +** +*F ErrorQuitIntSmallPos( ) . . . . . . . not a positive small integer +*/ +extern void ErrorQuitIntSmallPos ( + Obj obj ); + + +/**************************************************************************** +** +*F ErrorQuitBool( ) . . . . . . . . . . . . . . . . . . not a boolean +*/ +extern void ErrorQuitBool ( + Obj obj ); + + +/**************************************************************************** +** +*F ErrorQuitFunc( ) . . . . . . . . . . . . . . . . . not a function +*/ +extern void ErrorQuitFunc ( + Obj obj ); + + +/**************************************************************************** +** +*F ErrorQuitNrArgs( , ) . . . . . . . wrong number of arguments +*/ +extern void ErrorQuitNrArgs ( + Int narg, + Obj args ); + + /**************************************************************************** ** *F ErrorReturnObj( , , , ) . . print and return obj @@ -109,11 +165,6 @@ extern void ErrorReturnVoid ( SYS_CONST Char * msg2 ); -extern void InitGap ( - int * pargc, - char * argv [] ); - - /**************************************************************************** ** @@ -201,6 +252,77 @@ extern Obj DoCompleteXargs ( (Complete( BODY_FUNC(func) )) +/**************************************************************************** +** + +*F * * * * * * * * * * * * * important filters * * * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + +*V FN_IS_MUTABLE . . . . . . . . . . . . . . . filter number for `IsMutable' +*/ +#define FN_IS_MUTABLE 1 + + +/**************************************************************************** +** +*V FN_IS_EMPTY . . . . . . . . . . . . . . . . . filter number for `IsEmpty' +*/ +#define FN_IS_EMPTY 2 + + +/**************************************************************************** +** +*V FN_IS_SSORT . . . . . . . . . . . . . . filter number for `IsSSortedList' +*/ +#define FN_IS_SSORT 3 + + +/**************************************************************************** +** +*V FN_IS_NSORT . . . . . . . . . . . . . . filter number for `IsNSortedList' +*/ +#define FN_IS_NSORT 4 + + +/**************************************************************************** +** +*V FN_IS_DENSE . . . . . . . . . . . . . . . filter number for `IsDenseList' +*/ +#define FN_IS_DENSE 5 + + +/**************************************************************************** +** +*V FN_IS_NDENSE . . . . . . . . . . . . . filter number for `IsNDenseList' +*/ +#define FN_IS_NDENSE 6 + + +/**************************************************************************** +** +*V FN_IS_HOMOG . . . . . . . . . . . . filter number for `IsHomogeneousList' +*/ +#define FN_IS_HOMOG 7 + + +/**************************************************************************** +** +*V FN_IS_NHOMOG . . . . . . . . . filter number for `IsNonHomogeneousList' +*/ +#define FN_IS_NHOMOG 8 + + +/**************************************************************************** +** +*V FN_IS_TABLE . . . . . . . . . . . . . . . . . filter number for `IsTable' +*/ +#define FN_IS_TABLE 9 +#define LAST_FN FN_IS_TABLE + + /**************************************************************************** ** @@ -226,6 +348,38 @@ extern void ImportFuncFromLibrary( Obj * address ); +/**************************************************************************** +** +*V Revisions . . . . . . . . . . . . . . . . . . record of revision numbers +*/ +extern Obj Revisions; + + +/**************************************************************************** +** +*F SET_REVISION( , ) +*/ +#define SET_REVISION( file, revision ) \ + do { \ + extern SYS_CONST char * revision; \ + UInt rev_rnam; \ + Obj rev_str; \ + rev_rnam = RNamName(file); \ + C_NEW_STRING( rev_str, SyStrlen(revision), revision ); \ + RESET_FILT_LIST( rev_str, FN_IS_MUTABLE ); \ + AssPRec( Revisions, rev_rnam, rev_str ); \ + } while (0) + + +/**************************************************************************** +** +*F InitializeGap( , ) . . . . . . . . . . . . . . . . init GAP +*/ +extern void InitializeGap ( + int * pargc, + char * argv [] ); + + /**************************************************************************** ** diff --git a/src/gasman.c b/src/gasman.c index cd563d2e44..526f58075e 100644 --- a/src/gasman.c +++ b/src/gasman.c @@ -109,24 +109,24 @@ ** Therefore some bags may be kept by {\Gasman}, even though they are ** already dead. */ -char * Revision_gasman_c = +#include "system.h" /* Ints, UInts */ + +SYS_CONST char * Revision_gasman_c = "@(#)$Id$"; -#include "system.h" /* Ints, UInts */ - #define INCLUDE_DECLARATION_PART -#include "gasman.h" /* declaration part of the package */ +#include "gasman.h" /* garbage collector */ #undef INCLUDE_DECLARATION_PART #ifdef DEBUG_DEADSONS_BAGS -#include "objects.h" /* Obj */ -#include "scanner.h" /* Pr */ -#include "code.h" /* T_LVARS */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ +#include "code.h" /* coder */ #else #ifdef DEBUG_GLOBAL_BAGS -#include "objects.h" /* Obj */ -#include "scanner.h" /* Pr */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ #endif #endif @@ -198,7 +198,14 @@ char * Revision_gasman_c = ** number of bytes in this area excluding the first word itself. Note that ** such a body has no link word, because such a remainder does not ** correspond to a bag (see "Implementation of ResizeBag"). +** +** A masterpointer with a value congruent to 1 mod 4 is the relic of an +** object that was weakly but not strongly marked in a recent garbage +** collection. These persist until after the next full garbage collection +** by which time all references to them should have been removed. +** */ + #ifndef C_PLUS_PLUS_BAGS #define SIZE_MPTR_BAGS 1 #endif @@ -388,6 +395,8 @@ Bag MarkedBags; *V SizeLiveBags . . . . . . . total size of bags that survived the last gc *V NrDeadBags . . . . . . . number of bags that died since the last full gc *V SizeDeadBags . . . . total size of bags that died since the last full gc +*V NrHalfDeadBags . . . . . number of bags that died since the last full gc +** but may still be weakly pointed to */ UInt NrAllBags; UInt SizeAllBags; @@ -395,6 +404,7 @@ UInt NrLiveBags; UInt SizeLiveBags; UInt NrDeadBags; UInt SizeDeadBags; +UInt NrHalfDeadBags; /**************************************************************************** @@ -420,6 +430,36 @@ void InitMsgsFuncBags ( } +/**************************************************************************** +** +*F InitSweepFuncBags(,) . . . . install sweeping function +*/ + +TNumSweepFuncBags TabSweepFuncBags [ 256 ]; + + +void InitSweepFuncBags ( + UInt type, + TNumSweepFuncBags sweep_func ) +{ +#ifdef CHECK_FOR_CLASH_IN_INIT_SWEEP_FUNC + char str[256]; + + if ( TabSweepFuncBags[type] != 0 ) { + str[0] = 0; + SyStrncat( str, "warning: sweep function for type ", 33 ); + str[33] = '0' + ((type/100) % 10); + str[34] = '0' + ((type/ 10) % 10); + str[35] = '0' + ((type/ 1) % 10); + str[36] = 0; + SyStrncat( str, " already installed\n", 19 ); + SyFputs( str, 0 ); + } +#endif + TabSweepFuncBags[type] = sweep_func; +} + + /**************************************************************************** ** *F InitMarkFuncBags(,) . . . . . install marking function @@ -514,6 +554,24 @@ void MarkAllSubBagsDefault ( } + +void MarkBagWeakly( + Bag bag ) +{ + if ( (((UInt)bag) & (sizeof(Bag)-1)) == 0 /* really looks like a pointer */ + && (Bag)MptrBags <= bag /* in plausible range */ + && bag < (Bag)OldBags /* " " " */ + && YoungBags < PTR_BAG(bag) /* points to a young bag */ + && PTR_BAG(bag) <= AllocBags /* " " " " " */ + && IS_MARKED_DEAD(bag) ) /* and not marked already */ + { + PTR_BAG(bag)[-1] = MARKED_HALFDEAD(bag); /* mark it now as we + don't have to recurse */ + } +} + + + /**************************************************************************** ** *F CallbackForAllBags( ) call a C function on all non-zero mptrs @@ -528,7 +586,7 @@ void CallbackForAllBags( { Bag ptr; for (ptr = (Bag)MptrBags; ptr < (Bag)OldBags; ptr ++) - if (*ptr != 0) + if (*ptr != 0 && !IS_WEAK_DEAD_BAG(ptr) && (Bag)(*ptr) >= (Bag)OldBags) { (*func)(ptr); } @@ -550,11 +608,15 @@ TNumGlobalBags GlobalBags; ** it is used by 'CollectBags'. is also recorded to allow things to ** be matched up after loading a saved workspace. */ + +static UInt GlobalSortingStatus = 0; + +extern TNumAbortFuncBags AbortFuncBags; + void InitGlobalBag ( Bag * addr, SYS_CONST Char * cookie ) { - extern TNumAbortFuncBags AbortFuncBags; if ( GlobalBags.nr == NR_GLOBAL_BAGS ) { (*AbortFuncBags)( @@ -574,6 +636,147 @@ void InitGlobalBag ( GlobalBags.addr[GlobalBags.nr] = addr; GlobalBags.cookie[GlobalBags.nr] = cookie; GlobalBags.nr++; + GlobalSortingStatus = 0; +} + + + +static int IsLessGlobal( SYS_CONST Char *cookie1, + SYS_CONST Char *cookie2, + UInt byWhat) +{ + if (byWhat != 2) + { + (*AbortFuncBags)("can only sort globals by cookie"); + } + return SyStrcmp(cookie1, cookie2) < 0; +} + + + +void SortGlobals( UInt byWhat ) +{ + SYS_CONST Char *tmpcookie; + Bag * tmpaddr; + UInt len, h, i, k; + if (byWhat != 2) + { + (*AbortFuncBags)("can only sort globals by cookie"); + } + if (GlobalSortingStatus == byWhat) + return; + len = GlobalBags.nr; + h = 1; + while ( 9*h + 4 < len ) + { h = 3*h + 1; } + while ( 0 < h ) { + for ( i = h; i < len; i++ ) { + tmpcookie = GlobalBags.cookie[i]; + tmpaddr = GlobalBags.addr[i]; + k = i; + while ( h <= k && IsLessGlobal(tmpcookie, + GlobalBags.cookie[k-h], + byWhat)) + { + GlobalBags.cookie[k] = GlobalBags.cookie[k-h]; + GlobalBags.addr[k] = GlobalBags.addr[k-h]; + k -= h; + } + GlobalBags.cookie[k] = tmpcookie; + GlobalBags.addr[k] = tmpaddr; + } + h = h / 3; + } + GlobalSortingStatus = byWhat; + return; +} + + + +Bag * GlobalByCookie( + SYS_CONST Char * cookie ) +{ + UInt i,top,bottom,middle; + Int res; + if (GlobalSortingStatus != 2) + { + for (i = 0; i < GlobalBags.nr; i++) + { + if (SyStrcmp(cookie, GlobalBags.cookie[i]) == 0) + return GlobalBags.addr[i]; + } + return (Bag *)0L; + } + else + { + top = GlobalBags.nr; + bottom = 0; + while (top >= bottom) { + middle = (top + bottom)/2; + res = SyStrcmp(cookie,GlobalBags.cookie[middle]); + if (res < 0) + top = middle-1; + else if (res > 0) + bottom = middle+1; + else + return GlobalBags.addr[middle]; + } + return (Bag *)0L; + } +} + + +static Bag NextMptrRestoring; +extern TNumAllocFuncBags AllocFuncBags; + +void StartRestoringBags( UInt nBags, UInt maxSize) +{ + UInt target; + Bag *newmem; + target = nBags + (8*maxSize)/7; /* ideal workspace size */ + if ((EndBags - MptrBags) < target) + { + newmem = (*AllocFuncBags)(sizeof(Bag)*(target- (EndBags - MptrBags)), + 0); + if (newmem == 0) + { + target = nBags + maxSize; /* absolute requirement */ + if ((EndBags - MptrBags) < target) + (*AllocFuncBags)(sizeof(Bag)*(target- (EndBags - MptrBags)), 1); + } + EndBags += target; + } + OldBags = MptrBags + nBags + (EndBags - MptrBags - nBags - maxSize)/8; + AllocBags = OldBags; + NextMptrRestoring = (Bag)MptrBags; + return; +} + + +Bag NextBagRestoring( UInt sizetype) +{ + Bag bag; + *(Bag **)NextMptrRestoring = (AllocBags+2); + bag = NextMptrRestoring; + ((UInt *)AllocBags)[0] = sizetype; + ((Bag *)AllocBags)[1] = NextMptrRestoring; + NextMptrRestoring++; + AllocBags += WORDS_BAG(sizetype >> 8); + return bag; +} + +void FinishedRestoringBags( void ) +{ + Bag p; + YoungBags = AllocBags; + StopBags = AllocBags + AllocSizeBags; + if (StopBags > EndBags) + StopBags = EndBags; + FreeMptrBags = NextMptrRestoring; + for (p = NextMptrRestoring; p +1 < (Bag)OldBags; p++) + *(Bag *)p = p+1; + *p = 0; + return; } @@ -1029,12 +1232,16 @@ UInt ResizeBag ( ** ** 'CollectBags' is the function that does most of the work of {\Gasman}. ** -** A partial garbage collection where every bag is young is clearly a full -** garbage collection. So to perform a full garbage collection, -** 'CollectBags' first sets 'YoungBags' to 'OldBags', making every bag -** young, and empties the list of changed old bags, since there are no old -** bags anymore, there can be no changed old bags anymore. So from now on -** we can assume that 'CollectBags' is doing a partial garbage collection. +** A partial garbage collection where every bag is young is clearly a full +** garbage collection. So to perform a full garbage collection, +** 'CollectBags' first sets 'YoungBags' to 'OldBags', making every bag +** young, and empties the list of changed old bags, since there are no old +** bags anymore, there can be no changed old bags anymore. So from now on +** we can assume that 'CollectBags' is doing a partial garbage +** collection. In addition, the values 'NewWeakDeadBagMarker' and +** 'OldWeakDeadBagMarker' are exchanged, so that bag idnetifiers that have +** been halfdead since before this full garbage collection cab be +** distinguished from those which have died on this pass. ** ** Garbage collection is performed in three phases. The mark phase, the ** sweep phase, and the check phase. @@ -1110,35 +1317,37 @@ UInt ResizeBag ( ** identifier and thereby ensures that this bag will not be thrown away by ** this garbage collection. ** -** Next, 'CollectBags' marks all young bags that are *indirectly* +** Next, 'CollectBags' marks all young bags that are *indirectly* ** accessible, i.e., it marks the subbags of the already marked bags, their -** subbags and so on. It does so by walking along the list of already -** marked bags and applies the marking function of the appropriate type to -** each bag on this list (see "InitMarkFuncBags"). Those marking functions -** then apply 'MARK_BAG' to each identifier appearing in the bag. +** subbags and so on. It does so by walking along the list of already +** marked bags and applies the marking function of the appropriate type to +** each bag on this list (see "InitMarkFuncBags"). Those marking functions +** then apply 'MARK_BAG' or 'MarkBagWeakly' to each identifier appearing in +** the bag. ** -** After the marking function has been applied to a bag on the list of +** After the marking function has been applied to a bag on the list of ** marked bag, this bag is removed from the list. Thus the marking phase is -** over when the list of marked bags has become empty. Removing the bag -** from the list of marked bags must be done at this time, because newly +** over when the list of marked bags has become empty. Removing the bag +** from the list of marked bags must be done at this time, because newly ** marked bags are *prepended* to the list of marked bags. This is done to -** ensure that bags are marked in a depth first order, which should usually -** improve locality of reference. When a bag is taken from the list of +** ensure that bags are marked in a depth first order, which should usually +** improve locality of reference. When a bag is taken from the list of ** marked bags it is *tagged*. This tag serves two purposes. A bag that is ** tagged is not put on the list of marked bags when 'MARK_BAG' is applied -** to its identifier. This ensures that no bag is put more than once onto +** to its identifier. This ensures that no bag is put more than once onto ** the list of marked bags, otherwise endless marking loops could happen for -** structures that contain circular references. Also the sweep phase later -** uses the presence of the tag to decide if a bag is still live or already -** dead. 'CollectBags' tags a bag by putting the identifier of the bag plus -** 1 into the link word of the bag. Note that 'CollectBags' cannot put a -** random or magic value into the link word, because the sweep phase must be -** able to find the masterpointer of a bag by only looking at the link word -** of a bag. -** -** Thus after the mark phase the live bags have their identifier plus 1 in -** the link word. Conversely all bags that have their identifier in the -** link word are dead. +** structures that contain circular references. Also the sweep phase later +** uses the presence of the tag to decide the status of the bag. There are +** three possible statuses: LIVE, DEAD and HALFDEAD. The default state of a +** bag with its identifier in the link word, is the tag for DEAD. Live bags +** are tagged with MARKED_ALIVE() in the link word, and +** half-dead bags (ie bags pointed to weakly but not strongly) with the tage +** MARKED_HALFDEAD(). +** +** Note that 'CollectBags' cannot put a random or magic value into the link +** word, because the sweep phase must be able to find the masterpointer of a +** bag by only looking at the link word of a bag. This is done using the macros +** UNMARKED_XXX(). ** ** In the *sweep phase*, 'CollectBags' deallocates all dead bags and ** compacts the live bags at the beginning of the workspace. @@ -1153,22 +1362,25 @@ UInt ResizeBag ( ** this case 'CollectBags' simply moves the source pointer to the next body ** (see "Implementation of ResizeBag"). ** -** Otherwise, if the link word contains the identifier of the bag itself, -** which means that the masterpointer pointed to by the link word contains -** the address of the data area of the current body, this bag is dead. In -** this case 'CollectBags' first adds the masterpointer to the list of -** available masterpointers (see "FreeMptrBags") and then simply moves the +** +** Otherwise, if the link word contains the identifier of the bag itself, +** marked dead, 'CollectBags' first adds the masterpointer to the list of +** available masterpointers (see "FreeMptrBags") and then simply moves the ** source pointer to the next bag. ** -** Otherwise, if the link word contains the identifier of the bag plus 1, -** which means that the masterpointer *before* the one pointed to by the -** link word contains the address of the data area of the current body, this -** bag is still live. In this case 'CollectBags' copies the body from the -** source address to the destination address, stores the address of the -** masterpointer without the tag in the link word, and updates the -** masterpointer to point to the new address of the data area of the bag. -** After the copying the source pointer points to the next bag, and the -** destination pointer points just past the copy. +** Otherwise, if the link word contains the identifier of the bag marked +** alive, this bag is still live. In this case 'CollectBags' calls the +** sweeping function for this bag, if one is installed, or otherwise copies +** the body from the source address to the destination address, stores the +** address of the masterpointer without the tag in the link word, and +** updates the masterpointer to point to the new address of the data area of +** the bag. After the copying the source pointer points to the next bag, +** and the destination pointer points just past the copy. +** +** Finally, if the link word contains the identifier of the bag marked half +** dead, then 'CollectBags' puts the special value 'NewWeakDeadBagMarker' +** into the masterpointer corresponding to the bag, to signify that this bag +** has been collected as garbage. ** ** This is repeated until the source pointer reaches the end of the young ** bags area, i.e., reaches 'AllocBags'. @@ -1207,7 +1419,12 @@ UInt ResizeBag ( ** to get along with what it got. Also 'CollectBags' wants at least one ** masterpointer per 8 words of free storage available. If this is not the ** case, 'CollectBags' extends the masterpointer area by moving the bodies -** of all bags and readjusting the masterpointers. +** of all bags and readjusting the masterpointers. +** +** Also, after a full garbage collection, 'CollectBags' scans the +** masterpointer area for identifiers containing 'OldWeakDeadBagMarker'. If +** the sweep functions have done their work then no references to these bag +** identifiers can exist, and so 'CollectBags' frees these masterpointers. */ #include @@ -1267,6 +1484,17 @@ UInt FullBags; Bag OldMarkedBags; #endif +/* These are used to overwrite masterpointers which may still be +linked from weak pointer objects but whose bag bodies have been +collected. Two values are used so that old masterpointers of this +kind can be reclaimed after a full garbage collection. The values must +not look like valid pointers */ + +Bag * NewWeakDeadBagMarker = (Bag *)1L; +Bag * OldWeakDeadBagMarker = (Bag *)5L; + + + UInt CollectBags ( UInt size, UInt full ) @@ -1279,6 +1507,7 @@ UInt CollectBags ( UInt nrLiveBags; /* number of live new bags */ UInt sizeLiveBags; /* total size of live new bags */ UInt nrDeadBags; /* number of dead new bags */ + UInt nrHalfDeadBags; /* number of dead new bags */ UInt sizeDeadBags; /* total size of dead new bags */ UInt done; /* do we have to make a full gc */ UInt i; /* loop variable */ @@ -1288,6 +1517,10 @@ UInt CollectBags ( UInt pos; #endif +#ifdef DEBUG_MASTERPOINTERS + CheckMasterPointers(); +#endif + /* call the before function (if any) */ if ( BeforeCollectFuncBags != 0 ) (*BeforeCollectFuncBags)(); @@ -1311,6 +1544,16 @@ UInt CollectBags ( PTR_BAG(first)[-1] = first; } + /* Also time to change the tag for dead children of weak + pointer objects. After this collection, there can be no more + weak pointer objects pointing to anything with OldWeakDeadBagMarker + in it */ + { + Bag * t; + t = NewWeakDeadBagMarker; + OldWeakDeadBagMarker = NewWeakDeadBagMarker; + NewWeakDeadBagMarker = t; + } } /* information at the beginning of garbage collections */ @@ -1392,7 +1635,7 @@ UInt CollectBags ( while ( MarkedBags != 0 ) { first = MarkedBags; MarkedBags = PTR_BAG(first)[-1]; - PTR_BAG(first)[-1] = first + 1; + PTR_BAG(first)[-1] = MARKED_ALIVE(first); (*TabMarkFuncBags[TNUM_BAG(first)])( first ); nrLiveBags++; sizeLiveBags += SIZE_BAG(first); @@ -1423,20 +1666,48 @@ UInt CollectBags ( } - /* dead bag */ - else if ( PTR_BAG( src[1] ) == src+2 ) { + /* dead or half-dead (only weakly pointed to bag */ + /* here the usual check using UNMARKED_DEAD etc. is not + safe, because we are looking at the bag body rather + than its identifier, and a wrong guess for the bag + status can involve following a misaligned pointer. It + may cause bus errors or actual mistakes. + + Instead we look directly at the value in the link word + and check its least significant bits */ + + else if ( ((UInt)(src[1])) % sizeof(Bag) == 0 || + ((UInt)(src[1])) % sizeof(Bag) == 2 ) + { +#ifdef DEBUG_MASTERPOINTERS + if ( (((UInt)(src[1])) % sizeof(Bag) == 0 && + PTR_BAG( UNMARKED_DEAD(src[1]) ) != src+2) || + (((UInt)(src[1])) % sizeof(Bag) == 2 && + PTR_BAG( UNMARKED_HALFDEAD(src[1])) != src+2)) + { + (*AbortFuncBags)("incorrectly marked bag"); + } +#endif /* call freeing function */ if ( TabFreeFuncBags[ *(UInt*)src & 0xFFL ] != 0 ) - (*TabFreeFuncBags[ *(UInt*)src & 0xFFL ])( src[1] ); - + (*TabFreeFuncBags[ *(UInt*)src & 0xFFL ])( src[1] ); + /* advance src */ src += 2 + WORDS_BAG( *(UInt*)src >> 8 ) ; - - } + + } + /* live bag */ - else if ( PTR_BAG( src[1]-1 ) == src+2 ) { + else if ( ((UInt)(src[1])) % sizeof(Bag) == 1 ) + { +#ifdef DEBUG_MASTERPOINTERS + if ( PTR_BAG( UNMARKED_ALIVE(src[1]) ) != src+2 ) + { + (*AbortFuncBags)("incorrectly marked bag"); + } +#endif /* advance src */ src += 2 + WORDS_BAG( *(UInt*)src >> 8 ); @@ -1454,6 +1725,7 @@ UInt CollectBags ( /* sweep through the young generation */ nrDeadBags = 0; + nrHalfDeadBags = 0; sizeDeadBags = 0; dst = YoungBags; src = YoungBags; @@ -1469,7 +1741,15 @@ UInt CollectBags ( } /* dead bag */ - else if ( PTR_BAG( src[1] ) == src+2 ) { + + else if ( ((UInt)(src[1])) % sizeof(Bag) == 0 ) + { +#ifdef DEBUG_MASTERPOINTERS + if ( PTR_BAG( UNMARKED_DEAD(src[1]) ) != src+2 ) + { + (*AbortFuncBags)("incorrectly marked bag"); + } +#endif last = src; type = 'd'; /* update count */ @@ -1492,26 +1772,76 @@ UInt CollectBags ( } + /* half-dead bag */ + else if ( ((UInt)(src[1])) % sizeof(Bag) == 2 ) + { +#ifdef DEBUG_MASTERPOINTERS + if ( PTR_BAG( UNMARKED_HALFDEAD(src[1]) ) != src+2 ) + { + (*AbortFuncBags)("incorrectly marked bag"); + } +#endif + last = src; type = 'h'; + + /* update count */ + nrDeadBags += 1; + sizeDeadBags += (*(UInt*)src >> 8); + +#ifdef COUNT_BAGS + /* update the statistics */ + InfoBags[*(UInt*)src & 0xFFL].nrLive -= 1; + InfoBags[*(UInt*)src & 0xFFL].sizeLive + -= *(UInt*)src >> 8; +#endif + + /* don't free the identifier */ + if (((UInt)UNMARKED_HALFDEAD(src[1])) % 4 != 0) + (*AbortFuncBags)("align error in halfdead bag"); + + *(Bag**)(UNMARKED_HALFDEAD(src[1])) = NewWeakDeadBagMarker; + nrHalfDeadBags ++; + + /* advance src */ + src += 2 + WORDS_BAG( *(UInt*)src >> 8 ) ; + + } + /* live bag */ - else if ( PTR_BAG( src[1]-1 ) == src+2 ) { + else if ( ((UInt)(src[1])) % sizeof(Bag) == 1 ) + { +#ifdef DEBUG_MASTERPOINTERS + if ( PTR_BAG( UNMARKED_ALIVE(src[1]) ) != src+2 ) + { + (*AbortFuncBags)("incorrectly marked bag"); + } +#endif last = src; type = 'l'; /* update identifier, copy size-type and link field */ - PTR_BAG( src[1]-1 ) = dst+2; + PTR_BAG( UNMARKED_ALIVE(src[1])) = dst+2; end = src + 2 + WORDS_BAG( *(UInt*)src >> 8 ); *dst++ = *src++; - *dst++ = *src++ - 1; - - /* copy data area (if necessary) */ - if ( dst != src ) { + *dst++ = (Bag)UNMARKED_ALIVE(*src++); + + /* copy data area */ + if (TabSweepFuncBags[(UInt)(src[-2]) & 0xFFL] != 0) + { + /* Call the installed sweeping function */ + (*(TabSweepFuncBags[(UInt)(src[-2]) & 0xFFL]))(src,dst,end-src); + dst += end-src; + src = end; + + } + + /* Otherwise do the default thing */ + else if ( dst != src ) { while ( src < end ) - *dst++ = *src++; - } - else { + *dst++ = *src++; + } + else { dst = end; src = end; - } - + } } /* oops */ @@ -1534,6 +1864,7 @@ UInt CollectBags ( /* information after the sweep phase */ NrDeadBags += nrDeadBags; + NrHalfDeadBags += nrHalfDeadBags; if ( MsgsFuncBags ) (*MsgsFuncBags)( FullBags, 3, (FullBags ? NrDeadBags:nrDeadBags) ); @@ -1556,23 +1887,24 @@ UInt CollectBags ( /* maybe adjust the size of the allocation area */ if ( ! CacheSizeBags ) { - if ( nrLiveBags+nrDeadBags < 512 ) + if ( nrLiveBags+nrDeadBags +nrHalfDeadBags < 512 ) AllocSizeBags += 256*1024L; - else if ( 4096 < nrLiveBags+nrDeadBags + else if ( 4096 < nrLiveBags+nrDeadBags+nrHalfDeadBags && 256*1024L < AllocSizeBags ) AllocSizeBags -= 256*1024L; } else { if ( nrLiveBags+nrDeadBags < 512 ) AllocSizeBags += CacheSizeBags; - else if ( 4096 < nrLiveBags+nrDeadBags + else if ( 4096 < nrLiveBags+nrDeadBags+nrHalfDeadBags && CacheSizeBags < AllocSizeBags ) AllocSizeBags -= CacheSizeBags; } /* if we dont get enough free storage or masterpointers do full gc */ if ( EndBags < StopBags + WORDS_BAG(AllocSizeBags) - || (OldBags-MptrBags)-NrLiveBags < nrLiveBags+nrDeadBags+4096 ) { + || (OldBags-MptrBags)-(NrLiveBags + NrHalfDeadBags) + < nrLiveBags+nrDeadBags+nrHalfDeadBags+ 4096 ) { done = 0; } else { @@ -1584,6 +1916,15 @@ UInt CollectBags ( /* if we already performed a full garbage collection */ else { + /* Clean up old half-dead bags */ + for (p = MptrBags; p < OldBags; p+= SIZE_MPTR_BAGS) + if ((Bag *)*p == OldWeakDeadBagMarker) + { + *p = (Bag)FreeMptrBags; + FreeMptrBags = (Bag)p; + NrHalfDeadBags --; + } + /* get the storage we absolutly need */ while ( EndBags < StopBags && (*AllocFuncBags)(512*1024L,1) ) @@ -1624,7 +1965,7 @@ UInt CollectBags ( /* update the masterpointers */ for ( p = MptrBags; p < OldBags; p++ ) { - if ( (Bag)OldBags <= *p ) + if ( (Bag)OldBags <= *p) *p += i; } @@ -1674,11 +2015,38 @@ UInt CollectBags ( if ( AfterCollectFuncBags != 0 ) (*AfterCollectFuncBags)(); + +#ifdef DEBUG_MASTERPOINTERS + CheckMasterPointers(); +#endif + /* return success */ return 1; } +/**************************************************************************** +** +*F CheckMasterPointers() . . . . do consistency checks on the masterpointers +** +*/ + +void CheckMasterPointers( void ) +{ + Bag *ptr; + for (ptr = MptrBags; ptr < OldBags; ptr++) + { + if (*ptr != (Bag)0 && /* bottom of free chain */ + *ptr != (Bag)NewWeakDeadBagMarker && + *ptr != (Bag)OldWeakDeadBagMarker && + (((Bag *)*ptr < MptrBags && + (Bag *)*ptr > AllocBags) || + (UInt)(*ptr) % sizeof(Bag) != 0)) + (*AbortFuncBags)("Bad master pointer detected in check"); + } +} + + /**************************************************************************** ** *F SwapMasterPoint( , ) . . . swap pointer of and @@ -1734,7 +2102,8 @@ void SwapMasterPoint ( ** 'SET_ELM_BAG' are functions to support debugging. They are not intended ** to be used in an application using {\Gasman}. Note that the functions ** 'TNUM_BAG', 'SIZE_BAG', and 'PTR_BAG' shadow the macros of the same name, -** which are usually not available in a debugger. */ +** which are usually not available in a debugger. +*/ #ifdef DEBUG_FUNCTIONS_BAGS #undef TNUM_BAG @@ -1770,7 +2139,7 @@ UInt TNUM_BAG ( return (*(*(bag)-2) & 0xFFL); } -Char * TNAM_BAG ( +SYS_CONST Char * TNAM_BAG ( Bag bag ) { return InfoBags[ (*(*(bag)-2) & 0xFFL) ].name; diff --git a/src/gasman.h b/src/gasman.h index e71461ef45..3a8f340c63 100644 --- a/src/gasman.h +++ b/src/gasman.h @@ -32,7 +32,7 @@ ** happen to look like references. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_gasman_h = +SYS_CONST char * Revision_gasman_h = "@(#)$Id$"; #endif @@ -433,13 +433,22 @@ extern void SwapMasterPoint ( ** 'SizeDeadBags' and the total size of bags that have been found to be dead ** by this garbage collection. This value is used in the information ** message. +** +** 'NrHalfDeadBags' +** +** 'NrHalfDeadBags' is the number of bags that have been found to be +** reachable only by way of weak pointers since the last garbage collection. +** The bodies of these bags are deleted, but their identifiers are marked so +** that weak pointer objects can recognize this situation. */ + extern UInt NrAllBags; extern UInt SizeAllBags; extern UInt NrLiveBags; extern UInt SizeLiveBags; extern UInt NrDeadBags; extern UInt SizeDeadBags; +extern UInt NrHalfDeadBags; /**************************************************************************** @@ -595,6 +604,17 @@ extern void InitMsgsFuncBags ( ** Note that 'MARK_BAG' is a macro, so do not call it with an argument that ** has sideeffects. ** +** 'MarkBagWeakly( )' +** +** 'MarkBagWeakly' is an alternative to MARK_BAG, intended to be used by the +** marking functions of weak pointer objects. A bag which is marked both +** weakly and strongly is treated as strongly marked. A bag which is only +** weakly marked will be recovered by garbage collection, but its identifier +** remains, marked in a way which can be detected by +** "IS_WEAK_DEAD_BAG". Which should always be checked before copying or +** using such an identifier. +** +** ** {\Gasman} already provides the following marking functions. ** ** 'MarkNoSubBags( )' @@ -633,7 +653,7 @@ extern void InitMsgsFuncBags ( ** down 'CollectBags'. For example in {\GAP} bags for lists contain only ** bag identifiers for the elements of the list or 0 if an entry has no ** assigned value. -*/ +** */ typedef void (* TNumMarkFuncBags ) ( Bag bag ); @@ -653,18 +673,78 @@ extern void MarkTwoSubBags ( extern void MarkAllSubBags ( Bag bag ); +extern void MarkBagWeakly ( + Bag bag ); + extern Bag * MptrBags; extern Bag * OldBags; extern Bag * AllocBags; extern Bag MarkedBags; +#define MARKED_DEAD(x) (x) +#define MARKED_ALIVE(x) ((Bag)(((Char *)(x))+1)) +#define MARKED_HALFDEAD(x) ((Bag)(((Char *)(x))+2)) +#define IS_MARKED_ALIVE(bag) ((PTR_BAG(bag)[-1]) == MARKED_ALIVE(bag)) +#define IS_MARKED_DEAD(bag) ((PTR_BAG(bag)[-1]) == MARKED_DEAD(bag)) +#define IS_MARKED_HALFDEAD(bag) ((PTR_BAG(bag)[-1]) == MARKED_HALFDEAD(bag)) +#define UNMARKED_DEAD(x) (x) +#define UNMARKED_ALIVE(x) ((Bag)(((Char *)(x))-1)) +#define UNMARKED_HALFDEAD(x) ((Bag)(((Char *)(x))-2)) + + #define MARK_BAG(bag) \ if ( (((UInt)(bag)) & (sizeof(Bag)-1)) == 0 \ && (Bag)MptrBags <= (bag) && (bag) < (Bag)OldBags \ && YoungBags < PTR_BAG(bag) && PTR_BAG(bag) <= AllocBags \ - && PTR_BAG(bag)[-1] == (bag) ) { \ + && (IS_MARKED_DEAD(bag) || IS_MARKED_HALFDEAD(bag)) ) \ + { \ PTR_BAG(bag)[-1] = MarkedBags; MarkedBags = (bag); } +/**************************************************************************** +** +*F +*/ + +#define IS_WEAK_DEAD_BAG(bag) ( (((UInt)bag & (sizeof(Bag)-1)) == 0) && \ + (Bag)MptrBags <= (bag) && \ + (bag) < (Bag)OldBags && \ + (((UInt)*bag) & (sizeof(Bag)-1)) == 1) + + +/**************************************************************************** +** +*F InitSweepFuncBags(,) . . . . install sweeping function +** +** 'InitSweepFuncBags( , )' +** +** 'InitSweepFuncBags' installs the function as sweeping +** function for bags of type . +** +** A sweeping function is a function that takes two arguments src and dst of +** type Bag *, and a third, length of type UInt, and returns nothing. When +** it is called, src points to the start of the data area of one bag, and +** dst to another. The function should copy the data from the source bag to +** the destination, making any appropriate changes. +** +** Those functions are applied during the garbage collection to each marked +** bag, i.e., bags that are assumed to be still live to move them to their +** new position. The intended use is for weak pointer bags, which must +** remove references to identifiers of any half-dead objects. +** +** If no function is installed for a Tnum, then the data is simply copied +** unchanged and this is done particularly quickly +*/ + +typedef void (* TNumSweepFuncBags ) ( + Bag * src, + Bag * dst, + UInt length); + +extern void InitSweepFuncBags ( + UInt tnum, + TNumSweepFuncBags sweep_func ); + + /**************************************************************************** ** @@ -883,9 +963,10 @@ extern void InitBags ( ** *F CallbackForAllBags( ) call a C function on all non-zero mptrs ** -** This calls a C function on every bag, including garbage ones, by simply -** walking the masterpointer area. Not terribly safe -** +** This calls a C function on every bag, including ones that are not +** reachable from the root, and will be deleted at the next garbage +** collection, by simply walking the masterpointer area. Not terribly safe +** */ extern void CallbackForAllBags( diff --git a/src/gvars.c b/src/gvars.c index 04203bcfcf..cb9e81eb62 100644 --- a/src/gvars.c +++ b/src/gvars.c @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A gvars.c GAP source Martin Schoenert +*W gvars.c GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -25,33 +25,37 @@ ** only reference the same value as the global variable if it is a function. ** Otherwise the internal copies reference functions that signal an error. */ -char * Revision_gvars_c = +#include "system.h" /* Ints, UInts */ + +SYS_CONST char * Revision_gvars_c = "@(#)$Id$"; -#include "system.h" /* Ints, UInts */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ -#include "gasman.h" /* NewBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, SIZE_OBJ, ... */ +#include "scanner.h" /* scanner */ -#include "scanner.h" /* Pr */ +#include "gap.h" /* error handling, initialisation */ #define INCLUDE_DECLARATION_PART -#include "gvars.h" /* declaration part of the package */ +#include "gvars.h" /* global variables */ #undef INCLUDE_DECLARATION_PART -#include "calls.h" /* CALL_1ARGS, Function */ +#include "calls.h" /* generic call mechanism */ -#include "lists.h" /* LEN_LIST, ELM_LIST, ShallowCopy */ +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ -#include "plist.h" /* LEN_PLIST, SET_LEN_PLIST, ... */ -#include "string.h" /* IsString */ +#include "lists.h" /* generic lists */ -#include "gap.h" /* Error */ +#include "plist.h" /* plain lists */ +#include "string.h" /* strings */ -#include "bool.h" +#include "bool.h" /* booleans */ /**************************************************************************** ** + *V ValGVars . . . . . . . . . . . . . . . . . . values of global variables *V PtrGVars . . . . . . . . . . . . . pointer to values of global variables ** @@ -64,9 +68,9 @@ char * Revision_gvars_c = ** 'PtrGVars' must be revalculated afterwards. This should be done by a ** function in this package, but is still done in 'VarsAfterCollectBags'. */ -Obj ValGVars; +Obj ValGVars; -Obj * PtrGVars; +Obj * PtrGVars; /**************************************************************************** @@ -226,12 +230,12 @@ void AssGVar ( /* assign name to a function */ if ( val != 0 && TNUM_OBJ(val) == T_FUNCTION && NAME_FUNC(val) == 0 ) { - name = NameGVar(gvar); - onam = NEW_STRING(SyStrlen(name)); - SyStrncat( CSTR_STRING(onam), name, SyStrlen(name) ); - RetypeBag( onam, IMMUTABLE_TNUM(TNUM_OBJ(onam)) ); - NAME_FUNC(val) = onam; - CHANGED_BAG(val); + name = NameGVar(gvar); + onam = NEW_STRING(SyStrlen(name)); + SyStrncat( CSTR_STRING(onam), name, SyStrlen(name) ); + RESET_FILT_LIST( onam, FN_IS_MUTABLE ); + NAME_FUNC(val) = onam; + CHANGED_BAG(val); } } @@ -327,6 +331,7 @@ UInt GVarName ( SyStrncat( namx, name, 1023 ); string = NEW_STRING( SyStrlen(namx) ); SyStrncat( CSTR_STRING(string), namx, SyStrlen(namx) ); + RESET_FILT_LIST( string, FN_IS_MUTABLE ); GROW_PLIST( ValGVars, CountGVars ); SET_LEN_PLIST( ValGVars, CountGVars ); SET_ELM_PLIST( ValGVars, CountGVars, 0 ); @@ -387,29 +392,46 @@ typedef struct { Obj * copy; UInt isFopy; Char * name; -} TNumCopyGVar; +} TypeCopyGVar; #ifndef MAX_COPY_AND_FOPY_GVARS #define MAX_COPY_AND_FOPY_GVARS 20000 #endif -static TNumCopyGVar CopyAndFopyGVars[MAX_COPY_AND_FOPY_GVARS]; +static TypeCopyGVar CopyAndFopyGVars[MAX_COPY_AND_FOPY_GVARS]; static NCopyAndFopyGVars = 0; /**************************************************************************** ** -*F InitCopyGVar(,) . . . . declare C variable as copy of global +*F InitCopyGVar(,) . . . . declare C variable as copy of global ** ** 'InitCopyGVar' makes the C variable at address a copy of -** . +** the global variable named (which must be a kernel string). +** +** Unfortunately it does so by storing in place of a bag identifier +** in a PLIST. This is OK for garbage collection, but a real problem for saving +** in any event, this information does not really want to be saved because it is +** kernel centred rather than workspace centred. +** +** Accordingly we provide two functions +** +*F RemoveCopyFopyInfo( ) . . . remove the information about copies of gvars from +** the workspace +*F RestoreCopyFopyInfo( ) . . restore this information from the copy in the kernel +** +** The Restore function is also intended to be used after loading a saved workspace +** */ -void InitCopyGVar ( - UInt gvar, +void InitCopyGVar ( + Char * name , Obj * copy ) { Obj cops; /* copies list */ UInt ncop; /* number of copies */ + UInt gvar; + + gvar = GVarName(name); /* get the copies list and its length */ if ( ELM_PLIST( CopiesGVars, gvar ) != 0 ) { @@ -439,30 +461,82 @@ void InitCopyGVar ( } CopyAndFopyGVars[NCopyAndFopyGVars].copy = copy; CopyAndFopyGVars[NCopyAndFopyGVars].isFopy = 0; - CopyAndFopyGVars[NCopyAndFopyGVars].name = NameGVar(gvar); + CopyAndFopyGVars[NCopyAndFopyGVars].name = name; NCopyAndFopyGVars++; } +void RemoveCopyFopyInfo( void ) +{ + UInt i,l; + l = LEN_PLIST(CopiesGVars); + for (i = 1; i <= l; i++) + SET_ELM_PLIST( CopiesGVars, i, 0); + l = LEN_PLIST(FopiesGVars); + for (i = 1; i <= l; i++) + SET_ELM_PLIST( FopiesGVars, i, 0); + return; +} + +void RestoreCopyFopyInfo( void ) +{ + UInt i; + UInt gvar; + Obj thelist; + Obj cops; + UInt ncop; + + for (i = 0; i < NCopyAndFopyGVars; i++) + { + /* get the copies list and its length */ + gvar = GVarName( CopyAndFopyGVars[i].name); + thelist = CopyAndFopyGVars[i].isFopy ? FopiesGVars : CopiesGVars; + if ( ELM_PLIST( thelist , gvar ) != 0 ) + { + cops = ELM_PLIST( thelist, gvar ); + } + else + { + cops = NEW_PLIST( T_PLIST, 0 ); + SET_ELM_PLIST( thelist, gvar, cops ); + CHANGED_BAG(thelist); + } + ncop = LEN_PLIST(cops); + /* append the copy to the copies list */ + GROW_PLIST( cops, ncop+1 ); + SET_LEN_PLIST( cops, ncop+1 ); + SET_ELM_PLIST( cops, ncop+1, (Obj)CopyAndFopyGVars[i].copy ); + CHANGED_BAG(cops); + + /* now copy the value of to */ + *CopyAndFopyGVars[i].copy = VAL_GVAR(gvar); + } + return; +} + /**************************************************************************** ** -*F InitFopyGVar(,) . . . . declare C variable as copy of global -** -** 'InitFopyGVar' makes the C variable at address a (function) -** copy of . That means that whenever the value of is a -** function, then will reference the same value (i.e., will hold the -** same bag identifier). When the value of is not a function, then -** will reference a function that signals the error `` must be -** a function''. When has no assigned value, then will -** reference a function that signals the error `` must have an -** assigned value''. +*F InitFopyGVar(,) . . . . declare C variable as copy of global +** +** 'InitFopyGVar' makes the C variable at address a +** (function) copy of the global variable , whose name is +** . That means that whenever the value of is a +** function, then will reference the same value (i.e., will +** hold the same bag identifier). When the value of is not a +** function, then will reference a function that signals the +** error `` must be a function''. When has no assigned +** value, then will reference a function that signals the +** error `` must have an assigned value''. */ -void InitFopyGVar ( - UInt gvar, +void InitFopyGVar ( + Char * name, Obj * copy ) { Obj cops; /* copies list */ UInt ncop; /* number of copies */ + UInt gvar; + + gvar = GVarName(name); /* get the copies list and its length */ if ( ELM_PLIST( FopiesGVars, gvar ) != 0 ) { @@ -500,7 +574,7 @@ void InitFopyGVar ( } CopyAndFopyGVars[NCopyAndFopyGVars].copy = copy; CopyAndFopyGVars[NCopyAndFopyGVars].isFopy = 1; - CopyAndFopyGVars[NCopyAndFopyGVars].name = NameGVar(gvar); + CopyAndFopyGVars[NCopyAndFopyGVars].name = name; NCopyAndFopyGVars++; } @@ -522,8 +596,6 @@ UInt Tilde; ** *F MakeReadOnlyGVar( ) . . . . . . make a global variable read only */ -Obj MakeReadOnlyGVarFunc; - void MakeReadOnlyGVar ( UInt gvar ) { @@ -551,7 +623,7 @@ Obj MakeReadOnlyGVarHandler ( while ( ! IsStringConv( name ) ) { name = ErrorReturnObj( "MakeReadOnlyGVar: must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(name)].name), 0L, + (Int)TNAM_OBJ(name), 0L, "you can return a string for " ); } @@ -567,8 +639,6 @@ Obj MakeReadOnlyGVarHandler ( ** *F MakeReadWriteGVar( ) . . . . . . make a global variable read write */ -Obj MakeReadWriteGVarFunc; - void MakeReadWriteGVar ( UInt gvar ) { @@ -596,7 +666,7 @@ Obj MakeReadWriteGVarHandler ( while ( ! IsStringConv( name ) ) { name = ErrorReturnObj( "MakeReadWriteGVar: must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(name)].name), 0L, + (Int)TNAM_OBJ(name), 0L, "you can return a string for " ); } @@ -649,7 +719,7 @@ Obj AUTOHandler ( while ( TNUM_OBJ(func) != T_FUNCTION ) { func = ErrorReturnObj( "AUTO: must be a function (not a %s)", - (Int)(InfoBags[TNUM_OBJ(func)].name), 0L, + (Int)TNAM_OBJ(func), 0L, "you can return a function for " ); } @@ -668,7 +738,7 @@ Obj AUTOHandler ( while ( ! IsStringConv(name) ) { name = ErrorReturnObj( "AUTO: must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(name)].name), 0L, + (Int)TNAM_OBJ(name), 0L, "you can return a string for " ); } gvar = GVarName( CSTR_STRING(name) ); @@ -765,7 +835,7 @@ Obj FuncASS_GVAR ( while ( ! IsStringConv( gvar ) ) { gvar = ErrorReturnObj( "READ: must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(gvar)].name), 0L, + (Int)TNAM_OBJ(gvar), 0L, "you can return a string for " ); } @@ -786,7 +856,7 @@ Obj FuncISB_GVAR ( while ( ! IsStringConv( gvar ) ) { gvar = ErrorReturnObj( "READ: must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(gvar)].name), 0L, + (Int)TNAM_OBJ(gvar), 0L, "you can return a string for " ); } @@ -794,82 +864,132 @@ Obj FuncISB_GVAR ( } +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + +*F SetupGVars() . . . . . . . . . . initialize the global variables package +*/ +void SetupGVars ( void ) +{ +} + + /**************************************************************************** ** *F InitGVars() . . . . . . . . . . . initialize the global variables package ** ** 'InitGVars' initializes the global variables package. */ -void InitGVars ( void ) +void InitGVars ( void ) { /* make the error functions for 'AssGVar' */ - InitGlobalBag( &ErrorMustEvalToFuncFunc, "gvars: error function 1" ); - InitHandlerFunc( ErrorMustEvalToFuncHandler, - "error must evaluate to a function"); - ErrorMustEvalToFuncFunc = NewFunctionC( "ErrorMustEvalToFunc", -1L,"args", - ErrorMustEvalToFuncHandler ); + InitGlobalBag( &ErrorMustEvalToFuncFunc, "src/gvars.c:ErrorMustEvalToFuncFunc" ); + InitHandlerFunc( ErrorMustEvalToFuncHandler, "src/gvars.c:ErrorMustEvalToFuncHandler" ); + if ( ! SyRestoring ) { + ErrorMustEvalToFuncFunc = NewFunctionC( + "ErrorMustEvalToFunc", -1,"args", ErrorMustEvalToFuncHandler ); + } - InitGlobalBag( &ErrorMustHaveAssObjFunc, "gvars: error function 2" ); - InitHandlerFunc( ErrorMustHaveAssObjHandler, - "error must have associated object"); - ErrorMustHaveAssObjFunc = NewFunctionC( "ErrorMustHaveAssObj", -1L,"args", - ErrorMustHaveAssObjHandler ); + InitGlobalBag( &ErrorMustHaveAssObjFunc, "src/gvars.c:ErrorMustHaveAssObjFunc" ); + InitHandlerFunc( ErrorMustHaveAssObjHandler, "src/gvars.c:ErrorMustHaveAssObjHandler" ); + if ( ! SyRestoring ) { + ErrorMustHaveAssObjFunc = NewFunctionC( + "ErrorMustHaveAssObj", -1L,"args", ErrorMustHaveAssObjHandler ); + } + /* make the lists for global variables */ CountGVars = 0; - InitGlobalBag( &ValGVars, "gvars: values" ); - ValGVars = NEW_PLIST( T_PLIST, 0 ); - SET_LEN_PLIST( ValGVars, 0 ); + InitGlobalBag( &ValGVars, "src/gvars.c:ValGVars" ); + if ( 1 || ! SyRestoring ) { + ValGVars = NEW_PLIST( T_PLIST, 0 ); + SET_LEN_PLIST( ValGVars, 0 ); + } PtrGVars = ADDR_OBJ( ValGVars ); - InitGlobalBag( &NameGVars, "gvars: names" ); - NameGVars = NEW_PLIST( T_PLIST, 0 ); - SET_LEN_PLIST( NameGVars, 0 ); - InitGlobalBag( &WriteGVars, "gvars: writable flags" ); - WriteGVars = NEW_PLIST( T_PLIST, 0 ); - SET_LEN_PLIST( WriteGVars, 0 ); - InitGlobalBag( &ExprGVars, "gvars: expressions for AUTO" ); - ExprGVars = NEW_PLIST( T_PLIST, 0 ); - SET_LEN_PLIST( ExprGVars, 0 ); - InitGlobalBag( &CopiesGVars, "gvars: kernel copies" ); - CopiesGVars = NEW_PLIST( T_PLIST, 0 ); - SET_LEN_PLIST( CopiesGVars, 0 ); - InitGlobalBag( &FopiesGVars, "gvars: kernel fopies" ); - FopiesGVars = NEW_PLIST( T_PLIST, 0 ); - SET_LEN_PLIST( FopiesGVars, 0 ); + + InitGlobalBag( &NameGVars, "src/gvars.c:NameGVars" ); + if ( 1 || ! SyRestoring ) { + NameGVars = NEW_PLIST( T_PLIST, 0 ); + SET_LEN_PLIST( NameGVars, 0 ); + } + + InitGlobalBag( &WriteGVars, "src/gvars.c:WriteGVars" ); + if ( 1 || ! SyRestoring ) { + WriteGVars = NEW_PLIST( T_PLIST, 0 ); + SET_LEN_PLIST( WriteGVars, 0 ); + } + + InitGlobalBag( &ExprGVars, "src/gvars.c:ExprGVars" ); + if ( 1 || ! SyRestoring ) { + ExprGVars = NEW_PLIST( T_PLIST, 0 ); + SET_LEN_PLIST( ExprGVars, 0 ); + } + + InitGlobalBag( &CopiesGVars, "src/gvars.c:CopiesGVars" ); + if ( 1 || ! SyRestoring ) { + CopiesGVars = NEW_PLIST( T_PLIST, 0 ); + SET_LEN_PLIST( CopiesGVars, 0 ); + } + + InitGlobalBag( &FopiesGVars, "src/gvars.c:FopiesGVars" ); + if ( 1 || ! SyRestoring ) { + FopiesGVars = NEW_PLIST( T_PLIST, 0 ); + SET_LEN_PLIST( FopiesGVars, 0 ); + } + /* make the list of global variables */ - SizeGVars = 997; - InitGlobalBag( &TableGVars, "gvars: hash tables" ); - TableGVars = NEW_PLIST( T_PLIST, SizeGVars ); - SET_LEN_PLIST( TableGVars, SizeGVars ); + InitGlobalBag( &TableGVars, "src/gvars.c:TableGVars" ); + if ( 1 || ! SyRestoring ) { + SizeGVars = 997; + TableGVars = NEW_PLIST( T_PLIST, SizeGVars ); + SET_LEN_PLIST( TableGVars, SizeGVars ); + } + else { + SizeGVars = LEN_PLIST( TableGVars ); + } + /* create the global variable '~' */ Tilde = GVarName( "~" ); + /* install the functions 'MakeReadOnlyGVar' and 'MakeReadWriteGVar' */ - InitHandlerFunc( MakeReadOnlyGVarHandler, "make gvar read only"); - MakeReadOnlyGVarFunc = NewFunctionC( "MakeReadOnlyGVar", 1L, "name", - MakeReadOnlyGVarHandler ); - AssGVar( GVarName( "MakeReadOnlyGVar" ), MakeReadOnlyGVarFunc ); - - InitHandlerFunc( MakeReadWriteGVarHandler, "make gvar read write"); - MakeReadWriteGVarFunc = NewFunctionC( "MakeReadWriteGVar", 1L, "name", - MakeReadWriteGVarHandler ); - AssGVar( GVarName( "MakeReadWriteGVar" ), MakeReadWriteGVarFunc ); + C_NEW_GVAR_FUNC( "MakeReadOnlyGVar", 1, "name", + MakeReadOnlyGVarHandler, + "src/gap.c:MakeReadOnlyGVar" ); + + C_NEW_GVAR_FUNC( "MakeReadWriteGVar", 1, "name", + MakeReadWriteGVarHandler, + "src/gap.c:MakeReadWriteGVar" ); + /* install the function 'AUTO' */ - InitHandlerFunc( AUTOHandler, "AUTO"); - AUTOFunc = NewFunctionC( "AUTO", -1L, "args", AUTOHandler ); - AssGVar( GVarName( "AUTO" ), AUTOFunc ); + C_NEW_GVAR_FUNC( "AUTO", -1, "args", + AUTOHandler, + "src/gap.c:AUTO" ); + + /* list of all global variable names */ C_NEW_GVAR_FUNC( "IDENTS_GVAR", 0L, "", FuncIDENTS_GVAR, "src/gap.c:IDENTS_GVAR" ); + + /* test if global variable is bound */ C_NEW_GVAR_FUNC( "ISB_GVAR", 1L, "gvar", FuncISB_GVAR, "src/gap.c:ISB_GVAR" ); + + /* assign global variable */ C_NEW_GVAR_FUNC( "ASS_GVAR", 2L, "gvar, value", FuncASS_GVAR, "src/gap.c:ASS_GVAR" ); @@ -877,4 +997,19 @@ void InitGVars ( void ) } +/**************************************************************************** +** +*F CheckGVars() . check the initialisation of the global variables package +*/ +void CheckGVars ( void ) +{ + SET_REVISION( "gvars_c", Revision_gvars_c ); + SET_REVISION( "gvars_h", Revision_gvars_h ); +} + +/**************************************************************************** +** + +*E gvars.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/gvars.h b/src/gvars.h index 531cff3711..3a11f0bd7a 100644 --- a/src/gvars.h +++ b/src/gvars.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A gvars.h GAP source Martin Schoenert +*W gvars.h GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -25,13 +25,14 @@ ** Otherwise the internal copies reference functions that signal an error. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_gvars_h = +SYS_CONST char * Revision_gvars_h = "@(#)$Id$"; #endif /**************************************************************************** ** + *V ValGVars . . . . . . . . . . . . . . . . . . values of global variables *V PtrGVars . . . . . . . . . . . . . pointer to values of global variables ** @@ -134,11 +135,23 @@ extern UInt GVarName ( ** ** 'InitCopyGVar' makes the C variable at address a copy of ** . +** +*F RemoveCopyFopyInfo( ) . . . remove the information about copies of gvars from +** the workspace +*F RestoreCopyFopyInfo( ) . . restore this information from the copy in the kernel +** +** The Restore function is also intended to be used after loading a saved workspace +** */ + extern void InitCopyGVar ( - UInt gvar, + Char * name, Obj * copy ); +extern void RemoveCopyFopyInfo( void ); + +extern void RestoreCopyFopyInfo( void ); + /**************************************************************************** ** @@ -153,9 +166,10 @@ extern void InitCopyGVar ( ** reference a function that signals the error `` must have an ** assigned value''. */ -extern void InitFopyGVar ( - UInt gvar, - Obj * copy ); + +extern void InitFopyGVar ( + Char * name, + Obj * copy ); /**************************************************************************** @@ -197,13 +211,121 @@ extern void MakeReadOnlyGVar ( UInt gvar ); +/**************************************************************************** +** + +*F * * * * * * * * * * * * * create a new gvars * * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + +*F C_NEW_GVAR_FUNC( , , , , ) +*/ +#define C_NEW_GVAR_FUNC( name, nargs, nams, hdlr, cookie ) \ + do { \ + InitHandlerFunc( hdlr, cookie ); \ + if ( ! SyRestoring ) \ + AssGVar( GVarName(name), NewFunctionC( name, nargs, nams, hdlr ) ); \ + MakeReadOnlyGVar( GVarName(name) ); \ + } while (0) + + +/**************************************************************************** +** +*F C_NEW_GVAR_ATTR( , , , , ) +** +** WARNING: must *always* be a global C variable never a local one. +*/ +#define C_NEW_GVAR_ATTR( name, nams, attr, hdlr, cookie ) \ + do { \ + InitHandlerFunc( hdlr, cookie ); \ + InitFopyGVar( name, &attr ); \ + if ( ! SyRestoring ) \ + AssGVar( GVarName(name), NewAttributeC( name, 1L, nams, hdlr ) ); \ + MakeReadOnlyGVar( GVarName(name) ); \ + } while (0) + + +/**************************************************************************** +** +*F C_NEW_GVAR_PROP( , , , , ) +** +** WARNING: must *always* be a global C variable never a local one. +*/ +#define C_NEW_GVAR_PROP( name, nams, attr, hdlr, cookie ) \ + do { \ + InitHandlerFunc( hdlr, cookie ); \ + InitFopyGVar( name, &attr ); \ + if ( ! SyRestoring ) \ + AssGVar( GVarName(name), NewPropertyC( name, 1L, nams, hdlr ) ); \ + MakeReadOnlyGVar( GVarName(name) ); \ + } while (0) + + +/**************************************************************************** +** +*F C_NEW_GVAR_OPER( , , , , , ) +** +** WARNING: must *always* be a global C variable never a local one. +*/ +#define C_NEW_GVAR_OPER( name, nargs, nams, oper, hdlr, cookie ) \ + do { \ + InitHandlerFunc( hdlr, cookie ); \ + InitFopyGVar( name, &oper ); \ + if ( ! SyRestoring ) \ + AssGVar( GVarName(name), NewOperationC( name, nargs, nams, hdlr ) ); \ + MakeReadOnlyGVar( GVarName(name) ); \ + } while (0) + + +/**************************************************************************** +** +*F C_NEW_GVAR_FILT( , , , , ) +*/ +#define C_NEW_GVAR_FILT( name, nams, filt, hdlr, cookie ) \ + do { \ + InitHandlerFunc( hdlr, cookie ); \ + InitFopyGVar( name, &filt ); \ + if ( ! SyRestoring ) \ + AssGVar( GVarName(name), NewFilterC( name, 1L, nams, hdlr ) ); \ + MakeReadOnlyGVar( GVarName(name) ); \ + } while (0) + + +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + +*F SetupGVars() . . . . . . . . . . initialize the global variables package +*/ +extern void SetupGVars ( void ); + + /**************************************************************************** ** *F InitGVars() . . . . . . . . . . . initialize the global variables package ** ** 'InitGVars' initializes the global variables package. */ -extern void InitGVars ( void ); +extern void InitGVars ( void ); +/**************************************************************************** +** +*F CheckGVars() . check the initialisation of the global variables package +*/ +extern void CheckGVars ( void ); + +/**************************************************************************** +** + +*E gvars.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/integer.c b/src/integer.c index 0013aa41a4..aa0da07cc2 100644 --- a/src/integer.c +++ b/src/integer.c @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A integer.c GAP source Martin Schoenert +*W integer.c GAP source Martin Schoenert ** & Alice Niemeyer ** & Werner Nickel ** @@ -81,33 +81,42 @@ ** Base 10000 would have the advantage that printing is very much easier, ** but 'PrInt' keeps a terminal at 9600 baud busy for almost all integers. */ -char * Revision_integer_c = - "@(#)$Id$"; - #include "system.h" /* Ints, UInts */ -#include "gasman.h" /* NewBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, types */ -#include "scanner.h" /* Pr */ +SYS_CONST char * Revision_integer_c = + "@(#)$Id$"; + +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ -#include "gvars.h" /* AssGVar, GVarName */ +#include "gvars.h" /* global variables */ -#include "calls.h" /* NewFunctionC */ -#include "opers.h" /* NewFilterC */ +#include "calls.h" /* generic call mechanism */ +#include "opers.h" /* generic operations */ -#include "ariths.h" /* generic operations package */ +#include "ariths.h" /* basic arithmetic */ -#include "bool.h" /* True, False */ +#include "bool.h" /* booleans */ #define INCLUDE_DECLARATION_PART -#include "integer.h" /* declaration part of the package */ +#include "integer.h" /* integers */ #undef INCLUDE_DECLARATION_PART -#include "gap.h" /* Error */ +#include "gap.h" /* error handling, initialisation */ + +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ + +#include "lists.h" /* generic lists */ +#include "string.h" /* strings */ + +#include "saveload.h" /* saving and loading */ /**************************************************************************** ** + *T TypDigit . . . . . . . . . . . . . . . . . . . . type of a single digit ** ** 'TypDigit' is the type of a single digit of an arbitrary size integer. @@ -115,9 +124,18 @@ char * Revision_integer_c = ** ** 'TypDigit' is defined in the declaration file of the package as follows: ** +#ifdef SYS_IS_64_BIT +typedef UInt4 TypDigit; +#else typedef UInt2 TypDigit; +#endif +#define NR_DIGIT_BITS (8 * sizeof(TypDigit)) +#define INTBASE (1L << NR_DIGIT_BITS) +#define NR_SMALL_INT_BITS (2*NR_DIGIT_BITS - 4) */ + + #define SIZE_INT(op) (SIZE_OBJ(op) / sizeof(TypDigit)) #define ADDR_INT(op) ((TypDigit*)ADDR_OBJ(op)) @@ -517,7 +535,7 @@ Obj SumInt ( /* propagate the carry, this loop is almost never executed */ for ( k=(SIZE_INT(opL)-SIZE_INT(opR))/4; - k!=0 && (c>>NR_DIGIT_BITS)!=0; k-- ) { + k!=0 && (c>>NR_DIGIT_BITS)!=0; k-- ) { c = (Int)*l++ + (c>>NR_DIGIT_BITS); *s++ = c; c = (Int)*l++ + (c>>NR_DIGIT_BITS); *s++ = c; c = (Int)*l++ + (c>>NR_DIGIT_BITS); *s++ = c; @@ -587,9 +605,9 @@ Obj AInvInt ( /* special case (ugh) */ if ( TNUM_OBJ(op) == T_INTPOS && SIZE_INT(op) == 4 && ADDR_INT(op)[3] == 0 - && ADDR_INT(op)[2] == 0 + && ADDR_INT(op)[2] == 0 && ADDR_INT(op)[1] == (1L<<(NR_SMALL_INT_BITS-NR_DIGIT_BITS)) - && ADDR_INT(op)[0] == 0 ) { + && ADDR_INT(op)[0] == 0 ) { inv = INTOBJ_INT( -(1L<>NR_DIGIT_BITS)!=0; k-- ) { + k!=0 && (c>>NR_DIGIT_BITS)!=0; k-- ) { c = (Int)*l++ + (c>>NR_DIGIT_BITS); *d++ = c; c = (Int)*l++ + (c>>NR_DIGIT_BITS); *d++ = c; c = (Int)*l++ + (c>>NR_DIGIT_BITS); *d++ = c; @@ -906,13 +924,13 @@ Obj ProdInt ( /* multiply digitwise */ c = (Int)(TypDigit)i * (TypDigit)k; p[0] = c; c = (Int)(TypDigit)i * (k>>NR_DIGIT_BITS) - + (c>>NR_DIGIT_BITS); p[1] = c; + + (c>>NR_DIGIT_BITS); p[1] = c; p[2] = c>>NR_DIGIT_BITS; c = (Int)(TypDigit)(i>>NR_DIGIT_BITS) * (TypDigit)k - + p[1]; p[1] = c; + + p[1]; p[1] = c; c = (Int)(TypDigit)(i>>NR_DIGIT_BITS) * (TypDigit)(k>>NR_DIGIT_BITS) - + p[2] + (c>>NR_DIGIT_BITS); p[2] = c; + + p[2] + (c>>NR_DIGIT_BITS); p[2] = c; p[3] = c>>NR_DIGIT_BITS; } @@ -938,9 +956,9 @@ Obj ProdInt ( if ( i == -1 && TNUM_OBJ(opR) == T_INTPOS && SIZE_INT(opR) == 4 && ADDR_INT(opR)[3] == 0 - && ADDR_INT(opR)[2] == 0 + && ADDR_INT(opR)[2] == 0 && ADDR_INT(opR)[1] == (1L<<(NR_SMALL_INT_BITS-NR_DIGIT_BITS)) - && ADDR_INT(opR)[0] == 0 ) + && ADDR_INT(opR)[0] == 0 ) return INTOBJ_INT( -(1L<>(NR_DIGIT_BITS-e)) - < INTBASE/2; e++ ) ; + ((Int)r[rs-1]<>(NR_DIGIT_BITS-e)) + < INTBASE/2; e++ ) ; r1 = ((Int)r[rs-1]<>(NR_DIGIT_BITS-e)); r2 = ((Int)r[rs-2]<=3 ? r[rs-3]>>(NR_DIGIT_BITS-e) : 0); @@ -1518,15 +1536,15 @@ Obj ModInt ( /* guess the factor */ m = ADDR_INT(mod) + rs + i; m01 = ((INTBASE*m[0]+m[-1])<>(NR_DIGIT_BITS-e)); + + (m[-2]>>(NR_DIGIT_BITS-e)); if ( m01 == 0 ) continue; m2 = ((Int)m[-2]<=3 ? m[-3]>>(NR_DIGIT_BITS-e) : 0); if ( ((Int)m[0]<>(NR_DIGIT_BITS-e)) < r1 ) - qi = m01 / r1; + qi = m01 / r1; else qi = INTBASE - 1; while ( m01-(Int)qi*r1 < INTBASE - && INTBASE*(m01-(Int)qi*r1)+m2 < (Int)qi*r2 ) - qi--; + && INTBASE*(m01-(Int)qi*r1)+m2 < (Int)qi*r2 ) + qi--; /* m = m - qi * r; */ d = 0; @@ -1544,8 +1562,8 @@ Obj ModInt ( r = ADDR_INT(opR); for ( k = 0; k < rs; ++k, ++m, ++r ) { c = (Int)*m + (Int)*r + (Int)d; - *m = c; - d = (c>>NR_DIGIT_BITS); + *m = c; + d = (c>>NR_DIGIT_BITS); } c = (Int)*m + d; *m = c; d = (c>>NR_DIGIT_BITS); qi--; @@ -1673,7 +1691,7 @@ Obj QuoInt ( /* the small int -(1<<28) divided by -1 is the large int (1<<28) */ if ( opL == INTOBJ_INT(-(1L<>(NR_DIGIT_BITS-e)) - < INTBASE/2 ; e++ ) ; + ((Int)r[rs-1]<>(NR_DIGIT_BITS-e)) + < INTBASE/2 ; e++ ) ; r1 = ((Int)r[rs-1]<>(NR_DIGIT_BITS-e)); r2 = ((Int)r[rs-2]<=3 ? r[rs-3]>>(NR_DIGIT_BITS-e) : 0); @@ -1822,15 +1840,15 @@ Obj QuoInt ( /* guess the factor */ l = ADDR_INT(opL) + rs + i; l01 = ((INTBASE*l[0]+l[-1])<>(NR_DIGIT_BITS-e)); + + (l[-2]>>(NR_DIGIT_BITS-e)); if ( l01 == 0 ) continue; l2 = ((Int)l[-2]<=3 ? l[-3]>>(NR_DIGIT_BITS-e) : 0); if ( ((Int)l[0]<>(NR_DIGIT_BITS-e)) < r1 ) - qi = l01 / r1; + qi = l01 / r1; else qi = INTBASE - 1; while ( l01-(Int)qi*r1 < INTBASE - && INTBASE*(l01-(Int)qi*r1)+l2 < (Int)qi*r2 ) + && INTBASE*(l01-(Int)qi*r1)+l2 < (Int)qi*r2 ) qi--; /* l = l - qi * r; */ @@ -1849,8 +1867,8 @@ Obj QuoInt ( r = ADDR_INT(opR); for ( k = 0; k < rs; ++k, ++l, ++r ) { c = (Int)*l + (Int)*r + (Int)d; - *l = c; - d = (c>>NR_DIGIT_BITS); + *l = c; + d = (c>>NR_DIGIT_BITS); } c = *l + d; d = (c>>NR_DIGIT_BITS); qi--; @@ -1888,9 +1906,9 @@ Obj QuoInt ( /**************************************************************************** ** -*F FuncQuoInt(,,) . . . . . . . internal function 'QuoInt' +*F FuncQUO_INT(,,) . . . . . . . internal function 'QuoInt' ** -** 'FuncQuoInt' implements the internal function 'QuoInt'. +** 'FuncQUO_INT' implements the internal function 'QuoInt'. ** ** 'QuoInt( , )' ** @@ -1901,7 +1919,7 @@ Obj QuoInt ( ** 'Sign( Quo(,) ) = Sign() * Sign()'. Dividing by 0 causes an ** error. 'Rem' (see "Rem") can be used to compute the remainder. */ -Obj FuncQuoInt ( +Obj FuncQUO_INT ( Obj self, Obj opL, Obj opR ) @@ -1912,7 +1930,7 @@ Obj FuncQuoInt ( && TNUM_OBJ(opL) != T_INTNEG ) { opL = ErrorReturnObj( "QuoInt: must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(opL)].name), 0L, + (Int)TNAM_OBJ(opL), 0L, "you can return an integer for " ); } while ( TNUM_OBJ(opR) != T_INT @@ -1920,7 +1938,7 @@ Obj FuncQuoInt ( && TNUM_OBJ(opR) != T_INTNEG ) { opR = ErrorReturnObj( "QuoInt: must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(opR)].name), 0L, + (Int)TNAM_OBJ(opR), 0L, "you can return an integer for " ); } @@ -1994,9 +2012,9 @@ Obj RemInt ( if ( opL == INTOBJ_INT(-(1L<>(NR_DIGIT_BITS-e)) - < INTBASE/2; e++ ) ; + ((Int)r[rs-1]<>(NR_DIGIT_BITS-e)) + < INTBASE/2; e++ ) ; r1 = ((Int)r[rs-1]<>(NR_DIGIT_BITS-e)); r2 = ((Int)r[rs-2]<=3 ? r[rs-3]>>(NR_DIGIT_BITS-e) : 0); @@ -2095,10 +2113,10 @@ Obj RemInt ( if ( m01 == 0 ) continue; m2 = ((Int)m[-2]<=3 ? m[-3]>>(NR_DIGIT_BITS-e) : 0); if ( ((Int)m[0]<>(NR_DIGIT_BITS-e)) < r1 ) - qi = m01 / r1; + qi = m01 / r1; else qi = INTBASE - 1; while ( m01-(Int)qi*r1 < INTBASE - && INTBASE*(m01-(Int)qi*r1)+m2 < (Int)qi*r2 ) + && INTBASE*(m01-(Int)qi*r1)+m2 < (Int)qi*r2 ) qi--; /* m = m - qi * r; */ @@ -2107,8 +2125,8 @@ Obj RemInt ( r = ADDR_INT(opR); for ( k = 0; k < rs; ++k, ++m, ++r ) { c = (Int)*m - (Int)qi * *r - (Int)d; - *m = c; - d = -(c>>NR_DIGIT_BITS); + *m = c; + d = -(c>>NR_DIGIT_BITS); } c = *m - d; *m = c; d = -(c>>NR_DIGIT_BITS); @@ -2119,8 +2137,8 @@ Obj RemInt ( r = ADDR_INT(opR); for ( k = 0; k < rs; ++k, ++m, ++r ) { c = (Int)*m + (Int)*r + (Int)d; - *m = c; - d = (c>>NR_DIGIT_BITS); + *m = c; + d = (c>>NR_DIGIT_BITS); } c = *m + d; *m = c; d = (c>>NR_DIGIT_BITS); qi--; @@ -2160,7 +2178,7 @@ Obj RemInt ( /**************************************************************************** ** -*F FuncRemInt(,,) . . . . . . . internal function 'RemInt' +*F FuncREM_INT(,,) . . . . . . . internal function 'RemInt' ** ** 'FuncRem' implements the internal function 'RemInt'. ** @@ -2172,7 +2190,7 @@ Obj RemInt ( ** has the same sign as and its absolute value is strictly less than the ** absolute value of . Dividing by 0 causes an error. */ -Obj FuncRemInt ( +Obj FuncREM_INT ( Obj self, Obj opL, Obj opR ) @@ -2183,7 +2201,7 @@ Obj FuncRemInt ( && TNUM_OBJ(opL) != T_INTNEG ) { opL = ErrorReturnObj( "RemInt: must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(opL)].name), 0L, + (Int)TNAM_OBJ(opL), 0L, "you can return an integer for " ); } while ( TNUM_OBJ(opR) != T_INT @@ -2191,7 +2209,7 @@ Obj FuncRemInt ( && TNUM_OBJ(opR) != T_INTNEG ) { opR = ErrorReturnObj( "RemInt: must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(opR)].name), 0L, + (Int)TNAM_OBJ(opR), 0L, "you can return an integer for " ); } @@ -2366,8 +2384,8 @@ Obj GcdInt ( /* get the leading two digits */ for ( e = 0; - ((Int)r[rs-1]<>(NR_DIGIT_BITS-e)) - < INTBASE/2; e++ ) ; + ((Int)r[rs-1]<>(NR_DIGIT_BITS-e)) + < INTBASE/2; e++ ) ; r1 = ((Int)r[rs-1]<>(NR_DIGIT_BITS-e)); r2 = ((Int)r[rs-2]<=3 ? r[rs-3]>>(NR_DIGIT_BITS-e) : 0); @@ -2380,10 +2398,10 @@ Obj GcdInt ( if ( l01 == 0 ) continue; l2 = ((Int)l[-2]<=3 ? l[-3]>>(NR_DIGIT_BITS-e):0); if ( ((Int)l[0]<>(NR_DIGIT_BITS-e)) < r1 ) - qi = l01 / r1; + qi = l01 / r1; else qi = INTBASE - 1; while ( l01-(Int)qi*r1 < INTBASE - && INTBASE*(l01-(Int)qi*r1)+l2 < (Int)qi*r2 ) + && INTBASE*(l01-(Int)qi*r1)+l2 < (Int)qi*r2 ) qi--; /* l = l - qi * r; */ @@ -2392,8 +2410,8 @@ Obj GcdInt ( r = ADDR_INT(opR); for ( k = 0; k < rs; ++k, ++l, ++r ) { c = (Int)*l - (Int)qi * *r - (Int)d; - *l = c; - d = -(c>>NR_DIGIT_BITS); + *l = c; + d = -(c>>NR_DIGIT_BITS); } c = *l - d; *l = c; d = -(c>>NR_DIGIT_BITS); @@ -2404,8 +2422,8 @@ Obj GcdInt ( r = ADDR_INT(opR); for ( k = 0; k < rs; ++k, ++l, ++r ) { c = (Int)*l + (Int)*r + (Int)d; - *l = c; - d = (c>>NR_DIGIT_BITS); + *l = c; + d = (c>>NR_DIGIT_BITS); } c = *l + d; *l = c; d = (c>>NR_DIGIT_BITS); qi--; @@ -2496,9 +2514,9 @@ Obj GcdInt ( /**************************************************************************** ** -*F FuncGcdInt(,,) . . . . . . . internal function 'GcdInt' +*F FuncGCD_INT(,,) . . . . . . . internal function 'GcdInt' ** -** 'FuncGcdInt' implements the internal function 'GcdInt'. +** 'FuncGCD_INT' implements the internal function 'GcdInt'. ** ** 'GcdInt( , )' ** @@ -2507,7 +2525,7 @@ Obj GcdInt ( ** greatest common divisor is never negative, even if the arguments are. We ** define $gcd( m, 0 ) = gcd( 0, m ) = abs( m )$ and $gcd( 0, 0 ) = 0$. */ -Obj FuncGcdInt ( +Obj FuncGCD_INT ( Obj self, Obj opL, Obj opR ) @@ -2518,7 +2536,7 @@ Obj FuncGcdInt ( && TNUM_OBJ(opL) != T_INTNEG ) { opL = ErrorReturnObj( "GcdInt: must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(opL)].name), 0L, + (Int)TNAM_OBJ(opL), 0L, "you can return an integer for " ); } while ( TNUM_OBJ(opR) != T_INT @@ -2526,7 +2544,7 @@ Obj FuncGcdInt ( && TNUM_OBJ(opR) != T_INTNEG ) { opR = ErrorReturnObj( "GcdInt: must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(opR)].name), 0L, + (Int)TNAM_OBJ(opR), 0L, "you can return an integer for " ); } @@ -2534,14 +2552,61 @@ Obj FuncGcdInt ( return GcdInt( opL, opR ); } +/**************************************************************************** +** +*F SaveInt( ) +** +** Since the type is saved, we don't need to worry about sign +*/ + +void SaveInt( Obj bigint) +{ + TypDigit *ptr; + UInt i; + ptr = (TypDigit *)ADDR_OBJ(bigint); + for (i = 0; i < SIZE_INT(bigint); i++) +#ifdef SYS_IS_64BIT + SaveUInt4(*ptr++); +#else + SaveUInt2(*ptr++); +#endif + return; +} + +/**************************************************************************** +** +*F LoadInt( ) +** +** Since the type is loaded, we don't need to worry about sign +*/ + +void LoadInt( Obj bigint) +{ + TypDigit *ptr; + UInt i; + ptr = (TypDigit *)ADDR_OBJ(bigint); + for (i = 0; i < SIZE_INT(bigint); i++) +#ifdef SYS_IS_64BIT + *ptr++ = LoadUInt4(); +#else + *ptr++ = LoadUInt2(); +#endif + return; +} + /**************************************************************************** ** -*F InitInt() . . . . . . . . . . . . . . . . initializes the integer package + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + +/**************************************************************************** ** -** 'InitInt' initializes the arbitrary size integer package. + +*F SetupInt() . . . . . . . . . . . . . . . initializes the integer package */ -void InitInt ( void ) +void SetupInt ( void ) { UInt t1, t2; @@ -2558,16 +2623,11 @@ void InitInt ( void ) InfoBags[ T_INTNEG ].name = "integer (< -2^28)"; #endif - /* install the kind functions */ - ImportGVarFromLibrary( "TYPE_INT_SMALL_ZERO", &TYPE_INT_SMALL_ZERO ); - ImportGVarFromLibrary( "TYPE_INT_SMALL_POS", &TYPE_INT_SMALL_POS ); - ImportGVarFromLibrary( "TYPE_INT_SMALL_NEG", &TYPE_INT_SMALL_NEG ); - ImportGVarFromLibrary( "TYPE_INT_LARGE_POS", &TYPE_INT_LARGE_POS ); - ImportGVarFromLibrary( "TYPE_INT_LARGE_NEG", &TYPE_INT_LARGE_NEG ); - - TypeObjFuncs[ T_INT ] = TypeIntSmall; - TypeObjFuncs[ T_INTPOS ] = TypeIntLargePos; - TypeObjFuncs[ T_INTNEG ] = TypeIntLargeNeg; + /* Install the saving methods */ + SaveObjFuncs [ T_INTPOS ] = SaveInt; + SaveObjFuncs [ T_INTNEG ] = SaveInt; + LoadObjFuncs [ T_INTPOS ] = LoadInt; + LoadObjFuncs [ T_INTNEG ] = LoadInt; /* install the printing function */ @@ -2626,36 +2686,70 @@ void InitInt ( void ) ModFuncs [ t1 ][ t2 ] = ModInt; } } +} + + +/**************************************************************************** +** +*F InitInt() . . . . . . . . . . . . . . . . initializes the integer package +** +** 'InitInt' initializes the arbitrary size integer package. +*/ +void InitInt ( void ) +{ + /* install the kind functions */ + ImportGVarFromLibrary( "TYPE_INT_SMALL_ZERO", &TYPE_INT_SMALL_ZERO ); + ImportGVarFromLibrary( "TYPE_INT_SMALL_POS", &TYPE_INT_SMALL_POS ); + ImportGVarFromLibrary( "TYPE_INT_SMALL_NEG", &TYPE_INT_SMALL_NEG ); + ImportGVarFromLibrary( "TYPE_INT_LARGE_POS", &TYPE_INT_LARGE_POS ); + ImportGVarFromLibrary( "TYPE_INT_LARGE_NEG", &TYPE_INT_LARGE_NEG ); + + TypeObjFuncs[ T_INT ] = TypeIntSmall; + TypeObjFuncs[ T_INTPOS ] = TypeIntLargePos; + TypeObjFuncs[ T_INTNEG ] = TypeIntLargeNeg; /* install the internal function */ - InitHandlerFunc( IsIntHandler, "IS_INT" ); - IsIntFilt = NewFilterC( - "IS_INT", 1L, "obj", IsIntHandler ); - AssGVar( GVarName( "IS_INT" ), IsIntFilt ); - - InitHandlerFunc( FuncQuoInt, "QUO_INT"); - AssGVar( GVarName( "QUO_INT" ), - NewFunctionC( "QUO_INT", 2L, "int1, int2", FuncQuoInt ) ); - - InitHandlerFunc( FuncRemInt, "REM_INT"); - AssGVar( GVarName( "REM_INT" ), - NewFunctionC( "REM_INT", 2L, "int1, int2", FuncRemInt ) ); - - InitHandlerFunc( FuncGcdInt, "GCD_INT"); - AssGVar( GVarName( "GCD_INT" ), - NewFunctionC( "GCD_INT", 2L, "int1, int2", FuncGcdInt ) ); - - InitHandlerFunc( ProdIntObjHandler, "PROD_INT_OBJ"); - ProdIntObjFunc = NewFunctionC( - "PROD_INT_OBJ", 2L, "n, op", ProdIntObjHandler ); - AssGVar( GVarName( "PROD_INT_OBJ" ), ProdIntObjFunc ); - - InitHandlerFunc( PowObjIntHandler, "POW_OBJ_INT"); - PowObjIntFunc = NewFunctionC( - "POW_OBJ_INT", 2L, "op, n", PowObjIntHandler ); - AssGVar( GVarName( "POW_OBJ_INT" ), PowObjIntFunc ); + C_NEW_GVAR_FILT( "IS_INT", "obj", IsIntFilt, IsIntHandler, + "src/integer.c:IS_INT" ); + + C_NEW_GVAR_FUNC( "QUO_INT", 2, "int1, int2", + FuncQUO_INT, + "src/integer.c:QUO_INT" ); + + C_NEW_GVAR_FUNC( "REM_INT", 2, "int1, int2", + FuncREM_INT, + "src/integer.c:REM_INT" ); + + C_NEW_GVAR_FUNC( "GCD_INT", 2, "int1, int2", + FuncGCD_INT, + "src/integer.c:GCD_INT" ); + + C_NEW_GVAR_FUNC( "PROD_INT_OBJ", 2, "int, obj", + FuncPROD_INT_OBJ, + "src/integer.c:PROD_INT_OBJ" ); + + C_NEW_GVAR_FUNC( "POW_OBJ_INT", 2, "obj, int", + FuncPOW_OBJ_INT, + "src/integer.c:POW_OBJ_INT" ); +} + + +/**************************************************************************** +** +*F CheckInt() . . . . . . . check the initialisation of the integer package +** +** 'InitInt' initializes the arbitrary size integer package. +*/ +void CheckInt ( void ) +{ + SET_REVISION( "integer_c", Revision_integer_c ); + SET_REVISION( "integer_h", Revision_integer_h ); } +/**************************************************************************** +** +*E integer.c . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/integer.h b/src/integer.h index c893e904dd..0396498fd7 100644 --- a/src/integer.h +++ b/src/integer.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A integer.h GAP source Martin Schoenert +*W integer.h GAP source Martin Schoenert ** & Alice Niemeyer ** & Werner Nickel ** @@ -11,13 +11,14 @@ ** This file declares the functions handling arbitrary size integers. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_integer_h = +SYS_CONST char * Revision_integer_h = "@(#)$Id$"; #endif /**************************************************************************** ** + *T TypDigit . . . . . . . . . . . . . . . . . . . . type of a single digit ** ** 'TypDigit' is the type of a single digit of an arbitrary size integer. @@ -199,11 +200,38 @@ extern Obj GcdInt ( /**************************************************************************** ** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** \ + \ +*F SetupInt() . . . . . . . . . . . . . . . initializes the integer package +*/ +extern void SetupInt ( void ); + + +/**************************************************************************** +** \ *F InitInt() . . . . . . . . . . . . . . . . initializes the integer package ** ** 'InitInt' initializes the arbitrary size integer package. */ -extern void InitInt ( void ); +extern void InitInt ( void ); +/**************************************************************************** +** \ +*F CheckInt() . . . . . . . check the initialisation of the integer package +** +** 'InitInt' initializes the arbitrary size integer package. +*/ +extern void CheckInt ( void ); + +/**************************************************************************** +** + +*E integer.c . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/intrprtr.c b/src/intrprtr.c index 08e3a181ec..a9804dc20d 100644 --- a/src/intrprtr.c +++ b/src/intrprtr.c @@ -14,48 +14,47 @@ ** immediately, it switches into coding mode, and delegates the work to the ** coder. */ -char * Revision_intrprtr_c = - "@(#)$Id$"; - #include /* assert */ - #include "system.h" /* Ints, UInts */ -#include "gasman.h" /* NewBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, types */ -#include "scanner.h" /* Pr */ +SYS_CONST char * Revision_intrprtr_c = + "@(#)$Id$"; + +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ #include "read.h" /* reader */ -#include "gvars.h" /* Tilde, VAL_GVAR, AssGVar */ +#include "gap.h" /* error handling, initialisation */ + +#include "gvars.h" /* global variables */ #include "calls.h" /* generic call mechanism */ #include "opers.h" /* generic operations */ -#include "ariths.h" /* generic operations */ +#include "ariths.h" /* basic arithmetic */ #include "records.h" /* generic records */ #include "lists.h" /* generic lists */ -#include "bool.h" /* True, False */ +#include "bool.h" /* booleans */ -#include "permutat.h" /* NEW_PERM2, ADDR_PERM2, ... */ +#include "permutat.h" /* permutations */ -#include "precord.h" /* NEW_PREC, InPRec */ +#include "precord.h" /* plain records */ -#include "plist.h" /* SET_LEN_PLIST, SET_ELM_PLIST */ -#include "range.h" /* NEW_RANGE, SET_LEN_RANGE, ...*/ -#include "string.h" /* ObjsChar, NEW_STRING, CSTR_ST...*/ +#include "plist.h" /* plain lists */ +#include "range.h" /* ranges */ +#include "string.h" /* strings */ -#include "code.h" /* CodeBegin, CodeEnd, ... */ -#include "vars.h" /* ??? */ -#include "funcs.h" /* ExecBegin, ExecEnd */ +#include "code.h" /* coder */ +#include "vars.h" /* variables */ +#include "funcs.h" /* functions */ #define INCLUDE_DECLARATION_PART -#include "intrprtr.h" /* declaration part of the package */ +#include "intrprtr.h" /* interpreter */ #undef INCLUDE_DECLARATION_PART -#include "gap.h" /* Error */ - -#include "saveload.h" /* SaveWorkspace, LoadWorkspace */ +#include "saveload.h" /* saving and loading */ /**************************************************************************** ** @@ -395,7 +394,7 @@ void IntrFuncCallEnd ( if ( TNUM_OBJ(func) != T_FUNCTION ) { ErrorQuit( " must be a function (not a %s)", - (Int)(InfoBags[TNUM_OBJ(func)].name), 0L ); + (Int)TNAM_OBJ(func), 0L ); } /* call the function */ @@ -568,7 +567,7 @@ void IntrIfBeginBody ( void ) if ( cond != True && cond != False ) { ErrorQuit( " must be 'true' or 'false' (not to a %s)", - (Int)(InfoBags[TNUM_OBJ(cond)].name), 0L ); + (Int)TNAM_OBJ(cond), 0L ); } /* if the condition is 'false', ignore the body */ @@ -1133,14 +1132,14 @@ void IntrOr ( void ) } else { ErrorQuit( " must be 'true' or 'false' (not a %s)", - (Int)(InfoBags[TNUM_OBJ(opR)].name), 0L ); + (Int)TNAM_OBJ(opR), 0L ); } } /* signal an error */ else { ErrorQuit( " must be 'true' or 'false' (not a %s)", - (Int)(InfoBags[TNUM_OBJ(opL)].name), 0L ); + (Int)TNAM_OBJ(opL), 0L ); } } @@ -1212,7 +1211,7 @@ void IntrAnd ( void ) else { ErrorQuit( " must be 'true' or 'false' (not to a %s)", - (Int)(InfoBags[TNUM_OBJ(opR)].name), 0L ); + (Int)TNAM_OBJ(opR), 0L ); } } @@ -1224,7 +1223,7 @@ void IntrAnd ( void ) else { ErrorQuit( " must be 'true' or 'false' (not to a %s)", - (Int)(InfoBags[TNUM_OBJ(opL)].name), 0L ); + (Int)TNAM_OBJ(opL), 0L ); } } @@ -1232,7 +1231,7 @@ void IntrAnd ( void ) else { ErrorQuit( " must be 'true' or 'false' (not to a %s)", - (Int)(InfoBags[TNUM_OBJ(opL)].name), 0L ); + (Int)TNAM_OBJ(opL), 0L ); } } @@ -1259,7 +1258,7 @@ void IntrNot ( void ) if ( op != True && op != False ) { ErrorQuit( " must be 'true' or 'false' (not to a %s)", - (Int)(InfoBags[TNUM_OBJ(op)].name), 0L ); + (Int)TNAM_OBJ(op), 0L ); } /* negate the operand */ @@ -1789,7 +1788,7 @@ void IntrPermCycle ( if ( ! IS_INTOBJ(val) || INT_INTOBJ(val) <= 0 ) { ErrorQuit( "Permutation: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(val)].name), 0L ); + (Int)TNAM_OBJ(val), 0L ); } c = INT_INTOBJ(val); @@ -1996,7 +1995,7 @@ void IntrListExprEnd ( if ( ! IS_INTOBJ(val) ) { ErrorQuit( "Range: must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(val)].name), 0L ); + (Int)TNAM_OBJ(val), 0L ); } low = INT_INTOBJ( val ); @@ -2006,7 +2005,7 @@ void IntrListExprEnd ( if ( ! IS_INTOBJ(val) ) { ErrorQuit( "Range: must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(val)].name), 0L ); + (Int)TNAM_OBJ(val), 0L ); } if ( INT_INTOBJ(val) == low ) { ErrorQuit( @@ -2024,7 +2023,7 @@ void IntrListExprEnd ( if ( ! IS_INTOBJ(val) ) { ErrorQuit( "Range: must not be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(val)].name), 0L ); + (Int)TNAM_OBJ(val), 0L ); } if ( (INT_INTOBJ(val) - low) % inc != 0 ) { ErrorQuit( @@ -2547,7 +2546,7 @@ void IntrAssList ( void ) if ( ! IS_INTOBJ(pos) || INT_INTOBJ(pos) <= 0 ) { ErrorQuit( "List Assignment: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(pos)].name), 0L ); + (Int)TNAM_OBJ(pos), 0L ); } p = INT_INTOBJ(pos); @@ -2626,7 +2625,7 @@ void IntrAssListLevel ( if ( ! IS_INTOBJ(pos) || INT_INTOBJ(pos) <= 0 ) { ErrorQuit( "List Assignment: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(pos)].name), 0L ); + (Int)TNAM_OBJ(pos), 0L ); } p = INT_INTOBJ(pos); @@ -2693,7 +2692,7 @@ void IntrUnbList ( void ) if ( ! IS_INTOBJ(pos) || INT_INTOBJ(pos) <= 0 ) { ErrorQuit( "List Assignment: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(pos)].name), 0L ); + (Int)TNAM_OBJ(pos), 0L ); } p = INT_INTOBJ(pos); @@ -2733,7 +2732,7 @@ void IntrElmList ( void ) if ( ! IS_INTOBJ(pos) || INT_INTOBJ(pos) <= 0 ) { ErrorQuit( "List Element: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(pos)].name), 0L ); + (Int)TNAM_OBJ(pos), 0L ); } p = INT_INTOBJ( pos ); @@ -2795,7 +2794,7 @@ void IntrElmListLevel ( if ( ! IS_INTOBJ(pos) || INT_INTOBJ(pos) <= 0 ) { ErrorQuit( "List Element: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(pos)].name), 0L ); + (Int)TNAM_OBJ(pos), 0L ); } p = INT_INTOBJ( pos ); @@ -2859,7 +2858,7 @@ void IntrIsbList ( void ) if ( ! IS_INTOBJ(pos) || INT_INTOBJ(pos) <= 0 ) { ErrorQuit( "List Element: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(pos)].name), 0L ); + (Int)TNAM_OBJ(pos), 0L ); } p = INT_INTOBJ( pos ); @@ -3106,7 +3105,7 @@ void IntrAssPosObj ( void ) if ( ! IS_INTOBJ(pos) || INT_INTOBJ(pos) <= 0 ) { ErrorQuit( "PosObj Assignment: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(pos)].name), 0L ); + (Int)TNAM_OBJ(pos), 0L ); } p = INT_INTOBJ(pos); @@ -3199,7 +3198,7 @@ void IntrAssPosObjLevel ( if ( ! IS_INTOBJ(pos) || INT_INTOBJ(pos) <= 0 ) { ErrorQuit( "PosObj Assignment: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(pos)].name), 0L ); + (Int)TNAM_OBJ(pos), 0L ); } p = INT_INTOBJ(pos); @@ -3270,7 +3269,7 @@ void IntrUnbPosObj ( void ) if ( ! IS_INTOBJ(pos) || INT_INTOBJ(pos) <= 0 ) { ErrorQuit( "PosObj Assignment: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(pos)].name), 0L ); + (Int)TNAM_OBJ(pos), 0L ); } p = INT_INTOBJ(pos); @@ -3317,7 +3316,7 @@ void IntrElmPosObj ( void ) if ( ! IS_INTOBJ(pos) || INT_INTOBJ(pos) <= 0 ) { ErrorQuit( "PosObj Element: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(pos)].name), 0L ); + (Int)TNAM_OBJ(pos), 0L ); } p = INT_INTOBJ( pos ); @@ -3400,7 +3399,7 @@ void IntrElmPosObjLevel ( if ( ! IS_INTOBJ(pos) || INT_INTOBJ(pos) <= 0 ) { ErrorQuit( "PosObj Element: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(pos)].name), 0L ); + (Int)TNAM_OBJ(pos), 0L ); } p = INT_INTOBJ( pos ); @@ -3468,7 +3467,7 @@ void IntrIsbPosObj ( void ) if ( ! IS_INTOBJ(pos) || INT_INTOBJ(pos) <= 0 ) { ErrorQuit( "PosObj Element: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(pos)].name), 0L ); + (Int)TNAM_OBJ(pos), 0L ); } p = INT_INTOBJ( pos ); @@ -3889,7 +3888,7 @@ void IntrAssertAfterCondition ( void ) else if (condition != False) ErrorQuit( " in Assert must yield 'true' or 'false' (not a %s)", - (Int)(InfoBags[TNUM_OBJ(condition)].name), 0L ); + (Int)TNAM_OBJ(condition), 0L ); } void IntrAssertEnd2Args ( void ) @@ -3952,7 +3951,7 @@ void IntrSaveWSBegin ( void ) if ( IntrReturning > 0 ) { return; } if ( IntrIgnoring > 0 ) { return; } if ( IntrCoding > 0 ) { ErrorQuit("SaveWorkspace not at outer level", - 0L,0L); } + 0L,0L); } if ( CompNowFuncs != 0 ) { return; } } @@ -3966,63 +3965,35 @@ void IntrSaveWSEnd ( void ) if ( IntrIgnoring > 0 ) { return; } if ( IntrCoding > 0 ) { ErrorQuit("Panic: SaveWorkspace end not at outer level", - 0L,0L); } + 0L,0L); } if ( CompNowFuncs != 0 ) { return; } filename = PopObj(); PushObj(SaveWorkspace( filename )); } + + + /**************************************************************************** ** -*F IntrLoadWSBegin() . . . . . . . . . . . . . Start interpeting a save WS -** -*F IntrLoadWSEnd() . . . . . . . . . . . . . . Actually save the workspace -** -** 'IntrLoadWSBegin' is called when the reader starts reading a -** LoadWorkspace command. Unusually, there is something to do, -** because we must signal an error if we are coding, as the SaveWS -** cannot be at the outer level -** -** Some clever footwork may be needed after a LoadWorkspace to get the -** stack into a permissible state? + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * */ -void IntrLoadWSBegin ( void ) -{ - /* ignore or signal an error - perhaps we should signal an error more often?? */ - - if ( IntrReturning > 0 ) { return; } - if ( IntrIgnoring > 0 ) { return; } - if ( IntrCoding > 0 ) { ErrorQuit("LoadWorkspace not at outer level", - 0L,0L); } - if ( CompNowFuncs != 0 ) { return; } -} -void IntrLoadWSEnd ( void ) +/**************************************************************************** +** + +*F SetupIntrprtr() . . . . . . . . . . . . . . . initialize the interpreter +*/ +void SetupIntrprtr ( void ) { - Obj filename; - /* ignore or signal an error - perhaps we should signal an error more often?? */ - - if ( IntrReturning > 0 ) { return; } - if ( IntrIgnoring > 0 ) { return; } - if ( IntrCoding > 0 ) { - ErrorQuit("Panic: LoadWorkspace end not at outer level", - 0L,0L); } - if ( CompNowFuncs != 0 ) { return; } - - filename = PopObj(); - PushObj(LoadWorkspace( filename )); } - - /**************************************************************************** ** - *F InitIntrprtr() . . . . . . . . . . . . . . . initialize the interpreter ** ** 'InitIntrprtr' initializes the interpreter. @@ -4031,9 +4002,9 @@ void InitIntrprtr ( void ) { UInt lev; - InitGlobalBag( &IntrResult, "interpreter: result" ); - InitGlobalBag( &IntrState, "interpreter: state" ); - InitGlobalBag( &StackObj, "interpreter: object stack" ); + InitGlobalBag( &IntrResult, "src/intrprtr.c:IntrResult" ); + InitGlobalBag( &IntrState, "src/intrprtr.c:IntrState" ); + InitGlobalBag( &StackObj, "src/intrprtr.c:StackObj" ); /* The work of handling Info messages is delegated to the GAP level */ ImportFuncFromLibrary( "InfoDecision", &InfoDecision ); @@ -4041,8 +4012,21 @@ void InitIntrprtr ( void ) /* The Assertion level is also controlled at GAP level */ lev = GVarName("CurrentAssertionLevel"); - InitCopyGVar( lev, &CurrentAssertionLevel ); - AssGVar( lev, INTOBJ_INT(0) ); + InitCopyGVar( "CurrentAssertionLevel", &CurrentAssertionLevel ); + if ( ! SyRestoring ) { + AssGVar( lev, INTOBJ_INT(0) ); + } +} + + +/**************************************************************************** +** +*F CheckIntrprtr() . . . . . . . check the initialisation of the interpreter +*/ +void CheckIntrprtr ( void ) +{ + SET_REVISION( "intrprtr_c", Revision_intrprtr_c ); + SET_REVISION( "intrprtr_h", Revision_intrprtr_h ); } diff --git a/src/intrprtr.h b/src/intrprtr.h index cba53054e3..935ca41cd7 100644 --- a/src/intrprtr.h +++ b/src/intrprtr.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A intrprtr.h GAP source Martin Schoenert +*W intrprtr.h GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -15,7 +15,7 @@ ** coder. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_intrprtr_h = +SYS_CONST char * Revision_intrprtr_h = "@(#)$Id$"; #endif @@ -818,18 +818,20 @@ extern void IntrSaveWSBegin ( void ); extern void IntrSaveWSEnd ( void ); + /**************************************************************************** ** -*F IntrLoadWSBegin() . . . . . . . . . . . . . Start interpeting a save WS -** -*F IntrLoadWSEnd() . . . . . . . . . . . . . . Actually save the workspace -** -** 'IntrLoadWSBegin' is called when the reader starts reading a -** LoadWorkspace command. + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * */ -extern void IntrLoadWSBegin ( void ); -extern void IntrLoadWSEnd ( void ); + +/**************************************************************************** +** + +*F SetupIntrprtr() . . . . . . . . . . . . . . . initialize the interpreter +*/ +extern void SetupIntrprtr ( void ); /**************************************************************************** @@ -838,7 +840,18 @@ extern void IntrLoadWSEnd ( void ); ** ** 'InitIntrprtr' initializes the interpreter. */ -extern void InitIntrprtr ( void ); +extern void InitIntrprtr ( void ); +/**************************************************************************** +** +*F CheckIntrprtr() . . . . . . . check the initialisation of the interpreter +*/ +extern void CheckIntrprtr ( void ); + +/**************************************************************************** +** + +*E intrprtr.h . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/listfunc.c b/src/listfunc.c index 063ec4ef48..c10ca2a906 100644 --- a/src/listfunc.c +++ b/src/listfunc.c @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A listfunc.c GAP source Martin Schoenert +*W listfunc.c GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -8,40 +8,47 @@ ** ** This file contains the functions for generic lists. */ -char * Revision_listfunc_c = +#include "system.h" /* Ints, UInts */ + +SYS_CONST char * Revision_listfunc_c = "@(#)$Id$"; -#include "system.h" /* Ints, UInts */ -#include "gasman.h" /* NewBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, types */ -#include "scanner.h" /* Pr */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ + +#include "gap.h" /* error handling, initialisation */ -#include "gvars.h" /* AssGVar, GVarName */ +#include "gvars.h" /* global variables */ -#include "calls.h" /* Function */ -#include "opers.h" /* operations */ +#include "calls.h" /* generic call mechanism */ +#include "opers.h" /* generic operations */ -#include "ariths.h" /* generic operations package */ -#include "lists.h" /* XTNum, LEN_LIST, ELM_LIST, ... */ +#include "ariths.h" /* basic arithmetic */ -#include "bool.h" /* True, False */ +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ -#include "permutat.h" /* OnTuplesPerm, OnSetsPerm */ +#include "lists.h" /* generic lists */ +#include "string.h" /* strings */ + +#include "bool.h" /* booleans */ + +#include "permutat.h" /* permutations */ #define INCLUDE_DECLARATION_PART -#include "listfunc.h" /* declaration part of the package */ +#include "listfunc.h" /* functions for generic lists */ #undef INCLUDE_DECLARATION_PART -#include "plist.h" /* LEN_PLIST, SET_LEN_PLIST, ... */ -#include "set.h" /* IsSet */ -#include "range.h" /* SET_LEN_RANGE, LEN_RANGE, ... */ - -#include "gap.h" /* Error */ +#include "plist.h" /* plain lists */ +#include "set.h" /* plain sets */ +#include "range.h" /* ranges */ /**************************************************************************** ** + *F AddList(,) . . . . . . . . add an object to the end of a list ** ** 'AddList' adds the object to the end of the list , i.e., @@ -69,7 +76,7 @@ void AddPlist ( { Int pos; /* position to assign to */ - if ( IS_IMM_PLIST(list) ) { + if ( ! IS_MUTABLE_PLIST(list) ) { list = ErrorReturnObj( "Lists Assignment: must be a mutable list", 0L, 0L, @@ -122,8 +129,6 @@ Obj AddListHandler ( ** in which case the corresponding positions will be left empty in . ** 'AppendList' returns nothing, it is called only for its side effect. */ -Obj AppendListIntrFunc; - Obj AppendListIntrHandler ( Obj self, Obj list1, @@ -141,7 +146,7 @@ Obj AppendListIntrHandler ( while ( ! IS_LIST( list1 ) ) { list1 = ErrorReturnObj( "AppendList: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list1)].name), 0L, + (Int)TNAM_OBJ(list1), 0L, "you can return a list for " ); } PLAIN_LIST( list1 ); @@ -154,7 +159,7 @@ Obj AppendListIntrHandler ( while ( ! IS_LIST( list2 ) ) { list2 = ErrorReturnObj( "AppendList: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list2)].name), 0L, + (Int)TNAM_OBJ(list2), 0L, "you can return a list for " ); } len2 = LEN_LIST( list2 ); @@ -269,8 +274,6 @@ UInt PositionSortedDensePlist ( return h; } -Obj PositionSortedListFunc; - Obj PositionSortedListHandler ( Obj self, Obj list, @@ -282,7 +285,7 @@ Obj PositionSortedListHandler ( while ( ! IS_LIST(list) ) { list = ErrorReturnObj( "PositionSortedList: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list)].name), 0L, + (Int)TNAM_OBJ(list), 0L, "you can return a list for " ); } @@ -362,8 +365,6 @@ UInt PositionSortedDensePlistComp ( return h; } -Obj PositionSortedListCompFunc; - Obj PositionSortedListCompHandler ( Obj self, Obj list, @@ -376,7 +377,7 @@ Obj PositionSortedListCompHandler ( while ( ! IS_LIST(list) ) { list = ErrorReturnObj( "PositionSortedListComp: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list)].name), 0L, + (Int)TNAM_OBJ(list), 0L, "you can return a list for " ); } @@ -384,7 +385,7 @@ Obj PositionSortedListCompHandler ( while ( TNUM_OBJ( func ) != T_FUNCTION ) { func = ErrorReturnObj( "PositionSortedListComp: must be a function (not a %s)", - (Int)(InfoBags[TNUM_OBJ(func)].name), 0L, + (Int)TNAM_OBJ(func), 0L, "you can return a function for " ); } @@ -490,8 +491,6 @@ void SortDensePlist ( } } -Obj SortListFunc; - Obj SortListHandler ( Obj self, Obj list ) @@ -500,7 +499,7 @@ Obj SortListHandler ( while ( ! IS_LIST(list) ) { list = ErrorReturnObj( "SortList: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list)].name), 0L, + (Int)TNAM_OBJ(list), 0L, "you can return a list for " ); } @@ -584,8 +583,6 @@ void SortDensePlistComp ( } } -Obj SortListCompFunc; - Obj SortListCompHandler ( Obj self, Obj list, @@ -595,7 +592,7 @@ Obj SortListCompHandler ( while ( ! IS_LIST(list) ) { list = ErrorReturnObj( "SortListComp: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list)].name), 0L, + (Int)TNAM_OBJ(list), 0L, "you can return a list for " ); } @@ -603,7 +600,7 @@ Obj SortListCompHandler ( while ( TNUM_OBJ( func ) != T_FUNCTION ) { func = ErrorReturnObj( "SortListComp: must be a function (not a %s)", - (Int)(InfoBags[TNUM_OBJ(func)].name), 0L, + (Int)TNAM_OBJ(func), 0L, "you can return a function for " ); } @@ -713,7 +710,7 @@ Obj FuncOnPairs ( while ( ! IS_LIST( pair ) || LEN_LIST( pair ) != 2 ) { pair = ErrorReturnObj( "OnPairs: must be a list of length 2 (not a %s)", - (Int)(InfoBags[TNUM_OBJ(pair)].name), 0L, + (Int)TNAM_OBJ(pair), 0L, "you can return a list of length 2 for " ); } @@ -759,7 +756,7 @@ Obj FuncOnTuples ( while ( ! IS_LIST( tuple ) ) { tuple = ErrorReturnObj( "OnTuples: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(tuple)].name), 0L, + (Int)TNAM_OBJ(tuple), 0L, "you can return a list for " ); } @@ -808,7 +805,7 @@ Obj FuncOnSets ( while ( TNUM_OBJ( set ) != T_PLIST_HOM_SSORT && ! IsSet( set ) ) { set = ErrorReturnObj( "OnSets: must be a set (not a %s)", - (Int)(InfoBags[TNUM_OBJ(set)].name), 0L, + (Int)TNAM_OBJ(set), 0L, "you can return a set for " ); } @@ -923,7 +920,7 @@ Obj DepthListx ( && TNUM_OBJ(tmp) <= LAST_LIST_TNUM ) { tmp = ErrorReturnObj( "DepthVector: must be a vector (not a %s)", - (Int)(InfoBags[TNUM_OBJ(tmp)].name), 0L, + (Int)TNAM_OBJ(tmp), 0L, "you can return a vector for " ); } if ( ! EQ( zero, tmp ) ) @@ -946,7 +943,7 @@ Obj CantDepthVector ( { vec = ErrorReturnObj( "DepthVector: must be a vector (not a %s)", - (Int)(InfoBags[TNUM_OBJ(vec)].name), 0L, + (Int)TNAM_OBJ(vec), 0L, "you can return a vector for " ); return DepthVectorFuncs[XTNum(vec)]( vec ); } @@ -962,11 +959,17 @@ Obj DepthVectorHandler ( /**************************************************************************** ** -*F InitListFunc() . . . . . . . . . . . initialize lists functions package + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** ** -** 'InitListFunc' initializes the lists functions package. + +*F SetupListFunc() . . . . . . . . . initialize the lists functions package */ -void InitListFunc ( void ) +void SetupListFunc ( void ) { UInt type; /* loop variable */ @@ -974,92 +977,106 @@ void InitListFunc ( void ) for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) { DepthVectorFuncs[ type ] = CantDepthVector; } - /* DepthVectorFuncs[ T_LISTX ] = DepthListx; */ DepthVectorFuncs[ T_PLIST_CYC ] = DepthListx; DepthVectorFuncs[ T_PLIST_CYC_NSORT ] = DepthListx; DepthVectorFuncs[ T_PLIST_CYC_SSORT ] = DepthListx; +} + + +/**************************************************************************** +** +*F InitListFunc() . . . . . . . . . initialize the lists functions package +** +** 'InitListFunc' initializes the lists functions package. +*/ +void InitListFunc ( void ) +{ /* install the internal functions */ - InitHandlerFunc( AddListHandler, "ADD_LIST" ); - AddListOper = NewOperationC( - "ADD_LIST", 2L, "list, val", AddListHandler ); - AssGVar( GVarName( "ADD_LIST" ), - AddListOper ); - - InitHandlerFunc( AppendListHandler, "APPEND_LIST"); - AppendListOper = NewOperationC( - "APPEND_LIST", 2L, "list, list", AppendListHandler ); - AssGVar( GVarName( "APPEND_LIST" ), - AppendListOper ); - - InitHandlerFunc( AppendListIntrHandler, "APPEND_LIST_INTR"); - AppendListIntrFunc = NewFunctionC( - "APPEND_LIST_INTR", 2L, "list1, list2", AppendListIntrHandler ); - AssGVar( GVarName( "APPEND_LIST_INTR" ), - AppendListIntrFunc ); + C_NEW_GVAR_OPER( "ADD_LIST", 2, "list, val", AddListOper, AddListHandler, + "src/listfunc.c:ADD_LIST" ); + + C_NEW_GVAR_OPER( "APPEND_LIST", 2, "list, val", AppendListOper, AppendListHandler, + "src/listfunc.c:APPEND_LIST" ); + + C_NEW_GVAR_FUNC( "APPEND_LIST_INTR", 2, "list1, list2", + AppendListIntrHandler, + "src/listfunc.c:APPEND_LIST_INTR" ); + /* make and install the 'POSITION_SORTED_LIST' function */ - InitHandlerFunc( PositionSortedListHandler, "POSITION_SORTED_LIST"); - PositionSortedListFunc = NewFunctionC( - "POSITION_SORTED_LIST", 2L, "list, obj", PositionSortedListHandler ); - AssGVar( GVarName( "POSITION_SORTED_LIST" ), - PositionSortedListFunc ); + C_NEW_GVAR_FUNC( "POSITION_SORTED_LIST", 2, "list, obj", + PositionSortedListHandler, + "src/listfunc.c:POSITION_SORTED_LIST" ); + /* make and install the 'POSITION_SORTED_LIST_COMP' function */ - InitHandlerFunc( PositionSortedListCompHandler, "POSITION_SORTED_LIST_COMP"); - PositionSortedListCompFunc = NewFunctionC( - "POSITION_SORTED_LIST_COMP", 3L, "list, obj, func", - PositionSortedListCompHandler ); - AssGVar( GVarName( "POSITION_SORTED_LIST_COMP" ), - PositionSortedListCompFunc ); + C_NEW_GVAR_FUNC( "POSITION_SORTED_LIST_COMP", 3, "list, obj, func", + PositionSortedListCompHandler, + "src/listfunc.c:POSITION_SORTED_LIST_COMP" ); + /* make and install the 'SORT_LIST' function */ - InitHandlerFunc( SortListHandler, "SORT_LIST"); - SortListFunc = NewFunctionC( - "SORT_LIST", 1L, "list", SortListHandler ); - AssGVar( GVarName( "SORT_LIST" ), - SortListFunc ); + C_NEW_GVAR_FUNC( "SORT_LIST", 1, "list", + SortListHandler, + "src/listfunc.c:SORT_LIST" ); + /* make and install the 'SORT_LIST_COMP' function */ - InitHandlerFunc( SortListCompHandler, "SORT_LIST_COMP"); - SortListCompFunc = NewFunctionC( - "SORT_LIST_COMP", 2L, "list, func", SortListCompHandler ); - AssGVar( GVarName( "SORT_LIST_COMP" ), - SortListCompFunc ); - - InitHandlerFunc( FuncOnPoints, "OnPoints"); - AssGVar( GVarName( "OnPoints" ), - NewFunctionC( "OnPoints", 2L, "pnt, elm", - FuncOnPoints ) ); - InitHandlerFunc( FuncOnPairs, "OnPairs"); - AssGVar( GVarName( "OnPairs" ), - NewFunctionC( "OnPairs", 2L, "pair, elm", - FuncOnPairs ) ); - InitHandlerFunc( FuncOnTuples, "OnTuples"); - AssGVar( GVarName( "OnTuples" ), - NewFunctionC( "OnTuples", 2L, "tuple, elm", - FuncOnTuples ) ); - InitHandlerFunc( FuncOnSets, "OnSets"); - AssGVar( GVarName( "OnSets" ), - NewFunctionC( "OnSets", 2L, "set, elm", - FuncOnSets ) ); - InitHandlerFunc( FuncOnRight, "OnRight"); - AssGVar( GVarName( "OnRight" ), - NewFunctionC( "OnRight", 2L, "pnt, elm", - FuncOnRight ) ); - InitHandlerFunc( FuncOnLeft, "OnLeftAntiOperation"); - AssGVar( GVarName( "OnLeftAntiOperation" ), - NewFunctionC( "OnLeftAntiOperation", 2L, "pnt, elm", - FuncOnLeft ) ); - InitHandlerFunc( FuncOnLeftInverse, "OnLeftInverse"); - AssGVar( GVarName( "OnLeftInverse" ), - NewFunctionC( "OnLeftInverse", 2L, "pnt, elm", - FuncOnLeftInverse ) ); - InitHandlerFunc( DepthVectorHandler, "Depthvector"); - AssGVar( GVarName( "DepthVector" ), - NewFunctionC( "DepthVector", 1L, "list", - DepthVectorHandler ) ); + C_NEW_GVAR_FUNC( "SORT_LIST_COMP", 2, "list, func", + SortListCompHandler, + "src/listfunc.c:SORT_LIST_COMP" ); + + + /* make and install the `OnSomething' functions */ + C_NEW_GVAR_FUNC( "OnPoints", 2, "pnt, elm", + FuncOnPoints, + "src/listfunc.c:OnPoints" ); + + C_NEW_GVAR_FUNC( "OnPairs", 2, "pair, elm", + FuncOnPairs, + "src/listfunc.c:OnPairs" ); + + C_NEW_GVAR_FUNC( "OnTuples", 2, "tuple, elm", + FuncOnTuples, + "src/listfunc.c:OnTuples" ); + + C_NEW_GVAR_FUNC( "OnSets", 2, "set, elm", + FuncOnSets, + "src/listfunc.c:OnSets" ); + + C_NEW_GVAR_FUNC( "OnRight", 2, "pnt, elm", + FuncOnRight, + "src/listfunc.c:OnRight" ); + + C_NEW_GVAR_FUNC( "OnLeftAntiOperation", 2, "pnt, elm", + FuncOnLeft, + "src/listfunc.c:OnLeftAntiOperation" ); + + C_NEW_GVAR_FUNC( "OnLeftInverse", 2, "pnt, elm", + FuncOnLeftInverse, + "src/listfunc.c:OnLeftInverse" ); + + C_NEW_GVAR_FUNC( "Depthvector", 1, "list", + DepthVectorHandler, + "src/listfunc.c:Depthvector" ); } +/**************************************************************************** +** +*F CheckListFunc() . check the initialisation of the lists functions package +*/ +void CheckListFunc ( void ) +{ + SET_REVISION( "listfunc_c", Revision_listfunc_c ); + SET_REVISION( "listfunc_h", Revision_listfunc_h ); +} + + +/**************************************************************************** +** + +*E listfunc.c . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/listfunc.h b/src/listfunc.h index 29b08685b8..edc6d8f845 100644 --- a/src/listfunc.h +++ b/src/listfunc.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A listfunc.h GAP source Martin Schoenert +*W listfunc.h GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -9,13 +9,14 @@ ** This file declares the functions for generic lists. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_listfunc_h = +SYS_CONST char * Revision_listfunc_h = "@(#)$Id$"; #endif /**************************************************************************** ** + *F AddList(,) . . . . . . . . add an object to the end of a list ** ** 'AddList' adds the object to the end of the list , i.e., @@ -84,11 +85,38 @@ extern UInt RemoveDupsDensePlist ( /**************************************************************************** ** -*F InitListFunc() . . . . . . . . . . . initialize lists functions package + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + +*F SetupListFunc() . . . . . . . . . initialize the lists functions package +*/ +extern void SetupListFunc ( void ); + + +/**************************************************************************** +** +*F InitListFunc() . . . . . . . . . initialize the lists functions package ** ** 'InitListFunc' initializes the lists functions package. */ -extern void InitListFunc ( void ); +extern void InitListFunc ( void ); + +/**************************************************************************** +** +*F CheckListFunc() . check the initialisation of the lists functions package +*/ +extern void CheckListFunc ( void ); +/**************************************************************************** +** + +*E listfunc.h . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ + diff --git a/src/listoper.c b/src/listoper.c index 256d8dc57e..3581acb544 100644 --- a/src/listoper.c +++ b/src/listoper.c @@ -16,28 +16,31 @@ SYS_CONST char * Revision_listoper_c = #include "sysfiles.h" /* file input/output */ -#include "gasman.h" /* NewBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, types */ -#include "scanner.h" /* Pr */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ -#include "gvars.h" /* AssGVar, GVarName */ +#include "gap.h" /* error handling, initialisation */ -#include "calls.h" /* NewFunctionC */ +#include "gvars.h" /* global variables */ -#include "ariths.h" /* generic operations package */ -#include "lists.h" /* XTNum, LEN_LIST, ELM_LIST, ... */ +#include "calls.h" /* generic call mechanism */ -#include "bool.h" /* True, False */ +#include "ariths.h" /* basic arithmetic */ -#include "integer.h" /* TypDigit */ +#include "bool.h" /* booleans */ -#define INCLUDE_DECLARATION_PART -#include "listoper.h" /* declaration part of the package */ -#undef INCLUDE_DECLARATION_PART +#include "integer.h" /* integers */ -#include "plist.h" /* LEN_PLIST, SET_LEN_PLIST, ... */ +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ -#include "gap.h" /* Error */ +#include "lists.h" /* generic lists */ +#define INCLUDE_DECLARATION_PART +#include "listoper.h" /* operations for generic lists */ +#undef INCLUDE_DECLARATION_PART +#include "plist.h" /* plain lists */ +#include "string.h" /* strings */ /**************************************************************************** @@ -85,8 +88,6 @@ Int EqListList ( return 1L; } -Obj EqListListFunc; - Obj EqListListHandler ( Obj self, Obj listL, @@ -137,8 +138,6 @@ Int LtListList ( return (lenL < lenR); } -Obj LtListListFunc; - Obj LtListListHandler ( Obj self, Obj listL, @@ -162,8 +161,6 @@ Int InList ( return POS_LIST( listR, objL, 0L ); } -Obj InListDefaultFunc; - Obj InListDefaultHandler ( Obj self, Obj obj, @@ -293,8 +290,6 @@ Obj SumListList ( return listS; } -Obj SumSclListFunc; - Obj SumSclListHandler ( Obj self, Obj listL, @@ -303,8 +298,6 @@ Obj SumSclListHandler ( return SumSclList( listL, listR ); } -Obj SumListSclFunc; - Obj SumListSclHandler ( Obj self, Obj listL, @@ -313,8 +306,6 @@ Obj SumListSclHandler ( return SumListScl( listL, listR ); } -Obj SumListListFunc; - Obj SumListListHandler ( Obj self, Obj listL, @@ -369,8 +360,6 @@ Obj ZeroListDefault ( return res; } -Obj ZeroListDefaultFunc; - Obj ZeroListDefaultHandler ( Obj self, Obj list ) @@ -423,8 +412,6 @@ Obj AInvListDefault ( return res; } -Obj AInvListDefaultFunc; - Obj AInvListDefaultHandler ( Obj self, Obj list ) @@ -553,8 +540,6 @@ Obj DiffListList ( return listD; } -Obj DiffSclListFunc; - Obj DiffSclListHandler ( Obj self, Obj listL, @@ -563,8 +548,6 @@ Obj DiffSclListHandler ( return DiffSclList( listL, listR ); } -Obj DiffListSclFunc; - Obj DiffListSclHandler ( Obj self, Obj listL, @@ -573,8 +556,6 @@ Obj DiffListSclHandler ( return DiffListScl( listL, listR ); } -Obj DiffListListFunc; - Obj DiffListListHandler ( Obj self, Obj listL, @@ -709,8 +690,6 @@ Obj ProdListList ( return listP; } -Obj ProdSclListFunc; - Obj ProdSclListHandler ( Obj self, Obj listL, @@ -719,8 +698,6 @@ Obj ProdSclListHandler ( return ProdSclList( listL, listR ); } -Obj ProdListSclFunc; - Obj ProdListSclHandler ( Obj self, Obj listL, @@ -729,8 +706,6 @@ Obj ProdListSclHandler ( return ProdListScl( listL, listR ); } -Obj ProdListListFunc; - Obj ProdListListHandler ( Obj self, Obj listL, @@ -799,8 +774,6 @@ Obj OneMatrix ( return res; } -Obj OneMatrixFunc; - Obj OneMatrixHandler ( Obj self, Obj list ) @@ -928,8 +901,6 @@ Obj InvMatrix ( return res; } -Obj InvMatrixFunc; - Obj InvMatrixHandler ( Obj self, Obj list ) @@ -1083,8 +1054,6 @@ Obj PowMatrixInt ( return res; } -Obj PowMatrixIntFunc; - Obj PowMatrixIntHandler ( Obj self, Obj opL, @@ -1116,9 +1085,14 @@ Obj CommList ( /**************************************************************************** ** -*F InitListOper() . . . . . . . . . . . initialize generic list operations +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** ** -** 'InitListOper' initializes the generic list operations. + +*F SetupListOper() . . . . . . . . . initialize the generic list operations ** ** C = constant, R = record, L = list, X = extrnl, V = virtual ** @@ -1132,7 +1106,7 @@ Obj CommList ( Char * CAT = "ssssssss----ssiiiiiiiieeiiiiiiiiiiiivvvvvvvvvvvvvvvv-----------------mm]"; -void InitListOper ( void ) +void SetupListOper ( void ) { UInt t1; /* type of left operand */ UInt t2; /* type of right operand */ @@ -1256,91 +1230,95 @@ void InitListOper ( void ) } } +} + - InitHandlerFunc( EqListListHandler, "EQ_LIST_LIST_DEFAULT"); - EqListListFunc = NewFunctionC( - "EQ_LIST_LIST_DEFAULT", 2L, "listL, listR", EqListListHandler ); - AssGVar( GVarName( "EQ_LIST_LIST_DEFAULT" ), EqListListFunc ); - - InitHandlerFunc( LtListListHandler, "LT_LIST_LIST_DEFAULT"); - LtListListFunc = NewFunctionC( - "LT_LIST_LIST_DEFAULT", 2L, "listL, listR", LtListListHandler ); - AssGVar( GVarName( "LT_LIST_LIST_DEFAULT" ), LtListListFunc ); - - InitHandlerFunc( InListDefaultHandler, "IN_LIST_DEFAULT"); - InListDefaultFunc = NewFunctionC( - "IN_LIST_DEFAULT", 2L, "obj, list", InListDefaultHandler ); - AssGVar( GVarName( "IN_LIST_DEFAULT" ), InListDefaultFunc ); - - InitHandlerFunc( SumSclListHandler, "SUM_SCL_LIST_DEFAULT"); - SumSclListFunc = NewFunctionC( - "SUM_SCL_LIST_DEFAULT", 2L, "listL, listR", SumSclListHandler ); - AssGVar( GVarName( "SUM_SCL_LIST_DEFAULT" ), SumSclListFunc ); - - InitHandlerFunc( SumListSclHandler, "SUM_LIST_SCL_DEFAULT"); - SumListSclFunc = NewFunctionC( - "SUM_LIST_SCL_DEFAULT", 2L, "listL, listR", SumListSclHandler ); - AssGVar( GVarName( "SUM_LIST_SCL_DEFAULT" ), SumListSclFunc ); - - InitHandlerFunc( SumListListHandler, "SUM_LIST_LIST_DEFAULT"); - SumListListFunc = NewFunctionC( - "SUM_LIST_LIST_DEFAULT", 2L, "listL, listR", SumListListHandler ); - AssGVar( GVarName( "SUM_LIST_LIST_DEFAULT" ), SumListListFunc ); - - InitHandlerFunc( ZeroListDefaultHandler, "ZERO_LIST_DEFAULT"); - ZeroListDefaultFunc = NewFunctionC( - "ZERO_LIST_DEFAULT", 1L, "list", ZeroListDefaultHandler ); - AssGVar( GVarName( "ZERO_LIST_DEFAULT" ), ZeroListDefaultFunc ); - - InitHandlerFunc( AInvListDefaultHandler, "AINV_LIST_DEFAULT"); - AInvListDefaultFunc = NewFunctionC( - "AINV_LIST_DEFAULT", 1L, "list", AInvListDefaultHandler ); - AssGVar( GVarName( "AINV_LIST_DEFAULT" ), AInvListDefaultFunc ); - - InitHandlerFunc( DiffSclListHandler, "DIFF_SCL_LIST_DEFAULT"); - DiffSclListFunc = NewFunctionC( - "DIFF_SCL_LIST_DEFAULT", 2L, "listL, listR", DiffSclListHandler ); - AssGVar( GVarName( "DIFF_SCL_LIST_DEFAULT" ), DiffSclListFunc ); - - InitHandlerFunc( DiffListSclHandler, "DIFF_LIST_SCL_DEFAULT"); - DiffListSclFunc = NewFunctionC( - "DIFF_LIST_SCL_DEFAULT", 2L, "listL, listR", DiffListSclHandler ); - AssGVar( GVarName( "DIFF_LIST_SCL_DEFAULT" ), DiffListSclFunc ); - - InitHandlerFunc( DiffListListHandler, "DIFF_LIST_LIST_DEFAULT"); - DiffListListFunc = NewFunctionC( - "DIFF_LIST_LIST_DEFAULT", 2L, "listL, listR", DiffListListHandler ); - AssGVar( GVarName( "DIFF_LIST_LIST_DEFAULT" ), DiffListListFunc ); - - InitHandlerFunc( ProdSclListHandler, "PROD_SCL_LIST_DEFAULT"); - ProdSclListFunc = NewFunctionC( - "PROD_SCL_LIST_DEFAULT", 2L, "listL, listR", ProdSclListHandler ); - AssGVar( GVarName( "PROD_SCL_LIST_DEFAULT" ), ProdSclListFunc ); - - InitHandlerFunc( ProdListSclHandler, "PROD_LIST_SCL_DEFAULT"); - ProdListSclFunc = NewFunctionC( - "PROD_LIST_SCL_DEFAULT", 2L, "listL, listR", ProdListSclHandler ); - AssGVar( GVarName( "PROD_LIST_SCL_DEFAULT" ), ProdListSclFunc ); - - InitHandlerFunc( ProdListListHandler, "PROD_LIST_LIST_DEFAULT"); - ProdListListFunc = NewFunctionC( - "PROD_LIST_LIST_DEFAULT", 2L, "listL, listR", ProdListListHandler ); - AssGVar( GVarName( "PROD_LIST_LIST_DEFAULT" ), ProdListListFunc ); - - InitHandlerFunc( OneMatrixHandler, "ONE_MATRIX"); - OneMatrixFunc = NewFunctionC( - "ONE_MATRIX", 1L, "list", OneMatrixHandler ); - AssGVar( GVarName( "ONE_MATRIX" ), OneMatrixFunc ); - - InitHandlerFunc( InvMatrixHandler, "INV_MATRIX"); - InvMatrixFunc = NewFunctionC( - "INV_MATRIX", 1L, "list", InvMatrixHandler ); - AssGVar( GVarName( "INV_MATRIX" ), InvMatrixFunc ); - - InitHandlerFunc( PowMatrixIntHandler, "POW_MATRIX_INT"); - InvMatrixFunc = NewFunctionC( - "POW_MATRIX_INT", 2L, "list, int", PowMatrixIntHandler ); - AssGVar( GVarName( "POW_MATRIX_INT" ), PowMatrixIntFunc ); +/**************************************************************************** +** +*F InitListOper() . . . . . . . . . initialize the generic list operations +** +** 'InitListOper' initializes the generic list operations. +*/ +void InitListOper ( void ) +{ + C_NEW_GVAR_FUNC( "EQ_LIST_LIST_DEFAULT", 2, "listL, listR", + EqListListHandler, + "src/listoper.c:EQ_LIST_LIST_DEFAULT" ); + + C_NEW_GVAR_FUNC( "LT_LIST_LIST_DEFAULT", 2, "listL, listR", + LtListListHandler, + "src/listoper.c:LT_LIST_LIST_DEFAULT" ); + + C_NEW_GVAR_FUNC( "IN_LIST_DEFAULT", 2, "obj, list", + InListDefaultHandler, + "src/listoper.c:IN_LIST_DEFAULT" ); + + C_NEW_GVAR_FUNC( "SUM_SCL_LIST_DEFAULT", 2, "listL, listR", + SumSclListHandler, + "src/listoper.c:SUM_SCL_LIST_DEFAULT" ); + + C_NEW_GVAR_FUNC( "SUM_LIST_SCL_DEFAULT", 2, "listL, listR", + SumListSclHandler, + "src/listoper.c:SUM_LIST_SCL_DEFAULT" ); + + C_NEW_GVAR_FUNC( "SUM_LIST_LIST_DEFAULT", 2, "listL, listR", + SumListListHandler, + "src/listoper.c:SUM_LIST_LIST_DEFAULT" ); + + C_NEW_GVAR_FUNC( "ZERO_LIST_DEFAULT", 1, "list", + ZeroListDefaultHandler, + "src/listoper.c:ZERO_LIST_DEFAULT" ); + + C_NEW_GVAR_FUNC( "AINV_LIST_DEFAULT", 1, "list", + AInvListDefaultHandler, + "src/listoper.c:AINV_LIST_DEFAULT" ); + + C_NEW_GVAR_FUNC( "DIFF_SCL_LIST_DEFAULT", 2, "listL, listR", + DiffSclListHandler, + "src/listoper.c:DIFF_SCL_LIST_DEFAULT" ); + + C_NEW_GVAR_FUNC( "DIFF_LIST_SCL_DEFAULT", 2, "listL, listR", + DiffListSclHandler, + "src/listoper.c:DIFF_LIST_SCL_DEFAULT" ); + + C_NEW_GVAR_FUNC( "DIFF_LIST_LIST_DEFAULT", 2, "listL, listR", + DiffListListHandler, + "src/listoper.c:DIFF_LIST_LIST_DEFAULT" ); + + C_NEW_GVAR_FUNC( "PROD_SCL_LIST_DEFAULT", 2, "listL, listR", + ProdSclListHandler, + "src/listoper.c:PROD_SCL_LIST_DEFAULT" ); + + C_NEW_GVAR_FUNC( "PROD_LIST_SCL_DEFAULT", 2, "listL, listR", + ProdListSclHandler, + "src/listoper.c:PROD_LIST_SCL_DEFAULT" ); + + C_NEW_GVAR_FUNC( "PROD_LIST_LIST_DEFAULT", 2, "listL, listR", + ProdListListHandler, + "src/listoper.c:PROD_LIST_LIST_DEFAULT" ); + + C_NEW_GVAR_FUNC( "ONE_MATRIX", 1, "list", + OneMatrixHandler, + "src/listoper.c:ONE_MATRIX" ); + + C_NEW_GVAR_FUNC( "INV_MATRIX", 1, "list", + InvMatrixHandler, + "src/listoper.c:INV_MATRIX" ); + + C_NEW_GVAR_FUNC( "POW_MATRIX_INT", 2, "list, int", + PowMatrixIntHandler, + "src/listoper.c:POW_MATRIX_INT" ); +} + + +/**************************************************************************** +** +*F CheckListOper() . check the initialisation of the generic list operations +*/ +void CheckListOper ( void ) +{ + SET_REVISION( "listoper_c", Revision_listoper_c ); + SET_REVISION( "listoper_h", Revision_listoper_h ); } diff --git a/src/listoper.h b/src/listoper.h index f1343f02c1..fb73a1f5e6 100644 --- a/src/listoper.h +++ b/src/listoper.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A listoper.h GAP source Martin Schoenert +*W listoper.h GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -10,7 +10,7 @@ ** generic lists. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_listoper_h = +SYS_CONST char * Revision_listoper_h = "@(#)$Id$"; #endif @@ -22,11 +22,46 @@ extern Obj ProdListScl ( /**************************************************************************** ** -*F InitListOper() . . . . . . . . . . . initialize generic list operations + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + +*F SetupListOper() . . . . . . . . . initialize the generic list operations +** +** C = constant, R = record, L = list, X = extrnl, V = virtual +** +** s = scalar, v = vector, m = matrix, e = empty, - = nothing +** i = incomplete type (call 'XTNum' and try again), ] = end marker +** +** 0 0 1 1 2 2 3 3 4 4 5 5 6 6 +** 0 5 0 5 0 5 0 5 0 5 0 5 0 5 +** CCCCCCCCCCCCRRLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLXXXXVVV +*/ +extern void SetupListOper ( void ); + + +/**************************************************************************** +** +*F InitListOper() . . . . . . . . . initialize the generic list operations ** ** 'InitListOper' initializes the generic list operations. */ -extern void InitListOper ( void ); +extern void InitListOper ( void ); +/**************************************************************************** +** +*F CheckListOper() . check the initialisation of the generic list operations +*/ +extern void CheckListOper ( void ); + +/**************************************************************************** +** + +*E listoper.h . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/lists.c b/src/lists.c index 074fdca923..865e8108ff 100644 --- a/src/lists.c +++ b/src/lists.c @@ -18,36 +18,36 @@ ** 'LEN_PLIST', 'SET_LEN_PLIST', 'ELM_PLIST', and 'SET_ELM_PLIST' exported ** by the plain list package to access and modify plain lists. */ -char * Revision_lists_c = +#include "system.h" /* Ints, UInts */ + +SYS_CONST char * Revision_lists_c = "@(#)$Id$"; -#include "system.h" /* Ints, UInts */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ -#include "gasman.h" /* NewBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, SIZE_OBJ, ... */ -#include "scanner.h" /* Pr */ +#include "gap.h" /* error handling, initialisation */ -#include "gvars.h" /* AssGVar, GVarName */ +#include "gvars.h" /* global variables */ -#include "calls.h" /* ObjFunc */ -#include "opers.h" /* NewFilter, NewOperation, ... */ -#include "ariths.h" /* EQ, LT */ +#include "calls.h" /* generic call mechanism */ +#include "opers.h" /* generic operations */ +#include "ariths.h" /* basic arithmetic */ -#include "records.h" /* RNamName (for TYPES_LIST_FAM) */ +#include "records.h" /* generic records */ #define INCLUDE_DECLARATION_PART -#include "lists.h" /* declaration part of the package */ +#include "lists.h" /* generic lists */ #undef INCLUDE_DECLARATION_PART -#include "bool.h" /* True, False */ +#include "bool.h" /* booleans */ -#include "precord.h" /* ElmPRec (for TYPES_LIST_FAM) */ +#include "precord.h" /* plain records */ -#include "plist.h" /* LEN_PLIST, SET_LEN_PLIST, ... */ -#include "range.h" /* IS_RANGE, GET_LEN_RANGE, ... */ -#include "string.h" /* strings and characters */ - -#include "gap.h" /* Error */ +#include "plist.h" /* plain lists */ +#include "range.h" /* ranges */ +#include "string.h" /* strings */ /**************************************************************************** @@ -183,7 +183,7 @@ Int LenListError ( { list = ErrorReturnObj( "Length: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list)].name), 0L, + (Int)TNAM_OBJ(list), 0L, "you can return a list for " ); return LEN_LIST( list ); } @@ -198,7 +198,7 @@ Int LenListObject ( while ( TNUM_OBJ(len) != T_INT || INT_INTOBJ(len) < 0 ) { len = ErrorReturnObj( "Length: method must return a nonnegative value (not a %s)", - (Int)(InfoBags[TNUM_OBJ(len)].name), 0L, + (Int)TNAM_OBJ(len), 0L, "you can return a nonnegative integer value for " ); } return INT_INTOBJ( len ); @@ -246,7 +246,7 @@ Int IsbListError ( { list = ErrorReturnObj( "IsBound: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list)].name), 0L, + (Int)TNAM_OBJ(list), 0L, "you can return a list for " ); return ISB_LIST( list, pos ); } @@ -307,7 +307,7 @@ Obj Elm0ListError ( { list = ErrorReturnObj( "List Element: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list)].name), 0L, + (Int)TNAM_OBJ(list), 0L, "you can return a list for " ); return ELM0_LIST( list, pos ); } @@ -319,10 +319,11 @@ Obj Elm0ListObject ( Obj elm; elm = DoOperation2Args( Elm0ListOper, list, INTOBJ_INT(pos) ); if ( elm == Fail ) { - return 0; - } - else { - return elm; + return + (DoOperation2Args( IsbListOper, list, INTOBJ_INT(pos) ) == True) + ? Fail : 0; + } else { + return elm; } } @@ -375,7 +376,7 @@ Obj ElmListError ( { list = ErrorReturnObj( "List Element: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list)].name), 0L, + (Int)TNAM_OBJ(list), 0L, "you can return a list for " ); return ELM_LIST( list, pos ); } @@ -384,7 +385,12 @@ Obj ElmListObject ( Obj list, Int pos ) { - return DoOperation2Args( ElmListOper, list, INTOBJ_INT(pos) ); + Obj elm; + elm = DoOperation2Args( ElmListOper, list, INTOBJ_INT(pos) ); + while (elm == 0) + elm = ErrorReturnObj("List access method must return a value",0L,0L, + "you can return a value or quit"); + return elm; } @@ -424,7 +430,7 @@ Obj ElmsListError ( { list = ErrorReturnObj( "List Elements: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list)].name), 0L, + (Int)TNAM_OBJ(list), 0L, "you can return a list for " ); return ELMS_LIST( list, poss ); } @@ -542,7 +548,12 @@ Obj ElmsListObject ( Obj list, Obj poss ) { - return DoOperation2Args( ElmsListOper, list, poss ); + Obj elm; + elm = DoOperation2Args( ElmsListOper, list, poss ); + while (elm == 0) + elm = ErrorReturnObj("List multi-access method must return a value", 0L, 0L, + "You can return a value or quit"); + return elm; } Obj ElmsListDefaultFunc; @@ -584,7 +595,7 @@ void UnbListError ( { list = ErrorReturnObj( "Unbind: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list)].name), 0L, + (Int)TNAM_OBJ(list), 0L, "you can return a list for " ); UNB_LIST( list, pos ); } @@ -642,7 +653,7 @@ void AssListError ( { list = ErrorReturnObj( "List Assignment: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list)].name), 0L, + (Int)TNAM_OBJ(list), 0L, "you can return a list for " ); ASS_LIST( list, pos, obj ); } @@ -703,7 +714,7 @@ void AsssListError ( { list = ErrorReturnObj( "List Assignments: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list)].name), 0L, + (Int)TNAM_OBJ(list), 0L, "you can return a list for " ); ASSS_LIST( list, poss, objs ); } @@ -1112,8 +1123,6 @@ Int IsSSortListObject ( return (DoProperty( IsSSortListProp, obj ) == True); } -Obj IsSSortListDefaultFunc; - Obj IsSSortListDefaultHandler ( Obj self, Obj obj ) @@ -1256,7 +1265,7 @@ Obj PosListHandler3 ( while ( ! IS_INTOBJ(start) || INT_INTOBJ(start) < 0 ) { start = ErrorReturnObj( "Position: must be a nonnegative integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(start)].name), 0L, + (Int)TNAM_OBJ(start), 0L, "you can return a nonnegative integer for " ); } pos = POS_LIST( list, obj, INT_INTOBJ(start) ); @@ -1270,7 +1279,7 @@ Int PosListError ( { list = ErrorReturnObj( "Position: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list)].name), 0L, + (Int)TNAM_OBJ(list), 0L, "you can return a list for " ); return POS_LIST( list, obj, start ); } @@ -1314,14 +1323,12 @@ Int PosListObject ( while ( pos!=Fail && ( TNUM_OBJ(pos)!=T_INT || INT_INTOBJ(pos)<1 ) ) { pos = ErrorReturnObj( "Position: method must return a positive integer (not a %s) or fail", - (Int)(InfoBags[TNUM_OBJ(pos)].name), 0L, + (Int)TNAM_OBJ(pos), 0L, "you can return a positive integer for or fail" ); } return ( pos == Fail ? 0 : INT_INTOBJ( pos ) ); } -Obj PosListDefaultFunc; - Obj PosListDefaultHandler ( Obj self, Obj list, @@ -1478,7 +1485,7 @@ void AssListLevel ( if ( ! IS_DENSE_LIST(objs) ) { objs = ErrorReturnObj( "List Assignment: must be a dense list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(objs)].name), 0L, + (Int)TNAM_OBJ(objs), 0L, "you can return a new dense list for " ); } if ( LEN_LIST(lists) != LEN_LIST(objs) ) { @@ -1556,7 +1563,7 @@ void AsssListLevel ( if ( ! IS_DENSE_LIST(objs) ) { objs = ErrorReturnObj( "List Assignment: must be a dense list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(objs)].name), 0L, + (Int)TNAM_OBJ(objs), 0L, "you can return a new dense list for " ); } if ( LEN_LIST(lists) != LEN_LIST(objs) ) { @@ -1584,7 +1591,7 @@ void AsssListLevel ( if ( ! IS_DENSE_LIST( obj ) ) { obj = ErrorReturnObj( "List Assignments: must be a dense list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(obj)].name), 0L, + (Int)TNAM_OBJ(obj), 0L, "you can return a new dense list for " ); } if ( LEN_LIST( poss ) != LEN_LIST( obj ) ) { @@ -1649,7 +1656,7 @@ void PlainListError ( { ErrorQuit( "Panic: cannot convert (is a %s) to a plain list", - (Int)(InfoBags[TNUM_OBJ(list)].name), 0L ); + (Int)TNAM_OBJ(list), 0L ); } @@ -1759,9 +1766,9 @@ void PrintListDefault ( { Obj elm; - if ( IsStringConv(list) && MUTABLE_TNUM(TNUM_OBJ(list))==T_STRING ) { - PrintString(list); - return; + if ( 0 < LEN_LIST(list) && IsStringConv(list) ) { + PrintString(list); + return; } Pr("%2>[ %2>",0L,0L); @@ -1788,19 +1795,197 @@ void PrintPathList ( /**************************************************************************** ** -*F InitLists() . . . . . . . . . . . . . initialize the generic list package + +*V SetFiltListTNums[ ][ ] . . . . . new tnum after filter set ** -** 'InitLists' initializes the dispatch tables with the error handlers. +** If a list with type number gains the filter with filter number +** , then the new type number is stored in: +** +** `SetFiltListTNums[][]' +** +** The macro `SET_FILT_LIST' is used to set the filter for a list by +** changing its type number. +*/ +Int SetFiltListTNums [ LAST_REAL_TNUM ] [ LAST_FN ]; + + +/**************************************************************************** +** +*V ResetFiltListTNums[ ][ ] . . . new tnum after filter reset +** +** If a list with type number loses the filter with filter number +** , then the new type number is stored in: +** +** `ResetFiltListTNums[][]' +** +** The macro `RESET_FILT_LIST' is used to set the filter for a list by +** changing its type number. +*/ +Int ResetFiltListTNums [ LAST_REAL_TNUM ] [ LAST_FN ]; + + +/**************************************************************************** +** +*V HasFiltListTNums[ ][ ] . . . . . . . . . . . . has filter +*/ +Int HasFiltListTNums [ LAST_REAL_TNUM ] [ LAST_FN ]; + + +/**************************************************************************** +** +*V ClearFiltsTNums[ ] . clear all list filters except `FN_IS_MUTABLE' +** +** The type number without any known properties of a list of type number +** is stored in: +** +** `ClearPropsTNums[]' +** +** The macro `CLEAR_PROPS_LIST' is used to clear all properties of a list. +*/ +Int ClearFiltsTNums [ LAST_REAL_TNUM ]; + + +/**************************************************************************** +** + +*F * * * * * * * * * * * functions with checking * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + +*F ElmsListCheck( , ) . . . . . . . . . . . . . . . . ELMS_LIST +*/ +Obj ElmsListCheck ( + Obj list, + Obj poss ) +{ + if ( ! IS_POSS_LIST(poss) ) { + ErrorQuit( + "List Elements: must be a dense list of positive integers", + 0L, 0L ); + } + return ELMS_LIST( list, poss ); +} + + +/**************************************************************************** +** +*F ElmsListLevelCheck( , , ) . . . . . . ElmsListLevel +*/ +void ElmsListLevelCheck ( + Obj lists, + Obj poss, + Int level ) +{ + if ( ! IS_POSS_LIST(poss) ) { + ErrorQuit( + "List Elements: must be a dense list of positive integers", + 0L, 0L ); + } + ElmsListLevel( lists, poss, level ); +} + + +/**************************************************************************** +** +*F AsssListCheck( , , ) . . . . . . . . . . . . ASSS_LIST +*/ +void AsssListCheck ( + Obj list, + Obj poss, + Obj rhss ) +{ + if ( ! IS_POSS_LIST(poss) ) { + ErrorQuit( + "List Assignment: must be a dense list of positive integers", + 0L, 0L ); + } + if ( ! IS_DENSE_LIST(rhss) ) { + ErrorQuit( + "List Assignment: must be a dense list", + 0L, 0L ); + } + if ( LEN_LIST( poss ) != LEN_LIST( rhss ) ) { + ErrorQuit( + "List Assignment: must have the same length as (%d)", + (Int)LEN_LIST(poss), 0L ); + } + ASSS_LIST( list, poss, rhss ); +} + + +/**************************************************************************** +** +*F AsssPosObjCheck( , , ) . . . . . . . . . . . ASSS_LIST +*/ +void AsssPosObjCheck ( + Obj list, + Obj poss, + Obj rhss ) +{ + if ( ! IS_POSS_LIST(poss) ) { + ErrorQuit( + "List Assignment: must be a dense list of positive integers", + 0L, 0L ); + } + if ( ! IS_DENSE_LIST(rhss) ) { + ErrorQuit( + "List Assignment: must be a dense list", + 0L, 0L ); + } + if ( LEN_LIST( poss ) != LEN_LIST( rhss ) ) { + ErrorQuit( + "List Assignment: must have the same length as (%d)", + (Int)LEN_LIST(poss), 0L ); + } + if ( TNUM_OBJ(list) == T_POSOBJ ) { + ErrorQuit( "sorry: !{} not yet implemented", 0L, 0L ); + } + else { + ASSS_LIST( list, poss, rhss ); + } +} + + +/**************************************************************************** +** +*F AsssListLevelCheck( , , , ) . . AsssListLevel +*/ +void AsssListLevelCheck ( + Obj lists, + Obj poss, + Obj rhss, + Int level ) +{ + if ( ! IS_POSS_LIST(poss) ) { + ErrorQuit( + "List Assignment: must be a dense list of positive integers", + 0L, 0L ); + } + AsssListLevel( lists, poss, rhss, level ); +} + + +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * */ -void InitLists () + + +/**************************************************************************** +** + +*F SetupLists() . . . . . . . . . . . . initialize the generic list package +*/ +void SetupLists ( void ) { UInt type; /* loop variable */ + Int i; /* loop variable */ /* make and install the 'IS_LIST' filter */ - InitHandlerFunc( IsListHandler, "IS_LIST" ); - IsListFilt = NewFilterC( - "IS_LIST", 1L, "obj", IsListHandler ); - AssGVar( GVarName( "IS_LIST" ), IsListFilt ); for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) { IsListFuncs[ type ] = IsListNot; } @@ -1811,14 +1996,8 @@ void InitLists () IsListFuncs[ type ] = IsListObject; } - /* make and install the length attribute */ - C_NEW_GVAR_ATTR( "LENGTH", "list", LengthAttr, LENGTHHandler, - "src/lists.c:LENGTH" ); /* make and install the 'LEN_LIST' function */ - C_NEW_GVAR_FUNC( "LEN_LIST", 1L, "list", LenListHandler, - "src/lists.c:LEN_LIST" ); - for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) { LenListFuncs[ type ] = LenListError; } @@ -1826,27 +2005,21 @@ void InitLists () LenListFuncs[ type ] = LenListObject; } + /* make and install the 'ISB_LIST' operation */ - InitHandlerFunc( IsbListHandler, "ISB_LIST" ); - IsbListOper = NewOperationC( - "ISB_LIST", 2L, "list, pos", IsbListHandler ); - AssGVar( GVarName( "ISB_LIST" ), IsbListOper ); for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) { - IsbListFuncs[ type ] = IsbListError; + IsbListFuncs[ type ] = IsbListError; IsbvListFuncs[ type ] = IsbListError; } for ( type = FIRST_EXTERNAL_TNUM; type <= LAST_EXTERNAL_TNUM; type++ ) { - IsbListFuncs[ type ] = IsbListObject; + IsbListFuncs[ type ] = IsbListObject; IsbvListFuncs[ type ] = IsbListObject; } + /* make and install the 'ELM0_LIST' operation */ - InitHandlerFunc( Elm0ListHandler, "ELM0_LIST" ); - Elm0ListOper = NewOperationC( - "ELM0_LIST", 2L, "list, pos", Elm0ListHandler ); - AssGVar( GVarName( "ELM0_LIST" ), Elm0ListOper ); for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) { - Elm0ListFuncs[ type ] = Elm0ListError; + Elm0ListFuncs[ type ] = Elm0ListError; Elm0vListFuncs[ type ] = Elm0ListError; } for ( type = FIRST_EXTERNAL_TNUM; type <= LAST_EXTERNAL_TNUM; type++ ) { @@ -1854,11 +2027,8 @@ void InitLists () Elm0vListFuncs[ type ] = Elm0ListObject; } + /* make and install the 'ELM_LIST' operation */ - InitHandlerFunc( ElmListHandler, "ELM_LIST" ); - ElmListOper = NewOperationC( - "ELM_LIST", 2L, "list, pos", ElmListHandler ); - AssGVar( GVarName( "ELM_LIST" ), ElmListOper ); for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) { ElmListFuncs[ type ] = ElmListError; ElmvListFuncs[ type ] = ElmListError; @@ -1870,11 +2040,8 @@ void InitLists () ElmwListFuncs[ type ] = ElmListObject; } + /* make and install the 'ELMS_LIST' operation */ - InitHandlerFunc( ElmsListHandler, "ELMS_LIST" ); - ElmsListOper = NewOperationC( - "ELMS_LIST", 2L, "list, poss", ElmsListHandler ); - AssGVar( GVarName( "ELMS_LIST" ), ElmsListOper ); for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) { ElmsListFuncs[ type ] = ElmsListError; } @@ -1886,16 +2053,7 @@ void InitLists () } - InitHandlerFunc( ElmsListDefaultHandler, "ELMS_LIST_DEFAULT"); - ElmsListDefaultFunc = NewFunctionC( - "ELMS_LIST_DEFAULT", 2L, "list, poss", ElmsListDefaultHandler ); - AssGVar( GVarName( "ELMS_LIST_DEFAULT" ), ElmsListDefaultFunc ); - /* make and install the 'UNB_LIST' operation */ - InitHandlerFunc( UnbListHandler, "UNB_LIST" ); - UnbListOper = NewOperationC( - "UNB_LIST", 2L, "list, pos", UnbListHandler ); - AssGVar( GVarName( "UNB_LIST" ), UnbListOper ); for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) { UnbListFuncs[ type ] = UnbListError; } @@ -1906,11 +2064,8 @@ void InitLists () UnbListFuncs[ type ] = UnbListObject; } + /* make and install the 'ASS_LIST' operation */ - InitHandlerFunc( AssListHandler, "ASS_LIST" ); - AssListOper = NewOperationC( - "ASS_LIST", 3L, "list, pos, obj", AssListHandler ); - AssGVar( GVarName( "ASS_LIST" ), AssListOper ); for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) { AssListFuncs[ type ] = AssListError; } @@ -1921,11 +2076,8 @@ void InitLists () AssListFuncs[ type ] = AssListObject; } + /* make and install the 'ASSS_LIST' operation */ - InitHandlerFunc( AsssListHandler, "ASSS_LIST" ); - AsssListOper = NewOperationC( - "ASSS_LIST", 3L, "list, poss, objs", AsssListHandler ); - AssGVar( GVarName( "ASSS_LIST" ), AsssListOper ); for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) { AsssListFuncs[ type ] = AsssListError; } @@ -1936,16 +2088,8 @@ void InitLists () AsssListFuncs[ type ] = AsssListObject; } - InitHandlerFunc( AsssListDefaultHandler, "ASSS_LIST_DEFAULT"); - AsssListDefaultFunc = NewFunctionC( - "ASSS_LIST_DEFAULT", 3L, "list, poss, objs", AsssListDefaultHandler ); - AssGVar( GVarName( "ASSS_LIST_DEFAULT" ), AsssListDefaultFunc ); /* make and install the 'IS_DENSE_LIST' filter */ - InitHandlerFunc( IsDenseListHandler, "IS_DENSE_LIST" ); - IsDenseListFilt = NewFilterC( - "IS_DENSE_LIST", 1L, "obj", IsDenseListHandler ); - AssGVar( GVarName( "IS_DENSE_LIST" ), IsDenseListFilt ); for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) { IsDenseListFuncs[ type ] = IsDenseListNot; } @@ -1956,11 +2100,8 @@ void InitLists () IsDenseListFuncs[ type ] = IsDenseListObject; } + /* make and install the 'IS_HOMOG_LIST' filter */ - InitHandlerFunc( IsHomogListHandler, "IS_HOMOG_LIST" ); - IsHomogListFilt = NewFilterC( - "IS_HOMOG_LIST", 1L, "obj", IsHomogListHandler ); - AssGVar( GVarName( "IS_HOMOG_LIST" ), IsHomogListFilt ); for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) { IsHomogListFuncs[ type ] = IsHomogListNot; } @@ -1971,11 +2112,8 @@ void InitLists () IsHomogListFuncs[ type ] = IsHomogListObject; } + /* make and install the 'IS_TABLE_LIST' filter */ - InitHandlerFunc( IsTableListHandler, "IS_TABLE_LIST" ); - IsTableListFilt = NewFilterC( - "IS_TABLE_LIST", 1L, "obj", IsTableListHandler ); - AssGVar( GVarName( "IS_TABLE_LIST" ), IsTableListFilt ); for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) { IsTableListFuncs[ type ] = IsTableListNot; } @@ -1986,11 +2124,8 @@ void InitLists () IsTableListFuncs[ type ] = IsTableListObject; } + /* make and install the 'IS_SSORT_LIST' property */ - InitHandlerFunc( IsSSortListHandler, "IS_SSORT_LIST" ); - IsSSortListProp = NewPropertyC( - "IS_SSORT_LIST", 1L, "obj", IsSSortListHandler ); - AssGVar( GVarName( "IS_SSORT_LIST" ), IsSSortListProp ); for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) { IsSSortListFuncs[ type ] = IsSSortListNot; } @@ -2001,22 +2136,8 @@ void InitLists () IsSSortListFuncs[ type ] = IsSSortListObject; } - InitHandlerFunc( IsSSortListDefaultHandler, "IS_SSORT_LIST_DEFAULT"); - IsSSortListDefaultFunc = NewFunctionC( - "IS_SSORT_LIST_DEFAULT",1L,"obj", IsSSortListDefaultHandler ); - AssGVar( GVarName( "IS_SSORT_LIST_DEFAULT" ), IsSSortListDefaultFunc ); - - /* make and install the 'IS_NSORT_LIST' property */ - InitHandlerFunc( IsNSortListHandler, "IS_NSORT_LIST" ); - IsNSortListProp = NewPropertyC( - "IS_NSORT_LIST", 1L, "obj", IsNSortListHandler ); - AssGVar( GVarName( "IS_NSORT_LIST" ), IsNSortListProp ); /* make and install the 'IS_POSS_LIST' property */ - InitHandlerFunc( IsPossListHandler, "IS_POSS_LIST" ); - IsPossListProp = NewPropertyC( - "IS_POSS_LIST", 1L, "obj", IsPossListHandler ); - AssGVar( GVarName( "IS_POSS_LIST" ), IsPossListProp ); for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) { IsPossListFuncs[ type ] = IsPossListNot; } @@ -2027,19 +2148,8 @@ void InitLists () IsPossListFuncs[ type ] = IsPossListObject; } - InitHandlerFunc( IsPossListDefaultHandler, "IS_POSS_LIST_DEFAULT"); - IsPossListDefaultFunc = NewFunctionC( - "IS_POSS_LIST_DEFAULT",1L,"obj", IsPossListDefaultHandler ); - AssGVar( GVarName( "IS_POSS_LIST_DEFAULT" ), IsPossListDefaultFunc ); - /* make and install the 'POS_LIST' operation */ - InitHandlerFunc( PosListHandler2, "POS_LIST 2 args" ); - InitHandlerFunc( PosListHandler3, "POS_LIST 3 args" ); - PosListOper = NewOperationC( - "POS_LIST", -1, "list, obj", DoOperation0Args ); - HDLR_FUNC( PosListOper, 2 ) = PosListHandler2; - HDLR_FUNC( PosListOper, 3 ) = PosListHandler3; - AssGVar( GVarName( "POS_LIST" ), PosListOper ); + /* make and install the 'POS_LIST' operation */ for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) { PosListFuncs[ type ] = PosListError; } @@ -2050,18 +2160,12 @@ void InitLists () PosListFuncs[ type ] = PosListObject; } - InitHandlerFunc( PosListDefaultHandler, "POS_LIST_DEFAULT"); - PosListDefaultFunc = NewFunctionC( - "POS_LIST_DEFAULT", 3L, "list, obj, start", PosListDefaultHandler ); - AssGVar( GVarName( "POS_LIST_DEFAULT" ), PosListDefaultFunc ); /* install the error functions into the other tables */ for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) { - PlainListFuncs [ type ] = PlainListError; + PlainListFuncs [ type ] = PlainListError; } - /* whats that? */ - TYPES_LIST_FAM_RNam = RNamName( "TYPES_LIST_FAM" ); /* install the generic mutability test function */ for ( type = FIRST_LIST_TNUM; type <= LAST_LIST_TNUM; type += 2 ) { @@ -2077,6 +2181,370 @@ void InitLists () PrintPathFuncs[ type ] = PrintPathList; } + + /* initialise filter table */ + for ( type = FIRST_LIST_TNUM; type <= LAST_LIST_TNUM; type +=2 ) { + ClearFiltsTNums [ type ] = 0; + ClearFiltsTNums [ type +IMMUTABLE ] = 0; + for ( i = 0; i <= LAST_FN; i++ ) { + SetFiltListTNums [ type ][i] = 0; + SetFiltListTNums [ type +IMMUTABLE ][i] = 0; + ResetFiltListTNums[ type ][i] = 0; + ResetFiltListTNums[ type +IMMUTABLE ][i] = 0; + HasFiltListTNums [ type ][i] = -1; + HasFiltListTNums [ type +IMMUTABLE ][i] = -1; + } + } +} + + + +/**************************************************************************** +** +*F InitLists() . . . . . . . . . . . . . initialize the generic list package +** +** 'InitLists' initializes the dispatch tables with the error handlers. +*/ +void InitLists ( void ) +{ + /* whats that? */ + TYPES_LIST_FAM_RNam = RNamName( "TYPES_LIST_FAM" ); + + + /* make and install the 'IS_LIST' filter */ + C_NEW_GVAR_FILT( "IS_LIST", "obj", IsListFilt, IsListHandler, + "src/lists.c:IS_LIST" ); + + + /* make and install the length attribute */ + C_NEW_GVAR_ATTR( "LENGTH", "list", LengthAttr, LENGTHHandler, + "src/lists.c:LENGTH" ); + + + /* make and install the 'LEN_LIST' function */ + C_NEW_GVAR_FUNC( "LEN_LIST", 1, "list", LenListHandler, + "src/lists.c:LEN_LIST" ); + + + /* make and install the 'ISB_LIST' operation */ + C_NEW_GVAR_OPER( "ISB_LIST", 2, "list, pos", IsbListOper, IsListHandler, + "src/lists.c:ISB_LIST" ); + + + /* make and install the 'ELM0_LIST' operation */ + C_NEW_GVAR_OPER( "ELM0_LIST", 2, "list, pos", Elm0ListOper, Elm0ListHandler, + "src/lists.c:ELM0_LIST" ); + + + /* make and install the 'ELM_LIST' operation */ + C_NEW_GVAR_OPER( "ELM_LIST", 2, "list, pos", ElmListOper, ElmListHandler, + "src/lists.c:ELM_LIST" ); + + + /* make and install the 'ELMS_LIST' operation */ + C_NEW_GVAR_OPER( "ELMS_LIST", 2, "list, poss", ElmsListOper, ElmsListHandler, + "src/lists.c:ELMS_LIST" ); + + C_NEW_GVAR_FUNC( "ELMS_LIST_DEFAULT", 2, "list, poss", + ElmsListDefaultHandler, + "src/list.c:ELMS_LIST_DEFAULT" ); + + + /* make and install the 'UNB_LIST' operation */ + C_NEW_GVAR_OPER( "UNB_LIST", 2, "list, pos", UnbListOper, UnbListHandler, + "src/lists.c:UNB_LIST" ); + + + /* make and install the 'ASS_LIST' operation */ + C_NEW_GVAR_OPER( "ASS_LIST", 3, "list, pos, obj", AssListOper, AssListHandler, + "src/lists.c:ASS_LIST" ); + + + /* make and install the 'ASSS_LIST' operation */ + C_NEW_GVAR_OPER( "ASSS_LIST", 3, "list, poss, objs", AsssListOper, AsssListHandler, + "src/lists.c:ASSS_LIST" ); + + C_NEW_GVAR_FUNC( "ASSS_LIST_DEFAULT", 3, "list, poss, objs", + AsssListDefaultHandler, + "src/list.c:ASSS_LIST_DEFAULT" ); + + + /* make and install the 'IS_DENSE_LIST' filter */ + C_NEW_GVAR_FILT( "IS_DENSE_LIST", "obj", IsDenseListFilt, IsDenseListHandler, + "src/lists.c:IS_DENSE_LIST" ); + + + /* make and install the 'IS_HOMOG_LIST' filter */ + C_NEW_GVAR_FILT( "IS_HOMOG_LIST", "obj", IsHomogListFilt, IsHomogListHandler, + "src/lists.c:IS_HOMOG_LIST" ); + + + /* make and install the 'IS_TABLE_LIST' filter */ + C_NEW_GVAR_FILT( "IS_TABLE_LIST", "obj", IsTableListFilt, IsTableListHandler, + "src/lists.c:IS_TABLE_LIST" ); + + + /* make and install the 'IS_SSORT_LIST' property */ + C_NEW_GVAR_PROP( "IS_SSORT_LIST", "obj", IsSSortListProp, IsSSortListHandler, + "src/lists.c:IS_SSORT_LIST" ); + + C_NEW_GVAR_FUNC( "IS_SSORT_LIST_DEFAULT", 1, "list", + IsSSortListDefaultHandler, + "src/list.c:IS_SSORT_LIST_DEFAULT" ); + + + /* make and install the 'IS_NSORT_LIST' property */ + C_NEW_GVAR_PROP( "IS_NSORT_LIST", "obj", IsNSortListProp, IsNSortListHandler, + "src/lists.c:IS_NSORT_LIST" ); + + + /* make and install the 'IS_POSS_LIST' property */ + C_NEW_GVAR_PROP( "IS_POSS_LIST", "obj", IsPossListProp, IsPossListHandler, + "src/lists.c:IS_POSS_LIST" ); + + C_NEW_GVAR_FUNC( "IS_POSS_LIST_DEFAULT", 1, "list", + IsPossListDefaultHandler, + "src/list.c:IS_POSS_LIST_DEFAULT" ); + + + /* make and install the 'POS_LIST' operation */ + InitHandlerFunc( PosListHandler2, "src/lists.c:PosListHandler2" ); + InitHandlerFunc( PosListHandler3, "src/lists.c:PosListHandler3" ); + C_NEW_GVAR_OPER( "POS_LIST", -1, "list, obj", PosListOper, DoOperation0Args, + "src/lists.c:POS_LIST" ); + if ( ! SyRestoring ) { + HDLR_FUNC( PosListOper, 2 ) = PosListHandler2; + HDLR_FUNC( PosListOper, 3 ) = PosListHandler3; + } + + C_NEW_GVAR_FUNC( "POS_LIST_DEFAULT", 3, "list, obj, start", + PosListDefaultHandler, + "src/list.c:POS_LIST_DEFAULT" ); +} + + + +/**************************************************************************** +** +*F CheckLists() . . . check the initialisation of the generic list package +** +** This function does a few pre-init sanity checks for the various list +** packages. +*/ +void CheckLists ( void ) +{ + Int i; /* loop variable */ + Int j; /* loop variable */ + + Int fnums[] = { FN_IS_MUTABLE, FN_IS_EMPTY, FN_IS_DENSE, + FN_IS_NDENSE, FN_IS_HOMOG, FN_IS_NHOMOG, + FN_IS_TABLE, FN_IS_SSORT, FN_IS_NSORT }; + Char * fnams[] = { "mutable", "empty", "dense", "ndense", + "homog", "nhomog", "table", "ssort", + "nsort" }; + + + SET_REVISION( "lists_c", Revision_lists_c ); + SET_REVISION( "lists_h", Revision_lists_h ); + + /* fix unknown list types */ + for ( i = FIRST_LIST_TNUM; i <= LAST_LIST_TNUM; i +=2 ) { + if ( InfoBags[i].name == 0 ) { + InfoBags[i].name = "unknown list type"; + } + if ( InfoBags[i+IMMUTABLE].name == 0 ) { + InfoBags[i+IMMUTABLE].name = "unknown immutable list type"; + } + } + + return; /* XXX */ + + /* check that all relevant `ClearFiltListTNums' are installed */ + for ( i = FIRST_LIST_TNUM; i <= LAST_LIST_TNUM; i++ ) { + if ( ClearFiltsTNums[i] == 0 ) { + Pr( "#W ClearFiltsListTNums [%s] missing\n", + (Int)(InfoBags[i].name), 0L ); + } + } + + + /* check that all relevant `HasFiltListTNums' are installed */ + for ( i = FIRST_LIST_TNUM; i <= LAST_LIST_TNUM; i++ ) { + for ( j = 0; j < sizeof(fnums)/sizeof(fnums[1]); j++ ) { + if ( HasFiltListTNums[i][fnums[j]] == -1 ) { + Pr( "#W HasFiltListTNums [%s] [%s] missing\n", + (Int)(InfoBags[i].name), (Int)fnams[j] ); + HasFiltListTNums[i][fnums[j]] = 0; + } + } + } + + + /* check that all relevant `SetFiltListTNums' are installed */ + for ( i = FIRST_LIST_TNUM; i <= LAST_LIST_TNUM; i++ ) { + for ( j = 0; j < sizeof(fnums)/sizeof(fnums[1]); j++ ) { + if ( SetFiltListTNums[i][fnums[j]] == 0 ) { + Pr( "#W SetFiltListTNums [%s] [%s] missing\n", + (Int)(InfoBags[i].name), (Int)fnams[j] ); + } + } + } + + + /* check that all relevant `ResetFiltListTNums' are installed */ + for ( i = FIRST_LIST_TNUM; i <= LAST_LIST_TNUM; i++ ) { + for ( j = 0; j < sizeof(fnums)/sizeof(fnums[1]); j++ ) { + if ( ResetFiltListTNums[i][fnums[j]] == 0 ) { + Pr( "#W ResetFiltListTNums [%s] [%s] missing\n", + (Int)(InfoBags[i].name), (Int)fnams[j] ); + } + } + } + + /* if a tnum has a filter, reset must change the tnum */ + for ( i = FIRST_LIST_TNUM; i <= LAST_LIST_TNUM; i++ ) { + for ( j = 0; j < sizeof(fnums)/sizeof(fnums[1]); j++ ) { + if ( HasFiltListTNums[i][fnums[j]] ) { + Int new; + new = ResetFiltListTNums[i][fnums[j]]; + if ( new == i ) { + Pr( + "#W ResetFiltListTNums [%s] [%s] failed to change\n", + (Int)(InfoBags[i].name), (Int)fnams[j] ); + } + else if ( new != -1 && HasFiltListTNums[new][fnums[j]] ) { + Pr( + "#W ResetFiltListTNums [%s] [%s] failed to reset\n", + (Int)(InfoBags[i].name), (Int)fnams[j] ); + } + } + } + } + + /* if a tnum has a filter, set must not change the tnum */ + for ( i = FIRST_LIST_TNUM; i <= LAST_LIST_TNUM; i++ ) { + for ( j = 0; j < sizeof(fnums)/sizeof(fnums[1]); j++ ) { + if ( HasFiltListTNums[i][fnums[j]] ) { + Int new; + new = SetFiltListTNums[i][fnums[j]]; + if ( new != -1 && new != i ) { + Pr( + "#W SetFiltListTNums [%s] [%s] must not change\n", + (Int)(InfoBags[i].name), (Int)fnams[j] ); + } + } + } + } + + /* check implications */ + for ( i = FIRST_LIST_TNUM; i <= LAST_LIST_TNUM; i++ ) { + + if ( HasFiltListTNums[i][FN_IS_EMPTY] ) { + if ( ! HasFiltListTNums[i][FN_IS_DENSE] ) { + Pr( + "#W HasFiltListTNums [%s] [ empty -> dense ] missing\n", + (Int)(InfoBags[i].name), 0L ); + } + if ( HasFiltListTNums[i][FN_IS_NDENSE] ) { + Pr( + "#W HasFiltListTNums [%s] [ empty + ndense ] illegal\n", + (Int)(InfoBags[i].name), 0L ); + } + if ( ! HasFiltListTNums[i][FN_IS_HOMOG] ) { + Pr( + "#W HasFiltListTNums [%s] [ empty -> homog ] missing\n", + (Int)(InfoBags[i].name), 0L ); + } + if ( HasFiltListTNums[i][FN_IS_NHOMOG] ) { + Pr( + "#W HasFiltListTNums [%s] [ empty + nhomog ] illegal\n", + (Int)(InfoBags[i].name), 0L ); + } + if ( ! HasFiltListTNums[i][FN_IS_SSORT] ) { + Pr( + "#W HasFiltListTNums [%s] [ empty -> ssort ] missing\n", + (Int)(InfoBags[i].name), 0L ); + } + if ( HasFiltListTNums[i][FN_IS_NSORT] ) { + Pr( + "#W HasFiltListTNums [%s] [ empty + nsort ] illegal\n", + (Int)(InfoBags[i].name), 0L ); + } + if ( HasFiltListTNums[i][FN_IS_TABLE] ) { + Pr( + "#W HasFiltListTNums [%s] [ empty + table ] illegal\n", + (Int)(InfoBags[i].name), 0L ); + } + } + + if ( HasFiltListTNums[i][FN_IS_DENSE] ) { + if ( HasFiltListTNums[i][FN_IS_NDENSE] ) { + Pr( + "#W HasFiltListTNums [%s] [ dense + ndense ] illegal\n", + (Int)(InfoBags[i].name), 0L ); + } + } + + if ( HasFiltListTNums[i][FN_IS_NDENSE] ) { + if ( HasFiltListTNums[i][FN_IS_HOMOG] ) { + Pr( + "#W HasFiltListTNums [%s] [ ndense + homog ] illegal\n", + (Int)(InfoBags[i].name), 0L ); + } + if ( HasFiltListTNums[i][FN_IS_TABLE] ) { + Pr( + "#W HasFiltListTNums [%s] [ ndense + table ] illegal\n", + (Int)(InfoBags[i].name), 0L ); + } + } + + if ( HasFiltListTNums[i][FN_IS_HOMOG] ) { + if ( HasFiltListTNums[i][FN_IS_NHOMOG] ) { + Pr( + "#W HasFiltListTNums [%s] [ homog + nhomog ] illegal\n", + (Int)(InfoBags[i].name), 0L ); + } + if ( ! HasFiltListTNums[i][FN_IS_DENSE] ) { + Pr( + "#W HasFiltListTNums [%s] [ homog -> dense ] missing\n", + (Int)(InfoBags[i].name), 0L ); + } + if ( HasFiltListTNums[i][FN_IS_NDENSE] ) { + Pr( + "#W HasFiltListTNums [%s] [ homog + ndense ] illegal\n", + (Int)(InfoBags[i].name), 0L ); + } + } + + if ( HasFiltListTNums[i][FN_IS_NHOMOG] ) { + if ( HasFiltListTNums[i][FN_IS_TABLE] ) { + Pr( + "#W HasFiltListTNums [%s] [ nhomog + table ] illegal\n", + (Int)(InfoBags[i].name), 0L ); + } + } + + if ( HasFiltListTNums[i][FN_IS_TABLE] ) { + if ( ! HasFiltListTNums[i][FN_IS_HOMOG] ) { + Pr( + "#W HasFiltListTNums [%s] [ table -> homog ] missing\n", + (Int)(InfoBags[i].name), 0L ); + } + if ( ! HasFiltListTNums[i][FN_IS_DENSE] ) { + Pr( + "#W HasFiltListTNums [%s] [ table -> dense ] missing\n", + (Int)(InfoBags[i].name), 0L ); + } + } + + if ( HasFiltListTNums[i][FN_IS_SSORT] ) { + if ( HasFiltListTNums[i][FN_IS_NSORT] ) { + Pr( + "#W HasFiltListTNums [%s] [ ssort + nsort ] illegal\n", + (Int)(InfoBags[i].name), 0L ); + } + } + } } diff --git a/src/lists.h b/src/lists.h index 8481f9b562..9444a514f9 100644 --- a/src/lists.h +++ b/src/lists.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A lists.h GAP source Martin Schoenert +*W lists.h GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -14,7 +14,7 @@ ** 'LEN_LIST' and 'ELM_LIST' independently of the type of the list. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_lists_h = +SYS_CONST char * Revision_lists_h = "@(#)$Id$"; #endif @@ -659,13 +659,229 @@ extern Obj TYPES_LIST_FAM ( Obj fam ); +/**************************************************************************** +** + +*V SetFiltListTNums[ ][ ] . . . . . new tnum after filter set +** +** If a list with type number gains the filter with filter number +** , then the new type number is stored in: +** +** `SetFiltListTNums[][]' +** +** The macro `SET_FILT_LIST' is used to set the filter for a list by +** changing its type number. +*/ +extern Int SetFiltListTNums [ LAST_REAL_TNUM ] [ LAST_FN ]; + + +/**************************************************************************** +** +*F SET_FILT_LIST( , ) . . . . . . . . . . . . . . set a filter +*/ +#define SET_FILT_LIST(list,fn) \ + do { \ + Int new; \ + new = SetFiltListTNums[TNUM_OBJ(list)][fn]; \ + if ( new > 0 ) \ + RetypeBag( list, new ); \ + else if ( new < 0 ) { \ + Pr( "#E SET_FILT_LIST[%s][%d] in ", (Int)TNAM_OBJ(list), fn ); \ + Pr( "%s line %d\n", (Int)__FILE__, (Int)__LINE__); \ + } \ + } while (0) + + +/**************************************************************************** +** +*V ResetFiltListTNums[ ][ ] . . . new tnum after filter reset +** +** If a list with type number loses the filter with filter number +** , then the new type number is stored in: +** +** `ResetFiltListTNums[][]' +** +** The macro `RESET_FILT_LIST' is used to set the filter for a list by +** changing its type number. +*/ +extern Int ResetFiltListTNums [ LAST_REAL_TNUM ] [ LAST_FN ]; + + +/**************************************************************************** +** +*F RESET_FILT_LIST( , ) . . . . . . . . . . . . reset a filter +*/ +#define RESET_FILT_LIST(list,fn) \ + do { \ + Int new; \ + new = ResetFiltListTNums[TNUM_OBJ(list)][fn]; \ + if ( new > 0 ) \ + RetypeBag( list, new ); \ + else if ( new < 0 ) { \ + Pr( "#E RESET_FILT_LIST[%s][%d] in ", (Int)TNAM_OBJ(list), fn ); \ + Pr( "%s line %d\n", (Int)__FILE__, (Int)__LINE__); \ + } \ + } while (0) + + +/**************************************************************************** +** +*V HasFiltListTNums[ ][ ] . . . . . . . . . . . . has filter +*/ +extern Int HasFiltListTNums [ LAST_REAL_TNUM ] [ LAST_FN ]; + + +/**************************************************************************** +** +*F HAS_FILT_LIST( , ) . . . . . . . . . . . . . . . has filter +*/ +#define HAS_FILT_LIST(list,fn) HasFiltListTNums[TNUM_OBJ(list)][fn] + + +/**************************************************************************** +** +*V ClearFiltsTNums[ ] . clear all list filters except `FN_IS_MUTABLE' +** +** The type number without any known properties of a list of type number +** is stored in: +** +** `ClearPropsTNums[]' +** +** The macro `CLEAR_PROPS_LIST' is used to clear all properties of a list. +*/ +extern Int ClearFiltsTNums [ LAST_REAL_TNUM ]; + + +/**************************************************************************** +** +*F CLEAR_FILTS_LIST( ) . . . . . . . . . . . . . . clear properties +*/ +#define CLEAR_FILTS_LIST(list) \ + do { \ + Int new; \ + new = ClearFiltsTNums[TNUM_OBJ(list)]; \ + if ( new > 0 ) \ + RetypeBag( list, new ); \ + else if ( new < 0 ) { \ + Pr( "#E CLEAR_FILTS_LIST[%s] in ", (Int)TNAM_OBJ(list), 0 ); \ + Pr( "%s line %d\n", (Int)__FILE__, (Int)__LINE__); \ + } \ + } while (0) + + +/**************************************************************************** +** +*F MARK_LIST( , ) . . . . . . . . . . . . . . . . . . mark list +*/ +#define MARK_LIST( list, what ) \ + RetypeBag( list, TNUM_OBJ(list) + what ); + + +/**************************************************************************** +** +*F UNMARK_LIST( , ) . . . . . . . . . . . . . . . . unmark list +*/ +#define UNMARK_LIST( list, what ) \ + RetypeBag( list, TNUM_OBJ(list) - what ); + + +/**************************************************************************** +** + +*F * * * * * * * * * * * functions with checking * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + +*F ElmsListCheck( , ) . . . . . . . . . . . . . . . . ELMS_LIST +*/ +extern Obj ElmsListCheck ( + Obj list, + Obj poss ); + + +/**************************************************************************** +** +*F ElmsListLevelCheck( , , ) . . . . . . ElmsListLevel +*/ +extern void ElmsListLevelCheck ( + Obj lists, + Obj poss, + Int level ); + + +/**************************************************************************** +** +*F AsssListCheck( , , ) . . . . . . . . . . . . ASSS_LIST +*/ +extern void AsssListCheck ( + Obj list, + Obj poss, + Obj rhss ); + + +/**************************************************************************** +** +*F AsssPosObjCheck( , , ) . . . . . . . . . . . ASSS_LIST +*/ +extern void AsssPosObjCheck ( + Obj list, + Obj poss, + Obj rhss ); + + +/**************************************************************************** +** +*F AsssListLevelCheck( , , , ) . . AsssListLevel +*/ +extern void AsssListLevelCheck ( + Obj lists, + Obj poss, + Obj rhss, + Int level ); + + +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + +*F SetupLists() . . . . . . . . . . . . initialize the generic list package +*/ +extern void SetupLists ( void ); + + /**************************************************************************** ** *F InitLists() . . . . . . . . . . . . . initialize the generic list package ** -** 'InitLists' initializes the generic list package. +** 'InitLists' initializes the dispatch tables with the error handlers. +*/ +extern void InitLists ( void ); + + +/**************************************************************************** +** +*F CheckLists() . . . check the initialisation of the generic list package +** +** This function does a few pre-init sanity checks for the various list +** packages. +*/ +extern void CheckLists ( void ); + + +/**************************************************************************** +** + +*E lists.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here */ -extern void InitLists ( void ); diff --git a/src/objcftl.c b/src/objcftl.c index aaac26b9a4..c610018f7d 100644 --- a/src/objcftl.c +++ b/src/objcftl.c @@ -1,27 +1,39 @@ /**************************************************************************** ** -*A pcc.c GAP source Werner Nickel +*W objcftl.c GAP source Werner Nickel ** ** ** This file contains a collector from the left for polycyclic ** presentations. */ - #include "system.h" -#include "gasman.h" -#include "objects.h" -#include "scanner.h" -#include "plist.h" -#include "gvars.h" -#include "calls.h" -#include "records.h" -#include "precord.h" -#include "gap.h" -#include "bool.h" -#include "integer.h" -#include "dt.h" -#include "objcftl.h" +SYS_CONST char * Revision_objcftl_c = + "@(#)$Id$"; + + + +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ +#include "gvars.h" /* global variables */ +#include "calls.h" /* generic call mechanism */ +#include "gap.h" /* error handling, initialisation */ +#include "bool.h" /* booleans */ +#include "integer.h" /* integers */ + +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ + +#include "lists.h" /* generic lists */ +#include "plist.h" /* plain lists */ +#include "string.h" /* strings */ + +#include "dt.h" /* deep thought */ + +#define INCLUDE_DECLARATION_PART +#include "objcftl.h" /* from the left collect */ +#undef INCLUDE_DECLARATION_PART @@ -362,68 +374,106 @@ Obj FunBinaryPower( Obj self, Obj pcp, Obj w, Obj e ) { return BinaryPower( pcp, w, e ); } -void InitPcc ( void ) { +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** - AssGVar( GVarName( "DTBound" ), INTOBJ_INT(1) ); +*F SetupPcc() . . . . . . . . . . . . . initialize the polycyclic collector +*/ +void SetupPcc ( void ) +{ +} + + +/**************************************************************************** +** +*F InitPcc() . . . . . . . . . . . . . . initialize the polycyclic collector +*/ +void InitPcc ( void ) { DebugPcc = GVarName( "DebugPcc" ); - AssGVar( DebugPcc, False ); - - AssGVar( GVarName( "PC_NUMBER_OF_GENERATORS" ), - INTOBJ_INT( PC_NUMBER_OF_GENERATORS ) ); - AssGVar( GVarName( "PC_GENERATORS" ), - INTOBJ_INT( PC_GENERATORS ) ); - AssGVar( GVarName( "PC_INVERSES" ), - INTOBJ_INT( PC_INVERSES ) ); - AssGVar( GVarName( "PC_COMMUTE" ), - INTOBJ_INT( PC_COMMUTE ) ); - AssGVar( GVarName( "PC_POWERS" ), - INTOBJ_INT( PC_POWERS ) ); - AssGVar( GVarName( "PC_INVERSEPOWERS" ), - INTOBJ_INT( PC_INVERSEPOWERS ) ); - AssGVar( GVarName( "PC_EXPONENTS" ), - INTOBJ_INT( PC_EXPONENTS ) ); - AssGVar( GVarName( "PC_CONJUGATES" ), - INTOBJ_INT( PC_CONJUGATES ) ); - AssGVar( GVarName( "PC_INVERSECONJUGATES" ), - INTOBJ_INT( PC_INVERSECONJUGATES ) ); - AssGVar( GVarName( "PC_CONJUGATESINVERSE" ), - INTOBJ_INT( PC_CONJUGATESINVERSE ) ); - AssGVar( GVarName( "PC_INVERSECONJUGATESINVERSE" ), - INTOBJ_INT( PC_INVERSECONJUGATESINVERSE ) ); - AssGVar( GVarName( "PC_DEEP_THOUGHT_POLS" ), - INTOBJ_INT( PC_DEEP_THOUGHT_POLS ) ); - AssGVar( GVarName( "PC_DEEP_THOUGHT_BOUND" ), - INTOBJ_INT( PC_DEEP_THOUGHT_BOUND ) ); - AssGVar( GVarName( "PC_ORDERS" ), INTOBJ_INT( PC_ORDERS ) ); - AssGVar( GVarName( "PC_WORD_STACK" ), - INTOBJ_INT( PC_WORD_STACK ) ); - AssGVar( GVarName( "PC_STACK_SIZE" ), - INTOBJ_INT( PC_STACK_SIZE ) ); - AssGVar( GVarName( "PC_WORD_EXPONENT_STACK" ), - INTOBJ_INT( PC_WORD_EXPONENT_STACK ) ); - AssGVar( GVarName( "PC_SYLLABLE_STACK" ), - INTOBJ_INT( PC_SYLLABLE_STACK ) ); - AssGVar( GVarName( "PC_EXPONENT_STACK" ), - INTOBJ_INT( PC_EXPONENT_STACK ) ); - AssGVar( GVarName( "PC_STACK_POINTER" ), - INTOBJ_INT( PC_STACK_POINTER ) ); - AssGVar( GVarName( "PC_DEFAULT_TYPE" ), INTOBJ_INT( PC_DEFAULT_TYPE ) ); + if ( ! SyRestoring ) { + AssGVar( GVarName( "DTBound" ), INTOBJ_INT(1) ); + + AssGVar( DebugPcc, False ); + + AssGVar( GVarName( "PC_NUMBER_OF_GENERATORS" ), + INTOBJ_INT( PC_NUMBER_OF_GENERATORS ) ); + AssGVar( GVarName( "PC_GENERATORS" ), + INTOBJ_INT( PC_GENERATORS ) ); + AssGVar( GVarName( "PC_INVERSES" ), + INTOBJ_INT( PC_INVERSES ) ); + AssGVar( GVarName( "PC_COMMUTE" ), + INTOBJ_INT( PC_COMMUTE ) ); + AssGVar( GVarName( "PC_POWERS" ), + INTOBJ_INT( PC_POWERS ) ); + AssGVar( GVarName( "PC_INVERSEPOWERS" ), + INTOBJ_INT( PC_INVERSEPOWERS ) ); + AssGVar( GVarName( "PC_EXPONENTS" ), + INTOBJ_INT( PC_EXPONENTS ) ); + AssGVar( GVarName( "PC_CONJUGATES" ), + INTOBJ_INT( PC_CONJUGATES ) ); + AssGVar( GVarName( "PC_INVERSECONJUGATES" ), + INTOBJ_INT( PC_INVERSECONJUGATES ) ); + AssGVar( GVarName( "PC_CONJUGATESINVERSE" ), + INTOBJ_INT( PC_CONJUGATESINVERSE ) ); + AssGVar( GVarName( "PC_INVERSECONJUGATESINVERSE" ), + INTOBJ_INT( PC_INVERSECONJUGATESINVERSE ) ); + AssGVar( GVarName( "PC_DEEP_THOUGHT_POLS" ), + INTOBJ_INT( PC_DEEP_THOUGHT_POLS ) ); + AssGVar( GVarName( "PC_DEEP_THOUGHT_BOUND" ), + INTOBJ_INT( PC_DEEP_THOUGHT_BOUND ) ); + AssGVar( GVarName( "PC_ORDERS" ), INTOBJ_INT( PC_ORDERS ) ); + AssGVar( GVarName( "PC_WORD_STACK" ), + INTOBJ_INT( PC_WORD_STACK ) ); + AssGVar( GVarName( "PC_STACK_SIZE" ), + INTOBJ_INT( PC_STACK_SIZE ) ); + AssGVar( GVarName( "PC_WORD_EXPONENT_STACK" ), + INTOBJ_INT( PC_WORD_EXPONENT_STACK ) ); + AssGVar( GVarName( "PC_SYLLABLE_STACK" ), + INTOBJ_INT( PC_SYLLABLE_STACK ) ); + AssGVar( GVarName( "PC_EXPONENT_STACK" ), + INTOBJ_INT( PC_EXPONENT_STACK ) ); + AssGVar( GVarName( "PC_STACK_POINTER" ), + INTOBJ_INT( PC_STACK_POINTER ) ); + AssGVar( GVarName( "PC_DEFAULT_TYPE" ), INTOBJ_INT( PC_DEFAULT_TYPE ) ); + } /* Install internal functions. */ - InitHandlerFunc( FuncCollectPolycyc, "CollectPolycyclic"); - AssGVar( GVarName( "CollectPolycyclic" ), - NewFunctionC( "CollectPolycyclic", 3L, - "pcp, list, word", FuncCollectPolycyc ) ); + C_NEW_GVAR_FUNC( "CollectPolycyclic", 3, "pcp, list, word", + FuncCollectPolycyc, + "src/objcftl.c:CollectPolycyclic" ); - InitHandlerFunc( FunBinaryPower, "BinaryPower"); - AssGVar( GVarName( "BinaryPower" ), - NewFunctionC( "BinaryPower", 3L, - "pcp, word, exponent", FunBinaryPower ) ); + C_NEW_GVAR_FUNC( "BinaryPower", 3, "pcp, word, exponent", + FunBinaryPower, + "src/objcftl.c:BinaryPower" ); /* Keep track of variables containing library functions called in this ** module. */ - InitFopyGVar( GVarName("PowerAutomorphism"), &PowerAutomorphism ); + InitFopyGVar( "PowerAutomorphism", &PowerAutomorphism ); } + +/**************************************************************************** +** +*F CheckPcc() . . . . . . check the initialisation of polycyclic collector +*/ +void CheckPcc ( void ) +{ + SET_REVISION( "objcftl_c", Revision_objcftl_c ); + SET_REVISION( "objcftl_h", Revision_objcftl_h ); +} + + +/**************************************************************************** +** + +*E objcftl.c . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/objcftl.h b/src/objcftl.h index 0682aa61b1..6cf6532c81 100644 --- a/src/objcftl.h +++ b/src/objcftl.h @@ -1,11 +1,16 @@ /**************************************************************************** ** -*A pcc.h GAP source Werner Nickel +*W objcftl.h GAP source Werner Nickel ** ** ** This file declares the function collecting from the left with polycyclic ** presentations. */ +#ifdef INCLUDE_DECLARATION_PART +SYS_CONST char * Revision_objcftl_h = + "@(#)$Id$"; +#endif + #define PC_NUMBER_OF_GENERATORS 1 #define PC_GENERATORS 2 @@ -30,4 +35,37 @@ #define PC_STACK_POINTER 20 #define PC_DEFAULT_TYPE 21 -extern void InitPcc( void ); +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + +*F SetupPcc() . . . . . . . . . . . . . initialize the polycyclic collector +*/ +extern void SetupPcc ( void ); + + +/**************************************************************************** +** +*F InitPcc() . . . . . . . . . . . . . . initialize the polycyclic collector +*/ +extern void InitPcc ( void ); + + +/**************************************************************************** +** +*F CheckPcc() . . . . . . check the initialisation of polycyclic collector +*/ +extern void CheckPcc ( void ); + + +/**************************************************************************** +** + +*E objcftl.c . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/objects.c b/src/objects.c index 7f0fe5ad54..8487910bf3 100644 --- a/src/objects.c +++ b/src/objects.c @@ -15,202 +15,38 @@ SYS_CONST char * Revision_objects_c = #include "sysfiles.h" /* file input/output */ -#include "gasman.h" /* Retype */ +#include "gasman.h" /* garbage collector */ #define INCLUDE_DECLARATION_PART -#include "objects.h" /* declaration part of the package */ +#include "objects.h" /* objects */ #undef INCLUDE_DECLARATION_PART -#include "scanner.h" /* Pr */ +#include "scanner.h" /* scanner */ -#include "gvars.h" /* AssGVar, GVarName */ +#include "gvars.h" /* global variables */ -#include "calls.h" /* NewFunctionC */ -#include "opers.h" /* NewFilterC, NewOperationC */ +#include "calls.h" /* generic call mechanism */ +#include "opers.h" /* generic operations */ -#include "bool.h" /* True, False */ +#include "bool.h" /* booleans */ -#include "plist.h" /* ELM_PLIST used by FAMILY_TYPE */ +#include "gap.h" /* error handling, initialisation */ -#include "gap.h" /* Error */ +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ +#include "lists.h" /* generic lists */ +#include "plist.h" /* plain lists */ +#include "string.h" /* strings */ -/**************************************************************************** -** - -*T Obj . . . . . . . . . . . . . . . . . . . . . . . . . . . type of objects -** -** 'Obj' is defined in the declaration part of this package. -*/ - - -/**************************************************************************** -** - -*F IS_INTOBJ( ) . . . . . . . . test if an object is an integer object -** -** 'IS_INTOBJ' is defined in the declaration part of this package. -*/ - - -/**************************************************************************** -** -*F ARE_INTOBJS( , ) . . . . test if two objects are integer objects -** -** 'ARE_INTOBJS' is defined in the declaration part of this package. -*/ - - -/**************************************************************************** -** -*F INTOBJ_INT( ) . . . . . . . convert a C integer to an integer object -** -** 'INTOBJ_INT' is defined in the declaration part of this package. -*/ - - -/**************************************************************************** -** -*F INT_INTOBJ( ) . . . . . . . convert an integer object to a C integer -** -** 'INT_INTOBJ' is defined in the declaration part of this package. -*/ - - -/**************************************************************************** -** -*F EQ_INTOBJS( , , ) . . . . . . . . . compare two integer objects -** -** 'EQ_INTOBJS' is defined in the declaration part of this package. -*/ - - -/**************************************************************************** -** -*F LT_INTOBJS( , , ) . . . . . . . . . compare two integer objects -** -** 'LT_INTOBJS' is defined in the declaration part of this package. -*/ - - -/**************************************************************************** -** -*F SUM_INTOBJS( , , ) . . . . . . . . sum of two integer objects -** -** 'SUM_INTOBJS' is defined in the declaration part of this package. -*/ - - -/**************************************************************************** -** -*F DIFF_INTOBJS( , , ) . . . . . difference of two integer objects -** -** 'DIFF_INTOBJS' is defined in the declaration part of this package. -*/ - - -/**************************************************************************** -** -*F PROD_INTOBJS( , , ) . . . . . . product of two integer objects -** -** 'PROD_INTOBJS' is defined in the declaration part of this package. -*/ - - -/**************************************************************************** -** -*F IS_FFE( ) . . . . . . . . test if an object is a finite field element -** -** 'IS_FFE' returns 1 if the object is an (immediate) finite field -** element and 0 otherwise. -*/ - - -/**************************************************************************** -** - -*S T_ . . . . . . . . . . . . . . . . symbolic names for object types -*S FIRST_CONSTANT_TNUM, LAST_CONSTANT_TNUM . . . . range of constant types -*S FIRST_RECORD_TNUM, LAST_RECORD_TNUM . . . . . range of record types -*S FIRST_LIST_TNUM, LAST_LIST_TNUM . . . . . . range of list types -*S FIRST_EXTERNAL_TNUM, LAST_EXTERNAL_TNUM . . . . range of external types -*S FIRST_REAL_TNUM, LAST_REAL_TNUM . . . . . . range of real types -*S FIRST_VIRTUAL_TNUM, LAST_VIRTUAL_TNUM . . . . range of virtual types -*S FIRST_IMM_MUT_TNUM, LAST_IMM_MUT_TNUM . . . . range of im/mutable types -** -** The objects types and the type ranges are defined in the declaration -** part of this package. -*/ - - -/**************************************************************************** -** - -*F TNUM_OBJ( ) . . . . . . . . . . . . . . . . . . . type of an object -** -** 'TNUM_OBJ' is defined in the declaration part of this package. -*/ - - -/**************************************************************************** -** -*F TNUM_OBJ_Handler( , ) . . . . . . . . handler for 'TNUM_OBJ' -*/ -Obj TNUM_OBJ_Func; - -Obj TNUM_OBJ_Handler ( - Obj self, - Obj obj ) -{ - return INTOBJ_INT( TNUM_OBJ(obj) ); -} - - -/**************************************************************************** -** -*F SIZE_OBJ( ) . . . . . . . . . . . . . . . . . . . size of an object -** -** 'SIZE_OBJ' is defined in the declaration part of this package. -*/ - - -/**************************************************************************** -** -*F SIZE_OBJ_Handler( , ) . . . . . . . . handler for 'SIZE_OBJ' -*/ -Obj SIZE_OBJ_Func; - -Obj SIZE_OBJ_Handler ( - Obj self, - Obj obj ) -{ - return INTOBJ_INT( SIZE_OBJ(obj) ); -} +#include "saveload.h" /* saving and loading */ /**************************************************************************** ** -*F ADDR_OBJ( ) . . . . . . . . . . . . . absolute address of an object -** -** 'ADDR_OBJ' is defined in the declaration part of this package. -*/ - -/**************************************************************************** -** - -*F FAMILY_TYPE( ) . . . . . . . . . . . . . . . . . family of a kind -** -** 'FAMILY_TYPE' is defined in the declaration part of this package. -*/ - - -/**************************************************************************** -** *F FamilyTypeHandler( , ) . . . . . . handler for 'FAMILY_TYPE' */ -Obj FamilyTypeFunc; - Obj FamilyTypeHandler ( Obj self, Obj kind ) @@ -219,20 +55,10 @@ Obj FamilyTypeHandler ( } -/**************************************************************************** -** -*F FAMILY_OBJ( ) . . . . . . . . . . . . . . . . . family of an object -** -** 'FAMILY_OBJ' is defined in the declaration part of this package. -*/ - - /**************************************************************************** ** *F FamilyObjHandler( , ) . . . . . . . handler for 'FAMILY_OBJ' */ -Obj FamilyObjFunc; - Obj FamilyObjHandler ( Obj self, Obj obj ) @@ -241,22 +67,6 @@ Obj FamilyObjHandler ( } -/**************************************************************************** -** -*F FLAGS_TYPE( ) . . . . . . . . . . . flags boolean list of a kind -** -** 'FLAGS_TYPE' is defined in the declaration part of this package. -*/ - - -/**************************************************************************** -** -*F SHARED_TYPE( ) . . . . . . . . . . . . . . . shared data of a kind -** -** 'SHARED_TYPE' is defined in the declaration part of this package. -*/ - - /**************************************************************************** ** @@ -271,9 +81,8 @@ Obj (*TypeObjFuncs[ LAST_REAL_TNUM+1 ]) ( Obj obj ); Obj TypeObjError ( Obj obj ) { - ErrorQuit( - "Panic: basic object of type '%s' is unkind", - (Int)(InfoBags[TNUM_OBJ(obj)].name), 0L ); + ErrorQuit( "Panic: basic object of type '%s' is unkind", + (Int)TNAM_OBJ(obj), 0L ); return 0; } @@ -282,8 +91,6 @@ Obj TypeObjError ( ** *F TypeObjHandler( , ) . . . . . . . . . handler for 'TYPE_OBJ' */ -Obj TypeObjFunc; - Obj TypeObjHandler ( Obj self, Obj obj ) @@ -295,18 +102,6 @@ Obj TypeObjHandler ( /**************************************************************************** ** -*F MUTABLE_TNUM( ) . . . . . . . . . . mutable type of internal type -*/ - - -/**************************************************************************** -** -*F IMMUTABLE_TNUM( ) . . . . . . . . immutable type of internal type -*/ - - -/**************************************************************************** -** *F IS_MUTABLE_OBJ( ) . . . . . . . . . . . . . . is an object mutable ** ** 'IS_MUTABLE_OBJ' returns 1 if the object is mutable (i.e., can @@ -402,20 +197,6 @@ Obj IsCopyableObjHandler ( /**************************************************************************** ** -*F SHALLOW_COPY_OBJ( ) . . . . . . . make a shallow copy of an object -** -** 'SHALLOW_COPY_OBJ' makes a shallow copy of the object . -** -** 'SHALLOW_COPY_OBJ' is defined in the declaration part of this package as -** follows -** -#define SHALLOW_COPY_OBJ(obj) \ - ((*ShallowCopyObjFuncs[ TNUM_OBJ(obj) ])( obj )) -*/ - - -/**************************************************************************** -** *V ShallowCopyObjFuncs[] . . . . . . . . . . shallow copier functions */ Obj (*ShallowCopyObjFuncs[ LAST_REAL_TNUM+1 ]) ( Obj obj ); @@ -522,22 +303,6 @@ Obj CopyObj ( } -/**************************************************************************** -** -*F COPY_OBJ( , ) . . . . . . make a structural copy of an object -** -** 'COPY_OBJ' calls the function pointed to by 'CopyObjFuncs[]', -** passing as argument. If is the type of an constant object, -** then 'CopyObjFuncs[]' points to 'CopyObjConstant', which just -** returns , since those objects need not be copied. -** -** 'COPY_OBJ' is defined in the declaration part of this package as follows -** -#define COPY_OBJ(obj,mut) \ - ((*CopyObjFuncs[ TNUM_OBJ(obj) ])( obj, mut )) -*/ - - /**************************************************************************** ** *V CopyObjFuncs[] . . . . . . . . . . . . table of copying functions @@ -545,22 +310,6 @@ Obj CopyObj ( Obj (*CopyObjFuncs[ LAST_REAL_TNUM+COPYING+1 ]) ( Obj obj, Int mut ); -/**************************************************************************** -** -*F CLEAN_OBJ( ) . . . . . . . . . . . . clean up object after copying -** -** 'CLEAN_OBJ' calls the function pointed to by 'CleanObjFuncs[]', -** passing as argument. If is the type of an constant object, -** then 'CleanObjFuncs[]' points to 'CopyObjConstant', which does -** nothing, since those objects need not be copied. -** -** 'CLEAN_OBJ' is defined in the declaration part of this package as follows -** -#define CLEAN_OBJ(obj) \ - ((*CleanObjFuncs[ TNUM_OBJ(obj) ])( obj )) -*/ - - /**************************************************************************** ** *V CleanObjFuncs[] . . . . . . . . . . . . table of cleaning functions @@ -933,8 +682,6 @@ void CleanObjDatObjCopy ( *F ImmutableCopyObjHandler( , ) . . . . immutable copy of */ -Obj ImmutableCopyObjFunc; - Obj ImmutableCopyObjHandler ( Obj self, Obj obj ) @@ -947,8 +694,6 @@ Obj ImmutableCopyObjHandler ( ** *F MutableCopyObjHandler( , ) . . . . . . mutable copy of */ -Obj MutableCopyObjFunc; - Obj MutableCopyObjHandler ( Obj self, Obj obj ) @@ -1106,38 +851,6 @@ void PrintPathError ( /**************************************************************************** ** -*F IS_COMOBJ( ) . . . . . . . . . . . is an object a component object -** -** 'IS_COMOBJ' is defined in the declaration part of this package as follows -** -#define IS_COMOBJ(obj) (TNUM_OBJ(obj) == T_COMOBJ) -*/ - - -/**************************************************************************** -** -*F TYPE_COMOBJ( ) . . . . . . . . . . . . kind of a component object -** -** 'TYPE_COMOBJ' is defined in the declaration part of this package as -** follows -** -#define TYPE_COMOBJ(obj) (ADDR_OBJ(obj)[0]) -*/ - - -/**************************************************************************** -** -*F SET_TYPE_COMOBJ( , ) . . . set the kind of a component object -** -** 'SET_TYPE_COMOBJ' is defined in the declaration part of this package as -** follows -** -#define SET_TYPE_COMOBJ(obj,val) (ADDR_OBJ(obj)[0] = (val)) -*/ - - -/**************************************************************************** -** *F TypeComObj( ) . . . . . . . . . . function version of 'TYPE_COMOBJ' */ Obj TypeComObj ( @@ -1151,8 +864,6 @@ Obj TypeComObj ( ** *F IS_COMOBJ_Hander( , ) . . . . . . . . handler for 'IS_COMOBJ' */ -Obj IS_COMOBJ_Func; - Obj IS_COMOBJ_Handler ( Obj self, Obj obj ) @@ -1165,8 +876,6 @@ Obj IS_COMOBJ_Handler ( ** *F SET_TYPE_COMOBJ_Handler( , , ) . . . 'SET_TYPE_COMOBJ' */ -Obj SET_TYPE_COMOBJ_Func; - Obj SET_TYPE_COMOBJ_Handler ( Obj self, Obj obj, @@ -1182,38 +891,6 @@ Obj SET_TYPE_COMOBJ_Handler ( /**************************************************************************** ** -*F IS_POSOBJ( ) . . . . . . . . . . is an object a positional object -** -** 'IS_POSOBJ' is defined in the declaration part of this package as follows -** -#define IS_POSOBJ(obj) (TNUM_OBJ(obj) == T_POSOBJ) -*/ - - -/**************************************************************************** -** -*F TYPE_POSOBJ( ) . . . . . . . . . . . . kind of a positional object -** -** 'TYPE_POSOBJ' is defined in the declaration part of this package as -** follows -** -#define TYPE_POSOBJ(obj) (ADDR_OBJ(obj)[0]) -*/ - - -/**************************************************************************** -** -*F SET_TYPE_POSOBJ( , ) . . . set the kind of a positional object -** -** 'SET_TYPE_POSOBJ' is defined in the declaration part of this package as -** follows -** -#define SET_TYPE_POSOBJ(obj,val) (ADDR_OBJ(obj)[0] = (val)) -*/ - - -/**************************************************************************** -** *F TypePosObj( ) . . . . . . . . . . function version of 'TYPE_POSOBJ' */ Obj TypePosObj ( @@ -1227,8 +904,6 @@ Obj TypePosObj ( ** *F IS_POSOBJ_Handler( , ) . . . . . . . handler for 'IS_POSOBJ' */ -Obj IS_POSOBJ_Func; - Obj IS_POSOBJ_Handler ( Obj self, Obj obj ) @@ -1241,8 +916,6 @@ Obj IS_POSOBJ_Handler ( ** *F SET_TYPE_POSOBJ_Handler( , , ) . . . 'SET_TYPE_POSOB' */ -Obj SET_TYPE_POSOBJ_Func; - Obj SET_TYPE_POSOBJ_Handler ( Obj self, Obj obj, @@ -1259,8 +932,6 @@ Obj SET_TYPE_POSOBJ_Handler ( ** *F LEN_POSOBJ_Handler( , ) . . . . . . handler for 'LEN_POSOBJ' */ -Obj LEN_POSOBJ_Func; - Obj LEN_POSOBJ_Handler ( Obj self, Obj obj ) @@ -1272,38 +943,6 @@ Obj LEN_POSOBJ_Handler ( /**************************************************************************** ** -*F IS_DATOBJ( ) . . . . . . . . . . . . . is an object a data object -** -** 'IS_DATOBJ' is defined in the declaration part of this package as follows -** -#define IS_DATOBJ(obj) (TNUM_OBJ(obj) == T_DATOBJ) -*/ - - -/**************************************************************************** -** -*F TYPE_DATOBJ( ) . . . . . . . . . . . . . . . kind of a data object -** -** 'TYPE_DATOBJ' is defined in the declaration part of this package as -** follows -** -#define TYPE_DATOBJ(obj) (ADDR_OBJ(obj)[0]) -*/ - - -/**************************************************************************** -** -*F SET_TYPE_DATOBJ( , ) . . . . . . set the kind of a data object -** -** 'SET_TYPE_DATOBJ' is defined in the declaration part of this package as -** follows -** -#define SET_TYPE_DATOBJ(obj,val) (ADDR_OBJ(obj)[0] = (val)) -*/ - - -/**************************************************************************** -** *F TypeDatObj( ) . . . . . . . . . . function version of 'TYPE_DATOBJ' */ Obj TypeDatObj ( @@ -1317,8 +956,6 @@ Obj TypeDatObj ( ** *F IS_DATOBJ_Hander( , ) . . . . . . . . handler for 'IS_DATOBJ' */ -Obj IS_DATOBJ_Func; - Obj IS_DATOBJ_Handler ( Obj self, Obj obj ) @@ -1331,8 +968,6 @@ Obj IS_DATOBJ_Handler ( ** *F SET_TYPE_DATOBJ_Handler( , , ) . . . 'SET_TYPE_DATOBJ' */ -Obj SET_TYPE_DATOBJ_Func; - Obj SET_TYPE_DATOBJ_Handler ( Obj self, Obj obj, @@ -1352,8 +987,6 @@ Obj SET_TYPE_DATOBJ_Handler ( ** ** 'IsIdenticalHandler' implements 'IsIdentical' */ -Obj IsIdenticalFunc; - Obj IsIdenticalHandler ( Obj self, Obj obj1, @@ -1369,7 +1002,7 @@ Obj IsIdenticalHandler ( ** 'SaveObjFuncs' is the dispatch table that contains, for every type ** of objects, a pointer to the saving function for objects of that type ** These should not handle the file directly, but should work via the -** functions 'SaveObjRef', 'SaveUInt' ( = 1,2,4 or 8), and others +** functions 'SaveSubObj', 'SaveUInt' ( = 1,2,4 or 8), and others ** to be determined. Their role is to identify the C types of the various ** parts of the bag, and perhaps to leave out some information that does ** not need to be saved. By the time this function is called, the bag @@ -1380,15 +1013,15 @@ Obj IsIdenticalHandler ( void (*SaveObjFuncs[ LAST_REAL_TNUM + 1]) (Obj obj); void SaveObjError ( - Obj obj - ) + Obj obj + ) { ErrorQuit( - "Panic: tried to save an object of unknown type '%d'", - (Int)TNUM_OBJ(obj), 0L ); + "Panic: tried to save an object of unknown type '%d'", + (Int)TNUM_OBJ(obj), 0L ); } - + /**************************************************************************** @@ -1406,63 +1039,167 @@ void SaveObjError ( ** No loading function may allocate any bag */ -void (*LoadObjFuncs[ LAST_REAL_TNUM + 1]) (Obj obj, Bag bag); +void (*LoadObjFuncs[ LAST_REAL_TNUM + 1]) (Bag bag); void LoadObjError ( - Obj obj, - Bag bag - ) + Obj obj + ) { ErrorQuit( - "Panic: tried to loade an object of unknown type '%d'", - (Int)TNUM_OBJ(obj), 0L ); + "Panic: tried to loade an object of unknown type '%d'", + (Int)TNUM_OBJ(obj), 0L ); } +/**************************************************************************** +** +*F SaveComObj( Obj comobj) +** +*/ +void SaveComObj( Obj comobj) +{ + UInt len,i; + SaveSubObj(TYPE_COMOBJ( comobj )); + len = LEN_PREC(comobj); + for (i = 1; i <= len; i++) + { + SaveUInt(GET_RNAM_PREC(comobj, i)); + SaveSubObj(GET_ELM_PREC(comobj, i)); + } + return; +} /**************************************************************************** ** +*F SavePosObj( Obj posobj) +** +*/ -*F InitObjects() . . . . . . . . . . . . . . initialize the objects package +void SavePosObj( Obj posobj) +{ + UInt len,i; + SaveSubObj(TYPE_POSOBJ( posobj )); + len = (SIZE_OBJ(posobj)/sizeof(Obj) - 1); + for (i = 1; i <= len; i++) + { + SaveSubObj(ADDR_OBJ(posobj)[i]); + } + return; +} + +/**************************************************************************** ** -** 'InitObjects' initializes the objects package. +*F SaveDatObj( Obj datobj) +** +** Here we lose endianness protection, because we don't know if this is really +** UInts, or if it might be smaller data */ -void InitObjects ( void ) + +void SaveDatObj( Obj datobj) { + UInt len,i; + UInt *ptr; + SaveSubObj(TYPE_DATOBJ( datobj )); + len = (SIZE_OBJ(datobj)/sizeof(UInt) - 1); + ptr = (UInt *)ADDR_OBJ(datobj); + for (i = 1; i <= len; i++) + { + SaveUInt(*ptr++); + } + return; +} - Int t; /* loop variable */ +/**************************************************************************** +** +*F LoadComObj( Obj comobj) +** +*/ - /* make and install the 'FAMILY_TYPE' function */ - InitHandlerFunc( FamilyTypeHandler, "FAMILY_TYPE" ); - FamilyTypeFunc = NewFunctionC( - "FAMILY_TYPE", 1L, "kind", FamilyTypeHandler ); - AssGVar( GVarName( "FAMILY_TYPE" ), FamilyTypeFunc ); +void LoadComObj( Obj comobj) +{ + UInt len,i; + TYPE_COMOBJ( comobj) = LoadSubObj( ); + len = LEN_PREC(comobj); + for (i = 1; i <= len; i++) + { + SET_RNAM_PREC(comobj, i, LoadUInt()); + SET_ELM_PREC(comobj, i, LoadSubObj()); + } + return; +} +/**************************************************************************** +** +*F LoadPosObj( Obj posobj) +** +*/ - /* make and install the 'TYPE_OBJ' function */ - InitHandlerFunc( TypeObjHandler, "TYPE_OBJ" ); - TypeObjFunc = NewFunctionC( - "TYPE_OBJ", 1L, "obj", TypeObjHandler ); - AssGVar( GVarName( "TYPE_OBJ" ), TypeObjFunc ); +void LoadPosObj( Obj posobj) +{ + UInt len,i; + TYPE_POSOBJ( posobj ) = LoadSubObj(); + len = (SIZE_OBJ(posobj)/sizeof(Obj) - 1); + for (i = 1; i <= len; i++) + { + ADDR_OBJ(posobj)[i] = LoadSubObj(); + } + return; +} - for ( t = FIRST_REAL_TNUM; t <= LAST_REAL_TNUM; t++ ) - TypeObjFuncs[ t ] = TypeObjError; +/**************************************************************************** +** +*F LoadDatObj( Obj datobj) +** +** Here we lose endianness protection, because we don't know if this is really +** UInts, or if it might be smaller data +*/ +void LoadDatObj( Obj datobj) +{ + UInt len,i; + UInt *ptr; + TYPE_DATOBJ( datobj ) = LoadSubObj(); + len = (SIZE_OBJ(datobj)/sizeof(UInt) - 1); + ptr = (UInt *)ADDR_OBJ(datobj); + for (i = 1; i <= len; i++) + { + *ptr ++ = LoadUInt(); + } + return; +} - /* make and install the 'FAMILY_OBJ' function */ - InitHandlerFunc( FamilyObjHandler, "FAMILY_OBJ" ); - FamilyObjFunc = NewFunctionC( - "FAMILY_OBJ", 1L, "obj", FamilyObjHandler ); - AssGVar( GVarName( "FAMILY_OBJ" ), FamilyObjFunc ); +/**************************************************************************** +** +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + +*F SetupObjects() . . . . . . . . . . . . . initialize the objects package +*/ +void SetupObjects ( void ) +{ + Int t; /* loop variable */ + + /* install the marking methods */ + InfoBags[ T_COMOBJ ].name = "object (component)"; + InitMarkFuncBags( T_COMOBJ , MarkAllSubBags ); + InfoBags[ T_COMOBJ +COPYING ].name = "object (component,copied)"; + InitMarkFuncBags( T_COMOBJ +COPYING , MarkAllSubBags ); + InfoBags[ T_POSOBJ ].name = "object (positional)"; + InitMarkFuncBags( T_POSOBJ , MarkAllSubBags ); + InfoBags[ T_POSOBJ +COPYING ].name = "object (positional,copied)"; + InitMarkFuncBags( T_POSOBJ +COPYING , MarkAllSubBags ); + InfoBags[ T_DATOBJ ].name = "object (data,copied)"; + InitMarkFuncBags( T_DATOBJ , MarkOneSubBags ); + InfoBags[ T_DATOBJ +COPYING ].name = "object (data,copied)"; + InitMarkFuncBags( T_DATOBJ +COPYING , MarkOneSubBags ); - /* make and install the 'IS_MUTABLE_OBJ' filter */ - InitHandlerFunc( IsMutableObjHandler, "IS_MUTABLE_OBJ" ); - IsMutableObjFilt = NewFilterC( - "IS_MUTABLE_OBJ", 1L, "obj", IsMutableObjHandler ); - AssGVar( GVarName( "IS_MUTABLE_OBJ" ), - IsMutableObjFilt ); + /* make and install the 'IS_MUTABLE_OBJ' filter */ for ( t = FIRST_REAL_TNUM; t <= LAST_REAL_TNUM; t++ ) IsMutableObjFuncs[ t ] = IsMutableObjError; for ( t = FIRST_CONSTANT_TNUM; t <= LAST_CONSTANT_TNUM; t++ ) @@ -1472,12 +1209,6 @@ void InitObjects ( void ) /* make and install the 'IS_COPYABLE_OBJ' filter */ - InitHandlerFunc( IsCopyableObjHandler, "IS_COPYABLE_OBJ" ); - IsCopyableObjFilt = NewFilterC( - "IS_COPYABLE_OBJ", 1L, "obj", IsCopyableObjHandler ); - AssGVar( GVarName( "IS_COPYABLE_OBJ" ), - IsCopyableObjFilt ); - for ( t = FIRST_REAL_TNUM; t <= LAST_REAL_TNUM; t++ ) IsCopyableObjFuncs[ t ] = IsCopyableObjError; for ( t = FIRST_CONSTANT_TNUM; t <= LAST_CONSTANT_TNUM; t++ ) @@ -1487,12 +1218,6 @@ void InitObjects ( void ) /* make and install the 'SHALLOW_COPY_OBJ' operation */ - InitHandlerFunc( ShallowCopyObjHandler, "SHALLOW_COPY_OBJ" ); - ShallowCopyObjOper = NewOperationC( - "SHALLOW_COPY_OBJ", 1L, "obj", ShallowCopyObjHandler ); - AssGVar( GVarName( "SHALLOW_COPY_OBJ" ), - ShallowCopyObjOper ); - for ( t = FIRST_REAL_TNUM; t <= LAST_REAL_TNUM; t++ ) ShallowCopyObjFuncs[ t ] = ShallowCopyObjError; for ( t = FIRST_CONSTANT_TNUM; t <= LAST_CONSTANT_TNUM; t++ ) @@ -1506,18 +1231,6 @@ void InitObjects ( void ) /* make and install the 'COPY_OBJ' function */ - InitHandlerFunc( ImmutableCopyObjHandler, "IMMUTABLE_COPY_OBJ" ); - ImmutableCopyObjFunc = NewFunctionC( - "IMMUTABLE_COPY_OBJ", 1L, "obj", ImmutableCopyObjHandler ); - AssGVar( GVarName( "IMMUTABLE_COPY_OBJ" ), - ImmutableCopyObjFunc ); - InitHandlerFunc( MutableCopyObjHandler, "DEEP_COPY_OBJ" ); - - MutableCopyObjFunc = NewFunctionC( - "DEEP_COPY_OBJ", 1L, "obj", MutableCopyObjHandler ); - AssGVar( GVarName( "DEEP_COPY_OBJ" ), - MutableCopyObjFunc ); - for ( t = FIRST_REAL_TNUM; t <= LAST_REAL_TNUM; t++ ) { CopyObjFuncs [ t ] = CopyObjError; CleanObjFuncs[ t ] = CleanObjError; @@ -1541,11 +1254,6 @@ void InitObjects ( void ) /* make and install the 'PRINT_OBJ' operation */ - InitHandlerFunc( PrintObjHandler, "PRINT_OBJ" ); - PrintObjOper = NewOperationC( - "PRINT_OBJ", 1L, "obj", PrintObjHandler ); - AssGVar( GVarName( "PRINT_OBJ" ), PrintObjOper ); - for ( t = FIRST_REAL_TNUM; t <= LAST_REAL_TNUM+PRINTING; t++ ) PrintObjFuncs[ t ] = PrintObjObject; @@ -1553,89 +1261,132 @@ void InitObjects ( void ) for ( t = FIRST_REAL_TNUM; t <= LAST_REAL_TNUM+PRINTING; t++ ) PrintPathFuncs[ t ] = PrintPathError; - /* enter 'SaveObjError' and 'LoadObjError' for all types initially */ - for ( t = FIRST_REAL_TNUM; t <= LAST_REAL_TNUM; t++ ) - { - SaveObjFuncs[ t ] = SaveObjError; - LoadObjFuncs[ t ] = LoadObjError; - } + /* enter 'SaveObjError' and 'LoadObjError' for all types initially */ + for ( t = FIRST_REAL_TNUM; t <= LAST_REAL_TNUM; t++ ) { + SaveObjFuncs[ t ] = SaveObjError; + LoadObjFuncs[ t ] = LoadObjError; + } - /* make and install the 'IS_IDENTICAL_OBJ' function */ - InitHandlerFunc( IsIdenticalHandler, "IS_IDENTICAL_OBJ" ); - IsIdenticalFunc = NewFunctionC( - "IS_IDENTICAL_OBJ", 2, "obj1, obj2", IsIdenticalHandler ); - AssGVar( GVarName( "IS_IDENTICAL_OBJ" ), IsIdenticalFunc ); + /* install the saving functions */ + SaveObjFuncs[ T_COMOBJ ] = SaveComObj; + SaveObjFuncs[ T_POSOBJ ] = SavePosObj; + SaveObjFuncs[ T_DATOBJ ] = SaveDatObj; + + /* install the loading functions */ + LoadObjFuncs[ T_COMOBJ ] = LoadComObj; + LoadObjFuncs[ T_POSOBJ ] = LoadPosObj; + LoadObjFuncs[ T_DATOBJ ] = LoadDatObj; +} - /* install the marking methods */ - InfoBags[ T_COMOBJ ].name = "object (component)"; - InitMarkFuncBags( T_COMOBJ , MarkAllSubBags ); - InfoBags[ T_COMOBJ +COPYING ].name = "object (component,copied)"; - InitMarkFuncBags( T_COMOBJ +COPYING , MarkAllSubBags ); - InfoBags[ T_POSOBJ ].name = "object (positional)"; - InitMarkFuncBags( T_POSOBJ , MarkAllSubBags ); - InfoBags[ T_POSOBJ +COPYING ].name = "object (positional,copied)"; - InitMarkFuncBags( T_POSOBJ +COPYING , MarkAllSubBags ); - InfoBags[ T_DATOBJ ].name = "object (data,copied)"; - InitMarkFuncBags( T_DATOBJ , MarkOneSubBags ); - InfoBags[ T_DATOBJ +COPYING ].name = "object (data,copied)"; - InitMarkFuncBags( T_DATOBJ +COPYING , MarkOneSubBags ); +/**************************************************************************** +** +*F InitObjects() . . . . . . . . . . . . . . initialize the objects package +** +** 'InitObjects' initializes the objects package. +*/ +void InitObjects ( void ) +{ + Int t; /* loop variable */ + + /* make and install the 'FAMILY_TYPE' function */ + C_NEW_GVAR_FUNC( "FAMILY_TYPE", 1, "kind", + FamilyTypeHandler, + "src/objects.c:FAMILY_TYPE" ); + + + /* make and install the 'TYPE_OBJ' function */ + C_NEW_GVAR_FUNC( "TYPE_OBJ", 1, "obj", + TypeObjHandler, + "src/objects.c:TYPE_OBJ" ); + for ( t = FIRST_REAL_TNUM; t <= LAST_REAL_TNUM; t++ ) + TypeObjFuncs[ t ] = TypeObjError; - /* install the kind methods */ TypeObjFuncs[ T_COMOBJ ] = TypeComObj; TypeObjFuncs[ T_POSOBJ ] = TypePosObj; TypeObjFuncs[ T_DATOBJ ] = TypeDatObj; + /* make and install the 'FAMILY_OBJ' function */ + C_NEW_GVAR_FUNC( "FAMILY_OBJ", 1, "obj", + FamilyObjHandler, + "src/objects.c:FAMILY_OBJ" ); + + + /* make and install the 'IS_MUTABLE_OBJ' filter */ + C_NEW_GVAR_FILT( "IS_MUTABLE_OBJ", "obj", IsMutableObjFilt, IsMutableObjHandler, + "src/objects.c:IS_MUTABLE_OBJ" ); + + + /* make and install the 'IS_COPYABLE_OBJ' filter */ + C_NEW_GVAR_FILT( "IS_COPYABLE_OBJ", "obj", IsCopyableObjFilt, IsCopyableObjHandler, + "src/objects.c:IS_COPYABLE_OBJ" ); + + + /* make and install the 'SHALLOW_COPY_OBJ' operation */ + C_NEW_GVAR_OPER( "SHALLOW_COPY_OBJ", 1, "obj", ShallowCopyObjOper, ShallowCopyObjHandler, + "src/objects.c:SHALLOW_COPY_OBJ" ); + + + /* make and install the 'COPY_OBJ' function */ + C_NEW_GVAR_FUNC( "IMMUTABLE_COPY_OBJ", 1, "obj", ImmutableCopyObjHandler, + "src/objects.c:IMMUTABLE_COPY_OBJ" ); + + C_NEW_GVAR_FUNC( "DEEP_COPY_OBJ", 1, "obj", MutableCopyObjHandler, + "src/objects.c:DEEP_COPY_OBJ" ); + + + /* make and install the 'PRINT_OBJ' operation */ + C_NEW_GVAR_OPER( "PRINT_OBJ", 1, "obj", PrintObjOper, PrintObjHandler, + "src/objects.c:PRINT_OBJ" ); + + + /* make and install the 'IS_IDENTICAL_OBJ' function */ + C_NEW_GVAR_FUNC( "IS_IDENTICAL_OBJ", 2, "obj1, obj2", IsIdenticalHandler, + "src/objects.c:IS_IDENTICAL_OBJ" ); + + /* make and install the functions for low level accessing of objects */ - InitHandlerFunc( IS_COMOBJ_Handler, "IS_COMOBJ" ); - IS_COMOBJ_Func = NewFunctionC( - "IS_COMOBJ", 1L, "obj", IS_COMOBJ_Handler ); - AssGVar( GVarName( "IS_COMOBJ" ), IS_COMOBJ_Func ); - - InitHandlerFunc( SET_TYPE_COMOBJ_Handler, "SET_TYPE_COMOBJ" ); - SET_TYPE_COMOBJ_Func = NewFunctionC( - "SET_TYPE_COMOBJ", 2L, "obj, kind", SET_TYPE_COMOBJ_Handler ); - AssGVar( GVarName( "SET_TYPE_COMOBJ" ), SET_TYPE_COMOBJ_Func ); - - InitHandlerFunc( IS_POSOBJ_Handler, "IS_POSOBJ" ); - IS_POSOBJ_Func = NewFunctionC( - "IS_POSOBJ", 1L, "obj", IS_POSOBJ_Handler ); - AssGVar( GVarName( "IS_POSOBJ" ), IS_POSOBJ_Func ); + C_NEW_GVAR_FUNC( "IS_COMOBJ", 1, "obj", + IS_COMOBJ_Handler, + "src/objects.c:IS_COMOBJ" ); + + C_NEW_GVAR_FUNC( "SET_TYPE_COMOBJ", 2, "obj, type", + SET_TYPE_COMOBJ_Handler, + "src/objects.c:SET_TYPE_COMOBJ" ); + + C_NEW_GVAR_FUNC( "IS_POSOBJ", 1, "obj", + IS_POSOBJ_Handler, + "src/objects.c:IS_POSOBJ" ); - InitHandlerFunc( SET_TYPE_POSOBJ_Handler, "SET_TYPE_POSOBJ" ); - SET_TYPE_POSOBJ_Func = NewFunctionC( - "SET_TYPE_POSOBJ", 2L, "obj, kind", SET_TYPE_POSOBJ_Handler ); - AssGVar( GVarName( "SET_TYPE_POSOBJ" ), SET_TYPE_POSOBJ_Func ); + C_NEW_GVAR_FUNC( "SET_TYPE_POSOBJ", 2, "obj, type", + SET_TYPE_POSOBJ_Handler, + "src/objects.c:SET_TYPE_POSOBJ" ); - InitHandlerFunc( LEN_POSOBJ_Handler, "LEN_POSOBJ" ); - LEN_POSOBJ_Func = NewFunctionC( - "LEN_POSOBJ", 1L, "obj", LEN_POSOBJ_Handler ); - AssGVar( GVarName( "LEN_POSOBJ" ), LEN_POSOBJ_Func ); + C_NEW_GVAR_FUNC( "LEN_POSOBJ", 1, "obj", + LEN_POSOBJ_Handler, + "src/objects.c:LEN_POSOBJ" ); - InitHandlerFunc( IS_DATOBJ_Handler, "IS_DATOBJ" ); - IS_DATOBJ_Func = NewFunctionC( - "IS_DATOBJ", 1L, "obj", IS_DATOBJ_Handler ); - AssGVar( GVarName( "IS_DATOBJ" ), IS_DATOBJ_Func ); + C_NEW_GVAR_FUNC( "IS_DATOBJ", 1, "obj", + IS_DATOBJ_Handler, + "src/objects.c:IS_DATOBJ" ); - InitHandlerFunc( SET_TYPE_DATOBJ_Handler, "SET_TYPE_DATOBJ" ); - SET_TYPE_DATOBJ_Func = NewFunctionC( - "SET_TYPE_DATOBJ", 2L, "obj, kind", SET_TYPE_DATOBJ_Handler ); - AssGVar( GVarName( "SET_TYPE_DATOBJ" ), SET_TYPE_DATOBJ_Func ); - - - /* install the debug functions */ - InitHandlerFunc( SIZE_OBJ_Handler, "SIZE_OBJ" ); - SIZE_OBJ_Func = NewFunctionC( - "SIZE_OBJ", 1L, "obj", SIZE_OBJ_Handler ); - AssGVar( GVarName( "SIZE_OBJ" ), SIZE_OBJ_Func ); - - InitHandlerFunc( TNUM_OBJ_Handler, "TNUM_OBJ" ); - TNUM_OBJ_Func = NewFunctionC( - "TNUM_OBJ", 1L, "obj", TNUM_OBJ_Handler ); - AssGVar( GVarName( "TNUM_OBJ" ), TNUM_OBJ_Func ); + C_NEW_GVAR_FUNC( "SET_TYPE_DATOBJ", 2, "obj, type", + SET_TYPE_DATOBJ_Handler, + "src/objects.c:SET_TYPE_DATOBJ" ); +} + + +/**************************************************************************** +** +*F CheckObjects() . . . . . check the initialisation of the objects package +*/ +void CheckObjects ( void ) +{ + SET_REVISION( "objects_c", Revision_objects_c ); + SET_REVISION( "objects_h", Revision_objects_h ); } diff --git a/src/objects.h b/src/objects.h index a1eb5e9770..17d15351ca 100644 --- a/src/objects.h +++ b/src/objects.h @@ -13,7 +13,7 @@ ** dispatcher for the printing of objects, etc. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_objects_h = +SYS_CONST char * Revision_objects_h = "@(#)$Id$"; #endif @@ -251,8 +251,10 @@ char * Revision_objects_h = #define T_COMOBJ (FIRST_EXTERNAL_TNUM+ 0) #define T_POSOBJ (FIRST_EXTERNAL_TNUM+ 1) #define T_DATOBJ (FIRST_EXTERNAL_TNUM+ 2) -#define T_DUMMYOBJ (FIRST_EXTERNAL_TNUM+ 3) -#define LAST_EXTERNAL_TNUM T_DUMMYOBJ +#define T_WPOBJ (FIRST_EXTERNAL_TNUM+ 3) + /* #define T_DUMMYOBJ (FIRST_EXTERNAL_TNUM+ 4) + remove to get parity right */ +#define LAST_EXTERNAL_TNUM T_WPOBJ #define LAST_REAL_TNUM LAST_EXTERNAL_TNUM #define FIRST_VIRTUAL_TNUM (LAST_EXTERNAL_TNUM+1) @@ -335,6 +337,13 @@ char * Revision_objects_h = (IS_FFE( obj ) ? T_FFE : TNUM_BAG( obj ))) +/**************************************************************************** +** +*F TNAM_OBJ( ) . . . . . . . . . . . . . name of the type of an object +*/ +#define TNAM_OBJ(obj) (InfoBags[TNUM_OBJ(obj)].name) + + /**************************************************************************** ** *F SIZE_OBJ( ) . . . . . . . . . . . . . . . . . . . size of an object @@ -461,7 +470,10 @@ extern Int (*IsMutableObjFuncs[ LAST_REAL_TNUM+1 ]) ( Obj obj ); extern void (*SaveObjFuncs[ LAST_REAL_TNUM + 1]) (Obj obj); - /**************************************************************************** +extern void SaveObjError ( Obj obj ); + + +/**************************************************************************** ** *V LoadObjFuncs () . . . . . . . . . . . . . functions to load objects ** @@ -476,8 +488,11 @@ extern void (*SaveObjFuncs[ LAST_REAL_TNUM + 1]) (Obj obj); ** No loading function may allocate any bag */ -extern void (*LoadObjFuncs[ LAST_REAL_TNUM + 1]) (Obj obj, Bag bag); +extern void (*LoadObjFuncs[ LAST_REAL_TNUM + 1]) (Bag bag); +extern void LoadObjError ( + Bag bag + ); /**************************************************************************** ** @@ -696,13 +711,34 @@ extern void (* PrintPathFuncs [ LAST_REAL_TNUM+PRINTING+1 ]) ( /**************************************************************************** ** +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + +*F SetupObjects() . . . . . . . . . . . . . initialize the objects package +*/ +extern void SetupObjects ( void ); + + +/**************************************************************************** +** *F InitObjects() . . . . . . . . . . . . . . initialize the objects package ** -** 'InitObjects' initializes the objects package. +** 'InitObjects' initializes the objects package. */ extern void InitObjects ( void ); +/**************************************************************************** +** +*F CheckObjects() . . . . . check the initialisation of the objects package +*/ +extern void CheckObjects ( void ); + + /**************************************************************************** ** diff --git a/src/objfgelm.c b/src/objfgelm.c index 10b3443e1e..e59673c5ee 100644 --- a/src/objfgelm.c +++ b/src/objfgelm.c @@ -70,29 +70,32 @@ ** PURETYPE_WORDTYPE( ) ** returns the result kind */ -char * Revision_objfgelm_c = - "@(#)$Id$"; - #include /* assert */ - #include "system.h" /* Ints, UInts */ -#include "gasman.h" /* NewBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, types */ -#include "scanner.h" /* Pr */ +SYS_CONST char * Revision_objfgelm_c = + "@(#)$Id$"; + +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ + +#include "gvars.h" /* global variables */ +#include "gap.h" /* error handling, initialisation */ -#include "gvars.h" /* AssGVar, GVarName */ -#include "gap.h" /* Error */ +#include "calls.h" /* generic call mechanism */ -#include "calls.h" /* CALL_2ARGS */ +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ -#include "lists.h" /* generic lists package */ -#include "plist.h" /* ELM_PLIST, SET_ELM_PLIST, ... */ +#include "lists.h" /* generic lists */ +#include "plist.h" /* plain lists */ +#include "string.h" /* strings */ -#include "bool.h" /* True, False */ +#include "bool.h" /* booleans */ #define INCLUDE_DECLARATION_PART -#include "objfgelm.h" /* declaration part of the package */ +#include "objfgelm.h" /* objects of free groups */ #undef INCLUDE_DECLARATION_PART extern Obj TRY_NEXT_METHOD; @@ -563,7 +566,7 @@ Obj Func8Bits_ObjByVector ( while ( ! IS_INTOBJ(vexp) ) { vexp = ErrorReturnObj( "%d element must be integer (not a %s)", - (Int) i, (Int) (InfoBags[TNUM_OBJ(vexp)].name), + (Int) i, (Int) TNAM_OBJ(vexp), "you can return an integer" ); } if ( vexp != INTOBJ_INT(0) ) { @@ -1456,7 +1459,7 @@ Obj Func16Bits_ObjByVector ( while ( ! IS_INTOBJ(vexp) ) { vexp = ErrorReturnObj( "%d element must be integer (not a %s)", - (Int) i, (Int) (InfoBags[TNUM_OBJ(vexp)].name), + (Int) i, (Int) TNAM_OBJ(vexp), "you can return an integer" ); } if ( vexp != INTOBJ_INT(0) ) { @@ -2349,7 +2352,7 @@ Obj Func32Bits_ObjByVector ( while ( ! IS_INTOBJ(vexp) ) { vexp = ErrorReturnObj( "%d element must be integer (not a %s)", - (Int) i, (Int) (InfoBags[TNUM_OBJ(vexp)].name), + (Int) i, (Int) TNAM_OBJ(vexp), "you can return an integer" ); } if ( vexp != INTOBJ_INT(0) ) { @@ -2808,242 +2811,222 @@ Obj FuncNBits_NumberSyllables ( /**************************************************************************** ** -*F InitFreeGroupElements() +*F SetupFreeGroupElements() . . . initialize the free group element helpers +*/ +void SetupFreeGroupElements ( void ) +{ +} + + +/**************************************************************************** +** +*F InitFreeGroupElements() . . . initialize the free group element helpers */ void InitFreeGroupElements ( void ) { /* export position numbers 'AWP_SOMETHING' */ - AssGVar( GVarName( "AWP_FIRST_ENTRY" ), - INTOBJ_INT(AWP_FIRST_ENTRY) ); - AssGVar( GVarName( "AWP_PURE_TYPE" ), - INTOBJ_INT(AWP_PURE_TYPE) ); - AssGVar( GVarName( "AWP_NR_BITS_EXP" ), - INTOBJ_INT(AWP_NR_BITS_EXP) ); - AssGVar( GVarName( "AWP_NR_GENS" ), - INTOBJ_INT(AWP_NR_GENS) ); - AssGVar( GVarName( "AWP_NR_BITS_PAIR" ), - INTOBJ_INT(AWP_NR_BITS_PAIR) ); - AssGVar( GVarName( "AWP_FUN_OBJ_BY_VECTOR" ), - INTOBJ_INT(AWP_FUN_OBJ_BY_VECTOR) ); - AssGVar( GVarName( "AWP_FUN_ASSOC_WORD" ), - INTOBJ_INT(AWP_FUN_ASSOC_WORD) ); - AssGVar( GVarName( "AWP_FIRST_FREE" ), - INTOBJ_INT(AWP_FIRST_FREE) ); + if ( ! SyRestoring ) { + AssGVar( GVarName( "AWP_FIRST_ENTRY" ), + INTOBJ_INT(AWP_FIRST_ENTRY) ); + AssGVar( GVarName( "AWP_PURE_TYPE" ), + INTOBJ_INT(AWP_PURE_TYPE) ); + AssGVar( GVarName( "AWP_NR_BITS_EXP" ), + INTOBJ_INT(AWP_NR_BITS_EXP) ); + AssGVar( GVarName( "AWP_NR_GENS" ), + INTOBJ_INT(AWP_NR_GENS) ); + AssGVar( GVarName( "AWP_NR_BITS_PAIR" ), + INTOBJ_INT(AWP_NR_BITS_PAIR) ); + AssGVar( GVarName( "AWP_FUN_OBJ_BY_VECTOR" ), + INTOBJ_INT(AWP_FUN_OBJ_BY_VECTOR) ); + AssGVar( GVarName( "AWP_FUN_ASSOC_WORD" ), + INTOBJ_INT(AWP_FUN_ASSOC_WORD) ); + AssGVar( GVarName( "AWP_FIRST_FREE" ), + INTOBJ_INT(AWP_FIRST_FREE) ); + } /* '8Bits' methods */ - InitHandlerFunc( Func8Bits_Equal, "8Bits_Equal" ); - AssGVar( GVarName( "8Bits_Equal" ), - NewFunctionC( "8Bits_Equal", 2L, "8_bits_word, 8_bits_word", - Func8Bits_Equal ) ); - - InitHandlerFunc( Func8Bits_ExponentSums1, "8Bits_ExponentSums1" ); - AssGVar( GVarName( "8Bits_ExponentSums1" ), - NewFunctionC( "8Bits_ExponentSums1", 1L, "8_bits_word", - Func8Bits_ExponentSums1 ) ); - - InitHandlerFunc( Func8Bits_ExponentSums3, "8Bits_ExponentSums3" ); - AssGVar( GVarName( "8Bits_ExponentSums3" ), - NewFunctionC( "8Bits_ExponentSums3", 3L, "8_bits_word, start, end", - Func8Bits_ExponentSums3 ) ); - - InitHandlerFunc( Func8Bits_ExponentSyllable, "8Bits_ExponentSyllable" ); - AssGVar( GVarName( "8Bits_ExponentSyllable" ), - NewFunctionC( "8Bits_ExponentSyllable", 2L, "8_bits_word, position", - Func8Bits_ExponentSyllable ) ); - - InitHandlerFunc( Func8Bits_ExtRepOfObj, "8Bits_ExtRepOfObj" ); - AssGVar( GVarName( "8Bits_ExtRepOfObj" ), - NewFunctionC( "8Bits_ExtRepOfObj", 1L, "8_bits_word", - Func8Bits_ExtRepOfObj ) ); - - InitHandlerFunc( Func8Bits_GeneratorSyllable, "8Bits_GeneratorSyllable" ); - AssGVar( GVarName( "8Bits_GeneratorSyllable" ), - NewFunctionC( "8Bits_GeneratorSyllable", 2L, "8_bits_word, position", - Func8Bits_GeneratorSyllable ) ); - - InitHandlerFunc( Func8Bits_Less, "8Bits_Less" ); - AssGVar( GVarName( "8Bits_Less" ), - NewFunctionC( "8Bits_Less", 2L, "8_bits_word, 8_bits_word", - Func8Bits_Less ) ); - - InitHandlerFunc( Func8Bits_AssocWord, "8Bits_AssocWord" ); - AssGVar( GVarName( "8Bits_AssocWord" ), - NewFunctionC( "8Bits_AssocWord", 2L, "kind, data", - Func8Bits_AssocWord ) ); - - InitHandlerFunc( FuncNBits_NumberSyllables, "NBits_NumberSyllables" ); - AssGVar( GVarName( "8Bits_NumberSyllables" ), - NewFunctionC( "NBits_NumberSyllables", 1L, "8_bits_word", - FuncNBits_NumberSyllables ) ); - - InitHandlerFunc( Func8Bits_ObjByVector, "8Bits_ObjByVector" ); - AssGVar( GVarName( "8Bits_ObjByVector" ), - NewFunctionC( "8Bits_ObjByVector", 2L, "kind, data", - Func8Bits_ObjByVector ) ); - - InitHandlerFunc( Func8Bits_HeadByNumber, "8Bits_HeadByNumber" ); - AssGVar( GVarName( "8Bits_HeadByNumber" ), - NewFunctionC( "8Bits_HeadByNumber", 2L, "16_bits_word, gen_num", - Func8Bits_HeadByNumber ) ); - - InitHandlerFunc( Func8Bits_Power, "8Bits_Power" ); - AssGVar( GVarName( "8Bits_Power" ), - NewFunctionC( "8Bits_Power", 2L, "8_bits_word, small_integer", - Func8Bits_Power ) ); - - InitHandlerFunc( Func8Bits_Product, "8Bits_Product" ); - AssGVar( GVarName( "8Bits_Product" ), - NewFunctionC( "8Bits_Product", 2L, "8_bits_word, 8_bits_word", - Func8Bits_Product ) ); - - InitHandlerFunc( Func8Bits_Quotient, "8Bits_Quotient" ); - AssGVar( GVarName( "8Bits_Quotient" ), - NewFunctionC( "8Bits_Quotient", 2L, "8_bits_word, 8_bits_word", - Func8Bits_Quotient ) ); + C_NEW_GVAR_FUNC( "8Bits_Equal", 2, "8_bits_word, 8_bits_word", + Func8Bits_Equal, + "src/objfgelm.c:8Bits_Equal" ); + + C_NEW_GVAR_FUNC( "8Bits_ExponentSums1", 1, "8_bits_word", + Func8Bits_ExponentSums1, + "src/objfgelm.c:8Bits_ExponentSums1" ); + + C_NEW_GVAR_FUNC( "8Bits_ExponentSums3", 3, "8_bits_word, start, end", + Func8Bits_ExponentSums3, + "src/objfgelm.c:8Bits_ExponentSums3" ); + + C_NEW_GVAR_FUNC( "8Bits_ExponentSyllable", 2, "8_bits_word, position", + Func8Bits_ExponentSyllable, + "src/objfgelm.c:8Bits_ExponentSyllable" ); + + C_NEW_GVAR_FUNC( "8Bits_ExtRepOfObj", 1, "8_bits_word", + Func8Bits_ExtRepOfObj, + "src/objfgelm.c:8Bits_ExtRepOfObj" ); + + C_NEW_GVAR_FUNC( "8Bits_GeneratorSyllable", 2, "8_bits_word, position", + Func8Bits_GeneratorSyllable, + "src/objfgelm.c:8Bits_GeneratorSyllable" ); + + C_NEW_GVAR_FUNC( "8Bits_Less", 2, "8_bits_word, 8_bits_word", + Func8Bits_Less, + "src/objfgelm.c:8Bits_Less" ); + + C_NEW_GVAR_FUNC( "8Bits_AssocWord", 2, "kind, data", + Func8Bits_AssocWord, + "src/objfgelm.c:8Bits_AssocWord" ); + + C_NEW_GVAR_FUNC( "8Bits_NumberSyllables", 1, "8_bits_word", + FuncNBits_NumberSyllables, + "src/objfgelm.c:NBits_NumberSyllables" ); + + C_NEW_GVAR_FUNC( "8Bits_ObjByVector", 2, "kind, data", + Func8Bits_ObjByVector, + "src/objfgelm.c:8Bits_ObjByVector" ); + + C_NEW_GVAR_FUNC( "8Bits_HeadByNumber", 2, "16_bits_word, gen_num", + Func8Bits_HeadByNumber, + "src/objfgelm.c:8Bits_HeadByNumber" ); + + C_NEW_GVAR_FUNC( "8Bits_Power", 2, "8_bits_word, small_integer", + Func8Bits_Power, + "src/objfgelm.c:8Bits_Power" ); + + C_NEW_GVAR_FUNC( "8Bits_Product", 2, "8_bits_word, 8_bits_word", + Func8Bits_Product, + "src/objfgelm.c:8Bits_Product" ); + + C_NEW_GVAR_FUNC( "8Bits_Quotient", 2, "8_bits_word, 8_bits_word", + Func8Bits_Quotient, + "src/objfgelm.c:8Bits_Quotient" ); /* '16Bits' methods */ - InitHandlerFunc( Func16Bits_Equal, "16Bits_Equal" ); - AssGVar( GVarName( "16Bits_Equal" ), - NewFunctionC( "16Bits_Equal", 2L, "16_bits_word, 16_bits_word", - Func16Bits_Equal ) ); - - InitHandlerFunc( Func16Bits_ExponentSums1, "16Bits_ExponentSums1" ); - AssGVar( GVarName( "16Bits_ExponentSums1" ), - NewFunctionC( "16Bits_ExponentSums1", 1L, "16_bits_word", - Func16Bits_ExponentSums1 ) ); - - InitHandlerFunc( Func16Bits_ExponentSums3, "16Bits_ExponentSums3" ); - AssGVar( GVarName( "16Bits_ExponentSums3" ), - NewFunctionC( "16Bits_ExponentSums3", 3L, "16_bits_word, start, end", - Func16Bits_ExponentSums3 ) ); - - InitHandlerFunc( Func16Bits_ExponentSyllable, "16Bits_ExponentSyllable" ); - AssGVar( GVarName( "16Bits_ExponentSyllable" ), - NewFunctionC( "16Bits_ExponentSyllable", 2L, "16_bits_word, position", - Func16Bits_ExponentSyllable ) ); - - InitHandlerFunc( Func16Bits_ExtRepOfObj, "16Bits_ExtRepOfObj" ); - AssGVar( GVarName( "16Bits_ExtRepOfObj" ), - NewFunctionC( "16Bits_ExtRepOfObj", 1L, "16_bits_word", - Func16Bits_ExtRepOfObj ) ); - - InitHandlerFunc( Func16Bits_GeneratorSyllable, "16Bits_GeneratorSyllable" ); - AssGVar( GVarName( "16Bits_GeneratorSyllable" ), - NewFunctionC( "16Bits_GeneratorSyllable", 2L, "16_bits_word, pos", - Func16Bits_GeneratorSyllable ) ); - - InitHandlerFunc( Func16Bits_Less, "16Bits_Less" ); - AssGVar( GVarName( "16Bits_Less" ), - NewFunctionC( "16Bits_Less", 2L, "16_bits_word, 16_bits_word", - Func16Bits_Less ) ); - - InitHandlerFunc( Func16Bits_AssocWord, "16Bits_AssocWord" ); - AssGVar( GVarName( "16Bits_AssocWord" ), - NewFunctionC( "16Bits_AssocWord", 2L, "kind, data", - Func16Bits_AssocWord ) ); - - InitHandlerFunc( FuncNBits_NumberSyllables, "NBits_NumberSyllables" ); - AssGVar( GVarName( "16Bits_NumberSyllables" ), - NewFunctionC( "NBits_NumberSyllables", 1L, "16_bits_word", - FuncNBits_NumberSyllables ) ); - - InitHandlerFunc( Func16Bits_ObjByVector, "16Bits_ObjByVector" ); - AssGVar( GVarName( "16Bits_ObjByVector" ), - NewFunctionC( "16Bits_ObjByVector", 2L, "kind, data", - Func16Bits_ObjByVector ) ); - - InitHandlerFunc( Func16Bits_HeadByNumber, "16Bits_HeadByNumber" ); - AssGVar( GVarName( "16Bits_HeadByNumber" ), - NewFunctionC( "16Bits_HeadByNumber", 2L, "16_bits_word, gen_num", - Func16Bits_HeadByNumber ) ); - - InitHandlerFunc( Func16Bits_Power, "16Bits_Power" ); - AssGVar( GVarName( "16Bits_Power" ), - NewFunctionC( "16Bits_Power", 2L, "16_bits_word, small_integer", - Func16Bits_Power ) ); - - InitHandlerFunc( Func16Bits_Product, "16Bits_Product" ); - AssGVar( GVarName( "16Bits_Product" ), - NewFunctionC( "16Bits_Product", 2L, "16_bits_word, 16_bits_word", - Func16Bits_Product ) ); - - InitHandlerFunc( Func16Bits_Quotient, "16Bits_Quotient" ); - AssGVar( GVarName( "16Bits_Quotient" ), - NewFunctionC( "16Bits_Quotient", 2L, "16_bits_word, 16_bits_word", - Func16Bits_Quotient ) ); + C_NEW_GVAR_FUNC( "16Bits_Equal", 2, "16_bits_word, 16_bits_word", + Func16Bits_Equal, + "src/objfgelm.c:16Bits_Equal" ); + + C_NEW_GVAR_FUNC( "16Bits_ExponentSums1", 1, "16_bits_word", + Func16Bits_ExponentSums1, + "src/objfgelm.c:16Bits_ExponentSums1" ); + + C_NEW_GVAR_FUNC( "16Bits_ExponentSums3", 3, "16_bits_word, start, end", + Func16Bits_ExponentSums3, + "src/objfgelm.c:16Bits_ExponentSums3" ); + + C_NEW_GVAR_FUNC( "16Bits_ExponentSyllable", 2, "16_bits_word, position", + Func16Bits_ExponentSyllable, + "src/objfgelm.c:16Bits_ExponentSyllable" ); + + C_NEW_GVAR_FUNC( "16Bits_ExtRepOfObj", 1, "16_bits_word", + Func16Bits_ExtRepOfObj, + "src/objfgelm.c:16Bits_ExtRepOfObj" ); + + C_NEW_GVAR_FUNC( "16Bits_GeneratorSyllable", 2, "16_bits_word, pos", + Func16Bits_GeneratorSyllable, + "src/objfgelm.c:16Bits_GeneratorSyllable" ); + + C_NEW_GVAR_FUNC( "16Bits_Less", 2, "16_bits_word, 16_bits_word", + Func16Bits_Less, + "src/objfgelm.c:16Bits_Less" ); + + C_NEW_GVAR_FUNC( "16Bits_AssocWord", 2, "kind, data", + Func16Bits_AssocWord, + "src/objfgelm.c:16Bits_AssocWord" ); + + C_NEW_GVAR_FUNC( "16Bits_NumberSyllables", 1, "16_bits_word", + FuncNBits_NumberSyllables, + "src/objfgelm.c:NBits_NumberSyllables" ); + + C_NEW_GVAR_FUNC( "16Bits_ObjByVector", 2, "kind, data", + Func16Bits_ObjByVector, + "src/objfgelm.c:16Bits_ObjByVector" ); + + C_NEW_GVAR_FUNC( "16Bits_HeadByNumber", 2, "16_bits_word, gen_num", + Func16Bits_HeadByNumber, + "src/objfgelm.c:16Bits_HeadByNumber" ); + + C_NEW_GVAR_FUNC( "16Bits_Power", 2, "16_bits_word, small_integer", + Func16Bits_Power, + "src/objfgelm.c:16Bits_Power" ); + + C_NEW_GVAR_FUNC( "16Bits_Product", 2, "16_bits_word, 16_bits_word", + Func16Bits_Product, + "src/objfgelm.c:16Bits_Product" ); + + C_NEW_GVAR_FUNC( "16Bits_Quotient", 2, "16_bits_word, 16_bits_word", + Func16Bits_Quotient, + "src/objfgelm.c:16Bits_Quotient" ); /* '32Bits' methods */ - InitHandlerFunc( Func32Bits_Equal, "32Bits_Equal" ); - AssGVar( GVarName( "32Bits_Equal" ), - NewFunctionC( "32Bits_Equal", 2L, "32_bits_word, 32_bits_word", - Func32Bits_Equal ) ); - - InitHandlerFunc( Func32Bits_ExponentSums1, "32Bits_ExponentSums1" ); - AssGVar( GVarName( "32Bits_ExponentSums1" ), - NewFunctionC( "32Bits_ExponentSums1", 1L, "32_bits_word", - Func32Bits_ExponentSums1 ) ); - - InitHandlerFunc( Func32Bits_ExponentSums3, "32Bits_ExponentSums3" ); - AssGVar( GVarName( "32Bits_ExponentSums3" ), - NewFunctionC( "32Bits_ExponentSums3", 3L, "32_bits_word, start, end", - Func32Bits_ExponentSums3 ) ); - - InitHandlerFunc( Func32Bits_ExponentSyllable, "32Bits_ExponentSyllable" ); - AssGVar( GVarName( "32Bits_ExponentSyllable" ), - NewFunctionC( "32Bits_ExponentSyllable", 2L, "32_bits_word, position", - Func32Bits_ExponentSyllable ) ); - - InitHandlerFunc( Func32Bits_ExtRepOfObj, "32Bits_ExtRepOfObj" ); - AssGVar( GVarName( "32Bits_ExtRepOfObj" ), - NewFunctionC( "32Bits_ExtRepOfObj", 1L, "32_bits_word", - Func32Bits_ExtRepOfObj ) ); - - InitHandlerFunc( Func32Bits_GeneratorSyllable, "32Bits_GeneratorSyllable" ); - AssGVar( GVarName( "32Bits_GeneratorSyllable" ), - NewFunctionC( "32Bits_GeneratorSyllable", 2L, "32_bits_word, pos", - Func32Bits_GeneratorSyllable ) ); - - InitHandlerFunc( Func32Bits_Less, "32Bits_Less" ); - AssGVar( GVarName( "32Bits_Less" ), - NewFunctionC( "32Bits_Less", 2L, "32_bits_word, 32_bits_word", - Func32Bits_Less ) ); - - InitHandlerFunc( Func32Bits_AssocWord, "32Bits_AssocWord" ); - AssGVar( GVarName( "32Bits_AssocWord" ), - NewFunctionC( "32Bits_AssocWord", 2L, "kind, data", - Func32Bits_AssocWord ) ); - - InitHandlerFunc( FuncNBits_NumberSyllables, "NBits_NumberSyllables" ); - AssGVar( GVarName( "32Bits_NumberSyllables" ), - NewFunctionC( "NBits_NumberSyllables", 1L, "32_bits_word", - FuncNBits_NumberSyllables ) ); - - InitHandlerFunc( Func32Bits_ObjByVector, "32Bits_ObjByVector" ); - AssGVar( GVarName( "32Bits_ObjByVector" ), - NewFunctionC( "32Bits_ObjByVector", 2L, "kind, data", - Func32Bits_ObjByVector ) ); - - InitHandlerFunc( Func32Bits_HeadByNumber, "32Bits_HeadByNumber" ); - AssGVar( GVarName( "32Bits_HeadByNumber" ), - NewFunctionC( "32Bits_HeadByNumber", 2L, "16_bits_word, gen_num", - Func32Bits_HeadByNumber ) ); - - InitHandlerFunc( Func32Bits_Power, "32Bits_Power" ); - AssGVar( GVarName( "32Bits_Power" ), - NewFunctionC( "32Bits_Power", 2L, "32_bits_word, small_integer", - Func32Bits_Power ) ); - - InitHandlerFunc( Func32Bits_Product, "32Bits_Product" ); - AssGVar( GVarName( "32Bits_Product" ), - NewFunctionC( "32Bits_Product", 2L, "32_bits_word, 32_bits_word", - Func32Bits_Product ) ); - - InitHandlerFunc( Func32Bits_Quotient, "32Bits_Quotient" ); - AssGVar( GVarName( "32Bits_Quotient" ), - NewFunctionC( "32Bits_Quotient", 2L, "32_bits_word, 32_bits_word", - Func32Bits_Quotient ) ); + C_NEW_GVAR_FUNC( "32Bits_Equal", 2, "32_bits_word, 32_bits_word", + Func32Bits_Equal, + "src/objfgelm.c:32Bits_Equal" ); + + C_NEW_GVAR_FUNC( "32Bits_ExponentSums1", 1, "32_bits_word", + Func32Bits_ExponentSums1, + "src/objfgelm.c:32Bits_ExponentSums1" ); + + C_NEW_GVAR_FUNC( "32Bits_ExponentSums3", 3, "32_bits_word, start, end", + Func32Bits_ExponentSums3, + "src/objfgelm.c:32Bits_ExponentSums3" ); + + C_NEW_GVAR_FUNC( "32Bits_ExponentSyllable", 2, "32_bits_word, position", + Func32Bits_ExponentSyllable, + "src/objfgelm.c:32Bits_ExponentSyllable" ); + + C_NEW_GVAR_FUNC( "32Bits_ExtRepOfObj", 1, "32_bits_word", + Func32Bits_ExtRepOfObj, + "src/objfgelm.c:32Bits_ExtRepOfObj" ); + + C_NEW_GVAR_FUNC( "32Bits_GeneratorSyllable", 2, "32_bits_word, pos", + Func32Bits_GeneratorSyllable, + "src/objfgelm.c:32Bits_GeneratorSyllable" ); + + C_NEW_GVAR_FUNC( "32Bits_Less", 2, "32_bits_word, 32_bits_word", + Func32Bits_Less, + "src/objfgelm.c:32Bits_Less" ); + + C_NEW_GVAR_FUNC( "32Bits_AssocWord", 2, "kind, data", + Func32Bits_AssocWord, + "src/objfgelm.c:32Bits_AssocWord" ); + + C_NEW_GVAR_FUNC( "32Bits_NumberSyllables", 1, "32_bits_word", + FuncNBits_NumberSyllables, + "src/objfgelm.c:NBits_NumberSyllables" ); + + C_NEW_GVAR_FUNC( "32Bits_ObjByVector", 2, "kind, data", + Func32Bits_ObjByVector, + "src/objfgelm.c:32Bits_ObjByVector" ); + + C_NEW_GVAR_FUNC( "32Bits_HeadByNumber", 2, "16_bits_word, gen_num", + Func32Bits_HeadByNumber, + "src/objfgelm.c:32Bits_HeadByNumber" ); + + C_NEW_GVAR_FUNC( "32Bits_Power", 2, "32_bits_word, small_integer", + Func32Bits_Power, + "src/objfgelm.c:32Bits_Power" ); + + C_NEW_GVAR_FUNC( "32Bits_Product", 2, "32_bits_word, 32_bits_word", + Func32Bits_Product, + "src/objfgelm.c:32Bits_Product" ); + + C_NEW_GVAR_FUNC( "32Bits_Quotient", 2, "32_bits_word, 32_bits_word", + Func32Bits_Quotient, + "src/objfgelm.c:32Bits_Quotient" ); +} + + +/**************************************************************************** +** +*F CheckFreeGroupElements() . . . . . check the free group element helpers +*/ +void CheckFreeGroupElements ( void ) +{ + SET_REVISION( "objfgelm_c", Revision_objfgelm_c ); + SET_REVISION( "objfgelm_h", Revision_objfgelm_h ); } diff --git a/src/objfgelm.h b/src/objfgelm.h index aeda387bd7..5a3618f8be 100644 --- a/src/objfgelm.h +++ b/src/objfgelm.h @@ -7,7 +7,7 @@ *Y Copyright (C) 1996, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_objfgelm_h = +SYS_CONST char * Revision_objfgelm_h = "@(#)$Id$"; #endif @@ -142,11 +142,30 @@ char * Revision_objfgelm_h = /**************************************************************************** ** -*F InitFreeGroupElements() +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + +*F SetupFreeGroupElements() . . . initialize the free group element helpers +*/ +extern void SetupFreeGroupElements ( void ); + + +/**************************************************************************** +** +*F InitFreeGroupElements() . . . initialize the free group element helpers */ extern void InitFreeGroupElements ( void ); +/**************************************************************************** +** +*F CheckFreeGroupElements() . . . . . check the free group element helpers +*/ +extern void CheckFreeGroupElements ( void ); + /**************************************************************************** ** diff --git a/src/objpcgel.c b/src/objpcgel.c index cf3767e667..d46b83df9f 100644 --- a/src/objpcgel.c +++ b/src/objpcgel.c @@ -6,31 +6,35 @@ ** *Y Copyright (C) 1996, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany */ -char * Revision_objpcgel_c = +#include "system.h" /* Ints, UInts */ + +SYS_CONST char * Revision_objpcgel_c = "@(#)$Id$"; -#include "system.h" /* Ints, UInts */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ -#include "gasman.h" /* NewBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, types */ -#include "scanner.h" /* Pr */ +#include "gvars.h" /* global variables */ +#include "gap.h" /* error handling, initialisation */ -#include "gvars.h" /* AssGVar, GVarName */ -#include "gap.h" /* Error */ +#include "calls.h" /* generic call mechanism */ -#include "calls.h" /* CALL_2ARGS */ +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ -#include "lists.h" /* generic lists package */ -#include "plist.h" /* ELM_PLIST, SET_ELM_PLIST, ... */ +#include "lists.h" /* generic lists */ +#include "plist.h" /* plain lists */ +#include "string.h" /* strings */ -#include "ariths.h" /* LT, EQ */ -#include "bool.h" /* True, False */ +#include "ariths.h" /* basic arithmetic */ +#include "bool.h" /* booleans */ -#include "objfgelm.h" /* NPAIRS_WORD, EDBITS_WORD, ... */ -#include "objscoll.h" /* collectors */ +#include "objfgelm.h" /* objects of free groups */ +#include "objscoll.h" /* single collector */ #define INCLUDE_DECLARATION_PART -#include "objpcgel.h" +#include "objpcgel.h" /* objects of polycyclic groups */ #undef INCLUDE_DECLARATION_PART @@ -418,142 +422,126 @@ Obj Func32Bits_LeadingExponentOfPcElement ( Obj self, Obj pcgs, Obj w ) /**************************************************************************** ** -*F InitPcElements() . . . . . . . . initialize the single collector package +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + + +*F SetupPcElements() . . . . . . . initialize the pc group elements package +*/ +void SetupPcElements ( void ) +{ +} + + +/**************************************************************************** +** +*F InitPcElements() . . . . . . . initialize the pc group elements package */ void InitPcElements ( void ) { /* export position numbers 'PCWP_SOMETHING' */ - AssGVar( GVarName( "PCWP_FIRST_ENTRY" ), - INTOBJ_INT(PCWP_FIRST_ENTRY) ); - AssGVar( GVarName( "PCWP_NAMES" ), - INTOBJ_INT(PCWP_NAMES) ); - AssGVar( GVarName( "PCWP_COLLECTOR" ), - INTOBJ_INT(PCWP_COLLECTOR) ); - AssGVar( GVarName( "PCWP_FIRST_FREE" ), - INTOBJ_INT(PCWP_FIRST_FREE) ); - + if ( ! SyRestoring ) { + AssGVar( GVarName( "PCWP_FIRST_ENTRY" ), + INTOBJ_INT(PCWP_FIRST_ENTRY) ); + AssGVar( GVarName( "PCWP_NAMES" ), + INTOBJ_INT(PCWP_NAMES) ); + AssGVar( GVarName( "PCWP_COLLECTOR" ), + INTOBJ_INT(PCWP_COLLECTOR) ); + AssGVar( GVarName( "PCWP_FIRST_FREE" ), + INTOBJ_INT(PCWP_FIRST_FREE) ); + } /* methods for boxed objs */ - InitHandlerFunc( FuncLessBoxedObj, "LessBoxedObj" ); - AssGVar( GVarName( "LessBoxedObj" ), - NewFunctionC( "LessBoxedObj", 2L, "lobj, lobj", - FuncLessBoxedObj ) ); + C_NEW_GVAR_FUNC( "LessBoxedObj", 2, "lobj, lobj", + FuncLessBoxedObj, + "src/objpcgel.c:LessBoxedObj" ); - InitHandlerFunc( FuncEqualBoxedObj, "EqualBoxedObj" ); - AssGVar( GVarName( "EqualBoxedObj" ), - NewFunctionC( "EqualBoxedObj", 2L, "lobj, lobj", - FuncEqualBoxedObj ) ); + C_NEW_GVAR_FUNC( "EqualBoxedObj", 2, "lobj, lobj", + FuncEqualBoxedObj, + "src/objpcgel.c:EqualBoxedObj" ); /* finite power conjugate collector words */ - InitHandlerFunc( FuncNBitsPcWord_Comm, "NBitsPcWord_Comm" ); - AssGVar( GVarName( "NBitsPcWord_Comm" ), - NewFunctionC( "NBitsPcWord_Comm", 2L, + C_NEW_GVAR_FUNC( "NBitsPcWord_Comm", 2, "n_bits_pcword, n_bits_pcword", - FuncNBitsPcWord_Comm ) ); + FuncNBitsPcWord_Comm, + "src/objpcgel.c:NBitsPcWord_Comm" ); - InitHandlerFunc( FuncNBitsPcWord_Conjugate, - "NBitsPcWord_Conjugate" ); - AssGVar( GVarName( "NBitsPcWord_Conjugate" ), - NewFunctionC( "NBitsPcWord_Conjugate", 2L, - "n_bits_pcword, n_bits_pcword", - FuncNBitsPcWord_Conjugate ) ); + C_NEW_GVAR_FUNC( "NBitsPcWord_Conjugate", 2, "n_bits_pcword, n_bits_pcword", + FuncNBitsPcWord_Conjugate, + "src/objpcgel.c:NBitsPcWord_Conjugate" ); - InitHandlerFunc( FuncNBitsPcWord_LeftQuotient, - "NBitsPcWord_LeftQuotient" ); - AssGVar( GVarName( "NBitsPcWord_LeftQuotient" ), - NewFunctionC( "NBitsPcWord_LeftQuotient", 2L, - "n_bits_pcword, n_bits_pcword", - FuncNBitsPcWord_LeftQuotient ) ); - - InitHandlerFunc( FuncNBitsPcWord_PowerSmallInt, - "NBitsPcWord_PowerSmallInt" ); - AssGVar( GVarName( "NBitsPcWord_PowerSmallInt" ), - NewFunctionC( "NBitsPcWord_PowerSmallInt", 2L, - "n_bits_pcword, small_integer", - FuncNBitsPcWord_PowerSmallInt ) ); - - InitHandlerFunc( FuncNBitsPcWord_Product, - "NBitsPcWord_Product" ); - AssGVar( GVarName( "NBitsPcWord_Product" ), - NewFunctionC( "NBitsPcWord_Product", 2L, - "n_bits_pcword, n_bits_pcword", - FuncNBitsPcWord_Product ) ); + C_NEW_GVAR_FUNC( "NBitsPcWord_LeftQuotient", 2, "n_bits_pcword, n_bits_pcword", + FuncNBitsPcWord_LeftQuotient, + "src/objpcgel.c:NBitsPcWord_LeftQuotient" ); - InitHandlerFunc( FuncNBitsPcWord_Quotient, - "NBitsPcWord_Quotient" ); - AssGVar( GVarName( "NBitsPcWord_Quotient" ), - NewFunctionC( "NBitsPcWord_Quotient", 2L, - "n_bits_pcword, n_bits_pcword", - FuncNBitsPcWord_Quotient ) ); + C_NEW_GVAR_FUNC( "NBitsPcWord_PowerSmallInt", 2, "n_bits_pcword, small_integer", + FuncNBitsPcWord_PowerSmallInt, + "src/objpcgel.c:NBitsPcWord_PowerSmallInt" ); + + C_NEW_GVAR_FUNC( "NBitsPcWord_Product", 2, "n_bits_pcword, n_bits_pcword", + FuncNBitsPcWord_Product, + "src/objpcgel.c:NBitsPcWord_Product" ); + + C_NEW_GVAR_FUNC( "NBitsPcWord_Quotient", 2, "n_bits_pcword, n_bits_pcword", + FuncNBitsPcWord_Quotient, + "src/objpcgel.c:NBitsPcWord_Quotient" ); /* 8 bits word */ - InitHandlerFunc( Func8Bits_DepthOfPcElement, - "8Bits_DepthOfPcElement" ); - AssGVar( GVarName( "8Bits_DepthOfPcElement" ), - NewFunctionC( "8Bits_DepthOfPcElement", 2L, - "8_bits_pcgs, 8_bits_pcword", - Func8Bits_DepthOfPcElement ) ); - - InitHandlerFunc( Func8Bits_ExponentOfPcElement, - "8Bits_ExponentOfPcElement" ); - AssGVar( GVarName( "8Bits_ExponentOfPcElement" ), - NewFunctionC( "8Bits_ExponentOfPcElement", 3L, - "8_bits_pcgs, 8_bits_pcword, int", - Func8Bits_ExponentOfPcElement ) ); - - InitHandlerFunc( Func8Bits_LeadingExponentOfPcElement, - "8Bits_LeadingExponentOfPcElement" ); - AssGVar( GVarName( "8Bits_LeadingExponentOfPcElement" ), - NewFunctionC( "8Bits_LeadingExponentOfPcElement", 2L, - "8_bits_pcgs, 8_bits_word", - Func8Bits_LeadingExponentOfPcElement ) ); + C_NEW_GVAR_FUNC( "8Bits_DepthOfPcElement", 2, "8_bits_pcgs, 8_bits_pcword", + Func8Bits_DepthOfPcElement, + "src/objpcgel.c:8Bits_DepthOfPcElement" ); + + C_NEW_GVAR_FUNC( "8Bits_ExponentOfPcElement", 3, "8_bits_pcgs, 8_bits_pcword, int", + Func8Bits_ExponentOfPcElement, + "src/objpcgel.c:8Bits_ExponentOfPcElement" ); + + C_NEW_GVAR_FUNC( "8Bits_LeadingExponentOfPcElement", 2, "8_bits_pcgs, 8_bits_word", + Func8Bits_LeadingExponentOfPcElement, + "src/objpcgel.c:8Bits_LeadingExponentOfPcElement" ); /* 16 bits word */ - InitHandlerFunc( Func16Bits_DepthOfPcElement, - "16Bits_DepthOfPcElement" ); - AssGVar( GVarName( "16Bits_DepthOfPcElement" ), - NewFunctionC( "16Bits_DepthOfPcElement", 2L, - "16_bits_pcgs, 16_bits_pcword", - Func16Bits_DepthOfPcElement ) ); - - InitHandlerFunc( Func16Bits_ExponentOfPcElement, - "16Bits_ExponentOfPcElement" ); - AssGVar( GVarName( "16Bits_ExponentOfPcElement" ), - NewFunctionC( "16Bits_ExponentOfPcElement", 3L, - "16_bits_pcgs, 16_bits_pcword, int", - Func16Bits_ExponentOfPcElement ) ); - - InitHandlerFunc( Func16Bits_LeadingExponentOfPcElement, - "16Bits_LeadingExponentOfPcElement" ); - AssGVar( GVarName( "16Bits_LeadingExponentOfPcElement" ), - NewFunctionC( "16Bits_LeadingExponentOfPcElement", 2L, - "16_bits_pcgs, 16_bits_word", - Func16Bits_LeadingExponentOfPcElement ) ); + C_NEW_GVAR_FUNC( "16Bits_DepthOfPcElement", 2, "16_bits_pcgs, 16_bits_pcword", + Func16Bits_DepthOfPcElement, + "src/objpcgel.c:16Bits_DepthOfPcElement" ); + + C_NEW_GVAR_FUNC( "16Bits_ExponentOfPcElement", 3, "16_bits_pcgs, 16_bits_pcword, int", + Func16Bits_ExponentOfPcElement, + "src/objpcgel.c:16Bits_ExponentOfPcElement" ); + + C_NEW_GVAR_FUNC( "16Bits_LeadingExponentOfPcElement", 2, "16_bits_pcgs, 16_bits_word", + Func16Bits_LeadingExponentOfPcElement, + "src/objpcgel.c:16Bits_LeadingExponentOfPcElement" ); /* 32 bits word */ - InitHandlerFunc( Func32Bits_DepthOfPcElement, - "32Bits_DepthOfPcElement" ); - AssGVar( GVarName( "32Bits_DepthOfPcElement" ), - NewFunctionC( "32Bits_DepthOfPcElement", 2L, - "32_bits_pcgs, 32_bits_pcword", - Func32Bits_DepthOfPcElement ) ); - - InitHandlerFunc( Func32Bits_ExponentOfPcElement, - "32Bits_ExponentOfPcElement" ); - AssGVar( GVarName( "32Bits_ExponentOfPcElement" ), - NewFunctionC( "32Bits_ExponentOfPcElement", 3L, - "32_bits_pcgs, 32_bits_pcword, int", - Func32Bits_ExponentOfPcElement ) ); - - InitHandlerFunc( Func32Bits_LeadingExponentOfPcElement, - "32Bits_LeadingExponentOfPcElement" ); - AssGVar( GVarName( "32Bits_LeadingExponentOfPcElement" ), - NewFunctionC( "32Bits_LeadingExponentOfPcElement", 2L, - "32_bits_pcgs, 32_bits_word", - Func32Bits_LeadingExponentOfPcElement ) ); + C_NEW_GVAR_FUNC( "32Bits_DepthOfPcElement", 2, "32_bits_pcgs, 32_bits_pcword", + Func32Bits_DepthOfPcElement, + "src/objpcgel.c:32Bits_DepthOfPcElement" ); + + C_NEW_GVAR_FUNC( "32Bits_ExponentOfPcElement", 3, "32_bits_pcgs, 32_bits_pcword, int", + Func32Bits_ExponentOfPcElement, + "src/objpcgel.c:32Bits_ExponentOfPcElement" ); + + C_NEW_GVAR_FUNC( "32Bits_LeadingExponentOfPcElement", 2, "32_bits_pcgs, 32_bits_word", + Func32Bits_LeadingExponentOfPcElement, + "src/objpcgel.c:32Bits_LeadingExponentOfPcElement" ); +} + + +/**************************************************************************** +** +*F CheckPcElements() . check initialisation of the pc group elements package +*/ +void CheckPcElements ( void ) +{ + SET_REVISION( "objpcgel_c", Revision_objpcgel_c ); + SET_REVISION( "objpcgel_h", Revision_objpcgel_h ); } diff --git a/src/objpcgel.h b/src/objpcgel.h index f72dde3c14..dc92694b85 100644 --- a/src/objpcgel.h +++ b/src/objpcgel.h @@ -7,7 +7,7 @@ *Y Copyright (C) 1996, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_objpcgel_h = +SYS_CONST char * Revision_objpcgel_h = "@(#)$Id$"; #endif @@ -52,11 +52,33 @@ char * Revision_objpcgel_h = /**************************************************************************** ** -*F InitPcElements() . . . . . . . . initialize the single collector package +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + + +*F SetupPcElements() . . . . . . . initialize the pc group elements package +*/ +extern void SetupPcElements ( void ); + + +/**************************************************************************** +** +*F InitPcElements() . . . . . . . initialize the pc group elements package */ extern void InitPcElements ( void ); +/**************************************************************************** +** +*F CheckPcElements() . check initialisation of the pc group elements package +*/ +extern void CheckPcElements ( void ); + + /**************************************************************************** ** diff --git a/src/objscoll.c b/src/objscoll.c index 7a0de4789f..e2c46013dd 100644 --- a/src/objscoll.c +++ b/src/objscoll.c @@ -20,36 +20,36 @@ ** such a vector, you *must* clear it afterwards, because all functions ** assume that the vectors are cleared. */ -char * Revision_objscoll_c = - "@(#)$Id$"; - #include "system.h" /* Ints, UInts */ -#include "gasman.h" /* NewBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, types */ -#include "scanner.h" /* Pr */ +SYS_CONST char * Revision_objscoll_c = + "@(#)$Id$"; -#include "gvars.h" /* AssGVar, GVarName */ -#include "gap.h" /* Error */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ -#include "calls.h" /* NAMI_FUNC, ENVI_FUNC */ +#include "gvars.h" /* global variables */ +#include "gap.h" /* error handling, initialisation */ -#include "records.h" /* ASS_REC, UNB_REC, ELM_REC */ -#include "lists.h" /* generic lists package */ +#include "calls.h" /* generic call mechanism */ -#include "bool.h" /* True, False */ +#include "records.h" /* generic records */ +#include "lists.h" /* generic lists */ -#include "precord.h" /* AssPRec, UnbPRec, ElmPRec, ... */ +#include "bool.h" /* booleans */ -#include "plist.h" /* ELM_PLIST, SET_ELM_PLIST, ... */ -#include "string.h" /* CSTR_STRING used by NAME_RNAM */ +#include "precord.h" /* plain records */ -#include "code.h" /* Stat, Expr, TNUM_EXPR, ADDR_E...*/ +#include "plist.h" /* plain lists */ +#include "string.h" /* strings */ -#include "objfgelm.h" /* NEW_WORD, WORKTYPE, ... */ +#include "code.h" /* coder */ + +#include "objfgelm.h" /* objects of free groups */ #define INCLUDE_DECLARATION_PART -#include "objscoll.h" /* declaration part of the package */ +#include "objscoll.h" /* single collector */ #undef INCLUDE_DECLARATION_PART @@ -153,7 +153,7 @@ Int C8Bits_VectorWord ( Obj vv, Obj v, Int num ) } else { ErrorQuit( "collect vector must be a string not a %s", - (Int)InfoBags[ TNUM_OBJ(vv) ].name, 0L ); + (Int)TNAM_OBJ(vv), 0L ); return -1; } } @@ -470,7 +470,7 @@ Int C8Bits_Solution( } else { ErrorQuit( "collect vector must be a string not a %s", - (Int)InfoBags[ TNUM_OBJ(ww) ].name, 0L ); + (Int)TNAM_OBJ(ww), 0L ); return -1; } } @@ -490,7 +490,7 @@ Int C8Bits_Solution( RetypeBag( ww, T_STRING ); } else { ErrorQuit( "collect vector must be a string not a %s", - (Int)InfoBags[ TNUM_OBJ(uu) ].name, 0L ); + (Int)TNAM_OBJ(uu), 0L ); return -1; } } @@ -608,7 +608,7 @@ Int C16Bits_VectorWord ( Obj vv, Obj v, Int num ) } else { ErrorQuit( "collect vector must be a string not a %s", - (Int)InfoBags[ TNUM_OBJ(vv) ].name, 0L ); + (Int)TNAM_OBJ(vv), 0L ); return -1; } } @@ -925,7 +925,7 @@ Int C16Bits_Solution( } else { ErrorQuit( "collect vector must be a string not a %s", - (Int)InfoBags[ TNUM_OBJ(ww) ].name, 0L ); + (Int)TNAM_OBJ(ww), 0L ); return -1; } } @@ -946,7 +946,7 @@ Int C16Bits_Solution( } else { ErrorQuit( "collect vector must be a string not a %s", - (Int)InfoBags[ TNUM_OBJ(uu) ].name, 0L ); + (Int)TNAM_OBJ(uu), 0L ); return -1; } } @@ -1064,7 +1064,7 @@ Int C32Bits_VectorWord ( Obj vv, Obj v, Int num ) } else { ErrorQuit( "collect vector must be a string not a %s", - (Int)InfoBags[ TNUM_OBJ(vv) ].name, 0L ); + (Int)TNAM_OBJ(vv), 0L ); return -1; } } @@ -1385,7 +1385,7 @@ Int C32Bits_Solution( } else { ErrorQuit( "collect vector must be a string not a %s", - (Int)InfoBags[ TNUM_OBJ(ww) ].name, 0L ); + (Int)TNAM_OBJ(ww), 0L ); return -1; } } @@ -1406,7 +1406,7 @@ Int C32Bits_Solution( } else { ErrorQuit( "collect vector must be a string not a %s", - (Int)InfoBags[ TNUM_OBJ(uu) ].name, 0L ); + (Int)TNAM_OBJ(uu), 0L ); return -1; } } @@ -1964,110 +1964,117 @@ Obj FuncFinPowConjCol_ReducedQuotient ( Obj self, Obj sc, Obj w, Obj u ) /**************************************************************************** ** -*F InitSingleCollector() +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * */ -void InitSingleCollector ( void ) + + +/**************************************************************************** +** + +*F SetupSingleCollector() . . . . . . . . . initalize the single collector +*/ +void SetupSingleCollector ( void ) { +} - /* export position numbers 'SCP_SOMETHING' */ - AssGVar( GVarName( "SCP_UNDERLYING_FAMILY" ), - INTOBJ_INT(SCP_UNDERLYING_FAMILY) ); - AssGVar( GVarName( "SCP_RWS_GENERATORS" ), - INTOBJ_INT(SCP_RWS_GENERATORS) ); - AssGVar( GVarName( "SCP_NUMBER_RWS_GENERATORS" ), - INTOBJ_INT(SCP_NUMBER_RWS_GENERATORS) ); - AssGVar( GVarName( "SCP_DEFAULT_TYPE" ), - INTOBJ_INT(SCP_DEFAULT_TYPE) ); - AssGVar( GVarName( "SCP_IS_DEFAULT_TYPE" ), - INTOBJ_INT(SCP_IS_DEFAULT_TYPE) ); - AssGVar( GVarName( "SCP_RELATIVE_ORDERS" ), - INTOBJ_INT(SCP_RELATIVE_ORDERS) ); - AssGVar( GVarName( "SCP_POWERS" ), - INTOBJ_INT(SCP_POWERS) ); - AssGVar( GVarName( "SCP_CONJUGATES" ), - INTOBJ_INT(SCP_CONJUGATES) ); - AssGVar( GVarName( "SCP_INVERSES" ), - INTOBJ_INT(SCP_INVERSES) ); - AssGVar( GVarName( "SCP_NW_STACK" ), - INTOBJ_INT(SCP_NW_STACK) ); - AssGVar( GVarName( "SCP_LW_STACK" ), - INTOBJ_INT(SCP_LW_STACK) ); - AssGVar( GVarName( "SCP_PW_STACK" ), - INTOBJ_INT(SCP_PW_STACK) ); - AssGVar( GVarName( "SCP_EW_STACK" ), - INTOBJ_INT(SCP_EW_STACK) ); - AssGVar( GVarName( "SCP_GE_STACK" ), - INTOBJ_INT(SCP_GE_STACK) ); - AssGVar( GVarName( "SCP_CW_VECTOR" ), - INTOBJ_INT(SCP_CW_VECTOR) ); - AssGVar( GVarName( "SCP_CW2_VECTOR" ), - INTOBJ_INT(SCP_CW2_VECTOR) ); - AssGVar( GVarName( "SCP_MAX_STACK_SIZE" ), - INTOBJ_INT(SCP_MAX_STACK_SIZE) ); - AssGVar( GVarName( "SCP_COLLECTOR" ), - INTOBJ_INT(SCP_COLLECTOR) ); - AssGVar( GVarName( "SCP_AVECTOR" ), - INTOBJ_INT(SCP_AVECTOR) ); +/**************************************************************************** +** +*F InitSingleCollector() . . . . . . . . . . initalize the single collector +*/ +void InitSingleCollector ( void ) +{ + /* export position numbers 'SCP_SOMETHING' */ + if ( ! SyRestoring ) { + AssGVar( GVarName( "SCP_UNDERLYING_FAMILY" ), + INTOBJ_INT(SCP_UNDERLYING_FAMILY) ); + AssGVar( GVarName( "SCP_RWS_GENERATORS" ), + INTOBJ_INT(SCP_RWS_GENERATORS) ); + AssGVar( GVarName( "SCP_NUMBER_RWS_GENERATORS" ), + INTOBJ_INT(SCP_NUMBER_RWS_GENERATORS) ); + AssGVar( GVarName( "SCP_DEFAULT_TYPE" ), + INTOBJ_INT(SCP_DEFAULT_TYPE) ); + AssGVar( GVarName( "SCP_IS_DEFAULT_TYPE" ), + INTOBJ_INT(SCP_IS_DEFAULT_TYPE) ); + AssGVar( GVarName( "SCP_RELATIVE_ORDERS" ), + INTOBJ_INT(SCP_RELATIVE_ORDERS) ); + AssGVar( GVarName( "SCP_POWERS" ), + INTOBJ_INT(SCP_POWERS) ); + AssGVar( GVarName( "SCP_CONJUGATES" ), + INTOBJ_INT(SCP_CONJUGATES) ); + AssGVar( GVarName( "SCP_INVERSES" ), + INTOBJ_INT(SCP_INVERSES) ); + AssGVar( GVarName( "SCP_NW_STACK" ), + INTOBJ_INT(SCP_NW_STACK) ); + AssGVar( GVarName( "SCP_LW_STACK" ), + INTOBJ_INT(SCP_LW_STACK) ); + AssGVar( GVarName( "SCP_PW_STACK" ), + INTOBJ_INT(SCP_PW_STACK) ); + AssGVar( GVarName( "SCP_EW_STACK" ), + INTOBJ_INT(SCP_EW_STACK) ); + AssGVar( GVarName( "SCP_GE_STACK" ), + INTOBJ_INT(SCP_GE_STACK) ); + AssGVar( GVarName( "SCP_CW_VECTOR" ), + INTOBJ_INT(SCP_CW_VECTOR) ); + AssGVar( GVarName( "SCP_CW2_VECTOR" ), + INTOBJ_INT(SCP_CW2_VECTOR) ); + AssGVar( GVarName( "SCP_MAX_STACK_SIZE" ), + INTOBJ_INT(SCP_MAX_STACK_SIZE) ); + AssGVar( GVarName( "SCP_COLLECTOR" ), + INTOBJ_INT(SCP_COLLECTOR) ); + AssGVar( GVarName( "SCP_AVECTOR" ), + INTOBJ_INT(SCP_AVECTOR) ); + } /* export collector number */ - AssGVar( GVarName( "8Bits_SingleCollector" ), - INTOBJ_INT(C8Bits_SingleCollectorNo) ); - AssGVar( GVarName( "16Bits_SingleCollector" ), - INTOBJ_INT(C16Bits_SingleCollectorNo) ); - AssGVar( GVarName( "32Bits_SingleCollector" ), - INTOBJ_INT(C32Bits_SingleCollectorNo) ); - + if ( ! SyRestoring ) { + AssGVar( GVarName( "8Bits_SingleCollector" ), + INTOBJ_INT(C8Bits_SingleCollectorNo) ); + AssGVar( GVarName( "16Bits_SingleCollector" ), + INTOBJ_INT(C16Bits_SingleCollectorNo) ); + AssGVar( GVarName( "32Bits_SingleCollector" ), + INTOBJ_INT(C32Bits_SingleCollectorNo) ); + } /* collector methods */ - InitHandlerFunc( FuncFinPowConjCol_CollectWordOrFail, - "FinPowConjCol_CollectWordOrFail" ); - AssGVar( GVarName( "FinPowConjCol_CollectWordOrFail" ), - NewFunctionC( "FinPowConjCol_CollectWordOrFail", 3L, - "collector, list, word", - FuncFinPowConjCol_CollectWordOrFail ) ); - - InitHandlerFunc( FuncFinPowConjCol_ReducedComm, - "FinPowConjCol_ReducedComm" ); - AssGVar( GVarName( "FinPowConjCol_ReducedComm" ), - NewFunctionC( "FinPowConjCol_ReducedComm", 3L, - "collector, word, word", - FuncFinPowConjCol_ReducedComm ) ); - - InitHandlerFunc( FuncFinPowConjCol_ReducedForm, - "FinPowConjCol_ReducedForm" ); - AssGVar( GVarName( "FinPowConjCol_ReducedForm" ), - NewFunctionC( "FinPowConjCol_ReducedForm", 2L, - "collector, word", - FuncFinPowConjCol_ReducedForm ) ); - - InitHandlerFunc( FuncFinPowConjCol_ReducedLeftQuotient, - "FinPowConjCol_ReducedLeftQuotient" ); - AssGVar( GVarName( "FinPowConjCol_ReducedLeftQuotient" ), - NewFunctionC( "FinPowConjCol_ReducedLeftQuotient", 3L, - "collector, word, word", - FuncFinPowConjCol_ReducedLeftQuotient ) ); - - InitHandlerFunc( FuncFinPowConjCol_ReducedPowerSmallInt, - "FinPowConjCol_ReducedPowerSmallInt" ); - AssGVar( GVarName( "FinPowConjCol_ReducedPowerSmallInt" ), - NewFunctionC( "FinPowConjCol_ReducedPowerSmallInt", 3L, - "collector, word, small_int", - FuncFinPowConjCol_ReducedPowerSmallInt ) ); - - InitHandlerFunc( FuncFinPowConjCol_ReducedProduct, - "FinPowConjCol_ReducedProduct" ); - AssGVar( GVarName( "FinPowConjCol_ReducedProduct" ), - NewFunctionC( "FinPowConjCol_ReducedProduct", 3L, - "collector, word, word", - FuncFinPowConjCol_ReducedProduct ) ); - - InitHandlerFunc( FuncFinPowConjCol_ReducedQuotient, - "FinPowConjCol_ReducedQuotient" ); - AssGVar( GVarName( "FinPowConjCol_ReducedQuotient" ), - NewFunctionC( "FinPowConjCol_ReducedQuotient", 3L, - "collector, word, word", - FuncFinPowConjCol_ReducedQuotient ) ); + C_NEW_GVAR_FUNC( "FinPowConjCol_CollectWordOrFail", 3, "sc, list, word", + FuncFinPowConjCol_CollectWordOrFail, + "src/objscoll.c:FinPowConjCol_CollectWordOrFail" ); + + C_NEW_GVAR_FUNC( "FinPowConjCol_ReducedComm", 3, "sc, word, word", + FuncFinPowConjCol_ReducedComm, + "src/objscoll.c:FinPowConjCol_ReducedComm" ); + + C_NEW_GVAR_FUNC( "FinPowConjCol_ReducedForm", 2, "sc, word", + FuncFinPowConjCol_ReducedForm, + "src/objscoll.c:FinPowConjCol_ReducedForm" ); + + C_NEW_GVAR_FUNC( "FinPowConjCol_ReducedLeftQuotient", 3, "sc, word, word", + FuncFinPowConjCol_ReducedLeftQuotient, + "src/objscoll.c:FinPowConjCol_ReducedLeftQuotient" ); + + C_NEW_GVAR_FUNC( "FinPowConjCol_ReducedPowerSmallInt", 3, "sc, word, int", + FuncFinPowConjCol_ReducedPowerSmallInt, + "src/objscoll.c:FinPowConjCol_ReducedPowerSmallInt" ); + + C_NEW_GVAR_FUNC( "FinPowConjCol_ReducedProduct", 3, "sc, word, word", + FuncFinPowConjCol_ReducedProduct, + "src/objscoll.c:FinPowConjCol_ReducedProduct" ); + + C_NEW_GVAR_FUNC( "FinPowConjCol_ReducedQuotient", 3, "sc, word, word", + FuncFinPowConjCol_ReducedQuotient, + "src/objscoll.c:FinPowConjCol_ReducedQuotient" ); +} + + +/**************************************************************************** +** +*F CheckSingleCollector() check the initialisation of the single collector +*/ +void CheckSingleCollector ( void ) +{ + SET_REVISION( "objscoll_c", Revision_objscoll_c ); + SET_REVISION( "objscoll_h", Revision_objscoll_h ); } diff --git a/src/objscoll.h b/src/objscoll.h index fb7f2cab62..0aba759a4f 100644 --- a/src/objscoll.h +++ b/src/objscoll.h @@ -7,7 +7,7 @@ *Y Copyright (C) 1996, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_objscoll_h = +SYS_CONST char * Revision_objscoll_h = "@(#)$Id$"; #endif @@ -154,13 +154,35 @@ extern Obj FuncFinPowConjCol_ReducedQuotient ( Obj, Obj, Obj, Obj ); /**************************************************************************** ** -*F InitSingleCollector() +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + +*F SetupSingleCollector() . . . . . . . . . initalize the single collector +*/ +extern void SetupSingleCollector ( void ); + + +/**************************************************************************** +** +*F InitSingleCollector() . . . . . . . . . . initalize the single collector */ extern void InitSingleCollector ( void ); /**************************************************************************** ** +*F CheckSingleCollector() check the initialisation of the single collector +*/ +extern void CheckSingleCollector ( void ); + + +/**************************************************************************** +** + *E objscoll.h . . . . . . . . . . . . . . . . . . . . . . . . . . ends here */ diff --git a/src/opers.c b/src/opers.c index 30cde82d84..c88bc71e49 100644 --- a/src/opers.c +++ b/src/opers.c @@ -10,39 +10,41 @@ ** This file contains the functions of the filters, operations, attributes, ** and properties package. */ -char * Revision_opers_c = - "@(#)$Id$"; +#include +#include "system.h" /* Ints, UInts */ +SYS_CONST char * Revision_opers_c = + "@(#)$Id$"; -#include -#include "system.h" /* Ints, UInts */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ -#include "gasman.h" /* NewBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, types */ -#include "scanner.h" /* Pr */ +#include "gvars.h" /* global variables */ -#include "gvars.h" /* AssGVar, GVarName */ +#include "gap.h" /* error handling, initialisation */ #include "calls.h" /* generic call mechanism */ #define INCLUDE_DECLARATION_PART -#include "opers.h" /* declaration part of the package */ +#include "opers.h" /* generic operations */ #undef INCLUDE_DECLARATION_PART -#include "ariths.h" /* arithmetic operations */ -#include "lists.h" /* generic list package */ +#include "ariths.h" /* basic arithmetic */ +#include "lists.h" /* generic lists */ -#include "bool.h" /* True, False */ +#include "bool.h" /* booleans */ -#include "plist.h" /* NEW_PLIST, SET_LEN_PLIST, SET...*/ -#include "blister.h" /* SIZE_PLEN_BLIST, SET_LEN_BLIST */ -#include "string.h" /* NEW_STRING, CSTR_STRING */ +#include "plist.h" /* plain lists */ +#include "blister.h" /* boolean lists */ +#include "string.h" /* strings */ -#include "records.h" /* ASS_REC, ELM_REC */ -#include "precord.h" /* AssPRec, ElmPRec */ +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ -#include "gap.h" /* Error */ +#include "gap.h" /* error handling, initialisation */ +#include "saveload.h" /* saving and loading */ /**************************************************************************** @@ -264,7 +266,7 @@ Obj FuncLEN_FLAGS ( while ( TNUM_OBJ(flags) != T_FLAGS ) { flags = ErrorReturnObj( " must be a flags list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(flags)].name), 0L, + (Int)TNAM_OBJ(flags), 0L, "you can return a list for " ); } @@ -285,7 +287,7 @@ Obj FuncELM_FLAGS ( while ( TNUM_OBJ(flags) != T_FLAGS ) { flags = ErrorReturnObj( " must be a flags list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(flags)].name), 0L, + (Int)TNAM_OBJ(flags), 0L, "you can return a list for " ); } @@ -304,17 +306,17 @@ Obj FuncHASH_FLAGS ( Obj self, Obj flags ) { - Int hash; - Int x; - Int len; - UInt * ptr; - Int i; + Int4 hash; + Int4 x; + Int len; + UInt4 * ptr; + Int i; /* do some trivial checks */ while ( TNUM_OBJ(flags) != T_FLAGS ) { flags = ErrorReturnObj( " must be a flags list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(flags)].name), 0L, + (Int)TNAM_OBJ(flags), 0L, "you can return a list for " ); } if ( HASH_FLAGS(flags) != 0 ) { @@ -322,16 +324,16 @@ Obj FuncHASH_FLAGS ( } /* do the real work */ - len = NRB_FLAGS(flags); - ptr = DATA_FLAGS(flags); + len = NRB_FLAGS(flags)*(sizeof(UInt)/sizeof(UInt4)); + ptr = (UInt4 *)DATA_FLAGS(flags); hash = 0; x = 1; for ( i = 1; i <= len; i++ ) { hash = (hash + (*ptr % HASH_FLAGS_SIZE) * x) % HASH_FLAGS_SIZE; - x = ((8*sizeof(UInt)-1) * x) % HASH_FLAGS_SIZE; + x = ((8*sizeof(UInt4)-1) * x) % HASH_FLAGS_SIZE; ptr++; } - SET_HASH_FLAGS( flags, INTOBJ_INT(hash+1) ); + SET_HASH_FLAGS( flags, INTOBJ_INT((UInt)hash+1) ); CHANGED_BAG(flags); return HASH_FLAGS(flags); } @@ -356,13 +358,13 @@ Obj FuncIS_EQUAL_FLAGS ( while ( TNUM_OBJ(flags1) != T_FLAGS ) { flags1 = ErrorReturnObj( " must be a flags list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(flags1)].name), 0L, + (Int)TNAM_OBJ(flags1), 0L, "you can return a list for " ); } while ( TNUM_OBJ(flags2) != T_FLAGS ) { flags2 = ErrorReturnObj( " must be a flags list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(flags2)].name), 0L, + (Int)TNAM_OBJ(flags2), 0L, "you can return a list for " ); } if ( flags1 == flags2 ) { @@ -469,13 +471,13 @@ Obj FuncAND_FLAGS ( while ( TNUM_OBJ(flags1) != T_FLAGS ) { flags1 = ErrorReturnObj( " must be a flags list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(flags1)].name), 0L, + (Int)TNAM_OBJ(flags1), 0L, "you can return a list for " ); } while ( TNUM_OBJ(flags2) != T_FLAGS ) { flags2 = ErrorReturnObj( " must be a flags list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(flags2)].name), 0L, + (Int)TNAM_OBJ(flags2), 0L, "you can return a list for " ); } @@ -543,13 +545,13 @@ Obj FuncSUB_FLAGS ( while ( TNUM_OBJ(flags1) != T_FLAGS ) { flags1 = ErrorReturnObj( " must be a flags list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(flags1)].name), 0L, + (Int)TNAM_OBJ(flags1), 0L, "you can return a list for " ); } while ( TNUM_OBJ(flags2) != T_FLAGS ) { flags2 = ErrorReturnObj( " must be a flags list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(flags2)].name), 0L, + (Int)TNAM_OBJ(flags2), 0L, "you can return a list for " ); } @@ -628,7 +630,7 @@ Obj FuncTRUES_FLAGS ( while ( TNUM_OBJ(flags) != T_FLAGS ) { flags = ErrorReturnObj( " must be a flags list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(flags)].name), 0L, + (Int)TNAM_OBJ(flags), 0L, "you can return a list for " ); } if ( TRUES_FLAGS(flags) != 0 ) { @@ -641,7 +643,7 @@ Obj FuncTRUES_FLAGS ( n = 0; for ( i = 1; i <= nrb; i++ ) { m = *ptr++; - COUNT_TRUES_BLOCK(m); + COUNT_TRUES_BLOCK(m); n += m; } @@ -691,13 +693,13 @@ Obj FuncIS_SUBSET_FLAGS ( while ( TNUM_OBJ(flags1) != T_FLAGS ) { flags1 = ErrorReturnObj( " must be a flags list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(flags1)].name), 0L, + (Int)TNAM_OBJ(flags1), 0L, "you can return a list for " ); } while ( TNUM_OBJ(flags2) != T_FLAGS ) { flags2 = ErrorReturnObj( " must be a flags list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(flags2)].name), 0L, + (Int)TNAM_OBJ(flags2), 0L, "you can return a list for " ); } if ( flags1 == flags2 ) { @@ -787,7 +789,7 @@ Obj FuncSIZE_FLAGS ( while ( TNUM_OBJ(flags) != T_FLAGS ) { flags = ErrorReturnObj( " must be a flags list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(flags)].name), 0L, + (Int)TNAM_OBJ(flags), 0L, "you can return a list for " ); } @@ -799,7 +801,7 @@ Obj FuncSIZE_FLAGS ( n = 0; for ( i = 1; i <= nrb; i++ ) { m = *ptr++; - COUNT_TRUES_BLOCK(m); + COUNT_TRUES_BLOCK(m); n += m; } @@ -1030,8 +1032,6 @@ Obj NewFilterC ( } -Obj NewFilterFunc; - Obj NewFilterHandler ( Obj self, Obj name ) @@ -2848,8 +2848,6 @@ Obj NewOperationC ( ** *f NewOperationHandler( ) */ -Obj NewOperationFunc; - Obj NewOperationHandler ( Obj self, Obj name ) @@ -4182,8 +4180,6 @@ Obj NewConstructorC ( ** *f NewConstructorHandler( ) */ -Obj NewConstructorFunc; - Obj NewConstructorHandler ( Obj self, Obj name ) @@ -4541,8 +4537,6 @@ Obj NewAttributeC ( ** *f NewAttributeHandler( ) */ -Obj NewAttributeFunc; - Obj NewAttributeHandler ( Obj self, Obj name ) @@ -4562,8 +4556,6 @@ Obj NewAttributeHandler ( ** *f NewMutableAttributeHandler( ) */ -Obj NewMutableAttributeFunc; - Obj NewMutableAttributeHandler ( Obj self, Obj name ) @@ -4926,8 +4918,6 @@ Obj NewPropertyC ( ** *f NewPropertyHandler( , ) */ -Obj NewPropertyFunc; - Obj NewPropertyHandler ( Obj self, Obj name ) @@ -4948,8 +4938,6 @@ Obj NewPropertyHandler ( *F FuncSetterFunction( , ) */ -Obj SetterFunctionFunc; - Obj DoSetterFunction ( Obj self, Obj obj, @@ -5012,8 +5000,6 @@ Obj FuncSetterFunction ( ** *F FuncGetterFunction( , ) */ -Obj GetterFunctionFunc; - Obj DoGetterFunction ( Obj self, Obj obj ) @@ -5235,273 +5221,356 @@ Obj FuncCLEAR_CACHE_INFO ( return 0; } +/**************************************************************************** +** +*F SaveFlags( ) +** +*/ + +void SaveFlags( Obj flags) +{ + UInt i, len, *ptr; + SaveSubObj(TRUES_FLAGS(flags)); + SaveSubObj(HASH_FLAGS(flags)); + SaveSubObj(ADDR_OBJ(flags)[2]); /* length, as an object */ + len = NRB_FLAGS(flags); + ptr = DATA_FLAGS(flags); + for (i = 1; i <= len; i++) + SaveUInt(*ptr++); + return; +} + +/**************************************************************************** +** +*F SaveOperationExtras( ) . . . .additional savng for functions which +** are operations +** +** This is called by SaveFunction when the function bag is too large to be +** a simple function, and so must be an operation +** +*/ + +void SaveOperationExtras( Obj oper ) +{ + UInt i; + SaveSubObj(FLAG1_FILT(oper)); + SaveSubObj(FLAG2_FILT(oper)); + SaveSubObj(FLAGS_FILT(oper)); + SaveSubObj(SETTR_FILT(oper)); + SaveSubObj(TESTR_FILT(oper)); + for (i = 0; i <= 7; i++) + SaveSubObj(METHS_OPER(oper,i)); + for (i = 0; i <= 7; i++) + SaveSubObj(CACHE_OPER(oper,i)); + return; +} + +/**************************************************************************** +** +*F LoadFlags( ) +** +*/ + +void LoadFlags( Obj flags) +{ + UInt i, len, *ptr; + TRUES_FLAGS(flags) = LoadSubObj(); + HASH_FLAGS(flags) = LoadSubObj(); + ADDR_OBJ(flags)[2] = LoadSubObj(); /* length, as an object */ + len = NRB_FLAGS(flags); + ptr = DATA_FLAGS(flags); + for (i = 1; i <= len; i++) + *ptr++ = LoadUInt(); + return; +} + +/**************************************************************************** +** +*F LoadOperationExtras( ) . . . .additional loading for functions which +** are operations +** +** This is called by LoadFunction when the function bag is too large to be +** a simple function, and so must be an operation +** +*/ + +void LoadOperationExtras( Obj oper ) +{ + UInt i; + FLAG1_FILT(oper) = LoadSubObj(); + FLAG2_FILT(oper) = LoadSubObj(); + FLAGS_FILT(oper) = LoadSubObj(); + SETTR_FILT(oper) = LoadSubObj(); + TESTR_FILT(oper) = LoadSubObj(); + for (i = 0; i <= 7; i++) + METHS_OPER(oper,i) = LoadSubObj(); + for (i = 0; i <= 7; i++) + CACHE_OPER(oper,i) = LoadSubObj(); + return; +} + + +/**************************************************************************** +** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ /**************************************************************************** ** +*F SetupOpers() . . . . . . . . . . . . . . initialize the operations package +*/ +void SetupOpers ( void ) +{ + /* install the marking function */ + InfoBags[T_FLAGS].name = "flags list"; + InitMarkFuncBags( T_FLAGS, MarkTwoSubBags ); + + + /* install the printing function */ + PrintObjFuncs[ T_FLAGS ] = PrintFlags; + + + /* and the saving function */ + SaveObjFuncs[ T_FLAGS ] = SaveFlags; +} + + + +/**************************************************************************** +** *F InitOpers() . . . . . . . . . . . . . . initialize the operations package */ void InitOpers ( void ) { Int i; - /* declare the handlers used in various places */ - InitHandlerFunc( DoFilter, "DoFilter"); - InitHandlerFunc( DoSetFilter, "DoSetFilter"); - InitHandlerFunc( DoAndFilter, "DoAndFilter"); - InitHandlerFunc( DoSetAndFilter, "DoSetAndFilter"); - InitHandlerFunc( DoReturnTrueFilter, "DoReturnTrueFilter"); - InitHandlerFunc( DoSetReturnTrueFilter, "DoSetReturnTrueFilter"); - - InitHandlerFunc( DoAttribute, "DoAttribute"); - InitHandlerFunc( DoSetAttribute, "DoSetAttribute"); - InitHandlerFunc( DoTestAttribute, "DoTestAttribute"); - InitHandlerFunc( DoVerboseAttribute, "DoVerboseAttribute"); - InitHandlerFunc( DoMutableAttribute, "DoMutableAttribute"); - InitHandlerFunc( DoVerboseMutableAttribute, "DoVerboseMutableAttribute"); - - InitHandlerFunc( DoProperty, "DoProperty"); - InitHandlerFunc( DoSetProperty, "DoSetProperty"); - InitHandlerFunc( DoTestProperty, "DoTestProperty"); - InitHandlerFunc( DoVerboseProperty, "DoVerboseProperty"); - - InitHandlerFunc( DoSetterFunction, "DoSetterFunction"); - InitHandlerFunc( DoGetterFunction, "DoGetterFunction"); + /* Declare the handlers used in various places. Some of the commonest */ + /* ones are abbreviated to save space in saved workspace. */ + + InitHandlerFunc( DoFilter, "df" ); + InitHandlerFunc( DoSetFilter, "dsf" ); + InitHandlerFunc( DoAndFilter, "daf" ); + InitHandlerFunc( DoSetAndFilter, "dsaf" ); + InitHandlerFunc( DoReturnTrueFilter, "src/opers.c:DoReturnTrueFilter" ); + InitHandlerFunc( DoSetReturnTrueFilter, "src/opers.c:DoSetReturnTrueFilter" ); - InitHandlerFunc( DoOperation0Args, "DoOperation0Args"); - InitHandlerFunc( DoOperation1Args, "DoOperation1Args"); - InitHandlerFunc( DoOperation2Args, "DoOperation2Args"); - InitHandlerFunc( DoOperation3Args, "DoOperation3Args"); - InitHandlerFunc( DoOperation4Args, "DoOperation4Args"); - InitHandlerFunc( DoOperation5Args, "DoOperation5Args"); - InitHandlerFunc( DoOperation6Args, "DoOperation6Args"); - InitHandlerFunc( DoOperationXArgs, "DoOperationXArgs"); - - InitHandlerFunc( DoVerboseOperation0Args, "DoVerboseOperation0Args"); - InitHandlerFunc( DoVerboseOperation1Args, "DoVerboseOperation1Args"); - InitHandlerFunc( DoVerboseOperation2Args, "DoVerboseOperation2Args"); - InitHandlerFunc( DoVerboseOperation3Args, "DoVerboseOperation3Args"); - InitHandlerFunc( DoVerboseOperation4Args, "DoVerboseOperation4Args"); - InitHandlerFunc( DoVerboseOperation5Args, "DoVerboseOperation5Args"); - InitHandlerFunc( DoVerboseOperation6Args, "DoVerboseOperation6Args"); - InitHandlerFunc( DoVerboseOperationXArgs, "DoVerboseOperationXArgs"); + InitHandlerFunc( DoAttribute, "src/opers.c:DoAttribute" ); + InitHandlerFunc( DoSetAttribute, "src/opers.c:DoSetAttribute" ); + InitHandlerFunc( DoTestAttribute, "src/opers.c:DoTestAttribute" ); + InitHandlerFunc( DoVerboseAttribute, "src/opers.c:DoVerboseAttribute" ); + InitHandlerFunc( DoMutableAttribute, "src/opers.c:DoMutableAttribute" ); + InitHandlerFunc( DoVerboseMutableAttribute, "src/opers.c:DoVerboseMutableAttribute" ); + + InitHandlerFunc( DoProperty, "src/opers.c:DoProperty" ); + InitHandlerFunc( DoSetProperty, "src/opers.c:DoSetProperty" ); + InitHandlerFunc( DoTestProperty, "src/opers.c:DoTestProperty" ); + InitHandlerFunc( DoVerboseProperty, "src/opers.c:DoVerboseProperty" ); + + InitHandlerFunc( DoSetterFunction, "src/opers.c:DoSetterFunction" ); + InitHandlerFunc( DoGetterFunction, "src/opers.c:DoGetterFunction" ); - InitHandlerFunc( DoConstructor0Args, "DoConstructor0Args"); - InitHandlerFunc( DoConstructor1Args, "DoConstructor1Args"); - InitHandlerFunc( DoConstructor2Args, "DoConstructor2Args"); - InitHandlerFunc( DoConstructor3Args, "DoConstructor3Args"); - InitHandlerFunc( DoConstructor4Args, "DoConstructor4Args"); - InitHandlerFunc( DoConstructor5Args, "DoConstructor5Args"); - InitHandlerFunc( DoConstructor6Args, "DoConstructor6Args"); - InitHandlerFunc( DoConstructorXArgs, "DoConstructorXArgs"); - - InitHandlerFunc( DoVerboseConstructor0Args, "DoVerboseConstructor0Args"); - InitHandlerFunc( DoVerboseConstructor1Args, "DoVerboseConstructor1Args"); - InitHandlerFunc( DoVerboseConstructor2Args, "DoVerboseConstructor2Args"); - InitHandlerFunc( DoVerboseConstructor3Args, "DoVerboseConstructor3Args"); - InitHandlerFunc( DoVerboseConstructor4Args, "DoVerboseConstructor4Args"); - InitHandlerFunc( DoVerboseConstructor5Args, "DoVerboseConstructor5Args"); - InitHandlerFunc( DoVerboseConstructor6Args, "DoVerboseConstructor6Args"); - InitHandlerFunc( DoVerboseConstructorXArgs, "DoVerboseConstructorXArgs"); + InitHandlerFunc( DoOperation0Args, "o0" ); + InitHandlerFunc( DoOperation1Args, "o1" ); + InitHandlerFunc( DoOperation2Args, "o2" ); + InitHandlerFunc( DoOperation3Args, "o3" ); + InitHandlerFunc( DoOperation4Args, "o4" ); + InitHandlerFunc( DoOperation5Args, "o5" ); + InitHandlerFunc( DoOperation6Args, "o6" ); + InitHandlerFunc( DoOperationXArgs, "o7" ); + + InitHandlerFunc( DoVerboseOperation0Args, "src/opers.c:DoVerboseOperation0Args" ); + InitHandlerFunc( DoVerboseOperation1Args, "src/opers.c:DoVerboseOperation1Args" ); + InitHandlerFunc( DoVerboseOperation2Args, "src/opers.c:DoVerboseOperation2Args" ); + InitHandlerFunc( DoVerboseOperation3Args, "src/opers.c:DoVerboseOperation3Args" ); + InitHandlerFunc( DoVerboseOperation4Args, "src/opers.c:DoVerboseOperation4Args" ); + InitHandlerFunc( DoVerboseOperation5Args, "src/opers.c:DoVerboseOperation5Args" ); + InitHandlerFunc( DoVerboseOperation6Args, "src/opers.c:DoVerboseOperation6Args" ); + InitHandlerFunc( DoVerboseOperationXArgs, "src/opers.c:DoVerboseOperationXArgs" ); + InitHandlerFunc( DoConstructor0Args, "src/opers.c:DoConstructor0Args" ); + InitHandlerFunc( DoConstructor1Args, "src/opers.c:DoConstructor1Args" ); + InitHandlerFunc( DoConstructor2Args, "src/opers.c:DoConstructor2Args" ); + InitHandlerFunc( DoConstructor3Args, "src/opers.c:DoConstructor3Args" ); + InitHandlerFunc( DoConstructor4Args, "src/opers.c:DoConstructor4Args" ); + InitHandlerFunc( DoConstructor5Args, "src/opers.c:DoConstructor5Args" ); + InitHandlerFunc( DoConstructor6Args, "src/opers.c:DoConstructor6Args" ); + InitHandlerFunc( DoConstructorXArgs, "src/opers.c:DoConstructorXArgs" ); + + InitHandlerFunc( DoVerboseConstructor0Args, "src/opers.c:DoVerboseConstructor0Args" ); + InitHandlerFunc( DoVerboseConstructor1Args, "src/opers.c:DoVerboseConstructor1Args" ); + InitHandlerFunc( DoVerboseConstructor2Args, "src/opers.c:DoVerboseConstructor2Args" ); + InitHandlerFunc( DoVerboseConstructor3Args, "src/opers.c:DoVerboseConstructor3Args" ); + InitHandlerFunc( DoVerboseConstructor4Args, "src/opers.c:DoVerboseConstructor4Args" ); + InitHandlerFunc( DoVerboseConstructor5Args, "src/opers.c:DoVerboseConstructor5Args" ); + InitHandlerFunc( DoVerboseConstructor6Args, "src/opers.c:DoVerboseConstructor6Args" ); + InitHandlerFunc( DoVerboseConstructorXArgs, "src/opers.c:DoVerboseConstructorXArgs" ); + /* make the property blist functions */ - InitHandlerFunc( FuncAND_FLAGS, "AND_FLAGS" ); - AssGVar( GVarName( "AND_FLAGS" ), - NewFunctionC( "AND_FLAGS", 2L, "oper1, oper2", - FuncAND_FLAGS ) ); - - InitHandlerFunc( FuncSUB_FLAGS, "SUB_FLAGS" ); - AssGVar( GVarName( "SUB_FLAGS" ), - NewFunctionC( "SUB_FLAGS", 2L, "oper1, oper2", - FuncSUB_FLAGS ) ); - - InitHandlerFunc( FuncHASH_FLAGS, "HASH_FLAGS" ); - AssGVar( GVarName( "HASH_FLAGS" ), - NewFunctionC( "HASH_FLAGS", 1L, "flags", - FuncHASH_FLAGS ) ); - - InitHandlerFunc( FuncIS_EQUAL_FLAGS, "IS_EQUAL_FLAGS" ); - AssGVar( GVarName( "IS_EQUAL_FLAGS" ), - NewFunctionC( "IS_EQUAL_FLAGS", 2L, "flags1, flags2", - FuncIS_EQUAL_FLAGS ) ); - - InitHandlerFunc( FuncIS_SUBSET_FLAGS, "IS_SUBSET_FLAGS" ); - AssGVar( GVarName( "IS_SUBSET_FLAGS" ), - NewFunctionC( "IS_SUBSET_FLAGS", 2L, "flags1, flags2", - FuncIS_SUBSET_FLAGS ) ); - - InitHandlerFunc( FuncTRUES_FLAGS, "TRUES_FLAGS" ); - AssGVar( GVarName( "TRUES_FLAGS" ), - NewFunctionC( "TRUES_FLAGS", 1L, "flags", - FuncTRUES_FLAGS ) ); - - InitHandlerFunc( FuncSIZE_FLAGS, "SIZE_FLAGS" ); - AssGVar( GVarName( "SIZE_FLAGS" ), - NewFunctionC( "SIZE_FLAGS", 1L, "flags", - FuncSIZE_FLAGS ) ); - - InitHandlerFunc( FuncLEN_FLAGS, "LEN_FLAGS" ); - AssGVar( GVarName( "LEN_FLAGS" ), - NewFunctionC( "LEN_FLAGS", 1L, "flags", - FuncLEN_FLAGS ) ); - - InitHandlerFunc( FuncELM_FLAGS, "ELM_FLAGS" ); - AssGVar( GVarName( "ELM_FLAGS" ), - NewFunctionC( "ELM_FLAGS", 2L, "flags, pos", - FuncELM_FLAGS ) ); + C_NEW_GVAR_FUNC( "AND_FLAGS", 2, "oper1, oper2", + FuncAND_FLAGS, + "src/opers.c:AND_FLAGS" ); + C_NEW_GVAR_FUNC( "SUB_FLAGS", 2, "oper1, oper2", + FuncSUB_FLAGS, + "src/opers.c:SUB_FLAGS" ); - /* install the printing function */ - PrintObjFuncs[ T_FLAGS ] = PrintFlags; + C_NEW_GVAR_FUNC( "HASH_FLAGS", 1, "flags", + FuncHASH_FLAGS, + "src/opers.c:HASH_FLAGS" ); + + C_NEW_GVAR_FUNC( "IS_EQUAL_FLAGS", 2, "flags1, flags2", + FuncIS_EQUAL_FLAGS, + "src/opers.c:IS_EQUAL_FLAGS" ); + + C_NEW_GVAR_FUNC( "IS_SUBSET_FLAGS", 2, "flags1, flags2", + FuncIS_SUBSET_FLAGS, + "src/opers.c:IS_SUBSET_FLAGS" ); + + C_NEW_GVAR_FUNC( "TRUES_FLAGS", 1, "flags", + FuncTRUES_FLAGS, + "src/opers.c:TRUES_FLAGS" ); + + C_NEW_GVAR_FUNC( "SIZE_FLAGS", 1, "flags", + FuncSIZE_FLAGS, + "src/opers.c:SIZE_FLAGS" ); + + C_NEW_GVAR_FUNC( "LEN_FLAGS", 1, "flags", + FuncLEN_FLAGS, + "src/opers.c:LEN_FLAGS" ); + + C_NEW_GVAR_FUNC( "ELM_FLAGS", 2, "flags, pos", + FuncELM_FLAGS, + "src/opers.c:ELM_FLAGS" ); /* install the kind function */ ImportGVarFromLibrary( "TYPE_FLAGS", &TYPE_FLAGS ); TypeObjFuncs[ T_FLAGS ] = TypeFlags; - /* install the marking function */ - InfoBags[T_FLAGS].name = "flags list"; - InitMarkFuncBags( T_FLAGS, MarkTwoSubBags ); - /* make the functions that support new operations */ C_NEW_GVAR_FILT( "IS_OPERATION", "obj", IsOperationFilt, - FuncIS_OPERATION, + FuncIS_OPERATION, "src/opers.c:IS_OPERATION" ); - InitHandlerFunc( FuncFlag1Filter, "FLAG1_FILTER" ); - AssGVar( GVarName( "FLAG1_FILTER" ), - NewFunctionC( "FLAG1_FILTER", 1L, "oper", - FuncFlag1Filter ) ); - - InitHandlerFunc( FuncSetFlag1Filter, "SET_FLAG1_FILTER" ); - AssGVar( GVarName( "SET_FLAG1_FILTER" ), - NewFunctionC( "SET_FLAG1_FILTER", 2L, "oper, flag1", - FuncSetFlag1Filter ) ); - - InitHandlerFunc( FuncFlag2Filter, "FLAG2_FILTER" ); - AssGVar( GVarName( "FLAG2_FILTER" ), - NewFunctionC( "FLAG2_FILTER", 1L, "oper", - FuncFlag2Filter ) ); - - InitHandlerFunc( FuncSetFlag2Filter, "SET_FLAG2_FILTER" ); - AssGVar( GVarName( "SET_FLAG2_FILTER" ), - NewFunctionC( "SET_FLAG2_FILTER", 2L, "oper, flag2", - FuncSetFlag2Filter ) ); - - InitHandlerFunc( FuncFlagsFilter, "FLAGS_FILTER" ); - AssGVar( GVarName( "FLAGS_FILTER" ), - NewFunctionC( "FLAGS_FILTER", 1L, "oper", - FuncFlagsFilter ) ); - - InitHandlerFunc( FuncSetFlagsFilter, "SET_FLAGS_FILTER" ); - AssGVar( GVarName( "SET_FLAGS_FILTER" ), - NewFunctionC( "SET_FLAGS_FILTER", 2L, "oper, flags", - FuncSetFlagsFilter ) ); - - InitHandlerFunc( FuncSetterFilter, "SETTER_FILTER" ); - AssGVar( GVarName( "SETTER_FILTER" ), - NewFunctionC( "SETTER_FILTER", 1L, "oper", - FuncSetterFilter ) ); - - InitHandlerFunc( FuncSetSetterFilter, "SET_SETTER_FILTER" ); - AssGVar( GVarName( "SET_SETTER_FILTER" ), - NewFunctionC( "SET_SETTER_FILTER", 2L, "oper, other", - FuncSetSetterFilter ) ); - - InitHandlerFunc( FuncTesterFilter, "TESTER_FILTER" ); - AssGVar( GVarName( "TESTER_FILTER" ), - NewFunctionC( "TESTER_FILTER", 1L, "oper", - FuncTesterFilter ) ); - - InitHandlerFunc( FuncSetTesterFilter, "SET_TESTER_FILTER" ); - AssGVar( GVarName( "SET_TESTER_FILTER" ), - NewFunctionC( "SET_TESTER_FILTER", 2L, "oper, other", - FuncSetTesterFilter ) ); - - InitHandlerFunc( FuncMethodsOperation, "METHODS_OPERATION" ); - AssGVar( GVarName( "METHODS_OPERATION" ), - NewFunctionC( "METHODS_OPERATION", 2L, "oper, narg", - FuncMethodsOperation ) ); - - InitHandlerFunc( FuncSetMethodsOperation, "SET_METHODS_OPERATION" ); - AssGVar( GVarName( "SET_METHODS_OPERATION" ), - NewFunctionC( "SET_METHODS_OPERATION", 3L, "oper, narg, meths", - FuncSetMethodsOperation ) ); - - InitHandlerFunc( FuncChangedMethodsOperation, "CHANGED_METHODS_OPERATION" ); - AssGVar( GVarName( "CHANGED_METHODS_OPERATION" ), - NewFunctionC( "CHANGED_METHODS_OPERATION", 2L, "oper, narg", - FuncChangedMethodsOperation) ); + C_NEW_GVAR_FUNC( "FLAG1_FILTER", 1, "oper", + FuncFlag1Filter, + "src/opers.c:FLAG1_FILTER" ); + + C_NEW_GVAR_FUNC( "SET_FLAG1_FILTER", 2, "oper, flag1", + FuncSetFlag1Filter, + "src/opers.c:SET_FLAG1_FILTER" ); + + C_NEW_GVAR_FUNC( "FLAG2_FILTER", 1, "oper", + FuncFlag2Filter, + "src/opers.c:FLAG2_FILTER" ); + + C_NEW_GVAR_FUNC( "SET_FLAG2_FILTER", 2, "oper, flag2", + FuncSetFlag2Filter, + "src/opers.c:SET_FLAG2_FILTER" ); + + C_NEW_GVAR_FUNC( "FLAGS_FILTER", 1, "oper", + FuncFlagsFilter, + "src/opers.c:FLAGS_FILTER" ); + + C_NEW_GVAR_FUNC( "SET_FLAGS_FILTER", 2, "oper, flags", + FuncSetFlagsFilter, + "src/opers.c:SET_FLAGS_FILTER" ); + + C_NEW_GVAR_FUNC( "SETTER_FILTER", 1, "oper", + FuncSetterFilter, + "src/opers.c:SETTER_FILTER" ); + + C_NEW_GVAR_FUNC( "SET_SETTER_FILTER", 2, "oper, other", + FuncSetSetterFilter, + "src/opers.c:SET_SETTER_FILTER" ); + + C_NEW_GVAR_FUNC( "TESTER_FILTER", 1, "oper", + FuncTesterFilter, + "src/opers.c:TESTER_FILTER" ); + + C_NEW_GVAR_FUNC( "SET_TESTER_FILTER", 2, "oper, other", + FuncSetTesterFilter, + "src/opers.c:SET_TESTER_FILTER" ); + + C_NEW_GVAR_FUNC( "METHODS_OPERATION", 2, "oper, narg", + FuncMethodsOperation, + "src/opers.c:METHODS_OPERATION" ); + + C_NEW_GVAR_FUNC( "SET_METHODS_OPERATION", 3, "oper, narg, meths", + FuncSetMethodsOperation, + "src/opers.c:SET_METHODS_OPERATION" ); + + C_NEW_GVAR_FUNC( "CHANGED_METHODS_OPERATION", 2, "oper, narg", + FuncChangedMethodsOperation, + "src/opers.c:CHANGED_METHODS_OPERATION" ); /* make the functions for filter, operations, properties, attributes */ - InitHandlerFunc( NewFilterHandler, "NewFilter" ); - NewFilterFunc = NewFunctionC( - "NewFilter", 1L, "name", NewFilterHandler ); - AssGVar( GVarName( "NEW_FILTER" ), NewFilterFunc ); - - InitHandlerFunc( NewOperationHandler, "NewOperation" ); - NewOperationFunc = NewFunctionC( - "NewOperation", 1L, "name", NewOperationHandler ); - AssGVar( GVarName( "NEW_OPERATION" ), NewOperationFunc ); - - InitHandlerFunc( NewConstructorHandler, "NewConstructor" ); - NewConstructorFunc = NewFunctionC( - "NewConstructor", 1L, "name", NewConstructorHandler ); - AssGVar( GVarName( "NEW_CONSTRUCTOR" ), NewConstructorFunc ); - - InitHandlerFunc( NewAttributeHandler, "NewAttribute" ); - NewAttributeFunc = NewFunctionC( - "NewAttribute", 1L, "name", NewAttributeHandler ); - AssGVar( GVarName( "NEW_ATTRIBUTE" ), NewAttributeFunc ); - - InitHandlerFunc( NewMutableAttributeHandler, "NewMutableAttribute" ); - NewMutableAttributeFunc = NewFunctionC( - "NewMutableAttribute", 1L, "name", NewMutableAttributeHandler ); - AssGVar( GVarName( "NEW_MUTABLE_ATTRIBUTE" ), NewMutableAttributeFunc ); - - InitHandlerFunc( NewPropertyHandler, "NewProperty" ); - NewPropertyFunc = NewFunctionC( - "NewProperty", 1L, "name", NewPropertyHandler ); - AssGVar( GVarName( "NEW_PROPERTY" ), NewPropertyFunc ); - - InitHandlerFunc( FuncSetterFunction, "SetterFunction" ); - SetterFunctionFunc = NewFunctionC( - "SetterFunction", 2L, "name, filter", FuncSetterFunction ); - AssGVar( GVarName( "SETTER_FUNCTION" ), SetterFunctionFunc ); - - InitHandlerFunc( FuncGetterFunction, "GetterFunction" ); - GetterFunctionFunc = NewFunctionC( - "GetterFunction", 1L, "name", FuncGetterFunction ); - AssGVar( GVarName( "GETTER_FUNCTION" ), GetterFunctionFunc ); + C_NEW_GVAR_FUNC( "NEW_FILTER", 1, "name", + NewFilterHandler, + "src/opers.c:NEW_FILTER" ); + + C_NEW_GVAR_FUNC( "NEW_OPERATION", 1, "name", + NewOperationHandler, + "src/opers.c:NEW_OPERATION" ); + + C_NEW_GVAR_FUNC( "NEW_CONSTRUCTOR", 1, "name", + NewConstructorHandler, + "src/opers.c:NEW_CONSTRUCTOR" ); + + C_NEW_GVAR_FUNC( "NEW_ATTRIBUTE", 1, "name", + NewAttributeHandler, + "src/opers.c:NEW_ATTRIBUTE" ); + + C_NEW_GVAR_FUNC( "NEW_MUTABLE_ATTRIBUTE", 1, "name", + NewMutableAttributeHandler, + "src/opers.c:NEW_MUTABLE_ATTRIBUTE" ); + + C_NEW_GVAR_FUNC( "NEW_PROPERTY", 1, "name", + NewPropertyHandler, + "src/opers.c:NEW_PROPERTY" ); + + C_NEW_GVAR_FUNC( "SETTER_FUNCTION", 2, "name, filter", + FuncSetterFunction, + "src/opers.c:SETTER_FUNCTION" ); + + C_NEW_GVAR_FUNC( "GETTER_FUNCTION", 1, "name", + FuncGetterFunction, + "src/opers.c:GETTER_FUNCTION" ); /* make the trace functions */ - InitHandlerFunc( FuncTraceMethods, "TRACE_METHODS" ); - AssGVar( GVarName( "TRACE_METHODS" ), - NewFunctionC( "TRACE_METHODS", 1L, "oper", - FuncTraceMethods ) ); + C_NEW_GVAR_FUNC( "TRACE_METHODS", 1, "oper", + FuncTraceMethods, + "src/opers.c:TRACE_METHODS" ); - InitHandlerFunc( FuncUntraceMethods, "UNTRACE_METHODS" ); - AssGVar( GVarName( "UNTRACE_METHODS" ), - NewFunctionC( "UNTRACE_METHODS", 1L, "oper", - FuncUntraceMethods ) ); + C_NEW_GVAR_FUNC( "UNTRACE_METHODS", 1, "oper", + FuncUntraceMethods, + "src/opers.c:UNTRACE_METHODS" ); /* make the 'true' operation */ - ReturnTrueFilter = NewReturnTrueFilter(); - AssGVar( GVarName( "IS_OBJECT" ), ReturnTrueFilter ); + InitGlobalBag( &ReturnTrueFilter, "src/opers.c:ReturnTrueFilter" ); + if ( ! SyRestoring ) { + ReturnTrueFilter = NewReturnTrueFilter(); + AssGVar( GVarName( "IS_OBJECT" ), ReturnTrueFilter ); + } /* install the (function) copies of global variables */ /* for the inside-out (kernel to library) interface */ - TRY_NEXT_METHOD = NEW_STRING( 16 ); - SyStrncat( CSTR_STRING(TRY_NEXT_METHOD), "TRY_NEXT_METHOD", 16 ); - AssGVar( GVarName("TRY_NEXT_METHOD"), TRY_NEXT_METHOD ); - + InitGlobalBag( &TRY_NEXT_METHOD, "src/opers.c:TRY_NEXT_METHOD" ); + if ( ! SyRestoring ) { + TRY_NEXT_METHOD = NEW_STRING( 16 ); + SyStrncat( CSTR_STRING(TRY_NEXT_METHOD), "TRY_NEXT_METHOD", 16 ); + AssGVar( GVarName("TRY_NEXT_METHOD"), TRY_NEXT_METHOD ); + } ImportGVarFromLibrary( "TRY_NEXT_METHOD", &TRY_NEXT_METHOD ); ImportFuncFromLibrary( "METHOD_0ARGS", &Method0Args ); @@ -5581,28 +5650,39 @@ void InitOpers ( void ) /* create the hash tables */ #ifdef AND_FLAGS_HASH_SIZE - AndFlagsCache = NEW_PLIST( T_PLIST, 3*AND_FLAGS_HASH_SIZE ); - SET_LEN_PLIST( AndFlagsCache, 3*AND_FLAGS_HASH_SIZE ); - AssGVar( GVarName( "AND_FLAGS_CACHE" ), AndFlagsCache ); - - for ( i = 1; i <= 3*AND_FLAGS_HASH_SIZE; i++ ) { - SET_ELM_PLIST( AndFlagsCache, i, INTOBJ_INT(0) ); + InitGlobalBag( &AndFlagsCache, "src/opers.c:AndFlagsCache" ); + if ( ! SyRestoring ) { + AndFlagsCache = NEW_PLIST( T_PLIST, 3*AND_FLAGS_HASH_SIZE ); + SET_LEN_PLIST( AndFlagsCache, 3*AND_FLAGS_HASH_SIZE ); + AssGVar( GVarName( "AND_FLAGS_CACHE" ), AndFlagsCache ); + for ( i = 1; i <= 3*AND_FLAGS_HASH_SIZE; i++ ) { + SET_ELM_PLIST( AndFlagsCache, i, INTOBJ_INT(0) ); + } } #endif - InitHandlerFunc( FuncOPERS_CACHE_INFO, "OPERS_CACHE_INFO" ); - AssGVar( GVarName( "OPERS_CACHE_INFO" ), - NewFunctionC( "OPERS_CACHE_INFO", 0L, "", - FuncOPERS_CACHE_INFO ) ); + C_NEW_GVAR_FUNC( "OPERS_CACHE_INFO", 0, "", + FuncOPERS_CACHE_INFO, + "src/opers.c:OPERS_CACHE_INFO" ); - InitHandlerFunc( FuncCLEAR_CACHE_INFO, "CLEAR_CACHE_INFO" ); - AssGVar( GVarName( "CLEAR_CACHE_INFO" ), - NewFunctionC( "CLEAR_CACHE_INFO", 0L, "", - FuncCLEAR_CACHE_INFO ) ); + C_NEW_GVAR_FUNC( "CLEAR_CACHE_INFO", 0, "", + FuncCLEAR_CACHE_INFO, + "src/opers.c:CLEAR_CACHE_INFO" ); } +/**************************************************************************** +** +*F CheckOpers() . . . . check the initialisation of the operations package +*/ +void CheckOpers ( void ) +{ + SET_REVISION( "opers_c", Revision_opers_c ); + SET_REVISION( "opers_h", Revision_opers_h ); +} + + /**************************************************************************** ** diff --git a/src/opers.h b/src/opers.h index affac15be3..a8cf90ae9e 100644 --- a/src/opers.h +++ b/src/opers.h @@ -10,7 +10,7 @@ ** and properties package. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_opers_h = +SYS_CONST char * Revision_opers_h = "@(#)$Id$"; #endif @@ -293,17 +293,62 @@ extern void ChangeDoOperations ( Obj oper, Int verb ); +/**************************************************************************** +** +*F SaveOperationExtras( ) . . . .additional savng for functions which +** are operations +** +** This is called by SaveFunction when the function bag is too large to be +** a simple function, and so must be an operation +** +*/ + +extern void SaveOperationExtras( Obj oper ); + +/**************************************************************************** +** +*F LoadOperationExtras( ) . . . .additional loading for functions which +** are operations +** +** This is called by LoadFunction when the function bag is too large to be +** a simple function, and so must be an operation +** +*/ + +extern void LoadOperationExtras( Obj oper ); + /**************************************************************************** ** -*F InitOpers() . . . . . . . . . . . . . . initialize the operations package +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * */ -extern void InitOpers ( void ); +/**************************************************************************** +** +*F SetupOpers() . . . . . . . . . . . . . . initialize the operations package +*/ +extern void SetupOpers ( void ); +/**************************************************************************** +** +*F InitOpers() . . . . . . . . . . . . . . initialize the operations package +*/ +extern void InitOpers ( void ); +/**************************************************************************** +** +*F CheckOpers() . . . . check the initialisation of the operations package +*/ +extern void CheckOpers ( void ); + + +/**************************************************************************** +** + +*E opers.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/permutat.c b/src/permutat.c index 4588a920a9..5c8d5a6298 100644 --- a/src/permutat.c +++ b/src/permutat.c @@ -36,34 +36,43 @@ ** *N 13-Jan-91 martin should add 'CyclesPerm', 'CycleLengthsPerm' */ -char * Revision_permutat_c = +#include "system.h" /* system dependent part */ + +SYS_CONST char * Revision_permutat_c = "@(#)$Id$"; -#include "system.h" /* Ints, UInts */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ -#include "gasman.h" /* NewBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, types */ -#include "scanner.h" /* Pr */ +#include "gap.h" /* error handling, initialisation */ -#include "gvars.h" /* AssGVar, GVarName */ +#include "gvars.h" /* global variables */ -#include "calls.h" /* Function */ -#include "opers.h" /* NewFilterC */ +#include "calls.h" /* generic call mechanism */ +#include "opers.h" /* generic operations */ -#include "ariths.h" /* generic operations package */ -#include "lists.h" /* generic lists package */ +#include "ariths.h" /* basic arithmetic */ -#include "bool.h" /* True, False */ +#include "bool.h" /* booleans */ -#include "integer.h" /* SumInt, DiffInt, ProdInt, Quo...*/ +#include "integer.h" /* integers */ #define INCLUDE_DECLARATION_PART -#include "permutat.h" /* declaration part of the package */ +#include "permutat.h" /* permutations */ #undef INCLUDE_DECLARATION_PART + +#include "gap.h" /* error handling, initialisation */ + +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ + +#include "lists.h" /* generic lists */ #include "plist.h" /* plain lists */ +#include "string.h" /* strings */ -#include "gap.h" /* Error */ +#include "saveload.h" /* saving and loading */ /**************************************************************************** @@ -2315,7 +2324,7 @@ Obj FuncPermList ( while ( ! IS_LIST( list ) ) { list = ErrorReturnObj( "PermList: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list)].name), 0L, + (Int)TNAM_OBJ(list), 0L, "you can return a list for " ); } PLAIN_LIST( list ); @@ -2461,9 +2470,9 @@ Obj FuncPermList ( /**************************************************************************** ** -*F FuncLargestMovedPointPerm( , ) largest point moved by a perm +*F FuncLARGEST_MOVED_POINT_PERM( , ) largest point moved by a perm ** -** 'FuncLargestMovedPointPerm' implements the internal function +** 'FuncLARGEST_MOVED_POINT_PERM' implements the internal function ** 'LargestMovedPointPerm'. ** ** 'LargestMovedPointPerm( )' @@ -2473,7 +2482,7 @@ Obj FuncPermList ( ** ** This is easy, except that permutations may contain trailing fixpoints. */ -Obj FuncLargestMovedPointPerm ( +Obj FuncLARGEST_MOVED_POINT_PERM ( Obj self, Obj perm ) { @@ -2485,7 +2494,7 @@ Obj FuncLargestMovedPointPerm ( while ( TNUM_OBJ(perm) != T_PERM2 && TNUM_OBJ(perm) != T_PERM4 ) { perm = ErrorReturnObj( "LargestMovedPointPerm: must be a permutation (not a %s)", - (Int)(InfoBags[TNUM_OBJ(perm)].name), 0L, + (Int)TNAM_OBJ(perm), 0L, "you can return a permutation for " ); } @@ -2557,13 +2566,13 @@ Obj FuncCycleLengthPermInt ( while ( TNUM_OBJ(perm) != T_PERM2 && TNUM_OBJ(perm) != T_PERM4 ) { perm = ErrorReturnObj( "CycleLengthPermInt: must be a permutation (not a %s)", - (Int)(InfoBags[TNUM_OBJ(perm)].name), 0L, + (Int)TNAM_OBJ(perm), 0L, "you can return a permutation for " ); } while ( TNUM_OBJ(point) != T_INT || INT_INTOBJ(point) <= 0 ) { point = ErrorReturnObj( "CycleLengthPermInt: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(point)].name), 0L, + (Int)TNAM_OBJ(point), 0L, "you can return a positive integer for " ); } @@ -2635,13 +2644,13 @@ Obj FuncCyclePermInt ( while ( TNUM_OBJ(perm) != T_PERM2 && TNUM_OBJ(perm) != T_PERM4 ) { perm = ErrorReturnObj( "CyclePermInt: must be a permutation (not a %s)", - (Int)(InfoBags[TNUM_OBJ(perm)].name), 0L, + (Int)TNAM_OBJ(perm), 0L, "you can return a permutation for " ); } while ( TNUM_OBJ(point) != T_INT || INT_INTOBJ(point) <= 0 ) { point = ErrorReturnObj( "CyclePermInt: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(point)].name), 0L, + (Int)TNAM_OBJ(point), 0L, "you can return a positive integer for " ); } @@ -2743,7 +2752,7 @@ Obj FuncOrderPerm ( while ( TNUM_OBJ(perm) != T_PERM2 && TNUM_OBJ(perm) != T_PERM4 ) { perm = ErrorReturnObj( "OrderPerm: must be a permutation (not a %s)", - (Int)(InfoBags[TNUM_OBJ(perm)].name), 0L, + (Int)TNAM_OBJ(perm), 0L, "you can return a permutation for " ); } @@ -2867,7 +2876,7 @@ Obj FuncSignPerm ( while ( TNUM_OBJ(perm) != T_PERM2 && TNUM_OBJ(perm) != T_PERM4 ) { perm = ErrorReturnObj( "SignPerm: must be a permutation (not a %s)", - (Int)(InfoBags[TNUM_OBJ(perm)].name), 0L, + (Int)TNAM_OBJ(perm), 0L, "you can return a permutation for " ); } @@ -2992,7 +3001,7 @@ Obj FuncSmallestGeneratorPerm ( while ( TNUM_OBJ(perm) != T_PERM2 && TNUM_OBJ(perm) != T_PERM4 ) { perm = ErrorReturnObj( "SmallestGeneratorPerm: must be a permutation (not a %s)", - (Int)(InfoBags[TNUM_OBJ(perm)].name), 0L, + (Int)TNAM_OBJ(perm), 0L, "you can return a permutation for " ); } @@ -3390,16 +3399,197 @@ Obj OnSetsPerm ( return res; } +/**************************************************************************** +** +*F SavePerm2( ) +** +*/ + +void SavePerm2( Obj perm) +{ + UInt i; + UInt2 *ptr; + UInt len; + len = DEG_PERM2(perm); + ptr = ADDR_PERM2(perm); + for (i = 0; i < len; i++) + SaveUInt2( *ptr++); +} /**************************************************************************** ** +*F SavePerm4( ) +** +*/ -*F InitPermutat() . . . . . . . . . . . initializes the permutation package +void SavePerm4( Obj perm) +{ + UInt i; + UInt4 *ptr; + UInt len; + len = DEG_PERM4(perm); + ptr = ADDR_PERM4(perm); + for (i = 0; i < len; i++) + SaveUInt4( *ptr++); +} + +/**************************************************************************** +** +*F LoadPerm2( ) +** +*/ + +void LoadPerm2( Obj perm) +{ + UInt i; + UInt2 *ptr; + UInt len; + len = DEG_PERM2(perm); + ptr = ADDR_PERM2(perm); + for (i = 0; i < len; i++) + *ptr++ = LoadUInt2(); +} + +/**************************************************************************** +** +*F LoadPerm4( ) +** +*/ + +void LoadPerm4( Obj perm) +{ + UInt i; + UInt4 *ptr; + UInt len; + len = DEG_PERM4(perm); + ptr = ADDR_PERM4(perm); + for (i = 0; i < len; i++) + *ptr++ = LoadUInt4( ); +} + + +/**************************************************************************** +** +*F Array2Perm( ) . . . . . . . . . convert array of cycles into perm +*/ +Obj Array2Perm ( + Obj array ) +{ + Obj perm; /* permutation, result */ + UInt4 * ptr4; /* pointer into perm */ + UInt2 * ptr2; /* pointer into perm */ + Obj val; /* one entry as value */ + UInt c, p, l; /* entries in permutation */ + UInt m; /* maximal entry in permutation */ + Obj cycle; /* one cycle of permutation */ + UInt i, j, k; /* loop variable */ + + /* special case for identity permutation */ + if ( LEN_LIST(array) == 0 ) { + return IdentityPerm; + } + + /* allocate the new permutation */ + m = 0; + perm = NEW_PERM4( 0 ); + + /* loop over the cycles */ + for ( i = 1; i <= LEN_LIST(array); i++ ) { + cycle = ELM_LIST( array, i ); + while ( ! IS_LIST(cycle) ) { + cycle = ErrorReturnObj( + "Arra2Perm: must be a list (not a %s)", + (Int)TNAM_OBJ(cycle), 0L, + "you can return a list" ); + } + + /* loop over the entries of the cycle */ + c = p = l = 0; + for ( j = LEN_LIST(cycle); 1 <= j; j-- ) { + + /* get and check current entry for the cycle */ + val = ELM_LIST( cycle, j ); + while ( ! IS_INTOBJ(val) || INT_INTOBJ(val) <= 0 ) { + val = ErrorReturnObj( + "Permutation: must be a positive integer (not to a %s)", + (Int)TNAM_OBJ(val), 0L, + "you can return a positive integer" ); + } + c = INT_INTOBJ(val); + + /* if necessary resize the permutation */ + if ( SIZE_OBJ(perm)/sizeof(UInt4) < c ) { + ResizeBag( perm, (c + 1023) / 1024 * 1024 * sizeof(UInt4) ); + ptr4 = ADDR_PERM4( perm ); + for ( k = m+1; k <= SIZE_OBJ(perm)/sizeof(UInt4); k++ ) { + ptr4[k-1] = k-1; + } + } + if ( m < c ) { + m = c; + } + + /* check that the cycles are disjoint */ + ptr4 = ADDR_PERM4( perm ); + if ( (p != 0 && p == c) || (ptr4[c-1] != c-1) ) { + return ErrorReturnObj( + "Permutation: cycles must be disjoint", + 0L, 0L, + "you can return a permutation" ); + } + + /* enter the previous entry at current location */ + ptr4 = ADDR_PERM4( perm ); + if ( p != 0 ) { ptr4[c-1] = p-1; } + else { l = c; } + + /* remember current entry for next round */ + p = c; + } + + /* enter first (last popped) entry at last (first popped) location */ + ptr4 = ADDR_PERM4( perm ); + ptr4[l-1] = p-1; + + } + + /* if possible represent the permutation with short entries */ + if ( m <= 65536UL ) { + ptr2 = ADDR_PERM2( perm ); + ptr4 = ADDR_PERM4( perm ); + for ( k = 1; k <= m; k++ ) { + ptr2[k-1] = ptr4[k-1]; + }; + RetypeBag( perm, T_PERM2 ); + ResizeBag( perm, m * sizeof(UInt2) ); + } + + /* otherwise just shorten the permutation */ + else { + ResizeBag( perm, m * sizeof(UInt4) ); + } + + /* return the permutation */ + return perm; +} + + + +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + +*F SetupPermutat() . . . . . . . . . . . initializes the permutation package ** ** Is called during the initialization to initialize the permutation ** package. */ -void InitPermutat ( void ) +void SetupPermutat ( void ) { /* install the marking function */ InfoBags[ T_PERM2 ].name = "permutation (small)"; @@ -3407,13 +3597,11 @@ void InitPermutat ( void ) InfoBags[ T_PERM4 ].name = "permutation (large)"; InitMarkFuncBags( T_PERM4 , MarkNoSubBags ); - - /* install the kind function */ - ImportGVarFromLibrary( "TYPE_PERM2", &TYPE_PERM2 ); - ImportGVarFromLibrary( "TYPE_PERM4", &TYPE_PERM4 ); - - TypeObjFuncs[ T_PERM2 ] = TypePerm2; - TypeObjFuncs[ T_PERM4 ] = TypePerm4; + /* install the saving functions */ + SaveObjFuncs[ T_PERM2 ] = SavePerm2; + SaveObjFuncs[ T_PERM4 ] = SavePerm4; + LoadObjFuncs[ T_PERM2 ] = LoadPerm2; + LoadObjFuncs[ T_PERM4 ] = LoadPerm4; /* install the printing functions */ @@ -3469,65 +3657,90 @@ void InitPermutat ( void ) CommFuncs[ T_PERM4 ][ T_PERM4 ] = CommPerm44; + /* install the 'ONE' function for permutations */ + OneFuncs[ T_PERM2 ] = OnePerm; + OneFuncs[ T_PERM4 ] = OnePerm; + + + /* install the 'INV' function for permutations */ + InvFuncs[ T_PERM2 ] = InvPerm; + InvFuncs[ T_PERM4 ] = InvPerm; +} + + +/**************************************************************************** +** +*F InitPermutat() . . . . . . . . . . . initializes the permutation package +** +** Is called during the initialization to initialize the permutation +** package. +*/ +void InitPermutat ( void ) +{ + /* install the kind function */ + ImportGVarFromLibrary( "TYPE_PERM2", &TYPE_PERM2 ); + ImportGVarFromLibrary( "TYPE_PERM4", &TYPE_PERM4 ); + + TypeObjFuncs[ T_PERM2 ] = TypePerm2; + TypeObjFuncs[ T_PERM4 ] = TypePerm4; + + /* install the internal functions */ - InitHandlerFunc( IsPermHandler, "IS_PERM" ); - IsPermFilt = NewFilterC( "IS_PERM", 1L, "obj", - IsPermHandler ); - AssGVar( GVarName( "IS_PERM" ), IsPermFilt ); - - InitHandlerFunc( FuncPermList, "PermList" ); - AssGVar( GVarName( "PermList" ), - NewFunctionC( "PermList", 1L, "list", - FuncPermList ) ); - - InitHandlerFunc( FuncLargestMovedPointPerm, "LargestMovedPointPerm" ); - AssGVar( GVarName( "LARGEST_MOVED_POINT_PERM" ), - NewFunctionC( "LargestMovedPointPerm", 1L, "perm", - FuncLargestMovedPointPerm ) ); - - InitHandlerFunc( FuncCycleLengthPermInt, "CycleLengthPermInt" ); - AssGVar( GVarName( "CycleLengthPermInt" ), - NewFunctionC( "CycleLengthPermInt", 2L, "perm, point", - FuncCycleLengthPermInt ) ); - - InitHandlerFunc( FuncCyclePermInt, "CyclePermInt" ); - AssGVar( GVarName( "CyclePermInt" ), - NewFunctionC( "CyclePermInt", 2L, "perm, point", - FuncCyclePermInt ) ); - - InitHandlerFunc( FuncOrderPerm, "OrderPerm" ); - AssGVar( GVarName( "OrderPerm" ), - NewFunctionC( "OrderPerm", 1L, "perm", - FuncOrderPerm ) ); - - InitHandlerFunc( FuncSignPerm, "SignPerm" ); - AssGVar( GVarName( "SignPerm" ), - NewFunctionC( "SignPerm", 1L, "perm", - FuncSignPerm ) ); - - InitHandlerFunc( FuncSmallestGeneratorPerm, "SmallestGeneratorPerm" ); - AssGVar( GVarName( "SmallestGeneratorPerm" ), - NewFunctionC( "SmallestGeneratorPerm", 1L, "perm", - FuncSmallestGeneratorPerm ) ); + C_NEW_GVAR_FILT( "IS_PERM", "obj", IsPermFilt, IsPermHandler, + "src/permutat.c:IS_PERM" ); + + C_NEW_GVAR_FUNC( "PermList", 1, "list", + FuncPermList, + "src/permutat.c:PermList" ); + + C_NEW_GVAR_FUNC( "LARGEST_MOVED_POINT_PERM", 1, "perm", + FuncLARGEST_MOVED_POINT_PERM, + "src/permutat.c:LARGEST_MOVED_POINT_PERM" ); + + C_NEW_GVAR_FUNC( "CycleLengthPermInt", 2, "perm, point", + FuncCycleLengthPermInt, + "src/permutat.c:CycleLengthPermInt" ); + + C_NEW_GVAR_FUNC( "CyclePermInt", 2, "perm, point", + FuncCyclePermInt, + "src/permutat.c:CyclePermInt" ); + + C_NEW_GVAR_FUNC( "OrderPerm", 1, "perm", + FuncOrderPerm, + "src/permutat.c:OrderPerm" ); + + C_NEW_GVAR_FUNC( "SignPerm", 1, "perm", + FuncSignPerm, + "src/permutat.c:SignPerm" ); + + C_NEW_GVAR_FUNC( "SmallestGeneratorPerm", 1, "perm", + FuncSmallestGeneratorPerm, + "src/permutat.c:SmallestGeneratorPerm" ); /* make the buffer bag */ - TmpPerm = NEW_PERM4( 1000 ); - InitGlobalBag( &TmpPerm, "permutation: buffer" ); + InitGlobalBag( &TmpPerm, "src/permutat.c:TmpPerm" ); + if ( ! SyRestoring ) { + TmpPerm = NEW_PERM4( 1000 ); + } /* make the identity permutation */ - IdentityPerm = NEW_PERM2( 0 ); - InitGlobalBag( &IdentityPerm, "permutation: ()" ); - + InitGlobalBag( &IdentityPerm, "src/permutat.c:IdentityPerm" ); + if ( ! SyRestoring ) { + IdentityPerm = NEW_PERM2(0); + } +} - /* install the 'ONE' function for permutations */ - OneFuncs[ T_PERM2 ] = OnePerm; - OneFuncs[ T_PERM4 ] = OnePerm; - /* install the 'INV' function for permutations */ - InvFuncs[ T_PERM2 ] = InvPerm; - InvFuncs[ T_PERM4 ] = InvPerm; +/**************************************************************************** +** +*F CheckPermutat() . . . check the initialisation of the permutation package +*/ +void CheckPermutat ( void ) +{ + SET_REVISION( "permutat_c", Revision_permutat_c ); + SET_REVISION( "permutat_h", Revision_permutat_h ); } diff --git a/src/permutat.h b/src/permutat.h index 825a8710d1..50414da836 100644 --- a/src/permutat.h +++ b/src/permutat.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A permutat.h GAP source Martin Schoenert +*W permutat.h GAP source Martin Schoenert ** & Alice Niemeyer ** *H @(#)$Id$ @@ -10,13 +10,14 @@ ** This file defines the functions for permutations (small and large). */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_permutat_h = +SYS_CONST char * Revision_permutat_h = "@(#)$Id$"; #endif /**************************************************************************** ** + *F NEW_PERM2() . . . . . . . . . . . . make a new (small) permutation *F DEG_PERM2() . . . . . . . . . . . . . degree of (small) permutation *F ADDR_PERM2() . . . . . . . absolute address of (small) permutation @@ -65,6 +66,31 @@ extern Obj OnSetsPerm ( Obj perm ); +/**************************************************************************** +** +*F Array2Perm( ) . . . . . . . . . convert array of cycles into perm +*/ +extern Obj Array2Perm ( + Obj array ); + + +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + +*F SetupPermutat() . . . . . . . . . . . initializes the permutation package +** +** Is called during the initialization to initialize the permutation +** package. +*/ +extern void SetupPermutat ( void ); + + /**************************************************************************** ** *F InitPermutat() . . . . . . . . . . . initializes the permutation package @@ -72,7 +98,18 @@ extern Obj OnSetsPerm ( ** Is called during the initialization to initialize the permutation ** package. */ -extern void InitPermutat ( void ); +extern void InitPermutat ( void ); + + +/**************************************************************************** +** +*F CheckPermutat() . . . check the initialisation of the permutation package +*/ +extern void CheckPermutat ( void ); +/**************************************************************************** +** +*E permutat.c . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/plist.c b/src/plist.c index 371f48fa56..2ae20e8f00 100644 --- a/src/plist.c +++ b/src/plist.c @@ -33,32 +33,39 @@ ** This package also contains the list functions for plain lists, i.e., the ** functions called from the generic lists package. */ -char * Revision_plist_c = +#include "system.h" /* system dependent part */ + +SYS_CONST char * Revision_plist_c = "@(#)$Id$"; -#include "system.h" /* system dependent functions */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ -#include "gasman.h" /* NewBag, ResizeBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, SIZE_OBJ, ... */ -#include "scanner.h" /* Pr */ +#include "gap.h" /* error handling, initialisation */ -#include "gvars.h" /* AssGVar, GVarName */ +#include "gvars.h" /* global variables */ #include "calls.h" /* generic call mechanism */ -#include "opers.h" /* generic operations package */ +#include "opers.h" /* generic operations */ + +#include "ariths.h" /* basic arithmetic */ + +#include "bool.h" /* booleans */ -#include "ariths.h" /* generic operations package */ -#include "lists.h" /* generic list package */ +#include "gap.h" /* error handling, initialisation */ -#include "bool.h" /* True, False */ +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ +#include "lists.h" /* generic lists */ #define INCLUDE_DECLARATION_PART -#include "plist.h" /* declaration part of the package */ +#include "plist.h" /* plain lists */ #undef INCLUDE_DECLARATION_PART +#include "range.h" /* ranges */ +#include "string.h" /* strings */ -#include "range.h" /* GET_LEN_RANGE, GET_LOW_RANGE,...*/ - -#include "gap.h" /* Error */ +#include "saveload.h" /* saving and loading */ /**************************************************************************** @@ -170,45 +177,7 @@ Int GrowPlist ( /**************************************************************************** ** -*F IS_IMM_PLIST( ) . . . . . . . . . . . is a plain listy immutable -** -** 'IS_IMM_PLIST' is defined in the declaration part of this package as -** follows -** -#define IS_IMM_PLIST(list) ((TNUM_OBJ(list) - T_PLIST) % 2) -*/ - -/**************************************************************************** -** - -*F SetFilterPlist( , ) . . . . . . . . . . . . . . set a feature -*/ -void SetFilterPlist ( - Obj list, - Obj fil ) -{ - Int type; - - /* is strictly sorted plain list */ - type = TNUM_OBJ(list); - if ( fil == IsSSortListProp ) { - if ( T_PLIST_HOM <= type && type <= T_PLIST_CYC_SSORT+IMMUTABLE ) { - RetypeBag( list, type + (T_PLIST_HOM_SSORT-T_PLIST_HOM) ); - } - } - - /* is plain list with is not sorted */ - else if ( fil == IsNSortListProp ) { - if ( T_PLIST_HOM <= type && type <= T_PLIST_CYC_SSORT+IMMUTABLE ) { - RetypeBag( list, type + (T_PLIST_HOM_NSORT-T_PLIST_HOM) ); - } - } -} - - -/**************************************************************************** -** *F TypePlist() . . . . . . . . . . . . . . . . . kind of a plain list ** ** 'TypePlist' returns the kind of the plain list . @@ -231,7 +200,6 @@ Obj TYPE_LIST_HOM; Int KTNumPlist ( Obj list ) { - Int isImm = 0; /* is immutable */ Int isHom = 1; /* is homogeneous */ Int isDense = 1; /* is dense */ Int isTable = 0; /* are s elms equal length */ @@ -242,20 +210,21 @@ Int KTNumPlist ( Obj elm; /* one element of */ Int i; /* loop variable */ Int testing; /* to test or not to test type */ - - /* find out whether the list is immutable */ - isImm = IS_IMM_PLIST(list); - - /* get the length of the list */ - lenList = LEN_PLIST( list ); + Int res; /* result */ /* if list has `TESTING' keep that */ testing = IS_TESTING_PLIST(list) ? TESTING : 0; + /* get the length of the list */ + lenList = LEN_PLIST(list); + /* special case for empty list */ if ( lenList == 0 ) { - RetypeBag( list, T_PLIST_EMPTY + isImm + testing ); - return T_PLIST_EMPTY + isImm; + UNMARK_LIST( list, testing ); + SET_FILT_LIST( list, FN_IS_EMPTY ); + res = TNUM_OBJ(list); + MARK_LIST( list, testing ); + return res; } /* look at the first element */ @@ -264,14 +233,14 @@ Int KTNumPlist ( isDense = 0; } else if ( IS_TESTING_PLIST(elm) ) { - isHom = 0; - areMut = IS_MUTABLE_OBJ(elm); - isTable = 0; + isHom = 0; + areMut = IS_MUTABLE_PLIST(elm); + isTable = 0; } else { family = FAMILY_TYPE( TYPE_OBJ(elm) ); isHom = 1; - areMut = IS_MUTABLE_OBJ( elm ); + areMut = IS_MUTABLE_OBJ(elm); if ( IS_HOMOG_LIST(elm) ) { isTable = 1; len = LEN_LIST(elm); @@ -284,33 +253,47 @@ Int KTNumPlist ( if ( elm == 0 ) { isDense = 0; } + else if ( IS_TESTING_PLIST(elm) ) { + isHom = 0; + areMut = (areMut || IS_MUTABLE_PLIST(elm)); + isTable = 0; + } else { isHom = (isHom && family == FAMILY_TYPE( TYPE_OBJ(elm) )); - areMut = (areMut || IS_MUTABLE_OBJ( elm )); + areMut = (areMut || IS_MUTABLE_OBJ(elm)); isTable = (isTable && IS_LIST(elm) && LEN_LIST(elm) == len); } } + for ( ; isDense && i <= lenList; i++ ) { + elm = ELM_PLIST( list, i ); + if ( elm == 0 ) { + isDense = 0; + } + } /* set the appropriate flags (not the hom. flag if elms are mutable) */ + UNMARK_LIST( list, testing ); if ( ! isDense ) { - RetypeBag( list, T_PLIST_NDENSE + isImm + testing ); - return T_PLIST_NDENSE + isImm; + SET_FILT_LIST( list, FN_IS_NDENSE ); + res = T_PLIST_NDENSE; } else if ( isDense && ! isHom ) { - RetypeBag( list, areMut ? T_PLIST_DENSE + isImm + testing - : T_PLIST_DENSE_NHOM + isImm + testing ); - return T_PLIST_DENSE_NHOM + isImm; + SET_FILT_LIST( list, FN_IS_DENSE ); + if ( ! areMut ) + SET_FILT_LIST( list, FN_IS_NHOMOG ); + res = T_PLIST_DENSE_NHOM; } else if ( isDense && isHom && ! isTable ) { - RetypeBag( list, areMut ? T_PLIST_DENSE + isImm + testing - : T_PLIST_HOM + isImm + testing ); - return T_PLIST_HOM + isImm; + SET_FILT_LIST( list, areMut ? FN_IS_DENSE : FN_IS_HOMOG ); + res = T_PLIST_HOM; } else /* if ( isDense && isHom && isTable ) */ { - RetypeBag( list, areMut ? T_PLIST_DENSE + isImm + testing - : T_PLIST_TAB + isImm + testing ); - return T_PLIST_TAB + isImm; + SET_FILT_LIST( list, areMut ? FN_IS_DENSE : FN_IS_TABLE ); + res = T_PLIST_TAB; } + res = res + ( IS_MUTABLE_OBJ(list) ? 0 : IMMUTABLE ); + MARK_LIST( list, testing ); + return res; } Obj TypePlist ( @@ -322,11 +305,9 @@ Obj TypePlist ( Obj kinds; /* kinds list of */ /* recursion is possible for this type of list */ - RetypeBag( list, TNUM_OBJ(list) + TESTING ); - - /* get the kind type */ + MARK_LIST( list, TESTING ); ktype = KTNumPlist( list ); - RetypeBag( list, TNUM_OBJ(list) - TESTING ); + UNMARK_LIST( list, TESTING ); /* handle special cases */ if ( ktype == T_PLIST_NDENSE ) { @@ -349,7 +330,7 @@ Obj TypePlist ( } /* handle homogeneous list */ - else if ( ktype >= T_PLIST_HOM ) { + else if ( HasFiltListTNums[ktype][FN_IS_HOMOG] ) { /* get the family of the elements */ family = FAMILY_TYPE( TYPE_OBJ( ELM_PLIST(list,1) ) ); @@ -374,7 +355,7 @@ Obj TypePlist ( else { ErrorQuit( "Panic: strange kind type '%s' ('%d')", - (Int)(InfoBags[TNUM_OBJ(list)].name), (Int)(TNUM_OBJ(list)) ); + (Int)TNAM_OBJ(list), (Int)(TNUM_OBJ(list)) ); return 0; } @@ -494,7 +475,7 @@ Obj ShallowCopyPlist ( /* make the new object and copy the contents */ len = LEN_PLIST(list); - if ( IS_IMM_PLIST(list) ) { + if ( ! IS_MUTABLE_PLIST(list) ) { new = NEW_PLIST( TNUM_OBJ(list) - IMMUTABLE, len ); } else { @@ -558,7 +539,7 @@ Obj CopyPlist ( CHANGED_BAG( list ); /* now it is copied */ - RetypeBag( list, TNUM_OBJ(list) + COPYING ); + MARK_LIST( list, COPYING ); /* copy the subvalues */ for ( i = 1; i <= LEN_PLIST(copy); i++ ) { @@ -609,7 +590,7 @@ void CleanPlistCopy ( ADDR_OBJ(list)[0] = ADDR_OBJ( ADDR_OBJ(list)[0] )[0]; /* now it is cleaned */ - RetypeBag( list, TNUM_OBJ(list) - COPYING ); + UNMARK_LIST( list, COPYING ); /* clean the subvalues */ for ( i = 1; i <= LEN_PLIST(list); i++ ) { @@ -1218,7 +1199,7 @@ Obj ElmsPlistDense ( /**************************************************************************** ** -*F UnbPlist(,) . . . . . . . unbind an element from a plain list +*F UnbPlist( , ) . . . . . . unbind an element from a plain list ** ** 'UnbPlist' unbinds the element at position from the plain list ** . It is the responsibility of the caller to ensure that is @@ -1226,19 +1207,19 @@ Obj ElmsPlistDense ( ** ** 'UnbPlist' is the function in 'UnbListFuncs' for plain lists. */ -void UnbPlist ( +void UnbPlist ( Obj list, Int pos ) { /* if is less than the length, convert to plain list and unbind */ if ( pos < LEN_PLIST( list ) ) { - RetypeBag( list, T_PLIST_NDENSE ); + RESET_FILT_LIST( list, FN_IS_DENSE ); SET_ELM_PLIST( list, pos, 0 ); } /* if is equal to the length, unbind and compute new length */ else if ( pos == LEN_PLIST( list ) ) { - RetypeBag( list, T_PLIST ); + CLEAR_FILTS_LIST(list); SET_ELM_PLIST( list, pos, 0 ); while ( 1 <= pos && ELM_PLIST( list, pos ) == 0 ) { pos--; } SET_LEN_PLIST( list, pos ); @@ -1296,7 +1277,7 @@ void AssPlistXXX ( Obj val ) { /* the list will probably loose its flags/properties */ - RetypeBag( list, T_PLIST ); + CLEAR_FILTS_LIST(list); /* resize the list if necessary */ if ( LEN_PLIST( list ) < pos ) { @@ -1427,7 +1408,7 @@ void AsssPlistXXX ( Obj vals ) { /* the list will probably loose its flags/properties */ - RetypeBag( list, T_PLIST ); + CLEAR_FILTS_LIST(list); /* and delegate */ AsssPlist( list, poss, vals ); @@ -1465,7 +1446,7 @@ Int IsDensePlist ( /* special case for empty list */ if ( lenList == 0 ) { - RetypeBag( list, T_PLIST_EMPTY + IS_IMM_PLIST(list) ); + SET_FILT_LIST( list, FN_IS_EMPTY ); return 1L; } @@ -1476,7 +1457,7 @@ Int IsDensePlist ( } /* set the dense flag (even if the elements are mutable) */ - RetypeBag( list, T_PLIST_DENSE + IS_IMM_PLIST(list) ); + SET_FILT_LIST( list, FN_IS_DENSE ); /* no hole found */ return 1L; @@ -1577,7 +1558,7 @@ Int IsSSortPlist ( /* special case for the empty list */ if ( lenList == 0 ) { - RetypeBag( list, T_PLIST_EMPTY + IS_IMM_PLIST(list) ); + SET_FILT_LIST( list, FN_IS_EMPTY ); return 2L; } @@ -1604,7 +1585,7 @@ Int IsSSortPlistHom ( /* special case for the empty list */ if ( lenList == 0 ) { - RetypeBag( list, T_PLIST_EMPTY + IS_IMM_PLIST(list) ); + SET_FILT_LIST( list, FN_IS_EMPTY ); return 2L; } @@ -1624,13 +1605,13 @@ Int IsSSortPlistHom ( /* set the flag (unless the elements are mutable) */ if ( lenList < i ) { if ( ! areMut ) { - SetFilterPlist( list, IsSSortListProp ); + SET_FILT_LIST( list, FN_IS_SSORT ); } return 2L; } else { if ( ! areMut ) { - SetFilterPlist( list, IsNSortListProp ); + SET_FILT_LIST( list, FN_IS_NSORT ); } return 0L; } @@ -1789,15 +1770,50 @@ void PlainPlist ( return; } +/**************************************************************************** +** +*F SavePlist( ) +** +*/ + +void SavePlist( Obj list ) +{ + UInt i; + SaveUInt(LEN_PLIST(list)); + for (i = 1; i <= LEN_PLIST(list); i++) + SaveSubObj(ELM_PLIST(list,i)); + return; +} + +/**************************************************************************** +** +*F LoadPlist( ) +** +*/ + +void LoadPlist( Obj list ) +{ + UInt i; + SET_LEN_PLIST(list, LoadUInt()); + for (i = 1; i <= LEN_PLIST(list); i++) + SET_ELM_PLIST(list,i, LoadSubObj()); + return; +} + /**************************************************************************** ** -*F InitPlist() . . . . . . . . . . . . . . . . . initialize the list package +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** ** -** Is called during the initialization to initialize the list package. + +*F SetupPlist(). . . . . . . . . . . . . . initialize the plain list package */ -void InitPlist ( void ) +void SetupPlist ( void ) { UInt t1, t2; /* loop variables */ @@ -1807,179 +1823,983 @@ void InitPlist ( void ) InitMarkFuncBags( t1 +IMMUTABLE , MarkAllSubBags ); InitMarkFuncBags( t1 +COPYING , MarkAllSubBags ); InitMarkFuncBags( t1 +IMMUTABLE +COPYING , MarkAllSubBags ); + SaveObjFuncs[ t1 ] = SavePlist; + SaveObjFuncs[ t1 + IMMUTABLE ] = SavePlist; + LoadObjFuncs[ t1 ] = LoadPlist; + LoadObjFuncs[ t1 + IMMUTABLE ] = LoadPlist; } /* install the names */ - InfoBags[ T_PLIST ].name - = "list (plain)"; - InfoBags[ T_PLIST +IMMUTABLE ].name - = "list (plain,immutable)"; - InfoBags[ T_PLIST +COPYING ].name - = "list (plain,copied)"; - InfoBags[ T_PLIST +IMMUTABLE +COPYING ].name - = "list (plain,immutable,copied)"; - - InfoBags[ T_PLIST_NDENSE ].name - = "list (plain,ndense)"; - InfoBags[ T_PLIST_NDENSE +IMMUTABLE ].name - = "list (plain,ndense,immutable)"; - InfoBags[ T_PLIST_NDENSE +COPYING ].name - = "list (plain,ndense,copied)"; - InfoBags[ T_PLIST_NDENSE +IMMUTABLE +COPYING ].name - = "list (plain,ndense,immutable,copied)"; - - InfoBags[ T_PLIST_DENSE ].name - = "list (plain,dense)"; - InfoBags[ T_PLIST_DENSE +IMMUTABLE ].name - = "list (plain,dense,immutable)"; - InfoBags[ T_PLIST_DENSE +COPYING ].name - = "list (plain,dense,copied)"; - InfoBags[ T_PLIST_DENSE +IMMUTABLE +COPYING ].name - = "list (plain,dense,immutable,copied)"; - - InfoBags[ T_PLIST_DENSE_NHOM ].name - = "list (plain,dense,nhom)"; - InfoBags[ T_PLIST_DENSE_NHOM +IMMUTABLE ].name - = "list (plain,dense,nhom,immutable)"; - InfoBags[ T_PLIST_DENSE_NHOM +COPYING ].name - = "list (plain,dense,nhom,copied)"; - InfoBags[ T_PLIST_DENSE_NHOM +IMMUTABLE +COPYING ].name - = "list (plain,dense,nhom,immutable,copied)"; - - InfoBags[ T_PLIST_EMPTY ].name - = "list (plain,empty)"; - InfoBags[ T_PLIST_EMPTY +IMMUTABLE ].name - = "list (plain,empty,immutable)"; - InfoBags[ T_PLIST_EMPTY +COPYING ].name - = "list (plain,empty,copied)"; - InfoBags[ T_PLIST_EMPTY +IMMUTABLE +COPYING ].name - = "list (plain,empty,immutable,copied)"; - - InfoBags[ T_PLIST_HOM ].name - = "list (plain,hom)"; - InfoBags[ T_PLIST_HOM +IMMUTABLE ].name - = "list (plain,hom,immutable)"; - InfoBags[ T_PLIST_HOM +COPYING ].name - = "list (plain,hom,copied)"; - InfoBags[ T_PLIST_HOM +IMMUTABLE +COPYING ].name - = "list (plain,hom,immutable,copied)"; - - InfoBags[ T_PLIST_HOM_NSORT ].name - = "list (plain,hom,nsort)"; - InfoBags[ T_PLIST_HOM_NSORT +IMMUTABLE ].name - = "list (plain,hom,nsort,immutable)"; - InfoBags[ T_PLIST_HOM_NSORT +COPYING ].name - = "list (plain,hom,nsort,copied)"; - InfoBags[ T_PLIST_HOM_NSORT +IMMUTABLE +COPYING ].name - = "list (plain,hom,nsort,immutable,copied)"; - - InfoBags[ T_PLIST_HOM_SSORT ].name - = "list (plain,hom,ssort)"; - InfoBags[ T_PLIST_HOM_SSORT +IMMUTABLE ].name - = "list (plain,hom,ssort,immutable)"; - InfoBags[ T_PLIST_HOM_SSORT +COPYING ].name - = "list (plain,hom,ssort,copied)"; - InfoBags[ T_PLIST_HOM_SSORT +IMMUTABLE +COPYING ].name - = "list (plain,hom,ssort,immutable,copied)"; - - InfoBags[ T_PLIST_TAB ].name - = "list (plain,table)"; - InfoBags[ T_PLIST_TAB +IMMUTABLE ].name - = "list (plain,table,immutable)"; - InfoBags[ T_PLIST_TAB +COPYING ].name - = "list (plain,table,copied)"; - InfoBags[ T_PLIST_TAB +IMMUTABLE +COPYING ].name - = "list (plain,table,immutable,copied)"; - - InfoBags[ T_PLIST_TAB_NSORT ].name - = "list (plain,table,nsort)"; - InfoBags[ T_PLIST_TAB_NSORT +IMMUTABLE ].name - = "list (plain,table,nsort,immutable)"; - InfoBags[ T_PLIST_TAB_NSORT +COPYING ].name - = "list (plain,table,nsort,copied)"; - InfoBags[ T_PLIST_TAB_NSORT +IMMUTABLE +COPYING ].name - = "list (plain,table,nsort,immutable,copied)"; - - InfoBags[ T_PLIST_TAB_SSORT ].name - = "list (plain,table,ssort)"; - InfoBags[ T_PLIST_TAB_SSORT +IMMUTABLE ].name - = "list (plain,table,ssort,immutable)"; - InfoBags[ T_PLIST_TAB_SSORT +COPYING ].name - = "list (plain,table,ssort,copied)"; - InfoBags[ T_PLIST_TAB_SSORT +IMMUTABLE +COPYING ].name - = "list (plain,table,ssort,immutable,copied)"; - - InfoBags[ T_PLIST_CYC ].name - = "list (plain,cyc)"; - InfoBags[ T_PLIST_CYC +IMMUTABLE ].name - = "list (plain,cyc,immutable)"; - InfoBags[ T_PLIST_CYC +COPYING ].name - = "list (plain,cyc,copied)"; - InfoBags[ T_PLIST_CYC +IMMUTABLE +COPYING ].name - = "list (plain,cyc,immutable,copied)"; - - InfoBags[ T_PLIST_CYC_NSORT ].name - = "list (plain,cyc,nsort)"; - InfoBags[ T_PLIST_CYC_NSORT +IMMUTABLE ].name - = "list (plain,cyc,nsort,immutable)"; - InfoBags[ T_PLIST_CYC_NSORT +COPYING ].name - = "list (plain,cyc,nsort,copied)"; - InfoBags[ T_PLIST_CYC_NSORT +IMMUTABLE +COPYING ].name - = "list (plain,cyc,nsort,immutable,copied)"; - - InfoBags[ T_PLIST_CYC_SSORT ].name - = "list (plain,cyc,ssort)"; - InfoBags[ T_PLIST_CYC_SSORT +IMMUTABLE ].name - = "list (plain,cyc,ssort,immutable)"; - InfoBags[ T_PLIST_CYC_SSORT +COPYING ].name - = "list (plain,cyc,ssort,copied)"; - InfoBags[ T_PLIST_CYC_SSORT +IMMUTABLE +COPYING ].name - = "list (plain,cyc,ssort,immutable,copied)"; - - - /* get the kinds (resp. kind functions) */ - ImportGVarFromLibrary( "TYPE_LIST_NDENSE_MUTABLE", - &TYPE_LIST_NDENSE_MUTABLE ); - - ImportGVarFromLibrary( "TYPE_LIST_NDENSE_IMMUTABLE", - &TYPE_LIST_NDENSE_IMMUTABLE ); - - ImportGVarFromLibrary( "TYPE_LIST_DENSE_NHOM_MUTABLE", - &TYPE_LIST_DENSE_NHOM_MUTABLE ); - - ImportGVarFromLibrary( "TYPE_LIST_DENSE_NHOM_IMMUTABLE", - &TYPE_LIST_DENSE_NHOM_IMMUTABLE ); - - ImportGVarFromLibrary( "TYPE_LIST_EMPTY_MUTABLE", - &TYPE_LIST_EMPTY_MUTABLE ); - - ImportGVarFromLibrary( "TYPE_LIST_EMPTY_IMMUTABLE", - &TYPE_LIST_EMPTY_IMMUTABLE ); - - ImportFuncFromLibrary( "TYPE_LIST_HOM", - &TYPE_LIST_HOM ); - - - /* install the kind methods */ - TypeObjFuncs[ T_PLIST ] = TypePlist; - TypeObjFuncs[ T_PLIST +IMMUTABLE ] = TypePlist; - TypeObjFuncs[ T_PLIST_NDENSE ] = TypePlistNDenseMut; - TypeObjFuncs[ T_PLIST_NDENSE +IMMUTABLE ] = TypePlistNDenseImm; - TypeObjFuncs[ T_PLIST_DENSE ] = TypePlistDenseMut; - TypeObjFuncs[ T_PLIST_DENSE +IMMUTABLE ] = TypePlistDenseImm; - TypeObjFuncs[ T_PLIST_DENSE_NHOM ] = TypePlistDenseNHomMut; - TypeObjFuncs[ T_PLIST_DENSE_NHOM +IMMUTABLE ] = TypePlistDenseNHomImm; - TypeObjFuncs[ T_PLIST_EMPTY ] = TypePlistEmptyMut; - TypeObjFuncs[ T_PLIST_EMPTY +IMMUTABLE ] = TypePlistEmptyImm; - for ( t1 = T_PLIST_HOM; t1 <= T_PLIST_TAB_SSORT; t1 += 2 ) { - TypeObjFuncs[ t1 ] = TypePlistHom; - TypeObjFuncs[ t1 +IMMUTABLE ] = TypePlistHom; - } - for ( t1 = T_PLIST_CYC; t1 <= T_PLIST_CYC_SSORT; t1 += 2 ) { - TypeObjFuncs[ t1 ] = TypePlistCyc; - TypeObjFuncs[ t1 +IMMUTABLE ] = TypePlistCyc; - } + InfoBags[ T_PLIST ].name = "list (plain)"; + InfoBags[ T_PLIST +IMMUTABLE ].name = "list (plain,imm)"; + InfoBags[ T_PLIST +COPYING ].name = "list (plain,copied)"; + InfoBags[ T_PLIST +IMMUTABLE +COPYING ].name = "list (plain,imm,copied)"; + + InfoBags[ T_PLIST_NDENSE ].name = "list (plain,ndense)"; + InfoBags[ T_PLIST_NDENSE +IMMUTABLE ].name = "list (plain,ndense,imm)"; + InfoBags[ T_PLIST_NDENSE +COPYING ].name = "list (plain,ndense,copied)"; + InfoBags[ T_PLIST_NDENSE +IMMUTABLE +COPYING ].name = "list (plain,ndense,imm,copied)"; + + InfoBags[ T_PLIST_DENSE ].name = "list (plain,dense)"; + InfoBags[ T_PLIST_DENSE +IMMUTABLE ].name = "list (plain,dense,imm)"; + InfoBags[ T_PLIST_DENSE +COPYING ].name = "list (plain,dense,copied)"; + InfoBags[ T_PLIST_DENSE +IMMUTABLE +COPYING ].name = "list (plain,dense,imm,copied)"; + + InfoBags[ T_PLIST_DENSE_NHOM ].name = "list (plain,dense,nhom)"; + InfoBags[ T_PLIST_DENSE_NHOM +IMMUTABLE ].name = "list (plain,dense,nhom,imm)"; + InfoBags[ T_PLIST_DENSE_NHOM +COPYING ].name = "list (plain,dense,nhom,copied)"; + InfoBags[ T_PLIST_DENSE_NHOM +IMMUTABLE +COPYING ].name = "list (plain,dense,nhom,imm,copied)"; + + InfoBags[ T_PLIST_EMPTY ].name = "list (plain,empty)"; + InfoBags[ T_PLIST_EMPTY +IMMUTABLE ].name = "list (plain,empty,imm)"; + InfoBags[ T_PLIST_EMPTY +COPYING ].name = "list (plain,empty,copied)"; + InfoBags[ T_PLIST_EMPTY +IMMUTABLE +COPYING ].name = "list (plain,empty,imm,copied)"; + + InfoBags[ T_PLIST_HOM ].name = "list (plain,hom)"; + InfoBags[ T_PLIST_HOM +IMMUTABLE ].name = "list (plain,hom,imm)"; + InfoBags[ T_PLIST_HOM +COPYING ].name = "list (plain,hom,copied)"; + InfoBags[ T_PLIST_HOM +IMMUTABLE +COPYING ].name = "list (plain,hom,imm,copied)"; + + InfoBags[ T_PLIST_HOM_NSORT ].name = "list (plain,hom,nsort)"; + InfoBags[ T_PLIST_HOM_NSORT +IMMUTABLE ].name = "list (plain,hom,nsort,imm)"; + InfoBags[ T_PLIST_HOM_NSORT +COPYING ].name = "list (plain,hom,nsort,copied)"; + InfoBags[ T_PLIST_HOM_NSORT +IMMUTABLE +COPYING ].name = "list (plain,hom,nsort,imm,copied)"; + + InfoBags[ T_PLIST_HOM_SSORT ].name = "list (plain,hom,ssort)"; + InfoBags[ T_PLIST_HOM_SSORT +IMMUTABLE ].name = "list (plain,hom,ssort,imm)"; + InfoBags[ T_PLIST_HOM_SSORT +COPYING ].name = "list (plain,hom,ssort,copied)"; + InfoBags[ T_PLIST_HOM_SSORT +IMMUTABLE +COPYING ].name = "list (plain,hom,ssort,imm,copied)"; + + InfoBags[ T_PLIST_TAB ].name = "list (plain,table)"; + InfoBags[ T_PLIST_TAB +IMMUTABLE ].name = "list (plain,table,imm)"; + InfoBags[ T_PLIST_TAB +COPYING ].name = "list (plain,table,copied)"; + InfoBags[ T_PLIST_TAB +IMMUTABLE +COPYING ].name = "list (plain,table,imm,copied)"; + + InfoBags[ T_PLIST_TAB_NSORT ].name = "list (plain,table,nsort)"; + InfoBags[ T_PLIST_TAB_NSORT +IMMUTABLE ].name = "list (plain,table,nsort,imm)"; + InfoBags[ T_PLIST_TAB_NSORT +COPYING ].name = "list (plain,table,nsort,copied)"; + InfoBags[ T_PLIST_TAB_NSORT +IMMUTABLE +COPYING ].name = "list (plain,table,nsort,imm,copied)"; + + InfoBags[ T_PLIST_TAB_SSORT ].name = "list (plain,table,ssort)"; + InfoBags[ T_PLIST_TAB_SSORT +IMMUTABLE ].name = "list (plain,table,ssort,imm)"; + InfoBags[ T_PLIST_TAB_SSORT +COPYING ].name = "list (plain,table,ssort,copied)"; + InfoBags[ T_PLIST_TAB_SSORT +IMMUTABLE +COPYING ].name = "list (plain,table,ssort,imm,copied)"; + + InfoBags[ T_PLIST_CYC ].name = "list (plain,cyc)"; + InfoBags[ T_PLIST_CYC +IMMUTABLE ].name = "list (plain,cyc,imm)"; + InfoBags[ T_PLIST_CYC +COPYING ].name = "list (plain,cyc,copied)"; + InfoBags[ T_PLIST_CYC +IMMUTABLE +COPYING ].name = "list (plain,cyc,imm,copied)"; + + InfoBags[ T_PLIST_CYC_NSORT ].name = "list (plain,cyc,nsort)"; + InfoBags[ T_PLIST_CYC_NSORT +IMMUTABLE ].name = "list (plain,cyc,nsort,imm)"; + InfoBags[ T_PLIST_CYC_NSORT +COPYING ].name = "list (plain,cyc,nsort,copied)"; + InfoBags[ T_PLIST_CYC_NSORT +IMMUTABLE +COPYING ].name = "list (plain,cyc,nsort,imm,copied)"; + + InfoBags[ T_PLIST_CYC_SSORT ].name = "list (plain,cyc,ssort)"; + InfoBags[ T_PLIST_CYC_SSORT +IMMUTABLE ].name = "list (plain,cyc,ssort,imm)"; + InfoBags[ T_PLIST_CYC_SSORT +COPYING ].name = "list (plain,cyc,ssort,copied)"; + InfoBags[ T_PLIST_CYC_SSORT +IMMUTABLE +COPYING ].name = "list (plain,cyc,ssort,imm,copied)"; + + + /* install the filter and property maps */ + ClearFiltsTNums [T_PLIST ] = T_PLIST; + ClearFiltsTNums [T_PLIST +IMMUTABLE] = T_PLIST +IMMUTABLE; + ClearFiltsTNums [T_PLIST_NDENSE ] = T_PLIST; + ClearFiltsTNums [T_PLIST_NDENSE +IMMUTABLE] = T_PLIST +IMMUTABLE; + ClearFiltsTNums [T_PLIST_DENSE ] = T_PLIST; + ClearFiltsTNums [T_PLIST_DENSE +IMMUTABLE] = T_PLIST +IMMUTABLE; + ClearFiltsTNums [T_PLIST_DENSE_NHOM ] = T_PLIST; + ClearFiltsTNums [T_PLIST_DENSE_NHOM+IMMUTABLE] = T_PLIST +IMMUTABLE; + ClearFiltsTNums [T_PLIST_EMPTY ] = T_PLIST; + ClearFiltsTNums [T_PLIST_EMPTY +IMMUTABLE] = T_PLIST +IMMUTABLE; + ClearFiltsTNums [T_PLIST_HOM ] = T_PLIST; + ClearFiltsTNums [T_PLIST_HOM +IMMUTABLE] = T_PLIST +IMMUTABLE; + ClearFiltsTNums [T_PLIST_HOM_NSORT ] = T_PLIST; + ClearFiltsTNums [T_PLIST_HOM_NSORT +IMMUTABLE] = T_PLIST +IMMUTABLE; + ClearFiltsTNums [T_PLIST_HOM_SSORT ] = T_PLIST; + ClearFiltsTNums [T_PLIST_HOM_SSORT +IMMUTABLE] = T_PLIST +IMMUTABLE; + ClearFiltsTNums [T_PLIST_TAB ] = T_PLIST; + ClearFiltsTNums [T_PLIST_TAB +IMMUTABLE] = T_PLIST +IMMUTABLE; + ClearFiltsTNums [T_PLIST_TAB_NSORT ] = T_PLIST; + ClearFiltsTNums [T_PLIST_TAB_NSORT +IMMUTABLE] = T_PLIST +IMMUTABLE; + ClearFiltsTNums [T_PLIST_TAB_SSORT ] = T_PLIST; + ClearFiltsTNums [T_PLIST_TAB_SSORT +IMMUTABLE] = T_PLIST +IMMUTABLE; + ClearFiltsTNums [T_PLIST_CYC ] = T_PLIST; + ClearFiltsTNums [T_PLIST_CYC +IMMUTABLE] = T_PLIST +IMMUTABLE; + ClearFiltsTNums [T_PLIST_CYC_NSORT ] = T_PLIST; + ClearFiltsTNums [T_PLIST_CYC_NSORT +IMMUTABLE] = T_PLIST +IMMUTABLE; + ClearFiltsTNums [T_PLIST_CYC_SSORT ] = T_PLIST; + ClearFiltsTNums [T_PLIST_CYC_SSORT +IMMUTABLE] = T_PLIST +IMMUTABLE; + + + /* mutable plain lists */ + HasFiltListTNums [T_PLIST ][FN_IS_MUTABLE] = 1; + HasFiltListTNums [T_PLIST ][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST ][FN_IS_DENSE ] = 0; + HasFiltListTNums [T_PLIST ][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST ][FN_IS_HOMOG ] = 0; + HasFiltListTNums [T_PLIST ][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST ][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_PLIST ][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_PLIST ][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_PLIST ][FN_IS_MUTABLE] = T_PLIST; + SetFiltListTNums [T_PLIST ][FN_IS_EMPTY ] = T_PLIST_EMPTY; + SetFiltListTNums [T_PLIST ][FN_IS_DENSE ] = T_PLIST_DENSE; + SetFiltListTNums [T_PLIST ][FN_IS_NDENSE ] = T_PLIST_NDENSE; + SetFiltListTNums [T_PLIST ][FN_IS_HOMOG ] = T_PLIST_HOM; + SetFiltListTNums [T_PLIST ][FN_IS_NHOMOG ] = T_PLIST; + SetFiltListTNums [T_PLIST ][FN_IS_TABLE ] = T_PLIST_TAB; + SetFiltListTNums [T_PLIST ][FN_IS_SSORT ] = T_PLIST; + SetFiltListTNums [T_PLIST ][FN_IS_NSORT ] = T_PLIST; + + ResetFiltListTNums[T_PLIST ][FN_IS_MUTABLE] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST ][FN_IS_EMPTY ] = T_PLIST; + ResetFiltListTNums[T_PLIST ][FN_IS_DENSE ] = T_PLIST; + ResetFiltListTNums[T_PLIST ][FN_IS_NDENSE ] = T_PLIST; + ResetFiltListTNums[T_PLIST ][FN_IS_HOMOG ] = T_PLIST; + ResetFiltListTNums[T_PLIST ][FN_IS_NHOMOG ] = T_PLIST; + ResetFiltListTNums[T_PLIST ][FN_IS_TABLE ] = T_PLIST; + ResetFiltListTNums[T_PLIST ][FN_IS_SSORT ] = T_PLIST; + ResetFiltListTNums[T_PLIST ][FN_IS_NSORT ] = T_PLIST; + + /* immutable plain lists */ + HasFiltListTNums [T_PLIST +IMMUTABLE][FN_IS_MUTABLE] = 0; + HasFiltListTNums [T_PLIST +IMMUTABLE][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST +IMMUTABLE][FN_IS_DENSE ] = 0; + HasFiltListTNums [T_PLIST +IMMUTABLE][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST +IMMUTABLE][FN_IS_HOMOG ] = 0; + HasFiltListTNums [T_PLIST +IMMUTABLE][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST +IMMUTABLE][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_PLIST +IMMUTABLE][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_PLIST +IMMUTABLE][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_PLIST +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST; + SetFiltListTNums [T_PLIST +IMMUTABLE][FN_IS_EMPTY ] = T_PLIST_EMPTY +IMMUTABLE; + SetFiltListTNums [T_PLIST +IMMUTABLE][FN_IS_DENSE ] = T_PLIST_DENSE +IMMUTABLE; + SetFiltListTNums [T_PLIST +IMMUTABLE][FN_IS_NDENSE ] = T_PLIST_NDENSE +IMMUTABLE; + SetFiltListTNums [T_PLIST +IMMUTABLE][FN_IS_HOMOG ] = T_PLIST_HOM +IMMUTABLE; + SetFiltListTNums [T_PLIST +IMMUTABLE][FN_IS_NHOMOG ] = T_PLIST +IMMUTABLE; + SetFiltListTNums [T_PLIST +IMMUTABLE][FN_IS_TABLE ] = T_PLIST_TAB +IMMUTABLE; + SetFiltListTNums [T_PLIST +IMMUTABLE][FN_IS_SSORT ] = T_PLIST +IMMUTABLE; + SetFiltListTNums [T_PLIST +IMMUTABLE][FN_IS_NSORT ] = T_PLIST +IMMUTABLE; + + ResetFiltListTNums[T_PLIST +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST +IMMUTABLE][FN_IS_EMPTY ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST +IMMUTABLE][FN_IS_DENSE ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST +IMMUTABLE][FN_IS_NDENSE ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST +IMMUTABLE][FN_IS_HOMOG ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST +IMMUTABLE][FN_IS_NHOMOG ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST +IMMUTABLE][FN_IS_TABLE ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST +IMMUTABLE][FN_IS_SSORT ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST +IMMUTABLE][FN_IS_NSORT ] = T_PLIST +IMMUTABLE; + + /* mutable empty list */ + HasFiltListTNums [T_PLIST_EMPTY ][FN_IS_MUTABLE] = 1; + HasFiltListTNums [T_PLIST_EMPTY ][FN_IS_EMPTY ] = 1; + HasFiltListTNums [T_PLIST_EMPTY ][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_PLIST_EMPTY ][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST_EMPTY ][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_PLIST_EMPTY ][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST_EMPTY ][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_PLIST_EMPTY ][FN_IS_SSORT ] = 1; + HasFiltListTNums [T_PLIST_EMPTY ][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_PLIST_EMPTY ][FN_IS_MUTABLE] = T_PLIST_EMPTY; + SetFiltListTNums [T_PLIST_EMPTY ][FN_IS_EMPTY ] = T_PLIST_EMPTY; + SetFiltListTNums [T_PLIST_EMPTY ][FN_IS_DENSE ] = T_PLIST_EMPTY; + SetFiltListTNums [T_PLIST_EMPTY ][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_PLIST_EMPTY ][FN_IS_HOMOG ] = T_PLIST_EMPTY; + SetFiltListTNums [T_PLIST_EMPTY ][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_PLIST_EMPTY ][FN_IS_TABLE ] = -1; + SetFiltListTNums [T_PLIST_EMPTY ][FN_IS_SSORT ] = T_PLIST_EMPTY; + SetFiltListTNums [T_PLIST_EMPTY ][FN_IS_NSORT ] = -1; + + ResetFiltListTNums[T_PLIST_EMPTY ][FN_IS_MUTABLE] = T_PLIST_EMPTY +IMMUTABLE; + ResetFiltListTNums[T_PLIST_EMPTY ][FN_IS_EMPTY ] = T_PLIST; + ResetFiltListTNums[T_PLIST_EMPTY ][FN_IS_DENSE ] = T_PLIST; + ResetFiltListTNums[T_PLIST_EMPTY ][FN_IS_NDENSE ] = T_PLIST_EMPTY; + ResetFiltListTNums[T_PLIST_EMPTY ][FN_IS_HOMOG ] = T_PLIST; + ResetFiltListTNums[T_PLIST_EMPTY ][FN_IS_NHOMOG ] = T_PLIST_EMPTY; + ResetFiltListTNums[T_PLIST_EMPTY ][FN_IS_TABLE ] = T_PLIST_EMPTY; + ResetFiltListTNums[T_PLIST_EMPTY ][FN_IS_SSORT ] = T_PLIST; + ResetFiltListTNums[T_PLIST_EMPTY ][FN_IS_NSORT ] = T_PLIST_EMPTY; + + /* immutable empty list */ + HasFiltListTNums [T_PLIST_EMPTY +IMMUTABLE][FN_IS_MUTABLE] = 0; + HasFiltListTNums [T_PLIST_EMPTY +IMMUTABLE][FN_IS_EMPTY ] = 1; + HasFiltListTNums [T_PLIST_EMPTY +IMMUTABLE][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_PLIST_EMPTY +IMMUTABLE][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST_EMPTY +IMMUTABLE][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_PLIST_EMPTY +IMMUTABLE][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST_EMPTY +IMMUTABLE][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_PLIST_EMPTY +IMMUTABLE][FN_IS_SSORT ] = 1; + HasFiltListTNums [T_PLIST_EMPTY +IMMUTABLE][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_PLIST_EMPTY +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_EMPTY; + SetFiltListTNums [T_PLIST_EMPTY +IMMUTABLE][FN_IS_EMPTY ] = T_PLIST_EMPTY +IMMUTABLE; + SetFiltListTNums [T_PLIST_EMPTY +IMMUTABLE][FN_IS_DENSE ] = T_PLIST_EMPTY +IMMUTABLE; + SetFiltListTNums [T_PLIST_EMPTY +IMMUTABLE][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_PLIST_EMPTY +IMMUTABLE][FN_IS_HOMOG ] = T_PLIST_EMPTY +IMMUTABLE; + SetFiltListTNums [T_PLIST_EMPTY +IMMUTABLE][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_PLIST_EMPTY +IMMUTABLE][FN_IS_TABLE ] = -1; + SetFiltListTNums [T_PLIST_EMPTY +IMMUTABLE][FN_IS_SSORT ] = T_PLIST_EMPTY +IMMUTABLE; + SetFiltListTNums [T_PLIST_EMPTY +IMMUTABLE][FN_IS_NSORT ] = -1; + + ResetFiltListTNums[T_PLIST_EMPTY +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_EMPTY +IMMUTABLE; + ResetFiltListTNums[T_PLIST_EMPTY +IMMUTABLE][FN_IS_EMPTY ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST_EMPTY +IMMUTABLE][FN_IS_DENSE ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST_EMPTY +IMMUTABLE][FN_IS_NDENSE ] = T_PLIST_EMPTY +IMMUTABLE; + ResetFiltListTNums[T_PLIST_EMPTY +IMMUTABLE][FN_IS_HOMOG ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST_EMPTY +IMMUTABLE][FN_IS_NHOMOG ] = T_PLIST_EMPTY +IMMUTABLE; + ResetFiltListTNums[T_PLIST_EMPTY +IMMUTABLE][FN_IS_TABLE ] = T_PLIST_EMPTY +IMMUTABLE; + ResetFiltListTNums[T_PLIST_EMPTY +IMMUTABLE][FN_IS_SSORT ] = T_PLIST; + ResetFiltListTNums[T_PLIST_EMPTY +IMMUTABLE][FN_IS_NSORT ] = T_PLIST_EMPTY +IMMUTABLE; + + /* mutable dense list */ + HasFiltListTNums [T_PLIST_DENSE ][FN_IS_MUTABLE] = 1; + HasFiltListTNums [T_PLIST_DENSE ][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST_DENSE ][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_PLIST_DENSE ][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST_DENSE ][FN_IS_HOMOG ] = 0; + HasFiltListTNums [T_PLIST_DENSE ][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST_DENSE ][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_PLIST_DENSE ][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_PLIST_DENSE ][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_PLIST_DENSE ][FN_IS_MUTABLE] = T_PLIST_DENSE; + SetFiltListTNums [T_PLIST_DENSE ][FN_IS_EMPTY ] = T_PLIST_EMPTY; + SetFiltListTNums [T_PLIST_DENSE ][FN_IS_DENSE ] = T_PLIST_DENSE; + SetFiltListTNums [T_PLIST_DENSE ][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_PLIST_DENSE ][FN_IS_HOMOG ] = T_PLIST_HOM; + SetFiltListTNums [T_PLIST_DENSE ][FN_IS_NHOMOG ] = T_PLIST_DENSE; + SetFiltListTNums [T_PLIST_DENSE ][FN_IS_TABLE ] = T_PLIST_DENSE; + SetFiltListTNums [T_PLIST_DENSE ][FN_IS_SSORT ] = T_PLIST_DENSE; + SetFiltListTNums [T_PLIST_DENSE ][FN_IS_NSORT ] = T_PLIST_DENSE; + + ResetFiltListTNums[T_PLIST_DENSE ][FN_IS_MUTABLE] = T_PLIST_DENSE +IMMUTABLE; + ResetFiltListTNums[T_PLIST_DENSE ][FN_IS_EMPTY ] = T_PLIST_DENSE; + ResetFiltListTNums[T_PLIST_DENSE ][FN_IS_DENSE ] = T_PLIST; + ResetFiltListTNums[T_PLIST_DENSE ][FN_IS_NDENSE ] = T_PLIST_DENSE; + ResetFiltListTNums[T_PLIST_DENSE ][FN_IS_HOMOG ] = T_PLIST_DENSE; + ResetFiltListTNums[T_PLIST_DENSE ][FN_IS_NHOMOG ] = T_PLIST_DENSE; + ResetFiltListTNums[T_PLIST_DENSE ][FN_IS_TABLE ] = T_PLIST_DENSE; + ResetFiltListTNums[T_PLIST_DENSE ][FN_IS_SSORT ] = T_PLIST_DENSE; + ResetFiltListTNums[T_PLIST_DENSE ][FN_IS_NSORT ] = T_PLIST_DENSE; + + /* immutable dense list */ + HasFiltListTNums [T_PLIST_DENSE +IMMUTABLE][FN_IS_MUTABLE] = 0; + HasFiltListTNums [T_PLIST_DENSE +IMMUTABLE][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST_DENSE +IMMUTABLE][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_PLIST_DENSE +IMMUTABLE][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST_DENSE +IMMUTABLE][FN_IS_HOMOG ] = 0; + HasFiltListTNums [T_PLIST_DENSE +IMMUTABLE][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST_DENSE +IMMUTABLE][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_PLIST_DENSE +IMMUTABLE][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_PLIST_DENSE +IMMUTABLE][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_PLIST_DENSE +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_DENSE; + SetFiltListTNums [T_PLIST_DENSE +IMMUTABLE][FN_IS_EMPTY ] = T_PLIST_EMPTY +IMMUTABLE; + SetFiltListTNums [T_PLIST_DENSE +IMMUTABLE][FN_IS_DENSE ] = T_PLIST_DENSE +IMMUTABLE; + SetFiltListTNums [T_PLIST_DENSE +IMMUTABLE][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_PLIST_DENSE +IMMUTABLE][FN_IS_HOMOG ] = T_PLIST_HOM +IMMUTABLE; + SetFiltListTNums [T_PLIST_DENSE +IMMUTABLE][FN_IS_NHOMOG ] = T_PLIST_DENSE_NHOM+IMMUTABLE; + SetFiltListTNums [T_PLIST_DENSE +IMMUTABLE][FN_IS_TABLE ] = T_PLIST_TAB +IMMUTABLE; + SetFiltListTNums [T_PLIST_DENSE +IMMUTABLE][FN_IS_SSORT ] = T_PLIST_DENSE +IMMUTABLE; + SetFiltListTNums [T_PLIST_DENSE +IMMUTABLE][FN_IS_NSORT ] = T_PLIST_DENSE +IMMUTABLE; + + ResetFiltListTNums[T_PLIST_DENSE +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_DENSE +IMMUTABLE; + ResetFiltListTNums[T_PLIST_DENSE +IMMUTABLE][FN_IS_EMPTY ] = T_PLIST_DENSE +IMMUTABLE; + ResetFiltListTNums[T_PLIST_DENSE +IMMUTABLE][FN_IS_DENSE ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST_DENSE +IMMUTABLE][FN_IS_NDENSE ] = T_PLIST_DENSE +IMMUTABLE; + ResetFiltListTNums[T_PLIST_DENSE +IMMUTABLE][FN_IS_HOMOG ] = T_PLIST_DENSE +IMMUTABLE; + ResetFiltListTNums[T_PLIST_DENSE +IMMUTABLE][FN_IS_NHOMOG ] = T_PLIST_DENSE +IMMUTABLE; + ResetFiltListTNums[T_PLIST_DENSE +IMMUTABLE][FN_IS_TABLE ] = T_PLIST_DENSE +IMMUTABLE; + ResetFiltListTNums[T_PLIST_DENSE +IMMUTABLE][FN_IS_SSORT ] = T_PLIST_DENSE +IMMUTABLE; + ResetFiltListTNums[T_PLIST_DENSE +IMMUTABLE][FN_IS_NSORT ] = T_PLIST_DENSE +IMMUTABLE; + + /* mutable dense list, which contains immutables and is not homog */ + HasFiltListTNums [T_PLIST_DENSE_NHOM ][FN_IS_MUTABLE] = 1; + HasFiltListTNums [T_PLIST_DENSE_NHOM ][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST_DENSE_NHOM ][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_PLIST_DENSE_NHOM ][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST_DENSE_NHOM ][FN_IS_HOMOG ] = 0; + HasFiltListTNums [T_PLIST_DENSE_NHOM ][FN_IS_NHOMOG ] = 1; + HasFiltListTNums [T_PLIST_DENSE_NHOM ][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_PLIST_DENSE_NHOM ][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_PLIST_DENSE_NHOM ][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_PLIST_DENSE_NHOM ][FN_IS_MUTABLE] = T_PLIST_DENSE_NHOM; + SetFiltListTNums [T_PLIST_DENSE_NHOM ][FN_IS_EMPTY ] = -1; + SetFiltListTNums [T_PLIST_DENSE_NHOM ][FN_IS_DENSE ] = T_PLIST_DENSE_NHOM; + SetFiltListTNums [T_PLIST_DENSE_NHOM ][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_PLIST_DENSE_NHOM ][FN_IS_HOMOG ] = -1; + SetFiltListTNums [T_PLIST_DENSE_NHOM ][FN_IS_NHOMOG ] = T_PLIST_DENSE_NHOM; + SetFiltListTNums [T_PLIST_DENSE_NHOM ][FN_IS_TABLE ] = -1; + SetFiltListTNums [T_PLIST_DENSE_NHOM ][FN_IS_SSORT ] = T_PLIST_DENSE_NHOM; + SetFiltListTNums [T_PLIST_DENSE_NHOM ][FN_IS_NSORT ] = T_PLIST_DENSE_NHOM; + + ResetFiltListTNums[T_PLIST_DENSE_NHOM ][FN_IS_MUTABLE] = T_PLIST_DENSE_NHOM+IMMUTABLE; + ResetFiltListTNums[T_PLIST_DENSE_NHOM ][FN_IS_EMPTY ] = T_PLIST_DENSE_NHOM; + ResetFiltListTNums[T_PLIST_DENSE_NHOM ][FN_IS_DENSE ] = T_PLIST; + ResetFiltListTNums[T_PLIST_DENSE_NHOM ][FN_IS_NDENSE ] = T_PLIST_DENSE_NHOM; + ResetFiltListTNums[T_PLIST_DENSE_NHOM ][FN_IS_HOMOG ] = T_PLIST_DENSE_NHOM; + ResetFiltListTNums[T_PLIST_DENSE_NHOM ][FN_IS_NHOMOG ] = T_PLIST_DENSE; + ResetFiltListTNums[T_PLIST_DENSE_NHOM ][FN_IS_TABLE ] = T_PLIST_DENSE_NHOM; + ResetFiltListTNums[T_PLIST_DENSE_NHOM ][FN_IS_SSORT ] = T_PLIST_DENSE_NHOM; + ResetFiltListTNums[T_PLIST_DENSE_NHOM ][FN_IS_NSORT ] = T_PLIST_DENSE_NHOM; + + /* immutable dense list, which is immutable and not homogeneous */ + HasFiltListTNums [T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_MUTABLE] = 0; + HasFiltListTNums [T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_HOMOG ] = 0; + HasFiltListTNums [T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_NHOMOG ] = 1; + HasFiltListTNums [T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_DENSE_NHOM; + SetFiltListTNums [T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_EMPTY ] = -1; + SetFiltListTNums [T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_DENSE ] = T_PLIST_DENSE_NHOM+IMMUTABLE; + SetFiltListTNums [T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_HOMOG ] = -1; + SetFiltListTNums [T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_NHOMOG ] = T_PLIST_DENSE_NHOM+IMMUTABLE; + SetFiltListTNums [T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_TABLE ] = -1; + SetFiltListTNums [T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_SSORT ] = T_PLIST_DENSE_NHOM+IMMUTABLE; + SetFiltListTNums [T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_NSORT ] = T_PLIST_DENSE_NHOM+IMMUTABLE; + + ResetFiltListTNums[T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_DENSE_NHOM+IMMUTABLE; + ResetFiltListTNums[T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_EMPTY ] = T_PLIST_DENSE_NHOM+IMMUTABLE; + ResetFiltListTNums[T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_DENSE ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_NDENSE ] = T_PLIST_DENSE_NHOM+IMMUTABLE; + ResetFiltListTNums[T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_HOMOG ] = T_PLIST_DENSE_NHOM+IMMUTABLE; + ResetFiltListTNums[T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_NHOMOG ] = T_PLIST_DENSE +IMMUTABLE; + ResetFiltListTNums[T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_TABLE ] = T_PLIST_DENSE_NHOM+IMMUTABLE; + ResetFiltListTNums[T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_SSORT ] = T_PLIST_DENSE_NHOM+IMMUTABLE; + ResetFiltListTNums[T_PLIST_DENSE_NHOM+IMMUTABLE][FN_IS_NSORT ] = T_PLIST_DENSE_NHOM+IMMUTABLE; + + /* a mutable list with holes */ + HasFiltListTNums [T_PLIST_NDENSE ][FN_IS_MUTABLE] = 1; + HasFiltListTNums [T_PLIST_NDENSE ][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST_NDENSE ][FN_IS_DENSE ] = 0; + HasFiltListTNums [T_PLIST_NDENSE ][FN_IS_NDENSE ] = 1; + HasFiltListTNums [T_PLIST_NDENSE ][FN_IS_HOMOG ] = 0; + HasFiltListTNums [T_PLIST_NDENSE ][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST_NDENSE ][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_PLIST_NDENSE ][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_PLIST_NDENSE ][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_PLIST_NDENSE ][FN_IS_MUTABLE] = T_PLIST_NDENSE; + SetFiltListTNums [T_PLIST_NDENSE ][FN_IS_EMPTY ] = -1; + SetFiltListTNums [T_PLIST_NDENSE ][FN_IS_DENSE ] = -1; + SetFiltListTNums [T_PLIST_NDENSE ][FN_IS_NDENSE ] = T_PLIST_NDENSE; + SetFiltListTNums [T_PLIST_NDENSE ][FN_IS_HOMOG ] = -1; + SetFiltListTNums [T_PLIST_NDENSE ][FN_IS_NHOMOG ] = T_PLIST_NDENSE; + SetFiltListTNums [T_PLIST_NDENSE ][FN_IS_TABLE ] = -1; + SetFiltListTNums [T_PLIST_NDENSE ][FN_IS_SSORT ] = T_PLIST_NDENSE; + SetFiltListTNums [T_PLIST_NDENSE ][FN_IS_NSORT ] = T_PLIST_NDENSE; + + ResetFiltListTNums[T_PLIST_NDENSE ][FN_IS_MUTABLE] = T_PLIST_NDENSE +IMMUTABLE; + ResetFiltListTNums[T_PLIST_NDENSE ][FN_IS_EMPTY ] = T_PLIST_NDENSE; + ResetFiltListTNums[T_PLIST_NDENSE ][FN_IS_DENSE ] = T_PLIST_NDENSE; + ResetFiltListTNums[T_PLIST_NDENSE ][FN_IS_NDENSE ] = T_PLIST; + ResetFiltListTNums[T_PLIST_NDENSE ][FN_IS_HOMOG ] = T_PLIST_NDENSE; + ResetFiltListTNums[T_PLIST_NDENSE ][FN_IS_NHOMOG ] = T_PLIST_NDENSE; + ResetFiltListTNums[T_PLIST_NDENSE ][FN_IS_TABLE ] = T_PLIST_NDENSE; + ResetFiltListTNums[T_PLIST_NDENSE ][FN_IS_SSORT ] = T_PLIST_NDENSE; + ResetFiltListTNums[T_PLIST_NDENSE ][FN_IS_NSORT ] = T_PLIST_NDENSE; + + /* an immutable list with holes */ + HasFiltListTNums [T_PLIST_NDENSE +IMMUTABLE][FN_IS_MUTABLE] = 0; + HasFiltListTNums [T_PLIST_NDENSE +IMMUTABLE][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST_NDENSE +IMMUTABLE][FN_IS_DENSE ] = 0; + HasFiltListTNums [T_PLIST_NDENSE +IMMUTABLE][FN_IS_NDENSE ] = 1; + HasFiltListTNums [T_PLIST_NDENSE +IMMUTABLE][FN_IS_HOMOG ] = 0; + HasFiltListTNums [T_PLIST_NDENSE +IMMUTABLE][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST_NDENSE +IMMUTABLE][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_PLIST_NDENSE +IMMUTABLE][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_PLIST_NDENSE +IMMUTABLE][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_PLIST_NDENSE +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_NDENSE; + SetFiltListTNums [T_PLIST_NDENSE +IMMUTABLE][FN_IS_EMPTY ] = -1; + SetFiltListTNums [T_PLIST_NDENSE +IMMUTABLE][FN_IS_DENSE ] = -1; + SetFiltListTNums [T_PLIST_NDENSE +IMMUTABLE][FN_IS_NDENSE ] = T_PLIST_NDENSE +IMMUTABLE; + SetFiltListTNums [T_PLIST_NDENSE +IMMUTABLE][FN_IS_HOMOG ] = -1; + SetFiltListTNums [T_PLIST_NDENSE +IMMUTABLE][FN_IS_NHOMOG ] = T_PLIST_NDENSE +IMMUTABLE; + SetFiltListTNums [T_PLIST_NDENSE +IMMUTABLE][FN_IS_TABLE ] = -1; + SetFiltListTNums [T_PLIST_NDENSE +IMMUTABLE][FN_IS_SSORT ] = T_PLIST_NDENSE +IMMUTABLE; + SetFiltListTNums [T_PLIST_NDENSE +IMMUTABLE][FN_IS_NSORT ] = T_PLIST_NDENSE +IMMUTABLE; + + ResetFiltListTNums[T_PLIST_NDENSE +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_NDENSE +IMMUTABLE; + ResetFiltListTNums[T_PLIST_NDENSE +IMMUTABLE][FN_IS_EMPTY ] = T_PLIST_NDENSE +IMMUTABLE; + ResetFiltListTNums[T_PLIST_NDENSE +IMMUTABLE][FN_IS_DENSE ] = T_PLIST_NDENSE +IMMUTABLE; + ResetFiltListTNums[T_PLIST_NDENSE +IMMUTABLE][FN_IS_NDENSE ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST_NDENSE +IMMUTABLE][FN_IS_HOMOG ] = T_PLIST_NDENSE +IMMUTABLE; + ResetFiltListTNums[T_PLIST_NDENSE +IMMUTABLE][FN_IS_NHOMOG ] = T_PLIST_NDENSE +IMMUTABLE; + ResetFiltListTNums[T_PLIST_NDENSE +IMMUTABLE][FN_IS_TABLE ] = T_PLIST_NDENSE +IMMUTABLE; + ResetFiltListTNums[T_PLIST_NDENSE +IMMUTABLE][FN_IS_SSORT ] = T_PLIST_NDENSE +IMMUTABLE; + ResetFiltListTNums[T_PLIST_NDENSE +IMMUTABLE][FN_IS_NSORT ] = T_PLIST_NDENSE +IMMUTABLE; + + /* mutable dense list, which conts imms, is homogeneous, not a table */ + HasFiltListTNums [T_PLIST_HOM ][FN_IS_MUTABLE] = 1; + HasFiltListTNums [T_PLIST_HOM ][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST_HOM ][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_PLIST_HOM ][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST_HOM ][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_PLIST_HOM ][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST_HOM ][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_PLIST_HOM ][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_PLIST_HOM ][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_PLIST_HOM ][FN_IS_MUTABLE] = T_PLIST_HOM; + SetFiltListTNums [T_PLIST_HOM ][FN_IS_EMPTY ] = T_PLIST_EMPTY; + SetFiltListTNums [T_PLIST_HOM ][FN_IS_DENSE ] = T_PLIST_HOM; + SetFiltListTNums [T_PLIST_HOM ][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_PLIST_HOM ][FN_IS_HOMOG ] = T_PLIST_HOM; + SetFiltListTNums [T_PLIST_HOM ][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_PLIST_HOM ][FN_IS_TABLE ] = T_PLIST_TAB; + SetFiltListTNums [T_PLIST_HOM ][FN_IS_SSORT ] = T_PLIST_HOM_SSORT; + SetFiltListTNums [T_PLIST_HOM ][FN_IS_NSORT ] = T_PLIST_HOM_NSORT; + + ResetFiltListTNums[T_PLIST_HOM ][FN_IS_MUTABLE] = T_PLIST_HOM +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM ][FN_IS_EMPTY ] = T_PLIST_HOM; + ResetFiltListTNums[T_PLIST_HOM ][FN_IS_DENSE ] = T_PLIST; + ResetFiltListTNums[T_PLIST_HOM ][FN_IS_NDENSE ] = T_PLIST_HOM; + ResetFiltListTNums[T_PLIST_HOM ][FN_IS_HOMOG ] = T_PLIST_DENSE; + ResetFiltListTNums[T_PLIST_HOM ][FN_IS_NHOMOG ] = T_PLIST_HOM; + ResetFiltListTNums[T_PLIST_HOM ][FN_IS_TABLE ] = T_PLIST_HOM; + ResetFiltListTNums[T_PLIST_HOM ][FN_IS_SSORT ] = T_PLIST_HOM; + ResetFiltListTNums[T_PLIST_HOM ][FN_IS_NSORT ] = T_PLIST_HOM; + + /* immutable dense list, which is immutable, homogeneous, not a table */ + HasFiltListTNums [T_PLIST_HOM +IMMUTABLE][FN_IS_MUTABLE] = 0; + HasFiltListTNums [T_PLIST_HOM +IMMUTABLE][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST_HOM +IMMUTABLE][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_PLIST_HOM +IMMUTABLE][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST_HOM +IMMUTABLE][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_PLIST_HOM +IMMUTABLE][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST_HOM +IMMUTABLE][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_PLIST_HOM +IMMUTABLE][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_PLIST_HOM +IMMUTABLE][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_PLIST_HOM +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_HOM; + SetFiltListTNums [T_PLIST_HOM +IMMUTABLE][FN_IS_EMPTY ] = T_PLIST_EMPTY +IMMUTABLE; + SetFiltListTNums [T_PLIST_HOM +IMMUTABLE][FN_IS_DENSE ] = T_PLIST_HOM +IMMUTABLE; + SetFiltListTNums [T_PLIST_HOM +IMMUTABLE][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_PLIST_HOM +IMMUTABLE][FN_IS_HOMOG ] = T_PLIST_HOM +IMMUTABLE; + SetFiltListTNums [T_PLIST_HOM +IMMUTABLE][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_PLIST_HOM +IMMUTABLE][FN_IS_TABLE ] = T_PLIST_TAB +IMMUTABLE; + SetFiltListTNums [T_PLIST_HOM +IMMUTABLE][FN_IS_SSORT ] = T_PLIST_HOM_SSORT +IMMUTABLE; + SetFiltListTNums [T_PLIST_HOM +IMMUTABLE][FN_IS_NSORT ] = T_PLIST_HOM_NSORT +IMMUTABLE; + + ResetFiltListTNums[T_PLIST_HOM +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_HOM +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM +IMMUTABLE][FN_IS_EMPTY ] = T_PLIST_HOM +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM +IMMUTABLE][FN_IS_DENSE ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM +IMMUTABLE][FN_IS_NDENSE ] = T_PLIST_HOM +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM +IMMUTABLE][FN_IS_HOMOG ] = T_PLIST_DENSE +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM +IMMUTABLE][FN_IS_NHOMOG ] = T_PLIST_HOM +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM +IMMUTABLE][FN_IS_TABLE ] = T_PLIST_HOM +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM +IMMUTABLE][FN_IS_SSORT ] = T_PLIST_HOM +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM +IMMUTABLE][FN_IS_NSORT ] = T_PLIST_HOM +IMMUTABLE; + + /* ssort mutable dense list, which conts imms, is homog, not a table */ + HasFiltListTNums [T_PLIST_HOM_SSORT ][FN_IS_MUTABLE] = 1; + HasFiltListTNums [T_PLIST_HOM_SSORT ][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST_HOM_SSORT ][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_PLIST_HOM_SSORT ][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST_HOM_SSORT ][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_PLIST_HOM_SSORT ][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST_HOM_SSORT ][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_PLIST_HOM_SSORT ][FN_IS_SSORT ] = 1; + HasFiltListTNums [T_PLIST_HOM_SSORT ][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_PLIST_HOM_SSORT ][FN_IS_MUTABLE] = T_PLIST_HOM_SSORT; + SetFiltListTNums [T_PLIST_HOM_SSORT ][FN_IS_EMPTY ] = T_PLIST_EMPTY; + SetFiltListTNums [T_PLIST_HOM_SSORT ][FN_IS_DENSE ] = T_PLIST_HOM_SSORT; + SetFiltListTNums [T_PLIST_HOM_SSORT ][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_PLIST_HOM_SSORT ][FN_IS_HOMOG ] = T_PLIST_HOM_SSORT; + SetFiltListTNums [T_PLIST_HOM_SSORT ][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_PLIST_HOM_SSORT ][FN_IS_TABLE ] = T_PLIST_TAB_SSORT; + SetFiltListTNums [T_PLIST_HOM_SSORT ][FN_IS_SSORT ] = T_PLIST_HOM_SSORT; + SetFiltListTNums [T_PLIST_HOM_SSORT ][FN_IS_NSORT ] = -1; + + ResetFiltListTNums[T_PLIST_HOM_SSORT ][FN_IS_MUTABLE] = T_PLIST_HOM_SSORT+IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM_SSORT ][FN_IS_EMPTY ] = T_PLIST_HOM_SSORT; + ResetFiltListTNums[T_PLIST_HOM_SSORT ][FN_IS_DENSE ] = T_PLIST; + ResetFiltListTNums[T_PLIST_HOM_SSORT ][FN_IS_NDENSE ] = T_PLIST_HOM_SSORT; + ResetFiltListTNums[T_PLIST_HOM_SSORT ][FN_IS_HOMOG ] = T_PLIST_DENSE; + ResetFiltListTNums[T_PLIST_HOM_SSORT ][FN_IS_NHOMOG ] = T_PLIST_HOM_SSORT; + ResetFiltListTNums[T_PLIST_HOM_SSORT ][FN_IS_TABLE ] = T_PLIST_HOM_SSORT; + ResetFiltListTNums[T_PLIST_HOM_SSORT ][FN_IS_SSORT ] = T_PLIST_HOM; + ResetFiltListTNums[T_PLIST_HOM_SSORT ][FN_IS_NSORT ] = T_PLIST_HOM_SSORT; + + /* ssort immutable dense list, which is immutable, homog, not a table */ + HasFiltListTNums [T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_MUTABLE] = 0; + HasFiltListTNums [T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_SSORT ] = 1; + HasFiltListTNums [T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_HOM_SSORT; + SetFiltListTNums [T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_EMPTY ] = T_PLIST_EMPTY +IMMUTABLE; + SetFiltListTNums [T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_DENSE ] = T_PLIST_HOM_SSORT +IMMUTABLE; + SetFiltListTNums [T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_HOMOG ] = T_PLIST_HOM_SSORT +IMMUTABLE; + SetFiltListTNums [T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_TABLE ] = T_PLIST_TAB_SSORT +IMMUTABLE; + SetFiltListTNums [T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_SSORT ] = T_PLIST_HOM_SSORT +IMMUTABLE; + SetFiltListTNums [T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_NSORT ] = -1; + + ResetFiltListTNums[T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_HOM_SSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_EMPTY ] = T_PLIST_HOM_SSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_DENSE ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_NDENSE ] = T_PLIST_HOM_SSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_HOMOG ] = T_PLIST_DENSE +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_NHOMOG ] = T_PLIST_HOM_SSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_TABLE ] = T_PLIST_HOM_SSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_SSORT ] = T_PLIST_HOM +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM_SSORT +IMMUTABLE][FN_IS_NSORT ] = T_PLIST_HOM_SSORT +IMMUTABLE; + + /* nsort mutable dense list, which conts imms, is homog, not a table */ + HasFiltListTNums [T_PLIST_HOM_NSORT ][FN_IS_MUTABLE] = 1; + HasFiltListTNums [T_PLIST_HOM_NSORT ][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST_HOM_NSORT ][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_PLIST_HOM_NSORT ][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST_HOM_NSORT ][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_PLIST_HOM_NSORT ][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST_HOM_NSORT ][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_PLIST_HOM_NSORT ][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_PLIST_HOM_NSORT ][FN_IS_NSORT ] = 1; + + SetFiltListTNums [T_PLIST_HOM_NSORT ][FN_IS_MUTABLE] = T_PLIST_HOM_NSORT; + SetFiltListTNums [T_PLIST_HOM_NSORT ][FN_IS_EMPTY ] = -1; + SetFiltListTNums [T_PLIST_HOM_NSORT ][FN_IS_DENSE ] = T_PLIST_HOM_NSORT; + SetFiltListTNums [T_PLIST_HOM_NSORT ][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_PLIST_HOM_NSORT ][FN_IS_HOMOG ] = T_PLIST_HOM_NSORT; + SetFiltListTNums [T_PLIST_HOM_NSORT ][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_PLIST_HOM_NSORT ][FN_IS_TABLE ] = T_PLIST_TAB_NSORT; + SetFiltListTNums [T_PLIST_HOM_NSORT ][FN_IS_SSORT ] = -1; + SetFiltListTNums [T_PLIST_HOM_NSORT ][FN_IS_NSORT ] = T_PLIST_HOM_NSORT; + + ResetFiltListTNums[T_PLIST_HOM_NSORT ][FN_IS_MUTABLE] = T_PLIST_HOM_NSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM_NSORT ][FN_IS_EMPTY ] = T_PLIST_HOM_NSORT; + ResetFiltListTNums[T_PLIST_HOM_NSORT ][FN_IS_DENSE ] = T_PLIST; + ResetFiltListTNums[T_PLIST_HOM_NSORT ][FN_IS_NDENSE ] = T_PLIST_HOM_NSORT; + ResetFiltListTNums[T_PLIST_HOM_NSORT ][FN_IS_HOMOG ] = T_PLIST_DENSE; + ResetFiltListTNums[T_PLIST_HOM_NSORT ][FN_IS_NHOMOG ] = T_PLIST_HOM_NSORT; + ResetFiltListTNums[T_PLIST_HOM_NSORT ][FN_IS_TABLE ] = T_PLIST_HOM_NSORT; + ResetFiltListTNums[T_PLIST_HOM_NSORT ][FN_IS_SSORT ] = T_PLIST_HOM_NSORT; + ResetFiltListTNums[T_PLIST_HOM_NSORT ][FN_IS_NSORT ] = T_PLIST_HOM; + + /* nsort immutable dense list, which is immutable, homog, not a table */ + HasFiltListTNums [T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_MUTABLE] = 0; + HasFiltListTNums [T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_NSORT ] = 1; + + SetFiltListTNums [T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_HOM_NSORT; + SetFiltListTNums [T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_EMPTY ] = -1; + SetFiltListTNums [T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_DENSE ] = T_PLIST_HOM_NSORT +IMMUTABLE; + SetFiltListTNums [T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_HOMOG ] = T_PLIST_HOM_NSORT +IMMUTABLE; + SetFiltListTNums [T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_TABLE ] = T_PLIST_TAB_NSORT +IMMUTABLE; + SetFiltListTNums [T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_SSORT ] = -1; + SetFiltListTNums [T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_NSORT ] = T_PLIST_HOM_NSORT +IMMUTABLE; + + ResetFiltListTNums[T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_HOM_NSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_EMPTY ] = T_PLIST_HOM_NSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_DENSE ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_NDENSE ] = T_PLIST_HOM_NSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_HOMOG ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_NHOMOG ] = T_PLIST_HOM_NSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_TABLE ] = T_PLIST_HOM_NSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_SSORT ] = T_PLIST_HOM_NSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_HOM_NSORT +IMMUTABLE][FN_IS_NSORT ] = T_PLIST_HOM +IMMUTABLE; + + /* mutable dense list, which is immutable, homog, non-empty, table */ + HasFiltListTNums [T_PLIST_TAB ][FN_IS_MUTABLE] = 1; + HasFiltListTNums [T_PLIST_TAB ][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST_TAB ][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_PLIST_TAB ][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST_TAB ][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_PLIST_TAB ][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST_TAB ][FN_IS_TABLE ] = 1; + HasFiltListTNums [T_PLIST_TAB ][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_PLIST_TAB ][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_PLIST_TAB ][FN_IS_MUTABLE] = T_PLIST_TAB; + SetFiltListTNums [T_PLIST_TAB ][FN_IS_EMPTY ] = -1; + SetFiltListTNums [T_PLIST_TAB ][FN_IS_DENSE ] = T_PLIST_TAB; + SetFiltListTNums [T_PLIST_TAB ][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_PLIST_TAB ][FN_IS_HOMOG ] = T_PLIST_TAB; + SetFiltListTNums [T_PLIST_TAB ][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_PLIST_TAB ][FN_IS_TABLE ] = T_PLIST_TAB; + SetFiltListTNums [T_PLIST_TAB ][FN_IS_SSORT ] = T_PLIST_TAB_SSORT; + SetFiltListTNums [T_PLIST_TAB ][FN_IS_NSORT ] = T_PLIST_TAB_NSORT; + + ResetFiltListTNums[T_PLIST_TAB ][FN_IS_MUTABLE] = T_PLIST_TAB +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB ][FN_IS_EMPTY ] = T_PLIST_TAB; + ResetFiltListTNums[T_PLIST_TAB ][FN_IS_DENSE ] = T_PLIST; + ResetFiltListTNums[T_PLIST_TAB ][FN_IS_NDENSE ] = T_PLIST_TAB; + ResetFiltListTNums[T_PLIST_TAB ][FN_IS_HOMOG ] = T_PLIST_DENSE; + ResetFiltListTNums[T_PLIST_TAB ][FN_IS_NHOMOG ] = T_PLIST_TAB; + ResetFiltListTNums[T_PLIST_TAB ][FN_IS_TABLE ] = T_PLIST_HOM; + ResetFiltListTNums[T_PLIST_TAB ][FN_IS_SSORT ] = T_PLIST_TAB; + ResetFiltListTNums[T_PLIST_TAB ][FN_IS_NSORT ] = T_PLIST_TAB; + + /* immutable dense list, which is immutable, homog, non-empty, table */ + HasFiltListTNums [T_PLIST_TAB +IMMUTABLE][FN_IS_MUTABLE] = 0; + HasFiltListTNums [T_PLIST_TAB +IMMUTABLE][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST_TAB +IMMUTABLE][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_PLIST_TAB +IMMUTABLE][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST_TAB +IMMUTABLE][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_PLIST_TAB +IMMUTABLE][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST_TAB +IMMUTABLE][FN_IS_TABLE ] = 1; + HasFiltListTNums [T_PLIST_TAB +IMMUTABLE][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_PLIST_TAB +IMMUTABLE][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_PLIST_TAB +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_TAB; + SetFiltListTNums [T_PLIST_TAB +IMMUTABLE][FN_IS_EMPTY ] = -1; + SetFiltListTNums [T_PLIST_TAB +IMMUTABLE][FN_IS_DENSE ] = T_PLIST_TAB +IMMUTABLE; + SetFiltListTNums [T_PLIST_TAB +IMMUTABLE][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_PLIST_TAB +IMMUTABLE][FN_IS_HOMOG ] = T_PLIST_TAB +IMMUTABLE; + SetFiltListTNums [T_PLIST_TAB +IMMUTABLE][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_PLIST_TAB +IMMUTABLE][FN_IS_TABLE ] = T_PLIST_TAB +IMMUTABLE; + SetFiltListTNums [T_PLIST_TAB +IMMUTABLE][FN_IS_SSORT ] = T_PLIST_TAB_SSORT +IMMUTABLE; + SetFiltListTNums [T_PLIST_TAB +IMMUTABLE][FN_IS_NSORT ] = T_PLIST_TAB_NSORT +IMMUTABLE; + + ResetFiltListTNums[T_PLIST_TAB +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_TAB +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB +IMMUTABLE][FN_IS_EMPTY ] = T_PLIST_TAB +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB +IMMUTABLE][FN_IS_DENSE ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB +IMMUTABLE][FN_IS_NDENSE ] = T_PLIST_TAB +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB +IMMUTABLE][FN_IS_HOMOG ] = T_PLIST_DENSE +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB +IMMUTABLE][FN_IS_NHOMOG ] = T_PLIST_TAB +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB +IMMUTABLE][FN_IS_TABLE ] = T_PLIST_HOM +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB +IMMUTABLE][FN_IS_SSORT ] = T_PLIST_TAB +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB +IMMUTABLE][FN_IS_NSORT ] = T_PLIST_TAB +IMMUTABLE; + + /* ssort, mutable dense list, which is imm, homog, non-empty, table */ + HasFiltListTNums [T_PLIST_TAB_SSORT ][FN_IS_MUTABLE] = 1; + HasFiltListTNums [T_PLIST_TAB_SSORT ][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST_TAB_SSORT ][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_PLIST_TAB_SSORT ][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST_TAB_SSORT ][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_PLIST_TAB_SSORT ][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST_TAB_SSORT ][FN_IS_TABLE ] = 1; + HasFiltListTNums [T_PLIST_TAB_SSORT ][FN_IS_SSORT ] = 1; + HasFiltListTNums [T_PLIST_TAB_SSORT ][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_PLIST_TAB_SSORT ][FN_IS_MUTABLE] = T_PLIST_TAB_SSORT; + SetFiltListTNums [T_PLIST_TAB_SSORT ][FN_IS_EMPTY ] = -1; + SetFiltListTNums [T_PLIST_TAB_SSORT ][FN_IS_DENSE ] = T_PLIST_TAB_SSORT; + SetFiltListTNums [T_PLIST_TAB_SSORT ][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_PLIST_TAB_SSORT ][FN_IS_HOMOG ] = T_PLIST_TAB_SSORT; + SetFiltListTNums [T_PLIST_TAB_SSORT ][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_PLIST_TAB_SSORT ][FN_IS_TABLE ] = T_PLIST_TAB_SSORT; + SetFiltListTNums [T_PLIST_TAB_SSORT ][FN_IS_SSORT ] = T_PLIST_TAB_SSORT; + SetFiltListTNums [T_PLIST_TAB_SSORT ][FN_IS_NSORT ] = -1; + + ResetFiltListTNums[T_PLIST_TAB_SSORT ][FN_IS_MUTABLE] = T_PLIST_TAB_SSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB_SSORT ][FN_IS_EMPTY ] = T_PLIST_TAB_SSORT; + ResetFiltListTNums[T_PLIST_TAB_SSORT ][FN_IS_DENSE ] = T_PLIST; + ResetFiltListTNums[T_PLIST_TAB_SSORT ][FN_IS_NDENSE ] = T_PLIST_TAB_SSORT; + ResetFiltListTNums[T_PLIST_TAB_SSORT ][FN_IS_HOMOG ] = T_PLIST_DENSE; + ResetFiltListTNums[T_PLIST_TAB_SSORT ][FN_IS_NHOMOG ] = T_PLIST_TAB_SSORT; + ResetFiltListTNums[T_PLIST_TAB_SSORT ][FN_IS_TABLE ] = T_PLIST_HOM_SSORT; + ResetFiltListTNums[T_PLIST_TAB_SSORT ][FN_IS_SSORT ] = T_PLIST_TAB; + ResetFiltListTNums[T_PLIST_TAB_SSORT ][FN_IS_NSORT ] = T_PLIST_TAB_SSORT; + + /* ssort, immutable dense list, which is imm, homog, non-empty, table */ + HasFiltListTNums [T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_MUTABLE] = 0; + HasFiltListTNums [T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_TABLE ] = 1; + HasFiltListTNums [T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_SSORT ] = 1; + HasFiltListTNums [T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_TAB_SSORT; + SetFiltListTNums [T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_EMPTY ] = -1; + SetFiltListTNums [T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_DENSE ] = T_PLIST_TAB_SSORT +IMMUTABLE; + SetFiltListTNums [T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_HOMOG ] = T_PLIST_TAB_SSORT +IMMUTABLE; + SetFiltListTNums [T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_TABLE ] = T_PLIST_TAB_SSORT +IMMUTABLE; + SetFiltListTNums [T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_SSORT ] = T_PLIST_TAB_SSORT +IMMUTABLE; + SetFiltListTNums [T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_NSORT ] = -1; + + ResetFiltListTNums[T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_TAB_SSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_EMPTY ] = T_PLIST_TAB_SSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_DENSE ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_NDENSE ] = T_PLIST_TAB_SSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_HOMOG ] = T_PLIST_DENSE +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_NHOMOG ] = T_PLIST_TAB_SSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_TABLE ] = T_PLIST_HOM_SSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_SSORT ] = T_PLIST_TAB +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB_SSORT +IMMUTABLE][FN_IS_NSORT ] = T_PLIST_TAB_SSORT +IMMUTABLE; + + /* nsort, mutable dense list, which is imm, homog, non-empty, table */ + HasFiltListTNums [T_PLIST_TAB_NSORT ][FN_IS_MUTABLE] = 1; + HasFiltListTNums [T_PLIST_TAB_NSORT ][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST_TAB_NSORT ][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_PLIST_TAB_NSORT ][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST_TAB_NSORT ][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_PLIST_TAB_NSORT ][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST_TAB_NSORT ][FN_IS_TABLE ] = 1; + HasFiltListTNums [T_PLIST_TAB_NSORT ][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_PLIST_TAB_NSORT ][FN_IS_NSORT ] = 1; + + SetFiltListTNums [T_PLIST_TAB_NSORT ][FN_IS_MUTABLE] = T_PLIST_TAB_NSORT; + SetFiltListTNums [T_PLIST_TAB_NSORT ][FN_IS_EMPTY ] = -1; + SetFiltListTNums [T_PLIST_TAB_NSORT ][FN_IS_DENSE ] = T_PLIST_TAB_NSORT; + SetFiltListTNums [T_PLIST_TAB_NSORT ][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_PLIST_TAB_NSORT ][FN_IS_HOMOG ] = T_PLIST_TAB_NSORT; + SetFiltListTNums [T_PLIST_TAB_NSORT ][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_PLIST_TAB_NSORT ][FN_IS_TABLE ] = T_PLIST_TAB_NSORT; + SetFiltListTNums [T_PLIST_TAB_NSORT ][FN_IS_SSORT ] = -1; + SetFiltListTNums [T_PLIST_TAB_NSORT ][FN_IS_NSORT ] = T_PLIST_TAB_NSORT; + + ResetFiltListTNums[T_PLIST_TAB_NSORT ][FN_IS_MUTABLE] = T_PLIST_TAB_NSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB_NSORT ][FN_IS_EMPTY ] = T_PLIST_TAB_NSORT; + ResetFiltListTNums[T_PLIST_TAB_NSORT ][FN_IS_DENSE ] = T_PLIST; + ResetFiltListTNums[T_PLIST_TAB_NSORT ][FN_IS_NDENSE ] = T_PLIST_TAB_NSORT; + ResetFiltListTNums[T_PLIST_TAB_NSORT ][FN_IS_HOMOG ] = T_PLIST_DENSE; + ResetFiltListTNums[T_PLIST_TAB_NSORT ][FN_IS_NHOMOG ] = T_PLIST_TAB_NSORT; + ResetFiltListTNums[T_PLIST_TAB_NSORT ][FN_IS_TABLE ] = T_PLIST_HOM_NSORT; + ResetFiltListTNums[T_PLIST_TAB_NSORT ][FN_IS_SSORT ] = T_PLIST_TAB_NSORT; + ResetFiltListTNums[T_PLIST_TAB_NSORT ][FN_IS_NSORT ] = T_PLIST_TAB; + + /* nsort, immutable dense list, which is imm, homog, non-empty, table */ + HasFiltListTNums [T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_MUTABLE] = 0; + HasFiltListTNums [T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_TABLE ] = 1; + HasFiltListTNums [T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_NSORT ] = 1; + + SetFiltListTNums [T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_TAB_NSORT; + SetFiltListTNums [T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_EMPTY ] = -1; + SetFiltListTNums [T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_DENSE ] = T_PLIST_TAB_NSORT +IMMUTABLE; + SetFiltListTNums [T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_HOMOG ] = T_PLIST_TAB_NSORT +IMMUTABLE; + SetFiltListTNums [T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_TABLE ] = T_PLIST_TAB_NSORT +IMMUTABLE; + SetFiltListTNums [T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_SSORT ] = -1; + SetFiltListTNums [T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_NSORT ] = T_PLIST_TAB_NSORT +IMMUTABLE; + + ResetFiltListTNums[T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_TAB_NSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_EMPTY ] = T_PLIST_TAB_NSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_DENSE ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_NDENSE ] = T_PLIST_TAB_NSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_HOMOG ] = T_PLIST_DENSE +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_NHOMOG ] = T_PLIST_TAB_NSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_TABLE ] = T_PLIST_HOM_NSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_SSORT ] = T_PLIST_TAB_NSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_TAB_NSORT +IMMUTABLE][FN_IS_NSORT ] = T_PLIST_TAB +IMMUTABLE; + + /* mutable dense list, which only contains objects of type <= T_CYC */ + HasFiltListTNums [T_PLIST_CYC ][FN_IS_MUTABLE] = 1; + HasFiltListTNums [T_PLIST_CYC ][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST_CYC ][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_PLIST_CYC ][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST_CYC ][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_PLIST_CYC ][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST_CYC ][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_PLIST_CYC ][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_PLIST_CYC ][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_PLIST_CYC ][FN_IS_MUTABLE] = T_PLIST_CYC; + SetFiltListTNums [T_PLIST_CYC ][FN_IS_EMPTY ] = T_PLIST_CYC; + SetFiltListTNums [T_PLIST_CYC ][FN_IS_DENSE ] = T_PLIST_CYC; + SetFiltListTNums [T_PLIST_CYC ][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_PLIST_CYC ][FN_IS_HOMOG ] = T_PLIST_CYC; + SetFiltListTNums [T_PLIST_CYC ][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_PLIST_CYC ][FN_IS_TABLE ] = -1; + SetFiltListTNums [T_PLIST_CYC ][FN_IS_SSORT ] = T_PLIST_CYC_SSORT; + SetFiltListTNums [T_PLIST_CYC ][FN_IS_NSORT ] = T_PLIST_CYC_NSORT; + + ResetFiltListTNums[T_PLIST_CYC ][FN_IS_MUTABLE] = T_PLIST_CYC +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC ][FN_IS_EMPTY ] = T_PLIST_CYC; + ResetFiltListTNums[T_PLIST_CYC ][FN_IS_DENSE ] = T_PLIST; + ResetFiltListTNums[T_PLIST_CYC ][FN_IS_NDENSE ] = T_PLIST_CYC; + ResetFiltListTNums[T_PLIST_CYC ][FN_IS_HOMOG ] = T_PLIST; + ResetFiltListTNums[T_PLIST_CYC ][FN_IS_NHOMOG ] = T_PLIST_CYC; + ResetFiltListTNums[T_PLIST_CYC ][FN_IS_TABLE ] = T_PLIST_CYC; + ResetFiltListTNums[T_PLIST_CYC ][FN_IS_SSORT ] = T_PLIST_CYC; + ResetFiltListTNums[T_PLIST_CYC ][FN_IS_NSORT ] = T_PLIST_CYC; + + /* immutable dense list, which only contains objects of type <= T_CYC */ + HasFiltListTNums [T_PLIST_CYC +IMMUTABLE][FN_IS_MUTABLE] = 0; + HasFiltListTNums [T_PLIST_CYC +IMMUTABLE][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST_CYC +IMMUTABLE][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_PLIST_CYC +IMMUTABLE][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST_CYC +IMMUTABLE][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_PLIST_CYC +IMMUTABLE][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST_CYC +IMMUTABLE][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_PLIST_CYC +IMMUTABLE][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_PLIST_CYC +IMMUTABLE][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_PLIST_CYC +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_CYC; + SetFiltListTNums [T_PLIST_CYC +IMMUTABLE][FN_IS_EMPTY ] = T_PLIST_CYC +IMMUTABLE; + SetFiltListTNums [T_PLIST_CYC +IMMUTABLE][FN_IS_DENSE ] = T_PLIST_CYC +IMMUTABLE; + SetFiltListTNums [T_PLIST_CYC +IMMUTABLE][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_PLIST_CYC +IMMUTABLE][FN_IS_HOMOG ] = T_PLIST_CYC +IMMUTABLE; + SetFiltListTNums [T_PLIST_CYC +IMMUTABLE][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_PLIST_CYC +IMMUTABLE][FN_IS_TABLE ] = -1; + SetFiltListTNums [T_PLIST_CYC +IMMUTABLE][FN_IS_SSORT ] = T_PLIST_CYC_SSORT +IMMUTABLE; + SetFiltListTNums [T_PLIST_CYC +IMMUTABLE][FN_IS_NSORT ] = T_PLIST_CYC_NSORT +IMMUTABLE; + + ResetFiltListTNums[T_PLIST_CYC +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_CYC +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC +IMMUTABLE][FN_IS_EMPTY ] = T_PLIST_CYC +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC +IMMUTABLE][FN_IS_DENSE ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC +IMMUTABLE][FN_IS_NDENSE ] = T_PLIST_CYC +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC +IMMUTABLE][FN_IS_HOMOG ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC +IMMUTABLE][FN_IS_NHOMOG ] = T_PLIST_CYC +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC +IMMUTABLE][FN_IS_TABLE ] = T_PLIST_CYC +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC +IMMUTABLE][FN_IS_SSORT ] = T_PLIST_CYC +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC +IMMUTABLE][FN_IS_NSORT ] = T_PLIST_CYC +IMMUTABLE; + + /* ssort mutable dense list, which only contains objs of type <= T_CYC */ + HasFiltListTNums [T_PLIST_CYC_SSORT ][FN_IS_MUTABLE] = 1; + HasFiltListTNums [T_PLIST_CYC_SSORT ][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST_CYC_SSORT ][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_PLIST_CYC_SSORT ][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST_CYC_SSORT ][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_PLIST_CYC_SSORT ][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST_CYC_SSORT ][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_PLIST_CYC_SSORT ][FN_IS_SSORT ] = 1; + HasFiltListTNums [T_PLIST_CYC_SSORT ][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_PLIST_CYC_SSORT ][FN_IS_MUTABLE] = T_PLIST_CYC_SSORT; + SetFiltListTNums [T_PLIST_CYC_SSORT ][FN_IS_EMPTY ] = T_PLIST_CYC_SSORT; + SetFiltListTNums [T_PLIST_CYC_SSORT ][FN_IS_DENSE ] = T_PLIST_CYC_SSORT; + SetFiltListTNums [T_PLIST_CYC_SSORT ][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_PLIST_CYC_SSORT ][FN_IS_HOMOG ] = T_PLIST_CYC_SSORT; + SetFiltListTNums [T_PLIST_CYC_SSORT ][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_PLIST_CYC_SSORT ][FN_IS_TABLE ] = -1; + SetFiltListTNums [T_PLIST_CYC_SSORT ][FN_IS_SSORT ] = T_PLIST_CYC_SSORT; + SetFiltListTNums [T_PLIST_CYC_SSORT ][FN_IS_NSORT ] = -1; + + ResetFiltListTNums[T_PLIST_CYC_SSORT ][FN_IS_MUTABLE] = T_PLIST_CYC_SSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC_SSORT ][FN_IS_EMPTY ] = T_PLIST_CYC_SSORT; + ResetFiltListTNums[T_PLIST_CYC_SSORT ][FN_IS_DENSE ] = T_PLIST; + ResetFiltListTNums[T_PLIST_CYC_SSORT ][FN_IS_NDENSE ] = T_PLIST_CYC_SSORT; + ResetFiltListTNums[T_PLIST_CYC_SSORT ][FN_IS_HOMOG ] = T_PLIST; + ResetFiltListTNums[T_PLIST_CYC_SSORT ][FN_IS_NHOMOG ] = T_PLIST_CYC_SSORT; + ResetFiltListTNums[T_PLIST_CYC_SSORT ][FN_IS_TABLE ] = T_PLIST_CYC_SSORT; + ResetFiltListTNums[T_PLIST_CYC_SSORT ][FN_IS_SSORT ] = T_PLIST_CYC; + ResetFiltListTNums[T_PLIST_CYC_SSORT ][FN_IS_NSORT ] = T_PLIST_CYC_SSORT; + + /* ssort immutable dense list, which contains objs of type <= T_CYC */ + HasFiltListTNums [T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_MUTABLE] = 0; + HasFiltListTNums [T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_SSORT ] = 1; + HasFiltListTNums [T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_CYC_SSORT; + SetFiltListTNums [T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_EMPTY ] = T_PLIST_CYC_SSORT +IMMUTABLE; + SetFiltListTNums [T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_DENSE ] = T_PLIST_CYC_SSORT +IMMUTABLE; + SetFiltListTNums [T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_HOMOG ] = T_PLIST_CYC_SSORT +IMMUTABLE; + SetFiltListTNums [T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_TABLE ] = -1; + SetFiltListTNums [T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_SSORT ] = T_PLIST_CYC_SSORT +IMMUTABLE; + SetFiltListTNums [T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_NSORT ] = -1; + + ResetFiltListTNums[T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_CYC_SSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_EMPTY ] = T_PLIST_CYC_SSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_DENSE ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_NDENSE ] = T_PLIST_CYC_SSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_HOMOG ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_NHOMOG ] = T_PLIST_CYC_SSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_TABLE ] = T_PLIST_CYC_SSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_SSORT ] = T_PLIST_CYC +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC_SSORT +IMMUTABLE][FN_IS_NSORT ] = T_PLIST_CYC_SSORT +IMMUTABLE; + + /* nsort mutable dense list, which only contains objs of type <= T_CYC */ + HasFiltListTNums [T_PLIST_CYC_NSORT ][FN_IS_MUTABLE] = 1; + HasFiltListTNums [T_PLIST_CYC_NSORT ][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST_CYC_NSORT ][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_PLIST_CYC_NSORT ][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST_CYC_NSORT ][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_PLIST_CYC_NSORT ][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST_CYC_NSORT ][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_PLIST_CYC_NSORT ][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_PLIST_CYC_NSORT ][FN_IS_NSORT ] = 1; + + SetFiltListTNums [T_PLIST_CYC_NSORT ][FN_IS_MUTABLE] = T_PLIST_CYC_NSORT; + SetFiltListTNums [T_PLIST_CYC_NSORT ][FN_IS_EMPTY ] = -1; + SetFiltListTNums [T_PLIST_CYC_NSORT ][FN_IS_DENSE ] = T_PLIST_CYC_NSORT; + SetFiltListTNums [T_PLIST_CYC_NSORT ][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_PLIST_CYC_NSORT ][FN_IS_HOMOG ] = T_PLIST_CYC_NSORT; + SetFiltListTNums [T_PLIST_CYC_NSORT ][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_PLIST_CYC_NSORT ][FN_IS_TABLE ] = -1; + SetFiltListTNums [T_PLIST_CYC_NSORT ][FN_IS_SSORT ] = -1; + SetFiltListTNums [T_PLIST_CYC_NSORT ][FN_IS_NSORT ] = T_PLIST_CYC_NSORT; + + ResetFiltListTNums[T_PLIST_CYC_NSORT ][FN_IS_MUTABLE] = T_PLIST_CYC_NSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC_NSORT ][FN_IS_EMPTY ] = T_PLIST_CYC_NSORT; + ResetFiltListTNums[T_PLIST_CYC_NSORT ][FN_IS_DENSE ] = T_PLIST; + ResetFiltListTNums[T_PLIST_CYC_NSORT ][FN_IS_NDENSE ] = T_PLIST_CYC_NSORT; + ResetFiltListTNums[T_PLIST_CYC_NSORT ][FN_IS_HOMOG ] = T_PLIST; + ResetFiltListTNums[T_PLIST_CYC_NSORT ][FN_IS_NHOMOG ] = T_PLIST_CYC_NSORT; + ResetFiltListTNums[T_PLIST_CYC_NSORT ][FN_IS_TABLE ] = T_PLIST_CYC_NSORT; + ResetFiltListTNums[T_PLIST_CYC_NSORT ][FN_IS_SSORT ] = T_PLIST_CYC_NSORT; + ResetFiltListTNums[T_PLIST_CYC_NSORT ][FN_IS_NSORT ] = T_PLIST_CYC; + + /* nsort immutable dense list, which contains objs of type <= T_CYC */ + HasFiltListTNums [T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_MUTABLE] = 0; + HasFiltListTNums [T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_NSORT ] = 1; + + SetFiltListTNums [T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_CYC_NSORT; + SetFiltListTNums [T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_EMPTY ] = -1; + SetFiltListTNums [T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_DENSE ] = T_PLIST_CYC_NSORT +IMMUTABLE; + SetFiltListTNums [T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_HOMOG ] = T_PLIST_CYC_NSORT +IMMUTABLE; + SetFiltListTNums [T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_TABLE ] = -1; + SetFiltListTNums [T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_SSORT ] = -1; + SetFiltListTNums [T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_NSORT ] = T_PLIST_CYC_NSORT +IMMUTABLE; + + ResetFiltListTNums[T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_MUTABLE] = T_PLIST_CYC_NSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_EMPTY ] = T_PLIST_CYC_NSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_DENSE ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_NDENSE ] = T_PLIST_CYC_NSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_HOMOG ] = T_PLIST +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_NHOMOG ] = T_PLIST_CYC_NSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_TABLE ] = T_PLIST_CYC_NSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_SSORT ] = T_PLIST_CYC_NSORT +IMMUTABLE; + ResetFiltListTNums[T_PLIST_CYC_NSORT +IMMUTABLE][FN_IS_NSORT ] = T_PLIST_CYC +IMMUTABLE; /* install the shallow copy methods */ @@ -2233,6 +3053,72 @@ void InitPlist ( void ) } +/**************************************************************************** +** +*F InitPlist() . . . . . . . . . . . . . . initialize the plain list package +** +** Is called during the initialization to initialize the list package. +*/ +void InitPlist ( void ) +{ + UInt t1; /* loop variable */ + + /* get the kinds (resp. kind functions) */ + ImportGVarFromLibrary( "TYPE_LIST_NDENSE_MUTABLE", + &TYPE_LIST_NDENSE_MUTABLE ); + + ImportGVarFromLibrary( "TYPE_LIST_NDENSE_IMMUTABLE", + &TYPE_LIST_NDENSE_IMMUTABLE ); + + ImportGVarFromLibrary( "TYPE_LIST_DENSE_NHOM_MUTABLE", + &TYPE_LIST_DENSE_NHOM_MUTABLE ); + + ImportGVarFromLibrary( "TYPE_LIST_DENSE_NHOM_IMMUTABLE", + &TYPE_LIST_DENSE_NHOM_IMMUTABLE ); + + ImportGVarFromLibrary( "TYPE_LIST_EMPTY_MUTABLE", + &TYPE_LIST_EMPTY_MUTABLE ); + + ImportGVarFromLibrary( "TYPE_LIST_EMPTY_IMMUTABLE", + &TYPE_LIST_EMPTY_IMMUTABLE ); + + ImportFuncFromLibrary( "TYPE_LIST_HOM", + &TYPE_LIST_HOM ); + + + /* install the kind methods */ + TypeObjFuncs[ T_PLIST ] = TypePlist; + TypeObjFuncs[ T_PLIST +IMMUTABLE ] = TypePlist; + TypeObjFuncs[ T_PLIST_NDENSE ] = TypePlistNDenseMut; + TypeObjFuncs[ T_PLIST_NDENSE +IMMUTABLE ] = TypePlistNDenseImm; + TypeObjFuncs[ T_PLIST_DENSE ] = TypePlistDenseMut; + TypeObjFuncs[ T_PLIST_DENSE +IMMUTABLE ] = TypePlistDenseImm; + TypeObjFuncs[ T_PLIST_DENSE_NHOM ] = TypePlistDenseNHomMut; + TypeObjFuncs[ T_PLIST_DENSE_NHOM +IMMUTABLE ] = TypePlistDenseNHomImm; + TypeObjFuncs[ T_PLIST_EMPTY ] = TypePlistEmptyMut; + TypeObjFuncs[ T_PLIST_EMPTY +IMMUTABLE ] = TypePlistEmptyImm; + for ( t1 = T_PLIST_HOM; t1 <= T_PLIST_TAB_SSORT; t1 += 2 ) { + TypeObjFuncs[ t1 ] = TypePlistHom; + TypeObjFuncs[ t1 +IMMUTABLE ] = TypePlistHom; + } + for ( t1 = T_PLIST_CYC; t1 <= T_PLIST_CYC_SSORT; t1 += 2 ) { + TypeObjFuncs[ t1 ] = TypePlistCyc; + TypeObjFuncs[ t1 +IMMUTABLE ] = TypePlistCyc; + } +} + + +/**************************************************************************** +** +*F CheckPlist() . . . . check the initialisation of the plain list package +*/ +void CheckPlist ( void ) +{ + SET_REVISION( "plist_c", Revision_plist_c ); + SET_REVISION( "plist_h", Revision_plist_h ); +} + + /**************************************************************************** ** diff --git a/src/plist.h b/src/plist.h index d9781f2a70..4cca5bcbf4 100644 --- a/src/plist.h +++ b/src/plist.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A plist.h GAP source Martin Schoenert +*W plist.h GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -22,7 +22,7 @@ ** installed in the appropriate tables by 'InitPlist'. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_plist_h = +SYS_CONST char * Revision_plist_h = "@(#)$Id$"; #endif @@ -135,19 +135,44 @@ extern Int GrowPlist ( /**************************************************************************** ** -*F IS_IMM_PLIST( ) . . . . . . . . . . . is a plain listy immutable +*F IS_MUTABLE_PLIST( ) . . . . . . . . . . . is a plain list mutable */ -#define IS_IMM_PLIST(list) ((TNUM_OBJ(list) - T_PLIST) % 2) +#define IS_MUTABLE_PLIST(list) (!((TNUM_OBJ(list) - T_PLIST) % 2)) /**************************************************************************** ** -*F InitPlist() . . . . . . . . . . . . . . . . . initialize the list package +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** ** -** 'InitPlist' initializes the plain list package. + +*F SetupPlist(). . . . . . . . . . . . . . initialize the plain list package */ -extern void InitPlist ( void ); +extern void SetupPlist ( void ); +/**************************************************************************** +** +*F InitPlist() . . . . . . . . . . . . . . initialize the plain list package +** +** Is called during the initialization to initialize the list package. +*/ +extern void InitPlist ( void ); + +/**************************************************************************** +** +*F CheckPlist() . . . . check the initialisation of the plain list package +*/ +extern void CheckPlist ( void ); + + +/**************************************************************************** +** + +*E plist.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/precord.c b/src/precord.c index 0aba05d0b6..1127dac743 100644 --- a/src/precord.c +++ b/src/precord.c @@ -12,34 +12,38 @@ ** entries. The odd entries are the record names of the components and the ** even entries are the corresponding values. */ -char * Revision_precord_c = +#include "system.h" /* system dependent part */ + +SYS_CONST char * Revision_precord_c = "@(#)$Id$"; -#include "system.h" /* Ints, UInts */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ -#include "gasman.h" /* NewBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, types */ -#include "scanner.h" /* Pr */ +#include "gap.h" /* error handling, initialisation */ #include "gvars.h" /* global variables */ #include "calls.h" /* generic call mechanism */ -#include "opers.h" /* generic operations mechanism */ +#include "opers.h" /* generic operations */ -#include "ariths.h" /* generic operations package */ +#include "ariths.h" /* basic arithmetic */ #include "records.h" /* generic records */ #include "lists.h" /* generic lists */ -#include "bool.h" /* True, False */ +#include "bool.h" /* booleans */ #define INCLUDE_DECLARATION_PART -#include "precord.h" /* declaration part of the package */ +#include "precord.h" /* plain records */ #undef INCLUDE_DECLARATION_PART -#include "plist.h" /* NEW_PLIST, SET_LEN_PLIST, SET...*/ -#include "string.h" /* NEW_STRING, CSTR_STRING */ +#include "plist.h" /* plain lists */ +#include "string.h" /* strings */ + +#include "gap.h" /* error handling, initialisation */ -#include "gap.h" /* Error */ +#include "saveload.h" /* saving and loading */ /**************************************************************************** @@ -634,12 +638,12 @@ Obj FuncPRINT_PREC_DEFAULT ( /* print the record */ Pr( "%2>rec(\n%2>", 0L, 0L ); for ( PrintObjIndex=1; PrintObjIndex<=LEN_PREC(rec); PrintObjIndex++ ) { - Pr( "%I", (Int)NAME_RNAM(GET_RNAM_PREC(rec,PrintObjIndex)), 0L ); - Pr( "%< := %>", 0L, 0L ); - PrintObj( GET_ELM_PREC( rec, PrintObjIndex ) ); - if ( PrintObjIndex < LEN_PREC(rec) ) { - Pr( "%2<,\n%2>", 0L, 0L ); - } + Pr( "%I", (Int)NAME_RNAM(GET_RNAM_PREC(rec,PrintObjIndex)), 0L ); + Pr( "%< := %>", 0L, 0L ); + PrintObj( GET_ELM_PREC( rec, PrintObjIndex ) ); + if ( PrintObjIndex < LEN_PREC(rec) ) { + Pr( "%2<,\n%2>", 0L, 0L ); + } } Pr( " %4<)", 0L, 0L ); return 0L; @@ -670,7 +674,7 @@ Obj FuncPRINT_PREC ( /* try to find an applicable method */ if ( ! (method = MethodPRec( rec, PrintRNam )) ) { - return FuncPRINT_PREC_DEFAULT( self, rec ); + return FuncPRINT_PREC_DEFAULT( self, rec ); } /* call that function */ @@ -702,7 +706,7 @@ Obj FuncREC_NAMES ( TNUM_OBJ(rec) != T_PREC + IMMUTABLE ) { rec = ErrorReturnObj( "RecNames: must be a record (not a %s)", - (Int)(InfoBags[TNUM_OBJ(rec)].name), 0L, + (Int)TNAM_OBJ(rec), 0L, "you can return a record for " ); } @@ -742,7 +746,7 @@ Obj FuncREC_NAMES_ROBJ ( while ( TNUM_OBJ(rec) != T_COMOBJ ) { rec = ErrorReturnObj( "RecNames: must be a component object (not a %s)", - (Int)(InfoBags[TNUM_OBJ(rec)].name), 0L, + (Int)TNAM_OBJ(rec), 0L, "you can return a component object for " ); } @@ -788,7 +792,7 @@ Obj FuncSUM_PREC ( if ( ! (method = MethodPRec( right, SumRNam )) && ! (method = MethodPRec( left, SumRNam )) ) { - return TRY_NEXT_METHOD; + return TRY_NEXT_METHOD; } /* call that function */ @@ -819,7 +823,7 @@ Obj FuncDIFF_PREC ( if ( ! (method = MethodPRec( right, DiffRNam )) && ! (method = MethodPRec( left, DiffRNam )) ) { - return TRY_NEXT_METHOD; + return TRY_NEXT_METHOD; } /* call that function */ @@ -850,7 +854,7 @@ Obj FuncPROD_PREC ( if ( ! (method = MethodPRec( right, ProdRNam )) && ! (method = MethodPRec( left, ProdRNam )) ) { - return TRY_NEXT_METHOD; + return TRY_NEXT_METHOD; } /* call that function */ @@ -881,7 +885,7 @@ Obj FuncQUO_PREC ( if ( ! (method = MethodPRec( right, QuoRNam )) && ! (method = MethodPRec( left, QuoRNam )) ) { - return TRY_NEXT_METHOD; + return TRY_NEXT_METHOD; } /* call that function */ @@ -913,7 +917,7 @@ Obj FuncLQUO_PREC ( if ( ! (method = MethodPRec( right, LQuoRNam )) && ! (method = MethodPRec( left, LQuoRNam )) ) { - return TRY_NEXT_METHOD; + return TRY_NEXT_METHOD; } /* call that function */ @@ -944,7 +948,7 @@ Obj FuncPOW_PREC ( if ( ! (method = MethodPRec( right, PowRNam )) && ! (method = MethodPRec( left, PowRNam )) ) { - return TRY_NEXT_METHOD; + return TRY_NEXT_METHOD; } /* call that function */ @@ -975,7 +979,7 @@ Obj FuncCOMM_PREC ( if ( ! (method = MethodPRec( right, CommRNam )) && ! (method = MethodPRec( left, CommRNam )) ) { - return TRY_NEXT_METHOD; + return TRY_NEXT_METHOD; } /* call that function */ @@ -1006,7 +1010,7 @@ Obj FuncMOD_PREC ( if ( ! (method = MethodPRec( right, ModRNam )) && ! (method = MethodPRec( left, ModRNam )) ) { - return TRY_NEXT_METHOD; + return TRY_NEXT_METHOD; } /* call that function */ @@ -1035,7 +1039,7 @@ Obj FuncIN_PREC ( /* try to find an applicable method */ if ( ! (method = MethodPRec( right, InRNam )) ) { - return TRY_NEXT_METHOD; + return TRY_NEXT_METHOD; } /* call that function */ @@ -1059,11 +1063,11 @@ Obj FuncEQ_PREC_DEFAULT ( /* quick first checks */ if ( TNUM_OBJ(left)!=T_PREC && TNUM_OBJ(left)!=T_PREC+IMMUTABLE ) - return False; + return False; if ( TNUM_OBJ(right)!=T_PREC && TNUM_OBJ(right)!=T_PREC+IMMUTABLE ) - return False; + return False; if ( LEN_PREC(left) != LEN_PREC(right) ) - return False; + return False; /* sort both records */ SortPRec(left); @@ -1072,15 +1076,15 @@ Obj FuncEQ_PREC_DEFAULT ( /* compare componentwise */ for ( i = 1; i <= LEN_PREC(right); i++ ) { - /* compare the names */ - if ( GET_RNAM_PREC(left,i) != GET_RNAM_PREC(right,i) ) { - return False; - } + /* compare the names */ + if ( GET_RNAM_PREC(left,i) != GET_RNAM_PREC(right,i) ) { + return False; + } - /* compare the values */ - if ( ! EQ(GET_ELM_PREC(left,i),GET_ELM_PREC(right,i)) ) { - return False; - } + /* compare the values */ + if ( ! EQ(GET_ELM_PREC(left,i),GET_ELM_PREC(right,i)) ) { + return False; + } } /* the records are equal */ @@ -1112,7 +1116,7 @@ Obj FuncEQ_PREC ( if ( ! (method = MethodPRec( right, EqRNam )) && ! (method = MethodPRec( left, EqRNam )) ) { - return FuncEQ_PREC_DEFAULT( self, left, right ); + return FuncEQ_PREC_DEFAULT( self, left, right ); } /* call that function */ @@ -1150,25 +1154,25 @@ Obj FuncLT_PREC_DEFAULT ( /* compare componentwise */ for ( i = 1; i <= LEN_PREC(right); i++ ) { - /* if the left is a proper prefix of the right one */ - if ( LEN_PREC(left) < i ) return True; - - /* compare the names */ - if ( GET_RNAM_PREC(left,i) != GET_RNAM_PREC(right,i) ) { - if ( SyStrcmp( NAME_RNAM( GET_RNAM_PREC(left,i) ), - NAME_RNAM( GET_RNAM_PREC(right,i) ) ) < 0 ) { - return True; - } - else { - return False; - } - } - - /* compare the values */ - if ( ! EQ(GET_ELM_PREC(left,i),GET_ELM_PREC(right,i)) ) { - return LT( GET_ELM_PREC(left,i), GET_ELM_PREC(right,i) ) ? + /* if the left is a proper prefix of the right one */ + if ( LEN_PREC(left) < i ) return True; + + /* compare the names */ + if ( GET_RNAM_PREC(left,i) != GET_RNAM_PREC(right,i) ) { + if ( SyStrcmp( NAME_RNAM( GET_RNAM_PREC(left,i) ), + NAME_RNAM( GET_RNAM_PREC(right,i) ) ) < 0 ) { + return True; + } + else { + return False; + } + } + + /* compare the values */ + if ( ! EQ(GET_ELM_PREC(left,i),GET_ELM_PREC(right,i)) ) { + return LT( GET_ELM_PREC(left,i), GET_ELM_PREC(right,i) ) ? True : False; - } + } } @@ -1202,7 +1206,7 @@ Obj FuncLT_PREC ( if ( ! (method = MethodPRec( right, LtRNam )) && ! (method = MethodPRec( left, LtRNam )) ) { - return FuncLT_PREC_DEFAULT( self, left, right ); + return FuncLT_PREC_DEFAULT( self, left, right ); } /* call that function */ @@ -1212,34 +1216,72 @@ Obj FuncLT_PREC ( /**************************************************************************** ** +*F SavePRec( ) +** +*/ -*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +void SavePRec( Obj prec ) +{ + UInt len,i; + len = LEN_PREC(prec); + for (i = 1; i <= len; i++) + { + SaveUInt(GET_RNAM_PREC(prec, i)); + SaveSubObj(GET_ELM_PREC(prec, i)); + } + return; +} + +/**************************************************************************** +** +*F LoadPRec( ) +** */ +void LoadPRec( Obj prec ) +{ + UInt len,i; + len = LEN_PREC(prec); + for (i = 1; i <= len; i++) + { + SET_RNAM_PREC(prec, i, LoadUInt()); + SET_ELM_PREC(prec, i, LoadSubObj()); + } + return; +} + /**************************************************************************** ** -*F InitPRecord() . . . . . . . . . . . . . . . . . initialize record package +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + +/**************************************************************************** ** -** 'InitPRecord' initializes the record package. + +*F SetupPRecord() . . . . . . . . . . . . . . initialize the record package */ -void InitPRecord ( void ) +void SetupPRecord ( void ) { /* install the marking function */ - InfoBags[ T_PREC ].name - = "record (plain)"; + InfoBags[ T_PREC ].name = "record (plain)"; + InfoBags[ T_PREC +IMMUTABLE ].name = "record (plain,imm)"; + InfoBags[ T_PREC +COPYING ].name = "record (plain,copied)"; + InfoBags[ T_PREC +IMMUTABLE +COPYING ].name = "record (plain,imm,copied)"; + InitMarkFuncBags( T_PREC , MarkAllSubBags ); - InfoBags[ T_PREC +IMMUTABLE ].name - = "record (plain,immutable)"; InitMarkFuncBags( T_PREC +IMMUTABLE , MarkAllSubBags ); - InfoBags[ T_PREC +COPYING ].name - = "record (plain,copied)"; InitMarkFuncBags( T_PREC +COPYING , MarkAllSubBags ); - InfoBags[ T_PREC +IMMUTABLE +COPYING ].name - = "record (plain,immutable,copied)"; InitMarkFuncBags( T_PREC +IMMUTABLE +COPYING , MarkAllSubBags ); + /* Install saving functions */ + SaveObjFuncs[ T_PREC ] = SavePRec; + SaveObjFuncs[ T_PREC +IMMUTABLE ] = SavePRec; + LoadObjFuncs[ T_PREC ] = LoadPRec; + LoadObjFuncs[ T_PREC +IMMUTABLE ] = LoadPRec; + + /* install into record function tables */ ElmRecFuncs[ T_PREC ] = ElmPRec; ElmRecFuncs[ T_PREC +IMMUTABLE ] = ElmPRec; @@ -1251,14 +1293,6 @@ void InitPRecord ( void ) UnbRecFuncs[ T_PREC +IMMUTABLE ] = UnbPRecImm; - /* install the kind function */ - ImportGVarFromLibrary( "TYPE_PREC_MUTABLE", &TYPE_PREC_MUTABLE ); - ImportGVarFromLibrary( "TYPE_PREC_IMMUTABLE", &TYPE_PREC_IMMUTABLE ); - - TypeObjFuncs[ T_PREC ] = TypePRecMut; - TypeObjFuncs[ T_PREC +IMMUTABLE ] = TypePRecImm; - - /* install mutability test */ IsMutableObjFuncs[ T_PREC ] = IsMutablePRecYes; IsMutableObjFuncs[ T_PREC +IMMUTABLE ] = IsMutablePRecNo; @@ -1282,6 +1316,23 @@ void InitPRecord ( void ) PrintObjFuncs[ T_PREC +IMMUTABLE ] = PrintPRec; PrintPathFuncs[ T_PREC ] = PrintPathPRec; PrintPathFuncs[ T_PREC +IMMUTABLE ] = PrintPathPRec; +} + + +/**************************************************************************** +** +*F InitPRecord() . . . . . . . . . . . . . . . initialize the record package +** +** 'InitPRecord' initializes the record package. +*/ +void InitPRecord ( void ) +{ + /* install the kind function */ + ImportGVarFromLibrary( "TYPE_PREC_MUTABLE", &TYPE_PREC_MUTABLE ); + ImportGVarFromLibrary( "TYPE_PREC_IMMUTABLE", &TYPE_PREC_IMMUTABLE ); + + TypeObjFuncs[ T_PREC ] = TypePRecMut; + TypeObjFuncs[ T_PREC +IMMUTABLE ] = TypePRecImm; /* get the appropriate record record name */ @@ -1350,6 +1401,17 @@ void InitPRecord ( void ) } +/**************************************************************************** +** +*F CheckPRecord() . . . . . check the initialisation of the record package +*/ +void CheckPRecord ( void ) +{ + SET_REVISION( "precord_c", Revision_precord_c ); + SET_REVISION( "precord_h", Revision_precord_h ); +} + + /**************************************************************************** ** diff --git a/src/precord.h b/src/precord.h index d0da04c6f3..483865c7db 100644 --- a/src/precord.h +++ b/src/precord.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A precord.h GAP source Martin Schoenert +*W precord.h GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -9,13 +9,14 @@ ** This file declares the functions for plain records. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_precord_h = +SYS_CONST char * Revision_precord_h = "@(#)$Id$"; #endif /**************************************************************************** ** + *F NEW_PREC() . . . . . . . . . . . . . . . . . make a new plain record ** ** 'NEW_PREC' returns a new plain record with room for components. @@ -128,11 +129,39 @@ extern void UnbPRec ( /**************************************************************************** ** -*F InitPRecord() . . . . . . . . . . . . . . . . . initialize record package + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + +*F SetupPRecord() . . . . . . . . . . . . . . initialize the record package +*/ +extern void SetupPRecord ( void ); + + +/**************************************************************************** +** +*F InitPRecord() . . . . . . . . . . . . . . . initialize the record package ** ** 'InitPRecord' initializes the record package. */ -extern void InitPRecord ( void ); +extern void InitPRecord ( void ); + + +/**************************************************************************** +** +*F CheckPRecord() . . . . . check the initialisation of the record package +*/ +extern void CheckPRecord ( void ); + + +/**************************************************************************** +** + +*E precord.h . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/range.c b/src/range.c index a9faed9ab8..90bd6d1d6e 100644 --- a/src/range.c +++ b/src/range.c @@ -48,32 +48,39 @@ ** ** The third part consists ... */ -char * Revision_range_c = +#include "system.h" /* system dependent part */ + +SYS_CONST char * Revision_range_c = "@(#)$Id$"; -#include "system.h" /* system dependent functions */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ -#include "gasman.h" /* NewBag, ResizeBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, SIZE_OBJ, ... */ -#include "scanner.h" /* Pr */ +#include "gap.h" /* error handling, initialisation */ -#include "gvars.h" /* AssGVar, GVarName */ +#include "gvars.h" /* global variables */ #include "calls.h" /* generic call mechanism */ -#include "opers.h" /* generic operations package */ +#include "opers.h" /* generic operations */ + +#include "gap.h" /* error handling, initialisation */ -#include "ariths.h" /* generic operations package */ -#include "lists.h" /* generic list package */ +#include "ariths.h" /* basic arithmetic */ -#include "bool.h" /* True, False */ +#include "bool.h" /* booleans */ -#include "plist.h" /* GET_LEN_PLIST, GET_ELM_PLIST,...*/ +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ +#include "lists.h" /* generic lists */ +#include "plist.h" /* plain lists */ #define INCLUDE_DECLARATION_PART -#include "range.h" /* declaration part of the package */ +#include "range.h" /* ranges */ #undef INCLUDE_DECLARATION_PART +#include "string.h" /* strings */ -#include "gap.h" /* Error */ +#include "saveload.h" /* saving and loading */ /**************************************************************************** @@ -1047,57 +1054,177 @@ Obj IsRangeHandler ( /**************************************************************************** ** +*F SaveRange( ) +** +*/ -*F InitRange() . . . . . . . . . . . . . . . . initialize the range package +void SaveRange( Obj range ) +{ + SaveSubObj(ADDR_OBJ(range)[0]); /* length */ + SaveSubObj(ADDR_OBJ(range)[1]); /* base */ + SaveSubObj(ADDR_OBJ(range)[2]); /* increment */ +} + +/**************************************************************************** ** -** 'InitRange' initializes the range package. +*F LoadRange( ) +** +*/ + +void LoadRange( Obj range ) +{ + ADDR_OBJ(range)[0] = LoadSubObj(); /* length */ + ADDR_OBJ(range)[1] = LoadSubObj(); /* base */ + ADDR_OBJ(range)[2] = LoadSubObj(); /* increment */ +} + + +/**************************************************************************** +** +*F Range2Check( , ) . . . . . . . . . . . . . construct range +*/ +Obj Range2Check ( + Obj first, + Obj last ) +{ + Obj range; + Int f, l; + if ( ! IS_INTOBJ(first) ) { + ErrorQuit( + "Range: must be a positive small integer (not a %s)", + (Int)TNAM_OBJ(first), 0L ); + } + f = INT_INTOBJ(first); + if ( ! IS_INTOBJ(last) ) { + ErrorQuit( + "Range: must be a positive small integer (not a %s)", + (Int)TNAM_OBJ(last), 0L ); + } + l = INT_INTOBJ(last); + if ( f > l ) { + range = NEW_PLIST( T_PLIST, 0 ); + SET_LEN_PLIST( range, 0 ); + } + else if ( f == l ) { + range = NEW_PLIST( T_PLIST, 1 ); + SET_LEN_PLIST( range, 1 ); + SET_ELM_PLIST( range, 1, first ); + } + else { + range = NEW_RANGE_SSORT(); + SET_LEN_RANGE( range, (l-f) + 1 ); + SET_LOW_RANGE( range, f ); + SET_INC_RANGE( range, 1 ); + } + return range; +} + + +/**************************************************************************** +** +*F Range3Check( , , ) . . . . . . . . construct range +*/ +Obj Range3Check ( + Obj first, + Obj second, + Obj last ) +{ + Obj range; + Int f, i, l; + if ( ! IS_INTOBJ(first) ) { + ErrorQuit( + "Range: must be a positive small integer (not a %s)", + (Int)TNAM_OBJ(first), 0L ); + } + f = INT_INTOBJ(first); + if ( ! IS_INTOBJ(second) ) { + ErrorQuit( + "Range: must be a positive small integer (not a %s)", + (Int)TNAM_OBJ(second), 0L ); + } + if ( first == second ) { + ErrorQuit( + "Range: must not be equal to (%d)", + (Int)INT_INTOBJ(first), 0L ); + } + i = INT_INTOBJ(second) - f; + if ( ! IS_INTOBJ(last) ) { + ErrorQuit( + "Range: must be a positive small integer (not a %s)", + (Int)TNAM_OBJ(last), 0L ); + } + l = INT_INTOBJ(last); + if ( (l - f) % i != 0 ) { + ErrorQuit( + "Range: - (%d) must be divisible by (%d)", + (Int)(l - f), (Int)i ); + } + if ( (0 < i && f > l) || (i < 0 && f < l) ) { + range = NEW_PLIST( T_PLIST, 0 ); + SET_LEN_PLIST( range, 0 ); + } + else if ( f == l ) { + range = NEW_PLIST( T_PLIST, 1 ); + SET_LEN_PLIST( range, 1 ); + SET_ELM_PLIST( range, 1, first ); + } + else { + if ( 0 < i ) + range = NEW_RANGE_SSORT(); + else + range = NEW_RANGE_NSORT(); + SET_LEN_RANGE( range, (l - f) / i + 1 ); + SET_LOW_RANGE( range, f ); + SET_INC_RANGE( range, i ); + } + return range; +} + + +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + +*F SetupRange() . . . . . . . . . . . . . . . . initialize the range package */ -void InitRange ( void ) +void SetupRange ( void ) { /* install the marking functions */ - InfoBags[ T_RANGE_NSORT ].name - = "list (range)"; + InfoBags[ T_RANGE_NSORT ].name = "list (range,nsort)"; + InfoBags[ T_RANGE_NSORT +IMMUTABLE ].name = "list (range,nsort,imm)"; + InfoBags[ T_RANGE_SSORT ].name = "list (range,ssort)"; + InfoBags[ T_RANGE_SSORT +IMMUTABLE ].name = "list (range,ssort,imm)"; + InfoBags[ T_RANGE_NSORT +COPYING ].name = "list (range,nsort,copied)"; + InfoBags[ T_RANGE_NSORT +IMMUTABLE +COPYING ].name = "list (range,nsort,imm,copied)"; + InfoBags[ T_RANGE_SSORT +COPYING ].name = "list (range,ssort,copied)"; + InfoBags[ T_RANGE_SSORT +IMMUTABLE +COPYING ].name = "list (range,ssort,imm,copied)"; + InitMarkFuncBags( T_RANGE_NSORT , MarkAllSubBags ); - InfoBags[ T_RANGE_NSORT +IMMUTABLE ].name - = "list (range)"; InitMarkFuncBags( T_RANGE_NSORT +IMMUTABLE , MarkAllSubBags ); - InfoBags[ T_RANGE_SSORT ].name - = "list (range)"; InitMarkFuncBags( T_RANGE_SSORT , MarkAllSubBags ); - InfoBags[ T_RANGE_SSORT +IMMUTABLE ].name - = "list (range)"; InitMarkFuncBags( T_RANGE_SSORT +IMMUTABLE , MarkAllSubBags ); - InfoBags[ T_RANGE_NSORT +COPYING ].name - = "list (range), copied"; InitMarkFuncBags( T_RANGE_NSORT +COPYING , MarkAllSubBags ); - InfoBags[ T_RANGE_NSORT +IMMUTABLE +COPYING ].name - = "list (range), copied"; InitMarkFuncBags( T_RANGE_NSORT +IMMUTABLE +COPYING , MarkAllSubBags ); - InfoBags[ T_RANGE_SSORT +COPYING ].name - = "list (range), copied"; InitMarkFuncBags( T_RANGE_SSORT +COPYING , MarkAllSubBags ); - InfoBags[ T_RANGE_SSORT +IMMUTABLE +COPYING ].name - = "list (range), copied"; InitMarkFuncBags( T_RANGE_SSORT +IMMUTABLE +COPYING , MarkAllSubBags ); - /* install the kind function */ - ImportGVarFromLibrary( "TYPE_RANGE_NSORT_MUTABLE", - &TYPE_RANGE_NSORT_MUTABLE ); - - ImportGVarFromLibrary( "TYPE_RANGE_SSORT_MUTABLE", - &TYPE_RANGE_SSORT_MUTABLE ); - - ImportGVarFromLibrary( "TYPE_RANGE_NSORT_IMMUTABLE", - &TYPE_RANGE_NSORT_IMMUTABLE ); - - ImportGVarFromLibrary( "TYPE_RANGE_SSORT_IMMUTABLE", - &TYPE_RANGE_SSORT_IMMUTABLE ); + /* Saving functions */ + SaveObjFuncs[T_RANGE_NSORT ] = SaveRange; + SaveObjFuncs[T_RANGE_NSORT +IMMUTABLE ] = SaveRange; + SaveObjFuncs[T_RANGE_SSORT ] = SaveRange; + SaveObjFuncs[T_RANGE_SSORT +IMMUTABLE ] = SaveRange; + LoadObjFuncs[T_RANGE_NSORT ] = LoadRange; + LoadObjFuncs[T_RANGE_NSORT +IMMUTABLE ] = LoadRange; + LoadObjFuncs[T_RANGE_SSORT ] = LoadRange; + LoadObjFuncs[T_RANGE_SSORT +IMMUTABLE ] = LoadRange; - TypeObjFuncs[ T_RANGE_NSORT ] = TypeRangeNSortMutable; - TypeObjFuncs[ T_RANGE_NSORT +IMMUTABLE ] = TypeRangeNSortImmutable; - TypeObjFuncs[ T_RANGE_SSORT ] = TypeRangeSSortMutable; - TypeObjFuncs[ T_RANGE_SSORT +IMMUTABLE ] = TypeRangeSSortImmutable; /* install the copy methods */ CopyObjFuncs [ T_RANGE_NSORT ] = CopyRange; @@ -1117,12 +1244,14 @@ void InitRange ( void ) CleanObjFuncs[ T_RANGE_SSORT +IMMUTABLE ] = CleanRange; CleanObjFuncs[ T_RANGE_SSORT +IMMUTABLE +COPYING ] = CleanRangeCopy; + /* install the print method */ PrintObjFuncs[ T_RANGE_NSORT ] = PrintRange; PrintObjFuncs[ T_RANGE_NSORT +IMMUTABLE ] = PrintRange; PrintObjFuncs[ T_RANGE_SSORT ] = PrintRange; PrintObjFuncs[ T_RANGE_SSORT +IMMUTABLE ] = PrintRange; + /* install the comparison methods */ EqFuncs[ T_RANGE_NSORT ][ T_RANGE_NSORT ] = EqRange; EqFuncs[ T_RANGE_NSORT ][ T_RANGE_SSORT ] = EqRange; @@ -1133,6 +1262,7 @@ void InitRange ( void ) LtFuncs[ T_RANGE_SSORT ][ T_RANGE_NSORT ] = LtRange; LtFuncs[ T_RANGE_SSORT ][ T_RANGE_SSORT ] = LtRange; + /* install the list functions in the tables */ LenListFuncs [ T_RANGE_NSORT ] = LenRange; LenListFuncs [ T_RANGE_NSORT +IMMUTABLE ] = LenRange; @@ -1202,12 +1332,50 @@ void InitRange ( void ) PlainListFuncs [ T_RANGE_NSORT +IMMUTABLE ] = PlainRange; PlainListFuncs [ T_RANGE_SSORT ] = PlainRange; PlainListFuncs [ T_RANGE_SSORT +IMMUTABLE ] = PlainRange; +} + + +/**************************************************************************** +** +*F InitRange() . . . . . . . . . . . . . . . . initialize the range package +** +** 'InitRange' initializes the range package. +*/ +void InitRange ( void ) +{ + /* install the kind function */ + ImportGVarFromLibrary( "TYPE_RANGE_NSORT_MUTABLE", + &TYPE_RANGE_NSORT_MUTABLE ); + + ImportGVarFromLibrary( "TYPE_RANGE_SSORT_MUTABLE", + &TYPE_RANGE_SSORT_MUTABLE ); + + ImportGVarFromLibrary( "TYPE_RANGE_NSORT_IMMUTABLE", + &TYPE_RANGE_NSORT_IMMUTABLE ); + + ImportGVarFromLibrary( "TYPE_RANGE_SSORT_IMMUTABLE", + &TYPE_RANGE_SSORT_IMMUTABLE ); + + TypeObjFuncs[ T_RANGE_NSORT ] = TypeRangeNSortMutable; + TypeObjFuncs[ T_RANGE_NSORT +IMMUTABLE ] = TypeRangeNSortImmutable; + TypeObjFuncs[ T_RANGE_SSORT ] = TypeRangeSSortMutable; + TypeObjFuncs[ T_RANGE_SSORT +IMMUTABLE ] = TypeRangeSSortImmutable; + /* install the internal function */ - InitHandlerFunc( IsRangeHandler, "IsRange" ); - IsRangeFilt = NewFilterC( "IsRange", 1L, "obj", - IsRangeHandler ); - AssGVar( GVarName( "IS_RANGE" ), IsRangeFilt ); + C_NEW_GVAR_FILT( "IS_RANGE", "obj", IsRangeFilt, IsRangeHandler, + "src/range.c:IS_RANGE" ); +} + + +/**************************************************************************** +** +*F CheckRange() . . . . . . . check the initialisation of the range package +*/ +void CheckRange ( void ) +{ + SET_REVISION( "range_c", Revision_range_c ); + SET_REVISION( "range_h", Revision_range_h ); } diff --git a/src/range.h b/src/range.h index 4d7307c2ea..a73f6db55a 100644 --- a/src/range.h +++ b/src/range.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A range.h GAP source Martin Schoenert +*W range.h GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -21,13 +21,14 @@ ** installed in the appropriate tables by 'InitRange'. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_range_h = +SYS_CONST char * Revision_range_h = "@(#)$Id$"; #endif /**************************************************************************** ** + *F NEW_RANGE() . . . . . . . . . . . . . . . . . . . . . . make a new range ** ** 'NEW_RANGE' returns a new range. Note that you must set the length, the @@ -159,11 +160,56 @@ extern Int PosRange ( /**************************************************************************** ** -*V InitRange() . . . . . . . . . . . . . . . . initialize the ranges package +*F Range2Check( , ) . . . . . . . . . . . . . construct range +*/ +extern Obj Range2Check ( + Obj first, + Obj last ); + + +/**************************************************************************** +** +*F Range3Check( , , ) . . . . . . . . construct range +*/ +extern Obj Range3Check ( + Obj first, + Obj second, + Obj last ); + + +/**************************************************************************** ** -** 'InitRange' initializes the ranges package. + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * */ -extern void InitRange ( void ); +/**************************************************************************** +** + +*F SetupRange() . . . . . . . . . . . . . . . . initialize the range package +*/ +extern void SetupRange ( void ); + +/**************************************************************************** +** +*F InitRange() . . . . . . . . . . . . . . . . initialize the range package +** +** 'InitRange' initializes the range package. +*/ +extern void InitRange ( void ); + + +/**************************************************************************** +** +*F CheckRange() . . . . . . . check the initialisation of the range package +*/ +extern void CheckRange ( void ); + + +/**************************************************************************** +** + +*E range.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/rational.c b/src/rational.c index d34e9479e1..c95d266926 100644 --- a/src/rational.c +++ b/src/rational.c @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A rational.c GAP source Martin Schoenert +*W rational.c GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -41,35 +41,44 @@ ** would reduce the overhead introduced by the calls to the functions like ** 'SumInt', 'ProdInt' or 'GcdInt'. */ -char * Revision_rational_c = - "@(#)$Id$"; +#include "system.h" /* system dependent part */ -#include "system.h" /* Ints, UInts */ +SYS_CONST char * Revision_rational_c = + "@(#)$Id$"; -#include "gasman.h" /* NewBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, types */ -#include "scanner.h" /* Pr */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ -#include "gvars.h" /* AssGVar, GVarName */ +#include "gvars.h" /* global variables */ -#include "calls.h" /* NewFunctionC */ -#include "opers.h" /* NewFilterC */ +#include "calls.h" /* generic call mechanism */ +#include "opers.h" /* generic operations */ -#include "ariths.h" /* generic operations package */ +#include "ariths.h" /* basic arithmetic */ -#include "bool.h" /* True, False */ +#include "bool.h" /* booleans */ -#include "integer.h" /* SumInt, DiffInt, ProdInt, Quo...*/ +#include "integer.h" /* integers */ #define INCLUDE_DECLARATION_PART -#include "rational.h" /* declaration part of the package */ +#include "rational.h" /* rationals */ #undef INCLUDE_DECLARATION_PART -#include "gap.h" /* Error */ +#include "gap.h" /* error handling, initialisation */ + +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ + +#include "lists.h" /* generic lists */ +#include "string.h" /* strings */ + +#include "saveload.h" /* saving and loading */ /**************************************************************************** ** + *F NUM_RAT() . . . . . . . . . . . . . . . . . numerator of a rational *F DEN_RAT() . . . . . . . . . . . . . . . . denominator of a rational */ @@ -786,29 +795,53 @@ Obj FuncDenominatorRat ( } } +/**************************************************************************** +** +*F SaveRat( ) +** +*/ + +void SaveRat(Obj rat) +{ + SaveSubObj(NUM_RAT(rat)); + SaveSubObj(DEN_RAT(rat)); +} /**************************************************************************** ** -*F InitRat() . . . . . . . . . . . . . . . . initialize the rational package +*F LoadRat( ) ** -** 'InitRat' initializes the rational package. */ -void InitRat ( void ) + +void LoadRat(Obj rat) { - /* install the marking function */ - InfoBags[ T_RAT ].name = "rational"; - InitMarkFuncBags( T_RAT , MarkTwoSubBags ); + NUM_RAT(rat) = LoadSubObj(); + DEN_RAT(rat) = LoadSubObj(); +} +/**************************************************************************** +** - /* install the kind function */ - ImportGVarFromLibrary( "TYPE_RAT_POS", &TYPE_RAT_POS ); - ImportGVarFromLibrary( "TYPE_RAT_NEG", &TYPE_RAT_NEG ); +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ - TypeObjFuncs[ T_RAT ] = TypeRat; +/**************************************************************************** +** + +*F SetupRat() . . . . . . . . . . . . . . . initialize the rational package +*/ +void SetupRat ( void ) +{ + /* install the marking function */ + InfoBags[ T_RAT ].name = "rational"; + InitMarkFuncBags( T_RAT, MarkTwoSubBags ); + /* install a saving function */ + SaveObjFuncs[ T_RAT ] = SaveRat; + LoadObjFuncs[ T_RAT ] = LoadRat; /* install the printer */ - PrintObjFuncs[ T_RAT ] = PrintRat; + PrintObjFuncs[ T_RAT ] = PrintRat; /* install the comparisons */ @@ -881,20 +914,51 @@ void InitRat ( void ) PowFuncs [ T_RAT ][ T_INT ] = PowRat; PowFuncs [ T_RAT ][ T_INTPOS ] = PowRat; PowFuncs [ T_RAT ][ T_INTNEG ] = PowRat; +} + + +/**************************************************************************** +** +*F InitRat() . . . . . . . . . . . . . . . . initialize the rational package +** +** 'InitRat' initializes the rational package. +*/ +void InitRat ( void ) +{ + /* install the kind function */ + ImportGVarFromLibrary( "TYPE_RAT_POS", &TYPE_RAT_POS ); + ImportGVarFromLibrary( "TYPE_RAT_NEG", &TYPE_RAT_NEG ); + + TypeObjFuncs[ T_RAT ] = TypeRat; /* install the internal functions */ - InitHandlerFunc( IsRatHandler, "IS_RAT" ); - IsRatFilt = NewFilterC( "IS_RAT", 1L, "obj", - IsRatHandler ); - AssGVar( GVarName( "IS_RAT" ), IsRatFilt ); - InitHandlerFunc( FuncNumeratorRat, "NUMERATOR_RAT" ); - AssGVar( GVarName( "NUMERATOR_RAT" ), - NewFunctionC( "NUMERATOR_RAT", 1L, "rat", FuncNumeratorRat ) ); - InitHandlerFunc( FuncDenominatorRat, "DENOMINATOR_RAT" ); - AssGVar( GVarName( "DENOMINATOR_RAT" ), - NewFunctionC( "DENOMINATOR_RAT", 1L, "rat", FuncDenominatorRat ) ); + C_NEW_GVAR_FILT( "IS_RAT", "obj", IsRatFilt, IsRatHandler, + "src/rational.c:IS_RAT" ); + + C_NEW_GVAR_FUNC( "NUMERATOR_RAT", 1, "rat", + FuncNumeratorRat, + "src/rational.c:NUMERATOR_RAT" ); + + C_NEW_GVAR_FUNC( "DENOMINATOR_RAT", 1, "rat", + FuncDenominatorRat, + "src/rational.c:DENOMINATOR_RAT" ); +} + + +/**************************************************************************** +** +*F CheckRat() . . . . . . check the initialisation of the rational package +*/ +void CheckRat ( void ) +{ + SET_REVISION( "rational_c", Revision_rational_c ); + SET_REVISION( "rational_h", Revision_rational_h ); } +/**************************************************************************** +** +*E rational.c . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/rational.h b/src/rational.h index b9810e58b9..9adfbd1a9a 100644 --- a/src/rational.h +++ b/src/rational.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A rational.h GAP source Martin Schoenert +*W rational.h GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -17,18 +17,44 @@ ** something must not be an integer. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_rational_h = +SYS_CONST char * Revision_rational_h = "@(#)$Id$"; #endif +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + +*F SetupRat() . . . . . . . . . . . . . . . initialize the rational package +*/ +extern void SetupRat ( void ); + + /**************************************************************************** ** *F InitRat() . . . . . . . . . . . . . . . . initialize the rational package ** ** 'InitRat' initializes the rational package. */ -extern void InitRat ( void ); +extern void InitRat ( void ); + + +/**************************************************************************** +** +*F CheckRat() . . . . . . check the initialisation of the rational package +*/ +extern void CheckRat ( void ); +/**************************************************************************** +** + +*E rational.c . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/read.c b/src/read.c index a25773f274..5168bb7219 100644 --- a/src/read.c +++ b/src/read.c @@ -8,17 +8,17 @@ ** ** This module contains the functions to read expressions and statements. */ -char * Revision_read_c = +#include "system.h" /* system dependent part */ + +SYS_CONST char * Revision_read_c = "@(#)$Id$"; -#include "system.h" /* system dependent part */ - #include "gasman.h" /* garbage collector */ #include "objects.h" /* objects */ #include "scanner.h" /* scanner */ -#include "gap.h" /* error handling */ +#include "gap.h" /* error handling, initialisation */ #include "gvars.h" /* global variables */ #include "calls.h" /* generic call mechanism */ @@ -26,6 +26,7 @@ char * Revision_read_c = #include "vars.h" /* variables */ #include "records.h" /* generic records */ +#include "precord.h" /* plain records */ #include "lists.h" /* generic lists */ #include "plist.h" /* plain lists */ @@ -34,7 +35,7 @@ char * Revision_read_c = #include "intrprtr.h" /* interpreter */ #define INCLUDE_DECLARATION_PART -#include "read.h" /* declaration part of the package */ +#include "read.h" /* reader */ #undef INCLUDE_DECLARATION_PART @@ -393,9 +394,9 @@ void ReadCallVarAss ( /* if we need a statement */ else if ( mode == 's' || (mode == 'x' && Symbol == S_ASSIGN) ) { if ( type != 'c' ) { - Match( S_ASSIGN, ":=", follow ); - if ( CountNams == 0 ) { CurrLHSGVar = var; } - ReadExpr( follow, 'r' ); + Match( S_ASSIGN, ":=", follow ); + if ( CountNams == 0 ) { CurrLHSGVar = var; } + ReadExpr( follow, 'r' ); } if ( READ_ERROR() ) {} else if ( type == 'l' ) { IntrAssLVar( var ); } @@ -1340,27 +1341,6 @@ void ReadSaveWS ( if ( ! READ_ERROR() ) { IntrSaveWSEnd(); } } -/**************************************************************************** -** -*F ReadLoadWS( ) . . . . . . . . . .read a LoadWorkspace statement -** -** 'ReadLoadWS' reads a LoadWorkspace statement. -** In case of an error it skips all -** symbols up to one contained in . -** -** := 'LoadWorkspace' '(' ')' -*/ -void ReadLoadWS ( - TypSymbolSet follow ) -{ - if ( ! READ_ERROR() ) { IntrLoadWSBegin(); } - Match( S_LOADWS, "LoadWorkspace", follow ); - Match( S_LPAREN, "(", follow ); - ReadExpr( S_RPAREN | follow, 'r' ); - Match( S_RPAREN, ")", follow ); - if ( ! READ_ERROR() ) { IntrLoadWSEnd(); } -} - /**************************************************************************** ** @@ -1799,7 +1779,6 @@ UInt ReadEvalCommand ( void ) else if (Symbol==S_INFO ) { ReadInfo( S_SEMICOLON|S_EOF ); } else if (Symbol==S_ASSERT ) { ReadAssert( S_SEMICOLON|S_EOF ); } else if (Symbol== S_SAVEWS ) { ReadSaveWS( S_SEMICOLON|S_EOF ); } - else if (Symbol== S_LOADWS ) { ReadLoadWS( S_SEMICOLON|S_EOF ); } else if (Symbol==S_IF ) { ReadIf( S_SEMICOLON|S_EOF ); } else if (Symbol==S_FOR ) { ReadFor( S_SEMICOLON|S_EOF ); } else if (Symbol==S_WHILE ) { ReadWhile( S_SEMICOLON|S_EOF ); } @@ -1814,16 +1793,16 @@ UInt ReadEvalCommand ( void ) /* every statement must be terminated by a semicolon */ if ( Symbol != S_SEMICOLON ) { - SyntaxError( "; expected"); + SyntaxError( "; expected"); } /* check for dual semicolon */ if ( *In == ';' ) { - GetSymbol(); - DualSemicolon = 1; + GetSymbol(); + DualSemicolon = 1; } else { - DualSemicolon = 0; + DualSemicolon = 0; } /* end the interpreter */ @@ -2000,14 +1979,36 @@ void ReadEvalError ( void ) /**************************************************************************** ** +*F SetupRead() . . . . . . . . . . . . . . . . . . . . initialize the reader +*/ +void SetupRead ( void ) +{ +} + + +/**************************************************************************** +** *F InitRead() . . . . . . . . . . . . . . . . . . . . initialize the reader ** ** 'InitRead' initializes the reader. */ -void InitRead ( void ) +void InitRead ( void ) +{ + InitGlobalBag( &ReadEvalResult, "src/read.c:ReadEvalResult" ); + InitGlobalBag( &StackNams, "src/read.c:StackNams" ); +} + + +/**************************************************************************** +** +*F CheckRead() . . . . . . . . . . . check the initialisation of the reader +** +** 'InitRead' initializes the reader. +*/ +void CheckRead ( void ) { - InitGlobalBag( &ReadEvalResult, "read: ReadEvalResult" ); - InitGlobalBag( &StackNams, "read: names stack" ); + SET_REVISION( "read_c", Revision_read_c ); + SET_REVISION( "read_h", Revision_read_h ); } diff --git a/src/read.h b/src/read.h index dddbd4c4f9..2ea968530a 100644 --- a/src/read.h +++ b/src/read.h @@ -9,7 +9,7 @@ ** This module declares the functions to read expressions and statements. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_read_h = +SYS_CONST char * Revision_read_h = "@(#)$Id$"; #endif @@ -96,6 +96,13 @@ extern void ReadEvalError ( void ); /**************************************************************************** ** +*F SetupRead() . . . . . . . . . . . . . . . . . . . . initialize the reader +*/ +extern void SetupRead ( void ); + + +/**************************************************************************** +** *F InitRead() . . . . . . . . . . . . . . . . . . . . initialize the reader ** ** 'InitRead' initializes the reader. @@ -103,6 +110,15 @@ extern void ReadEvalError ( void ); extern void InitRead ( void ); +/**************************************************************************** +** +*F CheckRead() . . . . . . . . . . . check the initialisation of the reader +** +** 'InitRead' initializes the reader. +*/ +extern void CheckRead ( void ); + + /**************************************************************************** ** diff --git a/src/records.c b/src/records.c index 9b08a19b1c..d9ce490003 100644 --- a/src/records.c +++ b/src/records.c @@ -1,6 +1,6 @@ /**************************************************************************** ** -*F records.c GAP source Martin Schoenert +*W records.c GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -11,34 +11,39 @@ ** This package provides a uniform interface to the functions that access ** records and the elements for the other packages in the GAP kernel. */ -char * Revision_records_c = - "@(#)$Id$"; +#include "system.h" /* system dependent part */ -#include "system.h" /* Ints, UInts */ +SYS_CONST char * Revision_records_c = + "@(#)$Id$"; -#include "gasman.h" /* NewBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, types */ -#include "scanner.h" /* Pr */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ -#include "gvars.h" /* AssGVar, GVarName */ +#include "gvars.h" /* global variables */ -#include "calls.h" /* NewFunctionC */ -#include "opers.h" /* NewOperationC, DoOperation2Args */ +#include "calls.h" /* generic call mechanism */ +#include "opers.h" /* generic operations */ #define INCLUDE_DECLARATION_PART -#include "records.h" /* declaration part of the package */ +#include "records.h" /* generic records */ #undef INCLUDE_DECLARATION_PART -#include "bool.h" /* True, False */ +#include "gap.h" /* error handling, initialisation */ + +#include "bool.h" /* booleans */ -#include "plist.h" /* NEW_PLIST, SET_LEN_PLIST, SET...*/ -#include "string.h" /* NEW_STRING, CSTR_STRING */ +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ -#include "gap.h" /* Error */ +#include "lists.h" /* generic lists */ +#include "plist.h" /* plain lists */ +#include "string.h" /* strings */ /**************************************************************************** ** + *F CountRnam . . . . . . . . . . . . . . . . . . . . number of record names ** ** 'CountRnam' is the number of record names. @@ -205,8 +210,6 @@ UInt RNamObj ( ** 'RNamObj' returns the record name corresponding to the object , ** which currently must be a string or an integer. */ -Obj RNamObjFunc; - Obj RNamObjHandler ( Obj self, Obj obj ) @@ -237,7 +240,7 @@ Obj NameRNamHandler ( || CountRNam < INT_INTOBJ(rnam) ) { rnam = ErrorReturnObj( "NameRName: must be a record name (not a %s)", - (Int)(InfoBags[TNUM_OBJ(rnam)].name), 0L, + (Int)TNAM_OBJ(rnam), 0L, "you can return a record name for " ); } name = NEW_STRING( SyStrlen( NAME_RNAM( INT_INTOBJ(rnam) ) ) ); @@ -327,7 +330,7 @@ Obj ElmRecError ( { rec = ErrorReturnObj( "Record Element: must be a record (not a %s)", - (Int)(InfoBags[TNUM_OBJ(rec)].name), 0L, + (Int)TNAM_OBJ(rec), 0L, "you can return a record for " ); return ELM_REC( rec, rnam ); } @@ -336,7 +339,13 @@ Obj ElmRecObject ( Obj obj, UInt rnam ) { - return DoOperation2Args( ElmRecOper, obj, INTOBJ_INT(rnam) ); + Obj elm; + elm = DoOperation2Args( ElmRecOper, obj, INTOBJ_INT(rnam) ); + while (elm == 0) + elm = ErrorReturnObj("Record access method must return a value",0L,0L, + "you can return a value or quit"); + return elm; + } @@ -374,7 +383,7 @@ Int IsbRecError ( { rec = ErrorReturnObj( "IsBound: must be a record (not a %s)", - (Int)(InfoBags[TNUM_OBJ(rec)].name), 0L, + (Int)TNAM_OBJ(rec), 0L, "you can return a record for " ); return ISB_REC( rec, rnam ); } @@ -421,7 +430,7 @@ void AssRecError ( { rec = ErrorReturnObj( "Record Assignment: must be a record (not a %s)", - (Int)(InfoBags[TNUM_OBJ(rec)].name), 0L, + (Int)TNAM_OBJ(rec), 0L, "you can return a record for " ); ASS_REC( rec, rnam, obj ); } @@ -469,7 +478,7 @@ void UnbRecError ( { rec = ErrorReturnObj( "Unbind: must be a record (not a %s)", - (Int)(InfoBags[TNUM_OBJ(rec)].name), 0L, + (Int)TNAM_OBJ(rec), 0L, "you can return a record for " ); UNB_REC( rec, rnam ); } @@ -534,38 +543,20 @@ UInt completion_rnam ( /**************************************************************************** ** -*F InitRecords() . . . . . . . . . . initialize the generic records package + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + +/**************************************************************************** ** -** 'InitRecords' initializes the generic records package. + +*F SetupRecords() . . . . . . . . . initialize the generic records package */ -void InitRecords ( void ) +void SetupRecords ( void ) { UInt type; /* loop variable */ - /* make the list of names of record names */ - CountRNam = 0; - InitGlobalBag( &NamesRNam, "record: NamesRNam" ); - NamesRNam = NEW_PLIST( T_PLIST, 0 ); - SET_LEN_PLIST( NamesRNam, 0 ); - - /* make the hash list of record names */ - SizeRNam = 997; - InitGlobalBag( &HashRNam, "record: HashRNam" ); - HashRNam = NEW_PLIST( T_PLIST, SizeRNam ); - SET_LEN_PLIST( HashRNam, SizeRNam ); - - /* make and install the 'RNamObj' and 'NameRName' functions */ - InitHandlerFunc( RNamObjHandler, "RNamObj" ); - RNamObjFunc = NewFunctionC( "RNamObj", 1L, "obj", RNamObjHandler ); - AssGVar( GVarName( "RNamObj" ), RNamObjFunc ); - InitHandlerFunc( NameRNamHandler, "NameRNam" ); - NameRNamFunc = NewFunctionC( "NameRNam", 1L, "rnam", NameRNamHandler ); - AssGVar( GVarName( "NameRNam" ), NameRNamFunc ); - /* make and install the 'IS_REC' filter */ - InitHandlerFunc( IsRecHandler, "IS_REC" ); - IsRecFilt = NewFilterC( "IS_REC", 1L, "obj", IsRecHandler ); - AssGVar( GVarName( "IS_REC" ), IsRecFilt ); for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) { IsRecFuncs[ type ] = IsRecNot; } @@ -576,11 +567,8 @@ void InitRecords ( void ) IsRecFuncs[ type ] = IsRecObject; } + /* make and install the 'ELM_REC' operations */ - InitHandlerFunc( ElmRecHandler, "ELM_REC" ); - ElmRecOper = NewOperationC( "ELM_REC", 2L, "obj, rnam", - ElmRecHandler ); - AssGVar( GVarName( "ELM_REC" ), ElmRecOper ); for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) { ElmRecFuncs[ type ] = ElmRecError; } @@ -588,11 +576,8 @@ void InitRecords ( void ) ElmRecFuncs[ type ] = ElmRecObject; } + /* make and install the 'ISB_REC' operation */ - InitHandlerFunc( IsbRecHandler, "ISB_REC" ); - IsbRecOper = NewOperationC( "ISB_REC", 2L, "obj, rnam", - IsbRecHandler ); - AssGVar( GVarName( "ISB_REC" ), IsbRecOper ); for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) { IsbRecFuncs[ type ] = IsbRecError; } @@ -600,11 +585,8 @@ void InitRecords ( void ) IsbRecFuncs[ type ] = IsbRecObject; } + /* make and install the 'ASS_REC' operation */ - InitHandlerFunc( AssRecHandler, "ASS_REC" ); - AssRecOper = NewOperationC( "ASS_REC", 3L, "obj, rnam, val", - AssRecHandler ); - AssGVar( GVarName( "ASS_REC" ), AssRecOper ); for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) { AssRecFuncs[ type ] = AssRecError; } @@ -612,19 +594,101 @@ void InitRecords ( void ) AssRecFuncs[ type ] = AssRecObject; } + /* make and install the 'UNB_REC' operation */ - InitHandlerFunc( UnbRecHandler, "UNB_REC" ); - UnbRecOper = NewOperationC( "UNB_REC", 2L, "obj, rnam", - UnbRecHandler ); - AssGVar( GVarName( "UNB_REC" ), UnbRecOper ); for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) { UnbRecFuncs[ type ] = UnbRecError; } for ( type = FIRST_EXTERNAL_TNUM; type <= LAST_EXTERNAL_TNUM; type++ ) { UnbRecFuncs[ type ] = UnbRecObject; } +} + + + +/**************************************************************************** +** +*F InitRecords() . . . . . . . . . . initialize the generic records package +** +** 'InitRecords' initializes the generic records package. +*/ +void InitRecords ( void ) +{ + /* make the list of names of record names */ + InitGlobalBag( &NamesRNam, "src/records.c:NamesRNam" ); + if ( 1 || ! SyRestoring ) { + CountRNam = 0; + NamesRNam = NEW_PLIST( T_PLIST, 0 ); + SET_LEN_PLIST( NamesRNam, 0 ); + } + else { + CountRNam = LEN_PLIST(NamesRNam); + } + + /* make the hash list of record names */ + InitGlobalBag( &HashRNam, "src/records.c:HashRNam" ); + if ( 1 || ! SyRestoring ) { + SizeRNam = 997; + HashRNam = NEW_PLIST( T_PLIST, SizeRNam ); + SET_LEN_PLIST( HashRNam, SizeRNam ); + } + else { + SizeRNam = LEN_PLIST(HashRNam); + } + + + /* make and install the 'RNamObj' and 'NameRName' functions */ + C_NEW_GVAR_FUNC( "RNamObj", 1, "obj", + RNamObjHandler, + "src/records.c:RNamObj" ); + + C_NEW_GVAR_FUNC( "NameRNam", 1, "rnam", + NameRNamHandler, + "src/records.c:NameRNam" ); + + + /* make and install the 'IS_REC' filter */ + C_NEW_GVAR_FILT( "IS_REC", "obj", IsRecFilt, IsRecHandler, + "src/records.c:IS_REC" ); + + + /* make and install the 'ELM_REC' operations */ + C_NEW_GVAR_OPER( "ELM_REC", 2L, "obj, rnam", ElmRecOper, ElmRecHandler, + "src/records.c:ELM_REC" ); + + + /* make and install the 'ISB_REC' operation */ + C_NEW_GVAR_OPER( "ISB_REC", 2L, "obj, rnam", IsbRecOper, IsbRecHandler, + "src/records.c:ISB_REC" ); + + + /* make and install the 'ASS_REC' operation */ + C_NEW_GVAR_OPER( "ASS_REC", 3L, "obj, rnam, val", AssRecOper, AssRecHandler, + "src/records.c:ASS_REC" ); + + + /* make and install the 'UNB_REC' operation */ + C_NEW_GVAR_OPER( "UNB_REC", 2L, "obj, rnam", UnbRecOper, UnbRecHandler, + "src/records.c:UNB_REC" ); } +/**************************************************************************** +** +*F CheckRecords() . check the initialisation of the generic records package +*/ +void CheckRecords ( void ) +{ + SET_REVISION( "records_c", Revision_records_c ); + SET_REVISION( "records_h", Revision_records_h ); +} + + +/**************************************************************************** +** + +*E records.c . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ + diff --git a/src/records.h b/src/records.h index d7c0903dc0..176bb525ee 100644 --- a/src/records.h +++ b/src/records.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -*F records.h GAP source Martin Schoenert +*W records.h GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -12,13 +12,14 @@ ** records and the elements for the other packages in the GAP kernel. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_records_h = +SYS_CONST char * Revision_records_h = "@(#)$Id$"; #endif /**************************************************************************** ** + *F NAME_RNAM() . . . . . . . . . . . . . . . . name for a record name ** ** 'NAME_RNAM' returns the name (as a C string) for the record name . @@ -164,13 +165,39 @@ extern UInt completion_rnam ( UInt len ); +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + +*F SetupRecords() . . . . . . . . . initialize the generic records package +*/ +extern void SetupRecords ( void ); + + /**************************************************************************** ** *F InitRecords() . . . . . . . . . . initialize the generic records package ** ** 'InitRecords' initializes the generic records package. */ -extern void InitRecords ( void ); +extern void InitRecords ( void ); + + +/**************************************************************************** +** +*F CheckRecords() . check the initialisation of the generic records package +*/ +extern void CheckRecords ( void ); +/**************************************************************************** +** + +*E records.h . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/saveload.c b/src/saveload.c index 54b64ed621..f479218be7 100644 --- a/src/saveload.c +++ b/src/saveload.c @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A saveload.c GAP source Steve Linton +*W saveload.c GAP source Steve Linton ** *H @(#)$Id$ ** @@ -10,24 +10,494 @@ ** the workspace. There are support functions in gasman.c and elsewhere ** throughout the kernel */ -char * Revision_saveload_c = +#include "system.h" /* system dependent part */ + +SYS_CONST char * Revision_saveload_c = "@(#)$Id$"; -#include "system.h" /* UInt ... */ -#include "gasman.h" /* Bag */ -#include "objects.h" /* Obj .... */ -#include "bool.h" /* True, False */ -#include "calls.h" /* CALL_1ARGS */ -#include "gap.h" /* Error */ -#include "gvars.h" /* GVarName */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "bool.h" /* booleans */ +#include "calls.h" /* generic call mechanism */ +#include "gap.h" /* error handling, initialisation */ +#include "gvars.h" /* global variables */ +#include "string.h" /* strings */ +#include "scanner.h" /* scanner */ +#include "sysfiles.h" /* file input/output */ +#include "plist.h" /* plain lists */ #define INCLUDE_DECLARATION_PART -#include "saveload.h" +#include "saveload.h" /* saving and loading */ #undef INCLUDE_DECLARATION_PART + /*************************************************************************** ** -*F SaveWorkspace( ) . . . . . .save the workspace to the named file +** Temporary Stuff which will probably be revised to tie in with sysfiles +*/ +#include + +static FILE * SaveFile = NULL; + +static void OpenForSave( Obj fname ) +{ + if (SaveFile) + ErrorQuit("Already saving",0L,0L); + SaveFile = fopen(CSTR_STRING(fname), "wb"); + if (!SaveFile) + ErrorQuit("Panic: Couldn't open file %s ",(UInt)CSTR_STRING(fname),0L); +} + + +static void CloseAfterSave( void ) +{ + if (!SaveFile) + ErrorQuit("Not saving",0L,0L); + fclose(SaveFile); + SaveFile = NULL; +} + +static FILE *LoadFile; + + +static void OpenForLoad( Obj fname ) +{ + if (LoadFile) + ErrorQuit("Already saving",0L,0L); + LoadFile = fopen(CSTR_STRING(fname), "rb"); + if (!LoadFile) + ErrorQuit("Panic: Couldn't open file %s ",(UInt)CSTR_STRING(fname),0L); +} + + +static void CloseAfterLoad( void ) +{ + if (!LoadFile) + ErrorQuit("Not saving",0L,0L); + fclose(LoadFile); + LoadFile = NULL; +} + +#define SAVE_BYTE( byte ) (fputc((int) (byte), SaveFile)) + + +UInt1 LOAD_BYTE ( void ) +{ + int c; + c = fgetc(LoadFile); + if (c == EOF) + ErrorQuit("Unexpected End of File in Load", 0L, 0L ); + return c; +} + +/*************************************************************************** +** +** Low level saving routines +*/ + +void SaveUInt1( UInt1 data ) +{ + SAVE_BYTE( data ); +} + +UInt1 LoadUInt1( void ) +{ + return LOAD_BYTE( ); +} + +void SaveUInt2( UInt2 data ) +{ + SAVE_BYTE( (UInt1) (data & 0xFF) ); + SAVE_BYTE( (UInt1) (data >> 8) ); +} + +UInt2 LoadUInt2 ( void ) +{ + UInt2 res; + res = (UInt2)LOAD_BYTE(); + res |= (UInt2)LOAD_BYTE()<<8; + return res; +} + +void SaveUInt4( UInt4 data ) +{ + SAVE_BYTE( (UInt1) (data & 0xFF) ); + SAVE_BYTE( (UInt1) ((data >> 8) &0xFF) ); + SAVE_BYTE( (UInt1) ((data >> 16) &0xFF) ); + SAVE_BYTE( (UInt1) ((data >> 24) &0xFF) ); +} + +UInt4 LoadUInt4 ( void ) +{ + UInt4 res; + res = (UInt)LOAD_BYTE(); + res |= (UInt)LOAD_BYTE() << 8; + res |= (UInt)LOAD_BYTE() << 16; + res |= (UInt)LOAD_BYTE() << 24; + return res; +} + + +#ifdef SYS_IS_64BIT + +void SaveUInt8( UInt8 data ) +{ + SAVE_BYTE( (UInt1) (data & 0xFF) ); + SAVE_BYTE( (UInt1) ((data >> 8) &0xFF) ); + SAVE_BYTE( (UInt1) ((data >> 16) &0xFF) ); + SAVE_BYTE( (UInt1) ((data >> 24) &0xFF) ); + SAVE_BYTE( (UInt1) ((data >> 32) &0xFF) ); + SAVE_BYTE( (UInt1) ((data >> 40) &0xFF) ); + SAVE_BYTE( (UInt1) ((data >> 48) &0xFF) ); + SAVE_BYTE( (UInt1) ((data >> 56) &0xFF) ); +} + +UInt8 LoadUInt8 ( void ) +{ + UInt8 res; + res = (UInt)LOAD_BYTE(); + res |= (UInt)LOAD_BYTE() << 8; + res |= (UInt)LOAD_BYTE() << 16; + res |= (UInt)LOAD_BYTE() << 24; + res |= (UInt)LOAD_BYTE() << 32; + res |= (UInt)LOAD_BYTE() << 40; + res |= (UInt)LOAD_BYTE() << 48; + res |= (UInt)LOAD_BYTE() << 56; + + return res; +} + + +void SaveUInt( UInt data ) +{ + SAVE_BYTE( (UInt1) (data & 0xFF) ); + SAVE_BYTE( (UInt1) ((data >> 8) &0xFF) ); + SAVE_BYTE( (UInt1) ((data >> 16) &0xFF) ); + SAVE_BYTE( (UInt1) ((data >> 24) &0xFF) ); + SAVE_BYTE( (UInt1) ((data >> 32) &0xFF) ); + SAVE_BYTE( (UInt1) ((data >> 40) &0xFF) ); + SAVE_BYTE( (UInt1) ((data >> 48) &0xFF) ); + SAVE_BYTE( (UInt1) ((data >> 56) &0xFF) ); +} + +UInt8 LoadUInt ( void ) +{ + UInt res; + res = (UInt)LOAD_BYTE(); + res |= (UInt)LOAD_BYTE() << 8; + res |= (UInt)LOAD_BYTE() << 16; + res |= (UInt)LOAD_BYTE() << 24; + res |= (UInt)LOAD_BYTE() << 32; + res |= (UInt)LOAD_BYTE() << 40; + res |= (UInt)LOAD_BYTE() << 48; + res |= (UInt)LOAD_BYTE() << 56; + + return res; +} + +#else + +void SaveUInt( UInt data ) +{ + SAVE_BYTE( (UInt1) (data & 0xFF) ); + SAVE_BYTE( (UInt1) ((data >> 8) &0xFF) ); + SAVE_BYTE( (UInt1) ((data >> 16) &0xFF) ); + SAVE_BYTE( (UInt1) ((data >> 24) &0xFF) ); +} + +UInt LoadUInt ( void ) +{ + UInt res; + res = (UInt)LOAD_BYTE(); + res |= (UInt)LOAD_BYTE() << 8; + res |= (UInt)LOAD_BYTE() << 16; + res |= (UInt)LOAD_BYTE() << 24; + return res; +} + +#endif + +void SaveCStr( Char * str) +{ + do { + SAVE_BYTE( (UInt1) *str); + } while (*(str++)); +} + +#include + +void LoadCStr( Char *buf, UInt maxsize) +{ + UInt nread = 0; + UInt1 c = 1; + assert(maxsize > 0); + while (c != '\0' && nread < maxsize ) + { + c = LOAD_BYTE(); + *buf++ = (Char) c; + nread++; + } + if (c != '\0') + { + Pr("Buffer overflow reading workspace",0L,0L); + SyExit(1); + } +} + +void SaveSubObj( Obj subobj ) +{ + if (!subobj) + SaveUInt(0); + else if (IS_INTOBJ(subobj)) + SaveUInt((UInt) subobj); + else if (IS_FFE(subobj)) + SaveUInt((UInt) subobj); + else if ((((UInt)subobj & 3) != 0) || + subobj < (Bag)MptrBags || + subobj > (Bag)OldBags || + (Bag *)PTR_BAG(subobj) < OldBags) + { + Pr("#W bad bag id %d found, 0 saved\n", (Int)subobj, 0L); + SaveUInt(0); + } + else + SaveUInt(((UInt)((PTR_BAG(subobj))[-1])) << 2); + +} + +Obj LoadSubObj() +{ + UInt word = LoadUInt(); + if (word == 0) + return (Obj) 0; + if ((word & 0x3) == 1 || (word & 0x3) == 2) + return (Obj) word; + else + return (Obj)(MptrBags + (word >> 2)); +} + +void SaveHandler( ObjFunc hdlr ) +{ + if (hdlr == (ObjFunc)0) + SaveCStr(""); + else + SaveCStr((Char *)CookieOfHandler(hdlr)); +} + + +ObjFunc LoadHandler( ) +{ + Char buf[256]; + LoadCStr(buf, 256); + if (buf[0] == '\0') + return (ObjFunc) 0; + else + return HandlerOfCookie(buf); +} + + +static UInt NextSaveIndex; + +static void AddSaveIndex( Bag bag) +{ + PTR_BAG(bag)[-1] = (Obj)NextSaveIndex++; +} + +static void RemoveSaveIndex( Bag bag) +{ + PTR_BAG(bag)[-1] = bag; +} + + +static void SaveBagData (Bag bag) +{ + /* Size-type word first */ + SaveUInt((UInt)PTR_BAG(bag)[-2]); + + /* dispatch */ + (*(SaveObjFuncs[ TNUM_BAG( bag )]))(bag); + +} + +/* temporary fudge */ + +static Bag NextBagRestoring( UInt sizetype) +{ + return (Bag) 0; +} + +static void LoadBagData ( ) +{ + Bag bag; + UInt sizetype; + + /* Recover the sizetype word */ + sizetype=LoadUInt(); + + /* Get GASMAN to set up the bag for me */ + bag = NextBagRestoring( sizetype ); + + /* despatch */ + (*(LoadObjFuncs[ sizetype & 0xFFL ]))(bag); + + return; +} + + +#define MAX_LOADED_MODULE_INFO 10000 + +static Char LoadedModuleInfo[MAX_LOADED_MODULE_INFO]; +static Char *EndLoadedModuleInfo; +static UInt NLoadedModules; + + +void RecordLoadedModule( Obj filename, UInt4 crc ) +{ + UInt len = SyStrlen(CSTR_STRING(filename)); + if (EndLoadedModuleInfo + len +1 >= LoadedModuleInfo + MAX_LOADED_MODULE_INFO) + ErrorQuit("Panic: No room to record loaded module %d %s", + NLoadedModules, + (Int)CSTR_STRING(filename)); + SyStrncat(EndLoadedModuleInfo, CSTR_STRING(filename), len+1); + EndLoadedModuleInfo += len+1; + *EndLoadedModuleInfo = '\0'; + NLoadedModules++; + return; +} + +Obj FuncLoadedModules( Obj self ) +{ + Obj list, str; + UInt i,len; + Char *name; + list = NEW_PLIST(T_PLIST_HOM+IMMUTABLE, NLoadedModules); + name = LoadedModuleInfo; + for (i = 1; i <= NLoadedModules; i++) + { + len = SyStrlen(name); + str = NEW_STRING(len + 1); + RetypeBag(str, T_STRING+IMMUTABLE); + *CSTR_STRING(str) = '\0'; + SyStrncat(CSTR_STRING(str), name, len+1); + name += len+1; + SET_ELM_PLIST(list,i,str); + CHANGED_BAG(list); + } + SET_LEN_PLIST(list,NLoadedModules); + if (NLoadedModules == 0) + RetypeBag(list,T_PLIST_EMPTY+IMMUTABLE); + return list; +} + +/*************************************************************************** +** + +*F WriteSaveHeader( ) +** +*/ + +static void WriteEndiannessMarker( void ) +{ + UInt x; +#ifdef SYS_IS_64BIT + x = 0x0102030405060708L; +#else + x = 0x01020304L; +#endif + SAVE_BYTE(((UInt1 *)&x)[0]); + SAVE_BYTE(((UInt1 *)&x)[1]); + SAVE_BYTE(((UInt1 *)&x)[2]); + SAVE_BYTE(((UInt1 *)&x)[3]); +#if SYS_IS_64BIT + SAVE_BYTE(((UInt1 *)&x)[4]); + SAVE_BYTE(((UInt1 *)&x)[5]); + SAVE_BYTE(((UInt1 *)&x)[6]); + SAVE_BYTE(((UInt1 *)&x)[7]); +#endif +} + +static void CheckEndiannessMarker( void ) +{ + UInt x; + ((UInt1 *)&x)[0] = LOAD_BYTE(); + ((UInt1 *)&x)[1] = LOAD_BYTE(); + ((UInt1 *)&x)[2] = LOAD_BYTE(); + ((UInt1 *)&x)[3] = LOAD_BYTE(); +#ifdef SYS_IS_64BIT + ((UInt1 *)&x)[4] = LOAD_BYTE(); + ((UInt1 *)&x)[5] = LOAD_BYTE(); + ((UInt1 *)&x)[6] = LOAD_BYTE(); + ((UInt1 *)&x)[7] = LOAD_BYTE(); + if (x != 0x0102030405060708L) + ErrorQuit("Saved workspace with incompatible byte order %d",x,0L); +#else + if (x != 0x01020304L) + ErrorQuit("Saved workspace with incompatible byte order %d",x,0L); +#endif +} + +static void WriteSaveHeader( void ) +{ + UInt i; + Char *name; +#ifdef SYS_IS_64BIT + SaveCStr( "GAP 4.0 beta 64 bit"); +#else + SaveCStr("GAP 4.0 beta 32 bit"); +#endif + WriteEndiannessMarker(); + + SaveCStr("Counts and Sizes"); + SaveUInt(NLoadedModules); + SaveUInt(GlobalBags.nr); + SaveUInt(NextSaveIndex); + SaveUInt(AllocBags - OldBags); + + SaveCStr("Loaded Modules"); + + name = LoadedModuleInfo; + for (i = 1; i <= NLoadedModules; i++) + { + SaveCStr(name); + name += SyStrlen(name) + 1; + } + + SaveCStr("Kernel to WS refs"); + for (i = 0; i < GlobalBags.nr; i++) + { + SaveCStr((Char *)GlobalBags.cookie[i]); + SaveSubObj(*(GlobalBags.addr[i])); + } +} + + +static UInt fb_minsize, fb_maxsize, fb_tnum; +static Bag hit; + +static void ScanBag( Bag bag) +{ + if (hit == (Bag)0 && + SIZE_BAG(bag) >= fb_minsize && + SIZE_BAG(bag) <= fb_maxsize && + TNUM_BAG(bag) == fb_tnum) + hit = bag; + return; +} + +Obj FuncFindBag( Obj self, Obj minsize, Obj maxsize, Obj tnum ) +{ + hit = (Bag) 0; + fb_minsize = INT_INTOBJ(minsize); + fb_maxsize = INT_INTOBJ(maxsize); + fb_tnum = INT_INTOBJ(tnum); + CallbackForAllBags(ScanBag); + return (hit != (Bag) 0) ? hit : Fail; +} + + +/*************************************************************************** +** +*F SaveWorkspace( ) . . . . . save the workspace to the named file ** ** 'SaveWorkspace' is the entry point to the workspace saving. It is not ** installed as a GAP function, but instead as a keyword, so that we can be @@ -39,24 +509,45 @@ char * Revision_saveload_c = ** The return value is either True or Fail */ -static Obj IsWritableFile; Obj SaveWorkspace( Obj fname ) { - Obj fileok; - fileok = CALL_1ARGS(IsWritableFile, fname); - if (fileok == True) - return False; - else if (fileok == False) - return Fail; - else - ErrorQuit("Panic: invalid return from IsWritable",0L,0L); - return 0; /* please lint */ + + /* Clean the copy and fopy info (which includes kernel refs) + out of the workspace */ + RemoveCopyFopyInfo( ); + + /* Do a full garbage collection */ + CollectBags( 0, 1); + + /* Add indices in link words of all bags, for saving inter-bag references */ + NextSaveIndex = 0; + CallbackForAllBags( AddSaveIndex ); + + /* Now do the work */ + OpenForSave( fname ); + WriteSaveHeader(); + SaveCStr("Bag data"); + SortHandlers( 1 ); /* Sort by address to speed up CookieOfHandler */ + CallbackForAllBags( SaveBagData ); + CloseAfterSave(); + + /* Finally, reset all the link words */ + CallbackForAllBags( RemoveSaveIndex ); + + /* And reset the Copy and Fopy info, using the kernel copy */ + RestoreCopyFopyInfo (); + + /* Not all working yet */ + return Fail; } + + + /*************************************************************************** ** -*F LoadWorkspace( ) . . . . . .load the workspace to the named file +*F LoadWorkspace( ) . . . . . load the workspace to the named file ** ** 'LoadWorkspace' is the entry point to the workspace saving. It is not ** installed as a GAP function, but instead as a keyword, so that we can be @@ -80,28 +571,146 @@ Obj LoadWorkspace( Obj fname ) else if (fileok == False) return Fail; else - ErrorQuit("Panic: invalid return from IsReadable",0L,0L); + ErrorQuit("Panic: invalid return from IsReadable",0L,0L); return 0; /* please lint */ } -/*************************************************************************** +#include "finfield.h" /* finite fields and ff elements */ + +static void PrSavedObj( UInt x) +{ + if ((x & 3) == 1) + Pr("Immediate integer %d\n", INT_INTOBJ((Obj)x),0L); + else if ((x & 3) == 2) + Pr("Immedate FFE %d %d\n", VAL_FFE(x), SIZE_FF(FLD_FFE(x))); + else + Pr("Reference to bag number %d\n",x>>2,0L); +} + +Obj FuncDumpWorkspace( Obj self, Obj fname ) +{ + Obj fileok; + UInt nMods, nGlobs, nBags, i; + Char buf[256]; + fileok = CALL_1ARGS(IsReadableFile, fname); + if (fileok == False) + return Fail; + else if (fileok != True) + ErrorQuit("Panic: invalid return from IsReadable",0L,0L); + OpenForLoad( fname ); + LoadCStr(buf,256); + Pr("Header string: %s\n",(Int) buf, 0L); +#ifdef SYS_IS_64BIT + if (SyStrcmp(buf,"GAP 4.0 beta 64 bit") != 0) +#else + if (SyStrcmp(buf,"GAP 4.0 beta 32 bit") != 0) +#endif + ErrorQuit("Header is bad",0L,0L); + CheckEndiannessMarker(); + LoadCStr(buf,256); + Pr("Divider string: %s\n",(Int)buf,0L); + if (SyStrcmp(buf,"Counts and Sizes") != 0) + ErrorQuit("Bad divider",0L,0L); + Pr("Loaded modules: %d\n",nMods = LoadUInt(), 0L); + Pr("Global Bags : %d\n",nGlobs = LoadUInt(), 0L); + Pr("Total Bags : %d\n",nBags = LoadUInt(), 0L); + Pr("Maximum Size : %d\n",sizeof(Bag)*LoadUInt(), 0L); + LoadCStr(buf,256); + Pr("Divider string: %s\n",(Int)buf, 0L); + if (SyStrcmp(buf,"Loaded Modules") != 0) + ErrorQuit("Bad divider",0L,0L); + for (i = 0; i < nMods; i++) + { + LoadCStr(buf,256); + Pr(" %s\n",(Int)buf,0L); + } + LoadCStr(buf,256); + Pr("Divider string: %s\n",(Int)buf,0L); + if (SyStrcmp(buf,"Kernel to WS refs") != 0) + ErrorQuit("Bad divider",0L,0L); + for (i = 0; i < nGlobs; i++) + { + LoadCStr(buf,256); + Pr(" %s ",(Int)buf,0L); + PrSavedObj(LoadUInt()); + } + LoadCStr(buf,256); + Pr("Divider string: %s\n",(Int)buf,0L); + if (SyStrcmp(buf,"Bag data") != 0) + ErrorQuit("Bad divider",0L,0L); +#if 0 + for (i = 0; i < nBags; i++) + { + sizetype = LoadUInt(); + Pr("Size %d type %s\n",sizetype >> 8, (Int)InfoBags[sizetype & 0xFF].name); + if (LoadUInt() != 0xFFFFFFFF) + ErrorQuit("Something saved in a bag body\n",0L,0L); + } +#endif + CloseAfterLoad(); + return (Obj) 0; +} + + +/**************************************************************************** ** -*F InitSaveLoad( void ) . . . . . . . . . . . . . .initialize this package + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * */ -void InitSaveLoad( void ) + +/**************************************************************************** +** + +*F SetupSaveLoad( void ) . . . . . . . . initialize the save/load workspace +*/ +void SetupSaveLoad( void ) { - UInt tmp; - tmp = GVarName("IsWritableFile"); - InitFopyGVar( tmp, &IsWritableFile ); - tmp = GVarName("IsReadableFile"); - InitFopyGVar( tmp, &IsReadableFile ); } - + +/**************************************************************************** +** +*F InitSaveLoad( void ) . . . . . . . . initialize the save/load workspace +*/ +void InitSaveLoad ( void ) +{ + /* Initialize Fopys of file handling and other functions */ + InitFopyGVar( "IsReadableFile", &IsReadableFile ); + + /* Create dummy variable, to support tab-completion */ + (void)GVarName("SaveWorkspace"); + + /* Clean up the setup for RecordLoadedModule */ + NLoadedModules = 0; + *LoadedModuleInfo = '\0'; + EndLoadedModuleInfo = LoadedModuleInfo; + C_NEW_GVAR_FUNC( "LoadedModules", 0, "", + FuncLoadedModules, + "src/saveload.c:LoadedModules" ); + C_NEW_GVAR_FUNC( "DumpWorkspace", 1, "fname", + FuncDumpWorkspace, + "src/saveload.c:DumpWorkspace" ); + C_NEW_GVAR_FUNC( "FindBag", 3, "minsize, maxsize, tnum", + FuncFindBag, + "src/saveload.c:FindBag" ); +} + +/**************************************************************************** +** +*F CheckSaveLoad( void ) check the initialisation of the save/load workspace +*/ +void CheckSaveLoad ( void ) +{ +} + +/**************************************************************************** +** +*E saveload.c . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/saveload.h b/src/saveload.h index 678190e14c..ab9b130175 100644 --- a/src/saveload.h +++ b/src/saveload.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A saveload.h GAP source Steve Linton +*W saveload.h GAP source Steve Linton ** *H @(#)$Id$ ** @@ -11,12 +11,13 @@ ** throughout the kernel */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_saveload_h = +SYS_CONST char * Revision_saveload_h = "@(#)$Id$"; #endif /*************************************************************************** ** + *F SaveWorkspace( ) . . . . . .save the workspace to the named file ** ** 'SaveWorkspace' is the entry point to the workspace saving. It is not @@ -31,26 +32,68 @@ char * Revision_saveload_h = extern Obj SaveWorkspace( Obj fname ); +extern void RecordLoadedModule( Obj filename, UInt crc); + +extern void SaveUInt1(UInt1 x); +extern void SaveUInt2(UInt2 x); +extern void SaveUInt4(UInt4 x); +extern void SaveUInt(UInt x); +#ifdef SYS_IS_64BIT +extern void SaveUInt8(UInt8 x); +#endif +extern void SaveCStr(Char *s); +extern void SaveSubObj(Obj o); +extern void SaveHandler(ObjFunc hdlr); + +extern UInt1 LoadUInt1( void ); +extern UInt2 LoadUInt2( void ); +extern UInt4 LoadUInt4( void ); +extern UInt LoadUInt( void ); +#ifdef SYS_IS_64BIT +extern UInt8 LoadUInt8( void); +#endif +extern void LoadCStr(Char *buf, UInt maxlen ); +extern Obj LoadSubObj( void ); +extern ObjFunc LoadHandler(); + + + /*************************************************************************** ** -*F LoadWorkspace( ) . . . . . .load the workspace to the named file + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** ** -** 'LoadWorkspace' is the entry point to the workspace saving. It is not -** installed as a GAP function, but instead as a keyword, so that we can be -** sure it is only being called from the top-most prompt level -** The file saveload.tex in the dev directory describes the saved format -** in more detail. Most of the work will be done from inside GASMAN, because -** we need to fiddle with Bag internals somewhat + +*F SetupSaveLoad( void ) . . . . . . . . initialize the save/load workspace +*/ +extern void SetupSaveLoad ( void ); + + +/**************************************************************************** ** -** It may return Fail, in the original workspace, True, in the new workspace -** or abort the system if an error arises too late to be safely averted +*F InitSaveLoad( void ) . . . . . . . . initialize the save/load workspace */ +extern void InitSaveLoad ( void ); + -extern Obj LoadWorkspace( Obj fname ); +/**************************************************************************** +** +*F CheckSaveLoad( void ) check the initialisation of the save/load workspace +*/ +extern void CheckSaveLoad ( void ); + -/*************************************************************************** +/**************************************************************************** ** -*F InitSaveLoad( void ) . . . . . . . . . . . . . .initialize this package + +*E saveload.h . . . . . . . . . . . . . . . . . . . . . . . . . . ends here */ -extern void InitSaveLoad( void ); + + + + diff --git a/src/scanner.c b/src/scanner.c index 2bf9e5afde..dc3dd95504 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -24,7 +24,7 @@ ** The scanner relies on the functions provided by the operating system ** dependent module 'system.c' for the low level input/output. */ -#include "system.h" /* system dependent functions */ +#include "system.h" /* system dependent part */ SYS_CONST char * Revision_scanner_c = "@(#)$Id$"; @@ -38,13 +38,17 @@ SYS_CONST char * Revision_scanner_c = #include "scanner.h" /* scanner */ #undef INCLUDE_DECLARATION_PART -#include "gap.h" /* error handling */ +#include "gap.h" /* error handling, initialisation */ #include "calls.h" /* generic call mechanism */ #include "bool.h" /* booleans */ -#include "string.h" /* ObjsChar, NEW_STRING, CSTR_ST...*/ +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ + +#include "lists.h" /* generic lists */ +#include "string.h" /* strings */ /**************************************************************************** @@ -1612,8 +1616,6 @@ void GetIdent ( void ) case 256*'A'+'t': if(!SyStrcmp(Value,"Assert")) Symbol=S_ASSERT; break; case 256*'S'+'e': if(!SyStrcmp(Value,"SaveWorkspace")) Symbol=S_SAVEWS; break; - case 256*'L'+'e': if(!SyStrcmp(Value,"LoadWorkspace")) - Symbol=S_LOADWS; break; default: ; } @@ -2420,23 +2422,33 @@ void Pr ( /**************************************************************************** ** -*F InitScanner() . . . . . . . . . . . . . . initialize the scanner package -** -** 'InitScanner' initializes the scanner package. This justs sets the -** current input file to '*stdin*' and current output file to '*stdout*'. +*F SetupScanner() . . . . . . . . . . . . . initialize the scanner package */ -void InitScanner ( void ) +void SetupScanner ( void ) { Int ignore; - Int i; - static Char cookie[sizeof(InputFiles)/sizeof(InputFiles[0])][9]; Input = InputFiles-1; ignore = OpenInput( "*stdin*" ); Output = OutputFiles-1; ignore = OpenOutput( "*stdout*" ); InputLog = 0; OutputLog = 0; TestInput = 0; TestOutput = 0; +} + +/**************************************************************************** +** +*F InitScanner() . . . . . . . . . . . . . . initialize the scanner package +** +** 'InitScanner' initializes the scanner package. This justs sets the +** current input file to '*stdin*' and current output file to '*stdout*'. +*/ +void InitScanner ( void ) +{ + Int i; + static Char cookie[sizeof(InputFiles)/sizeof(InputFiles[0])][9]; + + /* initialize cookies for streams */ for ( i = 0; i < sizeof(InputFiles)/sizeof(InputFiles[0]); i++ ) { cookie[i][0] = 's'; cookie[i][1] = 't'; cookie[i][2] = 'r'; cookie[i][3] = 'e'; cookie[i][4] = 'a'; cookie[i][5] = 'm'; @@ -2458,6 +2470,17 @@ void InitScanner ( void ) } +/**************************************************************************** +** +*F CheckScanner() . . . . . check the initialisation of the scanner package +*/ +void CheckScanner ( void ) +{ + SET_REVISION( "scanner_c", Revision_scanner_c ); + SET_REVISION( "scanner_h", Revision_scanner_h ); +} + + /**************************************************************************** ** diff --git a/src/scanner.h b/src/scanner.h index fad4329ce3..2fa4b9e91b 100644 --- a/src/scanner.h +++ b/src/scanner.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A scanner.h GAP source Martin Schoenert +*W scanner.h GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -25,7 +25,7 @@ ** dependent module 'system.c' for the low level input/output. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_scanner_h = +SYS_CONST char * Revision_scanner_h = "@(#)$Id$"; #endif @@ -1185,12 +1185,37 @@ extern UInt CloseTest ( void ); /**************************************************************************** ** +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + +*F SetupScanner() . . . . . . . . . . . . . initialize the scanner package +*/ +extern void SetupScanner ( void ); + + +/**************************************************************************** +** *F InitScanner() . . . . . . . . . . . . . . initialize the scanner package ** ** 'InitScanner' initializes the scanner package. This justs sets the ** current input file to '*stdin*' and current output file to '*stdout*'. */ -extern void InitScanner ( void ); +extern void InitScanner ( void ); +/**************************************************************************** +** +*F CheckScanner() . . . . . check the initialisation of the scanner package +*/ +extern void CheckScanner ( void ); + +/**************************************************************************** +** + + +*E scanner.h . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/sctable.c b/src/sctable.c index 49b4913abe..d12179a713 100644 --- a/src/sctable.c +++ b/src/sctable.c @@ -33,43 +33,47 @@ ** zero is the zero element of the coefficient ring/field of the algebra. ** ** NOTE: most of the code consists of dimension- and type checks, as a user -** can fool around with SCTables as he likes. +** can fool around with SCTables as s/he likes. */ -char * Revision_sctable_c = +#include "system.h" /* system dependent part */ + +SYS_CONST char * Revision_sctable_c = "@(#)$Id$"; -#include "system.h" /* Ints, UInts */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ -#include "gasman.h" /* Bag, NewBag */ -#include "objects.h" /* Obj, TNUM_OBJ, types */ -#include "scanner.h" /* Pr */ +#include "gap.h" /* error handling, initialisation */ -#include "gvars.h" /* AssGVar, GVarName */ +#include "gvars.h" /* global variables */ -#include "calls.h" /* NewFunctionC */ -#include "ariths.h" /* EQ, LT */ +#include "calls.h" /* generic call mechanism */ +#include "ariths.h" /* basic arithmetic */ -#include "lists.h" /* IS_LIST, LEN_LIST, ELM_LIST, ...*/ +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ -#include "plist.h" /* SET_LEN_PLIST, SET_ELM_PLIST,...*/ +#include "lists.h" /* generic lists */ +#include "plist.h" /* plain lists */ +#include "string.h" /* strings */ #define INCLUDE_DECLARATION_PART -#include "sctable.h" /* declaration part of the package */ +#include "sctable.h" /* structure constant table */ #undef INCLUDE_DECLARATION_PART -#include "gap.h" /* Error */ - /**************************************************************************** ** + *F SCTableEntry(
,,,) . . . . . . . entry of structure table ** ** 'SCTableEntry' returns the coefficient $c_{i,j}^{k}$ from the structure ** constants table
. */ -Obj SCTableEntryFunc; +Obj SCTableEntryFunc; -Obj SCTableEntryHandler ( +Obj SCTableEntryHandler ( Obj self, Obj table, Obj i, @@ -87,7 +91,7 @@ Obj SCTableEntryHandler ( if ( ! IS_LIST(table) ) { table = ErrorReturnObj( "SCTableEntry:
must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(table)].name), 0L, + (Int)TNAM_OBJ(table), 0L, "you can return a list for
" ); return SCTableEntryHandler( self, table, i, j, k ); } @@ -201,7 +205,7 @@ Obj SCTableEntryHandler ( ** 'SCTableProduct' returns the product of the two elements and ** with respect to the structure constants table
. */ -void SCTableProdAdd ( +void SCTableProdAdd ( Obj res, Obj coeff, Obj basis_coeffs, @@ -234,9 +238,9 @@ void SCTableProdAdd ( } } -Obj SCTableProductFunc; +Obj SCTableProductFunc; -Obj SCTableProductHandler ( +Obj SCTableProductHandler ( Obj self, Obj table, Obj list1, @@ -255,7 +259,7 @@ Obj SCTableProductHandler ( if ( ! IS_LIST(table) ) { table = ErrorReturnObj( "SCTableProduct:
must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(table)].name), 0L, + (Int)TNAM_OBJ(table), 0L, "you can return a list for
" ); return SCTableProductHandler( self, table, list1, list2 ); } @@ -359,6 +363,22 @@ Obj SCTableProductHandler ( } +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + +*F SetupSCTable() . . . . . . . . . . initialize structure constant tables +*/ +void SetupSCTable ( void ) +{ +} + + /**************************************************************************** ** *F InitSCTable() . . . . . . . . . . . initialize structure constant tables @@ -366,21 +386,32 @@ Obj SCTableProductHandler ( ** Is called during the initialization of GAP to initialize the structure ** constant table package. */ -void InitSCTable ( void ) +void InitSCTable ( void ) +{ + C_NEW_GVAR_FUNC( "SC_TABLE_ENTRY", 4, "table, i, j, k", + SCTableEntryHandler, + "src/sctable.c:SC_TABLE_ENTRY" ); + + C_NEW_GVAR_FUNC( "SC_TABLE_PRODUCT", 3, "table, list1, list2", + SCTableProductHandler, + "src/sctable.c:SC_TABLE_PRODUCT" ); +} + + +/**************************************************************************** +** +*F CheckSCTable() . . check the initialisation of structure constant tables +*/ +void CheckSCTable ( void ) { - InitHandlerFunc( SCTableEntryHandler, "SC_TABLE_ENTRY" ); - SCTableEntryFunc = NewFunctionC( - "SC_TABLE_ENTRY", 4L, "table,i,j,k", SCTableEntryHandler ); - AssGVar( GVarName( "SC_TABLE_ENTRY" ), SCTableEntryFunc ); - InitHandlerFunc( SCTableProductHandler, "SC_TABLE_PRODUCT" ); - SCTableProductFunc = NewFunctionC( - "SC_TABLE_PRODUCT", 3L, "table,list1,list2", SCTableProductHandler ); - AssGVar( GVarName( "SC_TABLE_PRODUCT" ), SCTableProductFunc ); + SET_REVISION( "sctable_c", Revision_sctable_c ); + SET_REVISION( "sctable_h", Revision_sctable_h ); } /**************************************************************************** ** + *E sctable.c . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here */ diff --git a/src/sctable.h b/src/sctable.h index 0aa2139d85..68d85c1132 100644 --- a/src/sctable.h +++ b/src/sctable.h @@ -10,11 +10,25 @@ ** and the multiplication of two elements using a structure constants table. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_sctable_h = +SYS_CONST char * Revision_sctable_h = "@(#)$Id$"; #endif +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + +*F SetupSCTable() . . . . . . . . . . initialize structure constant tables +*/ +extern void SetupSCTable ( void ); + + /**************************************************************************** ** *F InitSCTable() . . . . . . . . . . . initialize structure constant tables @@ -22,11 +36,19 @@ char * Revision_sctable_h = ** Is called during the initialization of GAP to initialize the structure ** constant table package. */ -extern void InitSCTable ( void ); +extern void InitSCTable ( void ); + + +/**************************************************************************** +** +*F CheckSCTable() . . check the initialisation of structure constant tables +*/ +extern void CheckSCTable ( void ); /**************************************************************************** ** + *E sctable.h . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here */ diff --git a/src/set.c b/src/set.c index a9c2688a74..a467c7def1 100644 --- a/src/set.c +++ b/src/set.c @@ -18,40 +18,42 @@ ** make sets, either by converting a list to a set, or by computing the ** union, intersection, or difference of two sets. */ -char * Revision_set_c = - "@(#)$Id$"; - #include /* assert */ +#include "system.h" /* system dependent part */ -#include "system.h" /* system dependent functions */ +SYS_CONST char * Revision_set_c = + "@(#)$Id$"; -#include "gasman.h" /* NewBag, ResizeBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, SIZE_OBJ, ... */ -#include "scanner.h" /* Pr */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ -#include "gvars.h" /* AssGVar, GVarName */ +#include "gap.h" /* error handling, initialisation */ -#include "calls.h" /* generic call mechanism */ -#include "opers.h" /* generic operations package */ +#include "gvars.h" /* global variables */ -#include "ariths.h" /* generic operations package */ -#include "lists.h" /* generic list package */ +#include "calls.h" /* generic call mechanism */ +#include "opers.h" /* generic operations */ -#include "bool.h" /* True, False */ +#include "ariths.h" /* basic arithmetic */ -#include "listfunc.h" /* SortDensePlist, PositionSorte...*/ +#include "bool.h" /* booleans */ -#include "plist.h" /* GET_LEN_PLIST, GET_ELM_PLIST,...*/ +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ +#include "lists.h" /* generic lists */ +#include "listfunc.h" /* functions for generic lists */ +#include "plist.h" /* plain lists */ #define INCLUDE_DECLARATION_PART -#include "set.h" /* declaration part of the package */ +#include "set.h" /* plain sets */ #undef INCLUDE_DECLARATION_PART - -#include "gap.h" /* Error */ +#include "string.h" /* strings */ /**************************************************************************** ** + *F IsSet( ) . . . . . . . . . . . . . . . . . test if a list is a set ** ** 'IsSet' returns 1 if the list is a proper set and 0 otherwise. A @@ -79,7 +81,7 @@ Int IsSet ( /* if is the empty list, its a set (:-) */ if ( LEN_PLIST(list) == 0 ) { - RetypeBag( list, T_PLIST_EMPTY + IS_IMM_PLIST(list) ); + SET_FILT_LIST( list, FN_IS_EMPTY ); isSet = 1; } @@ -101,15 +103,15 @@ Int IsSet ( /* if is the empty list, its a set (:-) */ if ( LEN_LIST(list) == 0 ) { PLAIN_LIST( list ); - RetypeBag( list, T_PLIST_EMPTY + IS_IMM_PLIST(list) ); + SET_FILT_LIST( list, FN_IS_EMPTY ); isSet = 1; } /* if homogeneous and strictly sorted, its a set */ else if ( IS_HOMOG_LIST(list) && IS_SSORT_LIST(list) ) { PLAIN_LIST( list ); - /*N 1996/05/17 mschoene assumes only plists have mutable elms */ - RetypeBag( list, T_PLIST_HOM_SSORT + IS_IMM_PLIST(list) ); + SET_FILT_LIST( list, FN_IS_HOMOG ); + SET_FILT_LIST( list, FN_IS_SSORT ); isSet = 1; } @@ -182,9 +184,9 @@ Obj SetList ( /**************************************************************************** ** -*F SetListHandler( , ) . . . . . . . . make a set from a list +*F FuncLIST_SORTED_LIST( , ) . . . . . . . . make a set from a list ** -** 'SetListHandler' implements the internal function 'SetList'. +** 'FuncLIST_SORTED_LIST' implements the internal function 'SetList'. ** ** 'SetList( )' ** @@ -194,9 +196,7 @@ Obj SetList ( ** 'SetList' returns a new list even if the list is already a proper ** set, in this case it is equivalent to 'ShallowCopy' (see "ShallowCopy"). */ -Obj SetListFunc; - -Obj SetListHandler ( +Obj FuncLIST_SORTED_LIST ( Obj self, Obj list ) { @@ -206,7 +206,7 @@ Obj SetListHandler ( while ( ! IS_LIST( list ) ) { list = ErrorReturnObj( "Set: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list)].name), 0L, + (Int)TNAM_OBJ(list), 0L, "you can return a list for " ); } @@ -232,9 +232,9 @@ Obj SetListHandler ( /**************************************************************************** ** -*F IsEqualSetHandler(,,) test if a two lists are equal as sets +*F FuncIS_EQUAL_SET(,,) test if a two lists are equal as sets ** -** 'IsEqualSetHandler' implements the internal function 'IsEqualSet'. +** 'FuncIS_EQUAL_SET' implements the internal function 'IsEqualSet'. ** ** 'IsEqualSet( , )' ** @@ -273,9 +273,7 @@ Int EqSet ( return 1L; } -Obj IsEqualSetFunc; - -Obj IsEqualSetHandler ( +Obj FuncIS_EQUAL_SET ( Obj self, Obj list1, Obj list2 ) @@ -284,14 +282,14 @@ Obj IsEqualSetHandler ( while ( ! IS_LIST(list1) ) { list1 = ErrorReturnObj( "IsEqualSet: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list1)].name), 0L, + (Int)TNAM_OBJ(list1), 0L, "you can return a list for " ); } if ( ! IsSet( list1 ) ) list1 = SetList( list1 ); while ( ! IS_LIST(list2) ) { list2 = ErrorReturnObj( "IsEqualSet: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(list2)].name), 0L, + (Int)TNAM_OBJ(list2), 0L, "you can return a list for " ); } if ( ! IsSet( list2 ) ) list2 = SetList( list2 ); @@ -303,9 +301,9 @@ Obj IsEqualSetHandler ( /**************************************************************************** ** -*F IsSubsetSetHandler(,,) test if a set is a subset of another +*F FuncIS_SUBSET_SET(,,) test if a set is a subset of another ** -** 'IsSubsetSetHandler' implements the internal function 'IsSubsetSet'. +** 'FuncIS_SUBSET_SET' implements the internal function 'IsSubsetSet'. ** ** 'IsSubsetSet( , )' ** @@ -314,9 +312,7 @@ Obj IsEqualSetHandler ( ** Either argument may also be a list that is not a proper set, in which ** case 'IsSubsetSet' silently applies 'Set' (see "Set") to it first. */ -Obj IsSubsetSetFunc; - -Obj IsSubsetSetHandler ( +Obj FuncIS_SUBSET_SET ( Obj self, Obj set1, Obj set2 ) @@ -333,13 +329,13 @@ Obj IsSubsetSetHandler ( while ( ! IS_LIST(set1) ) { set1 = ErrorReturnObj( "IsSubsetSet: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(set1)].name), 0L, + (Int)TNAM_OBJ(set1), 0L, "you can return a list for " ); } while ( ! IS_LIST(set2) ) { set2 = ErrorReturnObj( "IsSubsetSet: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(set2)].name), 0L, + (Int)TNAM_OBJ(set2), 0L, "you can return a list for " ); } if ( ! IsSet( set1 ) ) set1 = SetList( set1 ); @@ -406,9 +402,17 @@ Obj IsSubsetSetHandler ( /**************************************************************************** ** -*F AddSetHandler(,,) . . . . . . . . add an element to a set + +*F * * * * * * * * * * * * * * GAP level functions * * * * * * * * * * * * * +*/ + +/**************************************************************************** ** -** 'AddSetHandler' implements the internal function 'AddSet'. + + +*F FuncADD_SET( , , ) . . . . . . . add an element to a set +** +** 'FuncADD_SET' implements the internal function 'AddSet'. ** ** 'AddSet( , )' ** @@ -420,9 +424,7 @@ Obj IsSubsetSetHandler ( ** 'AddSet' does not return anything, it is only called for the sideeffect ** of changing . */ -Obj AddSetFunc; - -Obj AddSetHandler ( +Obj FuncADD_SET ( Obj self, Obj set, Obj obj ) @@ -432,13 +434,13 @@ Obj AddSetHandler ( UInt i; /* loop variable */ /* check the arguments */ - while ( ! IsSet( set ) || ! IS_MUTABLE_OBJ( set ) ) { + while ( ! IsSet(set) || ! IS_MUTABLE_OBJ(set) ) { set = ErrorReturnObj( "AddSet: must be a mutable proper set (not a %s)", - (Int)(InfoBags[TNUM_OBJ(set)].name), 0L, + (Int)TNAM_OBJ(set), 0L, "you can return a set for " ); } - len = LEN_LIST( set ); + len = LEN_LIST(set); /* perform the binary search to find the position */ pos = PositionSortedDensePlist( set, obj ); @@ -452,18 +454,20 @@ Obj AddSetHandler ( } SET_ELM_PLIST( set, pos, obj ); CHANGED_BAG( set ); + /* fix up the type of the result */ - /*N 1996/07/17 mschoene this is a hack */ - assert( TNUM_OBJ(set) == T_PLIST_DENSE \ - || TNUM_OBJ(set) == T_PLIST_EMPTY \ - || TNUM_OBJ(set) == T_PLIST_HOM_SSORT \ - || TNUM_OBJ(set) == T_PLIST_TAB_SSORT \ - || TNUM_OBJ(set) == T_PLIST_CYC_SSORT ); - if ( IS_MUTABLE_OBJ(obj) ) { - RetypeBag( set, T_PLIST_DENSE ); + if ( HAS_FILT_LIST( set, FN_IS_SSORT ) ) { + CLEAR_FILTS_LIST(set); + if ( IS_MUTABLE_OBJ(obj) ) { + SET_FILT_LIST( set, FN_IS_DENSE ); + } + else { + SET_FILT_LIST( set, FN_IS_SSORT ); + } } - else if ( TNUM_OBJ(set) == T_PLIST_EMPTY ) { - RetypeBag( set, T_PLIST_HOM_SSORT ); + else { + CLEAR_FILTS_LIST(set); + SET_FILT_LIST( set, FN_IS_DENSE ); } } @@ -474,9 +478,9 @@ Obj AddSetHandler ( /**************************************************************************** ** -*F RemoveSetHandler(,,). . . . remove an element from a set +*F FuncREM_SET( , , ) . . . . remove an element from a set ** -** 'RemoveSetHandler' implements the internal function 'RemoveSet'. +** 'FuncREM_SET' implements the internal function 'RemoveSet'. ** ** 'RemoveSet( , )' ** @@ -489,9 +493,7 @@ Obj AddSetHandler ( ** 'RemoveSet' does not return anything, it is only called for the ** sideeffect of changing . */ -Obj RemoveSetFunc; - -Obj RemoveSetHandler ( +Obj FuncREM_SET ( Obj self, Obj set, Obj obj ) @@ -501,13 +503,13 @@ Obj RemoveSetHandler ( UInt i; /* loop variable */ /* check the arguments */ - while ( ! IsSet( set ) || ! IS_MUTABLE_OBJ( set ) ) { + while ( ! IsSet(set) || ! IS_MUTABLE_OBJ(set) ) { set = ErrorReturnObj( "RemoveSet: must be a mutable proper set (not a %s)", - (Int)(InfoBags[TNUM_OBJ(set)].name), 0L, + (Int)TNAM_OBJ(set), 0L, "you can return a set for " ); } - len = LEN_LIST( set ); + len = LEN_LIST(set); /* perform the binary search to find the position */ pos = PositionSortedDensePlist( set, obj ); @@ -519,14 +521,11 @@ Obj RemoveSetHandler ( } SET_ELM_PLIST( set, len, 0 ); SET_LEN_PLIST( set, len-1 ); + /* fix up the type of the result */ - /*N 1996/07/17 mschoene this is a hack */ - assert( TNUM_OBJ(set) == T_PLIST_DENSE \ - || TNUM_OBJ(set) == T_PLIST_EMPTY \ - || TNUM_OBJ(set) == T_PLIST_HOM_SSORT \ - || TNUM_OBJ(set) == T_PLIST_CYC_SSORT ); if ( len-1 == 0 ) { - RetypeBag( set, T_PLIST_EMPTY ); + CLEAR_FILTS_LIST(set); + SET_FILT_LIST( set, FN_IS_EMPTY ); } } @@ -537,10 +536,10 @@ Obj RemoveSetHandler ( /**************************************************************************** ** -*F UniteSetHandler(,,) . . . . unite one set with another *V TmpUnion . . . . . . . . . . . . . . . . . . buffer for the union, local +*F FuncUNITE_SET( , , ) . . . unite one set with another ** -** 'UniteSetHandler' implements the internal function 'UniteSet'. +** 'FuncUNITE_SET' implements the internal function 'UniteSet'. ** ** 'UniteSet( , )' ** @@ -550,17 +549,15 @@ Obj RemoveSetHandler ( ** that are in . may be a list that is not a proper set, in ** which case 'Set' is silently applied to it. ** -** 'UniteSetHandler' merges and into a buffer that is allocated at -** initialization time. +** 'FuncUNITE_SET' merges and into a buffer that is allocated +** at initialization time. ** ** 'TmpUnion' is the global bag that serves as temporary bag for the union. ** It is created in 'InitSet' and is resized when necessary. */ -Obj TmpUnion; +Obj TmpUnion; -Obj UniteSetFunc; - -Obj UniteSetHandler ( +Obj FuncUNITE_SET ( Obj self, Obj set1, Obj set2 ) @@ -574,19 +571,19 @@ Obj UniteSetHandler ( Obj e2; /* element of right set */ /* check the arguments */ - while ( ! IsSet( set1 ) || ! IS_MUTABLE_OBJ( set1 ) ) { + while ( ! IsSet(set1) || ! IS_MUTABLE_OBJ(set1) ) { set1 = ErrorReturnObj( "UniteSet: must be a mutable proper set (not a %s)", - (Int)(InfoBags[TNUM_OBJ(set1)].name), 0L, + (Int)TNAM_OBJ(set1), 0L, "you can return a set for " ); } while ( ! IS_LIST(set2) ) { set2 = ErrorReturnObj( "UniteSet: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(set2)].name), 0L, + (Int)TNAM_OBJ(set2), 0L, "you can return a list for " ); } - if ( ! IsSet( set2 ) ) set2 = SetList( set2 ); + if ( ! IsSet(set2) ) set2 = SetList(set2); /* get the logical lengths and the pointer */ len1 = LEN_PLIST( set1 ); @@ -634,42 +631,21 @@ Obj UniteSetHandler ( i2++; } + /* fix up the type of the result */ + CLEAR_FILTS_LIST(set1); + if ( 0 == LEN_PLIST(set1) ) { + RetypeBag( set1, MUTABLE_TNUM(TNUM_OBJ(set2)) ); + } + /* resize the result and copy back from the union */ GROW_PLIST( set1, lenr ); SET_LEN_PLIST( set1, lenr ); - for ( i1 = 1; i1 <= lenr; i1++ ) { + for ( i1 = 1; i1 <= lenr; i1++ ) { SET_ELM_PLIST( set1, i1, ELM_PLIST( TmpUnion, i1 ) ); CHANGED_BAG( set1 ); SET_ELM_PLIST( TmpUnion, i1, (Obj)0 ); } - /* fix up the type of the result */ - /*N 1996/07/17 mschoene this is a hack */ - assert( TNUM_OBJ(set1) == T_PLIST_DENSE \ - || TNUM_OBJ(set1) == T_PLIST_EMPTY \ - || TNUM_OBJ(set1) == T_PLIST_HOM_SSORT \ - || TNUM_OBJ(set1) == T_PLIST_TAB_SSORT \ - || TNUM_OBJ(set1) == T_PLIST_CYC_SSORT ); - assert( TNUM_OBJ(set2) == T_PLIST_DENSE \ - || TNUM_OBJ(set2) == T_PLIST_EMPTY \ - || TNUM_OBJ(set2) == T_PLIST_HOM_SSORT \ - || TNUM_OBJ(set2) == T_PLIST_TAB_SSORT \ - || TNUM_OBJ(set2) == T_PLIST_CYC_SSORT \ - || TNUM_OBJ(set2) == T_PLIST_DENSE + IMMUTABLE \ - || TNUM_OBJ(set2) == T_PLIST_EMPTY + IMMUTABLE \ - || TNUM_OBJ(set2) == T_PLIST_HOM_SSORT + IMMUTABLE \ - || TNUM_OBJ(set2) == T_PLIST_TAB_SSORT + IMMUTABLE \ - || TNUM_OBJ(set2) == T_PLIST_CYC_SSORT + IMMUTABLE ); - if ( TNUM_OBJ(set1) == T_PLIST_EMPTY ) { - RetypeBag( set1, MUTABLE_TNUM(TNUM_OBJ(set2)) ); - } - else if ( TNUM_OBJ(set2)==T_PLIST_DENSE ) { - RetypeBag( set1, T_PLIST_DENSE ); - } - else if ( TNUM_OBJ(set2)==T_PLIST_DENSE + IMMUTABLE ) { - RetypeBag( set1, T_PLIST_DENSE ); - } - /* return void, this is a procedure */ return (Obj)0; } @@ -677,9 +653,9 @@ Obj UniteSetHandler ( /**************************************************************************** ** -*F IntersectSetHandler(,,) intersect one set with another +*F FuncINTER_SET( , , ) . intersect one set with another ** -** 'IntersectSetHandler' implements the internal function 'IntersectSet'. +** 'FuncINTER_SET' implements the internal function 'IntersectSet'. ** ** 'IntersectSet( , )' ** @@ -689,9 +665,7 @@ Obj UniteSetHandler ( ** all elements from that are not in . may be a list ** that is not a proper set, in which case 'Set' is silently applied to it. */ -Obj IntersectSetFunc; - -Obj IntersectSetHandler ( +Obj FuncINTER_SET ( Obj self, Obj set1, Obj set2 ) @@ -705,19 +679,19 @@ Obj IntersectSetHandler ( Obj e2; /* element of right set */ /* check the arguments */ - while ( ! IsSet( set1 ) || ! IS_MUTABLE_OBJ( set1 ) ) { + while ( ! IsSet(set1) || ! IS_MUTABLE_OBJ(set1) ) { set1 = ErrorReturnObj( "IntersectSet: must be a mutable proper set (not a %s)", - (Int)(InfoBags[TNUM_OBJ(set1)].name), 0L, + (Int)TNAM_OBJ(set1), 0L, "you can return a set for " ); } while ( ! IS_LIST(set2) ) { set2 = ErrorReturnObj( "IntersectSet: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(set2)].name), 0L, + (Int)TNAM_OBJ(set2), 0L, "you can return a list for " ); } - if ( ! IsSet( set2 ) ) set2 = SetList( set2 ); + if ( ! IsSet(set2) ) set2 = SetList(set2); /* get the logical lengths and the pointer */ len1 = LEN_PLIST( set1 ); @@ -748,21 +722,9 @@ Obj IntersectSetHandler ( SHRINK_PLIST( set1, lenr ); /* fix up the type of the result */ - /*N 1996/07/17 mschoene this is a hack */ - assert( TNUM_OBJ(set1) == T_PLIST_DENSE \ - || TNUM_OBJ(set1) == T_PLIST_EMPTY \ - || TNUM_OBJ(set1) == T_PLIST_HOM_SSORT \ - || TNUM_OBJ(set1) == T_PLIST_CYC_SSORT ); - assert( TNUM_OBJ(set2) == T_PLIST_DENSE \ - || TNUM_OBJ(set2) == T_PLIST_EMPTY \ - || TNUM_OBJ(set2) == T_PLIST_HOM_SSORT \ - || TNUM_OBJ(set2) == T_PLIST_CYC_SSORT \ - || TNUM_OBJ(set2) == T_PLIST_DENSE + IMMUTABLE \ - || TNUM_OBJ(set2) == T_PLIST_EMPTY + IMMUTABLE \ - || TNUM_OBJ(set2) == T_PLIST_HOM_SSORT + IMMUTABLE \ - || TNUM_OBJ(set2) == T_PLIST_CYC_SSORT + IMMUTABLE ); if ( lenr == 0 ) { - RetypeBag( set1, T_PLIST_EMPTY ); + CLEAR_FILTS_LIST(set1); + SET_FILT_LIST( set1, FN_IS_EMPTY ); } /* return void, this is a procedure */ @@ -772,9 +734,9 @@ Obj IntersectSetHandler ( /**************************************************************************** ** -*F SubstractSetHandler(,,) . subtract one set from another +*F FuncSUBTR_SET( , , ) . . subtract one set from another ** -** 'SubtractSetHandler' implements the internal function 'SubstractSet'. +** 'FuncSUBTR_SET' implements the internal function 'SubstractSet'. ** ** 'SubstractSet( , )' ** @@ -784,9 +746,7 @@ Obj IntersectSetHandler ( ** all elements from that are in . may be a list that ** is not a proper set, in which case 'Set' is silently applied to it. */ -Obj SubtractSetFunc; - -Obj SubtractSetHandler ( +Obj FuncSUBTR_SET ( Obj self, Obj set1, Obj set2 ) @@ -800,19 +760,19 @@ Obj SubtractSetHandler ( Obj e2; /* element of right set */ /* check the arguments */ - while ( ! IsSet( set1 ) || ! IS_MUTABLE_OBJ( set1 ) ) { + while ( ! IsSet(set1) || ! IS_MUTABLE_OBJ(set1) ) { set1 = ErrorReturnObj( "SubtractSet: must be a mutable proper set (not a %s)", - (Int)(InfoBags[TNUM_OBJ(set1)].name), 0L, + (Int)TNAM_OBJ(set1), 0L, "you can return a set for " ); } while ( ! IS_LIST(set2) ) { set2 = ErrorReturnObj( "SubtractSet: must be a list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(set2)].name), 0L, + (Int)TNAM_OBJ(set2), 0L, "you can return a list for " ); } - if ( ! IsSet( set2 ) ) set2 = SetList( set2 ); + if ( ! IsSet(set2) ) set2 = SetList(set2); /* get the logical lengths and the pointer */ len1 = LEN_PLIST( set1 ); @@ -849,14 +809,9 @@ Obj SubtractSetHandler ( SHRINK_PLIST( set1, lenr ); /* fix up the type of the result */ - /*N 1996/07/17 mschoene this is a hack */ - assert( TNUM_OBJ(set1) == T_PLIST_DENSE \ - || TNUM_OBJ(set1) == T_PLIST_EMPTY \ - || TNUM_OBJ(set1) == T_PLIST_HOM_SSORT \ - || TNUM_OBJ(set1) == T_PLIST_TAB_SSORT \ - || TNUM_OBJ(set1) == T_PLIST_CYC_SSORT ); if ( lenr == 0 ) { - RetypeBag( set1, T_PLIST_EMPTY ); + CLEAR_FILTS_LIST(set1); + SET_FILT_LIST( set1, FN_IS_EMPTY ); } /* return void, this is a procedure */ @@ -864,57 +819,87 @@ Obj SubtractSetHandler ( } +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + +*F SetupSet() . . . . . . . . . . . . . . . . . initialize the set package +*/ +void SetupSet ( void ) +{ +} + + /**************************************************************************** ** *F InitSet() . . . . . . . . . . . . . . . . . . initialize the set package ** ** 'InitSet' initializes the set package. */ -void InitSet ( void ) +void InitSet ( void ) { /* install internal functions */ - InitHandlerFunc( SetListHandler, "LIST_SORTED_LIST" ); - SetListFunc = NewFunctionC( - "LIST_SORTED_LIST", 1L, "list", SetListHandler ); - AssGVar( GVarName( "LIST_SORTED_LIST" ), SetListFunc ); - - InitHandlerFunc( IsEqualSetHandler, "IS_EQUAL_SET" ); - IsEqualSetFunc = NewFunctionC( - "IS_EQUAL_SET", 2L, "set1, set2", IsEqualSetHandler ); - AssGVar( GVarName( "IS_EQUAL_SET" ), IsEqualSetFunc ); - InitHandlerFunc( IsSubsetSetHandler, "IS_SUBSET_SET" ); - IsSubsetSetFunc = NewFunctionC( - "IS_SUBSET_SET", 2L, "set1, set2", IsSubsetSetHandler ); - AssGVar( GVarName( "IS_SUBSET_SET" ), IsSubsetSetFunc ); - InitHandlerFunc( AddSetHandler, "ADD_SET" ); - AddSetFunc = NewFunctionC( - "ADD_SET", 2L, "set, val", AddSetHandler ); - AssGVar( GVarName( "ADD_SET" ), AddSetFunc ); - InitHandlerFunc( RemoveSetHandler, "REM_SET" ); - RemoveSetFunc = NewFunctionC( - "REM_SET", 2L, "set, val", RemoveSetHandler ); - AssGVar( GVarName( "REM_SET" ), RemoveSetFunc ); - InitHandlerFunc( UniteSetHandler, "UNITE_SET" ); - UniteSetFunc = NewFunctionC( - "UNITE_SET", 2L, "set1, set2", UniteSetHandler ); - AssGVar( GVarName( "UNITE_SET" ), UniteSetFunc ); - InitHandlerFunc( IntersectSetHandler, "INTER_SET" ); - IntersectSetFunc = NewFunctionC( - "INTER_SET", 2L, "set1, set2", IntersectSetHandler ); - AssGVar( GVarName( "INTER_SET" ), IntersectSetFunc ); - InitHandlerFunc( SubtractSetHandler, "SUBTR_SET" ); - SubtractSetFunc = NewFunctionC( - "SUBTR_SET", 2L, "set1, set2", SubtractSetHandler ); - AssGVar( GVarName( "SUBTR_SET" ), SubtractSetFunc ); + C_NEW_GVAR_FUNC( "LIST_SORTED_LIST", 1, "list", + FuncLIST_SORTED_LIST, + "src/set.c:LIST_SORTED_LIST" ); + + C_NEW_GVAR_FUNC( "IS_EQUAL_SET", 2, "set1, set2", + FuncIS_EQUAL_SET, + "src/set.c:IS_EQUAL_SET" ); + + C_NEW_GVAR_FUNC( "IS_SUBSET_SET", 2, "set1, set2", + FuncIS_SUBSET_SET, + "src/set.c:IS_SUBSET_SET" ); + + + C_NEW_GVAR_FUNC( "ADD_SET", 2, "set, val", + FuncADD_SET, + "src/set.c:ADD_SET" ); + + C_NEW_GVAR_FUNC( "REM_SET", 2, "set, val", + FuncREM_SET, + "src/set.c:REM_SET" ); + + C_NEW_GVAR_FUNC( "UNITE_SET", 2, "set1, set2", + FuncUNITE_SET, + "src/set.c:UNITE_SET" ); + + C_NEW_GVAR_FUNC( "INTER_SET", 2, "set1, set2", + FuncINTER_SET, + "src/set.c:INTER_SET" ); + + C_NEW_GVAR_FUNC( "SUBTR_SET", 2, "set1, set2", + FuncSUBTR_SET, + "src/set.c:SUBTR_SET" ); + /* create the temporary union bag */ - InitGlobalBag( &TmpUnion, "set: temporary union" ); - TmpUnion = NEW_PLIST( T_PLIST_HOM_SSORT, 1024 ); - SET_LEN_PLIST( TmpUnion, 1024 ); + InitGlobalBag( &TmpUnion, "src/set.c:TmpUnion" ); + if ( ! SyRestoring ) { + TmpUnion = NEW_PLIST( T_PLIST, 1024 ); + SET_LEN_PLIST( TmpUnion, 1024 ); + } } /**************************************************************************** ** +*F CheckSet() . . . . . . . . . check the initialisation of the set package +*/ +void CheckSet ( void ) +{ + SET_REVISION( "set_c", Revision_set_c ); + SET_REVISION( "set_h", Revision_set_h ); +} + + +/**************************************************************************** +** + *E set.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here */ diff --git a/src/set.h b/src/set.h index 47b46bbb4c..1c9d4dc70b 100644 --- a/src/set.h +++ b/src/set.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A set.h GAP source Martin Schoenert +*W set.h GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -13,13 +13,14 @@ ** Read also section "More about Sets" about the internal flag for sets. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_set_h = +SYS_CONST char * Revision_set_h = "@(#)$Id$"; #endif /**************************************************************************** ** + *F SetList() . . . . . . . . . . . . . . . . . make a set from a list ** ** 'SetList' returns a new set that contains the elements of . Note @@ -52,13 +53,38 @@ extern Int IsSet ( Obj list ); +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + +*F SetupSet() . . . . . . . . . . . . . . . . . initialize the set package +*/ +extern void SetupSet ( void ); + + /**************************************************************************** ** *F InitSet() . . . . . . . . . . . . . . . . . . initialize the set package ** ** 'InitSet' initializes the set package. */ -extern void InitSet ( void ); +extern void InitSet ( void ); + + +/**************************************************************************** +** +*F CheckSet() . . . . . . . . . check the initialisation of the set package +*/ +extern void CheckSet ( void ); +/**************************************************************************** +** +*E set.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/stats.c b/src/stats.c index 05871b559f..124996814a 100644 --- a/src/stats.c +++ b/src/stats.c @@ -11,40 +11,44 @@ ** The statements package is the part of the interpreter that executes ** statements for their effects and prints statements. */ -#include "system.h" /* Ints, UInts */ +#include "system.h" /* system dependent part */ SYS_CONST char * Revision_stats_c = "@(#)$Id$"; #include "sysfiles.h" /* file input/output */ -#include "gasman.h" /* NewBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, types */ -#include "scanner.h" /* Pr */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ -#include "gvars.h" /* AssGVar */ +#include "gap.h" /* error handling, initialisation */ -#include "calls.h" /* NAMI_FUNC used by EVAL_EXPR */ +#include "gvars.h" /* global variables */ -#include "lists.h" /* IS_LIST, LEN_LIST, ELMV0_LIST */ -#include "plist.h" /* NEW_PLIST, SET_LEN_PLIST, ... */ +#include "calls.h" /* generic call mechanism */ -#include "bool.h" /* True, False */ +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ -#include "code.h" /* Stat, Expr, TNUM_STAT, ADDR_S...*/ -#include "vars.h" /* ASS_LVAR, ASS_HVAR */ -#include "exprs.h" /* EVAL_EXPR, EVAL_BOOL_EXPR, ... */ +#include "lists.h" /* generic lists */ +#include "plist.h" /* plain lists */ +#include "string.h" /* strings */ -#include "intrprtr.h" /* InfoDecision, InfoDoPrint, ... */ +#include "bool.h" /* booleans */ -#include "ariths.h" /* LT used by ExecAssert... */ +#include "code.h" /* coder */ +#include "vars.h" /* variables */ +#include "exprs.h" /* expressions */ + +#include "intrprtr.h" /* interpreter */ + +#include "ariths.h" /* basic arithmetic */ #define INCLUDE_DECLARATION_PART -#include "stats.h" /* declaration part of the package */ +#include "stats.h" /* statements */ #undef INCLUDE_DECLARATION_PART -#include "gap.h" /* Error */ - /**************************************************************************** ** @@ -785,7 +789,7 @@ UInt ExecForRange ( while ( ! IS_INTOBJ(elm) ) { elm = ErrorReturnObj( "Range: must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(elm)].name), 0L, + (Int)TNAM_OBJ(elm), 0L, "you can return an integer for " ); } first = INT_INTOBJ(elm); @@ -793,7 +797,7 @@ UInt ExecForRange ( while ( ! IS_INTOBJ(elm) ) { elm = ErrorReturnObj( "Range: must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(elm)].name), 0L, + (Int)TNAM_OBJ(elm), 0L, "you can return an integer for " ); } last = INT_INTOBJ(elm); @@ -847,7 +851,7 @@ UInt ExecForRange2 ( while ( ! IS_INTOBJ(elm) ) { elm = ErrorReturnObj( "Range: must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(elm)].name), 0L, + (Int)TNAM_OBJ(elm), 0L, "you can return an integer for " ); } first = INT_INTOBJ(elm); @@ -855,7 +859,7 @@ UInt ExecForRange2 ( while ( ! IS_INTOBJ(elm) ) { elm = ErrorReturnObj( "Range: must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(elm)].name), 0L, + (Int)TNAM_OBJ(elm), 0L, "you can return an integer for " ); } last = INT_INTOBJ(elm); @@ -914,7 +918,7 @@ UInt ExecForRange3 ( while ( ! IS_INTOBJ(elm) ) { elm = ErrorReturnObj( "Range: must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(elm)].name), 0L, + (Int)TNAM_OBJ(elm), 0L, "you can return an integer for " ); } first = INT_INTOBJ(elm); @@ -922,7 +926,7 @@ UInt ExecForRange3 ( while ( ! IS_INTOBJ(elm) ) { elm = ErrorReturnObj( "Range: must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(elm)].name), 0L, + (Int)TNAM_OBJ(elm), 0L, "you can return an integer for " ); } last = INT_INTOBJ(elm); @@ -1334,7 +1338,7 @@ UInt ExecAssert2Args ( while ( decision != True && decision != False ) { decision = ErrorReturnObj( "Assertion condition must evaluate to 'true' or 'false', not a %s", - (Int)(InfoBags[TNUM_OBJ(decision)].name), 0L, + (Int)TNAM_OBJ(decision), 0L, "you may return 'true' or 'false' or you may quit"); } if ( decision == False ) { @@ -1371,7 +1375,7 @@ UInt ExecAssert3Args ( while ( decision != True && decision != False ) { decision = ErrorReturnObj( "Assertion condition must evaluate to 'true' or 'false', not a %s", - (Int)(InfoBags[TNUM_OBJ(decision)].name), 0L, + (Int)TNAM_OBJ(decision), 0L, "you may return 'true' or 'false' or you may quit"); } if ( decision == False ) { @@ -1469,8 +1473,8 @@ UInt ExecIntrStat ( /* change the entries in 'ExecStatFuncs' back to the original */ if ( RealExecStatCopied ) { for ( i=0; i */ @@ -1864,21 +1868,19 @@ void PrintReturnVoid ( /**************************************************************************** ** -*F InitStats() . . . . . . . . . . . . . . . . initialize statements package +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** ** -** 'InitStats' initializes the statements package. + +*F SetupStats() . . . . . . . . . . . . . initialize the statements package */ -void InitStats ( void ) +void SetupStats ( void ) { UInt i; /* loop variable */ - /* make the global bags known to Gasman */ - /* 'InitGlobalBag( &CurrStat );' is not really needed, since we are in */ - /* for a lot of trouble if 'CurrStat' ever becomes the last reference. */ - /* furthermore, statements are no longer bags */ - /* InitGlobalBag( &CurrStat ); */ - InitGlobalBag( &ReturnObjStat, "stats: returned object" ); - /* install executors for non-statements */ for ( i = 0; i < sizeof(ExecStatFuncs)/sizeof(ExecStatFuncs[0]); i++ ) { ExecStatFuncs[i] = ExecUnknownStat; @@ -1945,6 +1947,24 @@ void InitStats ( void ) PrintStatFuncs[ T_ASSERT_3ARGS ] = PrintAssert3Args; PrintStatFuncs[ T_RETURN_OBJ ] = PrintReturnObj; PrintStatFuncs[ T_RETURN_VOID ] = PrintReturnVoid; +} + + + +/**************************************************************************** +** +*F InitStats() . . . . . . . . . . . . . . initialize the statements package +*/ +void InitStats ( void ) +{ + /* make the global bags known to Gasman */ + /* 'InitGlobalBag( &CurrStat );' is not really needed, since we are in */ + /* for a lot of trouble if 'CurrStat' ever becomes the last reference. */ + /* furthermore, statements are no longer bags */ + /* InitGlobalBag( &CurrStat ); */ + + InitGlobalBag( &ReturnObjStat, "src/stats.c:ReturnObjStat" ); + /* connect to external functions */ ImportFuncFromLibrary( "Iterator", &ITERATOR ); @@ -1954,3 +1974,20 @@ void InitStats ( void ) +/**************************************************************************** +** +*F CheckStats() . . . . . check the initialisation of the statements package +*/ +void CheckStats ( void ) +{ + SET_REVISION( "stats_c", Revision_stats_c ); + SET_REVISION( "stats_h", Revision_stats_h ); +} + + + +/**************************************************************************** +** + +*E stats.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/stats.h b/src/stats.h index c87071e474..fec3b309a7 100644 --- a/src/stats.h +++ b/src/stats.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A stats.h GAP source Martin Schoenert +*W stats.h GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -12,13 +12,14 @@ ** statements for their effects and prints statements. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_stats_h = +SYS_CONST char * Revision_stats_h = "@(#)$Id$"; #endif /**************************************************************************** ** + *F EXEC_STAT() . . . . . . . . . . . . . . . . . . execute a statement ** ** 'EXEC_STAT' executes the statement . @@ -130,11 +131,35 @@ extern void (* PrintStatFuncs[256] ) ( Stat stat ); /**************************************************************************** ** -*F InitStats() . . . . . . . . . . . . . . . . initialize statements package + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + +*F SetupStats() . . . . . . . . . . . . . initialize the statements package +*/ +extern void SetupStats ( void ); + + +/**************************************************************************** +** +*F InitStats() . . . . . . . . . . . . . . initialize the statements package +*/ +extern void InitStats ( void ); + + +/**************************************************************************** ** -** 'InitStats' initializes the statements package. +*F CheckStats() . . . . . check the initialisation of the statements package */ -extern void InitStats ( void ); +extern void CheckStats ( void ); +/**************************************************************************** +** +*E stats.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/streams.c b/src/streams.c index 418fdf31c6..b92c8c77a0 100644 --- a/src/streams.c +++ b/src/streams.c @@ -9,36 +9,38 @@ ** This file contains the various read-eval-print loops and streams related ** stuff. The system depend part is in "sysfiles.c". */ -char * Revision_streams_c = - "@(#)$Id$"; +#include +#include "system.h" /* system dependent part */ +SYS_CONST char * Revision_streams_c = + "@(#)$Id$"; -#include -#include "system.h" /* system dependent part */ #include "sysfiles.h" /* file input/output */ #include "gasman.h" /* garbage collector */ #include "objects.h" /* objects */ #include "scanner.h" /* scanner */ -#include "gap.h" /* error handling */ +#include "gap.h" /* error handling, initialisation */ #include "read.h" /* reader */ #include "gvars.h" /* global variables */ #include "calls.h" /* generic call mechanism */ -#include "lists.h" /* generic lists package */ -#include "plist.h" /* plain lists */ +#include "bool.h" /* booleans */ -#include "records.h" /* generic records package */ +#include "records.h" /* generic records */ #include "precord.h" /* plain records */ -#include "bool.h" /* booleans */ +#include "lists.h" /* generic lists */ +#include "plist.h" /* plain lists */ #include "string.h" /* strings */ +#include "saveload.h" /* saving and loading */ + #define INCLUDE_DECLARATION_PART -#include "streams.h" /* declaration part of the package */ +#include "streams.h" /* streams package */ #undef INCLUDE_DECLARATION_PART @@ -63,7 +65,7 @@ Int READ ( void ) /* now do the reading */ while ( 1 ) { - ClearError(); + ClearError(); type = ReadEvalCommand(); /* handle return-value or return-void command */ @@ -146,7 +148,7 @@ Int READ_TEST ( void ) while ( 1 ) { /* read and evaluate the command */ - ClearError(); + ClearError(); type = ReadEvalCommand(); /* stop the stopwatch */ @@ -162,7 +164,7 @@ Int READ_TEST ( void ) /* print the result */ if ( ! DualSemicolon ) { - ViewObjHandler( ReadEvalResult ); + ViewObjHandler( ReadEvalResult ); } } @@ -204,8 +206,10 @@ Int READ_GAP_ROOT ( Char * filename ) Char result[256]; Int res; UInt type; + UInt len; StructCompInitInfo* info; Obj func; + Obj fname; /* try to find the file */ res = SyFindOrLinkGapRootFile( filename, 0L, result, 256 ); @@ -225,6 +229,10 @@ Int READ_GAP_ROOT ( Char * filename ) (info->link)(); func = (Obj)(info->function1)(); CALL_0ARGS(func); + len = SyStrlen(filename); + fname = NEW_STRING( len ); + SyStrncat( CSTR_STRING(fname), filename, len ); + RecordLoadedModule(fname, info->magic1); return 1; } @@ -238,6 +246,10 @@ Int READ_GAP_ROOT ( Char * filename ) (info->link)(); func = (Obj)(info->function1)(); CALL_0ARGS(func); + len = SyStrlen(filename); + fname = NEW_STRING( len ); + SyStrncat( CSTR_STRING(fname), filename, len ); + RecordLoadedModule(fname, info->magic1); return 1; } @@ -249,7 +261,7 @@ Int READ_GAP_ROOT ( Char * filename ) } if ( OpenInput(result) ) { while ( 1 ) { - ClearError(); + ClearError(); type = ReadEvalCommand(); if ( type == 1 || type == 2 ) { Pr( "'return' must not be used in file", 0L, 0L ); @@ -259,7 +271,7 @@ Int READ_GAP_ROOT ( Char * filename ) } } CloseInput(); - ClearError(); + ClearError(); return 1; } else { @@ -319,7 +331,7 @@ Obj FuncLOG_TO ( while ( ! IsStringConv(filename) ) { filename = ErrorReturnObj( "LogTo: must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(filename)].name), 0L, + (Int)TNAM_OBJ(filename), 0L, "you can return a string for " ); } if ( ! OpenLog( CSTR_STRING(filename) ) ) { @@ -391,7 +403,7 @@ Obj FuncINPUT_LOG_TO ( while ( ! IsStringConv(filename) ) { filename = ErrorReturnObj( "InputLogTo: must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(filename)].name), 0L, + (Int)TNAM_OBJ(filename), 0L, "you can return a string for " ); } if ( ! OpenInputLog( CSTR_STRING(filename) ) ) { @@ -463,7 +475,7 @@ Obj FuncOUTPUT_LOG_TO ( while ( ! IsStringConv(filename) ) { filename = ErrorReturnObj( "OutputLogTo: must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(filename)].name), 0L, + (Int)TNAM_OBJ(filename), 0L, "you can return a string for " ); } if ( ! OpenOutputLog( CSTR_STRING(filename) ) ) { @@ -503,12 +515,15 @@ Obj FuncPrint ( { volatile Obj arg; volatile UInt i; - jmp_buf readJmpError; + jmp_buf readJmpError; /* print all the arguments, take care of strings and functions */ for ( i = 1; i <= LEN_PLIST(args); i++ ) { arg = ELM_LIST(args,i); - if ( IsStringConv(arg) && MUTABLE_TNUM(TNUM_OBJ(arg))==T_STRING ) { + if ( IS_LIST(arg) && 0 < LEN_LIST(arg) && IsStringConv(arg) ) { + PrintString1(arg); + } + else if ( IS_STRING_REP(arg) ) { PrintString1(arg); } else if ( TNUM_OBJ( arg ) == T_FUNCTION ) { @@ -517,17 +532,17 @@ Obj FuncPrint ( PrintObjFull = 0; } else { - memcpy( readJmpError, ReadJmpError, sizeof(jmp_buf) ); - - /* if an error occurs stop printing */ - if ( ! READ_ERROR() ) { - PrintObj( arg ); - } - else { - memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); - ReadEvalError(); - } - memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); + memcpy( readJmpError, ReadJmpError, sizeof(jmp_buf) ); + + /* if an error occurs stop printing */ + if ( ! READ_ERROR() ) { + PrintObj( arg ); + } + else { + memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); + ReadEvalError(); + } + memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); } } @@ -546,14 +561,14 @@ Obj FuncPRINT_TO ( volatile Obj arg; volatile Obj filename; volatile UInt i; - jmp_buf readJmpError; + jmp_buf readJmpError; /* first entry is the filename */ filename = ELM_LIST(args,1); while ( ! IsStringConv(filename) ) { filename = ErrorReturnObj( "PrintTo: must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(filename)].name), 0L, + (Int)TNAM_OBJ(filename), 0L, "you can return a string for " ); } @@ -567,7 +582,10 @@ Obj FuncPRINT_TO ( /* print all the arguments, take care of strings and functions */ for ( i = 2; i <= LEN_PLIST(args); i++ ) { arg = ELM_LIST(args,i); - if ( IsStringConv(arg) && MUTABLE_TNUM(TNUM_OBJ(arg))==T_STRING ) { + if ( IS_LIST(arg) && 0 < LEN_LIST(arg) && IsStringConv(arg) ) { + PrintString1(arg); + } + else if ( IS_STRING_REP(arg) ) { PrintString1(arg); } else if ( TNUM_OBJ( arg ) == T_FUNCTION ) { @@ -576,18 +594,18 @@ Obj FuncPRINT_TO ( PrintObjFull = 0; } else { - memcpy( readJmpError, ReadJmpError, sizeof(jmp_buf) ); - - /* if an error occurs stop printing */ - if ( ! READ_ERROR() ) { - PrintObj( arg ); - } - else { - CloseOutput(); - memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); - ReadEvalError(); - } - memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); + memcpy( readJmpError, ReadJmpError, sizeof(jmp_buf) ); + + /* if an error occurs stop printing */ + if ( ! READ_ERROR() ) { + PrintObj( arg ); + } + else { + CloseOutput(); + memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); + ReadEvalError(); + } + memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); } } @@ -612,7 +630,7 @@ Obj FuncPRINT_TO_STREAM ( volatile Obj arg; volatile Obj stream; volatile UInt i; - jmp_buf readJmpError; + jmp_buf readJmpError; /* first entry is the stream */ stream = ELM_LIST(args,1); @@ -627,27 +645,30 @@ Obj FuncPRINT_TO_STREAM ( for ( i = 2; i <= LEN_PLIST(args); i++ ) { arg = ELM_LIST(args,i); - /* if an error occurs stop printing */ - memcpy( readJmpError, ReadJmpError, sizeof(jmp_buf) ); - if ( ! READ_ERROR() ) { - if (IsStringConv(arg) && MUTABLE_TNUM(TNUM_OBJ(arg))==T_STRING) { - PrintString1(arg); - } - else if ( TNUM_OBJ( arg ) == T_FUNCTION ) { - PrintObjFull = 1; - PrintFunction( arg ); - PrintObjFull = 0; - } - else { - PrintObj( arg ); - } - } - else { - CloseOutput(); - memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); - ReadEvalError(); - } - memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); + /* if an error occurs stop printing */ + memcpy( readJmpError, ReadJmpError, sizeof(jmp_buf) ); + if ( ! READ_ERROR() ) { + if ( IS_LIST(arg) && 0 < LEN_LIST(arg) && IsStringConv(arg) ) { + PrintString1(arg); + } + else if ( IS_STRING_REP(arg) ) { + PrintString1(arg); + } + else if ( TNUM_OBJ( arg ) == T_FUNCTION ) { + PrintObjFull = 1; + PrintFunction( arg ); + PrintObjFull = 0; + } + else { + PrintObj( arg ); + } + } + else { + CloseOutput(); + memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); + ReadEvalError(); + } + memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); } /* close the output file again, and return nothing */ @@ -671,14 +692,14 @@ Obj FuncAPPEND_TO ( volatile Obj arg; volatile Obj filename; volatile UInt i; - jmp_buf readJmpError; + jmp_buf readJmpError; /* first entry is the filename */ filename = ELM_LIST(args,1); while ( ! IsStringConv(filename) ) { filename = ErrorReturnObj( "AppendTo: must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(filename)].name), 0L, + (Int)TNAM_OBJ(filename), 0L, "you can return a string for " ); } @@ -692,27 +713,30 @@ Obj FuncAPPEND_TO ( /* print all the arguments, take care of strings and functions */ for ( i = 2; i <= LEN_PLIST(args); i++ ) { arg = ELM_LIST(args,i); - if ( IsStringConv(arg) && MUTABLE_TNUM(TNUM_OBJ(arg))==T_STRING ) { + if ( IS_LIST(arg) && 0 < LEN_LIST(arg) && IsStringConv(arg) ) { PrintString1(arg); } - else if ( TNUM_OBJ( arg ) == T_FUNCTION ) { + else if ( IS_STRING_REP(arg) ) { + PrintString1(arg); + } + else if ( TNUM_OBJ(arg) == T_FUNCTION ) { PrintObjFull = 1; PrintFunction( arg ); PrintObjFull = 0; } else { - memcpy( readJmpError, ReadJmpError, sizeof(jmp_buf) ); - - /* if an error occurs stop printing */ - if ( ! READ_ERROR() ) { - PrintObj( arg ); - } - else { - CloseOutput(); - memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); - ReadEvalError(); - } - memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); + memcpy( readJmpError, ReadJmpError, sizeof(jmp_buf) ); + + /* if an error occurs stop printing */ + if ( ! READ_ERROR() ) { + PrintObj( arg ); + } + else { + CloseOutput(); + memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); + ReadEvalError(); + } + memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); } } @@ -737,7 +761,7 @@ Obj FuncAPPEND_TO_STREAM ( volatile Obj arg; volatile Obj stream; volatile UInt i; - jmp_buf readJmpError; + jmp_buf readJmpError; /* first entry is the stream */ stream = ELM_LIST(args,1); @@ -752,27 +776,30 @@ Obj FuncAPPEND_TO_STREAM ( for ( i = 2; i <= LEN_PLIST(args); i++ ) { arg = ELM_LIST(args,i); - /* if an error occurs stop printing */ - memcpy( readJmpError, ReadJmpError, sizeof(jmp_buf) ); - if ( ! READ_ERROR() ) { - if (IsStringConv(arg) && MUTABLE_TNUM(TNUM_OBJ(arg))==T_STRING) { - PrintString1(arg); - } - else if ( TNUM_OBJ( arg ) == T_FUNCTION ) { - PrintObjFull = 1; - PrintFunction( arg ); - PrintObjFull = 0; - } - else { - PrintObj( arg ); - } - } - else { - CloseOutput(); - memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); - ReadEvalError(); - } - memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); + /* if an error occurs stop printing */ + memcpy( readJmpError, ReadJmpError, sizeof(jmp_buf) ); + if ( ! READ_ERROR() ) { + if ( IS_LIST(arg) && 0 < LEN_LIST(arg) && IsStringConv(arg) ) { + PrintString1(arg); + } + else if ( IS_STRING_REP(arg) ) { + PrintString1(arg); + } + else if ( TNUM_OBJ( arg ) == T_FUNCTION ) { + PrintObjFull = 1; + PrintFunction( arg ); + PrintObjFull = 0; + } + else { + PrintObj( arg ); + } + } + else { + CloseOutput(); + memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); + ReadEvalError(); + } + memcpy( ReadJmpError, readJmpError, sizeof(jmp_buf) ); } /* close the output file again, and return nothing */ @@ -797,7 +824,7 @@ Obj FuncREAD ( while ( ! IsStringConv( filename ) ) { filename = ErrorReturnObj( "READ: must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(filename)].name), 0L, + (Int)TNAM_OBJ(filename), 0L, "you can return a string for " ); } @@ -841,7 +868,7 @@ Obj FuncREAD_TEST ( while ( ! IsStringConv( filename ) ) { filename = ErrorReturnObj( "ReadTest: must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(filename)].name), 0L, + (Int)TNAM_OBJ(filename), 0L, "you can return a string for " ); } @@ -885,7 +912,7 @@ Obj FuncREAD_AS_FUNC ( while ( ! IsStringConv( filename ) ) { filename = ErrorReturnObj( "READ_AS_FUNC: must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(filename)].name), 0L, + (Int)TNAM_OBJ(filename), 0L, "you can return a string for " ); } @@ -929,7 +956,7 @@ Obj FuncREAD_GAP_ROOT ( while ( ! IsStringConv( filename ) ) { filename = ErrorReturnObj( "READ: must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(filename)].name), 0L, + (Int)TNAM_OBJ(filename), 0L, "you can return a string for " ); } @@ -951,7 +978,7 @@ Obj FuncTmpName ( tmp = SyTmpname(); if ( tmp == 0 ) - return Fail; + return Fail; C_NEW_STRING( name, SyStrlen(tmp), tmp ); return name; } @@ -969,7 +996,7 @@ Obj FuncTmpDirectory ( tmp = SyTmpdir("tmp"); if ( tmp == 0 ) - return Fail; + return Fail; C_NEW_STRING( name, SyStrlen(tmp), tmp ); return name; } @@ -987,7 +1014,7 @@ Obj FuncRemoveFile ( while ( ! IsStringConv( filename ) ) { filename = ErrorReturnObj( " must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(filename)].name), 0L, + (Int)TNAM_OBJ(filename), 0L, "you can return a string for " ); } @@ -1022,16 +1049,16 @@ Obj FuncLastSystemError ( /* check if an errors has occured */ if ( SyLastErrorNo != 0 ) { - ASS_REC( err, ErrorNumberRNam, INTOBJ_INT(SyLastErrorNo) ); - C_NEW_STRING(msg, SyStrlen(SyLastErrorMessage), SyLastErrorMessage); - ASS_REC( err, ErrorMessageRNam, msg ); + ASS_REC( err, ErrorNumberRNam, INTOBJ_INT(SyLastErrorNo) ); + C_NEW_STRING(msg, SyStrlen(SyLastErrorMessage), SyLastErrorMessage); + ASS_REC( err, ErrorMessageRNam, msg ); } /* no error has occured */ else { - ASS_REC( err, ErrorNumberRNam, INTOBJ_INT(0) ); - C_NEW_STRING( msg, 8, "no error" ); - ASS_REC( err, ErrorMessageRNam, msg ); + ASS_REC( err, ErrorNumberRNam, INTOBJ_INT(0) ); + C_NEW_STRING( msg, 8, "no error" ); + ASS_REC( err, ErrorMessageRNam, msg ); } /* return the error record */ @@ -1053,7 +1080,7 @@ Obj FuncIsExistingFile ( while ( ! IsStringConv( filename ) ) { filename = ErrorReturnObj( " must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(filename)].name), 0L, + (Int)TNAM_OBJ(filename), 0L, "you can return a string for " ); } @@ -1077,7 +1104,7 @@ Obj FuncIsReadableFile ( while ( ! IsStringConv( filename ) ) { filename = ErrorReturnObj( " must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(filename)].name), 0L, + (Int)TNAM_OBJ(filename), 0L, "you can return a string for " ); } @@ -1101,7 +1128,7 @@ Obj FuncIsWritableFile ( while ( ! IsStringConv( filename ) ) { filename = ErrorReturnObj( " must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(filename)].name), 0L, + (Int)TNAM_OBJ(filename), 0L, "you can return a string for " ); } @@ -1125,7 +1152,7 @@ Obj FuncIsExecutableFile ( while ( ! IsStringConv( filename ) ) { filename = ErrorReturnObj( " must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(filename)].name), 0L, + (Int)TNAM_OBJ(filename), 0L, "you can return a string for " ); } @@ -1149,7 +1176,7 @@ Obj FuncIsDirectoryPath ( while ( ! IsStringConv( filename ) ) { filename = ErrorReturnObj( " must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(filename)].name), 0L, + (Int)TNAM_OBJ(filename), 0L, "you can return a string for " ); } @@ -1180,7 +1207,7 @@ Obj FuncCLOSE_FILE ( while ( ! IS_INTOBJ(fid) ) { fid = ErrorReturnObj( " must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(fid)].name), 0L, + (Int)TNAM_OBJ(fid), 0L, "you can return an integer for " ); } @@ -1204,7 +1231,7 @@ Obj FuncINPUT_TEXT_FILE ( while ( ! IsStringConv( filename ) ) { filename = ErrorReturnObj( " must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(filename)].name), 0L, + (Int)TNAM_OBJ(filename), 0L, "you can return a string for " ); } @@ -1212,7 +1239,7 @@ Obj FuncINPUT_TEXT_FILE ( SyClearErrorNo(); fid = SyFopen( CSTR_STRING(filename), "r" ); if ( fid == - 1) - SySetErrorNo(); + SySetErrorNo(); return fid == -1 ? Fail : INTOBJ_INT(fid); } @@ -1231,7 +1258,7 @@ Obj FuncIS_END_OF_FILE ( while ( ! IS_INTOBJ(fid) ) { fid = ErrorReturnObj( " must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(fid)].name), 0L, + (Int)TNAM_OBJ(fid), 0L, "you can return an integer for " ); } @@ -1255,26 +1282,26 @@ Obj FuncOUTPUT_TEXT_FILE ( while ( ! IsStringConv( filename ) ) { filename = ErrorReturnObj( " must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(filename)].name), 0L, + (Int)TNAM_OBJ(filename), 0L, "you can return a string for " ); } while ( append != True && append != False ) { filename = ErrorReturnObj( " must be a boolean (not a %s)", - (Int)(InfoBags[TNUM_OBJ(append)].name), 0L, + (Int)TNAM_OBJ(append), 0L, "you can return a string for " ); } /* call the system dependent function */ SyClearErrorNo(); if ( append == True ) { - fid = SyFopen( CSTR_STRING(filename), "a" ); + fid = SyFopen( CSTR_STRING(filename), "a" ); } else { - fid = SyFopen( CSTR_STRING(filename), "w" ); + fid = SyFopen( CSTR_STRING(filename), "w" ); } if ( fid == - 1) - SySetErrorNo(); + SySetErrorNo(); return fid == -1 ? Fail : INTOBJ_INT(fid); } @@ -1293,7 +1320,7 @@ Obj FuncPOSITION_FILE ( while ( ! IS_INTOBJ(fid) ) { fid = ErrorReturnObj( " must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(fid)].name), 0L, + (Int)TNAM_OBJ(fid), 0L, "you can return an integer for " ); } @@ -1316,7 +1343,7 @@ Obj FuncREAD_BYTE_FILE ( while ( ! IS_INTOBJ(fid) ) { fid = ErrorReturnObj( " must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(fid)].name), 0L, + (Int)TNAM_OBJ(fid), 0L, "you can return an integer for " ); } @@ -1343,7 +1370,7 @@ Obj FuncREAD_LINE_FILE ( while ( ! IS_INTOBJ(fid) ) { fid = ErrorReturnObj( " must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(fid)].name), 0L, + (Int)TNAM_OBJ(fid), 0L, "you can return an integer for " ); } @@ -1385,13 +1412,13 @@ Obj FuncSEEK_POSITION_FILE ( while ( ! IS_INTOBJ(fid) ) { fid = ErrorReturnObj( " must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(fid)].name), 0L, + (Int)TNAM_OBJ(fid), 0L, "you can return an integer for " ); } while ( ! IS_INTOBJ(pos) ) { pos = ErrorReturnObj( " must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(pos)].name), 0L, + (Int)TNAM_OBJ(pos), 0L, "you can return an integer for " ); } @@ -1415,13 +1442,13 @@ Obj FuncWRITE_BYTE_FILE ( while ( ! IS_INTOBJ(fid) ) { fid = ErrorReturnObj( " must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(fid)].name), 0L, + (Int)TNAM_OBJ(fid), 0L, "you can return an integer for " ); } while ( ! IS_INTOBJ(ch) ) { ch = ErrorReturnObj( " must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(ch)].name), 0L, + (Int)TNAM_OBJ(ch), 0L, "you can return an integer for " ); } @@ -1447,74 +1474,74 @@ static Obj ExecArgs [ 1024 ]; static Char * ExecCArgs [ 1024 ]; Obj FuncExecuteProcess ( - Obj self, - Obj dir, - Obj prg, - Obj in, - Obj out, - Obj args ) + Obj self, + Obj dir, + Obj prg, + Obj in, + Obj out, + Obj args ) { Obj tmp; - Int res; + Int res; Int i; /* check the argument */ while ( ! IsStringConv(dir) ) { dir = ErrorReturnObj( " must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(dir)].name), 0L, + (Int)TNAM_OBJ(dir), 0L, "you can return a string for " ); } while ( ! IsStringConv(prg) ) { prg = ErrorReturnObj( " must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(prg)].name), 0L, + (Int)TNAM_OBJ(prg), 0L, "you can return a string for " ); } while ( ! IS_INTOBJ(in) ) { in = ErrorReturnObj( " must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(in)].name), 0L, + (Int)TNAM_OBJ(in), 0L, "you can return an integer for " ); } while ( ! IS_INTOBJ(out) ) { out = ErrorReturnObj( " must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(out)].name), 0L, + (Int)TNAM_OBJ(out), 0L, "you can return an integer for " ); } while ( ! IS_LIST(args) ) { args = ErrorReturnObj( " must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(args)].name), 0L, + (Int)TNAM_OBJ(args), 0L, "you can return an integer for " ); } /* create an argument array */ for ( i = 1; i <= LEN_LIST(args); i++ ) { - if ( i == 1023 ) - break; - tmp = ELM_LIST( args, i ); - while ( ! IsStringConv(tmp) ) { - tmp = ErrorReturnObj( - " must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(tmp)].name), 0L, - "you can return a string for " ); - } - ExecArgs[i] = tmp; + if ( i == 1023 ) + break; + tmp = ELM_LIST( args, i ); + while ( ! IsStringConv(tmp) ) { + tmp = ErrorReturnObj( + " must be a string (not a %s)", + (Int)TNAM_OBJ(tmp), 0L, + "you can return a string for " ); + } + ExecArgs[i] = tmp; } ExecCArgs[0] = CSTR_STRING(prg); - ExecCArgs[i+1] = 0; + ExecCArgs[i] = 0; for ( i--; 0 < i; i-- ) { - ExecCArgs[i] = CSTR_STRING(ExecArgs[i]); + ExecCArgs[i] = CSTR_STRING(ExecArgs[i]); } /* execute the process */ res = SyExecuteProcess( CSTR_STRING(dir), - CSTR_STRING(prg), - INT_INTOBJ(in), - INT_INTOBJ(out), - ExecCArgs ); + CSTR_STRING(prg), + INT_INTOBJ(in), + INT_INTOBJ(out), + ExecCArgs ); return res == 255 ? Fail : INTOBJ_INT(res); } @@ -1530,10 +1557,23 @@ Obj FuncExecuteProcess ( /**************************************************************************** ** -*F InitStreams() . . . . . . . . . . . . . . . . . . . . . intialize streams +*F SetupStreams(). . . . . . . . . . . . . . . intialize the streams package +*/ +void SetupStreams ( void ) +{ +} + + +/**************************************************************************** +** +*F InitStreams() . . . . . . . . . . . . . . . intialize the streams package */ -void InitStreams () +void InitStreams ( void ) { + /* file access test functions */ + ErrorNumberRNam = RNamName("number"); + ErrorMessageRNam = RNamName("message"); + /* streams and files related functions */ C_NEW_GVAR_FUNC( "READ", 1L, "filename", FuncREAD, @@ -1633,9 +1673,6 @@ void InitStreams () /* file access test functions */ - ErrorNumberRNam = RNamName("number"); - ErrorMessageRNam = RNamName("message"); - C_NEW_GVAR_FUNC( "LastSystemError", 0L, "", FuncLastSystemError, "src/sreams.c:LastSystemError" ); @@ -1705,6 +1742,15 @@ void InitStreams () } +/**************************************************************************** +** +*F CheckStreams() . . . . . check the initialisation of the streams package +*/ +void CheckStreams ( void ) +{ +} + + /**************************************************************************** ** diff --git a/src/streams.h b/src/streams.h index c76a0231f7..4ca6d67496 100644 --- a/src/streams.h +++ b/src/streams.h @@ -10,7 +10,7 @@ ** stuff. The system depend part is in "sysfiles.c". */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_streams_h = +SYS_CONST char * Revision_streams_h = "@(#)$Id$"; #endif @@ -70,9 +70,23 @@ extern Int READ_GAP_ROOT ( Char * filename ); /**************************************************************************** ** -*F InitStreams() . . . . . . . . . . . . . . . . . . . . . intialize streams +*F SetupStreams(). . . . . . . . . . . . . . . intialize the streams package */ -extern void InitStreams (); +extern void SetupStreams ( void ); + + +/**************************************************************************** +** +*F InitStreams() . . . . . . . . . . . . . . . intialize the streams package +*/ +extern void InitStreams ( void ); + + +/**************************************************************************** +** +*F CheckStreams() . . . . . check the initialisation of the streams package +*/ +extern void CheckStreams ( void ); /**************************************************************************** diff --git a/src/string.c b/src/string.c index 336fc8721a..149d5e66c5 100644 --- a/src/string.c +++ b/src/string.c @@ -1,6 +1,7 @@ /**************************************************************************** ** -*A string.c GAP source Martin Schoenert +*W string.c GAP source Frank Celler +*W & Martin Schoenert ** *H @(#)$Id$ ** @@ -45,39 +46,49 @@ ** by 'FunPrint', and 'IsString', which test whether an arbitrary list is a ** string, and if so converts it into the above format. */ -char * Revision_string_c = - "@(#)$Id$"; +#include "system.h" /* system dependent part */ -#include "system.h" /* system dependent functions */ +SYS_CONST char * Revision_string_c = + "@(#)$Id$"; -#include "gasman.h" /* NewBag, ResizeBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, SIZE_OBJ, ... */ -#include "scanner.h" /* Pr */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ -#include "gvars.h" /* AssGVar, GVarName */ +#include "gap.h" /* error handling, initialisation */ +#include "gvars.h" /* global variables */ #include "calls.h" /* generic call mechanism */ -#include "opers.h" /* generic operations package */ +#include "opers.h" /* generic operations */ -#include "ariths.h" /* generic operations package */ -#include "lists.h" /* generic list package */ +#include "ariths.h" /* basic arithmetic */ -#include "bool.h" /* True, False */ +#include "bool.h" /* booleans */ -#include "plist.h" /* GET_LEN_PLIST, GET_ELM_PLIST,...*/ +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ -#include "range.h" /* GET_LEN_RANGE, GET_LOW_RANGE,...*/ +#include "lists.h" /* generic lists */ +#include "plist.h" /* plain lists */ +#include "range.h" /* ranges */ #define INCLUDE_DECLARATION_PART -#include "string.h" /* declaration part of the package */ +#include "string.h" /* strings */ #undef INCLUDE_DECLARATION_PART -#include "gap.h" /* Error */ +#include "saveload.h" /* saving and loading */ /**************************************************************************** ** +*F * * * * * * * * * * * * * * character functions * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + + *V ObjsChar[] . . . . . . . . . . . . . . . . table of character values ** ** 'ObjsChar' contains all the character values. That way we do not need to @@ -161,6 +172,37 @@ void PrintChar ( /**************************************************************************** ** +*F SaveChar( ) . . . . . . . . . . . . . . . . . . save a character +** +*/ +void SaveChar ( Obj c ) +{ + SaveUInt1( *(UChar *)ADDR_OBJ(c)); +} + + +/**************************************************************************** +** +*F LoadChar( ) . . . . . . . . . . . . . . . . . . load a character +** +*/ +void LoadChar( Obj c ) +{ + *(UChar *)ADDR_OBJ(c) = LoadUInt1(); +} + + + +/**************************************************************************** +** + +*F * * * * * * * * * * * * * * GAP level functions * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + + *F FuncCHAR_INT( , ) . . . . . . . . . . . . . . char by integer */ Obj FuncCHAR_INT ( @@ -174,7 +216,7 @@ Obj FuncCHAR_INT ( while ( ! IS_INTOBJ(val) ) { val = ErrorReturnObj( " must be an integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(val)].name), 0L, + (Int)TNAM_OBJ(val), 0L, "you can return an integer for " ); } chr = INT_INTOBJ(val); @@ -202,7 +244,7 @@ Obj FuncINT_CHAR ( while ( TNUM_OBJ(val) != T_CHAR ) { val = ErrorReturnObj( " must be a character (not a %s)", - (Int)(InfoBags[TNUM_OBJ(val)].name), 0L, + (Int)TNAM_OBJ(val), 0L, "you can return a character for " ); } @@ -214,58 +256,12 @@ Obj FuncINT_CHAR ( /**************************************************************************** ** -*F NEW_STRING() . . . . . . . . . . . . . . . . . . . make a new string -** -** 'NEW_STRING' makes a new string with room for characters. -** -** Note that 'NEW_STRING' is a macro, so do not call it with arguments that -** have sideeffects. -** -** 'NEW_STRING' is defined in the declaration part of this package as -** follows -** -#define NEW_STRING(len) \ - NewBag( T_STRING, (len) + 1 ) -*/ - - -/**************************************************************************** -** -*F CSTR_STRING() . . . . . . . . . . . . . . . . C string of a string -** -** 'CSTR_STRING' returns the (address of the) C character string of the -** string . -** -** Note that 'CSTR_STRING' is a macro, so do not call it with arguments that -** have sideeffects. -** -** 'CSTR_STRING' is defined in the declaration part of this package as -** follows -** -#define CSTR_STRING(list) \ - ((Char*)ADDR_OBJ(list)) +*F * * * * * * * * * * * * * * * string functions * * * * * * * * * * * * * * */ - /**************************************************************************** ** -*F GET_LEN_STRING() . . . . . . . . . . . . . . . length of a string -** -** 'GET_LEN_STRING' returns the length of the string , as a C integer. -** -** Note that 'GET_LEN_STRING' is a macro, so do not call it with arguments -** that have sideeffects. -** -** 'GET_LEN_STRING' is defined in the declaration part of this package as -** follows -** -#define GET_LEN_STRING(list) \ - (SIZE_OBJ(list)-1) -*/ - -/**************************************************************************** -** *F GET_ELM_STRING(,) . . . . . . . select an element of a string ** ** 'GET_ELM_STRING' returns the -th element of the string . @@ -291,13 +287,12 @@ Obj FuncINT_CHAR ( ** ** 'TypeString' is the function in 'TypeObjFuncs' for strings. */ -extern Obj TYPE_LIST_EMPTY_MUTABLE; - -extern Obj TYPE_LIST_EMPTY_IMMUTABLE; +extern Obj TYPE_LIST_EMPTY_MUTABLE; +extern Obj TYPE_LIST_EMPTY_IMMUTABLE; +extern Obj TYPE_LIST_HOM; -extern Obj TYPE_LIST_HOM; -Obj TypeString ( +Obj TypeString ( Obj list ) { Obj kind; /* kind, result */ @@ -337,6 +332,35 @@ Obj TypeString ( /**************************************************************************** ** +*F SaveString( ) . . . . . . . . . . . . . . . . . . save a string +** +*/ +void SaveString ( Obj string ) +{ + SaveCStr( CSTR_STRING(string) ); +} + +/**************************************************************************** +** +*F LoadString( ) +** +*/ +void LoadString ( Obj string ) +{ + LoadCStr( CSTR_STRING(string), + SIZE_OBJ(string)*(sizeof(Obj)/sizeof(Char)) ); +} + + +/**************************************************************************** +** + +*F * * * * * * * * * * * * * * copy functions * * * * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + *F CopyString( , ) . . . . . . . . . . . . . . . . copy a string ** @@ -382,7 +406,7 @@ Obj CopyString ( CHANGED_BAG( list ); /* now it is copied */ - RetypeBag( list, TNUM_OBJ(list) + COPYING ); + MARK_LIST( list, COPYING ); /* copy the subvalues */ for ( i = 1; i < (SIZE_OBJ(copy)+sizeof(Obj)-1)/sizeof(Obj); i++ ) { @@ -427,13 +451,20 @@ void CleanStringCopy ( ADDR_OBJ(list)[0] = ADDR_OBJ( ADDR_OBJ(list)[0] )[0]; /* now it is cleaned */ - RetypeBag( list, TNUM_OBJ(list) - COPYING ); + UNMARK_LIST( list, COPYING ); } /**************************************************************************** ** +*F * * * * * * * * * * * * * * list functions * * * * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + + *F PrintString() . . . . . . . . . . . . . . . . . . . print a string ** ** 'PrintString' prints the string with the handle . @@ -441,7 +472,7 @@ void CleanStringCopy ( ** No linebreaks are allowed, if one must be inserted anyhow, it must be ** escaped by a backslash '\', which is done in 'Pr'. */ -void PrintString ( +void PrintString ( Obj list ) { Pr( "\"%S\"", (Int)CSTR_STRING(list), 0L ); @@ -455,7 +486,7 @@ void PrintString ( ** 'PrintString1' prints the string constant in the format used by the ** 'Print' and 'PrintTo' function. */ -void PrintString1 ( +void PrintString1 ( Obj list ) { Pr( "%s", (Int)CSTR_STRING(list), 0L ); @@ -469,7 +500,7 @@ void PrintString1 ( ** 'EqString' returns 'true' if the two strings and are ** equal and 'false' otherwise. */ -Int EqString ( +Int EqString ( Obj listL, Obj listR ) { @@ -484,7 +515,7 @@ Int EqString ( ** 'LtString' returns 'true' if the string is less than the string ** and 'false' otherwise. */ -Int LtString ( +Int LtString ( Obj listL, Obj listR ) { @@ -500,7 +531,7 @@ Int LtString ( ** ** 'LenString' is the function in 'LenListFuncs' for strings. */ -Int LenString ( +Int LenString ( Obj list ) { return GET_LEN_STRING( list ); @@ -522,7 +553,7 @@ Int LenString ( ** 'IsbString' is the function in 'IsbListFuncs' for strings. ** 'IsbvString' is the function in 'IsbvListFuncs' for strings. */ -Int IsbString ( +Int IsbString ( Obj list, Int pos ) { @@ -530,7 +561,7 @@ Int IsbString ( return (pos <= GET_LEN_STRING(list)); } -Int IsbvString ( +Int IsbvString ( Obj list, Int pos ) { @@ -554,7 +585,7 @@ Int IsbvString ( ** 'Elm0String' is the function on 'Elm0ListFuncs' for strings. ** 'Elm0vString' is the function in 'Elm0vListFuncs' for strings. */ -Obj Elm0String ( +Obj Elm0String ( Obj list, Int pos ) { @@ -566,7 +597,7 @@ Obj Elm0String ( } } -Obj Elm0vString ( +Obj Elm0vString ( Obj list, Int pos ) { @@ -593,7 +624,7 @@ Obj Elm0vString ( ** 'ElmfString' is the function in 'ElmfListFuncs' for strings. ** 'ElmwString' is the function in 'ElmwListFuncs' for strings. */ -Obj ElmString ( +Obj ElmString ( Obj list, Int pos ) { @@ -627,7 +658,7 @@ Obj ElmString ( ** ** 'ElmsString' is the function in 'ElmsListFuncs' for strings. */ -Obj ElmsString ( +Obj ElmsString ( Obj list, Obj poss ) { @@ -738,14 +769,14 @@ Obj ElmsString ( ** *N 1996/06/11 mschoene this is the default and should probably not be here */ -void AssString ( +void AssString ( Obj list, Int pos, Obj val ) { /* convert the range into a plain list */ - PLAIN_LIST( list ); - RetypeBag( list, T_PLIST ); + PLAIN_LIST(list); + CLEAR_FILTS_LIST(list); /* resize the list if necessary */ if ( LEN_PLIST(list) < pos ) { @@ -758,7 +789,7 @@ void AssString ( CHANGED_BAG( list ); } -void AssStringImm ( +void AssStringImm ( Obj list, Int pos, Obj val ) @@ -786,20 +817,20 @@ void AssStringImm ( ** same stuff as 'AsssPlist'. This is because a string is not very likely ** to stay a string after the assignment. */ -void AsssString ( +void AsssString ( Obj list, Obj poss, Obj vals ) { /* convert to a plain list */ - PLAIN_LIST( list ); - RetypeBag( list, T_PLIST ); + PLAIN_LIST(list); + CLEAR_FILTS_LIST(list); /* and delegate */ ASSS_LIST( list, poss, vals ); } -void AsssStringImm ( +void AsssStringImm ( Obj list, Obj poss, Obj val ) @@ -819,7 +850,7 @@ void AsssStringImm ( ** ** 'IsDenseString' is the function in 'IsDenseListFuncs' for strings. */ -Int IsDenseString ( +Int IsDenseString ( Obj list ) { return 1L; @@ -835,7 +866,7 @@ Int IsDenseString ( ** ** 'IsHomogString' is the function in 'IsHomogListFuncs' for strings. */ -Int IsHomogString ( +Int IsHomogString ( Obj list ) { return (0 < GET_LEN_STRING(list)); @@ -851,32 +882,33 @@ Int IsHomogString ( ** ** 'IsSSortString' is the function in 'IsSSortListFuncs' for strings. */ -Int IsSSortString ( +Int IsSSortString ( Obj list ) { Int len; Int i; + UInt1 * ptr; /* test whether the string is strictly sorted */ len = GET_LEN_STRING( list ); + ptr = (UInt1*) CSTR_STRING(list); for ( i = 1; i < len; i++ ) { - if ( ! (CSTR_STRING(list)[i] < CSTR_STRING(list)[i+1]) ) + if ( ! (ptr[i] < ptr[i+1]) ) break; } /* retype according to the outcome */ - RetypeBag( list, (len <= i ? T_STRING_SSORT : T_STRING_NSORT) - + (IS_MUTABLE_OBJ(list) ? 0 : IMMUTABLE) ); + SET_FILT_LIST( list, (len <= i) ? FN_IS_SSORT : FN_IS_NSORT ); return (len <= i); } -Int IsSSortStringNot ( +Int IsSSortStringNot ( Obj list ) { return 0L; } -Int IsSSortStringYes ( +Int IsSSortStringYes ( Obj list ) { return 1L; @@ -891,7 +923,7 @@ Int IsSSortStringYes ( ** ** 'IsPossString' is the function in 'TabIsPossList' for strings. */ -Int IsPossString ( +Int IsPossString ( Obj list ) { return GET_LEN_STRING( list ) == 0; @@ -908,7 +940,7 @@ Int IsPossString ( ** ** 'PosString' is the function in 'PosListFuncs' for strings. */ -Int PosString ( +Int PosString ( Obj list, Obj val, Int start ) @@ -945,7 +977,7 @@ Int PosString ( ** ** 'PlainString' is the function in 'PlainListFuncs' for strings. */ -void PlainString ( +void PlainString ( Obj list ) { Int lenList; /* logical length of the string */ @@ -975,39 +1007,29 @@ void PlainString ( /**************************************************************************** ** -*F IS_STRING() . . . . . . . . . . . . . test if an object is a string + +*F IS_STRING( ) . . . . . . . . . . . . test if an object is a string ** ** 'IS_STRING' returns 1 if the object is a string and 0 otherwise. ** It does not change the representation of . -** -** 'IS_STRING' is defined in the declaration part of this package as follows -** -#define IS_STRING(obj) ((*IsStringFuncs[ TNUM_OBJ( obj ) ])( obj )) */ -Int (*IsStringFuncs [LAST_REAL_TNUM+1]) ( Obj obj ); +Int (*IsStringFuncs [LAST_REAL_TNUM+1]) ( Obj obj ); -Obj IsStringFilt; - -Obj IsStringHandler ( - Obj self, - Obj obj ) -{ - return (IS_STRING( obj ) ? True : False); -} +Obj IsStringFilt; -Int IsStringNot ( +Int IsStringNot ( Obj obj ) { return 0; } -Int IsStringYes ( +Int IsStringYes ( Obj obj ) { return 1; } -Int IsStringList ( +Int IsStringList ( Obj list ) { Int lenList; @@ -1024,13 +1046,13 @@ Int IsStringList ( return (lenList < i); } -Int IsStringListHom ( +Int IsStringListHom ( Obj list ) { return (TNUM_OBJ( ELM_LIST(list,1) ) == T_CHAR); } -Int IsStringObject ( +Int IsStringObject ( Obj obj ) { return (DoFilter( IsStringFilt, obj ) != False); @@ -1039,13 +1061,11 @@ Int IsStringObject ( /**************************************************************************** ** -*F ConvString() . . . convert a string to the string representation +*F ConvString( ) . . convert a string to the string representation ** ** 'ConvString' converts the string to the string representation. */ -Obj ConvStringFunc; - -void ConvString ( +void ConvString ( Obj string ) { Int lenString; /* length of the string */ @@ -1067,42 +1087,23 @@ void ConvString ( CSTR_STRING(string)[i-1] = *((UChar*)ADDR_OBJ(elm)); } CSTR_STRING(string)[lenString] = '\0'; - RetypeBag( string, T_STRING + (IS_MUTABLE_OBJ(string)?0:IMMUTABLE) ); + RetypeBag( string, IS_MUTABLE_OBJ(string)?T_STRING:T_STRING+IMMUTABLE ); ResizeBag( string, lenString+1 ); } -Obj ConvStringHandler ( - Obj self, - Obj string ) -{ - /* check whether is a string */ - if ( ! IS_STRING( string ) ) { - string = ErrorReturnObj( - "ConvString: must be a string (not a %s)", - (Int)(InfoBags[TNUM_OBJ(string)].name), 0L, - "you can return a string for " ); - return ConvStringHandler( self, string ); - } - - /* convert to the string representation */ - ConvString( string ); - - /* return nothing */ - return 0; -} /**************************************************************************** ** -*F IsStringConv() . . . . . . test if an object is a string and convert +*F IsStringConv( ) . . . . . test if an object is a string and convert ** ** 'IsStringConv' returns 1 if the object is a string, and 0 ** otherwise. If is a string it changes its representation to the ** string representation. */ -Obj IsStringConvFilt; +Obj IsStringConvFilt; -Int IsStringConv ( +Int IsStringConv ( Obj obj ) { Int res; @@ -1111,11 +1112,7 @@ Int IsStringConv ( res = IS_STRING( obj ); /* if so, convert it to the string representation */ - /* NOTE that the empty list must not be converted into a string, */ - /* so the string literal "" is the only empty list of type 'T_STRING'. */ - /* This is used in 'Print' to distinguish between empty strings (which */ - /* print nothing) and empty lists (which print as '[ ]'). */ - if ( res && LEN_LIST( obj ) != 0 ) { + if ( res ) { ConvString( obj ); } @@ -1123,7 +1120,32 @@ Int IsStringConv ( return res; } -Obj IsStringConvHandler ( + +/**************************************************************************** +** + +*F * * * * * * * * * * * * * * GAP level functions * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + + +*F IsStringHandler( , ) . . . . . . . . test value is a string +*/ +Obj IsStringHandler ( + Obj self, + Obj obj ) +{ + return (IS_STRING( obj ) ? True : False); +} + + +/**************************************************************************** +** +*F FuncIS_STRING_CONV( , ) . . . . . . . . . . check and convert +*/ +Obj FuncIS_STRING_CONV ( Obj self, Obj obj ) { @@ -1134,72 +1156,289 @@ Obj IsStringConvHandler ( /**************************************************************************** ** +*F FuncCONV_STRING( , ) . . . . . . . . convert to string rep +*/ +Obj FuncCONV_STRING ( + Obj self, + Obj string ) +{ + /* check whether is a string */ + if ( ! IS_STRING( string ) ) { + string = ErrorReturnObj( + "ConvString: must be a string (not a %s)", + (Int)TNAM_OBJ(string), 0L, + "you can return a string for " ); + return FuncCONV_STRING( self, string ); + } -*F InitString() . . . . . . . . . . . . . . . . initializes string package -** -** 'InitString' initializes the string package. -** -** CharCookie is a space for the cookies passed into InitGlobalBags with the -** character constants. This must be static, and different for each -** character, as the cookies are only copied as pointers in InitGlobalBags. + /* convert to the string representation */ + ConvString( string ); + + /* return nothing */ + return 0; +} + + +/**************************************************************************** ** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * */ -static Char CharCookie[256][17]; -void InitString ( void ) +/**************************************************************************** +** + +*F SetupString() . . . . . . . . . . . . . . . . initializes string package +*/ +void SetupString ( void ) { - Int i,j; Int t1, t2; - Char * cookie_base = "string: char "; /* install the marking function */ - InfoBags[ T_CHAR ].name = "character"; + InfoBags[ T_CHAR ].name = "character"; InitMarkFuncBags( T_CHAR , MarkNoSubBags ); - /* make all the character constants once and for all */ - for ( i = 0; i < 256; i++ ) { - ObjsChar[i] = NewBag( T_CHAR, 1L ); - *(UChar*)ADDR_OBJ(ObjsChar[i]) = (UChar)i; - for (j = 0; j < 13; j++) - CharCookie[i][j] = cookie_base[j]; - CharCookie[i][13] = '0' + i/100; - CharCookie[i][14] = '0' + (i % 100)/10; - CharCookie[i][15] = '0' + i % 10; - CharCookie[i][16] = '\0'; - InitGlobalBag( &ObjsChar[i], &(CharCookie[i][0]) ); - } + /* Install the saving function */ + SaveObjFuncs[ T_CHAR ] = SaveChar; + LoadObjFuncs[ T_CHAR ] = LoadChar; - /* install the kind method */ - ImportGVarFromLibrary( "TYPE_CHAR", &TYPE_CHAR ); - TypeObjFuncs[ T_CHAR ] = TypeChar; /* install the character functions */ PrintObjFuncs[ T_CHAR ] = PrintChar; EqFuncs[ T_CHAR ][ T_CHAR ] = EqChar; LtFuncs[ T_CHAR ][ T_CHAR ] = LtChar; + /* install the marking functions */ for ( t1 = T_STRING; t1 <= T_STRING_SSORT; t1 += 2 ) { - InfoBags[ t1 ].name - = "list (string)"; InitMarkFuncBags( t1 , MarkOneSubBags ); - InfoBags[ t1 +IMMUTABLE ].name - = "list (string)"; InitMarkFuncBags( t1 +IMMUTABLE , MarkOneSubBags ); - InfoBags[ t1 +COPYING ].name - = "list (string), copied"; InitMarkFuncBags( t1 +COPYING , MarkOneSubBags ); - InfoBags[ t1 +COPYING +IMMUTABLE ].name - = "list (string), copied"; InitMarkFuncBags( t1 +COPYING +IMMUTABLE , MarkOneSubBags ); } - /* install the kind method */ + + /* install the names */ + InfoBags[T_STRING ].name = "list (string)"; + InfoBags[T_STRING +IMMUTABLE].name = "list (string,imm)"; + InfoBags[T_STRING +COPYING ].name = "list (string,copied)"; + InfoBags[T_STRING +COPYING+IMMUTABLE].name = "list (string,imm,copied)"; + + InfoBags[T_STRING_SSORT ].name = "list (string,ssort)"; + InfoBags[T_STRING_SSORT +IMMUTABLE].name = "list (string,ssort,imm)"; + InfoBags[T_STRING_SSORT+COPYING ].name = "list (string,ssort,copied)"; + InfoBags[T_STRING_SSORT+COPYING+IMMUTABLE].name = "list (string,ssort,imm,copied)"; + + InfoBags[T_STRING_NSORT ].name = "list (string,nsort)"; + InfoBags[T_STRING_NSORT +IMMUTABLE].name = "list (string,nsort,imm)"; + InfoBags[T_STRING_NSORT+COPYING ].name = "list (string,nsort,copied)"; + InfoBags[T_STRING_NSORT+COPYING+IMMUTABLE].name = "list (string,nsort,imm,copied)"; + + + /* install the filter and property maps */ + ClearFiltsTNums [T_STRING ] = T_STRING; + ClearFiltsTNums [T_STRING +IMMUTABLE] = T_STRING+IMMUTABLE; + ClearFiltsTNums [T_STRING_NSORT ] = T_STRING; + ClearFiltsTNums [T_STRING_NSORT+IMMUTABLE] = T_STRING+IMMUTABLE; + ClearFiltsTNums [T_STRING_SSORT ] = T_STRING; + ClearFiltsTNums [T_STRING_SSORT+IMMUTABLE] = T_STRING+IMMUTABLE; + + /* mutable string */ + HasFiltListTNums [T_STRING ][FN_IS_MUTABLE] = 1; + HasFiltListTNums [T_STRING ][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_STRING ][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_STRING ][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_STRING ][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_STRING ][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_STRING ][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_STRING ][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_STRING ][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_STRING ][FN_IS_MUTABLE] = T_STRING; + SetFiltListTNums [T_STRING ][FN_IS_EMPTY ] = T_STRING_SSORT; + SetFiltListTNums [T_STRING ][FN_IS_DENSE ] = T_STRING; + SetFiltListTNums [T_STRING ][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_STRING ][FN_IS_HOMOG ] = T_STRING; + SetFiltListTNums [T_STRING ][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_STRING ][FN_IS_TABLE ] = -1; + SetFiltListTNums [T_STRING ][FN_IS_SSORT ] = T_STRING_SSORT; + SetFiltListTNums [T_STRING ][FN_IS_NSORT ] = T_STRING_NSORT; + + ResetFiltListTNums[T_STRING ][FN_IS_MUTABLE] = T_STRING +IMMUTABLE; + ResetFiltListTNums[T_STRING ][FN_IS_EMPTY ] = T_STRING; + ResetFiltListTNums[T_STRING ][FN_IS_DENSE ] = -1; + ResetFiltListTNums[T_STRING ][FN_IS_NDENSE ] = T_STRING; + ResetFiltListTNums[T_STRING ][FN_IS_HOMOG ] = -1; + ResetFiltListTNums[T_STRING ][FN_IS_NHOMOG ] = T_STRING; + ResetFiltListTNums[T_STRING ][FN_IS_TABLE ] = T_STRING; + ResetFiltListTNums[T_STRING ][FN_IS_SSORT ] = T_STRING; + ResetFiltListTNums[T_STRING ][FN_IS_NSORT ] = T_STRING; + + /* immutable string */ + HasFiltListTNums [T_STRING +IMMUTABLE][FN_IS_MUTABLE] = 0; + HasFiltListTNums [T_STRING +IMMUTABLE][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_STRING +IMMUTABLE][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_STRING +IMMUTABLE][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_STRING +IMMUTABLE][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_STRING +IMMUTABLE][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_STRING +IMMUTABLE][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_STRING +IMMUTABLE][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_STRING +IMMUTABLE][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_STRING +IMMUTABLE][FN_IS_MUTABLE] = T_STRING; + SetFiltListTNums [T_STRING +IMMUTABLE][FN_IS_EMPTY ] = T_STRING_SSORT+IMMUTABLE; + SetFiltListTNums [T_STRING +IMMUTABLE][FN_IS_DENSE ] = T_STRING +IMMUTABLE; + SetFiltListTNums [T_STRING +IMMUTABLE][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_STRING +IMMUTABLE][FN_IS_HOMOG ] = T_STRING +IMMUTABLE; + SetFiltListTNums [T_STRING +IMMUTABLE][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_STRING +IMMUTABLE][FN_IS_TABLE ] = -1; + SetFiltListTNums [T_STRING +IMMUTABLE][FN_IS_SSORT ] = T_STRING_SSORT+IMMUTABLE; + SetFiltListTNums [T_STRING +IMMUTABLE][FN_IS_NSORT ] = T_STRING_NSORT+IMMUTABLE; + + ResetFiltListTNums[T_STRING +IMMUTABLE][FN_IS_MUTABLE] = T_STRING +IMMUTABLE; + ResetFiltListTNums[T_STRING +IMMUTABLE][FN_IS_EMPTY ] = T_STRING +IMMUTABLE; + ResetFiltListTNums[T_STRING +IMMUTABLE][FN_IS_DENSE ] = -1; + ResetFiltListTNums[T_STRING +IMMUTABLE][FN_IS_NDENSE ] = T_STRING +IMMUTABLE; + ResetFiltListTNums[T_STRING +IMMUTABLE][FN_IS_HOMOG ] = -1; + ResetFiltListTNums[T_STRING +IMMUTABLE][FN_IS_NHOMOG ] = T_STRING +IMMUTABLE; + ResetFiltListTNums[T_STRING +IMMUTABLE][FN_IS_TABLE ] = T_STRING +IMMUTABLE; + ResetFiltListTNums[T_STRING +IMMUTABLE][FN_IS_SSORT ] = T_STRING +IMMUTABLE; + ResetFiltListTNums[T_STRING +IMMUTABLE][FN_IS_NSORT ] = T_STRING +IMMUTABLE; + + /* ssort mutable string */ + HasFiltListTNums [T_STRING_SSORT ][FN_IS_MUTABLE] = 1; + HasFiltListTNums [T_STRING_SSORT ][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_STRING_SSORT ][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_STRING_SSORT ][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_STRING_SSORT ][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_STRING_SSORT ][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_STRING_SSORT ][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_STRING_SSORT ][FN_IS_SSORT ] = 1; + HasFiltListTNums [T_STRING_SSORT ][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_STRING_SSORT ][FN_IS_MUTABLE] = T_STRING_SSORT; + SetFiltListTNums [T_STRING_SSORT ][FN_IS_EMPTY ] = T_STRING_SSORT; + SetFiltListTNums [T_STRING_SSORT ][FN_IS_DENSE ] = T_STRING_SSORT; + SetFiltListTNums [T_STRING_SSORT ][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_STRING_SSORT ][FN_IS_HOMOG ] = T_STRING_SSORT; + SetFiltListTNums [T_STRING_SSORT ][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_STRING_SSORT ][FN_IS_TABLE ] = -1; + SetFiltListTNums [T_STRING_SSORT ][FN_IS_SSORT ] = T_STRING_SSORT; + SetFiltListTNums [T_STRING_SSORT ][FN_IS_NSORT ] = -1; + + ResetFiltListTNums[T_STRING_SSORT ][FN_IS_MUTABLE] = T_STRING_SSORT+IMMUTABLE; + ResetFiltListTNums[T_STRING_SSORT ][FN_IS_EMPTY ] = T_STRING_SSORT; + ResetFiltListTNums[T_STRING_SSORT ][FN_IS_DENSE ] = -1; + ResetFiltListTNums[T_STRING_SSORT ][FN_IS_NDENSE ] = T_STRING_SSORT; + ResetFiltListTNums[T_STRING_SSORT ][FN_IS_HOMOG ] = -1; + ResetFiltListTNums[T_STRING_SSORT ][FN_IS_NHOMOG ] = T_STRING_SSORT; + ResetFiltListTNums[T_STRING_SSORT ][FN_IS_TABLE ] = T_STRING_SSORT; + ResetFiltListTNums[T_STRING_SSORT ][FN_IS_SSORT ] = T_STRING; + ResetFiltListTNums[T_STRING_SSORT ][FN_IS_NSORT ] = T_STRING_SSORT; + + /* ssort immutable string */ + HasFiltListTNums [T_STRING_SSORT+IMMUTABLE][FN_IS_MUTABLE] = 0; + HasFiltListTNums [T_STRING_SSORT+IMMUTABLE][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_STRING_SSORT+IMMUTABLE][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_STRING_SSORT+IMMUTABLE][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_STRING_SSORT+IMMUTABLE][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_STRING_SSORT+IMMUTABLE][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_STRING_SSORT+IMMUTABLE][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_STRING_SSORT+IMMUTABLE][FN_IS_SSORT ] = 1; + HasFiltListTNums [T_STRING_SSORT+IMMUTABLE][FN_IS_NSORT ] = 0; + + SetFiltListTNums [T_STRING_SSORT+IMMUTABLE][FN_IS_MUTABLE] = T_STRING_SSORT; + SetFiltListTNums [T_STRING_SSORT+IMMUTABLE][FN_IS_EMPTY ] = T_STRING_SSORT+IMMUTABLE; + SetFiltListTNums [T_STRING_SSORT+IMMUTABLE][FN_IS_DENSE ] = T_STRING_SSORT+IMMUTABLE; + SetFiltListTNums [T_STRING_SSORT+IMMUTABLE][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_STRING_SSORT+IMMUTABLE][FN_IS_HOMOG ] = T_STRING_SSORT+IMMUTABLE; + SetFiltListTNums [T_STRING_SSORT+IMMUTABLE][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_STRING_SSORT+IMMUTABLE][FN_IS_TABLE ] = -1; + SetFiltListTNums [T_STRING_SSORT+IMMUTABLE][FN_IS_SSORT ] = T_STRING_SSORT+IMMUTABLE; + SetFiltListTNums [T_STRING_SSORT+IMMUTABLE][FN_IS_NSORT ] = -1; + + ResetFiltListTNums[T_STRING_SSORT+IMMUTABLE][FN_IS_MUTABLE] = T_STRING_SSORT+IMMUTABLE; + ResetFiltListTNums[T_STRING_SSORT+IMMUTABLE][FN_IS_EMPTY ] = T_STRING_SSORT+IMMUTABLE; + ResetFiltListTNums[T_STRING_SSORT+IMMUTABLE][FN_IS_DENSE ] = -1; + ResetFiltListTNums[T_STRING_SSORT+IMMUTABLE][FN_IS_NDENSE ] = T_STRING_SSORT+IMMUTABLE; + ResetFiltListTNums[T_STRING_SSORT+IMMUTABLE][FN_IS_HOMOG ] = -1; + ResetFiltListTNums[T_STRING_SSORT+IMMUTABLE][FN_IS_NHOMOG ] = T_STRING_SSORT+IMMUTABLE; + ResetFiltListTNums[T_STRING_SSORT+IMMUTABLE][FN_IS_TABLE ] = T_STRING_SSORT+IMMUTABLE; + ResetFiltListTNums[T_STRING_SSORT+IMMUTABLE][FN_IS_SSORT ] = T_STRING +IMMUTABLE; + ResetFiltListTNums[T_STRING_SSORT+IMMUTABLE][FN_IS_NSORT ] = T_STRING_SSORT+IMMUTABLE; + + /* nsort mutable string */ + HasFiltListTNums [T_STRING_NSORT ][FN_IS_MUTABLE] = 1; + HasFiltListTNums [T_STRING_NSORT ][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_STRING_NSORT ][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_STRING_NSORT ][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_STRING_NSORT ][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_STRING_NSORT ][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_STRING_NSORT ][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_STRING_NSORT ][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_STRING_NSORT ][FN_IS_NSORT ] = 1; + + SetFiltListTNums [T_STRING_NSORT ][FN_IS_MUTABLE] = T_STRING_NSORT; + SetFiltListTNums [T_STRING_NSORT ][FN_IS_EMPTY ] = -1; + SetFiltListTNums [T_STRING_NSORT ][FN_IS_DENSE ] = T_STRING_NSORT; + SetFiltListTNums [T_STRING_NSORT ][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_STRING_NSORT ][FN_IS_HOMOG ] = T_STRING_NSORT; + SetFiltListTNums [T_STRING_NSORT ][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_STRING_NSORT ][FN_IS_TABLE ] = -1; + SetFiltListTNums [T_STRING_NSORT ][FN_IS_SSORT ] = -1; + SetFiltListTNums [T_STRING_NSORT ][FN_IS_NSORT ] = T_STRING_NSORT; + + ResetFiltListTNums[T_STRING_NSORT ][FN_IS_MUTABLE] = T_STRING_NSORT+IMMUTABLE; + ResetFiltListTNums[T_STRING_NSORT ][FN_IS_EMPTY ] = T_STRING_NSORT; + ResetFiltListTNums[T_STRING_NSORT ][FN_IS_DENSE ] = -1; + ResetFiltListTNums[T_STRING_NSORT ][FN_IS_NDENSE ] = T_STRING_NSORT; + ResetFiltListTNums[T_STRING_NSORT ][FN_IS_HOMOG ] = -1; + ResetFiltListTNums[T_STRING_NSORT ][FN_IS_NHOMOG ] = T_STRING_NSORT; + ResetFiltListTNums[T_STRING_NSORT ][FN_IS_TABLE ] = T_STRING_NSORT; + ResetFiltListTNums[T_STRING_NSORT ][FN_IS_SSORT ] = T_STRING_NSORT; + ResetFiltListTNums[T_STRING_NSORT ][FN_IS_NSORT ] = T_STRING; + + /* nsort immutable string */ + HasFiltListTNums [T_STRING_NSORT+IMMUTABLE][FN_IS_MUTABLE] = 0; + HasFiltListTNums [T_STRING_NSORT+IMMUTABLE][FN_IS_EMPTY ] = 0; + HasFiltListTNums [T_STRING_NSORT+IMMUTABLE][FN_IS_DENSE ] = 1; + HasFiltListTNums [T_STRING_NSORT+IMMUTABLE][FN_IS_NDENSE ] = 0; + HasFiltListTNums [T_STRING_NSORT+IMMUTABLE][FN_IS_HOMOG ] = 1; + HasFiltListTNums [T_STRING_NSORT+IMMUTABLE][FN_IS_NHOMOG ] = 0; + HasFiltListTNums [T_STRING_NSORT+IMMUTABLE][FN_IS_TABLE ] = 0; + HasFiltListTNums [T_STRING_NSORT+IMMUTABLE][FN_IS_SSORT ] = 0; + HasFiltListTNums [T_STRING_NSORT+IMMUTABLE][FN_IS_NSORT ] = 1; + + SetFiltListTNums [T_STRING_NSORT+IMMUTABLE][FN_IS_MUTABLE] = T_STRING_NSORT; + SetFiltListTNums [T_STRING_NSORT+IMMUTABLE][FN_IS_EMPTY ] = -1; + SetFiltListTNums [T_STRING_NSORT+IMMUTABLE][FN_IS_DENSE ] = T_STRING_NSORT+IMMUTABLE; + SetFiltListTNums [T_STRING_NSORT+IMMUTABLE][FN_IS_NDENSE ] = -1; + SetFiltListTNums [T_STRING_NSORT+IMMUTABLE][FN_IS_HOMOG ] = T_STRING_NSORT+IMMUTABLE; + SetFiltListTNums [T_STRING_NSORT+IMMUTABLE][FN_IS_NHOMOG ] = -1; + SetFiltListTNums [T_STRING_NSORT+IMMUTABLE][FN_IS_TABLE ] = -1; + SetFiltListTNums [T_STRING_NSORT+IMMUTABLE][FN_IS_SSORT ] = -1; + SetFiltListTNums [T_STRING_NSORT+IMMUTABLE][FN_IS_NSORT ] = T_STRING_NSORT+IMMUTABLE; + + ResetFiltListTNums[T_STRING_NSORT+IMMUTABLE][FN_IS_MUTABLE] = T_STRING_NSORT+IMMUTABLE; + ResetFiltListTNums[T_STRING_NSORT+IMMUTABLE][FN_IS_EMPTY ] = T_STRING_NSORT+IMMUTABLE; + ResetFiltListTNums[T_STRING_NSORT+IMMUTABLE][FN_IS_DENSE ] = -1; + ResetFiltListTNums[T_STRING_NSORT+IMMUTABLE][FN_IS_NDENSE ] = T_STRING_NSORT+IMMUTABLE; + ResetFiltListTNums[T_STRING_NSORT+IMMUTABLE][FN_IS_HOMOG ] = -1; + ResetFiltListTNums[T_STRING_NSORT+IMMUTABLE][FN_IS_NHOMOG ] = T_STRING_NSORT+IMMUTABLE; + ResetFiltListTNums[T_STRING_NSORT+IMMUTABLE][FN_IS_TABLE ] = T_STRING_NSORT+IMMUTABLE; + ResetFiltListTNums[T_STRING_NSORT+IMMUTABLE][FN_IS_SSORT ] = T_STRING_NSORT+IMMUTABLE; + ResetFiltListTNums[T_STRING_NSORT+IMMUTABLE][FN_IS_NSORT ] = T_STRING +IMMUTABLE; + + + /* install the saving method */ for ( t1 = T_STRING; t1 <= T_STRING_SSORT; t1 += 2 ) { - TypeObjFuncs[ t1 ] = TypeString; - TypeObjFuncs[ t1 +IMMUTABLE ] = TypeString; + SaveObjFuncs[ t1 ] = SaveString; + SaveObjFuncs[ t1 +IMMUTABLE ] = SaveString; + LoadObjFuncs[ t1 ] = LoadString; + LoadObjFuncs[ t1 +IMMUTABLE ] = LoadString; } + /* install the copy method */ for ( t1 = T_STRING; t1 <= T_STRING_SSORT; t1++ ) { CopyObjFuncs [ t1 ] = CopyString; @@ -1268,49 +1507,108 @@ void InitString ( void ) IsSSortListFuncs[ T_STRING_SSORT ] = IsSSortStringYes; IsSSortListFuncs[ T_STRING_SSORT +IMMUTABLE ] = IsSSortStringYes; - /* install the internal function */ + + /* install the `IsString' functions */ for ( t1 = FIRST_REAL_TNUM; t1 <= LAST_REAL_TNUM; t1++ ) { IsStringFuncs[ t1 ] = IsStringNot; } + for ( t1 = FIRST_LIST_TNUM; t1 <= LAST_LIST_TNUM; t1++ ) { IsStringFuncs[ t1 ] = IsStringList; } + for ( t1 = T_STRING; t1 <= T_STRING_SSORT; t1++ ) { IsStringFuncs[ t1 ] = IsStringYes; } + for ( t1 = FIRST_EXTERNAL_TNUM; t1 <= LAST_EXTERNAL_TNUM; t1++ ) { IsStringFuncs[ t1 ] = IsStringObject; } - InitHandlerFunc( IsStringHandler, "IS_STRING" ); - IsStringFilt = NewFilterC( - "IS_STRING", 1L, "obj", IsStringHandler ); - AssGVar( GVarName( "IS_STRING" ), IsStringFilt ); - - InitHandlerFunc( ConvStringHandler, "CONV_STRING" ); - ConvStringFunc = NewFunctionC( - "CONV_STRING", 1L, "string", ConvStringHandler ); - AssGVar( GVarName( "CONV_STRING" ), ConvStringFunc ); - - IsStringConvFilt = NewBag( TNUM_OBJ(IsStringFilt), - SIZE_OBJ(IsStringFilt) ); - for ( i = 0; i < SIZE_OBJ(IsStringFilt)/sizeof(Obj); i++ ) { - ADDR_OBJ(IsStringConvFilt)[i] = ADDR_OBJ(IsStringFilt)[i]; +} + + +/**************************************************************************** +** +*F InitString() . . . . . . . . . . . . . . . . initializes string package +** +** is a space for the cookies passed into `InitGlobalBags' with +** the character constants. This must be static, and different for each +** character, as the cookies are only copied as pointers in +** `InitGlobalBags'. +** +*/ +static Char CharCookie[256][21]; + +void InitString ( void ) +{ + Int i, j; + Int t1; + Char * cookie_base = "src/string.c:Char"; + + + /* make all the character constants once and for all */ + for ( i = 0; i < 256; i++ ) { + for (j = 0; j < 17; j++) + CharCookie[i][j] = cookie_base[j]; + CharCookie[i][j++] = '0' + i/100; + CharCookie[i][j++] = '0' + (i % 100)/10; + CharCookie[i][j++] = '0' + i % 10; + CharCookie[i][j++] = '\0'; + InitGlobalBag( &ObjsChar[i], &(CharCookie[i][0]) ); + if ( ! SyRestoring ) { + ObjsChar[i] = NewBag( T_CHAR, 1L ); + *(UChar*)ADDR_OBJ(ObjsChar[i]) = (UChar)i; + } } - InitHandlerFunc( IsStringConvHandler, "IS_STRING_CONV" ); - HDLR_FUNC(IsStringConvFilt,1) = IsStringConvHandler; - AssGVar( GVarName( "IS_STRING_CONV" ), IsStringConvFilt ); - - InitHandlerFunc( FuncCHAR_INT, "CHAR_INT" ); - AssGVar( GVarName( "CHAR_INT" ), - NewFunctionC( "CHAR_INT", 1L, "integer", - FuncCHAR_INT ) ); - - InitHandlerFunc( FuncINT_CHAR, "INT_CHAR" ); - AssGVar( GVarName( "INT_CHAR" ), - NewFunctionC( "INT_CHAR", 1L, "character", - FuncINT_CHAR ) ); + + + /* install the kind method */ + ImportGVarFromLibrary( "TYPE_CHAR", &TYPE_CHAR ); + TypeObjFuncs[ T_CHAR ] = TypeChar; + + + /* install the kind method */ + for ( t1 = T_STRING; t1 <= T_STRING_SSORT; t1 += 2 ) { + TypeObjFuncs[ t1 ] = TypeString; + TypeObjFuncs[ t1 +IMMUTABLE ] = TypeString; + } + + + /* install the internal function */ + C_NEW_GVAR_FILT( "IS_STRING", "obj", IsStringFilt, IsStringHandler, + "src/string.c:IS_STRING" ); + + C_NEW_GVAR_FUNC( "IS_STRING_CONV", 1L, "string", + FuncIS_STRING_CONV, + "src/string.c:IS_STRING_CONV" ); + + C_NEW_GVAR_FUNC( "CONV_STRING", 1L, "string", + FuncCONV_STRING, + "src/string.c:CONV_STRING" ); + + C_NEW_GVAR_FUNC( "CHAR_INT", 1L, "integer", + FuncCHAR_INT, + "src/string.c:CHAR_INT" ); + + C_NEW_GVAR_FUNC( "INT_CHAR", 1L, "char", + FuncINT_CHAR, + "src/string.c:INT_CHAR" ); } +/**************************************************************************** +** +*F CheckString() . . . . . . check the initialisation of the string package +*/ +void CheckString ( void ) +{ + SET_REVISION( "string_c", Revision_string_c ); + SET_REVISION( "string_h", Revision_string_h ); +} + +/**************************************************************************** +** +*E string.c . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/string.h b/src/string.h index 01c746e7f4..3ab0e2b3a8 100644 --- a/src/string.h +++ b/src/string.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A string.h GAP source Martin Schoenert +*W string.h GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -20,24 +20,40 @@ ** installed in the appropriate tables by 'InitString'. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_string_h = +SYS_CONST char * Revision_string_h = "@(#)$Id$"; #endif /**************************************************************************** ** + +*F * * * * * * * * * * * * * * character functions * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + + *V ObjsChar[] . . . . . . . . . . . . . . . . table of character values ** ** 'ObjsChar' contains all the character values. That way we do not need to ** allocate new bags for new characters. */ -extern Obj ObjsChar [256]; +extern Obj ObjsChar [256]; /**************************************************************************** ** -*F NEW_STRING() . . . . . . . . . . . . . . . . . . . make a new string + +*F * * * * * * * * * * * * * * * string functions * * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + + +*F NEW_STRING( ) . . . . . . . . . . . . . . . . . . make a new string ** ** 'NEW_STRING' makes a new string with room for characters. ** @@ -49,7 +65,7 @@ extern Obj ObjsChar [256]; /**************************************************************************** ** -*F CSTR_STRING() . . . . . . . . . . . . . . . . C string of a string +*F CSTR_STRING( ) . . . . . . . . . . . . . . . C string of a string ** ** 'CSTR_STRING' returns the (address of the) C character string of the ** string . @@ -62,7 +78,7 @@ extern Obj ObjsChar [256]; /**************************************************************************** ** -*F GET_LEN_STRING() . . . . . . . . . . . . . . . length of a string +*F GET_LEN_STRING( ) . . . . . . . . . . . . . . length of a string ** ** 'GET_LEN_STRING' returns the length of the string , as a C integer. ** @@ -74,7 +90,7 @@ extern Obj ObjsChar [256]; /**************************************************************************** ** -*F GET_ELM_STRING(,) . . . . . . . select an element of a string +*F GET_ELM_STRING( , ) . . . . . . select an element of a string ** ** 'GET_ELM_STRING' returns the -th element of the string . ** must be a positive integer less than or equal to the length of @@ -86,10 +102,9 @@ extern Obj ObjsChar [256]; #define GET_ELM_STRING(list,pos) (ObjsChar[ \ (UChar)(CSTR_STRING(list)[(pos)-1])]) - /**************************************************************************** ** -*F PrintString() . . . . . . . . . . . . . . . . . . . print a string +*F PrintString( ) . . . . . . . . . . . . . . . . . . print a string ** ** 'PrintString' prints the string with the handle . ** @@ -102,18 +117,19 @@ extern void PrintString ( /**************************************************************************** ** -*F PrintString1() . . . . . . . . . . . . print a string for 'Print' +*F PrintString1( ) . . . . . . . . . . . print a string for 'Print' ** ** 'PrintString1' prints the string constant in the format used by the ** 'Print' and 'PrintTo' function. */ -extern void PrintString1 ( +extern void PrintString1 ( Obj list ); /**************************************************************************** ** -*F IS_STRING() . . . . . . . . . . . . . test if an object is a string + +*F IS_STRING( ) . . . . . . . . . . . . test if an object is a string ** ** 'IS_STRING' returns 1 if the object is a string and 0 otherwise. ** It does not change the representation of . @@ -128,39 +144,48 @@ extern Int (*IsStringFuncs [LAST_REAL_TNUM+1]) ( Obj obj ); /**************************************************************************** ** -*F IsString() . . . . . . . . . . . . . . test if an object is a string +*F IS_STRING_REP( ) . . . . . . . . check if is in string rep +*/ +#define IS_STRING_REP(list) \ + (T_STRING <= TNUM_OBJ(list) && TNUM_OBJ(list) <= T_STRING_SSORT+IMMUTABLE) + + +/**************************************************************************** +** +*F IsString( ) . . . . . . . . . . . . . test if an object is a string ** ** 'IsString' returns 1 if the object is a string and 0 otherwise. It ** does not change the representation of . */ -extern Int IsString ( +extern Int IsString ( Obj obj ); /**************************************************************************** ** -*F ConvString() . . . convert a string to the string representation +*F ConvString( ) . . convert a string to the string representation ** ** 'ConvString' converts the string to the string representation. */ -extern void ConvString ( +extern void ConvString ( Obj string ); /**************************************************************************** ** -*F IsStringConv() . . . . . . test if an object is a string and convert +*F IsStringConv( ) . . . . . test if an object is a string and convert ** ** 'IsStringConv' returns 1 if the object is a string, and 0 ** otherwise. If is a string it changes its representation to the ** string representation. */ -extern Int IsStringConv ( +extern Int IsStringConv ( Obj obj ); /**************************************************************************** ** + *F C_NEW_STRING( , , ) . . . . . . create GAP string */ #define C_NEW_STRING(string,len,cstr) \ @@ -170,13 +195,42 @@ extern Int IsStringConv ( } while ( 0 ); +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + +*F SetupString() . . . . . . . . . . . . . . . . initializes string package +*/ +extern void SetupString ( void ); + + /**************************************************************************** ** *F InitString() . . . . . . . . . . . . . . . . initializes string package ** -** 'InitString' initializes the string package. +** is a space for the cookies passed into `InitGlobalBags' with +** the character constants. This must be static, and different for each +** character, as the cookies are only copied as pointers in +** `InitGlobalBags'. +** +*/ +extern void InitString ( void ); + + +/**************************************************************************** +** +*F CheckString() . . . . . . check the initialisation of the string package */ -extern void InitString ( void ); +extern void CheckString ( void ); +/**************************************************************************** +** +*E string.h . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/sysfiles.c b/src/sysfiles.c index d96c9fec5e..caf961f936 100644 --- a/src/sysfiles.c +++ b/src/sysfiles.c @@ -13,7 +13,7 @@ ** various labels determine which operating system is actually used, they ** are described in "system.c". */ -#include "system.h" /* system dependent stuff */ +#include "system.h" /* system dependent part */ SYS_CONST char * Revision_sysfiles_c = "@(#)$Id$"; @@ -26,13 +26,15 @@ SYS_CONST char * Revision_sysfiles_c = #include "objects.h" /* objects */ #include "scanner.h" /* scanner */ +#include "gap.h" /* error handling, initialisation */ + #include "gvars.h" /* global variables */ -#include "lists.h" /* generic list package */ -#include "listfunc.h" /* generic list functions */ +#include "lists.h" /* generic lists */ +#include "listfunc.h" /* functions for generic lists */ #include "plist.h" /* plain lists */ -#include "string.h" /* strings and characters */ +#include "string.h" /* strings */ #include "records.h" /* generic records */ @@ -84,15 +86,17 @@ extern int write ( int, char *, int ); #endif +/* HP-UX already defines SYS_FORK */ + #ifdef SYS_HAS_NO_VFORK -# define SYS_FORK_NAME fork +# define SYS_MY_FORK fork #else -# define SYS_FORK_NAME vfork +# define SYS_MY_FORK vfork #endif #ifndef SYS_HAS_EXEC_PROTO -extern int SYS_FORK_NAME ( void ); +extern int SYS_MY_FORK ( void ); #ifndef SYS_HAS_BROKEN_EXEC_PROTO extern int execve (SYS_CONST char*,char * SYS_CONST [],char * SYS_CONST []); #else @@ -134,11 +138,11 @@ extern int kill ( int, int ); */ #if SYS_BSD || SYS_MACH || SYS_USG -#include "compstat.h" +#include "compstat.h" /* statically linked modules */ Int SyFindOrLinkGapRootFile ( Char * filename, - UInt4 crc_gap, + Int4 crc_gap, Char * result, Int len ) { @@ -150,15 +154,15 @@ Int SyFindOrLinkGapRootFile ( Char * tmp; Char module [256]; Char name [256]; - StructCompInitInfo* info_dyn; - StructCompInitInfo* info_sta; + StructCompInitInfo* info_dyn = 0; + StructCompInitInfo* info_sta = 0; Int k; #if defined(SYS_HAS_DL_LIBRARY) || defined(SYS_HAS_RLD_LIBRARY) Char * p; Char * dot; Int pos; - Int pot; + Int pot = 0; CompInitFunc init; #endif @@ -167,8 +171,8 @@ Int SyFindOrLinkGapRootFile ( tmp = SyFindGapRootFile(filename); if ( tmp ) { SyStrncat( result, tmp, len ); - name[0] = '\0'; - SyStrncat( name, tmp, 255 ); + name[0] = '\0'; + SyStrncat( name, tmp, 255 ); } if ( result[0] ) { if ( SyIsReadableFile(result) == 0 ) { @@ -252,7 +256,7 @@ Int SyFindOrLinkGapRootFile ( /* check if we have to compute the crc */ if ( crc_gap == 0 && found_gap && ( found_dyn || found_sta ) ) { - crc_gap = SyGAPCRC(name); + crc_gap = SyGAPCRC(name); } /* now decide what to do */ @@ -292,7 +296,9 @@ Int SyFindOrLinkGapRootFile ( *F SyGAPCRC( ) . . . . . . . . . . . . . . . . . . crc of a GAP file ** ** This function should be clever and handle white spaces and comments but -** one has to certain that such characters are not ignored in strings. +** one has to make certain that such characters are not ignored in strings. +** +** This function *never* returns a 0 unless an error occurred. */ static UInt4 syCcitt32[ 256 ] = { @@ -341,7 +347,7 @@ static UInt4 syCcitt32[ 256 ] = 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL, 0x2d02ef8dL }; -UInt4 SyGAPCRC( Char * name ) +Int4 SyGAPCRC( Char * name ) { UInt4 crc; UInt4 old; @@ -358,6 +364,7 @@ UInt4 SyGAPCRC( Char * name ) /* read in the file byte by byte and compute the CRC */ crc = 0x12345678L; + seen_nl = 0; while ( ( ch = fgetc(syBuf[fid].fp) ) != EOF ) { if ( ch == '\377' || ch == '\n' || ch == '\r' ) ch = '\n'; @@ -373,10 +380,13 @@ UInt4 SyGAPCRC( Char * name ) new = syCcitt32[ ( (UInt4)( crc ^ ch ) ) & 0xff ]; crc = old ^ new; } + if ( crc == 0 ) { + crc = 1; + } /* and close it again */ SyFclose( fid ); - return crc; + return ((Int4) crc) >> 4; } @@ -3594,20 +3604,20 @@ extern char * sys_errlist[]; void SySetErrorNo ( void ) { - SYS_CONST Char * err; + SYS_CONST Char * err; if ( errno != 0 ) { - SyLastErrorNo = errno; + SyLastErrorNo = errno; #ifdef SYS_HAS_NO_STRERROR - err = sys_errlist[errno]; + err = sys_errlist[errno]; #else - err = strerror(errno); + err = strerror(errno); #endif - SyLastErrorMessage[0] = '\0'; - SyStrncat( SyLastErrorMessage, err, 1023 ); + SyLastErrorMessage[0] = '\0'; + SyStrncat( SyLastErrorMessage, err, 1023 ); } else { - SyClearErrorNo(); + SyClearErrorNo(); } } @@ -3710,8 +3720,10 @@ UInt SyExecuteProcess ( Int out, Char * args[] ) { - SYS_PID_T pid; - int status; /* do not use `Int' */ + SYS_PID_T pid; /* process id */ + int status; /* do not use `Int' */ + Int tin; /* temp in */ + Int tout; /* temp out */ SYS_SIG_T (*func)(int); #ifdef SYS_HAS_WAIT4 @@ -3720,7 +3732,7 @@ UInt SyExecuteProcess ( /* clone the process */ - pid = SYS_FORK_NAME(); + pid = SYS_MY_FORK(); if ( pid == -1 ) { return -1; } @@ -3728,34 +3740,34 @@ UInt SyExecuteProcess ( /* we are the parent */ if ( pid != 0 ) { - /* ignore a CTRL-C */ - func = signal( SIGINT, SIG_IGN ); + /* ignore a CTRL-C */ + func = signal( SIGINT, SIG_IGN ); - /* wait for some action */ + /* wait for some action */ #ifdef SYS_HAS_WAIT4 if ( wait4( pid, &status, 0, &usage ) == -1 ) { - signal( SIGINT, func ); + signal( SIGINT, func ); + return -1; + } + if ( WIFSIGNALED(status) ) { + signal( SIGINT, func ); return -1; } - if ( WIFSIGNALED(status) ) { - signal( SIGINT, func ); - return -1; - } - signal( SIGINT, func ); + signal( SIGINT, func ); return WEXITSTATUS(status); #else if ( waitpid( pid, &status, 0 ) == -1 ) { - signal( SIGINT, func ); + signal( SIGINT, func ); return -1; } - if ( WIFSIGNALED(status) ) { - signal( SIGINT, func ); - return -1; - } - signal( SIGINT, func ); + if ( WIFSIGNALED(status) ) { + signal( SIGINT, func ); + return -1; + } + signal( SIGINT, func ); return WEXITSTATUS(status); #endif @@ -3771,36 +3783,36 @@ UInt SyExecuteProcess ( /* if is -1 open "/dev/null" */ if ( in == -1 ) { - in = open( "/dev/null", O_RDONLY ); - if ( in == -1 ) { + tin = open( "/dev/null", O_RDONLY ); + if ( tin == -1 ) { _exit(-1); } } - else { - in = SyFileno(in); - } + else { + tin = SyFileno(in); + } /* if is -1 open "/dev/null" */ if ( out == -1 ) { - out = open( "/dev/null", O_WRONLY ); - if ( out == -1 ) { + tout = open( "/dev/null", O_WRONLY ); + if ( tout == -1 ) { _exit(-1); } } - else { - out = SyFileno(out); - } + else { + tout = SyFileno(out); + } /* set standard input to , standard output to */ - if ( in != 0 ) { - if ( dup2( in, 0 ) == -1 ) { + if ( tin != 0 ) { + if ( dup2( tin, 0 ) == -1 ) { _exit(-1); } } fcntl( 0, F_SETFD, 0 ); - if ( out != 1 ) { - if ( dup2( out, 1 ) == -1 ) { + if ( tout != 1 ) { + if ( dup2( tout, 1 ) == -1 ) { _exit(-1); } } @@ -3837,17 +3849,17 @@ UInt SyExecuteProcess ( Int SyIsExistingFile ( Char * name ) { - Int res; + Int res; SyClearErrorNo(); res = access( name, F_OK ); if ( res == -1 ) { - if ( errno != ENOENT ) { - SySetErrorNo(); - } - else { - res = 1; - } + if ( errno != ENOENT ) { + SySetErrorNo(); + } + else { + res = 1; + } } return res; } @@ -3872,12 +3884,12 @@ Int SyIsExistingFile ( Char * name ) Int SyIsReadableFile ( Char * name ) { - Int res; + Int res; SyClearErrorNo(); res = access( name, R_OK ); if ( res == -1 ) { - SySetErrorNo(); + SySetErrorNo(); } return res; } @@ -3902,17 +3914,17 @@ Int SyIsReadableFile ( Char * name ) Int SyIsWritableFile ( Char * name ) { - Int res; + Int res; SyClearErrorNo(); res = access( name, W_OK ); if ( res == -1 ) { - if ( errno != EROFS && errno != EACCES ) { - SySetErrorNo(); - } - else { - res = 1; - } + if ( errno != EROFS && errno != EACCES ) { + SySetErrorNo(); + } + else { + res = 1; + } } return res; } @@ -3937,23 +3949,23 @@ Int SyIsWritableFile ( Char * name ) Int SyIsExecutableFile ( Char * name ) { - Int res; + Int res; SyClearErrorNo(); res = access( name, X_OK ); if ( res == -1 ) { - if ( errno == EACCES ) { - if ( SyIsExistingFile(name) == 0 ) { - res = 1; - } - else { - errno = EACCES; - SySetErrorNo(); - } - } - else { - SySetErrorNo(); - } + if ( errno == EACCES ) { + if ( SyIsExistingFile(name) == 0 ) { + res = 1; + } + else { + errno = EACCES; + SySetErrorNo(); + } + } + else { + SySetErrorNo(); + } } return res; } @@ -3984,7 +3996,7 @@ Int SyIsDirectoryPath ( Char * name ) SyClearErrorNo(); if ( stat( name, &buf ) == -1 ) { - SySetErrorNo(); + SySetErrorNo(); return -1; } return S_ISDIR(buf.st_mode) ? 0 : 1; @@ -4076,7 +4088,7 @@ Char * SyTmpname ( void ) base = tmpnam( (char*)0 ); } if ( base == 0 ) { - SySetErrorNo(); + SySetErrorNo(); return 0; } name[0] = 0; @@ -4125,7 +4137,7 @@ Char * SyTmpdir ( Char * hint ) /* create a new directory */ res = mkdir( tmp, 0777 ); if ( res == -1 ) { - SySetErrorNo(); + SySetErrorNo(); return 0; } diff --git a/src/sysfiles.h b/src/sysfiles.h index 10ebed8a9b..c8cf8ad619 100644 --- a/src/sysfiles.h +++ b/src/sysfiles.h @@ -11,7 +11,7 @@ ** except file/stream handling which is done in "sysfiles.h". */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_sysfiles_h = +SYS_CONST char * Revision_sysfiles_h = "@(#)$Id$"; #endif @@ -42,7 +42,7 @@ char * Revision_sysfiles_h = */ extern Int SyFindOrLinkGapRootFile ( Char * filename, - UInt4 crc_gap, + Int4 crc_gap, Char * result, Int len ); @@ -54,7 +54,7 @@ extern Int SyFindOrLinkGapRootFile ( ** This function should be clever and handle white spaces and comments but ** one has to certain that such characters are not ignored in strings. */ -extern UInt4 SyGAPCRC( +extern Int4 SyGAPCRC( Char * name ); @@ -135,7 +135,7 @@ extern SYS_SY_BUF syBuf [256]; ** *F SyFileno( ) . . . . . . . . . . . . . . get operating system fileno */ -#define SyFileno(fid) (fid==-1?-1:fileno(syBuf[fid].fp)) +#define SyFileno(fid) (fid==-1?-1:fileno(syBuf[fid].fp)) /**************************************************************************** diff --git a/src/system.c b/src/system.c index 936b923cbd..4c500d9cc8 100644 --- a/src/system.c +++ b/src/system.c @@ -380,6 +380,20 @@ UInt SyCacheSize = 0; Int SyCheckForCompletion = 1; +/**************************************************************************** +** +*V SyCheckCompletionCrcComp . . . check crc while reading completion files +*/ +Int SyCheckCompletionCrcComp = 0; + + +/**************************************************************************** +** +*V SyCheckCompletionCrcRead . . . . . . . check crc while completing files +*/ +Int SyCheckCompletionCrcRead = 1; + + /**************************************************************************** ** *V SyCompileInput . . . . . . . . . . . . . . . . . . from this input file @@ -552,6 +566,18 @@ UInt SyNrRows = 24; UInt SyQuiet = 0; +/**************************************************************************** +** +*V SyRestoring . . . . . . . . . . . . . . . . . . . . restoring a workspace +** +** `SyRestoring' determines whether GAP is restoring a workspace or not. If +** it is zero no restoring should take place otherwise it holds the filename +** of a workspace to restore. +** +*/ +Char * SyRestoring; + + /**************************************************************************** ** *V SyStorMax . . . . . . . . . . . . . . . . . . . maximal size of workspace @@ -559,7 +585,7 @@ UInt SyQuiet = 0; ** 'SyStorMax' is the maximal size of the workspace allocated by Gasman. ** ** This is per default 64 MByte, which is often a reasonable value. It is -** usually changed with the '-t' option in the script that starts GAP. +** usually changed with the '-o' option in the script that starts GAP. ** ** This is used in the function 'SyAllocBags'below. ** @@ -582,11 +608,11 @@ Int SyStorMax = 64 * 1024 * 1024L; ** Put in this package because the command line processing takes place here. */ #if SYS_BSD || SYS_MACH || SYS_USG || SYS_OS2_EMX -Int SyStorMin = 4 * 1024 * 1024; +Int SyStorMin = 8 * 1024 * 1024; #endif #if SYS_MSDOS_DJGPP -Int SyStorMin = 4 * 1024 * 1024; +Int SyStorMin = 8 * 1024 * 1024; #endif #if SYS_TOS_GCC2 @@ -594,7 +620,7 @@ Int SyStorMin = 0; #endif #if SYS_VMS -Int SyStorMin = 4 * 1024 * 1024; +Int SyStorMin = 8 * 1024 * 1024; #endif #if SYS_MAC_MPW || SYS_MAC_SYC @@ -1698,51 +1724,66 @@ void InitSystem ( switch ( argv[1][1] ) { - /* '-b', supress the banner */ - case 'b': - SyBanner = ! SyBanner; - break; - - - /* '-g', Gasman should be verbose */ - case 'g': - SyMsgsFlagBags = (SyMsgsFlagBags + 1) % 3; - break; - - - /* '-i' , changes the name of the init file */ - case 'i': + /* '-B', name of the directory containing execs within root/bin */ + case 'B': if ( argc < 3 ) { - fputs("gap: option '-i' must have an argument.\n",stderr); + fputs("gap: option '-B' must have an argument.\n",stderr); goto usage; } - SySystemInitFile[0] = '\0'; - SyStrncat( SySystemInitFile, argv[2], 255 ); - ++argv; --argc; + SyArchitecture = argv[2]; + ++argv; --argc; break; - + - /* '-l ;;...', changes the value of 'GAPROOT' */ - case 'l': - if ( argc < 3 ) { - fputs("gap: option '-l' must have an argument.\n",stderr); + /* -C */ + case 'C': + if ( argc < 6 ) { + fputs("gap: option '-C' must have 4 arguments.\n",stderr); goto usage; } - gapRoot = argv[2]; + SyCompilePlease = 1; + SyStrncat( SyCompileOutput, argv[2], sizeof(SyCompileOutput)-2 ); + ++argv; --argc; + SyStrncat( SyCompileInput, argv[2], sizeof(SyCompileInput)-2 ); + ++argv; --argc; + SyStrncat( SyCompileName, argv[2], sizeof(SyCompileName)-2 ); + ++argv; --argc; + SyCompileMagic1 = argv[2]; ++argv; --argc; break; - /* '-B', name of the directory containing execs within root/bin */ - case 'B': + /* '-D', debug loading of files */ + case 'D': + SyDebugLoading = ! SyDebugLoading; + break; + + + /* '-E', running under Emacs under OS/2 */ +#if SYS_OS2_EMX + case 'E': + SyLineEdit = 2; + syBuf[2].fp = stdin; + syBuf[2].echo = stderr; + break; +#endif + + + /* '-L', restore a saved workspace */ + case 'L': if ( argc < 3 ) { - fputs("gap: option '-B' must have an argument.\n",stderr); + fputs("gap: option '-L' must have an argument.\n",stderr); goto usage; } - SyArchitecture = argv[2]; + SyRestoring = argv[2]; ++argv; --argc; break; - + + /* '-M', no dynamic/static modules */ + case 'M': + SyUseModule = ! SyUseModule; + break; + /* '-N', check for completion files in "init.g" */ case 'N': @@ -1750,52 +1791,52 @@ void InitSystem ( break; - /* '-D', debug loading of files */ - case 'D': - SyDebugLoading = ! SyDebugLoading; + /* '-X' check crc value while reading completion files */ + case 'X': + SyCheckCompletionCrcComp = ! SyCheckCompletionCrcComp; break; - - /* '-M', no dynamic/static modules */ - case 'M': - SyUseModule = ! SyUseModule; + /* '-Y' check crc value while reading completion files */ + case 'Y': + SyCheckCompletionCrcRead = ! SyCheckCompletionCrcRead; break; - - /* '-m ', change the value of 'SyStorMin' */ - case 'm': + /* '-Z', specify background check frequency */ +#if SYS_MAC_SYC + case 'Z': if ( argc < 3 ) { - fputs("gap: option '-m' must have an argument.\n",stderr); + fputs("gap: option '-Z' must have an argument.\n",stderr); goto usage; } - SyStorMin = atoi(argv[2]); - if ( argv[2][SyStrlen(argv[2])-1] == 'k' - || argv[2][SyStrlen(argv[2])-1] == 'K' ) - SyStorMin = SyStorMin * 1024; - if ( argv[2][SyStrlen(argv[2])-1] == 'm' - || argv[2][SyStrlen(argv[2])-1] == 'M' ) - SyStorMin = SyStorMin * 1024 * 1024; + syIsBackFreq = atoi(argv[2]); ++argv; --argc; break; +#endif - /* '-o ', change the value of 'SyStorMin' */ - case 'o': + /* '-a ', set amount to pre'm*a*lloc'ate */ + case 'a': if ( argc < 3 ) { - fputs("gap: option '-o' must have an argument.\n",stderr); + fputs("gap: option '-a' must have an argument.\n",stderr); goto usage; } - SyStorMax = atoi(argv[2]); + pre = atoi(argv[2]); if ( argv[2][SyStrlen(argv[2])-1] == 'k' || argv[2][SyStrlen(argv[2])-1] == 'K' ) - SyStorMax = SyStorMax * 1024; + pre = pre * 1024; if ( argv[2][SyStrlen(argv[2])-1] == 'm' || argv[2][SyStrlen(argv[2])-1] == 'M' ) - SyStorMax = SyStorMax * 1024 * 1024; + pre = pre * 1024 * 1024; ++argv; --argc; break; + /* '-b', supress the banner */ + case 'b': + SyBanner = ! SyBanner; + break; + + /* '-c', change the value of 'SyCacheSize' */ case 'c': if ( argc < 3 ) { @@ -1813,19 +1854,64 @@ void InitSystem ( break; - /* '-a ', set amount to pre'm*a*lloc'ate */ - case 'a': + /* '-e', do not quit GAP on '-D' */ + case 'e': + SyCTRD = ! SyCTRD; + break; + + + /* '-f', force line editing */ + case 'f': + SyLineEdit = 2; + break; + + + /* '-g', Gasman should be verbose */ + case 'g': + SyMsgsFlagBags = (SyMsgsFlagBags + 1) % 3; + break; + + + /* '-h', print a usage help */ + case 'h': + goto usage; + + /* '-i' , changes the name of the init file */ + case 'i': if ( argc < 3 ) { - fputs("gap: option '-a' must have an argument.\n",stderr); + fputs("gap: option '-i' must have an argument.\n",stderr); goto usage; } - pre = atoi(argv[2]); + SySystemInitFile[0] = '\0'; + SyStrncat( SySystemInitFile, argv[2], 255 ); + ++argv; --argc; + break; + + + /* '-l ;;...', changes the value of 'GAPROOT' */ + case 'l': + if ( argc < 3 ) { + fputs("gap: option '-l' must have an argument.\n",stderr); + goto usage; + } + gapRoot = argv[2]; + ++argv; --argc; + break; + + + /* '-m ', change the value of 'SyStorMin' */ + case 'm': + if ( argc < 3 ) { + fputs("gap: option '-m' must have an argument.\n",stderr); + goto usage; + } + SyStorMin = atoi(argv[2]); if ( argv[2][SyStrlen(argv[2])-1] == 'k' || argv[2][SyStrlen(argv[2])-1] == 'K' ) - pre = pre * 1024; + SyStorMin = SyStorMin * 1024; if ( argv[2][SyStrlen(argv[2])-1] == 'm' || argv[2][SyStrlen(argv[2])-1] == 'M' ) - pre = pre * 1024 * 1024; + SyStorMin = SyStorMin * 1024 * 1024; ++argv; --argc; break; @@ -1836,18 +1922,43 @@ void InitSystem ( break; - /* '-f', force line editing */ - case 'f': - SyLineEdit = 2; + /* '-o ', change the value of 'SyStorMax' */ + case 'o': + if ( argc < 3 ) { + fputs("gap: option '-o' must have an argument.\n",stderr); + goto usage; + } + SyStorMax = atoi(argv[2]); + if ( argv[2][SyStrlen(argv[2])-1] == 'k' + || argv[2][SyStrlen(argv[2])-1] == 'K' ) + SyStorMax = SyStorMax * 1024; + if ( argv[2][SyStrlen(argv[2])-1] == 'm' + || argv[2][SyStrlen(argv[2])-1] == 'M' ) + SyStorMax = SyStorMax * 1024 * 1024; + ++argv; --argc; break; + /* '-p', start GAP package mode for output */ +#if SYS_BSD || SYS_MACH || SYS_USG + case 'p': + SyWindow = ! SyWindow; + break; +#endif + + /* '-q', GAP should be quiet */ case 'q': SyQuiet = ! SyQuiet; break; + /* '-r', don't read the '.gaprc' file */ + case 'r': + gaprc = ! gaprc; + break; + + /* '-x', specify the length of a line */ case 'x': if ( argc < 3 ) { @@ -1870,20 +1981,6 @@ void InitSystem ( break; - /* '-e', do not quit GAP on '-D' */ - case 'e': - SyCTRD = ! SyCTRD; - break; - - - /* '-p', start GAP package mode for output */ -#if SYS_BSD || SYS_MACH || SYS_USG - case 'p': - SyWindow = ! SyWindow; - break; -#endif - - /* '-z', specify interrupt check frequency */ #if SYS_MSDOS_DJGPP || SYS_TOS_GCC2 || SYS_MAC_MPW || SYS_MAC_SYC case 'z': @@ -1897,53 +1994,6 @@ void InitSystem ( #endif - /* '-Z', specify background check frequency */ -#if SYS_MAC_SYC - case 'Z': - if ( argc < 3 ) { - fputs("gap: option '-Z' must have an argument.\n",stderr); - goto usage; - } - syIsBackFreq = atoi(argv[2]); - ++argv; --argc; - break; -#endif - - - /* '-E', running under Emacs under OS/2 */ -#if SYS_OS2_EMX - case 'E': - SyLineEdit = 2; - syBuf[2].fp = stdin; - syBuf[2].echo = stderr; - break; -#endif - - - /* '-r', don't read the '.gaprc' file */ - case 'r': - gaprc = ! gaprc; - break; - - - /* -C */ - case 'C': - if ( argc < 6 ) { - fputs("gap: option '-C' must have 4 arguments.\n",stderr); - goto usage; - } - SyCompilePlease = 1; - SyStrncat( SyCompileOutput, argv[2], sizeof(SyCompileOutput)-2 ); - ++argv; --argc; - SyStrncat( SyCompileInput, argv[2], sizeof(SyCompileInput)-2 ); - ++argv; --argc; - SyStrncat( SyCompileName, argv[2], sizeof(SyCompileName)-2 ); - ++argv; --argc; - SyCompileMagic1 = argv[2]; - ++argv; --argc; - break; - - /* default, no such option */ default: fputs("gap: '",stderr); fputs(argv[1],stderr); @@ -1958,7 +2008,12 @@ void InitSystem ( /* fix max if it is lower than min */ if ( SyStorMax < SyStorMin ) { - SyStorMax = SyStorMin; + SyStorMax = SyStorMin; + } + + /* only check once */ + if ( SyCheckCompletionCrcComp ) { + SyCheckCompletionCrcRead = 0; } /* set the library path */ @@ -1994,12 +2049,12 @@ void InitSystem ( if ( ptr != 0 ) free( ptr ); /* try to find 'LIBNAME/init.g' to read it upon initialization */ - if ( SyCompilePlease ) { + if ( SyCompilePlease || SyRestoring ) { SySystemInitFile[0] = 0; } /* the compiler will *not* read in the .gaprc file */ - if ( gaprc && ! SyCompilePlease ) { + if ( gaprc && ! ( SyCompilePlease || SyRestoring ) ) { sySetGapRCFile(); } @@ -2062,17 +2117,57 @@ void InitSystem ( return; /* print a usage message */ - usage: - fputs("usage: gap [-b] [-e] [-f] [-g] [-n] [-p] [-q] [-r]\n",stderr); - fputs(" [-D] [-E] [-M] [-N]\n", stderr ); - fputs(" [-a ] [-c ] [-i ]\n",stderr); - fputs(" [-l ;...] [-m ] [-o ]\n",stderr ); - fputs(" [-x ] [-y ] [-z ]\n",stderr); - fputs(" [-B ] [-Z ]\n",stderr ); - fputs(" [-C ]\n",stderr); - fputs(" [...]\n",stderr); - fputs(" run the Groups, Algorithms and Programming system.\n",stderr); - SyExit( 1 ); +usage: + fputs("usage: gap [OPTIONS] [FILES]\n",stderr); + fputs(" run the Groups, Algorithms and Programming system.\n",stderr); + fputs("\n",stderr); + + fputs(" -b toggle banner supression\n",stderr); + fputs(" -q toggle quiet mode\n",stderr); + fputs(" -e toggle quitting on -D\n",stderr); + fputs(" -f force line editing\n",stderr); + fputs(" -n disable line editing\n",stderr); + fputs(" -x set line width\n",stderr); + fputs(" -y set number of lines\n",stderr); +#if SYS_OS2_EMX + fputs(" -E running under Emacs under OS/2\n",stderr); +#endif + + fputs("\n",stderr); + fputs(" -g toggle GASMAN messages\n",stderr); + fputs(" -m set the initial workspace size\n",stderr); + fputs(" -o set the maximal workspace size\n",stderr); + fputs(" -c set the cache size value\n",stderr); + fputs(" -a set amount to pre-malloc-ate\n",stderr); + fputs(" postfix 'k' = *1024, 'm' = *1024*1024\n",stderr); + + fputs("\n",stderr); + fputs(" -l set the GAP root paths\n",stderr); + fputs(" -r toggle reading of the '.gaprc' file \n",stderr); + fputs(" -D toggle debuging the loading of library files\n",stderr); + fputs(" -B current architecture\n",stderr); + fputs(" -M toggle loading of compiled modules\n",stderr); + fputs(" -N toggle check for completion files\n",stderr); + fputs(" -X toggle CRC for comp. files while reading\n",stderr); + fputs(" -Y toggle CRC for comp. files while completing\n",stderr); + fputs(" -i change the name of the init file\n",stderr); + + fputs("\n",stderr); + fputs(" -L restore a saved workspace\n",stderr); + + fputs("\n",stderr); +#if SYS_MAC_SYC + fputs(" -Z set background check frequency\n",stderr); +#endif +#if SYS_BSD || SYS_MACH || SYS_USG + fputs(" -p toggle package output mode\n",stderr); +#endif +#if SYS_MSDOS_DJGPP || SYS_TOS_GCC2 || SYS_MAC_MPW || SYS_MAC_SYC + fputs(" -z set interrupt check frequency\n",stderr); +#endif + + fputs("\n",stderr); + SyExit( 1 ); } diff --git a/src/system.h b/src/system.h index baaadcf457..e61a5acc08 100644 --- a/src/system.h +++ b/src/system.h @@ -15,11 +15,6 @@ ** The file 'system.c' declares all operating system dependent functions ** except file/stream handling which is done in "sysfiles.h". */ -#ifdef INCLUDE_DECLARATION_PART -char * Revision_system_h = - "@(#)$Id$"; -#endif - #include /* jmp_buf, setjmp, longjmp */ @@ -54,6 +49,16 @@ char * Revision_system_h = #endif +/**************************************************************************** +** +*V Revision_system_h . . . . . . . . . . . . . . . . . . . . revision number +*/ +#ifdef INCLUDE_DECLARATION_PART +SYS_CONST char * Revision_system_h = + "@(#)$Id$"; +#endif + + /**************************************************************************** ** *V SYS_BSD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . BSD @@ -278,6 +283,20 @@ extern UInt SyCacheSize; extern Int SyCheckForCompletion; +/**************************************************************************** +** +*V SyCheckCompletionCrcComp . . . check crc while reading completion files +*/ +extern Int SyCheckCompletionCrcComp; + + +/**************************************************************************** +** +*V SyCheckCompletionCrcRead . . . . . . . check crc while completing files +*/ +extern Int SyCheckCompletionCrcRead; + + /**************************************************************************** ** *V SyCompileInput . . . . . . . . . . . . . . . . . . from this input file @@ -449,6 +468,18 @@ extern UInt SyNrRows; extern UInt SyQuiet; +/**************************************************************************** +** +*V SyRestoring . . . . . . . . . . . . . . . . . . . . restoring a workspace +** +** `SyRestoring' determines whether GAP is restoring a workspace or not. If +** it is zero no restoring should take place otherwise it holds the filename +** of a workspace to restore. +** +*/ +extern Char * SyRestoring; + + /**************************************************************************** ** *V SyStorMax . . . . . . . . . . . . . . . . . . . maximal size of workspace diff --git a/src/tietze.c b/src/tietze.c new file mode 100644 index 0000000000..865e325f31 --- /dev/null +++ b/src/tietze.c @@ -0,0 +1,1575 @@ +/**************************************************************************** +** +*W tietze.c GAP source Frank Celler +*W & Volkmar Felsch +** +*H @(#)$Id$ +** +*Y Copyright 1990-1992, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany +** +** This file contains the functions for computing with finite presentations. +*/ +#include "system.h" /* system dependent part */ + +SYS_CONST char * Revision_tietze_c = + "@(#)$Id$"; + +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ + +#include "calls.h" /* generic call mechanism */ +#include "gvars.h" /* global variables */ + +#include "gap.h" /* error handling, initialisation */ +#include "bool.h" /* booleans */ + +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ + +#include "lists.h" /* generic lists */ +#include "plist.h" /* plain lists */ +#include "string.h" /* strings */ + +#define INCLUDE_DECLARATION_PART +#include "tietze.h" /* tietze helper functions */ +#undef INCLUDE_DECLARATION_PART + + +/**************************************************************************** +** + +*V TZ_SOMETHING . . . . . . defining some constants for the Tietze routines +*/ +#define TZ_NUMGENS 1 +#define TZ_NUMRELS 2 +#define TZ_TOTAL 3 +#define TZ_GENERATORS 4 +#define TZ_INVERSES 5 +#define TZ_RELATORS 6 +#define TZ_LENGTHS 7 +#define TZ_FLAGS 8 +#define TZ_FREEGENS 9 +#define TZ_LENGTHTIETZE 20 + + +/**************************************************************************** +** + +*F CheckTietzeStack( , ) +*/ +void CheckTietzeStack ( + Obj tietze, + Obj * * ptTietze ) +{ + /* check the Tietze stack */ + if ( ! IS_PLIST(tietze) ) { + ErrorQuit( " must be a plain list (not a %s)", + (Int)TNAM_OBJ(tietze), 0L ); + return; + } + if ( LEN_PLIST(tietze) != TZ_LENGTHTIETZE ) { + ErrorQuit( ", , , ) +*/ +void CheckTietzeRelators ( + Obj * ptTietze, + Obj * rels, + Obj * * ptRels, + Int4 * numrels ) +{ + *rels = ptTietze[TZ_RELATORS]; + *numrels = INT_INTOBJ(ptTietze[TZ_NUMRELS]); + if ( *rels == 0 || ! IS_PLIST(*rels) || LEN_PLIST(*rels) != *numrels ) { + ErrorQuit( "invalid Tietze relators list", 0L, 0L ); + return; + } + *ptRels = ADDR_OBJ(*rels); +} + + +/**************************************************************************** +** +*F CheckTietzeInverses( , , , ) +*/ +void CheckTietzeInverses ( + Obj * ptTietze, + Obj * invs, + Obj * * ptInvs, + Int4 * numgens ) +{ + /* get and check the Tietze inverses list */ + *invs = ptTietze[TZ_INVERSES]; + *numgens = INT_INTOBJ(ptTietze[TZ_NUMGENS]); + if ( *invs==0 || !IS_PLIST(*invs) || LEN_PLIST(*invs)!=2*(*numgens)+1 ) { + ErrorQuit( "invalid Tietze inverses list", 0L, 0L ); + return; + } + *ptInvs = ADDR_OBJ(*invs) + (*numgens+1); +} + + +/**************************************************************************** +** +*F CheckTietzeLengths( , , , ) +*/ +void CheckTietzeLengths ( + Obj * ptTietze, + Int4 numrels, + Obj * lens, + Obj * * ptLens ) +{ + /* Get and check the Tietze lengths list */ + *lens = ptTietze[TZ_LENGTHS]; + if ( *lens == 0 || ! IS_PLIST(*lens) || LEN_PLIST(*lens) != numrels ) { + ErrorQuit( "invalid Tietze lengths list", 0L, 0L ); + return; + } + *ptLens = ADDR_OBJ(*lens); +} + + +/**************************************************************************** +** +*F CheckTietzeFlags( , , , ) +*/ +void CheckTietzeFlags ( + Obj * ptTietze, + Int4 numrels, + Obj * flags, + Obj * * ptFlags ) +{ + /* get and check the Tietze flags list */ + *flags = ptTietze[TZ_FLAGS]; + if ( *flags==0 || ! IS_PLIST(*flags) || LEN_PLIST(*flags)!=numrels ) { + ErrorQuit( "invalid Tietze flags list", 0L, 0L ); + return; + } + *ptFlags = ADDR_OBJ(*flags); +} + + +/**************************************************************************** +** +*F CheckTietzeRelLengths( , , , , ) +*/ +void CheckTietzeRelLengths ( + Obj * ptTietze, + Obj * ptRels, + Obj * ptLens, + Int4 numrels, + Int4 * total ) +{ + Int4 i; + + /* Check list to contain the relator lengths */ + *total = 0; + for ( i = 1; i <= numrels; i++ ) { + if ( ptRels[i] == 0 + || ! IS_PLIST(ptRels[i]) + || INT_INTOBJ(ptLens[i]) != LEN_PLIST(ptRels[i]) ) + { + ErrorQuit( "inconsistent Tietze lengths list", 0L, 0L ); + return; + } + *total += INT_INTOBJ(ptLens[i]); + } + if ( *total != INT_INTOBJ(ptTietze[TZ_TOTAL]) ) { + ErrorQuit( "inconsistent total length", 0L, 0L ); + return; + } +} + + +/**************************************************************************** +** + +*F FuncTzSortC( , ) . . . . . . . sort the relators by length +*/ +Obj FuncTzSortC ( + Obj self, + Obj tietze ) +{ + Obj * ptTietze; /* pointer to the Tietze stack */ + Obj rels; /* relators list */ + Obj * ptRels ; /* pointer to this list */ + Obj lens; /* lengths list */ + Obj * ptLens; /* pointer to this list */ + Obj flags; /* handle of the flags list */ + Obj * ptFlags; /* pointer to this list */ + Int4 numrels; /* number of Tietze relators */ + Int4 i, h, k; /* loop variables */ + Obj rel, len, flag; /* list entries */ + Int4 total; + + /* check the Tietze stack */ + CheckTietzeStack( tietze, &ptTietze ); + + /* get and check the Tietze relators list */ + CheckTietzeRelators( ptTietze, &rels, &ptRels, &numrels ); + + /* get and check the Tietze lengths list */ + CheckTietzeLengths( ptTietze, numrels, &lens, &ptLens ); + + /* get and check the Tietze flags list */ + CheckTietzeFlags( ptTietze, numrels, &flags, &ptFlags ); + + /* check list to contain the relator lengths */ + CheckTietzeRelLengths( ptTietze, ptRels, ptLens, numrels, &total ); + + /* sort the list */ + h = 1; + while ( 9 * h + 4 < numrels ) + h = 3 * h + 1; + while ( 0 < h ) { + for ( i = h + 1; i <= numrels; i++ ) { + rel = ptRels[i]; len = ptLens[i]; flag = ptFlags[i]; + k = i; + if ( INT_INTOBJ(len) ) { + while ( h < k + && ( !INT_INTOBJ(ptLens[k-h]) + || len < ptLens[k-h] + || (len == ptLens[k-h] && flag > ptFlags[k-h]))) + { + ptRels[k] = ptRels[k-h]; + ptLens[k] = ptLens[k-h]; + ptFlags[k] = ptFlags[k-h]; + k = k - h; + } + } + ptRels[k] = rel; ptLens[k] = len; ptFlags[k] = flag; + } + h = h / 3; + } + for ( i = numrels; i > 0; i-- ) { + if ( INT_INTOBJ(ptLens[i]) ) + break; + } + if ( i < numrels ) { + SET_LEN_PLIST( rels, i ); SHRINK_PLIST( rels, i ); + SET_LEN_PLIST( lens, i ); SHRINK_PLIST( lens, i ); + SET_LEN_PLIST( flags, i ); SHRINK_PLIST( flags, i ); + ptTietze[TZ_NUMRELS] = INTOBJ_INT(i); + CHANGED_BAG(tietze); + } + + return 0; +} + + +/**************************************************************************** +** +*F FuncTzRenumberGens( , ) . . renumber the Tietze generators +*/ +Obj FuncTzRenumberGens ( + Obj self, + Obj tietze ) +{ + Obj * ptTietze; /* pointer to this stack */ + Obj rels; /* handle of the relators list */ + Obj * ptRels; /* pointer to this list */ + Obj invs; /* handle of the inverses list */ + Obj * ptInvs; /* pointer to this list */ + Obj * ptRel; /* pointer to the ith relator */ + Int4 numgens; /* number of Tietze generators */ + Int4 numrels; /* number of Tietze relators */ + Int4 old; /* generator or inverse */ + Int4 leng; /* relator length */ + Int4 i, j; /* loop variables */ + + /* check the Tietze stack */ + CheckTietzeStack( tietze, &ptTietze ); + + /* get and check the Tietze relators list */ + CheckTietzeRelators( ptTietze, &rels, &ptRels, &numrels ); + + /* get and check the Tietze inverses list */ + CheckTietzeInverses( ptTietze, &invs, &ptInvs, &numgens ); + + /* Loop over all relators and replace the occurring generators */ + for ( i = 1; i <= numrels; i++ ) { + ptRel = ADDR_OBJ( ptRels[i] ); + leng = LEN_PLIST( ptRels[i] ); + + /* run through the relator and replace the occurring generators */ + for ( j = 1; j <= leng; j++ ) { + old = INT_INTOBJ( ptRel[j] ); + if ( old < -numgens || numgens < old || old == 0 ) { + ErrorQuit( "gen no. %d in rel no. %d out of range", j,i ); + return 0; + } + ptRel[j] = ptInvs[-old]; + } + } + + return 0; +} + + +/**************************************************************************** +** +*F FuncTzReplaceGens( , ) replace Tietze generators by others +*/ +Obj FuncTzReplaceGens ( + Obj self, + Obj tietze ) +{ + Obj * ptTietze; /* pointer to this stack */ + Obj rels; /* handle of the relators list */ + Obj * ptRels; /* pointer to this list */ + Obj lens; /* handle of the lengths list */ + Obj * ptLens; /* pointer to this list */ + Obj flags; /* handle of the flags list */ + Obj * ptFlags; /* pointer to this list */ + Obj invs; /* handle of the inverses list */ + Obj * ptInvs; /* pointer to this list */ + Obj rel; /* handle of a relator */ + Obj * ptRel; /* pointer to this relator */ + Obj * pt1; /* pointer to a relator */ + Obj * pt2; /* pointer to a relator */ + Int4 numgens; /* number of Tietze generators */ + Int4 numrels; /* number of Tietze relators */ + Int4 total; /* total length of relators */ + Int4 old, new; /* generators or inverses */ + Int4 leng, reduced; /* relator lengths */ + Int4 altered; /* flag */ + Int4 i, j; /* loop variables */ + + /* check the Tietze stack */ + CheckTietzeStack( tietze, &ptTietze ); + + /* get and check the Tietze relators list */ + CheckTietzeRelators( ptTietze, &rels, &ptRels, &numrels ); + + /* get and check the Tietze lengths list */ + CheckTietzeLengths( ptTietze, numrels, &lens, &ptLens ); + + /* check list to contain the relator lengths */ + CheckTietzeRelLengths( ptTietze, ptRels, ptLens, numrels, &total ); + + /* get and check the Tietze flags list */ + CheckTietzeFlags( ptTietze, numrels, &flags, &ptFlags ); + + /* get and check the Tietze inverses list */ + CheckTietzeInverses( ptTietze, &invs, &ptInvs, &numgens ); + + /* loop over all relators */ + for ( i = 1; i <= numrels; i++ ) { + rel = ptRels[i]; + pt2 = ptRel = ADDR_OBJ( rel ); + leng = INT_INTOBJ( ptLens[i] ); + altered = 0; + + /* don't change a square relator defining a valid involution */ + if ( INT_INTOBJ( ptFlags[i] ) == 3 && leng == 2 && + ptRel[1] == ptInvs[-INT_INTOBJ(ptRel[1])] ) { + continue; /* loop over i */ + } + + /* run through the relator and replace the occurring generators */ + for ( j = 1; j <= leng; j++ ) { + + old = INT_INTOBJ( ptRel[j] ); + if ( old < -numgens || numgens < old || old == 0 ) { + ErrorQuit( "gen no. %d in rel no. %d out of range", + (Int)j, (Int)i ); + return 0; + } + + new = INT_INTOBJ( ptInvs[-old] ); + if ( ! new ) { + altered = 1; + continue; /* loop over j */ + } + + if ( pt2 > ptRel && *pt2 == ptInvs[new] ) { + altered = 1; + --pt2; + } + else { + if ( new != old ) { altered = 1; } + *++pt2 = INTOBJ_INT( new ); + } + } + + if ( ! altered ) { + continue; /* loop over i */ + } + + /* now cyclically reduce the relator */ + pt1 = ++ptRel; + while ( pt1 < pt2 && *pt1 == ptInvs[INT_INTOBJ(*pt2)] ) { + ++pt1; --pt2; + } + if ( ptRel < pt1 ) { + while ( pt1 <= pt2 ) { *ptRel++ = *pt1++; } + pt2 = --ptRel; + } + + /* resize the resulting relator, if necessary */ + ptRel = ADDR_OBJ( rel ); + reduced = pt2 - ptRel; + if ( reduced < leng ) { + SET_LEN_PLIST( rel, reduced ); + ptLens[i] = INTOBJ_INT( reduced ); + total = total - leng + reduced; + SHRINK_PLIST( rel, reduced ); + CHANGED_BAG(rels); + ptRels = ADDR_OBJ( rels ); + ptLens = ADDR_OBJ( lens ); + ptFlags = ADDR_OBJ( flags ); + ptInvs = ADDR_OBJ( invs ) + (numgens + 1); + } + + /* Redefine the corresponding search flag */ + ADDR_OBJ( flags )[i] = INTOBJ_INT( 1 ); + } + ptTietze = ADDR_OBJ( tietze ); + ptTietze[TZ_TOTAL] = INTOBJ_INT( total ); + + return 0; +} + + +/**************************************************************************** +** +*F FuncTzSubstituteGen( , , , ) +*/ +Obj FuncTzSubstituteGen ( + Obj self, + Obj tietze, + Obj gennum, + Obj word ) +{ + Obj * ptTietze; /* pointer to this stack */ + Obj rels; /* handle of the relators list */ + Obj * ptRels; /* pointer to this list */ + Obj lens; /* handle of the lengths list */ + Obj * ptLens; /* pointer to this list */ + Obj flags; /* handle of the flags list */ + Obj * ptFlags; /* pointer to this list */ + Obj invs; /* handle of the inverses list */ + Obj * ptInvs; /* pointer to this list */ + Obj * ptWrd; /* pointer to this word */ + Obj iwrd; /* handle of the inverse word */ + Obj * ptIwrd; /* pointer to this word */ + Obj new; /* handle of a modified relator */ + Obj * ptNew; /* pointer to this relator */ + Obj rel; /* handle of a relator */ + Obj * ptRel; /* pointer to this relator */ + Obj * pt1; /* pointer to a relator */ + Obj * pt2; /* pointer to a relator */ + Obj * pt3; /* pointer to a relator */ + Int4 numgens; /* number of Tietze generators */ + Int4 numrels; /* number of Tietze relators */ + Int4 total; /* total length of relators */ + Int4 given; /* given generator and inverse */ + Int4 gen, ginv; /* given generator and inverse */ + Int4 next; /* generator or inverse */ + Int4 leng, newleng; /* relator lengths */ + Int4 wleng; /* length of the replacing word */ + Int4 occ; /* number of occurrences */ + Int4 i, j; /* loop variables */ + + /* check the Tietze stack */ + CheckTietzeStack( tietze, &ptTietze ); + + /* get and check the Tietze relators list */ + CheckTietzeRelators( ptTietze, &rels, &ptRels, &numrels ); + + /* get and check the Tietze lengths list */ + CheckTietzeLengths( ptTietze, numrels, &lens, &ptLens ); + + /* get and check the Tietze flags list */ + CheckTietzeFlags( ptTietze, numrels, &flags, &ptFlags ); + + /* get and check the Tietze inverses list */ + CheckTietzeInverses( ptTietze, &invs, &ptInvs, &numgens ); + + /* check the second argument (generator number) */ + if ( ! IS_INTOBJ(gennum) ) { + ErrorQuit( " must be an integer", 0L, 0L ); + return 0; + } + given = INT_INTOBJ(gennum); + gen = ( given > 0 ) ? given : -given; + if ( gen <= 0 || numgens < gen ) { + ErrorQuit( "generator number %d out of range", (Int)gen, 0L ); + return 0; + } + ginv = INT_INTOBJ(ptInvs[gen]); + + /* check the third argument (replacing word) */ + if ( ! IS_PLIST(word) ) { + ErrorQuit( "invalid replacing word", 0L, 0L ); + return 0; + } + ptWrd = ADDR_OBJ(word); + wleng = LEN_PLIST(word); + for ( i = 1; i <= wleng; i++ ) { + next = INT_INTOBJ( ptWrd[i] ); + if ( next < -numgens || next == 0 || next > numgens ) { + ErrorQuit( "entry [%d] of out of range", + (Int)i, 0L ); + return 0; + } + } + + /* check list to contain the relator lengths */ + CheckTietzeRelLengths( ptTietze, ptRels, ptLens, numrels, &total ); + + /* allocate a bag for the inverse of the replacing word */ + iwrd = NEW_PLIST( T_PLIST, wleng ); + ptRels = ADDR_OBJ( rels ); + ptLens = ADDR_OBJ( lens ); + ptInvs = ADDR_OBJ( invs ) + (numgens + 1); + ptWrd = ADDR_OBJ( word ); + ptIwrd = ADDR_OBJ( iwrd ); + + /* invert the replacing word */ + SET_LEN_PLIST( iwrd, wleng ); + pt1 = ptWrd; + pt2 = ptIwrd + wleng; + while ( pt2 > ptIwrd ) { + *pt2-- = ptInvs[INT_INTOBJ(*++pt1)]; + } + if ( given < 0 ) { + new = word; word = iwrd; iwrd = new; + ptWrd = ADDR_OBJ(word); ptIwrd = ADDR_OBJ(iwrd); + } + + /* loop over all relators */ + for ( i = 1; i <= numrels; i++ ) { + rel = ptRels[i]; + ptRel = ADDR_OBJ(rel); + leng = INT_INTOBJ(ptLens[i]); + if ( leng == 0 ) { + continue; + } + + /* run through the relator and count the occurrences of gen */ + occ = 0; + for ( j = 1; j <= leng; j++ ) { + next = INT_INTOBJ( ptRel[j] ); + if ( next < -numgens || numgens < next ) { + ErrorQuit( "gen no. %d in rel no. %d out of range", + (Int)j, (Int)i ); + return 0; + } + if (next == gen || next == ginv ) + ++occ; + } + if ( occ == 0 ) { + continue; + } + + /* allocate a bag for the modified Tietze relator */ + new = NEW_PLIST( T_PLIST, leng + occ * (wleng - 1) ); + pt2 = ptNew = ADDR_OBJ( new ); + ptLens = ADDR_OBJ( lens ); + ptInvs = ADDR_OBJ( invs ) + (numgens + 1); + ptWrd = ADDR_OBJ( word ); + ptIwrd = ADDR_OBJ( iwrd ); + ptRel = ADDR_OBJ( rel ); + + /* now run again through the relator and modify it */ + for ( j = 1; j <= leng; j++ ) { + next = INT_INTOBJ( ptRel[j] ); + if ( next == gen || next == -gen ) { + pt1 = ( next > 0 ) ? ptWrd : ptIwrd; + pt3 = pt1 + wleng; + while ( pt1 < pt3 ) { + ++pt1; + if ( pt2 > ptNew && *pt2 == ptInvs[INT_INTOBJ(*pt1)] ) + --pt2; + else + *++pt2 = *pt1; + } + } + else { + if ( pt2 > ptNew && *pt2 == ptInvs[next] ) + --pt2; + else + *++pt2 = INTOBJ_INT( next ); + } + } + + /* now cyclically reduce the relator */ + pt1 = ++ptNew; + while ( pt1 < pt2 && *pt1 == ptInvs[INT_INTOBJ(*pt2)] ) { + ++pt1; --pt2; + } + if ( ptNew < pt1 ) { + while ( pt1 <= pt2 ) *ptNew++ = *pt1++; + pt2 = --ptNew; + } + + /* resize and save the resulting relator */ + ptNew = ADDR_OBJ( new ); + newleng = pt2 - ptNew; + SET_LEN_PLIST( new, newleng ); + ptLens[i] = INTOBJ_INT( newleng ); + total = total - leng + newleng; + SHRINK_PLIST( new, newleng ); + ptRels = ADDR_OBJ( rels ); + ptLens = ADDR_OBJ( lens ); + ptRels[i] = new; + ADDR_OBJ( flags )[i] = INTOBJ_INT( 1 ); + CHANGED_BAG(rels); + } + + ptTietze = ADDR_OBJ( tietze ); + ptTietze[TZ_TOTAL] = INTOBJ_INT( total ); + + return 0; +} + + +/**************************************************************************** +** +*F FuncTzOccurrences( , ) . . occurrences of Tietze generators +*/ +Obj FuncTzOccurrences ( + Obj self, + Obj args ) +{ + Obj tietze; /* handle of the Tietze stack */ + Obj * ptTietze; /* pointer to the Tietze stack */ + Obj rels; /* handle of the relators list */ + Obj * ptRels; /* pointer to this list */ + Obj res; /* handle of the result */ + Obj cnts; /* list of the counts */ + Obj * ptCnts; /* pointer to the counts list */ + Obj mins; /* list of minimal occurence list */ + Obj * ptMins; /* pointer to the minimals list */ + Obj lens; /* list of lengths of those */ + Obj * ptLens; /* pointer to the lengths list */ + Obj rel; /* handle of a relator */ + Obj * ptRel; /* pointer to this relator */ + Obj aux; /* auxiliary list */ + Int4 * ptAux; /* pointer to the lengths list */ + Int4 numgens; /* number of Tietze generators */ + Int4 numrels; /* number of Tietze relators */ + Int4 leng; /* length of a relator */ + Int4 num, next; /* generators or inverses */ + Int4 i, k; /* loop variables */ + Int4 c; /* count of one generator */ + Int4 nr; /* number of occurrences */ + Int4 nr1; /* nr of occurrences in one word */ + Int4 nrm; /* minimal value of 'nr1' */ + Int4 min; /* word that has this minimum */ + + /* get and check arguments */ + if ( ! IS_LIST(args) || 2 < LEN_LIST(args) || LEN_LIST(args) < 1 ) { + ErrorQuit( "usage: TzOccurrences( [, ] )", + 0L, 0L ); + return 0; + } + + /* check the first argument (Tietze stack) */ + tietze = ELM_LIST( args, 1 ); + CheckTietzeStack( tietze, &ptTietze ); + + /* get and check the Tietze relators list */ + CheckTietzeRelators( ptTietze, &rels, &ptRels, &numrels ); + numgens = INT_INTOBJ(ptTietze[TZ_NUMGENS]); + + /* get and check the given generator number */ + if ( LEN_LIST(args) == 2 ) { + num = INT_INTOBJ( ELM_LIST(args,2) ); + if ( num <= 0 || numgens < num ) { + ErrorQuit( "given generator number out of range", 0L, 0L ); + return 0; + } + numgens = 1; + } + else { + num = numgens; + } + + /* allocate the result lists */ + cnts = NEW_PLIST( T_PLIST, numgens ); + SET_LEN_PLIST( cnts, numgens ); + for ( k = 1; k <= numgens; k++ ) + ADDR_OBJ(cnts)[k] = INTOBJ_INT(0); + + mins = NEW_PLIST( T_PLIST, numgens ); + SET_LEN_PLIST( mins, 0 ); + + lens = NEW_PLIST( T_PLIST, numgens ); + SET_LEN_PLIST( lens, 0 ); + + res = NEW_PLIST( T_PLIST, 3 ); + SET_LEN_PLIST( res, 3 ); + ADDR_OBJ(res)[1] = cnts; + ADDR_OBJ(res)[2] = mins; + ADDR_OBJ(res)[3] = lens; + CHANGED_BAG(res); + + /* allocate an auxiliary list */ + ptAux = 0; + if ( numgens > 1 ) { + aux = NEW_STRING( (numgens+1)*sizeof(Int4) ); + ptAux = (Int4*)ADDR_OBJ(aux); + ptAux[0] = numgens; + for ( k = 1; k <= numgens; k++ ) + ptAux[k] = 0; + + } + + /* now we can safely grab pointers */ + ptRels = ADDR_OBJ(rels); + ptCnts = ADDR_OBJ(cnts); + ptLens = ADDR_OBJ(lens); + ptMins = ADDR_OBJ(mins); + + /* handle special case of single generator in generator list */ + if ( numgens == 1 ) { + + /* initialize the counters */ + nr = 0; nrm = 0; min = 0; + + /* loop over all relators */ + for ( i = 1; i <= numrels; i++ ) { + rel = ptRels[i]; + if ( rel == 0 || ! IS_PLIST(rel) ) { + ErrorQuit( "invalid entry [%d] in Tietze relators list", + (Int)i, 0L ); + return 0; + } + ptRel = ADDR_OBJ(rel); + leng = LEN_PLIST(rel); + + /* loop over the letters of the relator */ + nr1 = 0; + for ( k = 1; k <= leng; k++ ) { + next = INT_INTOBJ( ptRel[k] ); + if ( next == num || next == -num ) { + nr1++; + } + } + + /* check whether the number of occurrences of num is less than */ + /* in the preceding relators */ + nr += nr1; + if ( nrm == 0 + || (0 < nr1 && nr1 < nrm) + || (nr1 == nrm && LEN_PLIST(rel) < LEN_PLIST(ptRels[min])) ) + { + nrm = nr1; min = i; + } + } + + /* put the information into the result bags */ + ptCnts[1] = INTOBJ_INT( nr ); + if ( nr != 0 ) { + ptCnts[1] = INTOBJ_INT( nr ); + SET_LEN_PLIST( lens, 1 ); + SET_ELM_PLIST( lens, 1, INTOBJ_INT(nrm) ); + SET_LEN_PLIST( mins, 1 ); + SET_ELM_PLIST( mins, 1, INTOBJ_INT(min) ); + } + } + + /* handle general case of all Tietze generators */ + else { + + /* loop over all relators */ + for ( i = 1; i <= numrels; i++ ) { + rel = ptRels[i]; + if ( rel == 0 || ! IS_PLIST(rel) ) { + ErrorQuit( "invalid entry [%d] in Tietze relators list", + (Int)i, 0L ); + return 0; + } + ptRel = ADDR_OBJ(rel); + leng = LEN_PLIST(rel); + + /* loop over the letters of the relator */ + for ( k = 1; k <= leng; k++ ) { + next = INT_INTOBJ( ptRel[k] ); + if ( next < 0 ) next = -next; + if ( next == 0 || numgens < next ) { + ErrorQuit( "invalid entry [%d][%d] in Tietze rels list", + (Int)i, (Int)k ); + return 0; + } + (ptAux[next])++; + } + + /* loop over the generators, collecting the counts */ + for ( k = 1; k <= numgens; k++ ) { + c = ptAux[k]; + if ( !c ) + continue; + ptAux[k] = 0; + if ( ! SUM_INTOBJS( ptCnts[k], ptCnts[k], INTOBJ_INT(c) ) ) { + ErrorQuit( "integer overlow", 0L, 0L ); + return 0; + } + if ( 0 < c ) { + if ( ptLens[k] == 0 || c < INT_INTOBJ(ptLens[k]) + || (c == INT_INTOBJ(ptLens[k]) + && LEN_PLIST(rel) + < LEN_PLIST(ptRels[INT_INTOBJ(ptMins[k])])) ) + { + ptLens[k] = INTOBJ_INT(c); + ptMins[k] = INTOBJ_INT(i); + } + } + } + } + + /* find the correct length of the minimals and lengths lists */ + k = numgens; + while ( ptMins[k] == 0 ) + k--; + SET_LEN_PLIST( mins, k ); + SET_LEN_PLIST( lens, k ); + } + + /* return the result */ + return res; +} + + +/**************************************************************************** +** +*F FuncTzOccurrencesPairs( , ) . . . . . occurrences of pairs +*/ +Obj FuncTzOccurrencesPairs ( + Obj self, + Obj args ) +{ + Obj tietze; /* handle of the Tietze stack */ + Obj * ptTietze; /* pointer to the Tietze stack */ + Obj rels; /* handle of the relators list */ + Obj * ptRels; /* pointer to this list */ + Obj invs; /* handle of the inverses list */ + Obj * ptInvs; /* pointer to this list */ + Obj res; /* handle of the resulting list */ + Obj * ptRes; /* pointer to this list */ + Obj rel; /* handle of a relator */ + Obj * ptRel; /* pointer to this relator */ + Obj numObj; /* handle of generator number */ + Obj invObj; /* handle of inverse gen number */ + Int4 num, i, ii; /* generator numbers */ + Int4 numgens; /* number of Tietze generators */ + Int4 numrels; /* number of Tietze relators */ + Int4 length; /* length of the current relator */ + Int4 j1, j2, r; /* loop variables */ + + /* get and check arguments */ + if ( ! IS_LIST(args) || 3 < LEN_LIST(args) || LEN_LIST(args) < 2 ) { + ErrorQuit( + "usage: TzOccurrencesPairs( , [, ] )", + 0L, 0L ); + return 0; + } + + /* check the first argument (Tietze stack) */ + tietze = ELM_LIST( args, 1 ); + CheckTietzeStack( tietze, &ptTietze ); + + /* get and check the Tietze relators list */ + CheckTietzeRelators( ptTietze, &rels, &ptRels, &numrels ); + + /* get and check the Tietze inverses list */ + CheckTietzeInverses( ptTietze, &invs, &ptInvs, &numgens ); + + /* get and check the Tietze generator number */ + numObj = ELM_LIST( args, 2 ); + if ( ! IS_INTOBJ(numObj) ) { + ErrorQuit( " must be a Tietze generator number", 0L, 0L ); + return 0; + } + num = INT_INTOBJ(numObj); + if ( num <= 0 || num > numgens ) { + ErrorQuit( "given generator number is out of range", 0L, 0L ); + return 0; + } + + /* Get and check the list for the results, if specified */ + if ( LEN_PLIST(args) == 2 ) { + res = NEW_PLIST( T_PLIST, 4*numgens ); + SET_LEN_PLIST( res, 4*numgens ); + } + else { + res = ELM_LIST( args, 3 ); + if ( res == 0 || ! IS_PLIST(res) || LEN_PLIST(res) != 4*numgens ) { + ErrorQuit( " must be a list of length %d", + (Int)4*numgens, 0L ); + return 0; + } + } + + /* return, if num = numgens */ + if ( num == numgens ) { + return res; + } + + /* get pointers to the involved lists */ + ptRels = ADDR_OBJ( rels ); + ptInvs = ADDR_OBJ( invs ) + (numgens + 1); + ptRes = ADDR_OBJ( res ); + + /* get the handle of the inverse of the given generator */ + invObj = ptInvs[num]; + + /* ptRes[i] counts the occurrences of gen * gen[i] */ + /* ptRes[numgens+i] counts the occurrences of gen * gen[i]^-1 */ + /* ptRes[2*numgens+i] counts the occurrences of gen^-1 * gen[i] */ + /* ptRes[3*numgens+i] counts the occurrences of gen^-1 * gen[i]^-1 */ + + /* initialize the counters */ + for ( i = 1; i <= 4 * numgens; i++ ) { + ptRes[i] = INTOBJ_INT(0); + } + + /* loop over the relators */ + for ( r = 1; r <= numrels; r++ ) { + rel = ptRels[r]; + if ( rel == 0 || ! IS_PLIST(rel) ) { + ErrorQuit( "invalid Tietze relator [%d]", (Int)r, 0L ); + return 0; + } + ptRel = ADDR_OBJ(rel) + 1; + + /* skip the current relator if its length is less than 2 */ + length = LEN_PLIST( rel ); + if ( length < 2 ) { + continue; + } + + /* loop over the current relator and investigate the pairs */ + /* ( ptRel[j1], ptRel[j2] ) */ + j1 = length - 1; + for ( j2 = 0; j2 < length; j1 = j2, j2++ ) { + + /* count any "forward" pair gen * gen[i], gen * gen[i]^-1, */ + /* gen^-1 * gen[i], or gen^-1 * gen[i]^-1 ( with num < i ) */ + if ( ptRel[j1] == numObj || ptRel[j1] == invObj ) { + i = INT_INTOBJ( ptRel[j2] ); + if ( -num <= i && i <= num ) { + continue; + } + if ( i < -numgens || numgens < i ) { + ErrorQuit( "invalid entry %d in Tietze relator [%d]", + (Int)i, (Int)r ); + return 0; + } + if ( i < 0 ) + i = numgens - i; + if ( ptRel[j1] != numObj ) + i = i + 2 * numgens; + if ( ! SUM_INTOBJS( ptRes[i], ptRes[i], INTOBJ_INT(1) ) ) { + ErrorQuit( "integer overlow", 0L, 0L ); + return 0; + } + } + + /* count any "backward" pair gen[i]^-1 * gen^-1, */ + /* gen[i] * gen^-1, gen[i]^-1 * gen, or gen[i] * gen */ + /* ( with num < i ) which is not covered by a forward pair */ + else if ( ptRel[j2] == numObj || ptRel[j2] == invObj ) { + i = INT_INTOBJ( ptRel[j1] ); + if ( -num <= i && i <= num ) { + continue; + } + if ( i < - numgens || numgens < i ) { + ErrorQuit( "invalid entry %d in Tietze relator [%d]", + (Int)i, (Int)r ); + return 0; + } + ii = INT_INTOBJ( ptInvs[i] ); + if ( !( (numObj == invObj + && ptRel[(j2+1)%length] == INTOBJ_INT(ii)) + || (i == ii + && ptInvs[INT_INTOBJ(ptRel[(j1+length-1)%length])] + == ptRel[j2]) ) ) + { + if ( ii < 0 ) + ii = numgens - ii; + if ( ptRel[j2] != invObj ) + ii = ii + 2 * numgens; + if ( !SUM_INTOBJS(ptRes[ii],ptRes[ii],INTOBJ_INT(1)) ) { + ErrorQuit( "integer overlow", 0L, 0L ); + return 0; + } + } + } + } + } + + return res; +} + + +/**************************************************************************** +** +*F FuncTzSearchC( , ) . find subword matches in Tietze relators +*/ +Obj FuncTzSearchC ( + Obj self, + Obj args ) +{ + Obj tietze; /* handle of the Tietze stack */ + Obj * ptTietze; /* pointer to this stack */ + Obj rels; /* handle of the relators list */ + Obj * ptRels; /* pointer to this list */ + Obj lens; /* handle of the lengths list */ + Obj * ptLens; /* pointer to this list */ + Obj invs; /* handle of the inverses list */ + Obj * ptInvs; /* pointer to this list */ + Obj flags; /* handle of the flags list */ + Obj * ptFlags; /* pointer to this list */ + Obj word; /* handle of the given relator */ + Obj lo; /* handle of current list relator */ + Obj wo; /* handle of a relator */ + Obj tmp; /* handle of the second argument */ + Obj equ; /* handle of the fifth argument */ + UInt1 keys1[8192]; /* hash table of key values */ + UInt1 keys2[8192]; /* hash table of key values */ + UInt1 keys3[8192]; /* hash table of key values */ + UInt inv; /* inverse for key computation */ + UInt key; /* key value of subword */ + Int4 numgens; /* number of Tietze generators */ + Int4 numrels; /* number of Tietze relators */ + Int4 total; /* total length of relators */ + Obj * ptr; /* pointer to a relator */ + Obj * v; /* pointers into relators */ + Obj * w; /* pointers into relators */ + Obj * ptx; /* pointers into relators */ + Obj * pty; /* pointers into relators */ + Int4 i1, j1; /* loop variables */ + Int4 i2, j2; /* loop variables */ + Int4 i3, j3; /* loop variables */ + Int4 len1; /* relator length */ + Int4 lmin, lmax; /* bound for relator lengths */ + Int4 pos1, pos2; /* position of the given relator */ + Int4 xmax; /* position of the given relator */ + Int4 newflag, flag1; /* Tietze relator flags */ + Int4 xflag, yflag; /* Tietze relator flags */ + Int4 xlen, xlen1; /* length of the given relator */ + Int4 mlen; /* length of the wanted match */ + Int4 ylen, ylen1; /* length of the current relator */ + Int4 newlen; /* length of a new relator */ + Int4 n, m; /* subword lengths */ + Int4 count; /* number of altered relators */ + Int4 i, j, jj, x, y; /* loop variables */ + Int4 lasty; /* flag */ + Int4 altered; /* flag */ + Int4 equal; /* flag */ + + /* get and check arguments */ + if ( ! IS_LIST(args) || 4 < LEN_LIST(args) || LEN_LIST(args) < 3 ) { + ErrorQuit( + "usage: TzSearchC( , , [, ] )", + 0L, 0L ); + return 0; + } + + /* check the first argument (Tietze stack) */ + tietze = ELM_LIST( args, 1 ); + CheckTietzeStack( tietze, &ptTietze ); + + /* get and check the Tietze relators list */ + CheckTietzeRelators( ptTietze, &rels, &ptRels, &numrels ); + + /* get and check the Tietze lengths list */ + CheckTietzeLengths( ptTietze, numrels, &lens, &ptLens ); + + /* get and check the Tietze flags list */ + CheckTietzeFlags( ptTietze, numrels, &flags, &ptFlags ); + + /* check list to contain the relator lengths */ + CheckTietzeRelLengths( ptTietze, ptRels, ptLens, numrels, &total ); + + /* get and check the Tietze inverses list */ + CheckTietzeInverses( ptTietze, &invs, &ptInvs, &numgens ); + + /* check the second argument */ + tmp = ELM_LIST( args, 2 ); + if ( ! IS_INTOBJ(tmp) ) { + ErrorQuit( " must be a posititve int", 0L ,0L ); + return 0; + } + pos1 = INT_INTOBJ(tmp); + if ( pos1 > numrels ) { + ErrorQuit( " out of range: %d", (Int)pos1, 0L ); + return 0; + } + + /* check the third argument */ + tmp = ELM_LIST( args, 3 ); + if ( ! IS_INTOBJ(tmp) ) { + ErrorQuit( " must be a posititve int", 0L ,0L ); + return 0; + } + pos2 = INT_INTOBJ(tmp); + if ( pos2 > numrels ) { + ErrorQuit( " out of range: %d", (Int)pos2, 0L ); + return 0; + } + + /* check the fourth argument */ + if ( LEN_LIST(args) == 3 ) { + equ = False; + } + else { + equ = ELM_LIST( args, 4 ); + if ( equ != False && equ != True ) { + ErrorQuit( " must be false or true", 0L, 0L ); + return 0; + } + } + equal = ( equ == True ); + + /* Skip relators of inconvenient lengths or with inconvenient flags, */ + /* and return if the remaining range is empty */ + while ( pos1 <= pos2 + && (INT_INTOBJ( ptLens[pos1] ) < 2 + || INT_INTOBJ( ptFlags[pos1] ) > 1 + || (equal && ( INT_INTOBJ( ptLens[pos1] ) < 4 + || INT_INTOBJ( ptLens[pos1] ) % 2 == 1 ) ) ) ) + { + pos1++; + } + if ( pos1 > pos2 || pos1 == numrels ) { + return INTOBJ_INT(0); + } + + /* get the range of compatible relator lengths */ + len1 = INT_INTOBJ( ptLens[pos1] ); + lmin = len1 - ( len1 % 2 ); + lmax = ( equal ) ? lmin : lmin + 1; + + /* initialize some variables */ + newflag = ( equal ) ? 1 : 2; + count = 0; + lasty = 0; + xmax = pos1 - 1; + flag1 = INT_INTOBJ( ptFlags[pos1] ); + + /* Compute the length of the wanted match and the corresponding */ + /* inverse factor */ + mlen = equal ? ( lmin + 1 ) / 2 : lmin / 2 + 1; + inv = 1; + for ( i = 1; i <= mlen; i++ ) + inv = 109109 * inv; + + /* initialize the hash table */ + for ( i = 0; i < 2048; i++ ) + ((UInt4 *)keys1)[i] = ((UInt4 *)keys2)[i] = ((UInt4 *)keys3)[i] = 0; + + /* loop over the Tietze relators, starting at position pos1 */ + for ( y = pos1; y < numrels; ) { + word = ptRels[y]; + ylen = INT_INTOBJ( ptLens[y] ); + yflag = INT_INTOBJ( ptFlags[y] ); + if ( y <= pos2 && lmin <= ylen && ylen <= lmax && yflag <= 1 ) { + + /* add the key values of the current relator to the hash table */ + ptr = ADDR_OBJ(word); + + key = 0; + + for ( i = 0, w = ptr+1; i < mlen; i++, w++ ) + key = 109109 * key + ((UInt)*w >> 2); + + for ( i = 0, v = ptr+1, w = v+mlen; i < ylen; i++, v++, w++ ) { + keys1[ key & 8191 ] = 1; + keys2[ (key >> 11) & 8191 ] |= (1 << ((key >> 8) & 7)); + keys3[ (key >> 19) & 8191 ] |= (1 << ((key >> 16) & 7)); + if ( i == ylen-mlen ) + w = ptr+1; + key = 109109 * key - inv * ((UInt)*v >> 2) + ((UInt)*w >> 2); + } + + key = 0; + + for ( i = 0, w = ptr+ylen; i < mlen; i++, w-- ) { + key = 109109 * key + ((UInt) ptInvs[INT_INTOBJ(*w)] >> 2); + } + + for ( i = 0, v = ptr+ylen, w = v-mlen; i < ylen; i++, v--, w-- ) { + keys1[ key & 8191 ] = 1; + keys2[ (key >> 11) & 8191 ] |= (1 << ((key >> 8) & 7)); + keys3[ (key >> 19) & 8191 ] |= (1 << ((key >> 16) & 7)); + if ( i == ylen-mlen ) + w = ptr+ylen; + key = 109109 * key + - inv * ((UInt) ptInvs[INT_INTOBJ(*v)] >> 2) + + ( (UInt) ptInvs[INT_INTOBJ(*w)] >> 2 ); + } + if ( len1 > ylen ) + len1 = ylen; + if ( flag1 < yflag ) + flag1 = yflag; + xmax = y; + } + + /* move to next relator */ + y++; + + /* initialize some variables */ + lo = ptRels[y]; + ylen = INT_INTOBJ( ptLens[y] ); + yflag = INT_INTOBJ( ptFlags[y] ); + ylen1 = ylen - 1; + altered = 0; + + /* Loop to the next relator, if the current relator is too short */ + if ( y > lasty + && (ylen < len1 || yflag > 1 || (!equal && !(yflag + flag1)) ) ) + { + continue; /* loop over y */ + } + lasty = y; + + /* Compute the key values of the current relator */ + ptr = ADDR_OBJ(lo); + + key = 0; + + for ( j = 0, w = ptr+1; j < mlen; j++, w++ ) + key = 109109 * key + ( (UInt)*w >> 2 ); + + for ( j = 0; j < ylen; j++ ) { + + /* check for key match in the tables */ + if ( keys1[ key & 8191 ] + && (keys2[ (key >> 11) & 8191 ] & (1 << ((key >> 8) & 7))) + && (keys3[ (key >> 19) & 8191 ] & (1 << ((key >> 16) & 7))) ){ + + /* loop over the (relevant) given relators */ + for ( x = pos1; x <= xmax; x++ ) { + + wo = ptRels[x]; + xlen = INT_INTOBJ( ptLens[x] ); + xflag = INT_INTOBJ( ptFlags[x] ); + if ( xlen < len1 || xlen > lmax || xlen > ylen + || xflag > 1 || (!equal && !( xflag + yflag )) ) + { + continue; /* loop over x */ + } + + xlen1 = xlen - 1; + ptx = ADDR_OBJ(wo) + 1; + pty = ADDR_OBJ(lo) + 1; + + /* loop over all possible positions in the given relator */ + for ( i = 0; i < xlen; i++ ) { + + /* search forward for a match of length at least mlen */ + i2 = i; j2 = j; + for ( n = 0; n < xlen; n++, + i2 = (i2 == xlen1) ? 0 : i2 + 1, + j2 = (j2 == ylen1) ? 0 : j2 + 1 ) { + if ( ptx[i2] != pty[j2] ) + break; /* loop over n */ + } + if ( n < mlen ) continue; /* loop over i */ + + /* search backward to find the whole match */ + i1 = (i == 0) ? xlen1 : i - 1; + j1 = (j == 0) ? ylen1 : j - 1; + for ( ; n < xlen; n++, + i1 = (i1 == 0) ? xlen1 : i1 - 1, + j1 = (j1 == 0) ? ylen1 : j1 - 1 ) + { + if ( ptx[i1] != pty[j1] ) + break; /* loop over n */ + } + + /* replace a matching substring of equal length */ + if ( n == xlen - n ) { + j2 = j; + for ( m = 0; m < n; m++, + i1 = (i1 == 0) ? xlen1 : i1 - 1, + j2 = (j2 == ylen1) ? 0 : j2 + 1 ) + { + pty[j2] = ptInvs[INT_INTOBJ(ptx[i1])]; + } + + /* Now replace all exact occurrences of this string */ + /* in the current word (not relator) */ + i3 = (i + n) % xlen; + + for ( jj = 0; jj <= ylen - n; jj++ ) { + i2 = i; j2 = jj; + for ( m = 0; m < n; m++, + i2 = (i2 == xlen1) ? 0 : i2 + 1, + j2 = (j2 == ylen1) ? 0 : j2 + 1 ) { + if ( ptx[i2] != pty[j2] ) + break; /* loop over m */ + } + if ( m < n ) + continue; /* loop over jj */ + + i1 = (i == 0) ? xlen1 : i - 1; + if ( ptx[i1] == pty[(jj + ylen1) % ylen] || + ptx[i3] == pty[(jj + n) % ylen] ) + { + continue; /* loop over jj */ + } + + j2 = jj; + for ( m = 0; m < n; m++, + i1 = (i1 == 0) ? xlen1 : i1 - 1, + j2 = (j2 == ylen1) ? 0 : j2 + 1 ) { + pty[j2] = ptInvs[INT_INTOBJ(ptx[i1])]; + } + + jj = -1; + } + + ptFlags[y] = INTOBJ_INT( newflag ); + altered = 1; + ++count; + break; /* loop over i */ + } + + m = ylen - n; n = xlen - n; + + /* find all canceling factors */ + if ( n == 0 ) { + for ( ; 1 < m; m -= 2, + j1 = (j1 == 0) ? ylen1 : j1 - 1, + j2 = (j2 == ylen1) ? 0 : j2 + 1 ) + { + if ( pty[j1] != ptInvs[INT_INTOBJ(pty[j2])] ) + break; /* loop over m */ + } + } + + /* create the modified relator and save it */ + newlen = m + n; + if ( j2 > 0 ) { + if ( j2 <= j1 ) { + jj = 0; j3 = j1; j1 = m - 1; + } + else { + jj = j1 + n + 1; j3 = ylen - 1; + } + for ( ; j2 <= j3; ) { + pty[jj++] = pty[j2++]; + } + } + for ( ; n > 0; n--, i1 = (i1 == 0) ? xlen1 : i1 - 1 ) { + pty[++j1] = ptInvs[INT_INTOBJ(ptx[i1])]; + } + SET_LEN_PLIST( lo, newlen ); + ptLens[y] = INTOBJ_INT(newlen); + total = total - ylen + newlen; + ptFlags[y] = INTOBJ_INT(newflag); + + /* reduce the bag size */ + SHRINK_PLIST( lo, newlen ); + CHANGED_BAG(rels); + ptRels = ADDR_OBJ( rels ); + ptLens = ADDR_OBJ( lens ); + ptFlags = ADDR_OBJ( flags); + ptInvs = ADDR_OBJ( invs ) + (numgens + 1); + + altered = 1; + ++count; + --y; + break; /* loop over i */ + } + + if ( altered ) + break; /* loop over x */ + + /* now try the inverse of the given relator */ + for ( i = 0; i < xlen; i++ ) { + + /* search forward for a match of length at least mlen */ + i2 = xlen1 - i; j2 = j; + for ( n = 0; n < xlen; n++, + i2 = (i2 == 0) ? xlen1 : i2 - 1, + j2 = (j2 == ylen1) ? 0 : j2 + 1 ) + { + if ( ptInvs[INT_INTOBJ(ptx[i2])] != pty[j2] ) + break; /* loop over n */ + } + if ( n < mlen ) + continue; /* loop over i */ + + /* search backward to find the whole match */ + i1 = (i == 0) ? 0 : xlen - i; + j1 = (j == 0) ? ylen1 : j - 1; + for ( ; n < xlen; n++, + i1 = (i1 == xlen1) ? 0 : i1 + 1, + j1 = (j1 == 0) ? ylen1 : j1 - 1 ) + { + if ( ptInvs[INT_INTOBJ(ptx[i1])] != pty[j1] ) + break; /* loop over n */ + } + + /* replace a matching substring of equal length */ + if ( n == xlen - n ) { + j2 = j; + for ( m = 0; m < n; m++, + i1 = (i1 == xlen1) ? 0 : i1 + 1, + j2 = (j2 == ylen1) ? 0 : j2 + 1 ) + { + pty[j2] = ptx[i1]; + } + + ptFlags[y] = INTOBJ_INT( newflag ); + altered = 1; + ++count; + break; /* loop over i */ + } + + m = ylen - n; n = xlen - n; + + /* Find all canceling factors */ + if ( n == 0 ) { + for ( ; 1 < m; m -= 2, + j1 = (j1 == 0) ? ylen1 : j1 - 1, + j2 = (j2 == ylen1) ? 0 : j2 + 1 ) + { + if ( pty[j1] != ptInvs[INT_INTOBJ(pty[j2])] ) + break; /* loop over m */ + } + } + + /* create the modified relator and save it */ + newlen = m + n; + if ( j2 > 0 ) { + if ( j2 <= j1 ) { + jj = 0; j3 = j1; j1 = m - 1; + } + else { + jj = j1 + n + 1; j3 = ylen - 1; + } + for ( ; j2 <= j3; ) { + pty[jj++] = pty[j2++]; + } + } + for ( ; n > 0; n--, i1 = (i1 == xlen1) ? 0 : i1 + 1 ) { + pty[++j1] = ptx[i1]; + } + SET_LEN_PLIST( lo, newlen ); + ptLens[y] = INTOBJ_INT(newlen); + total = total - ylen + newlen; + ptFlags[y] = INTOBJ_INT(newflag); + + /* reduce the bag size */ + SHRINK_PLIST( lo, newlen ); + CHANGED_BAG(rels); + ptRels = ADDR_OBJ( rels ); + ptLens = ADDR_OBJ( lens ); + ptFlags = ADDR_OBJ( flags); + ptInvs = ADDR_OBJ( invs ) + numgens + 1; + + altered = 1; + ++count; + --y; + break; /* loop over i */ + } + + if ( altered ) + break; /* loop over x */ + } + } + + if ( altered ) + break; /* loop over j */ + + v = ptr + ( 1 + j ); + w = ptr + ( 1 + ( j + mlen ) % ylen ); + key = 109109 * key - inv * ( (UInt)*v >> 2 ) + + ( (UInt)*w >> 2 ); + } + } + + ADDR_OBJ( tietze )[TZ_TOTAL] = INTOBJ_INT(total); + + /* return the number of altered relators */ + return INTOBJ_INT( count ); +} + + +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + +*F SetupTietze() . . . . . . . . . . . . . . . initialize the tietze package +*/ +void SetupTietze ( void ) +{ +} + + +/**************************************************************************** +** +*F InitTietze() . . . . . . . . . . . . . . . initialize the tietze package +** +** 'InitTietze' initializes the Tietze package. +*/ +void InitTietze ( void ) +{ + C_NEW_GVAR_FUNC( "TzSortC", 1, "tietze", + FuncTzSortC, + "src/tietze.c:TzSortC" ); + + C_NEW_GVAR_FUNC( "TzRenumberGens", 1, "tietze", + FuncTzRenumberGens, + "src/tietze.c:TzRenumberGens" ); + + C_NEW_GVAR_FUNC( "TzReplaceGens", 1, "tietze", + FuncTzReplaceGens, + "src/tietze.c:TzReplaceGens" ); + + C_NEW_GVAR_FUNC( "TzSubstituteGen", 3, "tietze, gennum, word", + FuncTzSubstituteGen, + "src/tietze.c:TzSubstituteGen" ); + + C_NEW_GVAR_FUNC( "TzOccurrences", -1, "args", + FuncTzOccurrences, + "src/tietze.c:TzOccurrences" ); + + C_NEW_GVAR_FUNC( "TzOccurrencesPairs", -1, "args", + FuncTzOccurrencesPairs, + "src/tietze.c:TzOccurrencesPairs" ); + + C_NEW_GVAR_FUNC( "TzSearchC", -1, "args", + FuncTzSearchC, + "src/tietze.c:TzSearchC" ); + +} + + +/**************************************************************************** +** +*F CheckTietze() . . . . . . . . . . . . . . . initialize the tietze package +*/ +void CheckTietze ( void ) +{ + SET_REVISION( "tietze_c", Revision_tietze_c ); + SET_REVISION( "tietze_h", Revision_tietze_h ); +} + + +/**************************************************************************** +** + +*E tietze.c . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/tietze.h b/src/tietze.h new file mode 100644 index 0000000000..58e5ae4e09 --- /dev/null +++ b/src/tietze.h @@ -0,0 +1,55 @@ +/**************************************************************************** +** +*W tietze.h GAP source Volkmar Felsch +** +*H @(#)$Id$ +** +*Y Copyright 1990-1992, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany +** +** This file defines the functions for computing with finite presentations. +*/ +#ifdef INCLUDE_DECLARATION_PART +SYS_CONST char * Revision_tietze_h = + "@(#)$Id$"; +#endif + + +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + +/**************************************************************************** +** + +*F SetupTietze() . . . . . . . . . . . . . . . initialize the tietze package +*/ +extern void SetupTietze ( void ); + + +/**************************************************************************** +** +*F InitTietze() . . . . . . . . . . . . . . . initialize the tietze package +** +** 'InitTietze' initializes the Tietze package. +*/ +extern void InitTietze ( void ); + + +/**************************************************************************** +** +*F CheckTietze() . . . . . . . . . . . . . . . initialize the tietze package +*/ +extern void CheckTietze ( void ); + + +/**************************************************************************** +** + +*E tietze.h . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ + + + + diff --git a/src/vars.c b/src/vars.c index 3c955891e4..b1622e0990 100644 --- a/src/vars.c +++ b/src/vars.c @@ -15,39 +15,42 @@ ** locals), higher variables (i.e., local variables of enclosing functions), ** global variables, list elements, and record elements. */ -char * Revision_vars_c = +#include "system.h" /* system dependent part */ + +SYS_CONST char * Revision_vars_c = "@(#)$Id$"; -#include "system.h" /* Ints, UInts */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ -#include "gasman.h" /* NewBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, types */ -#include "scanner.h" /* Pr */ +#include "gap.h" /* error handling, initialisation */ -#include "gvars.h" /* AssGVar, GVarName */ +#include "gvars.h" /* global variables */ -#include "calls.h" /* NAMI_FUNC, ENVI_FUNC */ +#include "calls.h" /* generic call mechanism */ -#include "records.h" /* ASS_REC, UNB_REC, ELM_REC */ -#include "lists.h" /* generic lists package */ +#include "records.h" /* generic records */ +#include "lists.h" /* generic lists */ -#include "bool.h" /* True, False */ +#include "bool.h" /* booleans */ -#include "precord.h" /* AssPRec, UnbPRec, ElmPRec, ... */ +#include "precord.h" /* plain records */ -#include "plist.h" /* ELM_PLIST, SET_ELM_PLIST, ... */ -#include "string.h" /* CSTR_STRING used by NAME_RNAM */ +#include "plist.h" /* plain lists */ +#include "string.h" /* strings */ -#include "code.h" /* Stat, Expr, TNUM_EXPR, ADDR_E...*/ +#include "code.h" /* coder */ #define INCLUDE_DECLARATION_PART -#include "vars.h" /* declaration part of the package */ +#include "vars.h" /* variables */ #undef INCLUDE_DECLARATION_PART -#include "exprs.h" /* EVAL_EXPR, EvalExprFuncs */ -#include "stats.h" /* EXEC_STAT, ExecStatFuncs */ +#include "exprs.h" /* expressions */ +#include "stats.h" /* statements */ -#include "gap.h" /* Error */ +#include "gap.h" /* error handling, initialisation */ +#include "saveload.h" /* saving and loading */ /**************************************************************************** @@ -1291,7 +1294,7 @@ UInt ExecAssList ( while ( ! IS_INTOBJ(pos) || INT_INTOBJ(pos) <= 0 ) { pos = ErrorReturnObj( "List Assignment: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(pos)].name), 0L, + (Int)TNAM_OBJ(pos), 0L, "you can return a positive integer for " ); } p = INT_INTOBJ(pos); @@ -1353,7 +1356,7 @@ UInt ExecAsssList ( if ( ! IS_DENSE_LIST( rhss ) ) { rhss = ErrorReturnObj( "List Assignment: must be a dense list (not a %s)", - (Int)(InfoBags[TNUM_OBJ(rhss)].name), 0L, + (Int)TNAM_OBJ(rhss), 0L, "you can return a dense list for " ); } else /* if ( LEN_LIST( poss ) != LEN_LIST( rhss ) ) */ { @@ -1405,7 +1408,7 @@ UInt ExecAssListLevel ( while ( ! IS_INTOBJ(pos) || INT_INTOBJ(pos) <= 0 ) { pos = ErrorReturnObj( "List Assignment: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(pos)].name), 0L, + (Int)TNAM_OBJ(pos), 0L, "you can return a positive integer for " ); } p = INT_INTOBJ(pos); @@ -1497,7 +1500,7 @@ UInt ExecUnbList ( while ( ! IS_INTOBJ(pos) || INT_INTOBJ(pos) <= 0 ) { pos = ErrorReturnObj( "List Assignment: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(pos)].name), 0L, + (Int)TNAM_OBJ(pos), 0L, "you can return a positive integer for " ); } p = INT_INTOBJ(pos); @@ -1533,7 +1536,7 @@ Obj EvalElmList ( while ( ! IS_INTOBJ(pos) || INT_INTOBJ(pos) <= 0 ) { pos = ErrorReturnObj( "List Element: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(pos)].name), 0L, + (Int)TNAM_OBJ(pos), 0L, "you can return a positive integer for " ); } p = INT_INTOBJ( pos ); @@ -1623,7 +1626,7 @@ Obj EvalElmListLevel ( while ( ! IS_INTOBJ(pos) || INT_INTOBJ(pos) <= 0 ) { pos = ErrorReturnObj( "List Element: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(pos)].name), 0L, + (Int)TNAM_OBJ(pos), 0L, "you can return a positive integer for " ); } p = INT_INTOBJ( pos ); @@ -1706,7 +1709,7 @@ Obj EvalIsbList ( while ( ! IS_INTOBJ(pos) || INT_INTOBJ(pos) <= 0 ) { pos = ErrorReturnObj( "List Element: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(pos)].name), 0L, + (Int)TNAM_OBJ(pos), 0L, "you can return a positive integer for " ); } p = INT_INTOBJ( pos ); @@ -2200,7 +2203,7 @@ UInt ExecAssPosObj ( while ( ! IS_INTOBJ(pos) || INT_INTOBJ(pos) <= 0 ) { pos = ErrorReturnObj( "PosObj Assignment: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(pos)].name), 0L, + (Int)TNAM_OBJ(pos), 0L, "you can return a positive integer for " ); } p = INT_INTOBJ(pos); @@ -2250,7 +2253,7 @@ UInt ExecUnbPosObj ( while ( ! IS_INTOBJ(pos) || INT_INTOBJ(pos) <= 0 ) { pos = ErrorReturnObj( "PosObj Assignment: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(pos)].name), 0L, + (Int)TNAM_OBJ(pos), 0L, "you can return a positive integer for " ); } p = INT_INTOBJ(pos); @@ -2293,7 +2296,7 @@ Obj EvalElmPosObj ( while ( ! IS_INTOBJ(pos) || INT_INTOBJ(pos) <= 0 ) { pos = ErrorReturnObj( "PosObj Element: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(pos)].name), 0L, + (Int)TNAM_OBJ(pos), 0L, "you can return a positive integer for " ); } p = INT_INTOBJ( pos ); @@ -2348,7 +2351,7 @@ Obj EvalIsbPosObj ( while ( ! IS_INTOBJ(pos) || INT_INTOBJ(pos) <= 0 ) { pos = ErrorReturnObj( "PosObj Element: must be a positive integer (not a %s)", - (Int)(InfoBags[TNUM_OBJ(pos)].name), 0L, + (Int)TNAM_OBJ(pos), 0L, "you can return a positive integer for " ); } p = INT_INTOBJ( pos ); @@ -2849,23 +2852,72 @@ void VarsAfterCollectBags ( void ) PtrGVars = PTR_BAG( ValGVars ); } +/**************************************************************************** +** +*F SaveLVars ( ) +** +*/ + +void SaveLVars( Obj lvars ) +{ + UInt len,i; + Obj *ptr; + SaveSubObj(ADDR_OBJ(lvars)[0]); + SaveUInt((UInt)ADDR_OBJ(lvars)[1]); + SaveSubObj(ADDR_OBJ(lvars)[2]); + len = (SIZE_OBJ(lvars) - (2*sizeof(Obj)+sizeof(UInt)))/sizeof(Obj); + ptr = ADDR_OBJ(lvars)+3; + for (i = 0; i < len; i++) + SaveSubObj(*ptr++); + return; +} /**************************************************************************** ** +*F LoadLVars ( ) +** +*/ -*F InitVars() . . . . . . . . . . . . . . . . initialize variables package +void LoadLVars( Obj lvars ) +{ + UInt len,i; + Obj *ptr; + ADDR_OBJ(lvars)[0] = LoadSubObj(); + ((UInt *)ADDR_OBJ(lvars))[1] = LoadUInt(); + ADDR_OBJ(lvars)[2] = LoadSubObj(); + len = (SIZE_OBJ(lvars) - (2*sizeof(Obj)+sizeof(UInt)))/sizeof(Obj); + ptr = ADDR_OBJ(lvars)+3; + for (i = 0; i < len; i++) + *ptr++ = LoadSubObj(); + return; +} + +/**************************************************************************** ** -** 'InitVars' initializes the variables package. + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + +*F SetupVars() . . . . . . . . . . . . . . . . initialize variables package */ -void InitVars ( ) +void SetupVars ( void ) { UInt i; /* loop variable */ - Obj tmp; /* install the marking functions for local variables bag */ InfoBags[ T_LVARS ].name = "values bag"; InitMarkFuncBags( T_LVARS , MarkAllSubBags ); + + /* and the save restore functions */ + SaveObjFuncs[ T_LVARS ] = SaveLVars; + LoadObjFuncs[ T_LVARS ] = LoadLVars; + + /* install executors, evaluators, and printers for local variables */ ExecStatFuncs [ T_ASS_LVAR ] = ExecAssLVar; ExecStatFuncs [ T_ASS_LVAR_01 ] = ExecAssLVar01; @@ -2904,17 +2956,22 @@ void InitVars ( ) EvalExprFuncs [ T_REF_LVAR_16 ] = EvalRefLVar16; EvalExprFuncs [ T_ISB_LVAR ] = EvalIsbLVar; PrintStatFuncs[ T_ASS_LVAR ] = PrintAssLVar; + for ( i = T_ASS_LVAR_01; i <= T_ASS_LVAR_16; i++ ) { PrintStatFuncs[ i ] = PrintAssLVar; } + PrintStatFuncs[ T_UNB_LVAR ] = PrintUnbLVar; PrintExprFuncs[ T_REFLVAR ] = PrintRefLVar; PrintExprFuncs[ T_REF_LVAR ] = PrintRefLVar; + for ( i = T_REF_LVAR_01; i <= T_REF_LVAR_16; i++ ) { PrintExprFuncs[ i ] = PrintRefLVar; } + PrintExprFuncs[ T_ISB_LVAR ] = PrintIsbLVar; + /* install executors, evaluators, and printers for higher variables */ ExecStatFuncs [ T_ASS_HVAR ] = ExecAssHVar; ExecStatFuncs [ T_UNB_HVAR ] = ExecUnbHVar; @@ -2925,6 +2982,7 @@ void InitVars ( ) PrintExprFuncs[ T_REF_HVAR ] = PrintRefHVar; PrintExprFuncs[ T_ISB_HVAR ] = PrintIsbHVar; + /* install executors, evaluators, and printers for global variables */ ExecStatFuncs [ T_ASS_GVAR ] = ExecAssGVar; ExecStatFuncs [ T_UNB_GVAR ] = ExecUnbGVar; @@ -2935,6 +2993,7 @@ void InitVars ( ) PrintExprFuncs[ T_REF_GVAR ] = PrintRefGVar; PrintExprFuncs[ T_ISB_GVAR ] = PrintIsbGVar; + /* install executors, evaluators, and printers for list elements */ ExecStatFuncs [ T_ASS_LIST ] = ExecAssList; ExecStatFuncs [ T_ASSS_LIST ] = ExecAsssList; @@ -2957,6 +3016,7 @@ void InitVars ( ) PrintExprFuncs[ T_ELMS_LIST_LEV ] = PrintElmsList; PrintExprFuncs[ T_ISB_LIST ] = PrintIsbList; + /* install executors, evaluators, and printers for record elements */ ExecStatFuncs [ T_ASS_REC_NAME ] = ExecAssRecName; ExecStatFuncs [ T_ASS_REC_EXPR ] = ExecAssRecExpr; @@ -2975,6 +3035,7 @@ void InitVars ( ) PrintExprFuncs[ T_ISB_REC_NAME ] = PrintIsbRecName; PrintExprFuncs[ T_ISB_REC_EXPR ] = PrintIsbRecExpr; + /* install executors, evaluators, and printers for list elements */ ExecStatFuncs [ T_ASS_POSOBJ ] = ExecAssPosObj; ExecStatFuncs [ T_UNB_POSOBJ ] = ExecUnbPosObj; @@ -2985,6 +3046,7 @@ void InitVars ( ) PrintExprFuncs[ T_ELM_POSOBJ ] = PrintElmPosObj; PrintExprFuncs[ T_ISB_POSOBJ ] = PrintIsbPosObj; + /* install executors, evaluators, and printers for record elements */ ExecStatFuncs [ T_ASS_COMOBJ_NAME ] = ExecAssComObjName; ExecStatFuncs [ T_ASS_COMOBJ_EXPR ] = ExecAssComObjExpr; @@ -3003,19 +3065,48 @@ void InitVars ( ) PrintExprFuncs[ T_ISB_COMOBJ_NAME ] = PrintIsbComObjName; PrintExprFuncs[ T_ISB_COMOBJ_EXPR ] = PrintIsbComObjExpr; + /* install before and after actions for garbage collections */ InitCollectFuncBags( VarsBeforeCollectBags, VarsAfterCollectBags ); +} + + +/**************************************************************************** +** +*F InitVars() . . . . . . . . . . . . . . . . initialize variables package +** +** 'InitVars' initializes the variables package. +*/ +void InitVars ( void ) +{ + Obj tmp; /* make 'CurrLVars' known to Gasman */ - InitGlobalBag( &CurrLVars, "vars: current LVars" ); - InitGlobalBag( &BottomLVars, "vars: bottom LVars" ); - BottomLVars = NewBag( T_LVARS, 3*sizeof(Obj) ); - CurrLVars = BottomLVars; - tmp = NewFunctionC( "bottom", 0, "", 0 ); - PTR_BAG(BottomLVars)[0] = tmp; - tmp = NewBag( T_BODY, 0 ); - BODY_FUNC( PTR_BAG(BottomLVars)[0] ) = tmp; - SWITCH_TO_OLD_LVARS( BottomLVars ); + InitGlobalBag( &CurrLVars, "src/vars.c:CurrLVars" ); + InitGlobalBag( &BottomLVars, "src/vars.c:BottomLVars" ); + if ( ! SyRestoring ) { + BottomLVars = NewBag( T_LVARS, 3*sizeof(Obj) ); + CurrLVars = BottomLVars; + tmp = NewFunctionC( "bottom", 0, "", 0 ); + PTR_BAG(BottomLVars)[0] = tmp; + tmp = NewBag( T_BODY, 0 ); + BODY_FUNC( PTR_BAG(BottomLVars)[0] ) = tmp; + SWITCH_TO_OLD_LVARS( BottomLVars ); + } + else { + Pr( "#W check `InitVars' in \"vars.c\"\n", 0L, 0L ); + } +} + + +/**************************************************************************** +** +*F CheckVars() . . . . . . check the initialisation of the variables package +*/ +void CheckVars ( void ) +{ + SET_REVISION( "vars_c", Revision_vars_c ); + SET_REVISION( "vars_h", Revision_vars_h ); } diff --git a/src/vars.h b/src/vars.h index 272cff7e60..5f456111d0 100644 --- a/src/vars.h +++ b/src/vars.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A vars.h GAP source Martin Schoenert +*W vars.h GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -16,13 +16,14 @@ ** global variables, list elements, and record elements. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_vars_h = +SYS_CONST char * Revision_vars_h = "@(#)$Id$"; #endif /**************************************************************************** ** + *S T_LVARS . . . . . . . . . . . . . . . . symbolic name for lvars bag type ** ** 'T_LVARS' is the type of bags used to store values of local variables. @@ -208,13 +209,39 @@ extern Char * NAME_HVAR ( UInt hvar ); +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + +*F SetupVars() . . . . . . . . . . . . . . . . initialize variables package +*/ +extern void SetupVars ( void ); + + /**************************************************************************** ** *F InitVars() . . . . . . . . . . . . . . . . initialize variables package ** ** 'InitVars' initializes the variables package. */ -extern void InitVars ( void ); +extern void InitVars ( void ); + + +/**************************************************************************** +** +*F CheckVars() . . . . . . check the initialisation of the variables package +*/ +extern void CheckVars ( void ); +/**************************************************************************** +** +*E vars.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/vector.c b/src/vector.c index 530d12a6bb..25623e7f41 100644 --- a/src/vector.c +++ b/src/vector.c @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A vector.c GAP source Martin Schoenert +*W vector.c GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -15,37 +15,42 @@ ** in the {\GAP} manual. Read also about "More about Vectors" about the ** vector flag and the compact representation of vectors over finite fields. */ -char * Revision_vector_c = +#include "system.h" /* system dependent part */ + +SYS_CONST char * Revision_vector_c = "@(#)$Id$"; -#include "system.h" /* system dependent functions */ +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ +#include "scanner.h" /* scanner */ -#include "gasman.h" /* NewBag, ResizeBag, CHANGED_BAG */ -#include "objects.h" /* Obj, TNUM_OBJ, SIZE_OBJ, ... */ -#include "scanner.h" /* Pr */ +#include "gap.h" /* error handling, initialisation */ -#include "ariths.h" /* generic operations package */ -#include "lists.h" /* generic list package */ +#include "ariths.h" /* basic arithmetic */ +#include "lists.h" /* generic lists */ -#include "bool.h" /* True, False */ +#include "bool.h" /* booleans */ -#include "integer.h" /* _INTOBJS for fast ariths */ +#include "integer.h" /* integers */ -#include "listoper.h" /* ProdListScl */ +#include "records.h" /* generic records */ +#include "precord.h" /* plain records */ -#include "plist.h" /* GET_LEN_PLIST, GET_ELM_PLIST,...*/ +#include "lists.h" /* generic lists */ +#include "listoper.h" /* operations for generic lists */ +#include "plist.h" /* plain lists */ +#include "string.h" /* strings */ #define INCLUDE_DECLARATION_PART -#include "vector.h" /* declaration part of the package */ +#include "vector.h" /* functions for plain vectors */ #undef INCLUDE_DECLARATION_PART -#include "range.h" /* GET_LEN_RANGE, GET_LOW_RANGE,...*/ - -#include "gap.h" /* Error */ +#include "range.h" /* ranges */ /**************************************************************************** ** + *F IsXTNumEmpty() . test if a list is an empty list (almost a vector) */ Int IsXTNumEmpty ( @@ -761,11 +766,17 @@ Obj ProdVectorMatrix ( /**************************************************************************** ** -*F InitVector() . . . . . . . . . . . . . . . . . initialize vector package + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** ** -** 'InitVector' initializes the vector package. + +*F SetupVector() . . . . . . . . . . . . . . . initialize the vector package */ -void InitVector ( void ) +void SetupVector ( void ) { Int t1; Int t2; @@ -793,4 +804,30 @@ void InitVector ( void ) } +/**************************************************************************** +** +*F InitVector() . . . . . . . . . . . . . . . initialize the vector package +** +** 'InitVector' initializes the vector package. +*/ +void InitVector ( void ) +{ +} + + +/**************************************************************************** +** +*F CheckVector() . . . . . . check the initialisation of the vector package +*/ +void CheckVector ( void ) +{ + SET_REVISION( "vector_c", Revision_vector_c ); + SET_REVISION( "vector_h", Revision_vector_h ); +} + +/**************************************************************************** +** + +*E vector.c . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/vector.h b/src/vector.h index 1aaa4e86b8..3377f69979 100644 --- a/src/vector.h +++ b/src/vector.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -*A vector.h GAP source Martin Schoenert +*W vector.h GAP source Martin Schoenert ** *H @(#)$Id$ ** @@ -27,18 +27,44 @@ ** is just that the kernel does not known this. */ #ifdef INCLUDE_DECLARATION_PART -char * Revision_vector_h = +SYS_CONST char * Revision_vector_h = "@(#)$Id$"; #endif /**************************************************************************** ** -*F InitVector() . . . . . . . . . . . . . . . . . initialize vector package + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + +*F SetupVector() . . . . . . . . . . . . . . . initialize the vector package +*/ +extern void SetupVector ( void ); + + +/**************************************************************************** +** +*F InitVector() . . . . . . . . . . . . . . . initialize the vector package ** ** 'InitVector' initializes the vector package. */ -extern void InitVector ( void ); +extern void InitVector ( void ); + + +/**************************************************************************** +** +*F CheckVector() . . . . . . check the initialisation of the vector package +*/ +extern void CheckVector ( void ); +/**************************************************************************** +** +*E vector.h . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/weakptr.c b/src/weakptr.c new file mode 100644 index 0000000000..b10c74ae11 --- /dev/null +++ b/src/weakptr.c @@ -0,0 +1,626 @@ +/**************************************************************************** +** +*W weakptr.c GAP source Steve Linton +** +*H @(#)$Id$ +** +*Y Copyright (C) 1997, School of Mathematical and Computational Sciences, +*Y University of St Andrews, Scotland +** +** This file contains the functions that deal with weak pointer objects +** A weak pointer object looks like a plain list, except that its entries +** are NOT kept alive through a garbage collection (unless they are contained +** in some other kind of object). +*/ +#include "system.h" /* system dependent part */ + +SYS_CONST char * Revision_weakptr_c = + "@(#)$Id$"; + +#include "gasman.h" /* garbage collector */ +#include "objects.h" /* objects */ + +#include "gap.h" /* error handling, initialisation */ + +#include "gvars.h" /* global variables */ + +#include "bool.h" /* booleans */ + +#define INCLUDE_DECLARATION_PART +#include "weakptr.h" /* weak pointers */ +#undef INCLUDE_DECLARATION_PART + +#include "lists.h" /* generic lists */ +#include "plist.h" /* plain lists */ + +#include "gap.h" /* error handling, initialisation */ +#include "calls.h" /* generic call mechanism */ +#include "saveload.h" /* saving and loading */ +#include "opers.h" /* generic operations */ + + +/**************************************************************************** +** + +*F GROW_WPOBJ(,) . make sure a weak pointer object is large enough +** +** 'GROW_WPOBJ' grows the weak pointer object if necessary to +** ensure that it has room for at least elements. +** +** Note that 'GROW_WPOBJ' is a macro, so do not call it with arguments that +** have sideeffects. */ + +#define GROW_WPOBJ(wp,plen) ((plen) < SIZE_OBJ(wp)/sizeof(Obj) ? \ + 0L : GrowWPObj(wp,plen) ) + +Int GrowWPObj ( + Obj wp, + UInt need ) +{ + UInt plen; /* new physical length */ + UInt good; /* good new physical length */ + + /* find out how large the object should become */ + good = 5 * (SIZE_OBJ(wp)/sizeof(Obj)-1) / 4 + 4; + + /* but maybe we need more */ + if ( need < good ) { plen = good; } + else { plen = need; } + + /* resize the plain list */ + ResizeBag( wp, ((plen)+1)*sizeof(Obj) ); + + /* return something (to please some C compilers) */ + return 0L; +} + + +/**************************************************************************** +** +*F STORE_LEN_WPOBJ(,) . . . . . . . set the length of a WP object +** +** 'STORE_LEN_WPOBJ' sets the length of the WP object to . +** +** Note that 'STORE_LEN_WPOBJ' is a macro, so do not call it with arguments +** that have sideeffects. +** +** Objects at the end of wp may evaporate, so the stored length can only +** be regarded as an upper bound. +*/ + +#define STORE_LEN_WPOBJ(wp,len) (ADDR_OBJ(wp)[0] = (Obj)(len)) + + +/**************************************************************************** +** +*F STORED_ LEN_WPOBJ(). . .. . . . . . . stored length of a WP Object +** +** 'STORED_LEN_WPOBJ' returns the stored length of the WP object +** as a C integer. +** +** Note that 'STORED_LEN_WPOBJ' is a macro, so do not call it +** with arguments that have sideeffects. +** +** Note that as the list can mutate under your feet, the length may be +** an overestimate +*/ + +#define STORED_LEN_WPOBJ(wp) ((Int)(ADDR_OBJ(wp)[0])) + +/**************************************************************************** +** +*F ELM_WPOBJ(,) . . . . . . . . . . . . . element of a WP object +** +** 'ELM_WPOBJ' return the -th element of the WP object . must +** be a positive integer less than or equal to the physical length of . +** If has no assigned element at position , 'ELM_WPOBJ' returns 0. +** +** If the entry died at a recent garbage collection, it will return a Bag ID +** for which IS_WEAK_DEAD_BAG will return 1 +** +** Note that 'ELM_WPOBJ' is a macro, so do not call it with arguments that +** have sideeffects. +** +** ELM_WPOBJ(,) is a valid lvalue and may be assigned to +*/ + +#define ELM_WPOBJ(list,pos) (ADDR_OBJ(list)[pos]) + + + +/**************************************************************************** +** +*F FuncWeakPointerObj( , ) . . . . . .make a weak pointer object +** +** Handler for the GAP function WeakPointerObject(), which makes a new +** WP object +*/ + +Obj FuncWeakPointerObj( Obj self, Obj list ) { + Obj wp; + Int i; + Int len; + len = LEN_LIST(list); + wp = (Obj) NewBag(T_WPOBJ, (len+1)*sizeof(Obj)); + STORE_LEN_WPOBJ(wp,len); + for (i = 1; i <= len ; i++) + { + ELM_WPOBJ(wp,i) = ELM0_LIST(list,i); + CHANGED_BAG(wp); /* this must be here in case list is + in fact an object and causes a GC in the + element access method */ + } + + return wp; +} + + +/**************************************************************************** +** +*F LengthWPObj() . . . . . . . . . . . . . . current length of WP Object +** +** 'LengthWPObj()' returns the current length of WP Object as a C +** integer the value cannot be trusted past a garbage collection, as +** trailing items may evaporate. +** +** Any identifiers of trailing objects that have evaporated in a garbage +** collection are cleaned up by this function +*/ + +Int LengthWPObj(Obj wp) +{ + Int len; + Obj elm; + Int changed = 0; + for (len = STORED_LEN_WPOBJ(wp); + len > 0 && + (!(elm = ELM_WPOBJ(wp,len)) || + IS_WEAK_DEAD_BAG(elm)); + len --) + { + changed = 1; + if (elm) + ELM_WPOBJ(wp,len) = 0; + } + if (changed) + STORE_LEN_WPOBJ(wp,len); + return len; +} + +/**************************************************************************** +** +*F FuncLengthWPObj() . . . . . . . . . . . . current length of WP Object +** +** 'FuncLengthWPObj()' is a handler for a GAP function that returns the +** current length of WP Object. The value cannot be trusted past a garbage +** collection, as trailing items may evaporate. +** +*/ + +Obj FuncLengthWPObj(Obj self, Obj wp) +{ + return INTOBJ_INT(LengthWPObj(wp)); +} + + +/**************************************************************************** +** +*F FuncSetElmWPObj(, , , ) . set an entry in a WP Object +** +** 'FuncSetElmWPObj(, , , )' is a handler for a GAP +** function that sets an entry in a WP object. +** +*/ + +Obj FuncSetElmWPObj(Obj self, Obj wp, Obj pos, Obj val) +{ + UInt ipos = INT_INTOBJ(pos); + if (LengthWPObj(wp) < ipos) + { + GROW_WPOBJ(wp, ipos); + STORE_LEN_WPOBJ(wp,ipos); + } + ELM_WPOBJ(wp,ipos) = val; + CHANGED_BAG(wp); + return 0; +} + +/**************************************************************************** +** +*F IsBoundElmWPObj( , ) . . . . . is an entry bound in a WP Object +** +** 'IsBoundElmWPObj( , )' returns 1 is there is (currently) a live +** value at position pos or the WP object wp and 0 otherwise, cleaning up a +** dead entry if there is one +** */ + + +Int IsBoundElmWPObj( Obj wp, Obj pos) +{ + UInt ipos = INT_INTOBJ(pos); + Obj elm; + if ( LengthWPObj(wp) < ipos ) + { + return 0; + } + elm = ELM_WPOBJ(wp,ipos); + if (IS_WEAK_DEAD_BAG(elm)) + { + ELM_WPOBJ(wp,ipos) = 0; + return 0; + } + if (elm == 0) + { + return 0; + } + return 1; +} + +/**************************************************************************** +** +*F FuncIsBoundElmWPObj( , , ) . . . . . . .IsBound WP Object +** +** GAP handler for IsBound test on WP Object. Remember that bindings can +** evaporate in any garbage collection. +*/ + + +Obj FuncIsBoundElmWPObj( Obj self, Obj wp, Obj pos) +{ + return IsBoundElmWPObj(wp, pos) ? True : False; +} + + +/**************************************************************************** +** +*F FuncUnbindElmWPObj( , , ) . . . . . . . .Unbind WP Object +** +** GAP handler for Unbind on WP Object. +*/ + +Obj FuncUnbindElmWPObj( Obj self, Obj wp, Obj pos) +{ + Int len = LengthWPObj(wp); + if ( INT_INTOBJ(pos) <= len ) { + ELM_WPOBJ( wp, INT_INTOBJ(pos)) = 0; + } + return 0; +} + +/**************************************************************************** +** +*F FuncElmWPObj( , , ) . . . . . . . . . . .Access WP Object +** +** GAP handler for access to WP Object. If the entry is not bound, then fail +** is returned. It would not be correct to return an error, because there +** would be no way to safely access an element, which might evaporate +** between a call to Isbound and the access. This, of course, causes +** possible confusion with a WP object which does have a value of fail +** stored in it. This, however can be checked with a subsequent call to +** IsBound, relying on the fact that fail can never dissapear in a garbage +** collection. +*/ + +Obj FuncElmWPObj( Obj self, Obj wp, Obj pos) +{ + Obj elm; + UInt ipos = INT_INTOBJ(pos); + if ( STORED_LEN_WPOBJ(wp) < ipos ) + { + return Fail; + } + elm = ELM_WPOBJ(wp,ipos); + if (IS_WEAK_DEAD_BAG(elm)) + { + ELM_WPOBJ(wp,ipos) = 0; + return Fail; + } + if (elm == 0) + { + return Fail; + } + return elm; +} + + +/**************************************************************************** +** +*F TypeWPObj( ) . . . . . . . . . . . . . . . . . . . Type of WP Object +** +** This is imported from the library variable TYPE_WPOBJ. They all have the +** same type +*/ + +Obj TYPE_WPOBJ; + +Obj TypeWPObj( Obj wp ) +{ + return TYPE_WPOBJ; +} + + +/**************************************************************************** +** +*F FuncIsWPObj( , ) . . . . . . . Handler for GAP function IsWPObj +*/ +Obj FuncIsWPObj( Obj self, Obj wp) +{ + return (TNUM_OBJ(wp) == T_WPOBJ) ? True : False; +} + +/**************************************************************************** +** +*F MarkWeakPointerObj( ) . . . . . . . . . . . . . . . Marking function +*F SweepWeakPointerObj( , , ) . . . . . . .Sweeping function +** +** These functions are installed for GASMAN to use in garbage collection The +** sweeping function must clean up any dead weak pointers encountered so +** that, after a full GC, the masterpointers occupied by the dead weak +** pointers can be reclaimed. +*/ + +void MarkWeakPointerObj( Obj wp) +{ + Int i; + for (i = 1; i <= LengthWPObj(wp); i++) + MarkBagWeakly(ELM_WPOBJ(wp,i)); +} + +void SweepWeakPointerObj( Bag *src, Bag *dst, UInt len) +{ + Bag elm; + while (len --) + { + elm = *src++; + *dst ++ = IS_WEAK_DEAD_BAG(elm) ? (Bag) 0 : elm; + } +} + + +/**************************************************************************** +** +*F CopyObjWPObj( , ) . . . . . . . . . copy a positional object +** +** Note that an immutable copy of a weak pointer object is a normal +** immutable plist. An Immutable WP object is a contradiction. +** +*N I am far from clear that this is safe from a badly timed GC during copying. +** +*/ + +Obj CopyObjWPObj ( + Obj obj, + Int mut ) +{ + Obj copy; /* copy, result */ + Obj tmp; /* temporary variable */ + Obj elm; + UInt i; /* loop variable */ + + /* make a copy */ + if ( mut ) { + copy = NewBag( T_WPOBJ, SIZE_OBJ(obj) ); + ADDR_OBJ(copy)[0] = ADDR_OBJ(obj)[0]; + } + else { + copy = NewBag( T_PLIST+IMMUTABLE, SIZE_OBJ(obj) ); + SET_LEN_PLIST(copy,LengthWPObj(obj)); + } + + /* leave a forwarding pointer */ + tmp = NEW_PLIST( T_PLIST, 2 ); + SET_LEN_PLIST( tmp, 2 ); + SET_ELM_PLIST( tmp, 1, ADDR_OBJ(obj)[0] ); + SET_ELM_PLIST( tmp, 2, copy ); + ADDR_OBJ(obj)[0] = tmp; + CHANGED_BAG(obj); + + /* now it is copied */ + RetypeBag( obj, T_WPOBJ + COPYING ); + + /* copy the subvalues */ + for ( i = SIZE_OBJ(obj)/sizeof(Obj)-1; i > 0; i-- ) { + elm = ADDR_OBJ(obj)[i]; + if ( elm != 0 && !IS_WEAK_DEAD_BAG(elm)) { + tmp = COPY_OBJ( elm, mut ); + ADDR_OBJ(copy)[i] = tmp; + CHANGED_BAG( copy ); + } + } + + /* return the copy */ + return copy; +} + + +/**************************************************************************** +** +*F CleanObjWPObj( ) . . . . . . . . . . . . . . . . . . . clean WPobj +*/ +void CleanObjWPObj ( + Obj obj ) +{ +} + + +/**************************************************************************** +** +*F CopyObjWPObjCopy( , ) . . . . . . . . . . . copy a WPobj copy +*/ +Obj CopyObjWPObjCopy ( + Obj obj, + Int mut ) +{ + return ELM_PLIST( ADDR_OBJ(obj)[0], 2 ); +} + + +/**************************************************************************** +** +*F CleanObjWPObjCopy( ) . . . . . . . . . . . . . . clean WPobj copy +*/ +void CleanObjWPObjCopy ( + Obj obj ) +{ + UInt i; /* loop variable */ + Obj elm; /* subobject */ + + /* remove the forwarding pointer */ + ADDR_OBJ(obj)[0] = ELM_PLIST( ADDR_OBJ(obj)[0], 1 ); + CHANGED_BAG(obj); + + /* now it is cleaned */ + RetypeBag( obj, TNUM_OBJ(obj) - COPYING ); + + /* clean the subvalues */ + for ( i = 1; i < SIZE_OBJ(obj)/sizeof(Obj); i++ ) { + elm = ADDR_OBJ(obj)[i]; + if ( elm != 0 && !IS_WEAK_DEAD_BAG(elm)) + CLEAN_OBJ( elm ); + } + +} + +/**************************************************************************** +** +*F SaveWPObj( ) +*/ + +void SaveWPObj( Obj wpobj ) +{ + UInt len, i; + Obj *ptr; + Obj x; + ptr = ADDR_OBJ(wpobj); + len = STORED_LEN_WPOBJ(wpobj); + SaveUInt(len); + for (i = 1; i <= len; i++) + { + x = *ptr; + if (IS_WEAK_DEAD_BAG(x)) + { + SaveSubObj(0); + *ptr = 0; + } + else + SaveSubObj(x); + ptr++; + } +} + +/**************************************************************************** +** +*F LoadWPObj( ) +*/ + +void LoadWPObj( Obj wpobj ) +{ + UInt len, i; + Obj *ptr; + Obj x; + ptr = ADDR_OBJ(wpobj); + len = LoadUInt(); + STORE_LEN_WPOBJ(wpobj, len); + for (i = 1; i <= len; i++) + { + *ptr++ = LoadSubObj(); + } +} + + +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + +*F SetupWeakPtr( ) . . . . . . . . . . initialize the weak pointer package +*/ +void SetupWeakPtr ( void ) +{ + /* install the marking and sweeping methods */ + InfoBags[ T_WPOBJ ].name = "object (weakptr)"; + InitMarkFuncBags ( T_WPOBJ , MarkWeakPointerObj ); + InitSweepFuncBags( T_WPOBJ , SweepWeakPointerObj ); + InfoBags[ T_WPOBJ +COPYING].name = "object (weakptr, copied)"; + InitMarkFuncBags ( T_WPOBJ +COPYING , MarkWeakPointerObj ); + InitSweepFuncBags( T_WPOBJ+COPYING , SweepWeakPointerObj ); + + + /* saving function */ + SaveObjFuncs[ T_WPOBJ ] = SaveWPObj; + LoadObjFuncs[ T_WPOBJ ] = LoadWPObj; + + + /* copying functions */ + CopyObjFuncs[ T_WPOBJ ] = CopyObjWPObj; + CopyObjFuncs[ T_WPOBJ + COPYING ] = CopyObjWPObjCopy; + CleanObjFuncs[ T_WPOBJ ] = CleanObjWPObj; + CleanObjFuncs[ T_WPOBJ + COPYING ] = CleanObjWPObjCopy; +} + + +/**************************************************************************** +** +*F InitWeakPtr( ) . . . . . . . . . . . initialize the weak pointer package +*/ +static Obj IsWPObjFilt; + +void InitWeakPtr ( void ) +{ + /* typing method */ + TypeObjFuncs[ T_WPOBJ ] = TypeWPObj; + ImportGVarFromLibrary( "TYPE_WPOBJ", &TYPE_WPOBJ ); + + + /* install all the GAP functions */ + C_NEW_GVAR_FUNC( "WeakPointerObj", 1L, "list", + FuncWeakPointerObj, + "src/weakptr.c:WeakPointerObj" ); + + C_NEW_GVAR_FUNC( "LengthWPObj", 1L, "wp", + FuncLengthWPObj, + "src/weakptr.c:LengthWPObj" ); + + C_NEW_GVAR_FUNC( "SetElmWPObj", 3L, "wp, pos, val", + FuncSetElmWPObj, + "src/weakptr.c:SetElmWPObj" ); + + C_NEW_GVAR_FUNC( "IsBoundElmWPObj", 2L, "wp, pos", + FuncIsBoundElmWPObj, + "src/weakptr.c:IsBoundElmWPObj" ); + + C_NEW_GVAR_FUNC( "UnbindElmWPObj", 2L, "wp, pos", + FuncUnbindElmWPObj, + "src/weakptr.c:UnbindElmWPObj" ); + + C_NEW_GVAR_FUNC( "ElmWPObj", 2L, "wp, pos", + FuncElmWPObj, + "src/weakptr.c:ElmWPObj" ); + + + /* IsWPObj needs to be installed as a filter, rather than a function */ + C_NEW_GVAR_FILT( "IsWPObj", "obj", IsWPObjFilt, + FuncIsWPObj, + "src/weakptr.c:IsWPObj"); +} + + +/**************************************************************************** +** +*F CheckWeakPtr( ) . . check the initialisation of the weak pointer package +*/ +void CheckWeakPtr ( void ) +{ +} + + +/**************************************************************************** +** + +*E weakptr.c . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/src/weakptr.h b/src/weakptr.h new file mode 100644 index 0000000000..2568065572 --- /dev/null +++ b/src/weakptr.h @@ -0,0 +1,57 @@ +/**************************************************************************** +** +*W weakptr.h GAP source Steve Linton +** +*H @(#)$Id$ +** +*Y Copyright (C) 1996, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany +** +** This file declares the functions that deal with weak pointer objects +** it has to interwork somewhat closely with GASMAN. +** +** A weak pointer looks like a plain list, except that it does not cause +** its entries to remain alive through a garbage collection, with the consequent +** side effect, that its entries may vanish at any time. +** +** +*/ +#ifdef INCLUDE_DECLARATION_PART +SYS_CONST char * Revision_weakptr_h = + "@(#)$Id$"; +#endif + + +/**************************************************************************** +** + +*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * * +*/ + + +/**************************************************************************** +** + +*F SetupWeakPtr( ) . . . . . . . . . . initialize the weak pointer package +*/ +extern void SetupWeakPtr ( void ); + + +/**************************************************************************** +** +*F InitWeakPtr( ) . . . . . . . . . . . initialize the weak pointer package +*/ +extern void InitWeakPtr ( void ); + + +/**************************************************************************** +** +*F CheckWeakPtr( ) . . check the initialisation of the weak pointer package +*/ +extern void CheckWeakPtr ( void ); + + +/**************************************************************************** +** + +*E weakptr.c . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +*/ diff --git a/tbl/clmelab.tbl b/tbl/clmelab.tbl index 30e45adf17..28c5403958 100644 --- a/tbl/clmelab.tbl +++ b/tbl/clmelab.tbl @@ -4,10 +4,12 @@ ## #H @(#)$Id$ ## -#Y Copyright (C) 1996, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany +#Y Copyright (C) 1997, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany ## ## This file contains Clifford matrices for the extension of an elementary -## abelian group +## abelian group. +## The matrices are *NOT* ordered according to their dimensions, +## new matrices must be added at the end of the file. ## Revision.clmelab_tbl := "@(#)$Id$"; @@ -4530,6 +4532,15 @@ E(4),1,-E(4)],[1,-1,1,-1,-1,1,-1,1,1,-1,1,-1],[1,E(4),-1,-E(4),E(4),-1,-E(4), -E(4)],[2,-2,2,-2,0,0,0,0,-2,2,-2,2]]); ACM("elab",5,[[1,1,1,1,1],[3,1,-1,-1-2*E(4),-1+2*E(4)],[3,-1,3,-1,-1],[3,1,-1, -1+2*E(4),-1-2*E(4)],[6,-2,-2,2,2]]); +ACM("elab",4,[[1,1,1,1],[1,1,-1,-1],[63,-1,-9,7],[63,-1,9,-7]]); +ACM("elab",4,[[1,1,1,1],[1,1,-1,-1],[63,-1,-9,7],[63,-1,9,-7]]); +ACM("elab",6,[[1,1,1,1,1,1],[1,1,1,-1,-1,-1],[1,1,-1,-1,1,1],[30,-2,0,0,-10, +6],[1,1,-1,1,-1,-1],[30,-2,0,0,10,-6]]); +ACM("elab",6,[[1,1,1,1,1,1],[1,1,1,-1,-1,-1],[3,3,-1,3,3,-1],[12,-4,0,-12,4, +0],[3,3,-1,-3,-3,1],[12,-4,0,12,-4,0]]); +ACM("elab",8,[[1,1,1,1,1,1,1,1],[1,1,1,1,-1,-1,-1,-1],[1,1,1,-1,1,1,1,-1],[12, +-4,0,0,0,-12,4,0],[2,2,-2,0,-2,2,2,0],[1,1,1,-1,-1,-1,-1,1],[12,-4,0,0,0,12, +-4,0],[2,2,-2,0,2,-2,-2,0]]); LIBTABLE.LOADSTATUS.clmelab:="userloaded"; diff --git a/tbl/ctadmin.tbi b/tbl/ctadmin.tbi index 28b8c9dfa4..6752812385 100644 --- a/tbl/ctadmin.tbi +++ b/tbl/ctadmin.tbi @@ -1650,10 +1650,6 @@ ConstructSubdirect := function( tbl, factors, choice ) od; t:= CharacterTableOfNormalSubgroup( t, choice ); TransferComponentsToLibraryTableRecord( t, tbl ); -#T Due to my stupidity, the table files contain 'return ConstructSubdirect', -#T which was no problem in GAP-3. -#T So I need a 'return' statement here. - return 0; end; @@ -1847,10 +1843,6 @@ ConstructPermuted := function( tbl, libnam, prmclasses, prmchars ) # Store the components in 'tbl'. TransferComponentsToLibraryTableRecord( t, tbl ); -#T Due to my stupidity, the table files contain 'return ConstructPermuted', -#T which was no problem in GAP-3. -#T So I need a 'return' statement here. - return 0; end; @@ -1953,6 +1945,10 @@ ConstructClifford := function( tbl ) newct[rowct][colct]:= Sum( Filtered( [ 1 .. matsize ], r -> grps[r] = j ), x -> clmat[x][n] * chi[ clmexp.fusionclasses[x] ]); +#T Eventually it should be possible to handle tables where not all +#T classes belonging to a Clifford matrix are expected to be +#T subsequent ... +#T (add an indirection by the fusion) od; od; diff --git a/tbl/ctbalter.tbl b/tbl/ctbalter.tbl index 4a1d88e082..f9872dbb58 100644 --- a/tbl/ctbalter.tbl +++ b/tbl/ctbalter.tbl @@ -1577,6 +1577,61 @@ TEXT1, [(26,27),(38,39)], 0); +MBT("A14",11, +TEXT1, +[1,2,3,1,2,4,5,1,1,6,1,7,8,9,10,11,12,1,13,14,15,16,2,17,18,19,20,1,21,22,23, +24,25,1,26,27,1,28,29,30,31,32,33,1,34,35,2,36,37,38,39,40,41,42,43,2,44,45, +46,47,48,49,50,51,52,53,54,55,56], +[1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], +[], +[[[1,4],[2,3],[3,5],[4,6],[5,7],[6,8],[7,9],[8,10],[9,11],[10,11]],[[1,2],[2, +3],[3,4],[4,7],[5,6,7]]], +[], +0, +[(67,68),(47,48)], +0, +rec(version:=1, +date:="12.04.95")); + +MBT("A14",13, +TEXT1, +[1,2,1,3,4,5,6,1,7,8,9,10,11,12,1,13,14,1,15,16,1,17,18,19,20,21,22,23,24,25, +26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51, +52,53,54,55,56,57,58,59,60,61,62,63,64,65], +[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], +[], +[[[1,2],[2,3],[3,4],[4,7],[7,8],[5,6,8]]], +[], +0, +[(68,69),(64,65)], +0, +rec(version:=1, +date:="12.04.95")); + +MBT("A14",2, +TEXT1, +[1,1,1,1,1,1,2,2,2,1,1,1,1,1,2,1,1,3,3,2,1,2,2,1,3], +[10,6,2], +[[1,2,3,5,7,9,11,14,23,24,26,27,29,35,53],[8,18,19,20,44,59,60],[51,57,58]], +[], +[[[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-1,1,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,-1,1,0, +0,0,0,0,0,0,0,0,0,0,0],[-1,0,0,1,1,-1,0,0,0,0,0,0,0,0,0],[-1,1,-1,1,0,0,0,0,0, +0,0,0,0,0,0],[0,0,0,-1,0,1,0,0,0,0,0,0,0,0,0],[0,0,-1,1,0,-1,1,0,0,0,0,0,0,0, +0],[-1,1,-1,0,0,0,0,1,0,0,0,0,0,0,0],[1,1,0,-1,-1,1,0,1,-1,0,0,1,0,0,0],[0,1, +-1,-1,-1,1,0,1,-1,0,0,0,1,0,0],[0,-2,1,0,0,0,-1,-1,1,0,0,0,0,0,0],[0,0,0,0,-1, +0,-1,0,0,1,0,0,0,0,0],[-1,-1,1,0,0,0,0,-1,0,0,1,0,0,0,0],[-1,-1,-1,-1,0,0,0,0, +0,0,0,0,0,1,0],[2,-2,2,-2,0,1,-1,0,0,0,0,0,-1,0,1]],[[1,0,1,-1,0,0,0],[0,-1,0, +1,0,0,0],[1,0,0,0,0,0,0],[-1,1,0,0,0,0,0],[-1,0,-1,0,1,0,0],[-1,0,-1,1,-1,1, +0],[0,1,0,-1,-1,0,1]],[[-1,1,0],[-1,0,1],[1,0,0]]], +0, +[(21,22),(13,14)(24,25)], +[1,1,-1,1,1,-1,1,1,1,1,Unknown(),1,Unknown(),Unknown(),1,1,1,1,1,1, +Unknown(),1,1,1,1], +rec(version:=1, +date:="31.03.95")); + MBT("A5.2",2, TEXT1, [1,1,2], diff --git a/tbl/ctoalter.tbl b/tbl/ctoalter.tbl index bf2ca0a4ca..8b5d3aa29a 100644 --- a/tbl/ctoalter.tbl +++ b/tbl/ctoalter.tbl @@ -2404,6 +2404,44 @@ E(84)+E(84)^5-E(84)^13+E(84)^17+E(84)^25-E(84)^29+E(84)^37+E(84)^41-E(84)^53 0,0,0]],]); ALN("A13.2",["S13"]); +MOT("A14", +[ +"origin: CAS library,\n", +" names:= a14\n", +" order: 2^10.3^5.5^2.7^2.11.13 = 43589145600\n", +" number of classes: 72\n", +" source: stockhofe [aachen] from table of s14 (kerber,bayreuth)\n", +" comments: alternating group\n", +" test: orth, min\n", +"tests: 1.o.r., pow[2,3,5,7,11,13]" +], +0, +0, +0, +[(70,71),(66,67),(48,49)], +function( tbl ) ConstructPermuted( tbl, ["Alternating",14], +( 6,17,39,23,43,45,65,37,54,28,51,60,32,56,30,53,68,66,58,31,52,63,70,47,27, +35,16,11, 7,19,44,46,26,34,57,61,55,29,64,71,48,50,69,67,38,18,42,40,24,13, + 8)( 9,21,14)(10,20)(12,22,41,25,15)(33,72,49,59,62), +( 4, 5, 9)( 6,11,16,23,33,64,32,51,47,10, 8, 7,12,18,37,54,72,20,29,43,61,59, +70,15,14,19,27,28,36,69,57,71,21,44,67,48,22,40,55,62,39,31,25)(13,24,26,17, +34,63)(35,53,66,56,68,58,45)(38,46,41,65,50,52)(42,49) ); end); +ARC("A14","classtext",[[1,1,1,1,1,1,1,1,1,1,1,1,1,1],[2,2,1,1,1,1,1,1,1,1,1, +1],[2,2,2,2,1,1,1,1,1,1],[2,2,2,2,2,2,1,1],[3,1,1,1,1,1,1,1,1,1,1,1],[3,3,1,1, +1,1,1,1,1,1],[3,3,3,1,1,1,1,1],[3,3,3,3,1,1],[4,2,1,1,1,1,1,1,1,1],[4,4,1,1,1, +1,1,1],[4,2,2,2,2,2],[4,2,2,2,1,1,1,1],[4,4,4,2],[4,4,2,2,1,1],[5,1,1,1,1,1,1, +1,1,1],[5,5,1,1,1,1],[3,2,2,1,1,1,1,1,1,1],[6,2,1,1,1,1,1,1],[3,2,2,2,2,1,1, +1],[3,3,2,2,2,2],[3,3,2,2,1,1,1,1],[3,3,3,2,2,1],[6,2,2,2,1,1],[6,3,2,1,1,1],[ +6,3,3,2],[6,6,1,1],[7,1,1,1,1,1,1,1],[7,7],[8,2,1,1,1,1],[8,2,2,2],[8,4,1,1],[ +9,1,1,1,1,1],[9,3,1,1],[5,2,2,1,1,1,1,1],[5,2,2,2,2,1],[5,5,2,2],[10,2,1,1],[ +11,1,1,1],[4,3,2,1,1,1,1,1],[6,4,1,1,1,1],[4,4,3,1,1,1],[4,3,2,2,2,1],[4,4,3, +3],[4,3,3,2,1,1],[6,4,2,2],[6,4,3,1],[12,2],[13,1],[13,1],[7,2,2,1,1,1],[5,3, +1,1,1,1,1,1],[5,3,3,3],[5,3,3,1,1,1],[5,5,3,1],[9,2,2,1],[5,4,2,1,1,1],[5,4,4, +1],[10,4],[7,3,1,1,1,1],[7,3,3,1],[8,3,2,1],[8,6],[7,4,2,1],[5,3,2,2,1,1],[6, +5,2,1],[11,3],[11,3],[7,5,1,1],[7,3,2,2],[9,5],[9,5],[5,4,3,2]]); +ARC("A14","isSimple",true); +ARC("A14","extInfo",["2","2"]); + MOT("A5", [ "origin: ATLAS of finite groups, tests: 1.o.r., pow[2,3,5]" diff --git a/tbl/ctocliff.tbl b/tbl/ctocliff.tbl index 827f3fdb3b..70297673af 100644 --- a/tbl/ctocliff.tbl +++ b/tbl/ctocliff.tbl @@ -279,6 +279,87 @@ ALF("3^7:O7(3)","O7(3)",[1,1,1,1,2,2,3,3,3,3,4,4,4,4,5,5,5,5,5,5,6,6,6,6, 43,43,43,43,44,44,45,45,46,46,47,47,47,48,48,48,49,49,50,50,50,51,51,51, 52,52,52,53,53,53,54,54,55,55,56,56,56,57,57,58,58,58]); +MOT("2^7:S6(2)", +[ +"origin: computed in 1997 by E. Mpono using Clifford theory,\n", +"maximal subgroup of Fi22.2\n,", +"tests: 1.o.r., pow[2,3,5,7]" +], +[185794560,2949120,6635520,5160960,1474560,98304,92160,92160,245760,147456, +147456,49152,12288,147456,49152,12288,49152,16384,12288,6144,12288,49152, +16384,6144,6144,6144,2048,2048,6144,6144,2048,2048,69120,4608,11520,6912,1296, +1296,864,288,864,288,3072,1024,3072,1024,3072,1024,768,3072,1024,768,3072, +1024,768,3072,1024,768,1024,1024,512,1024,1024,512,256,256,256,256,256,256, +256,256,240,80,240,80,1152,384,1152,384,2304,768,576,576,2304,768,144,144,384, +384,192,384,384,192,144,144,144,144,48,48,48,48,14,14,64,64,64,64,64,64,64,64, +18,18,40,40,40,40,96,96,96,96,96,96,96,96,24,24,30,30,288,96,288,96], +[,[1,1,1,1,1,1,2,1,2,2,1,1,2,1,1,2,1,1,2,2,1,2,2,2,1,2,2,2,1,2,2,2,33,33,33, +33,37,37,39,39,39,39,11,12,11,12,17,17,19,17,17,19,17,17,19,17,17,19,11,12,12, +11,12,12,17,18,19,19,18,17,19,19,73,73,73,73,33,34,33,34,33,33,34,33,34,34,37, +37,33,34,34,33,34,34,39,40,39,40,39,40,39,40,103,103,59,60,60,59,43,44,44,43, +113,113,73,74,73,74,89,90,89,90,89,90,89,90,87,87,129,129,39,39,39,39],[1,2,3, +4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31, +32,1,2,4,3,1,3,1,2,3,4,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60, +61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,11,13,14,16,5,6,7,8,10,9,11, +14,17,19,20,21,22,24,5,7,8,10,25,26,29,30,103,104,105,106,107,108,109,110,111, +112,37,38,115,116,117,118,47,49,50,52,53,55,56,58,43,45,73,75,11,12,14,15],,[ +1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29, +30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55, +56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,1,2,4,3,77,78,79,80,81,82, +83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105, +106,107,108,109,110,111,112,113,114,5,7,8,9,119,120,121,122,123,124,125,126, +127,128,33,35,131,132,133,134],,[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18, +19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44, +45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70, +71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96, +97,98,99,100,101,102,1,4,105,106,107,108,109,110,111,112,113,114,115,116,117, +118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134]], +0, +[], +ConstructClifford); +ARC("2^7:S6(2)","cliffordTable",[[[1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,15,17, +18,19,30,20,21,23,22,24,25,26,27,28,29],[1,2,3,4,5,6,7,8,9,10,11,12,13,14,16, +15,17,18,19,30,20,21,23,22,24,25,26,27,28,29],[1,3,4,2,12,9,13,5,4,8,19,6,18, +16,15,22,10,13,14,25,12,3,5,10,11,4,2,5,23,13,11,20,30,26,27,18,16],[1,3,4,2, +12,9,13,5,4,8,19,6,18,16,15,22,10,13,14,25,12,3,5,10,11,4,2,5,23,13,11,20,30, +26,27,18,16]],[["S6(2)"],["S6(2)"],["2^5:S6"],["2^5:S6"]],[[[1,2,3,4],[1,1,1, +1],["elab",4,31]],[[1,2,3,3,4,4],[2,2,4,27,4,27],["elab",6,22]],[[1,2,3,3,4, +4],[3,3,2,22,2,22],["elab",6,23]],[[1,2,3,3,3,4,4,4],[4,4,3,9,26,3,9, +26],["elab",8,16]],[[1,2,3,3,3,4,4,4],[5,5,8,23,28,8,23,28],["elab",8,2,(2,7) +(3,5,8,4,6),(3,5,8)(4,6,7)]],[[1,2,3,4],[6,6,12,12],["elab",4,20,,(2,4,3)]],[[ +1,2],[7,7],[[1,1],[1,-1]]],[[1,2,3,4],[8,8,10,10],["elab",4,23,(2,3), +(2,3)]],[[1,2,3,4],[9,9,6,6],["elab",4,23,(2,4,3),(2,3)]],[[1,2,3,3,4,4],[10, +10,17,24,17,24],["elab",6,11,(2,3,4,5),(2,4)(3,5)]],[[1,2,3,3,4,4],[11,11,25, +31,25,31],["elab",6,11,(2,4,6,5),(2,4)(3,5)]],[[1,2,3,3,4,4],[12,12,5,21,5, +21],["elab",6,16,(2,6,3,4),(2,4,6)]],[[1,2,3,3,3,4,4,4],[13,13,7,18,30,7,18, +30],["elab",8,6,(2,6)(4,8,7)]],[[1,2,3,4],[14,14,19,19],["elab",4,23,(2,3), +(2,3)]],[[1,2,3,4],[16,16,15,15],["elab",4,23,(2,4,3),(2,3)]],[[1,2,3,3,4,4],[ +15,15,14,37,14,37],["elab",6,11,(2,4,6,5),(2,5,3,6,4)]],[[1,2],[17,17],[[1, +1],[1,-1]]],[[1,2,3,3,4,4],[18,18,13,36,13,36],["elab",6,16,(2,4)(3,6), +(2,4,6)]],[[1,2,3,4],[19,19,11,11],["elab",4,12]],[[1,2,3,4],[21,21,32, +32],["elab",4,12]],[[1,2],[22,22],[[1,1],[1,-1]]],[[1,2,3,4],[24,24,16, +16],["elab",4,12]],[[1,2,3,4],[23,23,29,29],["elab",4,12]],[[1,2],[25,25],[[1, +1],[1,-1]]],[[1,2,3,4],[26,26,20,20],["elab",4,12]],[[1,2,3,4],[27,27,34, +34],["elab",4,12,(3,4)]],[[1,2,3,4],[28,28,35,35],["elab",4,12,(3,4)]],[[1, +2],[29,29],[[1,1],[1,-1]]],[[1,2],[30,30],[[1,1],[1,-1]]],[[1,2,3,4],[20,20, +33,33],["elab",4,23,(2,3),(2,3)]]]]); +ALF("2^7:S6(2)","S6(2)",[1,1,2,2,2,3,3,3,4,4,4,4,5,5,5,5,6,6,7,8,8,9,9,10, +10,10,11,11,11,12,12,12,13,13,13,13,14,14,16,16,15,15,15,17,18,18,18,19, +19,30,30,20,21,21,23,23,22,24,24,25,25,26,26,27,28,29,29,1,1,2,3,3,4,5,2, +2,3,4,4,4,5,5,5,9,9,10,10,11,11,12,12,12,13,13,6,6,7,8,8,15,16,17,18,29, +29,19,30,10,11,13,13,21,21,23,23,14,14,24,15,15,16,18,18,19,30,25,26,27, +20,22,24,25,26,28]); +ALF("2^7:S6(2)","Fi22.2",[1,3,2,4,10,4,3,9,3,4,9,13,4,10,13,11,5,18,8,7,23, +12,11,13,10,28,10,13,27,12,9,13,13,12,27,28,14,35,20,39,15,20,40,25,18,38, +44,19,45,24,45,26,30,28,30,29,33,34,54,44,57,40,58,46,49,22,23,61,60,62, +60,61,61,62,64,63,64,63,64,65,66,66,65,67,66,63,66,64,66,67,64,65,67,65, +68,73,76,77,72,71,69,75,73,72,77,78,78,80,79,79,80,80,82,81,82,83,85,84, +86,90,90,88,91,89,94,88,90,95,96,102,103,105,104,109],[ +"fusion map is unique" +]); +ALN("2^7:S6(2)",["2^6:s6f2.2","2^7:s6f2"]); + + LIBTABLE.LOADSTATUS.ctocliff:="userloaded"; ALN:= NotifyCharTableName; diff --git a/tbl/ctoline1.tbl b/tbl/ctoline1.tbl index fad78cf841..8a3fafbfb5 100644 --- a/tbl/ctoline1.tbl +++ b/tbl/ctoline1.tbl @@ -33,6 +33,9 @@ ARC("2.L2(11)","irredinfo",rec(pblock:=[,[1,1,1,2,2,1,3,4,1,1,1,2,2,3,4],[1,2, 1,1,3,3,3,3,3,3,3]])); ALF("2.L2(11)","L2(11)",[1,1,2,3,3,4,4,5,5,6,6,7,7,8,8]); ALF("2.L2(11)","2.L2(11).2",[1,2,3,4,5,6,7,8,9,10,11,12,13,12,13]); +ALF("2.L2(11)","2.M12",[1,2,3,8,9,12,13,12,13,14,14,23,24,25,26],[ +"fusion map is unique up to table automorphisms" +]); ALN("2.L2(11)",["2.A1(11)","2.U2(11)","2.S2(11)","2.O3(11)"]); MOT("2.L2(11).2", diff --git a/tbl/ctomathi.tbl b/tbl/ctomathi.tbl index 90971b42fa..31ebd2997e 100644 --- a/tbl/ctomathi.tbl +++ b/tbl/ctomathi.tbl @@ -211,13 +211,13 @@ MOT("2.M12", [["M12",[]],["2.M12",[]]], [(23,25)(24,26),(21,22),(17,18)(19,20),(17,18)(19,20)(21,22),(10,11)(17,19) (18,20)], -function ( tbl ) - ConstructProj( tbl ); -end); +ConstructProj); ARC("2.M12","irredinfo",rec(pblock:=[,[1,1,1,2,2,1,1,1,1,1,1,1,1,2,2,1,1,1,2, 1,1,1,1,1,2,2],[1,1,1,1,1,2,3,1,1,1,1,2,1,2,1,4,4,4,4,4,4,4,4,4,4,4],,[1,2,2, 2,2,3,2,4,5,6,1,1,7,1,1,8,9,10,10,10,10,11,12,13,14,15],,,,,,[1,2,3,1,1,1,1,4, 5,6,7,8,1,1,9,10,10,10,10,11,12,13,14,10,10,10]])); +ARC("2.M12","maxes",["2xM11","2.M12M2","A6.D8","2.M12M4","2.L2(11)", +"2x3^2.2.S4","2.M12M7","2.M12M8","2.M12M9","2.M12M10","2.A4xS3"]); ALF("2.M12","M12",[1,1,2,3,3,4,4,5,5,6,7,8,8,9,10,10,11,11,12,12,13,13,14, 14,15,15]); ALF("2.M12","2.M12.2",[1,2,3,4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,16,17, diff --git a/tbl/ctomaxi1.tbl b/tbl/ctomaxi1.tbl index d331720fe0..3891350a8b 100644 --- a/tbl/ctomaxi1.tbl +++ b/tbl/ctomaxi1.tbl @@ -4,7 +4,7 @@ ## #H @(#)$Id$ ## -#Y Copyright (C) 1996, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany +#Y Copyright (C) 1997, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany ## ## This file contains the ordinary character tables of maximal subgroups ## (which are neither ATLAS tables nor tables of Ostermann) of the @@ -738,7 +738,7 @@ MOT("(4xA6).2_3", [(25,29)(26,30)(27,31)(28,32),(21,23)(22,24)(25,27)(26,28)(29,31)(30,32), ( 2, 4)( 6, 8)(10,12)(14,16)(18,20)(21,22)(23,24)(25,26)(27,28)(29,30) (31,32)], -function( tbl ) return ConstructSubdirect(tbl,[["A6.2_3"],["Cyclic",8]], +function( tbl ) ConstructSubdirect(tbl,[["A6.2_3"],["Cyclic",8]], [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,42,44,46,48,50,52,54, 56,58,60,62,64]);end); ALF("(4xA6).2_3","4.M22",[1,2,3,4,5,6,5,6,7,8,9,10,12,11,12,11,14,15,16, @@ -757,7 +757,7 @@ MOT("6.M22M7", [(27,28)(29,30)(31,32)(33,34)(35,36)(37,38)(39,40)(41,42)(43,44),(33,39) (34,40)(35,41)(36,42)(37,43)(38,44),( 3, 5)( 4, 6)( 9,11)(10,12)(17,19)(18,20) (23,25)(24,26)(29,31)(30,32)(35,37)(36,38)(41,43)(42,44)], -function( tbl ) return ConstructSubdirect(tbl,[["3.A6.2_3"],["Cyclic",4]], +function( tbl ) ConstructSubdirect(tbl,[["3.A6.2_3"],["Cyclic",4]], [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,54, 56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88]);end); ALF("6.M22M7","(2xA6).2_3",[1,2,1,2,1,2,3,4,3,4,3,4,5,6,7,8,7,8,7,8,9,10, @@ -784,7 +784,7 @@ MOT("12.M22M7", (34,36)(38,40)(42,44)(46,48)(50,52)(53,54)(55,56)(57,58)(59,60)(61,62)(63,64) (65,66)(67,68)(69,70)(71,72)(73,74)(75,76)(77,78)(79,80)(81,82)(83,84)(85,86) (87,88)], -function( tbl ) return ConstructSubdirect(tbl,[["3.A6.2_3"],["Cyclic",8]], +function( tbl ) ConstructSubdirect(tbl,[["3.A6.2_3"],["Cyclic",8]], [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53, 55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103, 106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142, @@ -1319,6 +1319,181 @@ ALF("S4xS3","M12.2",[1,3,5,13,13,16,2,2,8,4,9,5,15,15,19],[ "fusion map is unique" ]); +MOT("2xM11", +[ +"1st maximal subgroup of 2.M12" +], +0, +0, +0, +0, +ConstructDirectProduct); +ARC("2xM11","factors",[["Cyclic",2],["M11"]]); +ALF("2xM11","2.M12",[1,4,6,11,12,15,19,20,25,23,2,5,7,11,13,16,20,19,26,24],[ +"fusion map is unique up to table automorphisms" +]); + +MOT("2.M12M2", +[ +"2nd maximal subgroup of 2.M12,\n", +"differs from 2.M12M1 = 2xM11 only by fusion map" +], +0, +0, +0, +0, +ConstructDirectProduct); +ARC("2.M12M2","factors",[["2xM11"]]); +ALF("2.M12M2","2.M12",[1,4,6,10,12,15,17,18,23,25,2,5,7,10,13,16,18,17,24, +26],[ +"fusion of 2.M12M1, mapped under autom." +]); + +MOT("2.M12M4", +[ +"4th maximal subgroup of 2.M12,\n", +"differs from 2.M12M3 = A6.D8 only by fusion map" +], +0, +0, +0, +0, +ConstructDirectProduct); +ARC("2.M12M4","factors",[["A6.D8"]]); +ALF("2.M12M4","2.M12",[1,2,4,5,6,7,11,11,12,13,4,5,10,15,16,3,19,20,22,21, +11,19,20],[ +"fusion of 2.M12M3, mapped under autom." +]); + +MOT("2x3^2.2.S4", +[ +"6-th maximal subgroup of 2.M12" +], +0, +0, +0, +[(10,11)(21,22),(8,19)(9,20)(10,21)(11,22)], +ConstructDirectProduct); +ARC("2x3^2.2.S4","factors",[["Cyclic",2],["3^2.2.S4"]]); +ALF("2x3^2.2.S4","2.M12",[1,6,4,10,6,8,15,4,15,17,18,2,7,5,10,7,9,16,5,16,18, +17],[ +"fusion map is unique up to table automorphisms" +]); + +MOT("2.M12M7", +[ +"7th maximal subgroup of 2.M12,\n", +"differs from 2.M12M6 = 2x3^2.2.S4 only by fusion map" +], +0, +0, +0, +0, +ConstructDirectProduct); +ARC("2.M12M7","factors",[["2x3^2.2.S4"]]); +ALF("2.M12M7","2.M12",[1,6,4,11,6,8,15,4,15,19,20,2,7,5,11,7,9,16,5,16,20, +19],[ +"fusion of 2.M12M6, mapped under autom." +]); + +MOT("2.M12M8", +[ +"origin: Dixon's Algorithm,\n", +"8-th maximal subgroup of 2.M12,\n", +"structure is 4Y(2xA5):2" +], +[480,480,32,32,24,24,20,20,24,8,12,240,16,12,20,20,24,8,12], +[,[1,1,1,1,5,5,7,7,2,3,6,2,2,6,8,8,2,3,6],[1,2,3,4,1,2,7,8,9,10,9,12,13,12,15, +16,17,18,17],,[1,2,3,4,5,6,1,2,9,10,11,12,13,14,12,12,17,18,19]], +[[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,-1,-1,-1,1,1,1,1,1, +-1,-1,-1],[4,4,0,0,1,1,-1,-1,2,0,-1,4,0,1,-1,-1,2,0,-1], +[TENSOR,[3,2]],[5,5,1,1,-1,-1,0,0,1,-1,1,5,1,-1,0,0,1,-1,1], +[TENSOR,[5,2]],[6,6,-2,-2,0,0,1,1,0,0,0,6,-2,0,1,1,0,0,0],[1,1,1,1,1,1,1,1,1, +1,1,-1,-1,-1,-1,-1,-1,-1,-1], +[TENSOR,[2,8]], +[TENSOR,[3,8]], +[TENSOR,[3,9]], +[TENSOR,[5,8]], +[TENSOR,[5,9]], +[TENSOR,[7,8]],[2,-2,-2,2,2,-2,2,-2,0,0,0,0,0,0,0,0,0,0,0],[6,-6,2,-2,0,0,1, +-1,0,0,0,0,0,0,-E(20)-E(20)^9+E(20)^13+E(20)^17,E(20)+E(20)^9-E(20)^13 + -E(20)^17,0,0,0], +[TENSOR,[16,8]],[8,-8,0,0,2,-2,-2,2,0,0,0,0,0,0,0,0,0,0,0],[10,-10,-2,2,-2,2, +0,0,0,0,0,0,0,0,0,0,0,0,0]], +[(15,16),( 9,17)(10,18)(11,19)]); +ALF("2.M12M8","2.M12",[1,2,4,5,8,9,12,13,3,10,14,3,3,14,21,22,3,11,14]); + +MOT("2.M12M9", +[ +"origin: Dixon's Algorithm,\n", +"9-th maximal subgroup of 2.M12,\n", +"structure is (2xQ8).S4" +], +[384,384,384,384,32,16,64,64,32,12,12,12,12,16,16,16,16,16,16,16,16], +[,[1,1,1,1,3,2,1,1,3,10,10,10,10,1,1,5,5,8,8,9,9],[1,2,3,4,5,6,7,8,9,1,2,3,4, +14,15,16,17,18,19,20,21],,[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,16,18,19,21, +20],,[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,16,18,19,21,20]], +[[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1, +-1,-1,-1,-1,-1,-1],[2,2,2,2,2,2,2,2,2,-1,-1,-1,-1,0,0,0,0,0,0,0,0],[3,3,3,3,3, +-1,-1,-1,-1,0,0,0,0,1,1,1,1,-1,-1,-1,-1], +[TENSOR,[4,2]],[3,3,3,3,-1,-1,-1,-1,3,0,0,0,0,1,1,-1,-1,-1,-1,1,1], +[TENSOR,[6,2]],[3,3,3,3,-1,-1,3,3,-1,0,0,0,0,1,1,-1,-1,1,1,-1,-1], +[TENSOR,[8,2]],[6,6,6,6,-2,2,-2,-2,-2,0,0,0,0,0,0,0,0,0,0,0,0],[4,4,-4,-4,0,0, +0,0,0,1,1,-1,-1,0,0,0,0,2,-2,0,0], +[TENSOR,[11,2]],[8,8,-8,-8,0,0,0,0,0,-1,-1,1,1,0,0,0,0,0,0,0,0],[2,-2,-2,2,0, +0,-2,2,0,-1,1,1,-1,0,0,-E(8)-E(8)^3,E(8)+E(8)^3,0,0,E(8)+E(8)^3,-E(8)-E(8)^3], +[TENSOR,[14,2]],[4,-4,-4,4,0,0,-4,4,0,1,-1,-1,1,0,0,0,0,0,0,0,0],[4,-4,4,-4,0, +0,0,0,0,1,-1,1,-1,-2,2,0,0,0,0,0,0], +[TENSOR,[17,2]],[6,-6,-6,6,0,0,2,-2,0,0,0,0,0,0,0,E(8)+E(8)^3,-E(8)-E(8)^3,0, +0,E(8)+E(8)^3,-E(8)-E(8)^3], +[TENSOR,[19,2]],[8,-8,8,-8,0,0,0,0,0,-1,1,-1,1,0,0,0,0,0,0,0,0]], +[(18,19),(16,17)(20,21),(14,15),( 5, 9)(16,20)(17,21)]); +ALF("2.M12M9","2.M12",[1,2,4,5,10,3,5,4,11,6,7,15,16,4,5,17,18,10,11,19,20]); + +MOT("2.M12M10", +[ +"origin: Dixon's Algorithm,\n", +"10-th maximal subgroup of 2.M12" +], +[384,384,128,128,32,32,12,12,48,32,32,12,12,16,16,16,16,16,16,16,16], +[,[1,1,1,1,3,3,8,8,2,1,1,7,7,2,2,3,3,6,6,5,5],[1,2,3,4,5,6,2,1,9,10,11,9,9,14, +15,16,17,18,19,20,21],,[1,2,3,4,5,6,7,8,9,10,11,13,12,14,15,16,17,19,18,21, +20],,[1,2,3,4,5,6,7,8,9,10,11,13,12,14,15,16,17,19,18,21,20],,,,[1,2,3,4,5,6, +7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]], +[[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1, +-1,-1,-1,-1,-1,-1],[1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1], +[TENSOR,[2,3]],[2,2,2,2,2,2,-1,-1,2,2,2,-1,-1,0,0,0,0,0,0,0,0], +[TENSOR,[5,3]],[3,3,3,3,-1,-1,0,0,3,-1,-1,0,0,1,1,1,1,-1,-1,-1,-1], +[TENSOR,[7,2]], +[TENSOR,[7,3]], +[TENSOR,[7,4]],[6,6,-2,-2,2,-2,0,0,0,0,0,0,0,2,0,-2,0,0,0,0,0], +[TENSOR,[11,2]],[6,6,-2,-2,-2,2,0,0,0,0,0,0,0,0,2,0,-2,0,0,0,0], +[TENSOR,[13,2]],[4,-4,-4,4,0,0,2,-2,0,0,0,0,0,0,0,0,0,0,0,0,0],[4,-4,-4,4,0,0, +-1,1,0,0,0,E(12)^7-E(12)^11,-E(12)^7+E(12)^11,0,0,0,0,0,0,0,0], +[TENSOR,[16,3]],[6,-6,2,-2,0,0,0,0,0,2,-2,0,0,0,0,0,0,E(8)+E(8)^3, +-E(8)-E(8)^3,E(8)+E(8)^3,-E(8)-E(8)^3], +[TENSOR,[18,3]], +[TENSOR,[18,2]], +[TENSOR,[18,4]]], +[(18,19)(20,21),(12,13),(10,11)(20,21),( 5, 6)(14,15)(16,17)(18,20)(19,21), +(10,11)(18,19)]); +ALF("2.M12M10","2.M12",[1,2,4,5,10,11,9,8,3,4,5,14,14,3,3,10,11,19,20,18, +17]); + +MOT("2.A4xS3", +[ +"11-th maximal subgroup of 2.M12" +], +0, +0, +0, +[(10,16)(11,17)(12,18)(13,19)(14,20)(15,21),(3,6)(12,15)(18,21)], +ConstructDirectProduct); +ARC("2.A4xS3","factors",[["2.L2(3)"],["Symmetric",3]]); +ALF("2.A4xS3","2.M12",[1,4,8,2,5,9,3,3,14,6,15,8,7,16,9,6,15,8,7,16,9],[ +"fusion map is unique up to table automorphisms" +]); + LIBTABLE.LOADSTATUS.ctomaxi1:="userloaded"; ALN:= NotifyCharTableName; diff --git a/tbl/ctomisc1.tbl b/tbl/ctomisc1.tbl index 9d2fcf5beb..5b7434ac30 100644 --- a/tbl/ctomisc1.tbl +++ b/tbl/ctomisc1.tbl @@ -4,7 +4,7 @@ ## #H @(#)$Id$ ## -#Y Copyright (C) 1996, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany +#Y Copyright (C) 1997, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany ## ## This file contains the ordinary character tables of miscellaneous ## CAS tables (alphabetical order, up to 'e') @@ -3705,44 +3705,6 @@ MOT("D2MJ4", ( 99,101)(100,102)(124,125)(130,131)(143,144)(146,147)(151,152),( 8,13)( 9,14) (10,15)(11,16)]); -MOT("a14", -[ -"origin: CAS library,\n", -" names:= a14\n", -" order: 2^10.3^5.5^2.7^2.11.13 = 43589145600\n", -" number of classes: 72\n", -" source: stockhofe [aachen] from table of s14 (kerber,bayreuth)\n", -" comments: alternating group\n", -" test: orth, min\n", -"tests: 1.o.r., pow[2,3,5,7,11,13]" -], -0, -0, -0, -[(70,71),(66,67),(48,49)], -function( tbl ) return ConstructPermuted( tbl, ["Alternating",14], -( 6,17,39,23,43,45,65,37,54,28,51,60,32,56,30,53,68,66,58,31,52,63,70,47,27, -35,16,11, 7,19,44,46,26,34,57,61,55,29,64,71,48,50,69,67,38,18,42,40,24,13, - 8)( 9,21,14)(10,20)(12,22,41,25,15)(33,72,49,59,62), -( 4, 5, 9)( 6,11,16,23,33,64,32,51,47,10, 8, 7,12,18,37,54,72,20,29,43,61,59, -70,15,14,19,27,28,36,69,57,71,21,44,67,48,22,40,55,62,39,31,25)(13,24,26,17, -34,63)(35,53,66,56,68,58,45)(38,46,41,65,50,52)(42,49) ); end); -ARC("a14","classtext",[[1,1,1,1,1,1,1,1,1,1,1,1,1,1],[2,2,1,1,1,1,1,1,1,1,1, -1],[2,2,2,2,1,1,1,1,1,1],[2,2,2,2,2,2,1,1],[3,1,1,1,1,1,1,1,1,1,1,1],[3,3,1,1, -1,1,1,1,1,1],[3,3,3,1,1,1,1,1],[3,3,3,3,1,1],[4,2,1,1,1,1,1,1,1,1],[4,4,1,1,1, -1,1,1],[4,2,2,2,2,2],[4,2,2,2,1,1,1,1],[4,4,4,2],[4,4,2,2,1,1],[5,1,1,1,1,1,1, -1,1,1],[5,5,1,1,1,1],[3,2,2,1,1,1,1,1,1,1],[6,2,1,1,1,1,1,1],[3,2,2,2,2,1,1, -1],[3,3,2,2,2,2],[3,3,2,2,1,1,1,1],[3,3,3,2,2,1],[6,2,2,2,1,1],[6,3,2,1,1,1],[ -6,3,3,2],[6,6,1,1],[7,1,1,1,1,1,1,1],[7,7],[8,2,1,1,1,1],[8,2,2,2],[8,4,1,1],[ -9,1,1,1,1,1],[9,3,1,1],[5,2,2,1,1,1,1,1],[5,2,2,2,2,1],[5,5,2,2],[10,2,1,1],[ -11,1,1,1],[4,3,2,1,1,1,1,1],[6,4,1,1,1,1],[4,4,3,1,1,1],[4,3,2,2,2,1],[4,4,3, -3],[4,3,3,2,1,1],[6,4,2,2],[6,4,3,1],[12,2],[13,1],[13,1],[7,2,2,1,1,1],[5,3, -1,1,1,1,1,1],[5,3,3,3],[5,3,3,1,1,1],[5,5,3,1],[9,2,2,1],[5,4,2,1,1,1],[5,4,4, -1],[10,4],[7,3,1,1,1,1],[7,3,3,1],[8,3,2,1],[8,6],[7,4,2,1],[5,3,2,2,1,1],[6, -5,2,1],[11,3],[11,3],[7,5,1,1],[7,3,2,2],[9,5],[9,5],[5,4,3,2]]); -ARC("a14","isSimple",true); -ARC("a14","extInfo",["2","2"]); - MOT("a15", [ "origin: CAS library,\n", @@ -3758,7 +3720,7 @@ MOT("a15", 0, 0, [(93,94),(89,90),(82,83),(63,64)], -function( tbl ) return ConstructPermuted( tbl, ["Alternating",15], +function( tbl ) ConstructPermuted( tbl, ["Alternating",15], ( 6,19,45,21,50,46,26,51,53,80,39,91,55,29,16,10,23,11,24,14, 9)( 7,22,48,28, 15, 8,20,49,30,40,68,88,72,73,36,61,87,44,18,13,25,47,27,52,54,92,56,31,41,17, 12)(32,59,57)(33,78,65,84,43,62,71,35,79,38,67,94,64,76,75,86,69)(34,60,70) @@ -3803,7 +3765,7 @@ MOT("a16", 0, 0, [(118,119),(113,114),(107,108),(78,79),(122,123)], -function( tbl ) return ConstructPermuted( tbl, ["Alternating",16], +function( tbl ) ConstructPermuted( tbl, ["Alternating",16], ( 4, 5)( 7, 22, 58, 34, 19, 13, 8, 24, 59, 36, 49, 50, 76, 89, 91, 41, 99, 46, 83,122, 78, 95, 93, 94,109, 86, 39, 97, 45,116, 67,117, 68, 33, 17, 10) ( 9, 25, 60, 55, 31, 61, 65,100, 81,105,119,107, 52, 85,111, 53, 21, 54, 23, diff --git a/tbl/ctomisc6.tbl b/tbl/ctomisc6.tbl index f82e6c4354..52d56849a4 100644 --- a/tbl/ctomisc6.tbl +++ b/tbl/ctomisc6.tbl @@ -4,7 +4,7 @@ ## #H @(#)$Id$ ## -#Y Copyright (C) 1996, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany +#Y Copyright (C) 1997, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany ## ## This file contains the ordinary character tables of miscellaneous ## CAS tables (alphabetical order, 'pap' to 'y') @@ -2368,7 +2368,7 @@ MOT("s14", 0, 0, [], -function( tbl ) return ConstructPermuted( tbl, ["Symmetric",14], +function( tbl ) ConstructPermuted( tbl, ["Symmetric",14], ( 2, 70,117, 32, 39, 10, 80, 25, 74, 23, 8, 72, 18, 89, 26, 9, 5, 3) ( 4, 71, 81, 40, 77, 24, 85,108, 95, 58,126,101,135,113, 31,102, 66, 16, 82,109, 30, 11, 17, 21, 88,127,128, 57, 52, 35,103,134, 48, 15, 6, 73, 90, @@ -2424,7 +2424,7 @@ MOT("s15", 0, 0, [], -function( tbl ) return ConstructPermuted( tbl, ["Symmetric",15], +function( tbl ) ConstructPermuted( tbl, ["Symmetric",15], ( 2, 91, 27, 8, 93, 28, 95, 30, 96,113, 58,122, 76, 67, 78, 17,103,159, 43, 48, 47,100, 54,132,117,168, 81, 62,158,123,157,146,172,139,154,166,151, 38, 129,170,138,153, 39,128, 90,106,164,126, 82,162, 80, 42,131, 33, 13, 22,107, @@ -2493,7 +2493,7 @@ MOT("s16", 0, 0, [], -function( tbl ) return ConstructPermuted( tbl, ["Symmetric",16], +function( tbl ) ConstructPermuted( tbl, ["Symmetric",16], ( 2,119,172,197,214,194, 47,167,151,201,115,145,217,226,199,229, 72,202,157, 116, 55, 56,169,150, 94, 50, 12, 22,137, 38,162,220,175, 41, 58, 61, 18,133, 148, 87,224, 68,155,104,139, 70,156,227,106,143,216,103, 23, 8,122, 64, 17, diff --git a/tbl/ctonews.tbl b/tbl/ctonews.tbl index f84e943704..702f226b7c 100644 --- a/tbl/ctonews.tbl +++ b/tbl/ctonews.tbl @@ -4879,7 +4879,7 @@ ALF("A6.D8","2.M12",[1,2,4,5,6,7,10,10,12,13,4,5,11,15,16,3,17,18,21,22, 10,17,18],[ "fusion is unique up to table automorphisms" ]); -ALN("A6.D8",["2.M12M3","(2xA6).2^2"]); +ALN("A6.D8",["(2xA6).2^2"]); MOT("D8xL4(3).2_2", [ @@ -5030,6 +5030,36 @@ ALF("S4xU4(2).2","O8-(3)",[1,4,2,5,6,7,13,16,18,21,24,25,22,43,54,4,3,12, ]); ALN("S4xU4(2).2",["O8-(3)M7","O8-(3)M8"]); +MOT("2^6:U4(2).2", +[ +"origin: computed in 1997 by E. Mpono using Clifford theory,\n", +"maximal subgroup of 2^6:S6(2) = Fi22M6,\n", +"differs from table of nonsplit extension (HN.2M7)\n", +"only by 2nd power map and representative orders,\n", +"tests: 1.o.r., pow[2,3,5]" +], +0, +[,[1,1,1,1,1,2,2,2,1,1,3,12,13,13,13,16,16,4,5,8,7,10,9,24,24,24,12,13,15,16, +16,15,13,14,35,27,3,3,1,1,3,1,3,2,7,9,9,8,9,9,9,14,14,13,13,17,16,17,16,19,18, +25,24,32,33],[1,2,3,4,5,6,7,8,9,10,11,1,1,3,2,1,3,18,19,20,21,22,23,24,25,26, +4,4,6,4,5,7,9,11,12,18,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,38,37,39, +40,38,39,41,42,60,61,62,63,45,46],,[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17, +18,19,20,21,22,23,1,3,2,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44, +45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,37,39,64,65]], +0, +0, +ConstructDirectProduct); +ARC("2^6:U4(2).2","factors",[["2^6.U4(2).2"]]); +ARC("2^6:U4(2).2","orders",[1,2,2,2,2,4,4,4,2,2,4,3,3,6,6,3,6,4,4,8,8,4,4,5, +10,10,6,6,12,6,6,12,6,12,9,12,4,4,2,2,4,2,4,4,8,4,4,8,4,4,4,12,12,6,6,12,6, +12,6,8,8,20,10,24,12]); +ALF("2^6:U4(2).2","2^6:s6f2",[1,2,2,6,7,8,11,11,9,10,12,19,17,18,18,20,21,22, +23,36,35,34,33,37,38,38,44,39,40,66,67,46,45,47,57,64,5,5,3,4,14,13,15,16, +26,24,25,29,27,28,28,43,43,41,42,49,48,51,50,56,55,59,58,61,60],[ +"fusion is unique" +]); +ALN("2^6:U4(2).2",["2^6:o6f2"]); + LIBTABLE.LOADSTATUS.ctonews:="userloaded"; ALN:= NotifyCharTableName; diff --git a/tbl/ctounit1.tbl b/tbl/ctounit1.tbl index 0310d8f9a6..1a0217fa2f 100644 --- a/tbl/ctounit1.tbl +++ b/tbl/ctounit1.tbl @@ -4,7 +4,7 @@ ## #H @(#)$Id$ ## -#Y Copyright (C) 1996, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany +#Y Copyright (C) 1997, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany ## ## This file contains the ordinary character tables of groups related to ## the unitary group $U_4(3)$ of the ATLAS. @@ -3077,7 +3077,7 @@ MOT("U4(3).2_2'", 0, 0, [(16,17)(23,24)(33,34)], -function( tbl ) return ConstructPermuted(tbl,["U4(3).2_2"], +function( tbl ) ConstructPermuted(tbl,["U4(3).2_2"], ( 4, 5)(11,12)(15,16,17),( 5, 7)( 6, 8)(17,18,19,20,21)(22,24)(23,25) );end); ALF("U4(3).2_2'","U4(3).(2^2)_{122}",[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, 16,17,46,47,48,49,50,50,51,52,53,54,55,56,57,58,59,59]); @@ -3160,7 +3160,7 @@ MOT("U4(3).2_3'", 0, 0, 0, -function( tbl ) return ConstructPermuted(tbl,["U4(3).2_3"], +function( tbl ) ConstructPermuted(tbl,["U4(3).2_3"], (),());end); MOT("U4(3).4", diff --git a/tbl/ctprimar.tbl b/tbl/ctprimar.tbl index dd0ea441ae..f27a80ecf9 100644 --- a/tbl/ctprimar.tbl +++ b/tbl/ctprimar.tbl @@ -28,7 +28,7 @@ LIBLIST := rec(); ## ## Read the data that was automatically produced. ## -LIBLIST.firstnames := [ +LIBLIST.firstnames := Immutable( [ # file ctoalter "(2xA6).2_3", "2.A10", "2.A10.2", "2.A11", "2.A11.2", "2.A12", "2.A12.2", "2.A13", "2.A13.2", "2.A5", "2.A5.2", "2.A6", "2.A6.2_1", "2.A6.2_2", @@ -44,7 +44,7 @@ LIBLIST.firstnames := [ "G2(3).2", "G2(4)", "G2(4).2", "G2(5)", "R(27)", "R(27).3", "Sz(32)", "Sz(32).5", "Sz(8)", "Sz(8).3", # file ctocliff - "3^(1+10):U5(2):2", "3^5:U4(2)", "3^7:O7(3)", + "3^(1+10):U5(2):2", "3^5:U4(2)", "3^7:O7(3)", "2^7:S6(2)", # file ctoconja "2.Co1", "2.J2", "2.J2.2", "3.J3", "3.J3.2", "Co1", "Co2", "Co3", "J1", "J2", "J2.2", "J3", "J3.2", "J4", @@ -140,7 +140,8 @@ LIBLIST.firstnames := [ "6.M22M7", "12.M22M7", "2xL2(11)", "3xL2(11)", "2.(2xL2(11))", "6xL2(11)", "3x2.(2xL2(11))", "McLM10", "2^4:a8", "2^6:(psl(3,2)xs3)", "2^6:3.s6", "2xS5", "3^2.2.S4", "4^2:D12", "4^2:D12.2", "A4xS3", "M12M7", "M22.2M5", - "M8.S4", "S4xS3", + "M8.S4", "S4xS3", "2xM11", "2.M12M2", "2.M12M4", "2x3^2.2.S4", "2.M12M7", + "2.M12M8", "2.M12M9", "2.M12M10", "2.A4xS3", # file ctomaxi2 "(2^2xSz(8)):3", "(3^2:4xa6).2", "(3xG2(3)):2", "(D10xU3(5)).2", "(a4xpsl(3,4)):2", "(a6xa5).2", "2.(2^2xSz(8)):3", "2.2.2^4+6:S5", @@ -216,6 +217,7 @@ LIBLIST.firstnames := [ "3^3:A4", "3^4.2U4(2)", "3^4.2U4(2).2", "3^4:(2xA5)", "3^4:A6", "3^6:L4(3)", "3^7.O7(3)", "5^(1+4):GL(2,5)", "6xU5(2)", "7^2:2.L2(7).2", "A6.D8", "D8xL4(3).2_2", "M22.2M2", "O7(3).2x2", "S4xU4(2).2", + "2^6:U4(2).2", # file ctoorth1 "2.O7(3)", "2.O7(3).2", "3.O7(3)", "3.O7(3).2", "6.O7(3)", "6.O7(3).2", "Fi22M3", "O7(3)", "O7(3).2", @@ -276,12 +278,12 @@ LIBLIST.firstnames := [ # file ctounit4 "2.U6(2)", "2.U6(2).2", "2^2.U6(2)", "2^2.U6(2).2", "2^2.U6(2).3", "2^2.U6(2).3.2", "3.U6(2)", "3.U6(2).2", "3.U6(2).3", "6.U6(2)", - "6.U6(2).2", "U6(2)", "U6(2).2", "U6(2).3", "U6(2).3.2", ]; + "6.U6(2).2", "U6(2)", "U6(2).2", "U6(2).3", "U6(2).3.2", ] ); -LIBLIST.filenames := Concatenation( [ +LIBLIST.filenames := Immutable( Concatenation( [ List( [ 1 .. 57 ], x -> 1 ), List( [ 1 .. 22 ], x -> 2 ), - List( [ 1 .. 3 ], x -> 3 ), + List( [ 1 .. 4 ], x -> 3 ), List( [ 1 .. 14 ], x -> 4 ), List( [ 1 .. 8 ], x -> 5 ), List( [ 1 .. 5 ], x -> 6 ), @@ -294,7 +296,7 @@ LIBLIST.filenames := Concatenation( [ List( [ 1 .. 16 ], x -> 13 ), List( [ 1 .. 8 ], x -> 14 ), List( [ 1 .. 25 ], x -> 15 ), - List( [ 1 .. 49 ], x -> 16 ), + List( [ 1 .. 58 ], x -> 16 ), List( [ 1 .. 86 ], x -> 17 ), List( [ 1 .. 30 ], x -> 18 ), List( [ 1 .. 19 ], x -> 19 ), @@ -307,7 +309,7 @@ LIBLIST.filenames := Concatenation( [ List( [ 1 .. 1 ], x -> 26 ), List( [ 1 .. 32 ], x -> 27 ), List( [ 1 .. 3 ], x -> 28 ), - List( [ 1 .. 36 ], x -> 29 ), + List( [ 1 .. 37 ], x -> 29 ), List( [ 1 .. 9 ], x -> 30 ), List( [ 1 .. 16 ], x -> 31 ), List( [ 1 .. 7 ], x -> 32 ), @@ -322,9 +324,9 @@ LIBLIST.filenames := Concatenation( [ List( [ 1 .. 29 ], x -> 41 ), List( [ 1 .. 12 ], x -> 42 ), List( [ 1 .. 15 ], x -> 43 ), - ] ); + ] ) ); -LIBLIST.files := [ +LIBLIST.files := Immutable( [ "ctoalter", "ctoatres", "ctocliff", "ctoconja", "ctofisc1", "ctofisc2", "ctoholpl", "ctoinert", "ctoline1", "ctoline2", "ctoline3", "ctoline4", "ctoline5", "ctoline6", "ctomathi", "ctomaxi1", "ctomaxi2", "ctomaxi3", @@ -332,9 +334,9 @@ LIBLIST.files := [ "ctomisc4", "ctomisc5", "ctomisc6", "ctomonst", "ctonews", "ctoorth1", "ctoorth2", "ctoorth3", "ctoorth4", "ctoorth5", "ctospora", "ctosylno", "ctosympl", "ctotwis1", "ctotwis2", "ctounit1", "ctounit2", "ctounit3", - "ctounit4", ]; + "ctounit4", ] ); -LIBLIST.fusionsource := [ +LIBLIST.fusionsource := Immutable( [ [ # fusions to (2xA6).2_3 "4.A6.2_3", "6.M22M7", ], [ # fusions to 2.A10 @@ -511,6 +513,8 @@ LIBLIST.fusionsource := [ ], [ # fusions to 3^7:O7(3) ], + [ # fusions to 2^7:S6(2) + ], [ # fusions to 2.Co1 "2.2^11:M24", "6.Suz.2", ], [ # fusions to 2.J2 @@ -572,7 +576,7 @@ LIBLIST.fusionsource := [ "O8+(2).2", "O8+(2).3.2", "Fi22N5", "2F4(2)'", "U4(3)", "U4(3).2_2", "2.U6(2)", ], [ # fusions to Fi22.2 - "2.Fi22.2", "3.Fi22.2", "6.Fi22.2", "Fi22", "M12.2", + "2^7:S6(2)", "2.Fi22.2", "3.Fi22.2", "6.Fi22.2", "Fi22", "M12.2", "(2x2^(1+8):U4(2):2):2", "S3xU4(3).(2^2)_{122}", "O8+(2):S3x2", ], [ # fusions to 3.F3+ "Fi23", ], @@ -1156,7 +1160,8 @@ LIBLIST.fusionsource := [ [ # fusions to 12.M22.2 "12.M22", ], [ # fusions to 2.M12 - "A6.D8", ], + "2.L2(11)", "2xM11", "2.M12M2", "2.M12M4", "2x3^2.2.S4", "2.M12M7", + "2.M12M8", "2.M12M9", "2.M12M10", "2.A4xS3", "A6.D8", ], [ # fusions to 2.M12.2 "2.M12", ], [ # fusions to 2.M22 @@ -1309,6 +1314,24 @@ LIBLIST.fusionsource := [ ], [ # fusions to S4xS3 ], + [ # fusions to 2xM11 + ], + [ # fusions to 2.M12M2 + ], + [ # fusions to 2.M12M4 + ], + [ # fusions to 2x3^2.2.S4 + ], + [ # fusions to 2.M12M7 + ], + [ # fusions to 2.M12M8 + ], + [ # fusions to 2.M12M9 + ], + [ # fusions to 2.M12M10 + ], + [ # fusions to 2.A4xS3 + ], [ # fusions to (2^2xSz(8)):3 "2.(2^2xSz(8)):3", ], [ # fusions to (3^2:4xa6).2 @@ -1724,7 +1747,7 @@ LIBLIST.fusionsource := [ [ # fusions to 2^10:m22 ], [ # fusions to 2^6:s6f2 - ], + "2^6:U4(2).2", ], [ # fusions to f22s2 ], [ # fusions to g61 @@ -1935,6 +1958,8 @@ LIBLIST.fusionsource := [ "O7(3).2", ], [ # fusions to S4xU4(2).2 "U4(2).2", ], + [ # fusions to 2^6:U4(2).2 + ], [ # fusions to 2.O7(3) "6.O7(3)", ], [ # fusions to 2.O7(3).2 @@ -2205,8 +2230,8 @@ LIBLIST.fusionsource := [ [ # fusions to S4(5).2 "2.S4(5).2", "S4(5)", ], [ # fusions to S6(2) - "A8.2", "L2(8).3", "2.[2^6]:(S3xS3)", "2^5:S6", "2^6:L3(2)", "S3xS6", - "2.S6(2)", "U3(3).2", "U4(2).2", ], + "A8.2", "2^7:S6(2)", "L2(8).3", "2.[2^6]:(S3xS3)", "2^5:S6", "2^6:L3(2)", + "S3xS6", "2.S6(2)", "U3(3).2", "U4(2).2", ], [ # fusions to S6(3) "3^(1+4).2U4(2)", "2.S6(3)", ], [ # fusions to S6(3).2 @@ -2442,7 +2467,7 @@ LIBLIST.fusionsource := [ "2^2.U6(2).3", "3.U6(2).3", "U6(2)", ], [ # fusions to U6(2).3.2 "U6(2).2", "U6(2).3", ], - ]; + ] ); LIBLIST.names := [ ["(2^(1+8)x2^6):S6(2)","(2^(1+8)x2^6):s6(2)","f4(2)m1","f4(2)m2"], @@ -2523,6 +2548,7 @@ LIBLIST.names := [ ["2.A12.2","2.a12.2","2.s12"], ["2.A13","2.a13"], ["2.A13.2","2.a13.2","2.s13"], + ["2.A4xS3","2.a4xs3","2.m12m11"], ["2.A5","2.a1(4)","2.a1(5)","2.a5","2.j2m9","2.l2(4)","2.l2(5)","2.o3(4)", "2.o3(5)","2.o4-(2)","2.s2(4)","2.s2(5)","2.u2(4)","2.u2(5)"], ["2.A5.2","2.a5.2","2.s5"], @@ -2552,7 +2578,8 @@ LIBLIST.names := [ ["2.J2","2.j2"], ["2.J2.2","2.j2.2"], ["2.J2M8","2.j2m8"], - ["2.L2(11)","2.a1(11)","2.l2(11)","2.o3(11)","2.s2(11)","2.u2(11)"], + ["2.L2(11)","2.a1(11)","2.l2(11)","2.m12m5","2.o3(11)","2.s2(11)","2.u2(11)" + ], ["2.L2(11).2","2.l2(11).2"], ["2.L2(13)","2.a1(13)","2.l2(13)","2.o3(13)","2.s2(13)","2.u2(13)"], ["2.L2(13).2","2.l2(13).2"], @@ -2594,6 +2621,12 @@ LIBLIST.names := [ ["2.L4(3).2_3","2.l4(3).2_3"], ["2.M12","2.m12"], ["2.M12.2","2.m12.2"], + ["2.M12M10","2.m12m10"], + ["2.M12M2","2.m12m2"], + ["2.M12M4","2.m12m4"], + ["2.M12M7","2.m12m7"], + ["2.M12M8","2.m12m8"], + ["2.M12M9","2.m12m9"], ["2.M22","2.m22"], ["2.M22.2","2.m22.2"], ["2.M22M2","2.m22m2"], @@ -2718,9 +2751,11 @@ LIBLIST.names := [ ["2^6:3.s6","2^6:3.s6","hem3","hem4","m24m5"], ["2^6:L3(2)","2^6:l3(2)","s6(2)m5"], ["2^6:U4(2)","2^6:u4(2)","o8-(2)m1"], + ["2^6:U4(2).2","2^6:o6f2","2^6:u4(2).2"], ["2^6:s6f2","2^6:s6f2","f22m6","fi22m6"], ["2^6:u3(3)","2^6:u3(3)"], ["2^6:u3(3):2","2^6:u3(3):2","rum2"], + ["2^7:S6(2)","2^6:s6f2.2","2^7:s6(2)","2^7:s6f2","fi22.2m6"], ["2^8:O8-(2)","2^8.o8-(2)","2^8:o8-(2)","o10-(2)m1"], ["2^9.L3(4)","2^9.l3(4)","2^9:l3(4)","u6(2)m3"], ["2^{1+4}_-:2A5","2.j2m3","2^{1+4}_-:2a5"], @@ -2730,10 +2765,12 @@ LIBLIST.names := [ ["2x(3^2.QD16)","2x(3^2.qd16)","hsn3"], ["2x2^3:L3(2)","2.m22m6","2^3:l3(2)x2","2x2^3:l3(2)","m22.2m6"], ["2x3.O7(3)","2x3.o7(3)","6.fi22m2","6.fi22m3"], + ["2x3^2.2.S4","2.m12m6","2x3^2.2.s4"], ["2x7:3","2x7:3"], ["2xA5","2xa5","j1m3"], ["2xA7","2.m22m3","2.m22m4","2xa7"], ["2xL2(11)","2.m22m8","2xl2(11)"], + ["2xM11","2.m12m1","2xm11"], ["2xO7(3)","2.fi22m2","2.fi22m3","2xo7(3)"], ["2xS5","2xs5","m12m8"], ["2xS6(2)","2xs6(2)","w(e7)"], @@ -3481,7 +3518,7 @@ Unbind( LIBLIST.pos ); SortParallel( LIBLIST.allnames, LIBLIST.position ); -LIBLIST.projections := [ +LIBLIST.projections := Immutable( [ ["(2xA6).2_3","A6.2_3",ProjectionMap( [1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8])], ["2.A10","A10",ProjectionMap( @@ -4364,9 +4401,9 @@ LIBLIST.projections := [ 32,32,33,33,33,33,33,33,34,34,34,34,34,34,35,35,35,36,36,36,37,37,37,37, 37,37,38,38,38,39,39,39,40,40,40,40,40,40,41,41,41,42,42,42,43,43,43,43, 43,43,44,44,44,44,44,44,45,45,45,45,45,45,46,46,46,46,46,46])], - ]; + ] ); -LIBLIST.simpleInfo := [ +LIBLIST.simpleInfo := Immutable( [ [ "2", "A10", "2" ], [ "2", "A11", "2" ], [ "2", "A12", "2" ], @@ -4467,13 +4504,15 @@ LIBLIST.simpleInfo := [ [ "2", "U4(2)", "2" ], [ "", "U5(2)", "2" ], [ "(2^2x3)", "U6(2)", "3.2" ], - ]; + ] ); -LIBLIST.sporadicSimple := Immutable( [ - "M11", "M12", "J1", "M22", "J2", "M23", "HS", "J3", "M24", "McL", "He", - "Ru", "Suz", "ON", "Co3", "Co2", "Fi22", "HN", "Ly", "Th", "Fi23", "Co1", - "J4", "F3+", "B", "M" ] ); +LIBLIST.sporadicSimple := Immutable( [ + "M11", "M12", "J1", "M22", "J2", "M23", "HS", "J3", + "M24", "McL", "He", "Ru", "Suz", "ON", "Co3", "Co2", + "Fi22", "HN", "Ly", "Th", "Fi23", "Co1", "J4", "F3+", + "B", "M" ] ); + LIBLIST.GENERIC := [ "Cyclic", "Dihedral", @@ -4496,7 +4535,6 @@ LIBLIST.GENERIC:= rec( allnames:= List( LIBLIST.GENERIC, LowercaseString ), firstnames:= LIBLIST.GENERIC ); - ############################################################################# ## #E ctprimar.tbl . . . . . . . . . . . . . . . . . . . . . . . . . ends here diff --git a/trans/trans.grp b/trans/trans.grp index 6b0714b85b..9978de683b 100644 --- a/trans/trans.grp +++ b/trans/trans.grp @@ -439,7 +439,7 @@ local dom,p,s,t,a,cand,i,grp,deg,aiso,piso; a:=Image(aiso,grp); for i in ConjugacyClasses(a) do s:=ConjugacyClass(grp,PreImagesRepresentative(aiso,Representative(i))); - SetStabilizerOfExternalSet(s,PreImage(aiso,i.centralizer)); + SetStabilizerOfExternalSet(s,PreImage(aiso,Centralizer(i))); Add(t,s); od; SetConjugacyClasses(grp,t); diff --git a/tst/algsc.tst b/tst/algsc.tst index f51e09ff71..93a5ce0112 100644 --- a/tst/algsc.tst +++ b/tst/algsc.tst @@ -180,7 +180,7 @@ gap> LieCentre( s1 ); gap> LieCentralizer( l1, s1 ); gap> ps:= ProductSpace( l1, s1 ); - +VectorSpace( Rationals, [ v.4, v.3, v.6, v.5, v.9, v.8 ] ) gap> LieCentralizer( l1, ps ); gap> LieNormalizer( l1, ps ); @@ -479,7 +479,7 @@ gap> LieCentre( s2 ); gap> LieCentralizer( l2, s2 ); gap> ps:= ProductSpace( l2, s2 ); - +VectorSpace( Rationals, [ v.5, v.6, v.1, v.9, v.10, v.13 ] ) gap> LieCentralizer( l2, ps ); gap> LieNormalizer( l2, ps ); @@ -635,7 +635,7 @@ gap> LieCentre( s3 ); gap> LieCentralizer( l3, s3 ); gap> ps:= ProductSpace( l3, s3 ); - +VectorSpace( Rationals, [ v.2, v.3, v.4, v.1 ] ) gap> LieCentralizer( l3, ps ); gap> LieNormalizer( l3, ps ); diff --git a/tst/grpmat.tst b/tst/grpmat.tst index 901ac48345..8c485bffa5 100644 --- a/tst/grpmat.tst +++ b/tst/grpmat.tst @@ -28,14 +28,16 @@ Pcgs([ [ [ 0, 1 ], [ -1, 0 ] ], [ [ E(4), 0 ], [ 0, -E(4) ] ], [ [ -1, 0 ], [ 0, -1 ] ] ]) gap> cl := ConjugacyClasses( G ); [ ConjugacyClass( Q8, [ [ 1, 0 ], [ 0, 1 ] ] ), - ConjugacyClass( Q8, [ [ -1, 0 ], [ 0, -1 ] ] ), - ConjugacyClass( Q8, [ [ E(4), 0 ], [ 0, -E(4) ] ] ), ConjugacyClass( Q8, [ [ 0, 1 ], [ -1, 0 ] ] ), - ConjugacyClass( Q8, [ [ 0, -E(4) ], [ -E(4), 0 ] ] ) ] + ConjugacyClass( Q8, [ [ E(4), 0 ], [ 0, -E(4) ] ] ), + ConjugacyClass( Q8, [ [ 0, -E(4) ], [ -E(4), 0 ] ] ), + ConjugacyClass( Q8, [ [ -1, 0 ], [ 0, -1 ] ] ) ] gap> List( cl, c -> ExponentsOfPcElement( pcgs, Representative( c ) ) ); -[ [ 0, 0, 0 ], [ 0, 0, 1 ], [ 0, 1, 0 ], [ 1, 0, 0 ], [ 1, 1, 0 ] ] +[ [ 0, 0, 0 ], [ 1, 0, 0 ], [ 0, 1, 0 ], [ 1, 1, 0 ], [ 0, 0, 1 ] ] gap> Size( AutomorphismGroup( G ) ); 24 +gap> Length(ConjugacyClasses(GL(4,3))); +78 gap> STOP_TEST( "grpmat.tst", 199830000 ); diff --git a/tst/grppc.tst b/tst/grppc.tst index b5eb377c20..c4b5989119 100644 --- a/tst/grppc.tst +++ b/tst/grppc.tst @@ -45,6 +45,18 @@ gap> gens[9], gens[10], gens[11], gens[12], gens[13], gens[14] );; gap> v:=Group( gens[1], gens[2], gens[3]*gens[5], gens[4]*gens[6], gap> gens[7]*gens[11],gens[8]*gens[12],gens[9]*gens[13], gens[10]*gens[14]);; gap> Intersection(u,v);; +gap> g:=Group((1,15,8,4,14,9)(2,16,7,3,13,10)(5,18,12)(6,17,11), +gap> (1,3)(2,4)(7,9)(8,10)(13,15)(14,16), +gap> (1,3,6)(2,4,5)(7,9,12)(8,10,11)(13,15,18)(14,16,17), +gap> (5,6)(7,8)(9,10)(13,14)(15,16),(1,2)(7,8)(13,14),(1,2)(3,4)(5,6), +gap> (7,8)(9,10)(11,12),(13,14)(15,16)(17,18));; +gap> cl:=ConjugacyClasses(Image(IsomorphismPcGroup(g),g));; +gap> G := Group( ( 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14), (15,16) );; +gap> sys := SylowSystem( G );; +gap> List( sys, Size ); +[ 4, 7 ] +gap> List(sys,i->Length(AsList(i))); +[ 4, 7 ] # that's all, folks gap> STOP_TEST( "grppc.tst", 46360000 ); diff --git a/tst/grpperm.tst b/tst/grpperm.tst new file mode 100644 index 0000000000..8fbe3ca13f --- /dev/null +++ b/tst/grpperm.tst @@ -0,0 +1,35 @@ +############################################################################# +## +#W grpperm.tst GAP tests Alexander Hulpke +## +#H @(#)$Id$ +## +#Y Copyright (C) 1997 +## +## + +gap> START_TEST("$Id$"); +gap> G1 := TrivialSubgroup (Group ((1,2)));; +gap> G2 := SymmetricGroup ([]);; +gap> G3:=Intersection (G1, G2);; +gap> Size(G3); +1 +gap> Pcgs(G3);; + +gap> g:=Group( (1,2,3), (2,3)(4,5) );; +gap> IsSolvable(g); +true +gap> RepresentativeOperation(g,(2,5,3), (2,3,4)); +(2,3)(4,5) +gap> g:=Group(( 9,11,10), ( 2, 3, 4), (14,17,15), (13,16)(15,17), +gap> ( 8,12)(10,11), ( 5, 7)(10,11), (15,16,17), (10,11,12));; +gap> Sum(ConjugacyClasses(g),Size)=Size(g); +true + +# that's all, folks +gap> STOP_TEST( "grpperm.tst", 463600 ); + +############################################################################# +## +#E grpperm.tst . . . . . . . . . . . . . . . . . . . . . . . . . . ends here +## diff --git a/tst/mapping.tst b/tst/mapping.tst index 2c617e3663..10c35d600e 100644 --- a/tst/mapping.tst +++ b/tst/mapping.tst @@ -263,6 +263,12 @@ gap> ImagesSource( map ); gap> PreImagesRange( map ); [ 0*Z(3), Z(3)^0, Z(3) ] +gap> g := Group((1,2),(3,4));; +gap> i := IdentityMapping( g );; +gap> i2 := AsGroupGeneralMappingByImages(i);; +gap> j:=GroupGeneralMappingByImages(g,g,AsListSorted(g),AsListSorted(g));; +gap> i2 = j; +true gap> STOP_TEST( "mapping.tst", 9860000 ); diff --git a/tst/modfree.tst b/tst/modfree.tst index 205127c230..479947be80 100644 --- a/tst/modfree.tst +++ b/tst/modfree.tst @@ -90,7 +90,7 @@ true gap> IsSubset( w, GF(2)^2 ); false gap> IsSubset( GF(2)^2, w ); -true +false gap> IsSubset( w, GF(4)^2 ); false gap> IsSubset( GF(4)^2, w ); diff --git a/tst/morpheus.tst b/tst/morpheus.tst index eaad160c8a..faa82ff59d 100644 --- a/tst/morpheus.tst +++ b/tst/morpheus.tst @@ -40,6 +40,11 @@ gap> p:=IsomorphismPcGroup(a);; gap> Image(p,a.1);; gap> Image(p,a.1*a.2);; gap> Pcgs(a);; +gap> s4 := Group( (3,4), (1,2,3,4) );; +gap> d8 := Subgroup( s4, [ (1,2)(3,4), (1,2,3,4) ] );; +gap> autd8 := AutomorphismGroup( d8 );; +gap> Size(autd8); +8 # that's all, folks gap> STOP_TEST( "morpheus.tst", 657320000 ); diff --git a/tst/testall.g b/tst/testall.g index 92526f6770..5bad002ca7 100644 --- a/tst/testall.g +++ b/tst/testall.g @@ -1,3 +1,13 @@ +############################################################################# +## +#W testall.g GAP library Frank Celler +## +#H @(#)$Id$ +## +#Y Copyright (C) 1997, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany +## + + ############################################################################# ## #F START_TEST( ) . . . . . . . . . . . . . . . . . . . start test file @@ -25,6 +35,8 @@ STONE_STONE := 0; STONE_FILE := 0; STONE_SUM := 0; STONE_FSUM := 0; +STONE_PROD := 1; +STONE_COUNT := 0; STOP_TEST := function( file, fac ) local time; @@ -33,7 +45,9 @@ STOP_TEST := function( file, fac ) STONE_RTIME := Runtime() - START_TIME; STONE_STONE := QuoInt( fac, STONE_RTIME ); STONE_SUM := STONE_SUM + STONE_RTIME; - STONE_FSUM := STONE_FSUM + fac; + STONE_FSUM := STONE_FSUM + fac; + STONE_PROD := STONE_PROD*STONE_STONE; + STONE_COUNT :=STONE_COUNT + 1; end; @@ -63,10 +77,10 @@ end; ## TestDir := DirectoriesLibrary("tst"); -Print("You should start GAP4 using: `gap -N -M -m 16m'. The more \n"); -Print("GAP4stones you get, the faster your system is. The runtime of\n"); -Print("the following tests (in general) increases. You should expect\n"); -Print("about 10000 GAP4stones on a Pentium 5, 133 MHz, about 22000 on\n"); +Print("You should start GAP4 using: `gap -N -M -m 16m'. The more\n"); +Print("GAP4stones you get, the faster your system is. The runtime of\n"); +Print("the following tests (in general) increases. You should expect\n"); +Print("about 10000 GAP4stones on a Pentium 5, 133 MHz, about 28000 on\n"); Print("a Pentium Pro, 200 Mhz. The `next' time is an approximation of\n"); Print("the running time for the next test.\n"); Print("\n"); @@ -79,7 +93,6 @@ infoRead1 := InfoRead1; InfoRead1 := Ignore; infoRead2 := InfoRead2; InfoRead2 := Ignore; ReadTest( Filename( TestDir, "unknown.tst" ) ); SHOW_STONES(64); -ReadTest( Filename( TestDir, "boolean.tst" ) ); SHOW_STONES(64); ReadTest( Filename( TestDir, "listgen.tst" ) ); SHOW_STONES(89); ReadTest( Filename( TestDir, "gaussian.tst" ) ); SHOW_STONES(218); ReadTest( Filename( TestDir, "grpfree.tst" ) ); SHOW_STONES(481); @@ -108,11 +121,16 @@ ReadTest( Filename( TestDir, "grplatt.tst" ) ); SHOW_STONES(0); Print("-------------------------------------------\n"); Print( FormattedString("total",-16), " ", - FormattedString(QuoInt(STONE_FSUM,STONE_SUM),8), " ", - FormattedString(STONE_RTIME,8), "\n" ); + FormattedString(RootInt(STONE_PROD,STONE_COUNT),8), " ", + FormattedString(STONE_SUM,8), "\n" ); Print("\n"); InfoRead1 := infoRead1; InfoRead2 := infoRead2; START_TEST := start_TEST; -STOP_TEST := STOP_TEST; +STOP_TEST := stop_TEST; + + +############################################################################# +## +#E testall.g . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here diff --git a/tst/vspcmat.tst b/tst/vspcmat.tst index 7ac25f63e2..ad84670324 100644 --- a/tst/vspcmat.tst +++ b/tst/vspcmat.tst @@ -389,6 +389,12 @@ SemiEchelonBasis( VectorSpace( Rationals, [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 0, 0 ], [ 0, 1 ] ] ] ), [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 0, 0 ], [ 0, 1 ] ] ] ) +gap> mb:= MutableBasisByGenerators( Rationals, [], [ [ 0, 0 ], [ 0, 0 ] ] ); + +gap> CloseMutableBasis( mb, [ [ 1, 0 ], [ 0, 1 ] ] ); +gap> CloseMutableBasis( mb, [ [ 0, 1 ], [ 1, 0 ] ] ); +gap> IsContainedInSpan( mb, [ [ 1, 1 ], [ 1, 1 ] ] ); +true gap> STOP_TEST( "vspcmat.tst", 35560000 ); diff --git a/tst/weakptr.tst b/tst/weakptr.tst new file mode 100644 index 0000000000..2092ca5f91 --- /dev/null +++ b/tst/weakptr.tst @@ -0,0 +1,64 @@ +############################################################################# +## +#W weakptr.tst GAP Library Steve Linton +## +#H @(#)$Id$ +## +#Y Copyright (C) 1997, +## + +gap> START_TEST("$Id$"); + + +# +# Low level access functions +# +gap> w := WeakPointerObj([1,,2^40,Z(17),[2,3,4],fail,SymmetricGroup(5),]); +WeakPointerObj( [ 1, , 1099511627776, Z(17), +[ 2, 3, 4 ], fail, Sym[ 1 .. 5 ]] ) +gap> LengthWPObj(w); +7 +gap> List([1..7],x->IsBoundElmWPObj(w,x)); +[ true, false, true, true, true, true, true ] +gap> List([1..7],x->ElmWPObj(w,x)); +[ 1, fail, 1099511627776, Z(17), [ 2, 3, 4 ], fail, Sym[ 1 .. 5 ] ] +gap> SetElmWPObj(w,9,[]); +gap> w; +WeakPointerObj( [ 1, , 1099511627776, Z(17), +[ 2, 3, 4 ], fail, Sym[ 1 .. 5 ], , [ ]] ) +gap> UnbindElmWPObj(w,4); +gap> w; +WeakPointerObj( [ 1, , 1099511627776, , [ 2, 3, 4 ], fail, Sym[ 1 .. 5 ], , +[ ]] ) +gap> UnbindElmWPObj(w,9); LengthWPObj(w); +7 +gap> GASMAN("collect"); +gap> w; +WeakPointerObj( [ 1, , , , , fail] ) +gap> LengthWPObj(w); +6 +gap> ShallowCopy(w); +WeakPointerObj( [ 1, , , , , fail] ) +# +# Access as lists +# +gap> w[1]; +1 +gap> w{[2..4]} := [[1,2],E(5),311]; +[ [ 1, 2 ], E(5), 311 ] +gap> w; +WeakPointerObj( [ 1, [ 1, 2 ], E(5), 311, , fail] ) +gap> StructuralCopy(w); +WeakPointerObj( [ 1, [ 1, 2 ], E(5), 311, , fail] ) +gap> Immutable(w); +[ 1, [ 1, 2 ], E(5), 311,, fail ] +gap> IsBound(w[2]); +true +gap> GASMAN("collect"); +gap> IsBound(w[5]); +false +gap> Unbind(w[2]); +gap> w; +WeakPointerObj( [ 1, , E(5), 311, , fail] ) + +gap> STOP_TEST( "weakptr.tst", 12000000 ); diff --git a/tst/zmodnz.tst b/tst/zmodnz.tst index ae272655c0..32d7927d63 100644 --- a/tst/zmodnz.tst +++ b/tst/zmodnz.tst @@ -256,10 +256,9 @@ gap> List( [ 1 .. Length( rings ) ], i -> Random( rings[i] ) in rings[i] ); gap> List( rings, Size ); [ 2, 3, 4, 6, 8 ] gap> List( rings, Units ); -[ [ Z(2)^0 ], [ Z(3)^0, Z(3) ], [ ZmodnZObj( 1, 4 ), ZmodnZObj( 3, 4 ) ], - [ ZmodnZObj( 1, 6 ), ZmodnZObj( 5, 6 ) ], - [ ZmodnZObj( 1, 8 ), ZmodnZObj( 3, 8 ), ZmodnZObj( 5, 8 ), - ZmodnZObj( 7, 8 ) ] ] +[ Group( [ Z(2)^0 ], ... ), Group( [ Z(3) ], ... ), + Group( [ ZmodnZObj( 3, 4 ) ], ... ), Group( [ ZmodnZObj( 5, 6 ) ], ... ), + Group( [ ZmodnZObj( 7, 8 ), ZmodnZObj( 5, 8 ) ], ... ) ] gap> enum:= Enumerator( Integers mod 9 );