Abstract
This chapter discusses language theory and includes a discussion on the syntax of languages including grammars, parse trees, and derivations from grammar. The important area of programming language semantics is discussed, including a discussion on axiomatic, denotational, and operational semantics.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
ε denotes the empty word.
- 2.
Recall from Chap. 5 (see Sect. 5.8) that a monoid (M, *, e) is a structure that is closed and associative under the binary operation “*”, and it has an identity element “e”.
- 3.
Chomsky made important contributions to linguistics and the theory of grammars. He is more widely known today as a critic of US foreign policy.
- 4.
A linear bounded automaton is a restricted form of a non-deterministic Turing machine in which a limited finite portion of the tape (a function of the length of the input) may be accessed.
- 5.
A pushdown automaton is a finite automaton that can make use of a stack containing data, and it is discussed in Chap. 13.
- 6.
Backus Naur Form is named after John Backus and Peter Naur. It was created as part of the design of the ALGOL 60 programming language and is used to define the syntax rules of the language.
- 7.
It is possible that what the programmer has written is not be what the programmer had intended.
- 8.
There are attribute (or affix) grammars that extend the syntactic description of the language with supplementary elements covering the semantics. The process of adding semantics to the syntactic description is termed decoration.
- 9.
Hoare was influenced by earlier work by Floyd on assigning meanings to programs using flowcharts [8].
- 10.
Total correctness is expressed using {P}a{Q}, and program fragment a is totally correct for precondition P and postcondition Q if and only if whenever a is executed in any state in which P is satisfied then execution terminates, and the resulting state satisfies Q.
- 11.
The stack, environment, code, and dump (SECD) virtual stack-based machine was originally designed by Peter Landin (a British computer scientist) to evaluate lambda calculus expressions, and it has since been used as a target for several compilers. Landin was influenced by McCarthy’s LISP.
- 12.
This is similar to what a compiler does in that if errors are found during the compilation phase, the compiler halts and displays the errors and does not continue with code generation.
- 13.
This essentially expresses that the names of bound variables are unimportant.
- 14.
This essentially expresses the idea of function application.
- 15.
This essentially expresses the idea that two functions are equal if and only if they give the same results for all arguments.
References
O’Regan G (2016) Introduction to the history of computing. Springer
Naur P (ed) (1960) Report on the algorithmic language, ALGOL 60. Commun ACM 3(5):299–314
Hoare CAR (1969) An axiomatic basis for computer programming. Commun ACM 12(10):576–585
O’Regan G (2006) Mathematical approaches to software quality. Springer
Plotkin G (1981) A structural approach to operational semantics. Technical Report DAIM FN-19. Computer Science Department. Aarhus University, Denmark
Meyer B (1990) Introduction to the theory of programming languages. Prentice Hall
Stoy J (1977) Denotational semantics. The Scott-Strachey approach to programming language theory. MIT Press
Floyd R (1967) Assigning meanings to programs. In: Proceedings of symposia in applied mathematics, vol 19, pp 19–32
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this chapter
Cite this chapter
O’Regan, G. (2023). Language Theory and Semantics. In: Mathematical Foundations of Software Engineering. Texts in Computer Science. Springer, Cham. https://doi.org/10.1007/978-3-031-26212-8_12
Download citation
DOI: https://doi.org/10.1007/978-3-031-26212-8_12
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-26211-1
Online ISBN: 978-3-031-26212-8
eBook Packages: Computer ScienceComputer Science (R0)