Denotational Semantics

Definition - What does Denotational Semantics mean?

In computer science, denotational semantics is an approach for providing mathematical meaning to systems and programming languages. In other words, denotational semantics is a formal technique for expressing the semantic definition of a programming language.

Developed in 1960s at Oxford University by Christopher Strachey's Programming Research Group, the methodology comprises notational elegance and mathematical rigor. Although initially designed as an analysis tool, denotational semantics has been used as a tool for implementation and language design.

Techopedia explains Denotational Semantics

In denotational semantics, the basic idea is mapping every syntactic entity associated with a programming language into some form of mathematical entity, translating programming language constructs into mathematical objects.

Denotational semantic definition has five parts:

  • Semantic equations
  • Syntactic categories
  • Semantic functions
  • Backus normal form (BNF) defining the structure of the syntactic categories
  • Value domains

Denotational semantics have been developed for modern languages which have features like exceptions and concurrency. One of the important features of denotational semantics is that semantics should be compositional, meaning denotation of a programming phrase can be constructed from the denotations of its sub-phrases.

There are some distinct advantages associated with denotational semantics. It is the easiest mechanism for describing the meaning of smaller programs compared to other alternatives. Denotational semantics is capable of explaining state in programs. However, denotational semantics tend to be very complex for describing advanced features like goto statements and recursions.

Share this: