Abstract
In this paper we present a general framework for type-based analyses of functional programs. Our framework is a generalisation of our earlier work on strictness analysis and was inspired by Burn's logical framework. The framework is parameterised by a set of types to represent properties and interpretations for constants in the language. To construct a new analysis, the user needs only to supply a model for the types (which properties they denote) and sound rules for the constants. We identify the local properties that must be proven to guarantee the correctness of a specific analysis and algorithm. We illustrate the approach by recasting Hunt and Sand's binding time analysis in our framework. Furthermore we report on experimental results suggesting that our generic inference algorithm can provide the basis for an efficient program analyser.
This is a preview of subscription content, log in via an institution.
Preview
Unable to display preview. Download preview PDF.
References
S. van Bakel, Complete restrictions of the intersection type discipline, Theoretical Computer Science, 102(1):135–163, 1992.
P. N. Benton, Strictness logic and polymorphic invariance, in Proceedings of the 2nd Int. Symposium on Logical Foundations of Computer Science, LNCS 620, Springer Verlag, 1992.
P. N. Benton, Strictness Properties of Lazy Algebraic Datatypes, in Proceedings WSA'93, LNCS 724, Springer Verlag, 1993.
G. L. Burn, A Logical Framework for Program Analysis, in Proceedings of the 1992 Glasgow Functional Programming Workshop, Springer Verlag Workshops in Computer Science, 1992.
C. L. Hankin and D. Le Métayer, Deriving algorithms from type inference systems: Application to strictness analysis, in Proceedings of POPL'94, ACM Press, 1994.
C. L. Hankin and D. Le Métayer, Lazy type inference for the strictness analysis of lists, in Proceedings of ESOP'94, LNCS 788, Springer Verlag, 1994.
J. J. Hannan, Investigating a proof-theoretic meta-language, PhD thesis, University of Pennsylvania, DIKU Technical Report Nr 91/1, 1991.
J. Hannan and D. Miller, From Operational Semantics to Abstract Machines, Mathematical Structures in Computer Science, 2(4), 1992.
L. S. Hunt, Abstract Interpretation of Functional Languages: From Theory to Practice, PhD thesis, Imperial College, 1991.
L. S. Hunt and C. L. Hankin, Fixed Points and Frontiers: A New Perspective, Journal of Functional Programming, 1(1), 1991.
L. S. Hunt and D. Sands, Binding Time Analysis: A new PERspective, in Proceedings of the ACM Symposium on Partial Evaluation and Semantics-based Program Manipulation, 1991.
T. P. Jensen, Strictness Analysis in Logical Form, in J. Hughes (ed), Proceedings of the 5th ACM Conference on Functional Programming Languages and Computer Architecture, LNCS 523, Springer Verlag, 1991.
T. P. Jensen, Abstract Interpretation in Logical Form, PhD thesis, University of London, 1992. Also available as DIKU Technical Report 93/11.
T.-M. Kuo and P. Mishra, Strictness analysis: a new perspective based on type inference, in Proceedings of the 4th ACM Conference on Functional Programming Languages and Computer Architecture, ACM Press, 1989.
A. Leung and P. Mishra, Reasoning about simple and exhaustive demand in higher-order lazy languages, in Proceedings of the 5th ACM Conference on Functional Programming Languages and Computer Architecture, LNCS 523, Springer Verlag, 1991.
P. Wadler, Strictness Analysis on Non-flat Domains, in S. Abramsky and C. L. Hankin (eds), Abstract Interpretation of Declarative Languages, Ellis Horwood, 1987.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1994 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Hankin, C., Le Métayer, D. (1994). A type-based framework for program 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_53
Download citation
DOI: https://doi.org/10.1007/3-540-58485-4_53
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