Tech moves fast! Stay ahead of the curve with Techopedia!
Join nearly 200,000 subscribers who receive actionable tech insights from Techopedia.
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.
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:
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.