3. Denotational Semantics
Denotational semantics views a function as a probable set of ordered input/output pairs and an algorithm as a finite description of the function.
A program is an algorithm written in some particular programming language. A program stands for, or denotes, a function.
A denotational semantics of a programming language gives the mapping from programs in the language to the functions denoted.
Example: Factorial = { ɘ,1>, ə,1>, ɚ,2>, ɛ,6>, …}
fac(n) = if n = 0 then 1 else n x fact(n-1)
DS confirms that program fac denotes the factorial function.