A semantic formalism and associated semantic process for the specification and translation of programming languages.

Marsha D. Hopwood · eScholarship (California Digital Library) · 1974

Definitions of the semantics of programming languages are often incomplete and ambiguous. In particular, it may be difficult to determine what action is intended by a particular construct in some language. As a consequence, different implementations of that language may produce different results.To help eliminate those differences which result from incomplete and ambiguous language definitions, a formalism for semantic specification and a semantic process are introduced. A semantic specification for a programming language can be viewed as a set of state transformations. The semantic process applies these state transformations to a program represented as a tree indicating the program structure and produces a computation tree representing the meaning of the program.The semantic process can be viewed as part of a generalized table-driven translator for programming languages. Although such a translator may not be particularly efficient, its use produces translations which are consistent with the semantic specification and thus match the intent of the specifier. As a tool, the translator can be particularly useful for language debugging and tuning.To illustrate the use of the semantic formalism, a semantic specification for Algol 60 and the results of its application to several Algol 60 constructs are given. A semantic process coded in Lisp and a cross-reference for the semantic specification by syntactic construct are also given.

Read the paper · More papers on PaperTik