ABSTRACT
We have built a novel and efficient replay debugger for our Standard ML compiler. Debugging facilities are provided by instrumenting the user's source code; this approach, made feasible by ML's safety property, is machine-independent and back-end independent. Replay is practical because ML is normally used functionally, and our compiler uses continuation-passing style; thus most of the program's state can be checkpointed quickly and compactly using call-with-current-continuation. Together, instrumentation and replay support a simple and elegant debugger featuring full variable display, polymorphic type resolution, stack trace-back, breakpointing, and reverse execution, even though our compiler is very highly optimizing and has no run-time stack.
- Appel87a.A.W. Appel and D.B. MacQueen, "A Standard ML compiler,'' in Functional Programming Languages and Computer Architecture, ed. G. Kahn, LNCS , vol. 274, pp. 301-324, Springer Verlag, 1987. Google ScholarDigital Library
- Appel87b.A.W. Appel, "Garbage collection can be faster than stack allocation," Information Processing Letters, vol. 25, no. 4, pp. 275-279, 1987. Google ScholarDigital Library
- Appel88.A.W. Appet, B.F. Duba, and D.B, MacQueen, "Profiling in the presence of optimization and garbage collection," Technical Report CS-TR-197-88, Princeton University Dept. of Computer Science, 1988.Google Scholar
- Appel89a.A.W. Appel, "Runtime tags aren't necessary," Lisp and Symbolic Computation, vol. 2, pp. 153-162, 1989.Google ScholarCross Ref
- Appel89b.A.W. Appel, "Continuation-passing, closure-passing style," Sixteenth ACM Syrup. on Principles of Programming Languages, pp. 293-302, 1989. Google ScholarDigital Library
- Aral89.Z. Aral, I. Gertner, and G. Schaffer, "Efficient debugging primitives for multiprocessors," Proc. 3rd International Conf. on Architectural Support for Programming Languages and Operating Systems, 1989. Google ScholarDigital Library
- Balzer69.R.M. Balzer, "EXDAMS - EXtendable Debugging and Monitoring System," AFIPS Proc. Spring Joint Computer Conference, vol. 34, pp. 567-580, AFIPS Press, Arlington, VA, 1969.Google Scholar
- Bruegge85.B, Bruegge, "Adaptability and portability of symbolic debuggers," (Thesis) CMU-CS-85-174, Carnegie-Mellon University Dept. of Computer Science, Sept 1985. Google ScholarDigital Library
- Cargill87.T.A. Cargill and B.N. Locanthi, "Cheap hardware support for software debugging and profiling," Proc. SIG- PLAN '87 Symposium on Compiler Construction, pp. 82- 83, June 1987. Google ScholarCross Ref
- Curtis82.R. Curtis and L. Winie, "Bugnet: A debugging system for parallel programming environments," Proc. 3rd International Conf. on Distributed Computing Systems, pp. 394-399, October 1982.Google Scholar
- Dybvig88.R.K. Dybvig, D.P. Friedman, and C.T. Haynes, "Expansion-Passing style: A general macro mechanism," Lisp and Symbolic Computation, vol. 1, pp. 53-75, 1988.Google ScholarCross Ref
- Friedman84.D.P. Friedman, C.T. Haynes, and E. Kohlbecker, "Programming with continuations," in Program transformation and programming environments, ed. P. Pepper, pp. 263-274, Springer, 1984.Google Scholar
- Hanson78.D.R. Hanson, "Event associations in SNOBOL4 for program debugging," Software Practice and Experience, vol. 8, pp. 115-129, 1978.Google ScholarCross Ref
- Hennessy82.J. Hennessy, "Symbolic debugging of optimized code," ACM Transactions on Programming Languages and Systems, vol. 4, no. 3, pp. 323-344, July 1982. Google ScholarDigital Library
- Johnson88.G.F. Johnson and D. Duggan, "Stores and partial continuations as first-class objects in a language and its envixonment," Proc. 15th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, San Diego, CA, January 1988. Google ScholarDigital Library
- LeBlanc87.T.J. LeBlanc and J.M. Mellor-Crummey, "Debugging parallel programs with Instant Replay," IEEE Transactions on Computers, vol. 36, no. 4, pp. 471-482, April 87. Google ScholarDigital Library
- McDowell89.C.E. McDowell and D.P. Helmbold, "Debugging concurrent programs," ACM Computing Surveys, vol. 21, no. 4, pp. 593-622, December 1989. Google ScholarDigital Library
- Mellor-Crummey89.J.M. Mellor-Crummey and T.J. LeBlanc, "A software instruction counter," Proc. 3rd International Conf. on Architectural Support for Programming Languages and Operating Systems, 1989. Google ScholarDigital Library
- Miller88.B.P. Miller and $.-D Choi, "A mechanism for efficient debugging of parallel programs," Proc. SIGPLAN '88 Conference on Programming Language Design and Implementation, pp. 135-144, Atlanta, Georgia, June 22- 24, 1988. Google ScholarDigital Library
- Milner90.R. Milner, M. Torte, and R. Harper, The Definition of Standard ML, MIT Press, Cambridge, Mass., 1990. Google ScholarDigital Library
- Shaw87.Robert A. Shaw, "Improving garbage collector performance in virtual memory," STAN-TR-87-323, Stanford University Computer Science Department, 1987.Google Scholar
- Wilson89.P.R. Wilson and T.G. Moher, "Demonic memory for process histories," Proc. SIGPLAN 89 Conference on Programming Language Design and Implementation, June 1989. Google ScholarDigital Library
- Zellweger84.P.T. Zellweger, "Interactive source-level debugging of optimized programs," CSL-84-5, Xerox Corporation Palo Alto Research Center, May 1984.Google Scholar
Index Terms
- Debugging standard ML without reverse engineering
Comments