Skip to main content

Language Theory and Semantics

  • Chapter
  • First Online:
Guide to Discrete Mathematics

Part of the book series: Texts in Computer Science ((TCS))

  • 1971 Accesses

Abstract

There are two key parts to any programming language, and these are its syntax and semantics.

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 EPUB and 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
Hardcover Book
USD 69.99
Price excludes VAT (USA)
  • Durable hardcover 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

Notes

  1. 1.

    Recall from Chap. 6 that a monoid (M, *, e) is a structure that is closed and associative under the binary operation ‘*’, and it has an identity element ‘e’.

  2. 2.

    Chomsky made important contributions to linguistics and the theory of grammars. He is more widely known today as a critic of United States foreign policy.

  3. 3.

    A linear bounded automaton is a restricted form of a nondeterministic Turing machine in which a limited finite portion of the tape (a function of the length of the input) may be accessed.

  4. 4.

    A pushdown automaton is a finite automaton that can make use of a stack containing data, and it is discussed in Chap. 7.

  5. 5.

    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.

  6. 6.

    Of course, what the programmer has written may not be what the programmer had intended.

  7. 7.

    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.

  8. 8.

    Hoare was influenced by earlier work by Floyd on assigning meanings to programs using flowcharts [4].

  9. 9.

    Total correctness is expressed using {P}a{Q} amd 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.

  10. 10.

    This virtual stack based machine was originally designed by Peter Landin to evaluate lambda calculus expressions, and it has since been used as a target for several compilers.

  11. 11.

    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.

  12. 12.

    This essentially expresses that the names of bound variables is unimportant.

  13. 13.

    This essentially expresses the idea of function application.

  14. 14.

    This essentially expresses the idea that two functions are equal if and only if they give the same results for all arguments.

References

  1. O’Regan G (2016) Introduction to the history of computing. Springer

    Google Scholar 

  2. ALGOL 60 (1960) Report on the algorithmic language. Commun ACM 3(5):299–314

    Google Scholar 

  3. Hoare CAR (1969) An axiomatic basis for computer programming. Commun of the ACM 12(10):576–585

    Google Scholar 

  4. Floyd R (1967) Assigning meanings to programs. Proc Symp Appl Math 19:19–32

    Google Scholar 

  5. O’ Regan G (2006) Mathematical approaches to software quality. Springer

    Google Scholar 

  6. Plotkin G (1981) A structural approach to operational semantics. Technical Report DAIM FN-19. Computer Science Department. AarhusUniversity, Denmark

    Google Scholar 

  7. Meyer B (1990) Introduction to the theory of programming languages. Prentice Hall.

    Google Scholar 

  8. Denotational Semantics (1977) The scott-strachey approach to programming language theory. Joseph Stoy. MIT Press

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2021 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

O’Regan, G. (2021). Language Theory and Semantics. In: Guide to Discrete Mathematics. Texts in Computer Science. Springer, Cham. https://doi.org/10.1007/978-3-030-81588-2_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-81588-2_12

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-81587-5

  • Online ISBN: 978-3-030-81588-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics