Skip to main content
Log in

The design and implementation of a dataflow language for scriptable debugging

  • Published:
Automated Software Engineering Aims and scope Submit manuscript

Abstract

Debugging is a laborious, manual activity that often involves the repetition of common operations. Ideally, users should be able to describe these repetitious operations as little programs. Debuggers should therefore be programmable, or scriptable. The operating environment of these scripts, however, imposes interesting design challenges on the programming language in which these scripts are written.

This paper presents our design of a language for scripting debuggers. The language offers powerful primitives that can precisely and concisely capture many important debugging and comprehension metaphors. The paper also describes a pair of debuggers, one for Java and the other for Scheme, built in accordance with these principles. The paper includes concrete examples of applying this debugger to programs.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15

Similar content being viewed by others

Notes

  1. Here and in the rest of this paper, we use the infix notation supported by FrTime: (x . op . y) is the same as (op x y) in traditional Lisp syntax.

  2. In Scheme, any value other than false is true.

  3. Since the property we are monitoring depends only on the nodes’ weights, not their identities, the model avoids potential ordering discrepancies between equally-weighted nodes.

  4. Our work additionally introduces a syntactic difference when the target language is Java, but this can be papered over by a preprocessor.

  5. The Ruby JDWP project. http://rubyforge.org/projects/rubyjdwp/.

  6. We also have another behavior where/ss (for where with single stepping) which updates at every step of the execution. This is useful for scripts that want to process the entire trace of the target. However, where/ss is disabled by default, for performance reasons.

References

  • Aral, Z., Gertner, I.: High-level debugging in Parasight. In: Proceedings of the ACM SIGPLAN and SIGOPS Workshop on Parallel and Distributed Debugging, pp. 151–162. ACM Press (1988)

  • Aspect oriented programming (article series). Commun. ACM 44(10) (2001)

  • Auguston, M., Jeffery, C., Underwood, S.: A framework for automatic debugging. In: Automated Software Engineering, pp. 217–222 (2002)

  • Bruegge, B., Hibbard, P.: Generalized path expressions: A high level debugging mechanism. In: Proceedings of the ACM SIGSOFT/SIGPLAN Software Engineering Symposium on High-level Debugging, pp. 34–44 (1983)

  • Clements, J., Felleisen, M.: A tail-recursive machine with stack inspection. ACM Trans. Program. Lang. Syst. 26(6), 1029–1052 (2004)

    Google Scholar 

  • Cooper, G.H., Krishnamurthi, S.: Embedding dynamic dataflow in a call-by-value language. In: European Symposium on Programming (2006)

  • Cormen, T.H., Leiserson, C.E., Rivest, R.L.: Introduction to Algorithms. McGraw-Hill (1997)

  • Courtney, A.: Frappé: Functional reactive programming in Java. In: Practical Aspects of Declarative Languages, pp. 29–44. Springer-Verlag (March 2001)

  • Crawford, R.H., Olsson, R.A., Ho, W.W., Wee, C.E.: Semantic issues in the design of languages for debugging. In: Proceedings of the International Conference on Computer Languages, pp. 252–261 (1992)

  • de Sousa Dias, M., Richardson, D.J.: Issues on software monitoring. Technical report, ICS (2002)

  • Ducassé, M.: Coca: an automated debugger for C. In: Proceedings of the 21st International Conference on Software Engineering, pp. 504–513 (1999)

  • Elliott, C., Hudak, P.: Functional reactive animation. In: Proceedings of the International Conference on Functional Programming, pp. 263–277 (1997)

  • Filman, R., Friedman, D.P.: Aspect-oriented programming is quantification and obliviousness. In: Workshop on Advanced Separation of Concerns (October 2000)

  • Findler, R.B., Clements, J., Flanagan, C., Flatt, M., Krishnamurthi, S., Steckler, P., Felleisen, M.: DrScheme: A programming environment for Scheme. J. Funct. Program. 12(2), 159–182 (2002)

    Google Scholar 

  • Flatt, M., Findler, R.B., Krishnamurthi, S., Felleisen, M.: Programming languages as operating systems (or, Revenge of the Son of the Lisp Machine). In: ACM SIGPLAN International Conference on Functional Programming, pp. 138–147 (September 1999)

  • Golan, M., Hanson, D.R.: DUEL – a very high-level debugging language. In: Proceedings of the USENIX Annual Technical Conference, pp. 107–118, Winter (1993)

  • Hanson, D.R., Kom, J.L.: A simple and extensible graphical debugger. In: Proceedings of the USENIX Annual Technical Conference, pp. 183–174 (1997)

  • Jeffery, C., Zhou, W., Templer, K., Brazell, M.: A lightweight architecture for program execution monitoring. In: SIGPLAN Notices vol. 33, pp. 67–74 (1998)

  • Johnson, M.S.: Dispel: A run-time debugging language. Comput. Lang. 6, 79–94 (1981)

    Google Scholar 

  • Kelsey, R., Clinger, W., Rees, J.: Revised5 report on the algorithmic language Scheme. ACM SIGPLAN Notices 33(9) (1998)

  • Lencevicius, R.: On-the-fly query-based debugging with examples. In: Proceedings of the Fourth International Workshop on Automated Debugging (2000)

  • Lencevicius, R., Hölzle, U., Singh, A.K.: Dynamic query-based debugging of object-oriented programs. Autom. Softw. Eng. 10(1), 39–74 (2003)

    Google Scholar 

  • Marceau, G., Cooper, G.H., Krishnamurthi, S., Reiss, S.P.: A dataflow language for scriptable debugging. In: IEEE International Conference on Automated Software Engineering (2004)

  • Meyer, B.: Eiffel: The Language. Prentice-Hall (1992)

  • Olsson, R.A., Crawford, R.H., Wilson Ho, W.: Dalek: A GNU, improved programmable debugger. In: Proceedings of the Usenix Technical Conference, pp. 221–232 (1990)

  • Smith, D.R.: A generative approach to aspect-oriented programming. In: International Conference on Generative Programming and Component Engineering, vol. 3286, pp. 39–54 (2004)

  • Stallman, R.M.: GDB Manual (The GNU Source-Level Debugger). Free Software Foundation, third edition. Cambridge, MA (January 1989)

  • Winterbottom, P.: Acid, a debugger built from a language. In: Proceedings of the USENIX Annual Technical Conference, pp. 211–222 (January 1994)

Download references

Acknowledgments

We thank the functional reactive programming group at Yale University, particularly John Peterson, Antony Courtney and Paul Hudak, for useful discussions. Thanks to Daniel Silva and John Clements who helped with the implementation. Thanks to the anonymous reviewers for helping improve the quality of our presentation. We also thank Manos Renieris, Philip Klein and Kathryn Doiron for their comments.

Author information

Authors and Affiliations

Authors

Additional information

This research was partially supported by NSF grant CCR-0305949.

A preliminary version of this paper appeared in the 19th ieee International Conference on Automated Software Engineering (ase 2004) (Marceau et al., 2004).

Rights and permissions

Reprints and permissions

About this article

Cite this article

Marceau, G., Cooper, G.H., Spiro, J.P. et al. The design and implementation of a dataflow language for scriptable debugging. Autom Softw Eng 14, 59–86 (2007). https://doi.org/10.1007/s10515-006-0003-z

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10515-006-0003-z

Keywords

Navigation