
A programming language possesses syntax and semantics. Syntax refers to the spelling of the language’s programs, and semantics refers to the meanings of the programs. A language’s syntax is formalized by a grammar or syntax chart; such formalizations are found in the back of language manuals. A language’s semantics should be formalized, too, and this is the topic of this chapter. Before we begin, we might ask, “What do we gain by formalizing the semantics of a programming language?” Consider the related question, “What was gained when language syntax was formalized with BNF?” • A language’s syntax definition standardizes the official syntax. This is crucial to users, who require a guide to writing syntactically correct programs, and to implementors, who must write a correct parser for the language’s compiler. • The syntax definition permits a formal analysis of its properties, such as whether the definition is LL(k), LR(k), or ambiguous. • The syntax definition can be used as input to a compiler front-end generating tool, such as YACC; it becomes, in effect, the implementation. We derive similar benefits from a formal semantics definition: • The semantics definition standardizes the official semanticsof the language. This is crucial to users, who require a guide to understanding the programs that they write, and to implementors, who must write a correct code generator for the language’s compiler. • The semantics definition permits a formal analysis of its properties, such as whether the definition is strongly typed, block structured, uses single-threaded data structures, is parallelizable, etc. • The semantics definition can be used as input to a compiler back-end generating tool [26, 31]; it becomes, in effect, the implementation. Programming-language syntax was studied intensively in the 1960’s and 1970’s, and programming language semantics is undergoing similar intensive study. Unlike the acceptance of BNF as the standard for syntax definition, it is unlikely that a single definition method will take hold for semantics—semantics is harder to formalize than syntax, and it has a wider variety of applications. Semantics-definition methods fall roughly into three groups:
| selected citations These citations are derived from selected sources. This is an alternative to the "Influence" indicator, which also reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | 6 | |
| popularity This indicator reflects the "current" impact/attention (the "hype") of an article in the research community at large, based on the underlying citation network. | Average | |
| influence This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | Average | |
| impulse This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network. | Average |
