Calculating sized types
Wei-Ngan Chin, Siau‐Cheng Khoo · 1999
Many program optimisations and analyses, such as arraybound checking, termination analysis, etc, depend on knowing the size of a function's input and output. However, size information can be difficult to compute. Firstly, accurate size computation requires detecting size relation between different inputs of a function. Secondly, different optimisations and analyses may require slightly different size information, and thus slightly different computation. Literature in size computation has mainly concentrated on size checking, instead of inferencing. In this paper, we provide a generic framework on which different size variants can be expressed and computed. We also describe an effective algorithm for inferring, instead of checking, size information. Size information are expressed in terms of Presburger formulae, and our algorithm utilises the Omega Calculator to compute as exact a size information as possible, within the linear arithmetic capability. 1 Introduction Many program optimi...
Cited by 58 works. doi:10.1145/328690.328893
Authors
References
- Theory of Linear and Integer Programming
- Grundlagen der Mathematik
- Automatic discovery of linear restraints among variables of a program
- A practical algorithm for exact array dependence analysis
- Dependent types in practical programming
- Leon Henkin, J. Donald Monk, and Alfred Tarski. Cylindric algebras. Part II. Studies in logic and the foundations of mathematics, vol. 115. North-Holland, Amsterdam, New York, and Oxford, 1985, ix + 302 pp.
- Verification of Real-Time Systems using Linear Relation Analysis
- Eliminating array bound checking through dependent types
- Type inference with polymorphic recursion
- Proving the correctness of reactive systems using sized types