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
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
N. Wirth: Type Extension, ACM Trans. on Prog. Lang. and Systems Vol 10, No 2 pp 204–214, April 1988.
N. Wirth: The Programming Language Oberon, Software Practice and Experience, Vol 18, No 7, pp 671–690, July 1988.
H. Mössenböck and N. Wirth: The Programming Language Oberon-2, Computer Science Report 160, ETH Zurich, May 1991
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.
J. Asuru: Optimisation of Array Subscript Range Checks, ACM Letters on Prog. Lang. and Systems, Vol 1, No 2, June 1992.
J. Gough and D. Corney: Typeflow Analysis by Clade Algebra, Information Technology Report 9/93, QUT Brisbane, July 1993, (preprint)
H. Mössenböck: private communication March 1993.
J. Palsberg and M. Schwartzbach: Static Typing for Object-Oriented Programming, To appear in Science of Computer Programming.
N. Oxhøj, J. Palsberg and M. Schwartzbach: Making Type Inference Practical, ECOOP '92, Lecture Notes in Computer Science, Vol 615, Springer Verlag, 1992.
Author information
Authors and Affiliations
Editor information
Rights 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