## Semantics-Directed Program Analysis: a Tool-Maker's Perspective (1996)

Venue: | In Proc. SAS96 |

Citations: | 3 - 1 self |

### BibTeX

@INPROCEEDINGS{Nielson96semantics-directedprogram,

author = {Flemming Nielson},

title = {Semantics-Directed Program Analysis: a Tool-Maker's Perspective},

booktitle = {In Proc. SAS96},

year = {1996},

pages = {2--21},

publisher = {Springer-Verlag}

}

### OpenURL

### Abstract

. Developing a tool kit for program analysis requires a general metalanguage (or user interface) in which to specify the program analyses, and many past and current approaches are semantics-directed in the sense that they attempt to exploit the structure of the semantics of the program. In this paper we take a tool-maker's perspective at an approach based on two-level semantics, focusing on the flexible way to incorporate and combine a repertoire of program analyses. We conclude by identifying a number of key considerations for the design of semantics-directed frameworks or tool kits for program analysis. Keywords. Program Analysis, Abstract Interpretation, Denotational Semantics, Two-Level Metalanguages, Tools for Program Analysis. 1 Introduction The predominant use of program analysis is to enable compilers to generate better code: to supply information about the context in order to generate more specialised code or in order to validate program transformations. While this is by no ...

### Citations

1880 |
Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints
- Cousot, Cousot
- 1977
(Show Context)
Citation Context ...hodologies of data flow equations (e.g. [10]), set-based analyses through the generation of constraints (e.g. [7]), abstract interpretation expressed denotationally (e.g. [15]) or operationally (e.g. =-=[3]-=-), annotated type and e#ect systems (e.g. [28]), and even more general logical systems. It is important to realise that construction of a tool amounts to defining a user interface: one has to define a... |

1286 | A structural approach to operational semantics
- Plotkin
- 1981
(Show Context)
Citation Context ...talanguage to describe the interpretation (or many-sorted algebra) of the abstract operations themselves. For inspiration we may look at natural semantics (e.g.[26]), structural operational semantics =-=[25]-=-, denotational semantics (e.g. [20]), the syntax-directed frameworks for closure analysis (e.g. [5]), or the semantic frameworks mentioned below. Overview. First we give an account of two-level metala... |

572 | Automatic discovery of linear restraints among variables of a program
- Cousot, Halbwachs
- 1978
(Show Context)
Citation Context ...e plane (given the choice of I ), and a type like [Num Num] that is not required to be interpreted compositionally, and hence admits much more complex subsets of the plane like the convex polygons of =-=[4]-=-. This flexibility is important for the applicability of a tool for program analysis, but tends to receive less attention in more theoretical studies where one of the research challenges is to increas... |

473 |
Denotational Semantics: the Scott-Strachey Approach to Programming Languages Theory
- Stoy
- 1977
(Show Context)
Citation Context ...hinking about programming; Alan Perlis in the Rome Software Development Conference in 1969. (Replace "programming" by "analysis".) -- A notation is important for what it leaves out=-=; Joseph E. Stoy in [27]-=-. Thus a metalanguage represents a deliberate design choice concerning which class of languages, and which class of analyses, are at the focus of the development. Therefore di#erent metalanguages may ... |

152 | Monotone data flow analysis frameworks
- Kam, Ullman
- 1977
(Show Context)
Citation Context ...veral e#orts to construct systems of some generality (e.g. [1, 29, 30, 33]). This is not because of a lack of theoretical developments; indeed there are the methodologies of data flow equations (e.g. =-=[10]-=-), set-based analyses through the generation of constraints (e.g. [7]), abstract interpretation expressed denotationally (e.g. [15]) or operationally (e.g. [3]), annotated type and e#ect systems (e.g.... |

113 |
Set-Based Analysis of ML Programs
- Heintze
- 1994
(Show Context)
Citation Context ... 33]). This is not because of a lack of theoretical developments; indeed there are the methodologies of data flow equations (e.g. [10]), set-based analyses through the generation of constraints (e.g. =-=[7]-=-), abstract interpretation expressed denotationally (e.g. [15]) or operationally (e.g. [3]), annotated type and e#ect systems (e.g. [28]), and even more general logical systems. It is important to rea... |

99 |
Principia Mathematica
- Whitehead, Russell
- 1957
(Show Context)
Citation Context ...ch extent is the new framework better (not just di#erent or "more exciting") than existing approaches, and to what extent have the insights obtained there been incorporated? 6 An extensional=-= property [31] of a prog-=-ram remains true when the program is replaced by an "equivalent" program (e.g. strictness information), whereas an intensional property may depend on the syntax of the program (e.g. closure ... |

85 |
Abstract interpretation: A semantics-based tool for program analysis
- Jones, Nielson
- 1995
(Show Context)
Citation Context ...to-date account 5 of two-level abstract interpretation is given in [18] (with [17] exploring more technical aspects); a reasonably comprehensive account of most of the theory is given in Section 3 of =-=[9]-=-. 4 Conclusion The natural sciences propose theories for describing aspects of the physical world, validate the extent to which the theories describe the physical world, and use the insights gained as... |

70 |
S.: Strictness analysis for higher-order functions
- Burn, Hankin, et al.
- 1986
(Show Context)
Citation Context ...sible for the high complexity of implementing some of the analyses specified. It is important to stress that these points apply also to developments based on ordinary denotational metalanguages (e.g. =-=[2]-=-)! Semantics-directed analysis frameworks. Current approaches to defining general frameworks for semantics-directed analysis seem to be mainly based on natural semantics or game semantics; in particul... |

70 | Sharlit -- A Tool for Building Optimizers
- Tjiang, Hennessy
- 1992
(Show Context)
Citation Context ...read and long-term usage. Tool-making for program analysis. A similar disappointing outlook applies to tools for program analysis, despite several e#orts to construct systems of some generality (e.g. =-=[1, 29, 30, 33]-=-). This is not because of a lack of theoretical developments; indeed there are the methodologies of data flow equations (e.g. [10]), set-based analyses through the generation of constraints (e.g. [7])... |

66 |
Backwards analysis of functional programs
- Hughes
- 1988
(Show Context)
Citation Context ...r entities a backward analysis can be obtained by setting I # =#, i.e. I # (L 1 , L 2 ) = L 1 # L 2 = L 2 # L 1 ; at higher types a general formulation of backwards analyses is still a research issue =-=[8]-=-. However, P(D 1 # D 2 ) has greater descriptive power than either of P(D 1 ) # P(D 2 ) or P(D 2 ) # P(D 1 ), and this suggest looking for a lax functor # # such that P(D 1 # D 2 ) is isomorphic to P(... |

49 | The semantics of future and its use in program optimization
- Flanagan, Felleisen
- 1995
(Show Context)
Citation Context ...lves. For inspiration we may look at natural semantics (e.g.[26]), structural operational semantics [25], denotational semantics (e.g. [20]), the syntax-directed frameworks for closure analysis (e.g. =-=[5]-=-), or the semantic frameworks mentioned below. Overview. First we give an account of two-level metalanguages and their use for compiler construction; Section 2 then ends with a short guide to the lite... |

40 |
Two-level semantics and abstract interpretation
- Nielson
- 1989
(Show Context)
Citation Context ...epth knowledge of the theory of context free languages is hardly necessary for the user of lex and yacc. Reader's guide. The most up-to-date account 5 of two-level abstract interpretation is given in =-=[18]-=- (with [17] exploring more technical aspects); a reasonably comprehensive account of most of the theory is given in Section 3 of [9]. 4 Conclusion The natural sciences propose theories for describing ... |

29 |
Two-level semantics and code generation
- Nielson, Nielson
- 1988
(Show Context)
Citation Context ... of the theoretical developments this hardly poses any new challenges. Reader's guide. The pragmatics of using two-level metalanguages for compiler writing is explained in [22] (and also Section 6 of =-=[19]-=- and Section 8.2 of [20]); the most up-to-date account of code generation is given in [19]; a recent overview of some of the techniques for automatically transforming the ordinary denotational metalan... |

26 |
Natural-semantics-based abstract interpretation (preliminary version), Static Analysis
- Schmidt
- 1995
(Show Context)
Citation Context ... do as well. For (ii) we still need a metalanguage to describe the interpretation (or many-sorted algebra) of the abstract operations themselves. For inspiration we may look at natural semantics (e.g.=-=[26]-=-), structural operational semantics [25], denotational semantics (e.g. [20]), the syntax-directed frameworks for closure analysis (e.g. [5]), or the semantic frameworks mentioned below. Overview. Firs... |

24 |
The type and e#ect discipline
- Talpin, Jouvelot
- 1992
(Show Context)
Citation Context ..., set-based analyses through the generation of constraints (e.g. [7]), abstract interpretation expressed denotationally (e.g. [15]) or operationally (e.g. [3]), annotated type and e#ect systems (e.g. =-=[28]-=-), and even more general logical systems. It is important to realise that construction of a tool amounts to defining a user interface: one has to define a metalanguage in which to express instances of... |

19 | Automatic Generation and Management of Interprocedural Program Analyses
- Yi, Harrison
- 1993
(Show Context)
Citation Context ...read and long-term usage. Tool-making for program analysis. A similar disappointing outlook applies to tools for program analysis, despite several e#orts to construct systems of some generality (e.g. =-=[1, 29, 30, 33]-=-). This is not because of a lack of theoretical developments; indeed there are the methodologies of data flow equations (e.g. [10]), set-based analyses through the generation of constraints (e.g. [7])... |

18 |
Strictness analysis and denotational abstract interpretation
- Nielson
- 1988
(Show Context)
Citation Context ...dge of the theory of context free languages is hardly necessary for the user of lex and yacc. Reader's guide. The most up-to-date account 5 of two-level abstract interpretation is given in [18] (with =-=[17]-=- exploring more technical aspects); a reasonably comprehensive account of most of the theory is given in Section 3 of [9]. 4 Conclusion The natural sciences propose theories for describing aspects of ... |

18 |
Spare: A development environment for program analysis algorithms
- Venkatesh, Fischer
- 1992
(Show Context)
Citation Context ...read and long-term usage. Tool-making for program analysis. A similar disappointing outlook applies to tools for program analysis, despite several e#orts to construct systems of some generality (e.g. =-=[1, 29, 30, 33]-=-). This is not because of a lack of theoretical developments; indeed there are the methodologies of data flow equations (e.g. [10]), set-based analyses through the generation of constraints (e.g. [7])... |

17 |
Compiler generation from denotational semantics
- Paulson
- 1984
(Show Context)
Citation Context ...are disappointingly few tools of general usage, apart from the already mentioned success stories of lex and yacc. Several tools based on attribute grammars (e.g. [32]) or denotational semantics (e.g. =-=[24]-=-) have been developed for semi-automatic construction of larger parts of compiler front-ends, but none seems to have sustained wide-spread and long-term usage. Also several tools have been developed f... |

16 |
Tensor products generalize the relational data flow analysis method
- Nielson
- 1985
(Show Context)
Citation Context ...P(D 1 D 2 ) has greater descriptive power than P(D 1 )sP(D 2 ) and this suggests looking for a lax functor# such that P(D 1 D 2 ) is isomorphic to P(D 1 )# P(D 2 ). Luckily a notion of tensor product =-=[12]-=- can be constructed such that it applies to more general complete lattices than those of form P(s), and such that P(D 1 D 2 ) # = P(D 1 )# P(D 2 ). Use of the tensor product leads to so-called relatio... |

15 |
Strong Abstract Interpretation using Power Domains
- Mycroft, Nielson
- 1983
(Show Context)
Citation Context ...erpretation is viewed as abstract computation rather than specification; -- the computational partial order is not fully separated from the approximation partial order (unlike the technically complex =-=[11]-=-), and 5 Shorter and less technical overviews are given in [15], stressing the metalanguage approach, and [13], overviewing part of the theory, but they no longer convey the full generality of the app... |

10 |
Engineering a simple, e cient code generator generator
- Fraser, Hanson, et al.
- 1992
(Show Context)
Citation Context ...s to have sustained wide-spread and long-term usage. Also several tools have been developed for semi-automatic construction of compiler back-ends, but hardly any (with the possible exception of IBURG =-=[6]-=-) seems to have sustained wide-spread and long-term usage. Tool-making for program analysis. A similar disappointing outlook applies to tools for program analysis, despite several e#orts to construct ... |

10 |
Two-Level Functional Languages. Cambridge Univ
- Nielson, Nielson
- 1992
(Show Context)
Citation Context ...tation (or many-sorted algebra) of the abstract operations themselves. For inspiration we may look at natural semantics (e.g.[26]), structural operational semantics [25], denotational semantics (e.g. =-=[20]-=-), the syntax-directed frameworks for closure analysis (e.g. [5]), or the semantic frameworks mentioned below. Overview. First we give an account of two-level metalanguages and their use for compiler ... |

8 |
A Formal Type System for Comparing Partial Evaluators
- Nielson
- 1988
(Show Context)
Citation Context ...ooleans and integers (e.g. [#v .true]), and an addition operator [plus] operating on dynamic integers. The decision to use combinators rather than underlined #-notation (as outlined above and in e.g. =-=[16, 20]-=-) is heavily influenced by the application: for partial evaluation and simple forms of abstract interpretation, underlined #-notation would be quite su#cient, whereas for code generation and more adva... |

7 | Multi-level lambda-calculi: An algebraic description
- Nielson, Nielson
- 1996
(Show Context)
Citation Context ...6]). This opens up for the two-level metalanguage being expanded to a full-fledged functional language; it also opens up for defining two-level notations for completely di#erent programming paradigms =-=[21]: -- The &-=-quot;two-level approach" is not inherently restricted to a denotational, domain theoretic, or functional approach. Domain theoretic program analysis. Taking the domain theoretic approach to progr... |

6 |
Generation of ecient interprocedural analyzers with PAG
- Alt, Martin
- 1995
(Show Context)
Citation Context |

6 |
Expected forms of data flow analysis
- Nielson
- 1986
(Show Context)
Citation Context ...as [Num Num] is intended to be used only when the desired property spaces cannot be built compositionally from the primitives provided. For each combinator we now suggest one or more "expected fo=-=rms" [14]-=- that could profitably be o#ered as building-blocks by the analysis tool. For forward analyses where the dynamic function space is interpreted as ordinary function space, i.e. I # =#, it is natural to... |

6 |
Towards a Denotational Theory of Abstract Interpretation
- Nielson
- 1987
(Show Context)
Citation Context ...nts; indeed there are the methodologies of data flow equations (e.g. [10]), set-based analyses through the generation of constraints (e.g. [7]), abstract interpretation expressed denotationally (e.g. =-=[15]-=-) or operationally (e.g. [3]), annotated type and e#ect systems (e.g. [28]), and even more general logical systems. It is important to realise that construction of a tool amounts to defining a user in... |

6 |
Global Flow Analysis and Optimization in the MUG2 Compiler Generating System
- Wilhelm
- 1981
(Show Context)
Citation Context ...ch research has been conducted, there are disappointingly few tools of general usage, apart from the already mentioned success stories of lex and yacc. Several tools based on attribute grammars (e.g. =-=[32]-=-) or denotational semantics (e.g. [24]) have been developed for semi-automatic construction of larger parts of compiler front-ends, but none seems to have sustained wide-spread and long-term usage. Al... |

3 |
Abstract Interpretation of Denotational Definitions
- Nielson
- 1986
(Show Context)
Citation Context ... not fully separated from the approximation partial order (unlike the technically complex [11]), and 5 Shorter and less technical overviews are given in [15], stressing the metalanguage approach, and =-=[13]-=-, overviewing part of the theory, but they no longer convey the full generality of the approach. -- analyses generally model extensional 6 rather than intensional properties. The first decision is res... |

2 |
Pragmatic Aspects of Two-Level Denotational MetaLanguages
- Nielson, Nielson
- 1986
(Show Context)
Citation Context ...r in di#erent ways; in terms of the theoretical developments this hardly poses any new challenges. Reader's guide. The pragmatics of using two-level metalanguages for compiler writing is explained in =-=[22]-=- (and also Section 6 of [19] and Section 8.2 of [20]); the most up-to-date account of code generation is given in [19]; a recent overview of some of the techniques for automatically transforming the o... |

2 |
The PSI System
- Nielson, Nielson, et al.
- 1992
(Show Context)
Citation Context ...ransforming the ordinary denotational metalanguage into the two-level metalanguage is given in Chapters 2, 3 and 4 of [20]. A prototype system implementing a number of ideas from [20] is described in =-=[23]-=-. 3 Two-Level Abstract Interpretation We are now ready to give the two-level metalanguage a parameterised denotational semantics suitable for a development of abstract interpretation. For reasons of s... |