Skip to main content

A Framework for Modeling the Semantics of Expression Evaluation with Abstract State Machines

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2589))

Abstract

We present a framework for formalizing the semantics of expression evaluation using Abstract State Machines. Many programming languages allow some non-determinism for evaluating expressions. The semantics only have in common that arguments are evaluated before an operator is applied. The evaluation of one argument may be interleaved with the evaluation of the other arguments. However, programming languages usually restrict this most liberal evaluation order. For example, the expression evaluation may take into account short-circuit evaluation of boolean expressions which implies that right operands must not be evaluated before the complete left operand is evaluated. Our approach provides a generic expression evaluation semantics that only need to be instantiated adequatly. We demonstrate this approach by the example of Ada95, C, C++, Java, C#, and Fortran.

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

  1. E. Börger and W. Schulte. A Programmer Friendly Modular Definition of the Semantics of Java. In J. Alves-Foss, editor, Formal Syntax and Semantics of Java, volume 1523 of Lecture Notes in Computer Science, pages 353–404. Springer, 1998. 398

    Chapter  Google Scholar 

  2. Microsoft Corporation. C# Language Specification. Microsoft Press, 2001. 392, 403

    Google Scholar 

  3. J. Gosling, B. Joy, and G. Steele. The Java Language Specification. Addison-Wesley, 1996. 392, 403

    Google Scholar 

  4. Y. Gurevich. Evolving algebras 1993: Lipari guide. In E. Börger, editor, Speci fication and Validation Methods, pages 9–36. Oxford University Press, 1995. 393

    Google Scholar 

  5. Y. Gurevich. May 1997 draft of the ASM guide. Technical Report CSE-TR-336-97, University of Michigan EECS Department, 1997. 393

    Google Scholar 

  6. Y. Gurevich and J. K. Huggins. The Semantics of the C Programming Language. In Selected papers from CSL’92 (Computer Science Logic), volume 702 of Lecture Notes in Computer Science, pages 274–308. Springer, 1993. 398

    Google Scholar 

  7. J.K. Huggins and W. Shen. The static and dynamic semantics of C. Technical Report CPSC-2000-4, Computer Science Program, Kettering University, 1999. 392, 398

    Google Scholar 

  8. P. Kutter and A. Pierantonio. The formal specification of Oberon. Journal of Universal Computer Science, 3(5): pages443–503, 1997. 398

    MATH  MathSciNet  Google Scholar 

  9. M. Norrish. C formalized in HOL. PhD thesis, University of Nottingham, 1998. 397

    Google Scholar 

  10. International Standardization Organization. International standard: Programming languages-Ada, 1995. ISO/IEC 8652:1995. 392, 401

    Google Scholar 

  11. International Standardization Organization. International standard: Programming languages-Fortran, part 1: Base language, 1997. ISO/IEC 1539-1:1997. 392, 403

    Google Scholar 

  12. International Standardization Organization. International standard: Programming languages-C++, 1998. ISO/IEC 14822:1998. 391, 392, 402

    Google Scholar 

  13. International Standardization Organization. International standard: Programming languages-C, 1999. ISO/IEC 9899:1999. 392, 396

    Google Scholar 

  14. R. Stärk, J. Schmid, and E. Börger. Java and the Java Virtual Machine. Springer-Verlag, 2001. 392, 398

    Google Scholar 

  15. C. Wallace. The semantics of the C++ programming language. In E. Börger, editor, Specification and Validation Methodes, pp. 131–164.Oxford University Press, 1995. 398

    Google Scholar 

  16. C. Wallace. The semantics of the Java programming language. Technical Report CSE-TR-355-97, EECS Dept., University of Michigan, 1997. 392

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Zimmermann, W., Dold, A. (2003). A Framework for Modeling the Semantics of Expression Evaluation with Abstract State Machines. In: Börger, E., Gargantini, A., Riccobene, E. (eds) Abstract State Machines 2003. ASM 2003. Lecture Notes in Computer Science, vol 2589. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-36498-6_23

Download citation

  • DOI: https://doi.org/10.1007/3-540-36498-6_23

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-00624-4

  • Online ISBN: 978-3-540-36498-6

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics