Skip to main content Accessibility help

Semantics directed program execution monitoring

  • Amir Kishon (a1) and Paul Hudak (a1)

Monitoring semantics is a formal model of program execution which captures ‘monitoring activity’ as found in profilers, tracers, debuggers, etc. Beyond its theoretical interest, this formalism provides a new methodology for implementing a large family of source-level monitoring activities for sequential deterministic programming languages. In this article we explore the use of monitoring semantics in the specification and implementation of a variety of monitors: profilers, tracers, collecting interpreters, and, most importantly, interactive source-level debuggers. Although we consider such monitors only for (both strict and non-strict) functional languages, the methodology extends easily to imperative languages, since it begins with a continuation semantics specification.

In addition, using standard partial evaluation techniques as an optimization strategy, we show that the methodology forms a practical basis for building real monitors. Our system can be optimized at two levels of specialization: specializing the interpreter with respect to a monitor specification automatically yields an instrumented interpreter; further specializing this instrumented interpreter with respect to a source program yields an instrumented program, i.e. one in which the extra code to perform monitoring has been automatically embedded into the program.

Hide All
Abelson, H., Sussman, G. J. and Sussman, J. (1985) Structure and Interpretation of Computer Programs. MIT Press.
Allison, L. (1986) A Practical Introduction to Denotational Semantics. Cambridge University Press.
Appel, A. W. and Jim, T. (1989) Continuation-passing, closure-passing style. In: ACM Symposium on Principles of Programming Languages. pp. 193302, January.
Berry, D. (1991) Generating Program Animators from Programming Language Semantics. PhD thesis, University of Edinburgh, June.
Bertotm, Y. (1988) Occurrences in debugger specifications. In: Proceedings ACM Conference on Programming Languages Design and Implementation.ACM, 06.
Bjørner, D., Ershov, A. P. and Jones, N. D. (1988) Partial Evaluation and Mixed Computation. North-Holland.
Clinger, W. and Rees, J. (1991) Revised4 report on the algorithmic language scheme. Technical Report MIT AI MEMO, MIT, Cambridge, MA, November.
Cook, W. and Palsberg, J. (1989) A denotational semantics of inheritance and its correctness. In: OOPSLA 1989. SIGPLAN Notices, 24(10), October.
Delisle, N. M., Menicosy, D. E. and Schwarts, M. D. (1984) Viewing a programming environment as a single tool. In: Proceedings of the ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments, April. (SIGPLAN Notices, 19(5), May.)
Dybvig, K. R., Friedman, D. P. and Haynes, C. T. (1988) Expansion-passing style: A general macro mechanism. In: Lisp and Symbolic Computation, 1, pp. 5375. Kluwer Academic.
Hall, C. V. and O'Donnell, J. T. (1985) Debugging in a side effect free programming environment. In: Proceedings SIGPLAN Symposium on Programming Languages and Programming Environments, June.
Hudak, P. and Fasel, J. (1992) A gentle introduction to Haskell. ACM SIGPLAN Notices, 27(5), May 1992.
Hudak, P., Peyton Jones, S. and Wadler, P. (eds.) (1992) Report on the Programming Language Haskell, A Non-strict Purely Functional Language (Version 1.2). SIGPLAN Notices, 27(5), May.
Hudak, P. and Young, J. (1988) A collecting interpretation of expressions (without powerdomains). In: Proceedings of the ACM Symposium of Principles of Programming Languages.ACM.
Jones, N. D., Sestoft, P. and Sondergaard, H. (1987) Mix: a self-applicable partial evaluator for experiments in compiler generation. Technical Report DIKU Report 87/08, University of Copenhagen, Denmark.
Kishon, A. (1992) Theory and Practice of Semantics-directed Program Execution Monitoring. PhD thesis, Yale University, May. (Also Yale Research Report YALEU/DCS/RR-905.)
Kishon, A., Hudak, P. and Consel, C. (1988) Monitoring semantics: A formal framework for specifying, implementing and reasoning about execution monitors. In: Proceedings of the ACM Conference on Programming Languages Design and Implementation.ACM, June.
Kranz, D. A. (1988) ORBIT: An Optimizing Compiler for Scheme. PhD thesis, Yale University.
Kranz, D. A., Kelsey, R., Rees, J. A., Hudak, P., Philbin, J. and Adams, N. I. (1986) Orbit: An optimizing compiler for Scheme. In: Proceedings of the SIGPLAN Symposium on Compiler Construction. pp. 219233, June.
Lee, P. (1989) Realistic Compiler Generation. MIT Press.
O'Donnell, J. T. and Hall, C. V. (1988) Debugging in applicative languages. In: Lisp and Symbolic Computation, 1. Kluwer Academic.
Reddy, U. (1988) Objects as closures: Abstract semantics of object oriented languages. In: ACM Conference on Lisp and Functional Programming.
Safra, S. and Shapiro, E. (1989) Meta interpreters for real. In: Concurrent Prolog, collected papers, Vol. 2. MIT Press.
Shapiro, E. (1982) Algorithmic Program Debugging. MIT Press.
Sterling, L. and Shapiro, E. (1986) The Art of Prolog, Advanced Programming Techniques. MIT Press.
Tennent, R. G. (1977) A denotational definition of the programming language Pascal. Technical Report Technical Report 77–47, Department of Computing Sciences, Queen's University, Ontario.
Tolmach, A. P. and Appel, A. W. (1990) Debugging Standard ML without reverse engineering. In: Proceedings ACM Conference on Lisp and functional programming, June.
Toyn, I. and Runciman, C. (1986) Adapting combinator and secd machines to display snapshots of functional computations. New Generation Computing, 4:339363.
Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Journal of Functional Programming
  • ISSN: 0956-7968
  • EISSN: 1469-7653
  • URL: /core/journals/journal-of-functional-programming
Please enter your name
Please enter a valid email address
Who would you like to send this to? *


Altmetric attention score

Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed

Semantics directed program execution monitoring

  • Amir Kishon (a1) and Paul Hudak (a1)
Submit a response


No Discussions have been published for this article.


Reply to: Submit a response

Your details

Conflicting interests

Do you have any conflicting interests? *