Categorical viewpoint for semantics

Category theory originated, in part, as a technique for seeing a collection of similar results from disparate parts of mathematics as instances of a more general theory of mathematical structures and the relationships between structures. To encompass a wide range of results, it was necessary to develop a quite abstract collection of conditions that apply in many instances. As a result, mathematicians sometimes refer to category theory as ‘abstract nonsense’ — especially when they are taking advantage of its power of generality! Because of this generality, category theory has had a crucial influence of the study of the semantics of programming languages, often guiding or inspiring the discovery of the right concepts, definitions, structures, and theorems. As a tool for studying the semantics of programming languages, the usefulness of category theory goes beyond its position as a well-developed, general theory of mathematical structures. In many instances, the ‘categorical viewpoint’ matches much better with basic motivations in computer science than the alternative foundational theories.

Carl A. Gunter, Semantics of Programming Languages

Syntax and semantics

Work on the parsing of artificial languages has achieved considerable success in understanding the alternatives for syntax. The most useful methods for specifying grammars have been identified, and algorithms for constructing parse trees have been carefully studied. This generality has benefited the engineering side of language design by providing widely-used tools for the construction of quality lexers and parsers automatically from specifications of the tokens and grammar of a language.

The semantic side of language design is now the primary challenge. The development of abstractions for describing the range of possibilities for the semantics of languages has been much harder to achieve than the corresponding development for syntax. Many semantic frameworks have been developed, but there is no universal acceptance of any particular approach.

Carl A. Gunter, Semantics of Programming Languages