Skip to main content

Compile-time detection of uncaught exceptions in Standard ML programs

  • Conference paper
  • First Online:
Static Analysis (SAS 1994)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 864))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Andrew W. Appel. Compiling with Continuations. Cambridge University Press, 1992.

    Google Scholar 

  2. 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.

    Google Scholar 

  3. 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.

    Google Scholar 

  4. 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.

    Google Scholar 

  5. 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.

    Google Scholar 

  6. 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.

    Google Scholar 

  7. 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.

    Google Scholar 

  8. 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.

    Google Scholar 

  9. Williams L. Harrison III. The interprocedural analysis and automatic parallelization of scheme programs. Lisp and Symbolic Computation, 2(3/4): 179–396, 1989.

    Article  Google Scholar 

  10. 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.

    Google Scholar 

  11. Nevin Heintze. Set Based Program Analysis. PhD thesis, Carnegie Mellon University, October 1992.

    Google Scholar 

  12. John Hennessy. Program optimization and exception handling. In Proceedings of the Annual ACM Symposium on Principles of Programming Languages, pages 200–206, 1981.

    Google Scholar 

  13. 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.

    Google Scholar 

  14. 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.

    Google Scholar 

  15. Robin Milner, Mads Tofte, and Robert Haper. The Definition of Standard ML. MIT Press, 1990.

    Google Scholar 

  16. Joseph E. Stoy. Denotational Semantics: the Scott-Strachey Approach to Programming LanguageTheory. MIT Press, 1977.

    Google Scholar 

  17. Jean-Piere Talpin, and Pierre Jouvelot. Polymorphic type, region and effect inference. Journal of Functional Programming, 2(3):245–271, July 1992.

    Google Scholar 

  18. 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.

    Google Scholar 

  19. 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.

    Google Scholar 

  20. Kwangkeun Yi. Automatic Generation and Management of Program Analyses. PhD thesis, University of Illinois at Urbana-Champaign, August 1993. Report UIUCDCS-R-93-1828.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Baudouin Le Charlier

Rights and permissions

Reprints 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

Publish with us

Policies and ethics