1988ACM SIGPLAN NoticesOpen access

Denotational semantics for program analysis

Shan-Jon Chao, Barrett R. Bryant

Open full text 4 citations

Abstract

4 1.INTRODUCTIO NThe denotational semantics approach to formal specification of programming languages contain s detailed information for the implementation of that language, unlike the axiomatic semantics approach .This feature makes the denotational semantics approach more flexible than the operational approach in it s not having any specific abstract machine .A compiler can be systematically constructed from the formal denotational semantics specification by applying the function of the specification to the source program .This is called a compile-evaluate approach for denotational semantics or compiler generation .Compile r generation addresses the issue of proving compiler correctness .This paper describes how to apply denotational semantics to program analysis, specifically cod e optimization, and to the parallel implementation of sequential imperative languages .In considering cod e optimization, the object code derived from the denotational semantics specification is a set of denotations which we claim can be further optimized by partial evaluation .Partial evaluation [5] of a subject progra m evaluates that program with respect to only a portion of its input parameters, resulting in a residua l program .By definition, running the residual program on any remaining input yields the same result a s running the original subject program on all of its input .>From this point of view then, partial evaluatio n is nothing but a special case of program transformation for the purpose of optimization .Partial evaluatio n performs those simplification steps which are not dependent on execution-time values .To determine whic h simplifications to perform, we make an expression unfrozen if it can be simplified before execution-time .A frozen expression may not be simplified .Declarations, environments, and store algebras are all mad e unfrozen resulting in more efficient code .Code optimization on declarations, type checking, constant folding , and inline function expansion will be carried out .

Open-access reader

About this research paper

What this paper is about

4 1.INTRODUCTIO NThe denotational semantics approach to formal specification of programming languages contain s detailed information for the implementation of that language, unlike the axiomatic semantics approach .This feature makes the denotational semantics approach more flexible than the operational approach in it s not having any specific abstract machine .A compiler can be systematically constructed from the formal denotational semantics specification by applying the function of the specification to the source program .This is called a compile-evaluate approach for denotational semantics or compiler generation .Compile r generation addresses the issue of proving compiler correctness .This paper describes how to apply denotational semantics to program analysis, specifically cod e optimization, and to the parallel implementation of sequential imperative languages .In considering cod e optimization, the object code derived from the denotational semantics specification is a set of denotations which we claim can be further optimized by partial evaluation .Partial evaluation [5] of a subject progra m evaluates that program with respect to only a portion of its input parameters, resulting in a residua l program .By definition, running the residual program on any remaining input yields the same result a s running the original subject program on all of its input .>From this point of view then, partial evaluatio n is nothing but a special case of program transformation for the purpose of optimization .Partial evaluatio n performs those simplification steps which are not dependent on execution-time values .To determine whic h simplifications to perform, we make an expression unfrozen if it can be simplified before execution-time .A frozen expression may not be simplified .Declarations, environments, and store algebras are all mad e unfrozen resulting in more efficient code .Code optimization on declarations, type checking, constant folding , and inline function expansion will be carried out .

Why it matters

OpenAlex reports 4 citations for this work. Citation counts describe recorded attention and do not establish research quality.

Key contribution

A contribution statement is not available in the OpenAlex record.

Method / approach

Method details are not available in the OpenAlex metadata.

Main findings

Findings are not separately available in the OpenAlex metadata.

Limitations

Limitations are not available in the OpenAlex metadata.

Applications

Application details are not available in the OpenAlex metadata.

Available abstract

4 1.INTRODUCTIO NThe denotational semantics approach to formal specification of programming languages contain s detailed information for the implementation of that language, unlike the axiomatic semantics approach .This feature makes the denotational semantics approach more flexible than the operational approach in it s not having any specific abstract machine .A compiler can be systematically constructed from the formal denotational semantics specification by applying the function of the specification to the source program .This is called a compile-evaluate approach for denotational semantics or compiler generation .Compile r generation addresses the issue of proving compiler correctness .This paper describes how to apply denotational semantics to program analysis, specifically cod e optimization, and to the parallel implementation of sequential imperative languages .In considering cod e optimization, the object code derived from the denotational semantics specification is a set of denotations which we claim can be further optimized by partial evaluation .Partial evaluation [5] of a subject progra m evaluates that program with respect to only a portion of its input parameters, resulting in a residua l program .By definition, running the residual program on any remaining input yields the same result a s running the original subject program on all of its input .>From this point of view then, partial evaluatio n is nothing but a special case of program transformation for the purpose of optimization .Partial evaluatio n performs those simplification steps which are not dependent on execution-time values .To determine whic h simplifications to perform, we make an expression unfrozen if it can be simplified before execution-time .A frozen expression may not be simplified .Declarations, environments, and store algebras are all mad e unfrozen resulting in more efficient code .Code optimization on declarations, type checking, constant folding , and inline function expansion will be carried out .

Key concepts: Computer science, Programming language, Denotational semantics, Semantics (computer science), Denotational semantics of the Actor model, Operational semantics, Action semantics, Normalisation by evaluation

Related papers

Back to paper searchBrowse research topicsOriginal source
Denotational semantics for program analysis — Research Paper | ScholarLens