## A Proof Method for the Correctness of Modularized 0CFA (2002)

Citations: | 2 - 0 self |

### BibTeX

@MISC{Lee02aproof,

author = {Oukseh Lee and Kwangkeun Yi and Yunheung Paek},

title = {A Proof Method for the Correctness of Modularized 0CFA},

year = {2002}

}

### OpenURL

### Abstract

This article is about our findings when we tried to derive a modular version from a whole-program control-flow analysis (CFA), to be used inside a modularized version of our exception analysis: (1) Deriving a modular version from a whole-program monovariant (or contextinsensitive) CFA makes the resulting analysis polyvariant (or contextsensitive) at the module-level. (2) Hence the correctness of its modularized version cannot be proven in general with respect to the original CFA. (3) A convenient stepping-stone to prove the correctness of a modularized version (instead of proving it against the program semantics) is a wholeprogram CFA that is polyvariant at the module-level. Because CFA is a basis of almost all analyses for higher-order programs, our result can be seen as a general hint of using the module-variant whole-program analysis in order to ease the correctness proof for a modularized version. We think this is worthwhile to report because usually in practice we first design a whole-program analysis, prove its correctness against the program semantics, and then only after its cost-accuracy balance is assured we start designing its modularized version. Our work can also be seen as a formal investigation, for CFA, of the folklore that modularization improves the analysis accuracy.

### Citations

318 | Control-Flow Analysis of Higher-Order Languages
- SHIVERS
- 1991
(Show Context)
Citation Context ...not a conservative extension of the original 0CFA. Section 6 presents a module-variant whole-program 0CFA and section 7 proves that 0CFA/m is its conservative extension. 2 0CFA The whole-program 0CFA =-=[1]-=-, whose modular version we are designing, is shown in Figure 1. We present 0CFA in the style similar to [2]. Nodes are syntactic objects: the variables or sub-expressions of the input program. All var... |

141 | Separate compilation for Standard ML
- Appel, MacQueen
- 1994
(Show Context)
Citation Context ...ule M 2 uses names declared in M 1 , and M 3 uses those of M 1 and M 2 . 3 Incremental Model for Modular Analysis We assume that a modular analysis works inside an incremental compilation environment =-=[7]. A module-=- consists of variable declarations ("x =e") and a signature that lists a subset of the declared variables visible from other modules. Module M directly depends on another module M 0 , writte... |

112 | Componential set-based analysis
- Flanagan, Felleisen
- 1999
(Show Context)
Citation Context ...ort code-segments in (ExportFn) and re-use them in (Var), (Lam), and (App). For an efficient implementation of 0CFA/m, we can replace code-segments by equivalent edges using simplification algorithms =-=[8]-=-. 5 0CFA/m Is Not A Conservative Extension Of 0CFA The 0CFA/m analysis is more accurate than 0CFA. Example 2 Consider the program (consisting of two modules) and its modular analysis: M 1 = 0 @ f = (x... |

80 |
Co-induction in relational semantics
- Milner, Tofte
- 1991
(Show Context)
Citation Context ...ft-hand side judgments asserted by the rules of Figure 4 assuming that judgments in Q hold. If we find a set Q of judgments such that (S j= ; " ) 2 Q and Q ` F (Q), then by the co-induction princ=-=iple [9], Q is inc-=-luded in the greatest fixed point of F and S j= ; "sholds. Therefore, the module-variant 0CFA's solution, which is defined as the least X such that X j= ; " , is included in the modularized ... |

70 | Infinitary control flow analysis: a collecting semantics for closure analysis
- Nielson, Nielson
- 1997
(Show Context)
Citation Context ... until no more additions are possible. Edge "n ! x:e l " in the final result indicates that n may evaluate into (or, is bound to) function x:e l in the input program. The correctness of 0CFA=-= is known [1,3]-=-. 2 Label l Var x Constant c Expr e ::= x j x:e l j e l e l j c Decl d ::= x = e l Programs::= d Node n ::= x j l j x:e l Edge g ::= n ! n x = e l 2sx ! l x l 2sl ! x (x:e l 0 ) l 2sl ! x:e l 0 (e l 1... |

44 | Linear-time subtransitive control flow analysis
- Heintze, McAllester
- 1997
(Show Context)
Citation Context ...nd section 7 proves that 0CFA/m is its conservative extension. 2 0CFA The whole-program 0CFA [1], whose modular version we are designing, is shown in Figure 1. We present 0CFA in the style similar to =-=[2]. Nodes ar-=-e syntactic objects: the variables or sub-expressions of the input program. All variables and labels are assumed distinct. Edge "n ! m" indicates that n may have the values of m (or, values ... |

32 | Towards a cost-effective estimation of uncaught exceptions in SML programs, in: P. van Hentenryck (Ed - Yi, Ryu - 1997 |

24 | Polymorphic splitting: An effective polyvariant flow analysis
- Wright, Jagannathan
- 1998
(Show Context)
Citation Context ... The situation is similar to 0CFA. In case of context-sensitive CFAs, modularization can still improve their accuracies. For example, modularized versions of kCFA [1] or the polymorphic-splitting CFA =-=[11]-=- can be more accurate than their original whole-program versions [10]. The correctness of their modular9 ized versions can be proven similarly, by using module-variant whole-program versions. Detailed... |

1 |
A proof method for the correctness of modularized kCFAs, Technical Memorandum ROPAS-2000-9, Research on program analysis system
- Lee, Yi
(Show Context)
Citation Context ...is a declaration in a module, we have to use this module context for the variable x and its definition e l 1 1 . Because the module-variant 0CFA is an instance of the infinitary control flow analysis =-=[10]-=-, it is correct by Theorem 4.1 of Nielson and Nielson [3]. 7 0CFA/m Is A Conservative Extension Of Module-Variant 0CFA We show that there exists a solution S of the module-variant 0CFA that is covered... |

1 | SML/NJ Exception Analyzer 0.98, URL http: //compiler.kaist.ac.kr/pub/exna/exna-README.html - Yi, Ryu |

1 |
Co-induction in relational semantics, Theoret
- Milner, Tofte
- 1991
(Show Context)
Citation Context ...t of lefthand side judgments asserted by the rules of Fig. 4 assuming that judgments in Q hold. If we find a set Q of judgments such that (S |=∅ε ℘) ∈Q and Q⊆ F(Q), then by the co-induction principle =-=[9]-=-, Q is included in the greatest fixed point of F and S |=∅ε ℘ holds. Therefore, the module-variant 0CFA’s solution, which is defined as the least X such thatX |=∅ε ℘ , is included in the modularized s... |