Abstract
We present a declarative specification method based on natural semantics which is suitable for the definition of the static and dynamic semantics of imperative and object-oriented programming languages. We show how the semantic analysis can be generated automatically by creating, for each program under consideration, a constraint problem whose solution is also a valid attribution. In contrast to previous implementations of natural semantics, our generation algorithm for the semantic analysis is more flexible because it allows us to compute a program’s attributes independently from its syntax tree. For special cases, we have defined efficient solution strategies. We also describe our prototype implementation using the concurrent constraint programming language Oz.
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
I. Attali and P. Franchi-Zannettacci. Unification-free Execution of Typol Programs by Semantic Attribute Evaluation. In Int'l Conference Symposium on Logic Programming,pages 160-177, 1988. MIT Press.
Isabelle Attali. Compilation de programmes Typol par Attributs Sémantiques. PhD thesis, University of Nice, April 1989.
Thierry Despeyroux. Executable Specification of Static Semantics. In Semantics of Data Types, pages 215-233. Springer LNCS 173, 1984.
E. Domenjoud. A Technical Note on AC-unification. The Number of Minimal Unifiers of the Equation ax 1 +...+ax p = ßy 1 +...ßy q J. Automated Reasoning, 8 (1): 39 - 44, 1992.
Gerhard Gentzen. Untersuchungen über das logische Schließen. Mathem. Zeitschrift, 39:176-210 and 405 - 431, 1935.
Sabine Glesner. Natürliche Semantik für imperative und objektorientierteProgrammiersprachen. PhD thesis, Universität Karlsruhe, Fakultät für Informatik, February 1999. To appear, preliminary version available at http://i44www.info.uni-karlsruhe.deglesner/my_papers/diss_prelim.ps.
Sabine Glesner and Wolf Zimmermann. Natural Semantics for Imperative and Object-Oriented Programming Languages. Technical report, Universität Karlsruhe, 1998. Available at http://i44www.info.uni-karlsruhe.de/glesner/my_papers/tech.report _1998b. ps.
Sabine Glesner and Wolf Zimmermann. Using Many-Sorted Natural Semantics to Specify and Generate Semantic Analysis. In Proceedings of the Systems Implementation Conference (SI2000),pages 249-262, Berlin, February 1998. IFIP Working Group 2.4, Chapman & Hall.
Gilles Kahn. Natural Semantics. In Proc. 4th Annual Symp. on Theoret. Aspects of Computer Science (STACS87), 1987. Springer, LNCS 247.
D.E. Knuth. Semantics of Context-Free Languages. Mathematical Systems Theory, 2 (2): 127 - 146, 1968.
D.E. Knuth. Semantics of Context-Free Languages: Correction. Mathe matical Systems Theory, 5: 95 - 96, 1971.
Robin Milner, Mads Tofte, and Robert Harper. The Definition of Standard ML. The MIT Press, 1990.
Robin Milner, Mads Tofte, Robert Harper, and David MacQueen. The Definition of Standard ML (Revised). The MIT Press, 1997.
Oz. The Oz Programming System. Programming Systems Lab, DFKI and Universität des Saarlandes: http://www.ps.uni-sb.de/oz
Mikael Pettersson. Compiling Natural Semantics. PhD thesis, Department of Computer and Information Science, Linköping University, Sweden, 1995.
Mikael Pettersson. A Compiler for Natural Semantics. In Proc. 6th Intl Conf. on Compiler Construction, CC96, 1996. Springer, LNCS Vol. 1060.
P10811 Gordon D. Plotkin. A structural approach to operational semantics. Re- port DAIMI FN-19, Computer Science Dep., Aarhus Univ., Denmark, 1981.
M.S. Paterson and M.N. Wegman. Linear unification. J. Comp. Syst. Sci., 16 (2), 1978.
J.A. Robinson. A machine-oriented logic based on the resolution principle. Journal of the ACM, 12 (1): 23 - 41, 1965.
Gregor Snelting. The calculus of context relations. Acta Informatica, 28: 411 - 445, 1991.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1999 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Glesner, S. (1999). Natural Semantics for Imperative and Object-Oriented Programming Languages. In: Beiersdörfer, K., Engels, G., Schäfer, W. (eds) Informatik’99. Informatik aktuell. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-01069-3_56
Download citation
DOI: https://doi.org/10.1007/978-3-662-01069-3_56
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-66450-5
Online ISBN: 978-3-662-01069-3
eBook Packages: Springer Book Archive