Abstract
Amtoft has formulated an “on-line” constraint normalization method for solving a strictness inference problem inspired by Wright. From the syntactic form of the normalized constraints he establishes that every program expression has a unique, most precise (“minimal”) strictness judgement, given fixed values for the strictness annotation in negative position.
We show that his on-line normalization is not required for proving his main syntactic result. Instead of normalizing the constraints during a bottom-up pass through the program we simply collect them first and solve them by standard iterative fixed point methods in a second phase. The main result follows from the fact that observable negative strictness variables only occur on the right-hand sides of the constraints. Furthermore, a standard iterative fixed point algorithm solves the constraints in linear time in the number of strictness variables in the constraint system whereas Amtoft's method requires exponential time.
Our presentation is somewhat different than Amtoft's. We use a linear-logic inspired presentation of the programming language and the strictness inference system for it. This results in smaller constraint systems generated. A tight strictness inference normalization result shows that many inequational constraints can be replaced by equational ones. Thus the constraint system can be simplified and significantly reduced in size by efficient variable unification, which can be performed on-line during its construction. Finally, we give an asymptotic worst-case analysis of the size of constraint systems relative to a program with or without explicitly typed variable declarations.
The main contributions in this paper are our analysis and method for solving type-based program analyses efficiently, not the design of new type-based program analyses. Generally, our method provides insight into the strengths of noncompositional program analysis algorithms; i.e., algorithms where the solution for a program is not computed as a function of the corresponding solutions of its immediate components, such as in Algorithm W or in frontier-based abstract interpretation.1 In particular, our method demonstrates the effective use of efficient iterative fixed point computation known from classical data flow analysis in type-based program analysis.
DIKU Semantics Report D-192
Preview
Unable to display preview. Download preview PDF.
References
Torben Amtoft. Strictness types: An inference algorithm and an application. Technical Report PB-448, DAIMI, Aarhus Universit, Ny Munkegade, Building 540, DK-8000 Aarhus C, Denmark, Aug. 1993.
Torben Amtoft. Local type reconstruction by means of symbolic fixed point iteration. In Proc. 5th European Symposium on Programming (ESOP), Edinburgh, Scotland, pages 43–57. Springer-Verlag, April 1994. Lecture Notes in Computer Science, Vol. 788.
Clement Baker-Finch. Relevant logic and strictness analysis. In Proc. Workshop on Static Analysis (WSA), Bordeaux, France, pages 221–228, Sept. 1992.
J. Cai, and R. Paige. Program derivation by fixed point computation. Science of Computer Programming, 11:197–261, 1989.
G. Kildall. A unified approach to global program optimization. Proc. ACM Symp. on Principles of Programming Languages (POPL), 1973.
R. Tarjan. Iterative algorithms for global flow analysis. In J. Traub, editor, Algorithms and Complexity, pages 91–102. Academic Press, 1976.
D. Wright. A new technique for strictness analysis. In Proc. Int'l J. Conf. on Theory and Practice of Software Development (TAPSOFT), April 1991.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1994 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Henglein, F. (1994). Iterative fixed point computation for type-based strictness analysis. In: Le Charlier, B. (eds) Static Analysis. SAS 1994. Lecture Notes in Computer Science, vol 864. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-58485-4_54
Download citation
DOI: https://doi.org/10.1007/3-540-58485-4_54
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-58485-8
Online ISBN: 978-3-540-49005-0
eBook Packages: Springer Book Archive