Hostname: page-component-7479d7b7d-q6k6v Total loading time: 0 Render date: 2024-07-11T09:24:25.515Z Has data issue: false hasContentIssue false

Semantics directed program execution monitoring

Published online by Cambridge University Press:  07 November 2008

Amir Kishon
Affiliation:
Department of Computer Science, Yale University, New Haven, CT 06520, USA e-mail: {kishon,hudak}@cs.yale.edu
Paul Hudak
Affiliation:
Department of Computer Science, Yale University, New Haven, CT 06520, USA e-mail: {kishon,hudak}@cs.yale.edu
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

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.

Type
Articles
Copyright
Copyright © Cambridge University Press 1995

References

Abelson, H., Sussman, G. J. and Sussman, J. (1985) Structure and Interpretation of Computer Programs. MIT Press.Google Scholar
Allison, L. (1986) A Practical Introduction to Denotational Semantics. Cambridge University Press.Google Scholar
Appel, A. W. and Jim, T. (1989) Continuation-passing, closure-passing style. In: ACM Symposium on Principles of Programming Languages. pp. 193302, January.CrossRefGoogle Scholar
Berry, D. (1991) Generating Program Animators from Programming Language Semantics. PhD thesis, University of Edinburgh, June.Google Scholar
Bertotm, Y. (1988) Occurrences in debugger specifications. In: Proceedings ACM Conference on Programming Languages Design and Implementation.ACM, 06.Google Scholar
Bjørner, D., Ershov, A. P. and Jones, N. D. (1988) Partial Evaluation and Mixed Computation. North-Holland.Google Scholar
Clinger, W. and Rees, J. (1991) Revised4 report on the algorithmic language scheme. Technical Report MIT AI MEMO, MIT, Cambridge, MA, November.Google Scholar
Cook, W. and Palsberg, J. (1989) A denotational semantics of inheritance and its correctness. In: OOPSLA 1989. SIGPLAN Notices, 24(10), October.Google Scholar
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.)CrossRefGoogle Scholar
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.Google Scholar
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.CrossRefGoogle Scholar
Hudak, P. and Fasel, J. (1992) A gentle introduction to Haskell. ACM SIGPLAN Notices, 27(5), May 1992.Google Scholar
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.CrossRefGoogle Scholar
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.CrossRefGoogle Scholar
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.Google Scholar
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.)Google Scholar
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.Google Scholar
Kranz, D. A. (1988) ORBIT: An Optimizing Compiler for Scheme. PhD thesis, Yale University.Google Scholar
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.CrossRefGoogle Scholar
Lee, P. (1989) Realistic Compiler Generation. MIT Press.Google Scholar
O'Donnell, J. T. and Hall, C. V. (1988) Debugging in applicative languages. In: Lisp and Symbolic Computation, 1. Kluwer Academic.Google Scholar
Reddy, U. (1988) Objects as closures: Abstract semantics of object oriented languages. In: ACM Conference on Lisp and Functional Programming.CrossRefGoogle Scholar
Safra, S. and Shapiro, E. (1989) Meta interpreters for real. In: Concurrent Prolog, collected papers, Vol. 2. MIT Press.Google Scholar
Shapiro, E. (1982) Algorithmic Program Debugging. MIT Press.Google Scholar
Sterling, L. and Shapiro, E. (1986) The Art of Prolog, Advanced Programming Techniques. MIT Press.Google Scholar
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.Google Scholar
Tolmach, A. P. and Appel, A. W. (1990) Debugging Standard ML without reverse engineering. In: Proceedings ACM Conference on Lisp and functional programming, June.CrossRefGoogle Scholar
Toyn, I. and Runciman, C. (1986) Adapting combinator and secd machines to display snapshots of functional computations. New Generation Computing, 4:339363.CrossRefGoogle Scholar
Submit a response

Discussions

No Discussions have been published for this article.