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 103 104 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 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833
|
@c -----------------------------------------------------------------------------
@c File : Debugging.de.texi
@c License : GNU General Public License (GPL)
@c Language : German
@c Original : Debugging.texi revision 1.20
@c Translation : Dr. Dieter Kaiser
@c Date : 20.12.2010
@c Revision : 08.04.2011
@c
@c This file is part of Maxima -- GPL CAS based on DOE-MACSYMA
@c -----------------------------------------------------------------------------
@menu
* Quellcode-Debugger::
* Debugger-Kommandos::
* Funktionen und Variablen der Fehlersuche::
@end menu
@c -----------------------------------------------------------------------------
@node Quellcode-Debugger, Debugger-Kommandos, , Fehlersuche
@section Quellcode-Debugger
@c Maxima has a built-in source level debugger. The user can set a breakpoint at
@c a function, and then step line by line from there. The call stack may be
@c examined, together with the variables bound at that level.
Maxima hat einen Quellcode-Debugger. Es k@"onnen Unterbrechungspunkte gesetzt
werden, um die Ausf@"uhrung einer Funktion abzubrechen und um schrittweise die
Funktion zu testen. Der Stapelspeicher und Variable k@"onnen untersucht werden.
@c The command @code{:help} or @code{:h} shows the list of debugger commands.
@c (In general, commands may be abbreviated if the abbreviation is unique. If
@c not unique, the alternatives will be listed.) Within the debugger, the user
@c can also use any ordinary Maxima functions to examine, define, and manipulate
@c variables and expressions.
Das Kommando @code{:help} oder @code{:h} zeigt eine Liste mit den
Debugger-Kommandos. Innerhalb des Debuggers k@"onnen alle Maxima-Funktionen
genutzt werden, um Variablen und Ausdr@"ucke auszugeben, zu definieren oder
anderweitig zu manipulieren.
@c A breakpoint is set by the @code{:br} command at the Maxima prompt.
@c Within the debugger, the user can advance one line at a time using the
@c @code{:n} (``next'') command. The @code{:bt} (``backtrace'') command shows a
@c list of stack frames. The @code{:r} (``resume'') command exits the debugger
@c and continues with execution. These commands are demonstrated in the example
@c below.
Eine Unterbrechnung wird mit dem Kommando @code{:br} gesetzt. Mit dem Kommando
@code{:n} oder @code{:next} wird die n@"achste Programmzeile ausgef@"uhrt. Das
Kommando @code{:bt} oder @code{:backtrace} zeigt eine Liste der Stack Frames.
Mit dem Kommando @code{:r} oder @code{:resume} wird der Debugger verlassen.
Beispiele:
@example
(%i1) load ("/tmp/foobar.mac");
(%o1) /tmp/foobar.mac
(%i2) :br foo
Turning on debugging debugmode(true)
Bkpt 0 for foo (in /tmp/foobar.mac line 1)
(%i2) bar (2,3);
Bkpt 0:(foobar.mac 1)
/tmp/foobar.mac:1::
(dbm:1) :bt <-- :bt typed here gives a backtrace
#0: foo(y=5)(foobar.mac line 1)
#1: bar(x=2,y=3)(foobar.mac line 9)
(dbm:1) :n <-- Here type :n to advance line
(foobar.mac 2)
/tmp/foobar.mac:2::
(dbm:1) :n <-- Here type :n to advance line
(foobar.mac 3)
/tmp/foobar.mac:3::
(dbm:1) u; <-- Investigate value of u
28
(dbm:1) u: 33; <-- Change u to be 33
33
(dbm:1) :r <-- Type :r to resume the computation
(%o2) 1094
@end example
@c The file @code{/tmp/foobar.mac} is the following:
Die im obigen Beispiel geladene Datei @code{/tmp/foobar.mac} hat den folgenden
Inhalt:
@example
foo(y) := block ([u:y^2],
u: u+3,
u: u^2,
u);
bar(x,y) := (
x: x+2,
y: y+2,
x: foo(y),
x+y);
@end example
@subheading Nutzung des Debuggers mit Emacs
@c If the user is running the code under GNU emacs in a shell window
@c (dbl shell), or is running the graphical interface version, Xmaxima, then if
@c he stops at a break point, he will see his current position in the source
@c file which will be displayed in the other half of the window, either
@c highlighted in red, or with a little arrow pointing at the right line. He can
@c advance single lines at a time by typing M-n (Alt-n).
Wird Maxima unter GNU Emacs in einer Shell ausgef@"uhrt oder wird die
Nutzeroberfl@"ache Xmaxima verwendet, dann wird in einem zweiten Ausgabefenster
die Position einer Unterbrechung im Quellcode angezeigt. Mit dem
Emacs-Kommando @kbd{M-n} kann dann schrittweise die Funktion ausgef@"uhrt werden.
@c Under Emacs you should run in a @code{dbl} shell, which requires the
@c @code{dbl.el} file in the elisp directory. Make sure you install the elisp
@c files or add the Maxima elisp directory to your path: e.g., add the following
@c to your @file{.emacs} file or the @file{site-init.el}
Um diese Funktionalit@"at zu nutzen, sollte Emacs in einer @code{dbl}-Shell
ausgef@"uhrt werden. Dazu ben@"otigt Emacs die Datei @code{dbl.el} im elisp
Verzeichnis. Dazu m@"ussen die elisp-Dateien installiert oder das Maxima
elisp Verzeichnis bekannt sein. Dazu k@"onnen die folgenden Kommandos der
Datei @file{.emacs} hinzugef@"ugt werden:
@example
(setq load-path (cons "/usr/share/maxima/5.9.1/emacs" load-path))
(autoload 'dbl "dbl")
@end example
@c then in emacs
@c @example
@c M-x dbl
@c @end example
@c should start a shell window in which you can run programs, for example
@c Maxima, gcl, gdb etc. This shell window also knows about source level
@c debugging, and display of source code in the other window.
Mit dem Emacs-Kommando @kbd{M-x dbl} wird eine Shell gestartet, in der
Programme wie Maxima, gcl, gdb u. a. ausgef@"uhrt werden k@"onnen. In dieser
Shell kann auch der Maxima-Debugger ausgef@"uhrt werden.
@c TODO: UEBERSETZUNG FEHLT
The user may set a break point at a certain line of the file by typing
@code{C-x space}. This figures out which function the cursor is in, and then
it sees which line of that function the cursor is on. If the cursor is on,
say, line 2 of @code{foo}, then it will insert in the other window the
command, ``@code{:br foo 2}'', to break @code{foo} at its second line. To
have this enabled, the user must have maxima-mode.el turned on in the window
in which the file @code{foobar.mac} is visiting. There are additional
commands available in that file window, such as evaluating the function into
the Maxima, by typing @code{Alt-Control-x}.
@c @opencatbox
@c @category{Debugging}
@c @closecatbox
@c -----------------------------------------------------------------------------
@node Debugger-Kommandos, Funktionen und Variablen der Fehlersuche, Quellcode-Debugger, Fehlersuche
@section Debugger-Kommandos
@c Keyword commands are special keywords which are not interpreted as Maxima
@c expressions. A keyword command can be entered at the Maxima prompt or the
@c debugger prompt, although not at the break prompt. Keyword commands start
@c with a colon, '@code{:}'. For example, to evaluate a Lisp form you may type
@c @code{:lisp} followed by the form to be evaluated.
Es gibt spezielle Kommandos, die von Maxima nicht als ein Ausdruck interpretiert
werden. Diese Kommandos beginnen mit einem Doppelpunkt @code{:} und k@"onnen in
der Kommandozeile oder nach einer Unterbrechung ausgef@"uhrt werden. Mit dem
Kommando @code{:lisp} werden zum Beispiel Lisp-Zeilen ausgewertet:
@example
(%i1) :lisp (+ 2 3)
5
@end example
@c The number of arguments taken depends on the particular command. Also, you
@c need not type the whole command, just enough to be unique among the break
@c keywords. Thus @code{:br} would suffice for @code{:break}.
Die Anzahl der Argumente h@"angt vom jeweiligen Kommando ab. Die Kommandos
k@"onnen mit den ersten zwei Buchstaben abgek@"urzt werden. Zum Beispiel
gen@"ugt es @code{:br} f@"ur das Kommando @code{:break} einzugeben.
@c The keyword commands are listed below.
Die speziellen Kommandos sind folgende:
@table @code
@c @item :break F n
@c Set a breakpoint in function @code{F} at line offset @code{n} from the
@c beginning of the function. If @code{F} is given as a string, then it is
@c assumed to be a file, and @code{n} is the offset from the beginning of the
@c file. The offset is optional. If not given, it is assumed to be zero (first
@c line of the function or file).
@item :break F n
Setzte einen Unterbrechnungspunkt in der Funktion @code{F} in der Zeile @code{n}
vom Anfang der Funktion. Wird @code{F} als eine Zeichenkette angegeben, dann
wird @code{F} als der Name einer Datei angenommen. @code{n} ist in diesem Fall
die @code{n}-te Zeile in der Datei. Wird @code{n} nicht angegeben, wird der
Wert zu Null angenommen.
@c @item :bt
@c Print a backtrace of the stack frames
@item :bt
Gebe einen Backtrace des Stack Frames aus.
@c @item :continue
@c Continue the computation
@item :continue
Setze die Ausf@"uhrung der Funktion fort.
@c CAN'T SEEM TO GET :delete TO WORK !!!
@c @item :delete
@c Delete the specified breakpoints, or all if none are specified
@item :delete
L@"osche den spezifizierten Unterbrechnungspunkt oder alle, wenn keiner
spezifiziert wird.
@c CAN'T SEEM TO GET :disable TO WORK !!!
@c @item :disable
@c Disable the specified breakpoints, or all if none are specified
@item :disable
Schalte den spezifierten oder alle Unterbrechnungspunkte ab.
@c CAN'T SEEM TO GET :enable TO WORK !!!
@c @item :enable
@c Enable the specified breakpoints, or all if none are specified
@item :enable
Schalte den spezifizierten oder alle Unterbrechnungspunkte ein.
@c @item :frame n
@c Print stack frame @code{n}, or the current frame if none is specified
@item :frame n
Gebe den Stack Frame @code{n} oder den aktuellen aus, wenn keiner spezifiert
wird.
@c CAN'T SEEM TO GET :help TO WORK !!!
@c @item :help
@c Print help on a debugger command, or all commands if none is specified
@item :help
Gebe einen Hilfetext zu einem spezifierten Kommando oder zu allen Kommandos aus,
wenn kein Kommando spezifierten wird.
@c CAN'T SEEM TO GET :info TO WORK !!!
@c @item :info
@c Print information about item
@item :info
Gebe Information @"uber einen Eintrag aus.
@c @item :lisp some-form
@c Evaluate @code{some-form} as a Lisp form
@item :lisp some-form
Werte @code{some-form} als eine Lisp-Form aus.
@c @item :lisp-quiet some-form
@c Evaluate Lisp form @code{some-form} without any output
@item :lisp-quiet some-form
Werte @code{some-form} als eine Lisp-Form aus, ohne eine Ausgabe zu erzeugen.
@c @item :next
@c Like @code{:step}, except @code{:next} steps over function calls
@item :next
Wie @code{:step}, f@"uhrt aber Funktionsaufrufe als einen Schritt aus.
@c @item :quit
@c Quit the current debugger level without completing the computation
@item :quit
Beende den Debugger.
@c @item :resume
@c Continue the computation
@item :resume
Setzte die Ausf@"uhrung des Programms fort.
@c @item :step
@c Continue the computation until it reaches a new source line
@item :step
Setzte die Auswertung des Programms bis zur n@"achsten Zeile fort.
@c @item :top
@c Return to the Maxima prompt (from any debugger level) without completing the
@c computation
@item :top
Beende die Auswertung und kehre zur Maxima-Eingabe zur@"uck.
@end table
@c @opencatbox
@c @category{Debugging}
@c @closecatbox
@c -----------------------------------------------------------------------------
@node Funktionen und Variablen der Fehlersuche, , Debugger-Kommandos, Fehlersuche
@section Funktionen und Variablen der Fehlersuche
@c --- 23.12.2010 DK -----------------------------------------------------------
@anchor{debugmode}
@defvr {Optionsvariable} debugmode
Standardwert: @code{false}
@c When a Maxima error occurs, Maxima will start the debugger if
@c @code{debugmode} is @code{true}. The user may enter commands to examine the
@c call stack, set breakpoints, step through Maxima code, and so on. See
@c @code{debugging} for a list of debugger commands.
Hat die Optionsvariable @code{debugmode} den Wert @code{true}, wird der
Maxima-Debugger gestartet, wenn ein Programmfehler auftritt. Nach der
Unterbrechung des Programms kann der Debugger genutzt werden. Siehe das Kapitel
@nref{Debugger-Kommandos} f@"ur eine Liste der Kommandos des Debuggers.
@c Enabling @code{debugmode} will not catch Lisp errors.
@c DO WE WANT TO SAY MORE ABOUT DEBUGGING LISP ERRORS ???
@c I'M NOT CONVINCED WE WANT TO OPEN THAT CAN OF WORMS !!!
Der Maxima-Debugger behandelt keine Lisp-Programmfehler.
@c @opencatbox
@c @category{Debugging} @category{Global flags}
@c @closecatbox
@end defvr
@c --- 23.12.2010 DK -----------------------------------------------------------
@anchor{refcheck}
@defvr {Optionsvariable} refcheck
Standardwert: @code{false}
@c When @code{refcheck} is @code{true}, Maxima prints a message each time a
@c bound variable is used for the first time in a computation.
Hat @code{refcheck} den Wert @code{true}, gibt Maxima eine Meldung aus, wenn
einer Variablen zum ersten Mal ein Wert zugewiesen wird.
@c @opencatbox
@c @category{Evaluation} @category{Console interaction} @category{Global flags}
@c @closecatbox
@end defvr
@c --- 23.12.2010 DK -----------------------------------------------------------
@anchor{setcheck}
@defvr {Optionsvariable} setcheck
Standardwert: @code{false}
@c If @code{setcheck} is set to a list of variables (which can be subscripted),
@c Maxima prints a message whenever the variables, or subscripted occurrences of
@c them, are bound with the ordinary assignment operator @code{:}, the @code{::}
@c assignment operator, or function argument binding, but not the function
@c assignment @code{:=} nor the macro assignment @code{::=} operators. The
@c message comprises the name of the variable and the value it is bound to.
Der Optionsvariablen @code{setcheck} kann eine Liste mit den Namen von Variablen
zugewiesen werden. Dies k@"onnen auch indizierte Variablen sein. Immer wenn
einer der Variablen mit den Operatoren @code{:} oder @code{::} ein Wert
zugewiesen wird, gibt Maxima eine Meldung aus, die den Namen der Variablen und
den zugewiesenen Wert enth@"alt.
@c @code{setcheck} may be set to @code{all} or @code{true} thereby including all
@c variables.
@code{setcheck} kann den Wert @code{all} oder @code{true} erhalten. In diesem
Fall wird f@"ur alle Variablen eine Meldung ausgegeben.
@c Each new assignment of @code{setcheck} establishes a new list of variables
@c to check, and any variables previously assigned to @code{setcheck} are
@c forgotten.
Jede Zuweisung an @code{setcheck} initialisert eine neue Liste mit Variablen.
Vorherige Zuweisungen werden @"uberschrieben.
@c The names assigned to @code{setcheck} must be quoted if they would otherwise
@c evaluate to something other than themselves. For example, if @code{x},
@c @code{y}, and @code{z} are already bound, then enter
@c to put them on the list of variables to check.
Die Auswertung der Namen der Variablen muss mit dem
@nxref{', Quote-Operator} @code{'} unterdr@"uckt werden, wenn den Variablen
bereits Werte zugewiesen wurden. Haben zum Beispiel die Variablen @code{x},
@code{y} und @code{z} Werte, dann werden die Variablen mit dem folgenden Befehl
angegeben:
@example
setcheck: ['x, 'y, 'z]$
@end example
@c No printout is generated when a variable on the @code{setcheck} list is
@c assigned to itself, e.g., @code{X: 'X}.
Es wird keine Meldung ausgegeben, wenn eine Variable sich selbst zugewiesen
wird, zum Beispiel @code{X: 'X}.
@c @opencatbox
@c @category{Console interaction} @category{Global flags}
@c @closecatbox
@end defvr
@c --- 23.12.2010 DK -----------------------------------------------------------
@anchor{setcheckbreak}
@defvr {Optionsvariable} setcheckbreak
Standardwert: @code{false}
@c When @code{setcheckbreak} is @code{true}, Maxima will present a break prompt
@c whenever a variable on the @code{setcheck} list is assigned a new value.
@c The break occurs before the assignment is carried out. At this point,
@c @code{setval} holds the value to which the variable is about to be assigned.
@c Hence, one may assign a different value by assigning to @code{setval}.
Hat @code{setcheckbreak} den Wert @code{true}, startet Maxima den Debugger,
wenn einer Variablen, die in der Liste @code{setcheck} enthalten ist, ein
Wert zugewiesen wird. Die Unterbrechung wird noch vor der Zuweisung des Wertes
ausgef@"uhrt. Die Variable @code{setval} enh@"alt den Wert, der zugewiesen
werden soll. Dieser Variablen kann ein anderer Wert zugewiesen werden.
@c See also @code{setcheck} and @code{setval}.
Siehe auch @mref{setcheck} und @mrefdot{setval}
@c @opencatbox
@c @category{Console interaction} @category{Global flags}
@c @closecatbox
@end defvr
@c --- 23.12.2010 DK -----------------------------------------------------------
@anchor{setval}
@defvr {Systemvariable} setval
@c Holds the value to which a variable is about to be set when a
@c @code{setcheckbreak} occurs. Hence, one may assign a different value by
@c assigning to @code{setval}.
Enth@"alt den Wert, der einer Variable zugewiesen werden soll, wenn die
Zuweisung mit der Optionsvariablen @code{setcheckbreak} unterbrochen wurde.
@code{setval} kann ein anderer Wert zugewiesen werden.
@c See also @code{setcheck} and @code{setcheckbreak}.
Siehe auch @mref{setcheck} und @mrefdot{setcheckbreak}
@c @opencatbox
@c @category{Console interaction} @category{Global variables}
@c @closecatbox
@end defvr
@c -----------------------------------------------------------------------------
@anchor{timer}
@deffn {Funktion} timer (@var{f_1}, @dots{}, @var{f_n})
@deffnx {Funktion} timer (all)
@deffnx {Funktion} timer ()
@c Given functions @var{f_1}, ..., @var{f_n}, @code{timer} puts each one on the
@c list of functions for which timing statistics are collected.
@c @code{timer(f)$ timer(g)$} puts @code{f} and then @code{g} onto the list; the
@c list accumulates from one call to the next.
Sammelt Statistiken @"uber die Ausf@"uhrungszeiten von Funktionen. Die
Argumente @var{f_1}, @dots{}, @var{f_n} sind die Namen von Funktionen zu denen
Statistiken gesammelt werden. @code{time(g)} f@"ugt die Funktion @code{g} der
Liste an Funktionen hinzu, zu denen Informationen gesammelt werden.
@c @code{timer(all)} puts all user-defined functions (as named by the global
@c variable @code{functions}) on the list of timed functions.
@c @code{f(x) := x^2$ g:f$ timer(g)$} does
@c not put @code{f} on the timer list.
@code{timer(all)} f@"ugt alle nutzerdefinierten Funktionen, die in der
Informationsliste @code{functions} enthalten sind, der Liste der Funktionen
hinzu, @"uber die Informationen gesammelt werden.
@c With no arguments, @code{timer} returns the list of timed functions.
Wird @code{timer()} ohne Argumente aufgerufen, wird eine Liste der Funktionen
zur@"uckgeben, @"uber die Informationen gesammelt werden.
@c Maxima records how much time is spent executing each function on the list of
@c timed functions. @code{timer_info} returns the timing statistics, including
@c the average time elapsed per function call, the number of calls, and the
@c total time elapsed. @code{untimer} removes functions from the list of timed
@c functions.
Maxima misst die Zeit, die eine Funktion f@"ur die Ausf@"uhrung ben@"otigt.
@code{timer_info} gibt eine Statistik f@"ur alle Funktionen zur@"uck, f@"ur die
die Ausf@"uhrungszeiten gemessen werden. Die Statistik enth@"alt die
durchschnittliche Ausf@"uhrungszeit der Funktionen und die Anzahl der Aufrufe
der Funktionen. Mit der Funktion @code{untimer} wird die Aufzeichnung der
Ausf@"uhrungszeiten beendet.
@c @code{timer} quotes its arguments. @code{f(x) := x^2$ g:f$ timer(g)$} does
@c not put @code{f} on the timer list.
@code{timer} wertet die Argumente nicht aus. Daher werden im Folgenden
@code{f(x) := x^2$ g:f$ timer(g)$} f@"ur die Funktion @code{f} keine
Ausf@"uhrungszeiten aufgezeichnet.
@c If @code{trace(f)} is in effect, then @code{timer(f)} has no effect;
@c @code{trace} and @code{timer} cannot both be in effect at the same time.
Wird f@"ur die Funktion @code{f} mit dem Kommando @code{trace(f)} der Ablauf
verfolgt, hat das Kommando @code{timer(f)} keinen Effekt. F@"ur eine Funktion
k@"onnen nicht gleichzeitig Ausf@"uhrungszeiten aufgezeichnet und der Ablauf
verfolgt werden.
@c See also @code{timer_devalue}.
Siehe auch @mrefdot{timer_devalue}
@c @opencatbox
@c @category{Debugging}
@c @closecatbox
@end deffn
@c --- 23.12.2010 DK -----------------------------------------------------------
@anchor{untimer}
@deffn {Funktion} untimer (@var{f_1}, @dots{}, @var{f_n})
@deffnx {Funktion} untimer ()
@c Given functions @var{f_1}, ..., @var{f_n}, @code{untimer} removes each
@c function from the timer list.
@code{untimer} beendet die Aufzeichnung von Informationen zur Ausf@"uhrungszeit
f@"ur die Funktionen @var{f_1}, @dots{}, @var{f_n}.
@c With no arguments, @code{untimer} removes all functions currently on the
@c timer list.
Wird @code{untimer} ohne Argument aufgerufen, wird die Aufzeichnung f@"ur alle
Funktionen beendet.
@c After @code{untimer (f)} is executed, @code{timer_info (f)} still returns
@c previously collected timing statistics, although @code{timer_info()} (with no
@c arguments) does not return information about any function not currently on
@c the timer list. @code{timer (f)} resets all timing statistics to zero and
@c puts @code{f} on the timer list again.
Die aufgezeichneten Informationen zu einer Funktion @code{f} k@"onnen mit dem
Kommando @code{timer_info(f)} auch dann abgerufen werden, wenn zuvor mit dem
Kommando @code{untimer(f)} die Aufzeichnung f@"ur die Funktion @code{f} beendet
wurde. Jedoch werden die aufgezeichneten Informationen f@"ur die Funktion
@code{f} nicht mit dem Kommando @code{timer_info()} angezeigt. Das Kommando
@code{timer(f)} setzt alle aufgezeichneten zur@"uck und startet die Aufzeichnung
f@"ur die Funktion erneut.
@c @opencatbox
@c @category{Debugging}
@c @closecatbox
@end deffn
@c -----------------------------------------------------------------------------
@anchor{timer_devalue}
@defvr {Optionsvariable} timer_devalue
Standardwert: @code{false}
@c When @code{timer_devalue} is @code{true}, Maxima subtracts from each timed
@c function the time spent in other timed functions. Otherwise, the time
@c reported for each function includes the time spent in other functions. Note
@c that time spent in untimed functions is not subtracted from the total time.
Hat @code{timer_devalue} den Wert @code{true}, subtrahiert Maxima bei der
Aufzeichnung der Ausf@"uhrungszeiten die Zeiten, welche eine Funktion in anderen
Funktionen verbringt. Ansonsten enthalten die aufgezeichneten Zeiten auch die
Ausf@"uhrungszeiten der Funktionen, die aufgerufen werden.
@c See also @code{timer} and @code{timer_info}.
Siehe auch @mref{timer} und @mrefdot{timer_info}
@c @opencatbox
@c @category{Debugging} @category{Global flags}
@c @closecatbox
@end defvr
@c -----------------------------------------------------------------------------
@anchor{timer_info}
@deffn {Funktion} timer_info (@var{f_1}, @dots{}, @var{f_n})
@deffnx {Funktion} timer_info ()
@c Given functions @var{f_1}, ..., @var{f_n}, @code{timer_info} returns a matrix
@c containing timing information for each function. With no arguments,
@c @code{timer_info} returns timing information for all functions currently on
@c the timer list.
Gibt eine Tabelle mit den aufgezeichneten Informationen @"uber die
Ausf@"uhrungszeiten der Funktionen @var{f_1}, @dots{}, @var{f_n} zur@"uck. Wird
kein Argument angegeben, werden Informationen f@"ur alle Funktionen angezeigt,
zu denen Informationen aufgezeichnet sind.
@c The matrix returned by @code{timer_info} contains the function name, time per
@c function call, number of function calls, total time, and @code{gctime}, which
@c meant "garbage collection time" in the original Macsyma but is now always
@c zero.
Die Tabelle enth@"alt die Namen der Funktionen, die Ausf@"uhrungszeit pro
Aufruf, die Anzahl der Aufrufe, die gesamte Zeit und die @code{gctime}-Zeit.
Die @code{gctime}-Zeit bedeutet "Garbage Collection Time".
@c The data from which @code{timer_info} constructs its return value can also be
@c obtained by the @code{get} function:
Die Daten, die von der Funktion @code{timer_info} angezeigt werden, k@"onnen
auch mit der Funktion @code{get} erhalten werden:
@example
get(f, 'calls); get(f, 'runtime); get(f, 'gctime);
@end example
@c See also @code{timer}.
Siehe auch @mrefdot{timer}
@c @opencatbox
@c @category{Debugging}
@c @closecatbox
@end deffn
@c -----------------------------------------------------------------------------
@anchor{trace}
@deffn {Funktion} trace (@var{f_1}, @dots{}, @var{f_n})
@deffnx {Funktion} trace (all)
@deffnx {Funktion} trace ()
@c Given functions @var{f_1}, ..., @var{f_n}, @code{trace} instructs Maxima to
@c print out debugging information whenever those functions are called.
@c @code{trace(f)$ trace(g)$} puts @code{f} and then @code{g} onto the list of
@c functions to be traced; the list accumulates from one call to the next.
Startet die Ablaufverfolgung f@"ur die Funktionen @var{f_1}, @dots{}, @var{f_n}.
Mit dem Kommando @code{trace(g)} kann eine weitere Funktion hinzugef@"ugt
werden.
@c @code{trace(all)} puts all user-defined functions (as named by the global
@c variable @code{functions}) on the list of functions to be traced.
@code{trace(all)} startet die Ablaufverfolgung f@"ur alle nutzerdefinierten
Funktionen, die in der Informationsliste @code{functions} enthalten sind.
@c With no arguments, @code{trace} returns a list of all the functions currently
@c being traced.
Das Kommando @code{trace()} zeigt eine Liste aller Funktionen f@"ur die eine
Ablaufverfolgung gestartet wurde.
@c The @code{untrace} function disables tracing. See also @code{trace_options}.
Mit der Funktion @code{untrace} wird die Ablaufverfolgung beendet. Siehe auch
@mrefdot{trace_options}
@c @code{trace} quotes its arguments. Thus, @code{f(x) := x^2$ g:f$ trace(g)$}
@c does not put @code{f} on the trace list.
@code{trace} wertet die Argumente nicht aus.
@c When a function is redefined, it is removed from the timer list. Thus after
@c @code{timer(f)$ f(x) := x^2$}, function @code{f} is no longer on the timer
@c list.
@c VORHERGEHENDEN TEXT NICHT UEBERSETZT.
@c If @code{timer (f)} is in effect, then @code{trace (f)} has no effect;
@c @code{trace} and @code{timer} can't both be in effect for the same function.
Die Ablaufverfolgung kann f@"ur eine Funktion @code{f} nicht gestartet werden,
wenn f@"ur die Funktion bereits mit der Funktion @code{timer} Informationen
@"uber die Ausf@"uhrungszeiten gesammelt werden.
@c @opencatbox
@c @category{Debugging}
@c @closecatbox
@end deffn
@c --- 23.12.2010 DK -----------------------------------------------------------
@anchor{trace_options}
@deffn {Funktion} trace_options (@var{f}, @var{option_1}, @dots{}, @var{option_n})
@deffnx {Funktion} trace_options (@var{f})
@c Sets the trace options for function @var{f}. Any previous options are
@c superseded. @code{trace_options (@var{f}, ...)} has no effect unless
@c @code{trace (@var{f})} is also called (either before or after
@c @code{trace_options}).
Setzt Optionen f@"ur die Ablaufverfolgung einer Funktion @var{f}. Bereits
vorliegende Optionen werden ersetzt.
@c @code{trace_options (@var{f})} resets all options to their default values.
@code{trace_options(@var{f})} setzt alle Optionen auf die Standardwerte
zur@"uck.
@c The option keywords are:
Die Optionen sind:
@table @code
@c @item @code{noprint}
@c Do not print a message at function entry and exit.
@item noprint
Gebe keine Meldung beim Eintritt in eine oder dem Austritt aus einer Funktion
aus.
@c @item @code{break}
@c Put a breakpoint before the function is entered,
@c and after the function is exited. See @code{break}.
@item break
Setze eine Unterbrechnung vor dem Eintritt in eine Funktion und nach dem
Austritt aus einer Funktion. Siehe @mrefdot{break}
@c @item @code{lisp_print}
@c Display arguments and return values as Lisp objects.
@item @code{lisp_print}
Zeige die Argumente und R@"uckgabewerte in der Lisp-Syntax an.
@c @item @code{info}
@c Print @code{-> true} at function entry and exit.
@item info
Gebe @code{-> true} beim Eintritt in und Austritt aus einer Funktion aus.
@item @code{errorcatch}
Catch errors, giving the option to signal an error,
retry the function call, or specify a return value.
@c TODO: UEBERSETZUNG DES VORHERGEHENDEN TEXTES FEHLT.
@end table
@c Trace options are specified in two forms. The presence of the option keyword
@c alone puts the option into effect unconditionally. (Note that option
@c @var{foo} is not put into effect by specifying @code{@var{foo}: true} or a
@c similar form; note also that keywords need not be quoted.) Specifying the
@c option keyword with a predicate function makes the option conditional on the
@c predicate.
@c The argument list to the predicate function is always
@c @code{[level, direction, function, item]} where @code{level} is the recursion
@c level for the function, @code{direction} is either @code{enter} or
@c @code{exit}, @code{function} is the name of the function, and @code{item} is
@c the argument list (on entering) or the return value (on exiting).
Es k@"onnen bedingte Optionen f@"ur die Ablaufverfolgung definiert werden. Dazu
wird eine Option zusammen mit einer Aussagefunktion angegeben. Die Argumente
der Aussagefunktion f@"ur eine bedingte Option sind immer
@code{[level, direction, function, item]}. @code{level} ist die Rekursionstiefe
der Funktion, @code{direction} enth@"alt die Werte @code{enter} oder
@code{exit}, @code{function} ist der Name der Funktion und @code{item} ist eine
Liste der Argumente oder der R@"uckgabewert beim Verlassen der Funktion.
@c Here is an example of unconditional trace options:
Dies ist ein Beispiel f@"ur eine Ablaufverfolgung ohne Bedingungen:
@example
(%i1) ff(n) := if equal(n, 0) then 1 else n * ff(n - 1)$
(%i2) trace (ff)$
(%i3) trace_options (ff, lisp_print, break)$
(%i4) ff(3);
@end example
@c Here is the same function, with the @code{break} option conditional on a
@c predicate:
In diesem Fall wird eine Aussagefunktion f@"ur eine bedingte Ablaufverfolgung
angegeben:
@example
(%i5) trace_options (ff, break(pp))$
(%i6) pp (level, direction, function, item) := block (print (item),
return (function = 'ff and level = 3 and direction = exit))$
(%i7) ff(6);
@end example
@c @opencatbox
@c @category{Debugging}
@c @closecatbox
@end deffn
@c --- 23.12.2010 DK -----------------------------------------------------------
@anchor{untrace}
@deffn {Funktion} untrace (@var{f_1}, @dots{}, @var{f_n})
@deffnx {Funktion} untrace ()
@c Given functions @var{f_1}, ..., @var{f_n}, @code{untrace} disables tracing
@c enabled by the @code{trace} function. With no arguments, @code{untrace}
@c disables tracing for all functions.
Beendet die Ablaufverfolgung f@"ur die Funktionen @var{f_1}, @dots{}, @var{f_n}.
Das Kommando @code{untrace()} beendet die Ablaufverfolgung f@"ur alle
Funktionen.
@c @code{untrace} returns a list of the functions for which it disabled tracing.
@code{untrace} gibt eine Liste der Funktionen zur@"uck, f@"ur die die
Ablaufverfolgung beendet wurde.
@c @opencatbox
@c @category{Debugging}
@c @closecatbox
@end deffn
@c --- End of file Debugging.de.texi -------------------------------------------
|