Systematic realisation of control flow analyses for CML

We present a methodology for the systematic realisation of control flow analyses and illustrate it for Concurrent ML. We start with an abstract specification of the analysis that is next proved semantically sound with respect to a traditional small-step operational semantics; this result holds for terminating w well as non-terminating programs. The analysis is defined coinductively and it is shown that all programs have a least analysis result (that is indeed the best one). To realise the analysis we massage the specification in three stages: (i) to explicitly record reachability of subexpressions, (ii) to be defined in a syntax-directed manner, and (iii) to generate a set of constraints that subsequently can be solved by standard techniques. We prove equivalence results between the different versions of the analysis; in particular it follows that the least solution to the constraints generated will be the least analysis result also to the initial specification.

[1]  Peter Sestoft,et al.  Analysis and efficient implementation of functional programs , 1991 .

[2]  Suresh Jagannathan,et al.  Analyzing stores and references in a parallel symbolic language , 1994, LFP '94.

[3]  Olin Shivers The semantics of Scheme control-flow analysis , 1991 .

[4]  Suresh Jagannathan,et al.  Effective Flow Analysis for Avoiding Run-Time Checks , 1995, SAS.

[5]  Mitchell Wand,et al.  Selective and lightweight closure conversion , 1994, POPL '94.

[6]  Patrick Cousot,et al.  Formal language, grammar and set-constraint-based program analysis by abstract interpretation , 1995, FPCA '95.

[7]  Jens Palsberg,et al.  Closure analysis in constraint form , 1995, TOPL.

[8]  Nevin Heintze,et al.  Set-based analysis of ML programs , 1994, LFP '94.

[9]  Robin Milner,et al.  Definition of standard ML , 1990 .

[10]  Patrick Cousot,et al.  Systematic design of program analysis frameworks , 1979, POPL.

[11]  Olin Shivers,et al.  Control flow analysis in scheme , 1988, PLDI '88.

[12]  Suresh Jagannathan,et al.  A unified treatment of flow analysis in higher-order languages , 1995, POPL '95.

[13]  Karl-Filip Faxén,et al.  Optimizing Lazy Functional Programs Using Flow Inference , 1995, SAS.

[14]  J. Michael Ashley,et al.  A practical and flexible flow analysis for higher-order languages , 1998, TOPL.

[15]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[16]  John H. Reppy Concurrent ML: Design, Application and Semantics , 1993, Functional Programming, Concurrency, Simulation and Automated Reasoning.

[17]  Flemming Nielson,et al.  Infinitary control flow analysis: a collecting semantics for closure analysis , 1997, POPL '97.

[18]  Flemming Nielson,et al.  Higher-order concurrent programs with finite communication topology (extended abstract) , 1994, POPL '94.

[19]  Flemming Nielson,et al.  Abstract interpretation: a semantics-based tool for program analysis , 1995, LICS 1995.

[20]  Matthias Felleisen,et al.  The semantics of future and its use in program optimization , 1995, POPL '95.