The authoritative standards for the algorithmic language Scheme are the Scheme reports. Most of the revised reports include a denotational semantics for primitive Scheme expressions and selected procedures.
This paper first traces the history of the semantic definition, and summarizes its form and content. It then presents a shallow embedding of denotational semantics into the functional programming language Agda. The embedding is illustrated by showing how fragments of the denotational semantics given in the fifth revised Scheme report (R5RS) are embedded into Agda.
Type-checking the Agda embedding of a semantics indirectly tests its wellformedness. Agda reported several issues with the embedding of the complete denotational semantics from R5RS. The paper suggests changes to the semantics that would address the reported issues, as well as further changes that could improve the conciseness and perspicuity of the definitions.
This paper is dedicated to the memory of Christopher Strachey (1916–1975)