Skip to main content

Type test elimination using typeflow analysis

  • Session Papers
  • Conference paper
  • First Online:
Programming Languages and System Architectures

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

Abstract

Programs written in languages of the Oberon family usually contain runtime tests on the dynamic type of variables. In some cases it may be desirable to reduce the number of such tests. Typeflow analysis is a static method of determining bounds on the types that objects may possess at runtime. We show that this analysis is able to reduce the number of tests in certain plausible circumstances. Furthermore, the same analysis is able to detect certain program errors at compile time, which would normally only be detected at program execution. This paper introduces the concepts of typeflow analysis and details its use in the reduction of runtime overhead in Oberon-2.

This work is supported by the Cooperative Research Centre for Distributed Systems Technology

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. N. Wirth: Type Extension, ACM Trans. on Prog. Lang. and Systems Vol 10, No 2 pp 204–214, April 1988.

    Google Scholar 

  2. N. Wirth: The Programming Language Oberon, Software Practice and Experience, Vol 18, No 7, pp 671–690, July 1988.

    Google Scholar 

  3. H. Mössenböck and N. Wirth: The Programming Language Oberon-2, Computer Science Report 160, ETH Zurich, May 1991

    Google Scholar 

  4. N. H. Cohen: Type-Extension Type Tests Can Be Performed in Constant Time, (Technical Correspondence), ACM Trans. on Prog. Lang. and Systems, Vol 13, No 4, pp 626–629, October 1991.

    Google Scholar 

  5. J. Asuru: Optimisation of Array Subscript Range Checks, ACM Letters on Prog. Lang. and Systems, Vol 1, No 2, June 1992.

    Google Scholar 

  6. J. Gough and D. Corney: Typeflow Analysis by Clade Algebra, Information Technology Report 9/93, QUT Brisbane, July 1993, (preprint)

    Google Scholar 

  7. H. Mössenböck: private communication March 1993.

    Google Scholar 

  8. J. Palsberg and M. Schwartzbach: Static Typing for Object-Oriented Programming, To appear in Science of Computer Programming.

    Google Scholar 

  9. N. Oxhøj, J. Palsberg and M. Schwartzbach: Making Type Inference Practical, ECOOP '92, Lecture Notes in Computer Science, Vol 615, Springer Verlag, 1992.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Jürg Gutknecht

Rights and permissions

Reprints and permissions

Copyright information

© 1994 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Corney, D., Gough, J. (1994). Type test elimination using typeflow analysis. In: Gutknecht, J. (eds) Programming Languages and System Architectures. Lecture Notes in Computer Science, vol 782. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-57840-4_29

Download citation

  • DOI: https://doi.org/10.1007/3-540-57840-4_29

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-57840-6

  • Online ISBN: 978-3-540-48356-4

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics