Abstract
We describe how to construct correct abstract machines from the class of L-attributed natural semantics introduced by Ibraheem and Schmidt at HOOTS 1997. The construction produces stack-based abstract machines where the stack contains evaluation contexts. It is defined directly on the natural semantics rules. We formalize it as an extraction algorithm and we prove that the algorithm produces abstract machines that are equivalent to the original natural semantics. We illustrate the algorithm by extracting abstract machines from natural semantics for call-by-value and call-by-name evaluation of lambda terms.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Ager, M.S.: From natural semantics to abstract machines. Technical Report BRICS RS-04-20, Department of Computer Science, University of Aarhus, Aarhus, Denmark (October 2004)
Ager, M.S., Biernacki, D., Danvy, O., Midtgaard, J.: A functional correspondence between evaluators and abstract machines. In: Miller, D. (ed.) Proceedings of the Fifth ACM-SIGPLAN International Conference on Principles and Practice of Declarative Programming, pp. 8–19. ACM Press, New York (2003)
Ager, M.S., Danvy, O., Midtgaard, J.: A functional correspondence between monadic evaluators and abstract machines for languages with computational effects. Technical Report BRICS RS-03-35, DAIMI, Department of Computer Science, University of Aarhus, Aarhus, Denmark, Presented at the 2nd APPSEM II workshop, Talinn, Estonia (November 2003)
Ager, M.S., Danvy, O., Midtgaard, J.: A functional correspondence between call-by-need evaluators and lazy abstract machines. Information Processing Letters 90(5), 223–232 (2004)
Biernacki, D., Danvy, O.: From interpreter to logic engine by defunctionalization. In: Bruynooghe, M. (ed.) LOPSTR 2004. LNCS, vol. 3018, pp. 143–159. Springer, Heidelberg (2004)
Crégut, P.: An abstract machine for the normalization of λ-terms. In: Proceedings of the 1990 ACM conference on LISP and functional programming, pp. 333–340. ACM Press, New York (1990)
Danvy, O.: A rational deconstruction of Landin’s SECD machine. Technical Report BRICS RS-03-33, DAIMI, Department of Computer Science, University of Aarhus, Aarhus, Denmark (October 2003)
Diehl, S., Hartel, P., Sestoft, P.: Abstract machines for programming language implementation. Future Generation Computer Systems 16, 739–751 (2000)
Felleisen, M.: The Calculi of λ-v-CS Conversion: A Syntactic Theory of Control and State in Imperative Higher-Order Programming Languages. PhD thesis, Department of Computer Science, Indiana University, Bloomington, Indiana (August 1987)
Felleisen, M., Flatt, M.: Programming languages and lambda calculi. Unpublished lecture notes, http://www.ccs.neu.edu/home/matthias/3810-w02/readings.html (1989-2001)
Hannan, J., Miller, D.: From operational semantics to abstract machines. Mathematical Structures in Computer Science 2(4), 415–459 (1992)
Hardin, T., Maranget, L., Pagano, B.: Functional runtime systems within the lambda-sigma calculus. Journal of Functional Programming 1(1), 1–100 (1993)
Ibraheem, H., Schmidt, D.A.: Adapting big-step semantics to small-step style: Coinductive interpretations and “higher-order” derivations. In: Gordon, A., Pitts, A., Talcott, C. (eds.) Electronic Notes in Theoretical Computer Science, vol. 10. Elsevier, Amsterdam (2000)
Kahn, G.: Natural semantics. In: Brandenburg, F.-J., Vidal-Naquet, G., Wirsing, M. (eds.) STACS 1987. LNCS, vol. 247, pp. 22–39. Springer, Heidelberg (1987)
Launchbury, J.: A natural semantics for lazy evaluation. In: Proceedings of the 20th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pp. 144–154. ACM Press, New York (1993)
Milner, R., Tofte, M., Harper, R., MacQueen, D.: The Definition of Standard ML (Revised). MIT Press, Cambridge (1997)
Nielson, F., Nielson, H.R.: Semantics with Applications. John Wiley & Sons, Chichester (1992)
Sestoft, P.: Deriving a lazy abstract machine. Journal of Functional Programming 7(3), 231–264 (1997)
Winskel, G.: The Formal Semantics of Programming Languages. Foundation of Computing Series. MIT Press, Cambridge (1993)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2005 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Ager, M.S. (2005). From Natural Semantics to Abstract Machines. In: Etalle, S. (eds) Logic Based Program Synthesis and Transformation. LOPSTR 2004. Lecture Notes in Computer Science, vol 3573. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11506676_16
Download citation
DOI: https://doi.org/10.1007/11506676_16
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-26655-6
Online ISBN: 978-3-540-31683-1
eBook Packages: Computer ScienceComputer Science (R0)