## Deriving Pre-conditions for Array Bound Check Elimination (2001)

### Cached

### Download Links

- [www.comp.nus.edu.sg]
- [www.comp.nus.edu.sg]
- [www.comp.nus.edu.sg]
- DBLP

### Other Repositories/Bibliography

Venue: | In Proceedings of the Second Symposium on Programs as Data Objects, PADO 2001 |

Citations: | 8 - 5 self |

### BibTeX

@INPROCEEDINGS{Chin01derivingpre-conditions,

author = {Wei-ngan Chin and Siau-cheng Khoo and Dana N. Xu},

title = {Deriving Pre-conditions for Array Bound Check Elimination},

booktitle = {In Proceedings of the Second Symposium on Programs as Data Objects, PADO 2001},

year = {2001},

pages = {2--24},

publisher = {Springer Verlag}

}

### OpenURL

### Abstract

We present a high-level approach to array bound check optimization that is neither hampered by recursive functions, nor disabled by the presence of partially redundant checks. Our approach combines a forward analysis to infer precise contextual constraint at designated program points, and a backward method for deriving a safety pre-condition for each bound check. Both analyses are formulated with the help of a practical constraint solver based on Presburger formulae

### Citations

1096 | Proof-carrying code
- Necula
- 1997
(Show Context)
Citation Context ...es, as deeper invariants are often required. To handle checks from programs with more complex controlsow, vericationbased methods have also been advocated by Suzuki and Ishihata [24], Necula and Lee [=-=19, 20]-=- and Xu et al [27]; whilst Cousot and Halbwachs [5] have advocated the use of abstract interpretation techniques. Whilst powerful, these methods have so far been restricted to eliminating totally redu... |

575 | Automatic discovery of linear restraints among variables of a program
- Cousot, Halbwachs
- 1978
(Show Context)
Citation Context ...uide bound check specialization, for the purpose of eliminating partially redundant checks. 1 Introduction Array bound check optimization has been extensively investigated over the last three decades =-=[24, 12, 5, 17, 7, 8, 15]-=-, with renewed interests as recently as [3, 27, 23]. While successful bound check elimination can bring about measurable gains in performance, the importance of bound check optimization goes beyond th... |

449 | The omega test: a fast and practical integer programming algorithm for dependence analysis
- Pugh
- 1991
(Show Context)
Citation Context ...minesinvariants for parameters of recursive functions over the sizes of data structures used. The inference is performed accurately and eciently with the help of a constraint-solver on Presburger form=-=[22]-=-. The presence of sized type greatly enhances inter-procedural analysis of contextual constraints, which are crucial for identifying both unsafe and totally redundant checks. More importantly, accurat... |

403 | Synchronous Programming of Reactive Systems
- Halbwachs
- 1993
(Show Context)
Citation Context ...convex hull of U (viewed as a relation) and widen(U 2 ; U 3 ) generalizes U 2 to yield a constraint W 2 such that both U 2 and U 3 are instances of W 2 . (We refer the reader to the work of Halbwachs =-=[9, -=-10] for detail description of these two operations.) union signies disjunction, compose # First Approximation U1 := hull U ; U1 = [a; l ; h] ! [a ? ; l ? ; h ? ] : a = a ? ^ l h; l ? ^ h ? h ^ l + 2... |

267 | The design and implementation of a certifying compiler
- Necula, Lee
- 1998
(Show Context)
Citation Context ...es, as deeper invariants are often required. To handle checks from programs with more complex controlsow, vericationbased methods have also been advocated by Suzuki and Ishihata [24], Necula and Lee [=-=19, 20]-=- and Xu et al [27]; whilst Cousot and Halbwachs [5] have advocated the use of abstract interpretation techniques. Whilst powerful, these methods have so far been restricted to eliminating totally redu... |

169 | Eliminating array bound checking through dependent types
- Xi, Pfenning
- 1998
(Show Context)
Citation Context ...2. We deal directly with recursive functions, and the invariant synthesis is performed only once for each recursive function, instead of for every occurrence of checks within the function. Except for =-=[26, 23]-=- whose methods are restricted to totally redundant checks, almost all previous work for bounds check elimination deal with only loop-based programs. 3. We design a simple yet elegant approach to deriv... |

121 | Abcd : Eliminating array bounds checks on demand
- Bodik, Gupta, et al.
- 2000
(Show Context)
Citation Context ...artially redundant checks. 1 Introduction Array bound check optimization has been extensively investigated over the last three decades [24, 12, 5, 17, 7, 8, 15], with renewed interests as recently as =-=[3, 27, 23]-=-. While successful bound check elimination can bring about measurable gains in performance, the importance of bound check optimization goes beyond these direct gains. In safety-oriented languages, suc... |

111 | Symbolic bounds analysis of pointers, array indices, and accessed memory regions
- Rugina, Rinard
- 2000
(Show Context)
Citation Context ...artially redundant checks. 1 Introduction Array bound check optimization has been extensively investigated over the last three decades [24, 12, 5, 17, 7, 8, 15], with renewed interests as recently as =-=[3, 27, 23]-=-. While successful bound check elimination can bring about measurable gains in performance, the importance of bound check optimization goes beyond these direct gains. In safety-oriented languages, suc... |

110 | Verification of realtime systems using linear relation analysis
- Halbwachs, Proy, et al.
- 1997
(Show Context)
Citation Context ...complementary in power and eciency, we believe a collection of these techniques is needed to do a decent job. This includes: Polyhedra analysis. This is proposed and developed by Cousot and Halbwachs =-=[5, 11, 10]-=-, as well as King and his co-workers [2, 14]. It is an abstract interpretation approach tosnding the input/output size relation throughsxedpoint computation over linear constraint. Both convex-hull op... |

82 |
Compiler analysis of the value ranges for variables
- Harrison
- 1977
(Show Context)
Citation Context ...uide bound check specialization, for the purpose of eliminating partially redundant checks. 1 Introduction Array bound check optimization has been extensively investigated over the last three decades =-=[24, 12, 5, 17, 7, 8, 15]-=-, with renewed interests as recently as [3, 27, 23]. While successful bound check elimination can bring about measurable gains in performance, the importance of bound check optimization goes beyond th... |

73 |
Termination Proofs for Logic Programs
- Plümer
(Show Context)
Citation Context ...ming a polynomial form for the symbolic bounds, their method is able to compute these bounds without usingsx-point iteration. In some sense, this inductive approach is similar to the proposal made in =-=[25, 21]-=-, where size information is inductively captured to analyze program termination property. Whilst the eciency of the inductive approach is not in question, we have yet to investigate the loss in precis... |

67 |
Efficient tests for top-down termination of logical rules
- ULLMAN, GELDER
- 1988
(Show Context)
Citation Context ...ming a polynomial form for the symbolic bounds, their method is able to compute these bounds without usingsx-point iteration. In some sense, this inductive approach is similar to the proposal made in =-=[25, 21]-=-, where size information is inductively captured to analyze program termination property. Whilst the eciency of the inductive approach is not in question, we have yet to investigate the loss in precis... |

65 |
Implementation of an array bound checker
- Suzuki, Ishihata
- 1977
(Show Context)
Citation Context ...uide bound check specialization, for the purpose of eliminating partially redundant checks. 1 Introduction Array bound check optimization has been extensively investigated over the last three decades =-=[24, 12, 5, 17, 7, 8, 15]-=-, with renewed interests as recently as [3, 27, 23]. While successful bound check elimination can bring about measurable gains in performance, the importance of bound check optimization goes beyond th... |

62 | Elimination of redundant array subscript range checks
- Kolte, Wolfe
(Show Context)
Citation Context |

61 | A fresh look at optimizing array bound checking
- Gupta
- 1990
(Show Context)
Citation Context |

54 | Safety checking of machine code
- Xu, Miller, et al.
- 2000
(Show Context)
Citation Context ...artially redundant checks. 1 Introduction Array bound check optimization has been extensively investigated over the last three decades [24, 12, 5, 17, 7, 8, 15], with renewed interests as recently as =-=[3, 27, 23]-=-. While successful bound check elimination can bring about measurable gains in performance, the importance of bound check optimization goes beyond these direct gains. In safety-oriented languages, suc... |

52 | Calculating sized types
- Chin, Khoo
- 2001
(Show Context)
Citation Context ...ks. We note that such specialization technique is also advocated by [18] in their bound check optimization of Java programs. Our new approach is built on top of an earlier work on sized-type inference=-=[4]-=-, where we are able to automatically infer input/output size relation and also determinesinvariants for parameters of recursive functions over the sizes of data structures used. The inference is perfo... |

46 |
Optimization of range checking
- Markstein, Cocke, et al.
- 1982
(Show Context)
Citation Context |

45 | Inferring Argument Size Relationships with CLP
- Benoy, King
- 1996
(Show Context)
Citation Context ... collection of these techniques is needed to do a decent job. This includes: Polyhedra analysis. This is proposed and developed by Cousot and Halbwachs [5, 11, 10], as well as King and his co-workers =-=[2, 14]-=-. It is an abstract interpretation approach tosnding the input/output size relation throughsxedpoint computation over linear constraint. Both convex-hull operation (to eliminate multiple disjuncts) an... |

25 |
About synchronous programming and abstract interpretation
- Halbwachs
- 1998
(Show Context)
Citation Context ...complementary in power and eciency, we believe a collection of these techniques is needed to do a decent job. This includes: Polyhedra analysis. This is proposed and developed by Cousot and Halbwachs =-=[5, 11, 10]-=-, as well as King and his co-workers [2, 14]. It is an abstract interpretation approach tosnding the input/output size relation throughsxedpoint computation over linear constraint. Both convex-hull op... |

23 |
Constraint-based Partial Evaluation of Rewritingbased Functional Logic Programs
- Lafave, Gallagher
- 1997
(Show Context)
Citation Context ...: polyvariant for maximal specialization, monovariant for minimal code duplication, and duovariantsspecialization for a space/time tradeo. While the idea of using contextbased program specialization [=-=16, 6-=-] is not new, our work is novel in its use of pre-condition for guiding eective specialization. Section 2 gives an overview of our method by introducing sized types and the main steps towards bound ch... |

17 | Lower-bound time-complexity analysis of logic programs
- King, Shen, et al.
- 1997
(Show Context)
Citation Context ... collection of these techniques is needed to do a decent job. This includes: Polyhedra analysis. This is proposed and developed by Cousot and Halbwachs [5, 11, 10], as well as King and his co-workers =-=[2, 14]-=-. It is an abstract interpretation approach tosnding the input/output size relation throughsxedpoint computation over linear constraint. Both convex-hull operation (to eliminate multiple disjuncts) an... |

13 |
Optimizing bounds checking in Java programs
- Midkiff, Moreira, et al.
- 1998
(Show Context)
Citation Context ...ropose to use program specialization to selectively enforce contexts that are strong enough for eliminating partially redundant checks. We note that such specialization technique is also advocated by =-=[18]-=- in their bound check optimization of Java programs. Our new approach is built on top of an earlier work on sized-type inference[4], where we are able to automatically infer input/output size relation... |

12 |
The Omega library (Version 1.1.0) interface guide. http://www.cs.umd.edu/ projects/omega
- Kelly, Maslov, et al.
- 1996
(Show Context)
Citation Context ...llustrates a trace of such computation for the function look with the aid of the Omega calculator. In the above, lines begin with # are comments; lines end with ; are commands to the Omega Calculator =-=[13]-=-; outputs from the Calculator are indented rightward. (hull U ) computes the convex hull of U (viewed as a relation) and widen(U 2 ; U 3 ) generalizes U 2 to yield a constraint W 2 such that both U 2 ... |

9 |
Optimizing array bound checks using analysis
- Gupta
- 1993
(Show Context)
Citation Context |

1 |
Rules and stratigies for contextual specialization of constraint logic programs
- Fioravanti, Pettorossi, et al.
- 1990
(Show Context)
Citation Context ...: polyvariant for maximal specialization, monovariant for minimal code duplication, and duovariantsspecialization for a space/time tradeo. While the idea of using contextbased program specialization [=-=16, 6-=-] is not new, our work is novel in its use of pre-condition for guiding eective specialization. Section 2 gives an overview of our method by introducing sized types and the main steps towards bound ch... |

1 |
The insertion of speculative tests may look similar to check hoisting. The key dierent is that no exception is raised if speculative test fails
- Compilers, Techniques, et al.
- 1986
(Show Context)
Citation Context ... with the assertion v = length(arr) from the let statement. Totally and partially redundant checks are traditionally identied by two separate techniques. As a matter of fact, forward datasow analysis[=-=1, 15]-=- which determines available expressions has been primarily used to identify totally redundant checks. An expression (or check) e is said to be available at program point p if some expression in an equ... |