source: trunk/abcl/contrib/abcl-stepper/README.markdown

Last change on this file was 15709, checked in by Mark Evenson, 17 months ago

Working stepper for ABCL as a contrib!

Some characteristics:

  • For intepreted code, it won't step into compiled code
  • It is ready to use from a plain REPL and from SLIME.
  • ':?' will help a minimal help
  • Can inspect variables and symbols in the current package with 'i'
  • ':c' will resume the evaluation until the end without the stepper
  • ':s' will resume the evaluation until the next form to be analyzed
  • ':sn' will to step to the next form
  • case-insensitive when inspecting
  • ':l' will print the local bindings
  • ':q' will skip the current stepping evaluation and return NIL
  • ':b' will add a breakpoint to a symbol to use with next (n)
  • ':r' will remove an existent symbol breakpoint to use with next (n)
  • ':d' will remove all existent symbol breakpoints to use with next (n)
  • ':w' allows to watch a symbol binding
  • ':u' allows to (un)watch a symbol binding
  • ':bt' shows the current backtrace

fix

File size: 21.7 KB
Line 
1ABCL-STEPPER
2============
3
4ABCL-STEPPER provides a working implementation of an stepper as a replacement for the empty cl:step, you can get more documentation in the related paper presented in the European Lisp Symposium (ELS) 2023, see https://zenodo.org/record/7815887
5
6Some characteristics:
7
8- For intepreted code, it won't step into compiled functions
9
10- It is ready to use from a plain REPL and from SLIME.
11
12- In general it doesn't handle unexpected conditions in the code to step, if the the code to step fails the stepper will fail too
13
14':?' will print a minimal help (you can type :help)
15
16':i' can inspect variables and symbols (case-insensitive when inspecting, you can also type :inspect)
17
18':c' will resume the evaluation until the end without the stepper (you can type :continue)
19
20':s' will resume the evaluation until the next form to be analyzed (you can type :step)
21
22':sn' will to step to the next form
23
24':l' will show the local bindings for variables and functions
25in the current environment passed to the current form to evaluate (you can type :locals)
26
27':b' will add a breakpoint to a symbol to use with next (n) (you can type :br+ or :add-breakpoint)
28
29':r' will remove an existent symbol breakpoint to use with next (n) (you can type :br- or :remove-breakpoint)
30
31':d' will remove all existent symbol breakpoints to use with next (n) (you can type :br! or :delete-breakpoints)
32
33':w' (or :watch) allows to pin binding to see in all steps
34
35':u' (or :unwatch) allows to remove the bindings established by :watch
36
37':bt' (or :backtrace) shows the current backtrace
38
39':q': The quit q feature will abort the evaluation in the stepper
40and return NIL. This is useful to avoid running the remaining (you can type :quit)
41forms in the code when the user wants to leave the
42stepper, specially if the rest of the program is doing costly
43operations.
44
45:'n' allows to jump the next (n) symbol:
46The next n feature allow to stop the stepper only when the
47interpreter is analyzing one of the symbols specified in the
48list of stepper::*stepper-stop-symbols* or any of the exported
49symbols presented in any of the list of packages specified in
50stepper::*stepper-stop-packages*. These variables will have
51initially the value NIL and if they are not modified, next will
52behave exactly as continue. It is useful when we want to
53step large or complex code and avoid stepping every form in
54order to jump only to the interested ones.
55
56Usage:
57
58Attaching a sample session to illustrate the use of the stepper
59
60```
61CL-USER(1): (require :asdf)
62NIL
63CL-USER(2): (require :abcl-contrib)
64NIL
65CL-USER(3): (require :abcl-stepper)
66NIL
67CL-USER(4): (defparameter *some-var* 1)
68*SOME-VAR*
69CL-USER(5): (defun test ()
70  (let ((*some-var* nil)
71        (x 3))
72    (list *some-var* 3)))
73TEST
74CL-USER(6): (stepper:step (test))
75We are in the stepper mode
76Evaluating step 1 -->
77(TEST)
78Type ':?' for a list of options
79:i
80Type the name of the symbol: *some-var*
811
82Type ':?' for a list of options
83:s
84We are in the stepper mode
85Evaluating step 2 -->
86(BLOCK TEST
87  (LET ((*SOME-VAR* NIL) (X 3))
88    (LIST *SOME-VAR* 3)))
89Type ':?' for a list of options
90:s
91We are in the stepper mode
92Evaluating step 3 -->
93(LET ((*SOME-VAR* NIL) (X 3))
94  (LIST *SOME-VAR* 3))
95Type ':?' for a list of options
96:?
97Type ':l' to see the values of bindings on the local environment
98Type ':c' to resume the evaluation until the end without the stepper
99Type ':n' to resume the evaluation until the next form previously selected to step in
100Type ':s' to step into the form
101Type ':i' to inspect the current value of a variable or symbol
102Type ':b' to add a symbol as a breakpoint to use with next (n)
103Type ':r' to remove a symbol used as a breakpoint with next (n)
104Type ':d' to remove all breakpoints used with next (n)
105Type ':w' to print the value of a binding in all the steps (watch)
106Type ':u' to remove a watched binding (unwatch)
107Type ':bt' to show the backtrace
108Type ':q' to quit the evaluation and return NIL
109Type ':?' for a list of options
110:s
111We are in the stepper mode
112Evaluating step 4 -->
113(LIST *SOME-VAR* 3)
114Type ':?' for a list of options
115:l
116Showing the values of variable bindings.
117From inner to outer scopes:
118X=3
119*SOME-VAR*=NIL
120Showing the values of function bindings.
121From inner to outer scopes:
122Type ':?' for a list of options
123:i
124Type the name of the symbol: x
1253
126Type ':?' for a list of options
127:i
128Type the name of the symbol: *some-var*
129NIL
130Type ':?' for a list of options
131:s
132step 4 ==> value: (NIL 3)
133step 3 ==> value: (NIL 3)
134step 2 ==> value: (NIL 3)
135step 1 ==> value: (NIL 3)
136(NIL 3)
137CL-USER(7): (stepper:step (flet ((flet1 (n) (+ n n)))
138        (flet ((flet2 (n) (+ 2 (flet1 n))))
139          (flet2 2))))
140We are in the stepper mode
141Evaluating step 1 -->
142(FLET ((FLET1 (N) (+ N N)))
143  (FLET ((FLET2 (N) (+ 2 (FLET1 N)))) (FLET2 2)))
144Type ':?' for a list of options
145:s
146We are in the stepper mode
147Evaluating step 2 -->
148(FLET ((FLET2 (N) (+ 2 (FLET1 N)))) (FLET2 2))
149Type ':?' for a list of options
150:s
151We are in the stepper mode
152Evaluating step 3 -->
153((FLET FLET2) 2)
154Type ':?' for a list of options
155:l
156Showing the values of variable bindings.
157From inner to outer scopes:
158Showing the values of function bindings.
159From inner to outer scopes:
160FLET2=#<FUNCTION #<(FLET FLET2) {152C83E7}> {152C83E7}>
161FLET1=#<FUNCTION #<(FLET FLET1) {7AA67C0B}> {7AA67C0B}>
162Type ':?' for a list of options
163:s
164We are in the stepper mode
165Evaluating step 4 -->
166(BLOCK FLET2 (+ 2 (FLET1 N)))
167Type ':?' for a list of options
168:l
169Showing the values of variable bindings.
170From inner to outer scopes:
171N=2
172Showing the values of function bindings.
173From inner to outer scopes:
174FLET1=#<FUNCTION #<(FLET FLET1) {7AA67C0B}> {7AA67C0B}>
175Type ':?' for a list of options
176:s
177We are in the stepper mode
178Evaluating step 5 -->
179(+ 2 (FLET1 N))
180Type ':?' for a list of options
181:s
182We are in the stepper mode
183Evaluating step 6 -->
184((FLET FLET1) N)
185Type ':?' for a list of options
186:s
187We are in the stepper mode
188Evaluating step 7 -->
189(BLOCK FLET1 (+ N N))
190Type ':?' for a list of options
191:c
192step 7 ==> value: 4
193step 6 ==> value: 4
194step 5 ==> value: 6
195step 4 ==> value: 6
196step 3 ==> value: 6
197step 2 ==> value: 6
198step 1 ==> value: 6
1996
200CL-USER(8): (stepper:step (progn
201        ((lambda (c d) (list c d)) 3 7)))
202We are in the stepper mode
203Evaluating step 1 -->
204(PROGN ((LAMBDA (C D) (LIST C D)) 3 7))
205Type ':?' for a list of options
206:s
207We are in the stepper mode
208Evaluating step 2 -->
209(#<FUNCTION #<FUNCTION (LAMBDA (C D)) {22A1D243}> {22A1D243}> 3 7)
210Type ':?' for a list of options
211:s
212We are in the stepper mode
213Evaluating step 3 -->
214(LIST C D)
215Type ':?' for a list of options
216:i
217Type the name of the symbol: c
2183
219Type ':?' for a list of options
220:i
221Type the name of the symbol: d
2227
223Type ':?' for a list of options
224:l
225Showing the values of variable bindings.
226From inner to outer scopes:
227D=7
228C=3
229Showing the values of function bindings.
230From inner to outer scopes:
231Type ':?' for a list of options
232:s
233step 3 ==> value: (3 7)
234step 2 ==> value: (3 7)
235step 1 ==> value: (3 7)
236(3 7)
237CL-USER(9): (stepper:step (let ((a 1))  ;; for skip(q) feature, it should return NIl anyhow
238        (block whatever (list 1 2))
239        a))
240We are in the stepper mode
241Evaluating step 1 -->
242(LET ((A 1))
243  (BLOCK WHATEVER (LIST 1 2))
244  A)
245Type ':?' for a list of options
246:s
247We are in the stepper mode
248Evaluating step 2 -->
249(BLOCK WHATEVER (LIST 1 2))
250Type ':?' for a list of options
251:l
252Showing the values of variable bindings.
253From inner to outer scopes:
254A=1
255Showing the values of function bindings.
256From inner to outer scopes:
257Type ':?' for a list of options
258:s
259We are in the stepper mode
260Evaluating step 3 -->
261(LIST 1 2)
262Type ':?' for a list of options
263:q
264NIL
265CL-USER(10): (stepper:step (let ((a 1))  ;; for skip(q) feature, it should return NIl anyhow
266        (block whatever (list 1 2))
267        a))
268We are in the stepper mode
269Evaluating step 1 -->
270(LET ((A 1))
271  (BLOCK WHATEVER (LIST 1 2))
272  A)
273Type ':?' for a list of options
274:c
275step 1 ==> value: 1
2761
277CL-USER(11): (stepper:step (let ((a 1))
278        (let ((a 2) (b 1))
279          (- a b)) ;; <-- list locals
280        (+ a 3 7)))
281We are in the stepper mode
282Evaluating step 1 -->
283(LET ((A 1))
284  (LET ((A 2) (B 1))
285    (- A B))
286  (+ A 3 7))
287Type ':?' for a list of options
288:s
289We are in the stepper mode
290Evaluating step 2 -->
291(LET ((A 2) (B 1))
292  (- A B))
293Type ':?' for a list of options
294:s
295We are in the stepper mode
296Evaluating step 3 -->
297(- A B)
298Type ':?' for a list of options
299:l
300Showing the values of variable bindings.
301From inner to outer scopes:
302B=1
303A=2
304A=1
305Showing the values of function bindings.
306From inner to outer scopes:
307Type ':?' for a list of options
308:s
309step 3 ==> value: 1
310step 2 ==> value: 1
311We are in the stepper mode
312Evaluating step 4 -->
313(+ A 3 7)
314Type ':?' for a list of options
315:l
316Showing the values of variable bindings.
317From inner to outer scopes:
318A=1
319Showing the values of function bindings.
320From inner to outer scopes:
321Type ':?' for a list of options
322:s
323step 4 ==> value: 11
324step 1 ==> value: 11
32511
326CL-USER(12): (stepper:step (progn (defparameter *azf* 1)))
327We are in the stepper mode
328Evaluating step 1 -->
329(PROGN (DEFPARAMETER *AZF* 1))
330Type ':?' for a list of options
331:c
332step 1 ==> value: *AZF*
333*AZF*
334CL-USER(13): (assert (= *azf* 1))
335NIL
336CL-USER(14): (defpackage step-next (:use :cl))
337#<PACKAGE STEP-NEXT>
338CL-USER(15): (in-package :step-next)
339#<PACKAGE STEP-NEXT>
340STEP-NEXT(16): (defun loop-1 (a b)
341  (loop :for i :below a
342        :collect (list a b)))
343LOOP-1
344STEP-NEXT(17): (defun loop-2 (a)
345  (loop :for i :below a
346        :collect i))
347LOOP-2
348STEP-NEXT(18): (defun loop-3 (n &optional (times 1))
349  (loop :for i :below times
350        :collect times))
351LOOP-3
352STEP-NEXT(19): (defun test-next (n)
353  (loop-1 (1+ n) n)
354  (loop-2 (1- n))
355  (loop-3 n 3)
356  ;; quit (q) here
357  (defparameter *test-next-var*
358    (loop :for i :below (expt 10 6)
359          :collect i)))
360TEST-NEXT
361STEP-NEXT(20): (push 'loop-1 stepper::*stepper-stop-symbols*)
362(LOOP-1)
363STEP-NEXT(21): (export 'loop-3)
364T
365STEP-NEXT(22): (push 'step-next stepper::*stepper-stop-packages*)
366(STEP-NEXT)
367STEP-NEXT(23): (stepper:step (test-next 7))
368We are in the stepper mode
369Evaluating step 1 -->
370(TEST-NEXT 7)
371Type ':?' for a list of options
372:n
373We are in the stepper mode
374Evaluating step 2 -->
375(LOOP-1 (1+ N) N)
376Type ':?' for a list of options
377:n
378step 2 ==> value: ((8 7) (8 7) (8 7) (8 7) (8 7) (8 7) (8 7) (8 7))
379We are in the stepper mode
380Evaluating step 3 -->
381(LOOP-3 N 3)
382Type ':?' for a list of options
383:q
384NIL
385STEP-NEXT(24): (assert (not (boundp '*test-next-var*)))
386NIL
387STEP-NEXT(25): (stepper:step (test-next 7))
388We are in the stepper mode
389Evaluating step 1 -->
390(TEST-NEXT 7)
391Type ':?' for a list of options
392:r
393Type the name of the breakpoint symbol to remove: loop-1
394Type ':?' for a list of options
395:b
396Type the name of the symbol to use as a breakpoint with next (n): loop-2
397Type ':?' for a list of options
398:n
399We are in the stepper mode
400Evaluating step 2 -->
401(LOOP-2 (1- N))
402Type ':?' for a list of options
403:n
404step 2 ==> value: (0 1 2 3 4 5)
405We are in the stepper mode
406Evaluating step 3 -->
407(LOOP-3 N 3)
408Type ':?' for a list of options
409:c
410step 3 ==> value: (3 3 3)
411step 1 ==> value: *TEST-NEXT-VAR*
412*TEST-NEXT-VAR*
413STEP-NEXT(26): (defun test-watch ()
414  (let ((x 1))
415    (dotimes (i 7)
416      (incf x))
417    x))
418TEST-WATCH
419STEP-NEXT(27): (stepper:step (test-watch))
420We are in the stepper mode
421Evaluating step 1 -->
422(TEST-WATCH)
423Type ':?' for a list of options
424:w
425Type the name of the symbol to watch: x
426Type ':?' for a list of options
427Watched bindings:
428Couldn't find a value for symbol X
429:s
430We are in the stepper mode
431Evaluating step 2 -->
432(BLOCK TEST-WATCH
433  (LET ((X 1))
434    (DOTIMES (I 7) (SETQ X (+ X 1)))
435    X))
436Type ':?' for a list of options
437Watched bindings:
438Couldn't find a value for symbol X
439:s
440We are in the stepper mode
441Evaluating step 3 -->
442(LET ((X 1))
443  (DOTIMES (I 7) (SETQ X (+ X 1)))
444  X)
445Type ':?' for a list of options
446Watched bindings:
447Couldn't find a value for symbol X
448:s
449We are in the stepper mode
450Evaluating step 4 -->
451(DOTIMES (I 7) (SETQ X (+ X 1)))
452Type ':?' for a list of options
453Watched bindings:
454X=1
455:s
456We are in the stepper mode
457Evaluating step 5 -->
458(SETQ X (+ X 1))
459Type ':?' for a list of options
460Watched bindings:
461X=1
462:s
463We are in the stepper mode
464Evaluating step 6 -->
465(+ X 1)
466Type ':?' for a list of options
467Watched bindings:
468X=1
469:s
470step 6 ==> value: 2
471step 5 ==> value: 2
472We are in the stepper mode
473Evaluating step 7 -->
474(SETQ X (+ X 1))
475Type ':?' for a list of options
476Watched bindings:
477X=2
478:s
479We are in the stepper mode
480Evaluating step 8 -->
481(+ X 1)
482Type ':?' for a list of options
483Watched bindings:
484X=2
485:s
486step 8 ==> value: 3
487step 7 ==> value: 3
488We are in the stepper mode
489Evaluating step 9 -->
490(SETQ X (+ X 1))
491Type ':?' for a list of options
492Watched bindings:
493X=3
494:s
495We are in the stepper mode
496Evaluating step 10 -->
497(+ X 1)
498Type ':?' for a list of options
499Watched bindings:
500X=3
501:s
502step 10 ==> value: 4
503step 9 ==> value: 4
504We are in the stepper mode
505Evaluating step 11 -->
506(SETQ X (+ X 1))
507Type ':?' for a list of options
508Watched bindings:
509X=4
510:s
511We are in the stepper mode
512Evaluating step 12 -->
513(+ X 1)
514Type ':?' for a list of options
515Watched bindings:
516X=4
517:s
518step 12 ==> value: 5
519step 11 ==> value: 5
520We are in the stepper mode
521Evaluating step 13 -->
522(SETQ X (+ X 1))
523Type ':?' for a list of options
524Watched bindings:
525X=5
526:u
527Type the name of the symbol to (un)watch : x
528Type ':?' for a list of options
529:s
530We are in the stepper mode
531Evaluating step 14 -->
532(+ X 1)
533Type ':?' for a list of options
534:s
535step 14 ==> value: 6
536step 13 ==> value: 6
537We are in the stepper mode
538Evaluating step 15 -->
539(SETQ X (+ X 1))
540Type ':?' for a list of options
541:s
542We are in the stepper mode
543Evaluating step 16 -->
544(+ X 1)
545Type ':?' for a list of options
546:s
547step 16 ==> value: 7
548step 15 ==> value: 7
549We are in the stepper mode
550Evaluating step 17 -->
551(SETQ X (+ X 1))
552Type ':?' for a list of options
553:s
554We are in the stepper mode
555Evaluating step 18 -->
556(+ X 1)
557Type ':?' for a list of options
558:s
559step 18 ==> value: 8
560step 17 ==> value: 8
561step 4 ==> value: NIL
562step 3 ==> value: 8
563step 2 ==> value: 8
564step 1 ==> value: 8
5658
566STEP-NEXT(28): (defun test-backtrace (x)
567  (labels ((f1 (x) (f2 (1+ x)))
568           (f2 (x) (f3 (* x 3)))
569           (f3 (x) (+ x 10)))
570    (f1 x)))
571TEST-BACKTRACE
572STEP-NEXT(29): (stepper:step (test-backtrace 3))
573We are in the stepper mode
574Evaluating step 1 -->
575(TEST-BACKTRACE 3)
576Type ':?' for a list of options
577:s
578We are in the stepper mode
579Evaluating step 2 -->
580(BLOCK TEST-BACKTRACE
581  (LABELS ((F1 (X) (F2 (1+ X)))
582           (F2 (X) (F3 (* X 3)))
583           (F3 (X) (+ X 10)))
584    (F1 X)))
585Type ':?' for a list of options
586:s
587We are in the stepper mode
588Evaluating step 3 -->
589(LABELS ((F1 (X) (F2 (1+ X)))
590         (F2 (X) (F3 (* X 3)))
591         (F3 (X) (+ X 10)))
592  (F1 X))
593Type ':?' for a list of options
594:s
595We are in the stepper mode
596Evaluating step 4 -->
597((LABELS F1) X)
598Type ':?' for a list of options
599:s
600We are in the stepper mode
601Evaluating step 5 -->
602(BLOCK F1 (F2 (1+ X)))
603Type ':?' for a list of options
604:s
605We are in the stepper mode
606Evaluating step 6 -->
607((LABELS F2) (1+ X))
608Type ':?' for a list of options
609:s
610We are in the stepper mode
611Evaluating step 7 -->
612(1+ X)
613Type ':?' for a list of options
614:s
615step 7 ==> value: 4
616We are in the stepper mode
617Evaluating step 8 -->
618(BLOCK F2 (F3 (* X 3)))
619Type ':?' for a list of options
620:s
621We are in the stepper mode
622Evaluating step 9 -->
623((LABELS F3) (* X 3))
624Type ':?' for a list of options
625:s
626We are in the stepper mode
627Evaluating step 10 -->
628(* X 3)
629Type ':?' for a list of options
630:s
631step 10 ==> value: 12
632We are in the stepper mode
633Evaluating step 11 -->
634(BLOCK F3 (+ X 10))
635Type ':?' for a list of options
636:s
637We are in the stepper mode
638Evaluating step 12 -->
639(+ X 10)
640Type ':?' for a list of options
641:bt
642
643(#<LISP-STACK-FRAME ((LABELS F3) 12) {3839E350}>
644 #<LISP-STACK-FRAME ((LABELS F2) 4) {42EF4336}>
645 #<LISP-STACK-FRAME ((LABELS F1) 3) {71E556E2}>
646 #<LISP-STACK-FRAME (TEST-BACKTRACE 3) {2D1E31F3}>
647 #<LISP-STACK-FRAME (SYSTEM::%EVAL (ABCL-STEPPER:STEP (TEST-BACKTRACE 3))) {5ACA7463}>
648 #<LISP-STACK-FRAME (EVAL (ABCL-STEPPER:STEP (TEST-BACKTRACE 3))) {62846AFF}>
649 #<LISP-STACK-FRAME (SYSTEM:INTERACTIVE-EVAL (ABCL-STEPPER:STEP (TEST-BACKTRACE 3))) {390D720B}>
650 #<LISP-STACK-FRAME (TOP-LEVEL::REPL) {65405D70}>
651 #<LISP-STACK-FRAME (TOP-LEVEL::TOP-LEVEL-LOOP) {6CA054D7}>)
652Type ':?' for a list of options
653:c
654step 12 ==> value: 22
655step 11 ==> value: 22
656step 9 ==> value: 22
657step 8 ==> value: 22
658step 6 ==> value: 22
659step 5 ==> value: 22
660step 4 ==> value: 22
661step 3 ==> value: 22
662step 2 ==> value: 22
663step 1 ==> value: 22
66422
665STEP-NEXT(30): (stepper:step (values (list (cons 1 3) (cons 1 7))
666                      (list (cons 2 4) (cons 2 8))))
667We are in the stepper mode
668Evaluating step 1 -->
669(VALUES (LIST (CONS 1 3) (CONS 1 7)) (LIST (CONS 2 4) (CONS 2 8)))
670Type ':?' for a list of options
671:s
672We are in the stepper mode
673Evaluating step 2 -->
674(LIST (CONS 1 3) (CONS 1 7))
675Type ':?' for a list of options
676:s
677We are in the stepper mode
678Evaluating step 3 -->
679(CONS 1 3)
680Type ':?' for a list of options
681:s
682step 3 ==> value: (1 . 3)
683We are in the stepper mode
684Evaluating step 4 -->
685(CONS 1 7)
686Type ':?' for a list of options
687:s
688step 4 ==> value: (1 . 7)
689step 2 ==> value: ((1 . 3) (1 . 7))
690We are in the stepper mode
691Evaluating step 5 -->
692(LIST (CONS 2 4) (CONS 2 8))
693Type ':?' for a list of options
694:sn
695step 5 ==> value: ((2 . 4) (2 . 8))
696step 1 ==> value: ((1 . 3) (1 . 7))
697step 1 ==> value: ((2 . 4) (2 . 8))
698((1 . 3) (1 . 7))
699((2 . 4) (2 . 8))
700STEP-NEXT(31):
701```
702
703For steps with ASDF systems we can use asdf:load-source-op
704
705```
706CL-USER(1): (require :asdf)
707NIL
708CL-USER(2): (require :abcl-contrib)
709NIL
710CL-USER(3): (require :abcl-stepper)
711NIL
712CL-USER(4): (asdf:load-system :quicklisp-abcl)
713T
714CL-USER(5): (ql:quickload :alexandria)
715To load "alexandria":
716  Load 1 ASDF system:
717    alexandria
718; Loading "alexandria"
719
720(:ALEXANDRIA)
721CL-USER(6): (asdf:operate 'asdf:load-source-op :alexandria)
722#<ASDF/LISP-ACTION:LOAD-SOURCE-OP >
723#<ASDF/PLAN:SEQUENTIAL-PLAN {34FAF8EA}>
724CL-USER(7): (stepper:step (alexandria:plist-hash-table '(:a 1 :b 2 :c 3)))
725We are in the stepper mode
726Evaluating step 1 -->
727(ALEXANDRIA:PLIST-HASH-TABLE '(:A 1 :B 2 :C 3))
728Type ':?' for a list of options
729:s
730We are in the stepper mode
731Evaluating step 2 -->
732'(:A 1 :B 2 :C 3)
733Type ':?' for a list of options
734:s
735step 2 ==> value: (:A 1 :B 2 :C 3)
736We are in the stepper mode
737Evaluating step 3 -->
738(BLOCK ALEXANDRIA:PLIST-HASH-TABLE
739  (LET ((ALEXANDRIA::TABLE
740         (APPLY #'MAKE-HASH-TABLE ALEXANDRIA::HASH-TABLE-INITARGS)))
741    (DO ((ALEXANDRIA::TAIL ALEXANDRIA::PLIST
742          (CDDR ALEXANDRIA::TAIL)))
743        ((NOT ALEXANDRIA::TAIL))
744      (LET ((#:KEY29386 (CAR ALEXANDRIA::TAIL))
745            (#:HASH-TABLE29387 ALEXANDRIA::TABLE))
746        (MULTIPLE-VALUE-BIND (#:VALUE29388 #:PRESENTP29389)
747            (GETHASH #:KEY29386 #:HASH-TABLE29387)
748          (IF #:PRESENTP29389
749              (VALUES #:VALUE29388 #:PRESENTP29389)
750              (VALUES (SYSTEM:PUTHASH #:KEY29386
751                                      #:HASH-TABLE29387
752                                      (CADR ALEXANDRIA::TAIL))
753                      NIL)))))
754    ALEXANDRIA::TABLE))
755Type ':?' for a list of options
756:s
757We are in the stepper mode
758Evaluating step 4 -->
759(LET ((ALEXANDRIA::TABLE
760       (APPLY #'MAKE-HASH-TABLE ALEXANDRIA::HASH-TABLE-INITARGS)))
761  (DO ((ALEXANDRIA::TAIL ALEXANDRIA::PLIST (CDDR ALEXANDRIA::TAIL)))
762      ((NOT ALEXANDRIA::TAIL))
763    (LET ((#:KEY29386 (CAR ALEXANDRIA::TAIL))
764          (#:HASH-TABLE29387 ALEXANDRIA::TABLE))
765      (MULTIPLE-VALUE-BIND (#:VALUE29388 #:PRESENTP29389)
766          (GETHASH #:KEY29386 #:HASH-TABLE29387)
767        (IF #:PRESENTP29389
768            (VALUES #:VALUE29388 #:PRESENTP29389)
769            (VALUES (SYSTEM:PUTHASH #:KEY29386
770                                    #:HASH-TABLE29387
771                                    (CADR ALEXANDRIA::TAIL))
772                    NIL)))))
773  ALEXANDRIA::TABLE)
774Type ':?' for a list of options
775:s
776We are in the stepper mode
777Evaluating step 5 -->
778(APPLY #'MAKE-HASH-TABLE ALEXANDRIA::HASH-TABLE-INITARGS)
779Type ':?' for a list of options
780:l
781Showing the values of variable bindings.
782From inner to outer scopes:
783HASH-TABLE-INITARGS=NIL
784PLIST=(A 1 B 2 C 3)
785HASH-TABLE-INITARGS=NIL
786PLIST=(A 1 B 2 C 3)
787Showing the values of function bindings.
788From inner to outer scopes:
789Type ':?' for a list of options
790:s
791We are in the stepper mode
792Evaluating step 6 -->
793#'MAKE-HASH-TABLE
794Type ':?' for a list of options
795:s
796step 6 ==> value: #<MAKE-HASH-TABLE {646E548B}>
797step 5 ==> value: #<EQL HASH-TABLE 0 entries, 11 buckets {733688E9}>
798We are in the stepper mode
799Evaluating step 7 -->
800(DO ((ALEXANDRIA::TAIL ALEXANDRIA::PLIST (CDDR ALEXANDRIA::TAIL)))
801    ((NOT ALEXANDRIA::TAIL))
802  (LET ((#:KEY29386 (CAR ALEXANDRIA::TAIL))
803        (#:HASH-TABLE29387 ALEXANDRIA::TABLE))
804    (MULTIPLE-VALUE-BIND (#:VALUE29388 #:PRESENTP29389)
805        (GETHASH #:KEY29386 #:HASH-TABLE29387)
806      (IF #:PRESENTP29389
807          (VALUES #:VALUE29388 #:PRESENTP29389)
808          (VALUES (SYSTEM:PUTHASH #:KEY29386
809                                  #:HASH-TABLE29387
810                                  (CADR ALEXANDRIA::TAIL))
811                  NIL)))))
812Type ':?' for a list of options
813:s
814We are in the stepper mode
815Evaluating step 8 -->
816(NOT ALEXANDRIA::TAIL)
817Type ':?' for a list of options
818:s
819step 8 ==> value: NIL
820We are in the stepper mode
821Evaluating step 9 -->
822(LET ((#:KEY29386 (CAR ALEXANDRIA::TAIL))
823      (#:HASH-TABLE29387 ALEXANDRIA::TABLE))
824  (MULTIPLE-VALUE-BIND (#:VALUE29388 #:PRESENTP29389)
825      (GETHASH #:KEY29386 #:HASH-TABLE29387)
826    (IF #:PRESENTP29389
827        (VALUES #:VALUE29388 #:PRESENTP29389)
828        (VALUES (SYSTEM:PUTHASH #:KEY29386
829                                #:HASH-TABLE29387
830                                (CADR ALEXANDRIA::TAIL))
831                NIL))))
832Type ':?' for a list of options
833:s
834We are in the stepper mode
835Evaluating step 10 -->
836(CAR ALEXANDRIA::TAIL)
837Type ':?' for a list of options
838:c
839step 10 ==> value: :A
840step 9 ==> value: 1
841step 7 ==> value: NIL
842step 4 ==> value: #<EQL HASH-TABLE 3 entries, 11 buckets {733688E9}>
843step 3 ==> value: #<EQL HASH-TABLE 3 entries, 11 buckets {733688E9}>
844step 1 ==> value: #<EQL HASH-TABLE 3 entries, 11 buckets {733688E9}>
845#<EQL HASH-TABLE 3 entries, 11 buckets {733688E9}>
846CL-USER(8):
847```
Note: See TracBrowser for help on using the repository browser.