Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/tst/testspecial/   (GAP Algebra Version 4.15.1©)  Datei vom 18.9.2025 mit Größe 4 kB image not shown  

Quelle  trace.g.out   Sprache: unbekannt

 
Spracherkennung für: .out vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

gap> #
gap> # tracing of operations
gap> #
gap> 
gap> # create a dummy operation
gap> o:=NewOperation("dummy",[]);
<Operation "dummy">
gap> InstallOtherMethod(o,[],{}->[]);
gap> InstallOtherMethod(o,[IsInt],{arg...}->arg);
gap> InstallOtherMethod(o,[IsInt,IsInt],{arg...}->arg);
gap> InstallOtherMethod(o,[IsInt,IsInt],{arg...}->arg);
gap> InstallOtherMethod(o,[IsInt,IsInt,IsInt],{arg...}->arg);
gap> InstallOtherMethod(o,[IsInt,IsInt,IsInt,IsInt],{arg...}->arg);
gap> InstallOtherMethod(o,[IsInt,IsInt,IsInt,IsInt,IsInt],{arg...}->arg);
gap> InstallOtherMethod(o,[IsInt,IsInt,IsInt,IsInt,IsInt,IsInt],{arg...}->arg);
gap> 
gap> # without tracing
gap> o();
[  ]
gap> o(1);
1 ]
gap> o(1,2);
12 ]
gap> o(1,2,3);
123 ]
gap> o(1,2,3,4);
1234 ]
gap> o(1,2,3,4,5);
12345 ]
gap> o(1,2,3,4,5,6);
123456 ]
gap> o(1,2,3,4,5,6,7); # not (yet?) supported
Error, sorry: cannot yet have X argument operations
not in any function at *stdin*:25
gap> 
gap> # with tracing
gap> TraceMethods( o );
gap> o();
#I  dummy at *stdin*:8
[  ]
gap> o(1);
#I  dummy at *stdin*:9
1 ]
gap> o(1,2);
#I  dummy at *stdin*:11
12 ]
gap> o(1,2,3);
#I  dummy at *stdin*:12
123 ]
gap> o(1,2,3,4);
#I  dummy at *stdin*:13
1234 ]
gap> o(1,2,3,4,5);
#I  dummy at *stdin*:14
12345 ]
gap> o(1,2,3,4,5,6);
#I  dummy at *stdin*:15
123456 ]
gap> o(1,2,3,4,5,6,7);
Error, sorry: cannot yet have X argument operations
not in any function at *stdin*:36
gap> UntraceMethods( o ); # not (yet?) supported
gap> 
gap> # again without tracing
gap> o();
[  ]
gap> o(1);
1 ]
gap> o(1,2);
12 ]
gap> o(1,2,3);
123 ]
gap> o(1,2,3,4);
1234 ]
gap> o(1,2,3,4,5);
12345 ]
gap> o(1,2,3,4,5,6);
123456 ]
gap> o(1,2,3,4,5,6,7); # not (yet?) supported
Error, sorry: cannot yet have X argument operations
not in any function at *stdin*:47
gap> 
gap> #
gap> # tracing of constructors
gap> #
gap> 
gap> # create a dummy constructor
gap> o:=NewConstructor("foobar",[IsObject]);
<Constructor "foobar">
gap> InstallOtherMethod(o,[IsInt],{arg...}->arg);
gap> InstallOtherMethod(o,[IsInt,IsInt],{arg...}->arg);
gap> InstallOtherMethod(o,[IsInt,IsInt],{arg...}->arg);
gap> InstallOtherMethod(o,[IsInt,IsInt,IsInt],{arg...}->arg);
gap> InstallOtherMethod(o,[IsInt,IsInt,IsInt,IsInt],{arg...}->arg);
gap> InstallOtherMethod(o,[IsInt,IsInt,IsInt,IsInt,IsInt],{arg...}->arg);
gap> InstallOtherMethod(o,[IsInt,IsInt,IsInt,IsInt,IsInt,IsInt],{arg...}->arg);
gap> 
gap> # without tracing
gap> o(IsInt);
[ <Category "IsInt"> ]
gap> o(IsInt,2);
[ <Category "IsInt">, 2 ]
gap> o(IsInt,2,3);
[ <Category "IsInt">, 23 ]
gap> o(IsInt,2,3,4);
[ <Category "IsInt">, 234 ]
gap> o(IsInt,2,3,4,5);
[ <Category "IsInt">, 2345 ]
gap> o(IsInt,2,3,4,5,6);
[ <Category "IsInt">, 23456 ]
gap> o(IsInt,2,3,4,5,6,7); # not (yet?) supported
Error, sorry: cannot yet have X argument constructors
not in any function at *stdin*:70
gap> 
gap> # with tracing
gap> TraceMethods( o );
gap> o(IsInt);
#I  foobar at *stdin*:55
[ <Category "IsInt"> ]
gap> o(IsInt,2);
#I  foobar at *stdin*:57
[ <Category "IsInt">, 2 ]
gap> o(IsInt,2,3);
#I  foobar at *stdin*:58
[ <Category "IsInt">, 23 ]
gap> o(IsInt,2,3,4);
#I  foobar at *stdin*:59
[ <Category "IsInt">, 234 ]
gap> o(IsInt,2,3,4,5);
#I  foobar at *stdin*:60
[ <Category "IsInt">, 2345 ]
gap> o(IsInt,2,3,4,5,6);
#I  foobar at *stdin*:61
[ <Category "IsInt">, 23456 ]
gap> o(IsInt,2,3,4,5,6,7); # not (yet?) supported
Error, sorry: cannot yet have X argument constructors
not in any function at *stdin*:80
gap> UntraceMethods( o );
gap> 
gap> # again without tracing
gap> o(IsInt);
[ <Category "IsInt"> ]
gap> o(IsInt,2);
[ <Category "IsInt">, 2 ]
gap> o(IsInt,2,3);
[ <Category "IsInt">, 23 ]
gap> o(IsInt,2,3,4);
[ <Category "IsInt">, 234 ]
gap> o(IsInt,2,3,4,5);
[ <Category "IsInt">, 2345 ]
gap> o(IsInt,2,3,4,5,6);
[ <Category "IsInt">, 23456 ]
gap> o(IsInt,2,3,4,5,6,7); # not (yet?) supported
Error, sorry: cannot yet have X argument constructors
not in any function at *stdin*:90
gap> QUIT;

[Dauer der Verarbeitung: 0.13 Sekunden, vorverarbeitet 2026-06-06]