Skip to main content Accessibility help
×
Home
Hostname: page-component-59b7f5684b-j4fss Total loading time: 0.265 Render date: 2022-10-04T23:21:41.152Z Has data issue: true Feature Flags: { "shouldUseShareProductTool": true, "shouldUseHypothesis": true, "isUnsiloEnabled": true, "useRatesEcommerce": false, "displayNetworkTab": true, "displayNetworkMapGraph": false, "useSa": true } hasContentIssue true

An operational semantics for Scheme1

Published online by Cambridge University Press:  01 January 2008

JACOB MATTHEWS
Affiliation:
University of Chicago (email: jacobm@cs.uchicago.edu, robby@cs.uchicago.edu)
ROBERT BRUCE FINDLER
Affiliation:
University of Chicago (email: jacobm@cs.uchicago.edu, robby@cs.uchicago.edu)
Rights & Permissions[Opens in a new window]

Abstract

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

This paper presents an operational semantics for the core of Scheme. Our specification improves over the denotational semantics from the Revised5 Report on Scheme specification in four ways. First, it covers a larger part of the language, specifically eval, quote, dynamic-wind, and the top level. Second, it models multiple values in a way that does not require changes to unrelated parts of the language. Third, it provides a faithful model of Scheme's undefined order of evaluation. Finally, we have implemented our specification in PLT Redex, a domain-specific language for writing operational semantics. The implementation allows others to experiment with our specification and allows us to build a specification test suite, which improves our confidence that our system is a faithful model of Scheme. In addition to a specification of Scheme, this paper contributes three novel modeling techniques for Felleisen Hieb-style rewriting semantics. All three techniques are applicable to a wider range of problems than modeling Scheme, and they combine seamlessly in our model, suggesting that they would scale to complete models of other languages.

Type
Articles
Copyright
Copyright © Cambridge University Press 2007

References

Clinger, W. D. (1998, June) Proper tail recursion and space efficiency. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pp 66–67.Google Scholar
Clinger, W. D. & Hansen, L. T. (1994) Lambda, the ultimate label, or a simple optimizing compiler for Scheme. ACM symposium on Lisp and Functional Programming. SIGPLAN Lisp Pointers 7(3) (July–September 1994). Available at: http://www.ccs.neu.edu/home/will/Larceny/. Accessed date: July 6, 2007.Google Scholar
Dybvig, K., Clinger, W., Flatt, M., Sperber, M. & van Straaten, A. (2006, June). The R6RS status report. Available at: http://www.schemers.org/Documents/Standards/Charter/. Accessed date: July 6, 2007.Google Scholar
Dybvig, R. K. (2005) Chez Scheme version 7 user's guide. Cadence Research Systems. Available at: http://www.scheme.com/. Accessed date: July 6, 2007.Google Scholar
Feeley, M. (2006) Gambit-C, version 4.0 beta 17. Available at: http://www.iro.umontreal.ca/gambit/. Accessed date: July 6, 2007.Google Scholar
Felleisen, M. (1987) The Calculi of lambda-v-cs Conversion: A Syntactic Theory of Control and State in Imperative Higher-Order Programming Languages. Ph.D. thesis, Indiana University.Google Scholar
Felleisen, M. (1988) Lambda-v-CS: and extended lambda-calculus for Scheme. In Proceedings of the Conference on LISP and Functional Programming.Google Scholar
Felleisen, M. & Flatt, M. (2006) Programming languages and lambda calculi. Unpublished manuscript. Available at: http://www.cs.utah.edu/plt/publications/pllc.pdf. Accessed date: July 6, 2007.Google Scholar
Felleisen, M. & Hieb, R. (1992) The revised report on the syntactic theories of sequential control and state. Theor. Comput. Sci., 102, 235271. Original version in: Technical Report 89-100, Rice University, June 1989.CrossRefGoogle Scholar
Felleisen, M., Friedman, D. P., Kohlbecker, E. & Duba, B. (1987) A syntactic theory of sequential control. Theor. Comput. Sci., 52 (3)205237.CrossRefGoogle Scholar
Flanagan, C. & Felleisen, M. (1999) The semantics of future and an application. J. Funct. Program. 9, 131.CrossRefGoogle Scholar
Flatt, M. (2006). PLT MzScheme: Language manual. Technical Report PLT-TR2006-1-v352. PLT Scheme Inc. Available at: http://www.plt-scheme.org/techreports/. Accessed date: July 6, 2007.Google Scholar
Flatt, M., Krishnamurthi, S. & Felleisen, M. (1999) A programmer's reduction semantics for classes and mixins. Formal Syntax Semant. Java, 1523, 241269. Preliminary version appeared in Proceedings of Principles of Programming Languages, 1998. Revised version is Rice University technical report TR 97-293, June 1999.CrossRefGoogle Scholar
Gasbichler, M., Knauel, E., Sperber, M. & Kelsey, R. A. (2003) How to add threads to a sequential language without getting tangled up. In Workshop on Scheme and Functional Programming.Google Scholar
GNU. (2006). MIT/GNU Scheme 7.7.90+. Available at: http://www.gnu.org/software/mit-scheme/ Accessed date: July 6, 2007.Google Scholar
Harper, R. & Lillibridge, M. (1993) Explicit polymorphism and CPS conversion. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL)Google Scholar
Harper, R. & Stone, C. (1996) A Type-Theoretic Account of Standard ml 1996 (version 2). Tech. rept. CMU-CS-96-136R. School of Computer Science, Carnegie Mellon University.Google Scholar
Haynes, C. T. & Friedman, D. P. (1987) Embedding continuations in procedural objects. In ACM Transactions on Programming Languages and Systems, 9 (4), 582598.CrossRefGoogle Scholar
Herman, D. & Meunier, P. (2004) Improving the static analysis of embedded languages via partial evaluation. In ACM SIGPLAN International Conference on Functional Programming (ICFP). New York: ACM Press, pp. 1627.Google Scholar
Kelsey, R., Rees, J. & Sperber, M. (2005) Scheme 48. Available at: http://s48.org/. Accessed date: July 6, 2007.Google Scholar
Kelsey, R., Clinger, W. & (Editors), Jonathan, R. (1998) Revised5 report of the algorithmic language Scheme. ACM SIGPLAN Notices, 33 (9), 2676.Google Scholar
Lee, D. K., Crary, K. & Harper, R. (2006) Mechanizing the Metatheory of Standard ML. Tech. rept. CMU-CS-06-138. Carnegie Mellon University. Available at: http://www.cs.cmu.edu/crary/papers/2006/tslf.pdf. Accessed date: July 6, 2007.Google Scholar
Mason, I. & Talcott, C. (1991) Equivalence in functional languages with effects. J. Funct. Program. 1 (July), 287327.CrossRefGoogle Scholar
Matthews, J. (2005) Operational semantics for Scheme via term rewriting. Tech. rept. TR-2005-02. University of Chicago.Google Scholar
Matthews, J. & Findler, R. B. (2005) An operational semantics for R5RS Scheme. In Workshop on Scheme and Functional Programming.Google Scholar
Matthews, J. & Findler, R. B. (2007) Operational semantics for multi-language programs. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL).Google Scholar
Matthews, J., Finder, R. B., Flatt, M. & Felleisen, M. (2004) A visual environment for developing context-sensitive term rewriting systems. In Proceedings of the International Conference on Rewriting Techniques and Applications (RTA).Google Scholar
Miller, S. G. & Radestock, M. (2006) SISC for seasoned schemers. Available at: http://sisc.sourceforge.net/. Accessed date: July 6, 2007.Google Scholar
Muller, R. (1992) M-LISP: A representation-independent dialect of LISP with reduction semantics. ACM Transact. Program. Lang. Syst. 14 (4).Google Scholar
Neubauer, M. & Sperber, M. (2001) Down with Emacs Lisp: Dynamic scope analysis. In ACM SIGPLAN International Conference on Functional Programming (ICFP).Google Scholar
Oliva, D. P., Ramsdell, J. D. & Wand, M. (1995) The VLISP verified prescheme compiler. Lisp and Symbol. Comput. 8 (1/2).CrossRefGoogle Scholar
Project, GNU. (2005) Guile reference manual. Available at: http://www.gnu.org/software/guile/. Accessed date: July 6, 2007.Google Scholar
Ramsdell, J. D. (1992) An operational semantics for Scheme. Lisp Point. 2 (April–June).Google Scholar
Reppy, J. (1999) Concurrent Programming in ML. Cambridge University Press.CrossRefGoogle Scholar
Serrano, M. (2006) Bigloo: A Practical Scheme compiler. Available at: http://www-sop.inria.fr/mimosa/fp/Bigloo/. Accessed date: July 6, 2007.Google Scholar
Sitaram, D. (2003) Porting Scheme programs. In Scheme and Functional Programming Workshop.Google Scholar
Sussman, G. J. & Guy, L. S. Jr. (1975) Scheme: An interpreter for extended lambda calculus. Tech. rept. AI Lab Memo AIM-349. MIT AI Lab.Google Scholar
van Straaten, A. (2002) An executable denotational semantics for scheme. Available at: http://www.appsolutions.com/SchemeDS. Accessed date: July 6, 2007.Google Scholar
Winkelmann, F. L. (2006) Chicken: A practical and portable scheme system. Available at: http://www.call-with-current-continuation.org/. Accessed date: July 6, 2007.Google Scholar
Wright, A. & Felleisen, M. (1994) A syntactic approach to type soundness. Inform. Comput. 38–94. First appeared as Technical Report TR160, Rice University, 1991.Google Scholar
Submit a response

Discussions

No Discussions have been published for this article.
You have Access
5
Cited by

Save article to Kindle

To save this article to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

An operational semantics for Scheme1
Available formats
×

Save article to Dropbox

To save this article to your Dropbox account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you used this feature, you will be asked to authorise Cambridge Core to connect with your Dropbox account. Find out more about saving content to Dropbox.

An operational semantics for Scheme1
Available formats
×

Save article to Google Drive

To save this article to your Google Drive account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you used this feature, you will be asked to authorise Cambridge Core to connect with your Google Drive account. Find out more about saving content to Google Drive.

An operational semantics for Scheme1
Available formats
×
×

Reply to: Submit a response

Please enter your response.

Your details

Please enter a valid email address.

Conflicting interests

Do you have any conflicting interests? *