The Varieties of Programming Language Semantics

  • Authors:
  • Peter D. Mosses

  • Affiliations:
  • -

  • Venue:
  • PSI '02 Revised Papers from the 4th International Andrei Ershov Memorial Conference on Perspectives of System Informatics: Akademgorodok, Novosibirsk, Russia
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

Abstract

Formal descriptions of syntax are quite popular: regular and context-free grammars have become accepted as useful for documenting the syntax of programming languages, as well as for generating efficient parsers; attribute grammars allow parsing to be linked with type-checking and code generation; and regular expressions are extensively used for searching and transforming text. In contrast, formal semantic descriptions are widely regarded as being of interest only to theoreticians. This paper surveys the main frameworks available for describing the dynamic semantics of programming languages. It assesses the potential and actual uses of semantic descriptions, and considers practical aspects, such as comprehensibility, modularity, and extensibility, which are especially significant when describing full-scale languages. It concludes by suggesting that the provision of mature tools for transforming practical semantic descriptions into reasonably efficient compilers and interpreters would significantly increase the popularity of formal semantics.The paper is intended to be accessible to all computer scientists. Familiarity with the details of particular semantic frameworks is not required, although some understanding of the general concepts of formal semantics is assumed.