Abstract
We present a static analysis that detects potential runtime exceptions that are raised and never handled inside Standard ML programs. This analysis enhances the software safety by predicting, prior to the program execution, the abnormal termination caused by unhandled exceptions.
Our analysis prototype has been implemented by using a semantics-based analyzer generator and has been successfully tested with real Standard ML programs consisting of thousand lines.
We introduce semantic sparse analysis to reduce the analysis cost without compromising the analysis accuracy. In this method, expressions will only be analyzed when their evaluations are relevant to our analysis.
Preview
Unable to display preview. Download preview PDF.
References
Andrew W. Appel. Compiling with Continuations. Cambridge University Press, 1992.
Patrick Cousot and Radhia Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Conference Record of the 4th ACM Symposium on Principles of Programming Languages, 1977.
Patrick Cousot, and Radhia Cousot. Abstract interpretation frameworks. Journal of Logic Computation, 2(4):511–547, 1992. Also as a tech report: Ecole Polytechnique, no. LIX/RR/92/10.
Jong-Deok Choi, Ron Cytron, and Jeanne Ferrante. Automatic construction of sparse data flow evaluation graphs. In Proceedings of the Annual ACM Symposium on Principles of Programming Languages, pages 55–66, 1991.
R. Cytron, J. Ferrante, B. Rosen, M. Wegman, and F. Zadeck. Efficiently computing static single assignment form and control dependence graph. In Proceedings of the Annual ACM Symposium on Principles of Programming Languages, 1989.
Evelyn Duesterwald, Rajiv Gupta, and Mary Lou Soffa. Reducing the cost of data flow analysis by congruence partitioning. In International Confererence on Compiler Construction, April 1994.
D. Dhamdhere, B. Rosen, and F. Zadeck. How to analyze large programs efficiently and informatively. In Proceedings of the SIGPLAN Conference on Programming Language Design and Implementation, 1992.
Juan Carlos Guzmán and Ascánder Suárez. A type system for exceptions. In Proceedings of the ACM SIGPLAN Workshop on ML and its Applications, June 1994.
Williams L. Harrison III. The interprocedural analysis and automatic parallelization of scheme programs. Lisp and Symbolic Computation, 2(3/4): 179–396, 1989.
Pascal Van Hentenryck, Olivier Degimbe, Baudouin Le Charlier, and Laurent Michel. The impact of granularity in abstract interpretation of prolog. In Patrick Cousot, Moreno Falaschi, Gilberto File, and Antoine Rauzy, editors, Lecture Notes in Computer Science, volume 724. Springer-Verlag, proceedings of the third international workshop on static analysis edition, 1993.
Nevin Heintze. Set Based Program Analysis. PhD thesis, Carnegie Mellon University, October 1992.
John Hennessy. Program optimization and exception handling. In Proceedings of the Annual ACM Symposium on Principles of Programming Languages, pages 200–206, 1981.
Pierre Jouvelot and David K. Gifford. Algebraic reconstruction of types and effects. In Proceedings of the Annual ACM Symposium on Principles of Programming Languages, 1991.
John M. Lucassen and David K. Gifford. Polymorphic effect systems. In Proceedings of the Annual ACM Symposium on Principles of Programming Languages, pages 47–57, 1988.
Robin Milner, Mads Tofte, and Robert Haper. The Definition of Standard ML. MIT Press, 1990.
Joseph E. Stoy. Denotational Semantics: the Scott-Strachey Approach to Programming LanguageTheory. MIT Press, 1977.
Jean-Piere Talpin, and Pierre Jouvelot. Polymorphic type, region and effect inference. Journal of Functional Programming, 2(3):245–271, July 1992.
Mads Tofte and Jean-Pierre Talpin. Implementation of the typed call-by-value λ-calculus using a stack of regions. In Proceedings of the Annual ACM Symposium on Principles of Programming Languages, January 1994.
Kwangkeun Yi and Williams Ludwell Harrison III. Automatic generation and management of interprocedural program analyses. In Proceedings of the Annual ACM Symposium on Principles of Programming Languages, pages 246–259 (also as CSRD Report No. 1260), January 1993.
Kwangkeun Yi. Automatic Generation and Management of Program Analyses. PhD thesis, University of Illinois at Urbana-Champaign, August 1993. Report UIUCDCS-R-93-1828.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1994 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Yi, K. (1994). Compile-time detection of uncaught exceptions in Standard ML programs. 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_44
Download citation
DOI: https://doi.org/10.1007/3-540-58485-4_44
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