Skip to main content

A Semantics for Context-Sensitive Reduction Semantics

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 7078))

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.

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  • Ariola, Z.M., Felleisen, M.: The Call-by-Need Lambda-Calculus. J. Functional Programming 7(3), 265–301 (1997)

    Article  MathSciNet  MATH  Google Scholar 

  • 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)

    Chapter  Google Scholar 

  • Barendregt, H.P.: The Lambda Calculus: Its Syntax and Semantics. North-Holland (1984)

    Google Scholar 

  • Chang, S., Felleisen, M.: The Call-by-need Lambda Calculus (unpublished manuscript, 2011)

    Google Scholar 

  • Danvy, O., Nielsen, L.R.: Refocusing in Reduction Semantics. Aarhus University, BRICS RS-04-26 (2004)

    Google Scholar 

  • 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)

    Chapter  Google Scholar 

  • Felleisen, M., Findler, R.B., Flatt, M.: Semantics Engineering with PLT Redex. MIT Press (2010)

    Google Scholar 

  • Felleisen, M., Hieb, R.: The Revised Report on the Syntactic Theories of Squential Control and State. Theoretical Computer Science 103(2), 235–271 (1992)

    Article  MathSciNet  MATH  Google Scholar 

  • 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)

    Google Scholar 

  • 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)

    Google Scholar 

  • 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)

    Article  MATH  Google Scholar 

  • 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)

    Chapter  Google Scholar 

  • 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)

    Chapter  Google Scholar 

  • 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)

    Google Scholar 

  • 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)

    Google Scholar 

  • 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)

    Google Scholar 

  • 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)

    Article  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics