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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
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
Microsoft Corporation. C# Language Specification. Microsoft Press, 2001. 392, 403
J. Gosling, B. Joy, and G. Steele. The Java Language Specification. Addison-Wesley, 1996. 392, 403
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
Y. Gurevich. May 1997 draft of the ASM guide. Technical Report CSE-TR-336-97, University of Michigan EECS Department, 1997. 393
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
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
P. Kutter and A. Pierantonio. The formal specification of Oberon. Journal of Universal Computer Science, 3(5): pages443–503, 1997. 398
M. Norrish. C formalized in HOL. PhD thesis, University of Nottingham, 1998. 397
International Standardization Organization. International standard: Programming languages-Ada, 1995. ISO/IEC 8652:1995. 392, 401
International Standardization Organization. International standard: Programming languages-Fortran, part 1: Base language, 1997. ISO/IEC 1539-1:1997. 392, 403
International Standardization Organization. International standard: Programming languages-C++, 1998. ISO/IEC 14822:1998. 391, 392, 402
International Standardization Organization. International standard: Programming languages-C, 1999. ISO/IEC 9899:1999. 392, 396
R. Stärk, J. Schmid, and E. Börger. Java and the Java Virtual Machine. Springer-Verlag, 2001. 392, 398
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
C. Wallace. The semantics of the Java programming language. Technical Report CSE-TR-355-97, EECS Dept., University of Michigan, 1997. 392
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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