Skip to main content

From Natural Semantics to Abstract Machines

  • Conference paper
Logic Based Program Synthesis and Transformation (LOPSTR 2004)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 3573))

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.

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

Access this chapter

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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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)

    Google Scholar 

  2. 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)

    Chapter  Google Scholar 

  3. 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)

    Google Scholar 

  4. 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)

    Article  MATH  MathSciNet  Google Scholar 

  5. 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)

    Chapter  Google Scholar 

  6. 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)

    Chapter  Google Scholar 

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

    Google Scholar 

  8. Diehl, S., Hartel, P., Sestoft, P.: Abstract machines for programming language implementation. Future Generation Computer Systems 16, 739–751 (2000)

    Article  Google Scholar 

  9. 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)

    Google Scholar 

  10. 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)

  11. Hannan, J., Miller, D.: From operational semantics to abstract machines. Mathematical Structures in Computer Science 2(4), 415–459 (1992)

    Article  MATH  MathSciNet  Google Scholar 

  12. Hardin, T., Maranget, L., Pagano, B.: Functional runtime systems within the lambda-sigma calculus. Journal of Functional Programming 1(1), 1–100 (1993)

    Google Scholar 

  13. 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)

    Google Scholar 

  14. 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)

    Chapter  Google Scholar 

  15. 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)

    Chapter  Google Scholar 

  16. Milner, R., Tofte, M., Harper, R., MacQueen, D.: The Definition of Standard ML (Revised). MIT Press, Cambridge (1997)

    Google Scholar 

  17. Nielson, F., Nielson, H.R.: Semantics with Applications. John Wiley & Sons, Chichester (1992)

    MATH  Google Scholar 

  18. Sestoft, P.: Deriving a lazy abstract machine. Journal of Functional Programming 7(3), 231–264 (1997)

    Article  MATH  MathSciNet  Google Scholar 

  19. Winskel, G.: The Formal Semantics of Programming Languages. Foundation of Computing Series. MIT Press, Cambridge (1993)

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

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

Publish with us

Policies and ethics