skip to main content
10.1145/91556.91564acmconferencesArticle/Chapter ViewAbstractPublication PageslfpConference Proceedingsconference-collections
Article
Free Access

Debugging standard ML without reverse engineering

Published:01 May 1990Publication History

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.

References

  1. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. Appel87b.A.W. Appel, "Garbage collection can be faster than stack allocation," Information Processing Letters, vol. 25, no. 4, pp. 275-279, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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 ScholarGoogle Scholar
  4. Appel89a.A.W. Appel, "Runtime tags aren't necessary," Lisp and Symbolic Computation, vol. 2, pp. 153-162, 1989.Google ScholarGoogle ScholarCross RefCross Ref
  5. Appel89b.A.W. Appel, "Continuation-passing, closure-passing style," Sixteenth ACM Syrup. on Principles of Programming Languages, pp. 293-302, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. 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 ScholarGoogle Scholar
  8. Bruegge85.B, Bruegge, "Adaptability and portability of symbolic debuggers," (Thesis) CMU-CS-85-174, Carnegie-Mellon University Dept. of Computer Science, Sept 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle ScholarCross RefCross Ref
  10. 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 ScholarGoogle Scholar
  11. 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 ScholarGoogle ScholarCross RefCross Ref
  12. 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 ScholarGoogle Scholar
  13. Hanson78.D.R. Hanson, "Event associations in SNOBOL4 for program debugging," Software Practice and Experience, vol. 8, pp. 115-129, 1978.Google ScholarGoogle ScholarCross RefCross Ref
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. McDowell89.C.E. McDowell and D.P. Helmbold, "Debugging concurrent programs," ACM Computing Surveys, vol. 21, no. 4, pp. 593-622, December 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. Milner90.R. Milner, M. Torte, and R. Harper, The Definition of Standard ML, MIT Press, Cambridge, Mass., 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Shaw87.Robert A. Shaw, "Improving garbage collector performance in virtual memory," STAN-TR-87-323, Stanford University Computer Science Department, 1987.Google ScholarGoogle Scholar
  22. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  23. Zellweger84.P.T. Zellweger, "Interactive source-level debugging of optimized programs," CSL-84-5, Xerox Corporation Palo Alto Research Center, May 1984.Google ScholarGoogle Scholar

Index Terms

  1. Debugging standard ML without reverse engineering

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in
          • Published in

            cover image ACM Conferences
            LFP '90: Proceedings of the 1990 ACM conference on LISP and functional programming
            May 1990
            348 pages
            ISBN:089791368X
            DOI:10.1145/91556

            Copyright © 1990 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 1 May 1990

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • Article

            Acceptance Rates

            Overall Acceptance Rate30of109submissions,28%

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader