Denotational Semantics Example
Decimal numbers form a language, NUM, over the alphabet {0,1,2,3,4,5,6,7,8,9} which can be defined by the grammar
d ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
The decimal numbers are usually taken to denote, integers which are abstract objects. This interpretation can be made formal by giving a valuation function V:
where V is a function from the sentences in the language NUM to the integers Int.