Abstract
This paper explores the semantics of the meta-notation used in the style of operational semantics introduced by Felleisen and Hieb. Specifically, it defines a formal system that gives precise meanings to the notions of contexts, decomposition, and plugging (recomposition) left implicit in most expositions. This semantics is not naturally algorithmic, so the paper also provides an algorithm and proves a correspondence with the declarative definition.
The motivation for this investigation is PLT Redex, a domain-specific programming language designed to support Felleisen-Hieb-style semantics. This style of semantics is the de-facto standard in operational semantics and, as such, is widely used. Accordingly, our goal is that Redex programs should, as much as possible, look and behave like those semantics. Since Redex’s first public release more than seven years ago, its precise interpretation of contexts has changed several times, as we repeatedly encountered reduction systems that did not behave according to their authors’ intent. This paper describes the culimation of that experience. To the best of our knowledge, the semantics given here accommodates even the most complex uses of contexts available.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Ariola, Z.M., Felleisen, M.: The Call-by-Need Lambda-Calculus. J. Functional Programming 7(3), 265–301 (1997)
Aydemir, B.E., Bohannon, A., Fairbairn, M., Nathan Foster, J., Pierce, B.C., Sewell, P., Vytiniotis, D., Washburn, G., Weirich, S., Zdancewic, S.: Mechanized Metatheory for the Masses: The POPLmark Challenge. In: Hurd, J., Melham, T. (eds.) TPHOLs 2005. LNCS, vol. 3603, pp. 50–65. Springer, Heidelberg (2005)
Barendregt, H.P.: The Lambda Calculus: Its Syntax and Semantics. North-Holland (1984)
Chang, S., Felleisen, M.: The Call-by-need Lambda Calculus (unpublished manuscript, 2011)
Danvy, O., Nielsen, L.R.: Refocusing in Reduction Semantics. Aarhus University, BRICS RS-04-26 (2004)
Dubois, C.: Proving ML Type Soundness within Coq. In: Aagaard, M.D., Harrison, J. (eds.) TPHOLs 2000. LNCS, vol. 1869, pp. 126–144. Springer, Heidelberg (2000)
Felleisen, M., Findler, R.B., Flatt, M.: Semantics Engineering with PLT Redex. MIT Press (2010)
Felleisen, M., Hieb, R.: The Revised Report on the Syntactic Theories of Squential Control and State. Theoretical Computer Science 103(2), 235–271 (1992)
Flatt, M., Yu, G., Findler, R.B., Felleisen, M.: Adding Delimited and Composable Control to a Production Programming Environment. In: Proc. ACM Intl. Conf. Functional Programming, pp. 165–176 (2007)
Frost, R.A., Hafiz, R., Callaghan, P.C.: Modular and Efficient Top-Down Parsing for Ambiguous Left-Recursive Grammars. In: Proc. International Conference on Parsing Technology, pp. 109–120 (2007)
Klein, C., Flatt, M., Findler, R.B.: The Racket Virtual Machine and Randomized Testing (2010), http://plt.eecs.northwestern.edu/racket-machine/
Kuno, S.: The Predictive Analyzer and a Path Elimination Technique. Communications of the ACM 8(7), 453–462 (1965)
Lucas, S.: Fundamentals of Context-Sensitive Rewriting. In: Bartosek, M., Staudek, J., Wiedermann, J. (eds.) SOFSEM 1995. LNCS, vol. 1012, pp. 405–412. Springer, Heidelberg (1995)
Matthews, J., Findler, R.B., Flatt, M., Felleisen, M.: A Visual Environment for Developing Context-Sensitive Term Rewriting Systems. In: van Oostrom, V. (ed.) RTA 2004. LNCS, vol. 3091, pp. 301–311. Springer, Heidelberg (2004)
Sieczkowski, F., Biernacka, M., Biernacki, D.: Automating Derivations of Abstract Machines from Reduction Semantics: A Generic Formalization of Refocusing in Coq. In: Proc. Symp. Implementation and Application of Functional Languages. To appear in LNCS (2010)
Sperber, M., Kent Dybvig, R., Flatt, M., van Straaten, A., Kelsey, R., Clinger, W., Rees, J., Findler, R.B., Matthews, J.: Revised [6] Report on the Algorithmic Language Scheme. Cambridge University Press (2007)
Warth, A., Douglass, J.R., Millstein, T.: Packrat Parsers Can Support Left Recursion. In: Proc. ACM SIGPLAN Wksp. Partial Evaluation and Program Manipulation, pp. 103–110 (2008)
Xiao, Y., Sabry, A., Ariola, Z.M.: From Syntactic Theories to Interpreters: Automating the Proof of Unique Decomposition. Higher-Order and Symbolic Computation 14(4), 387–409 (2001)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Klein, C., McCarthy, J., Jaconette, S., Findler, R.B. (2011). A Semantics for Context-Sensitive Reduction Semantics. In: Yang, H. (eds) Programming Languages and Systems. APLAS 2011. Lecture Notes in Computer Science, vol 7078. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-25318-8_27
Download citation
DOI: https://doi.org/10.1007/978-3-642-25318-8_27
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-25317-1
Online ISBN: 978-3-642-25318-8
eBook Packages: Computer ScienceComputer Science (R0)