Skip to main content
Log in

Automatically replacing indices into parallel arrays with pointers to records

  • Part I Computer Science
  • Published:
BIT Numerical Mathematics Aims and scope Submit manuscript

Abstract

In older languages lists, trees and graphs are represented with sets of arrays where indices of elements correspond to pointers to the nodes of the data structure. We present an algorithm that replaces such arrays with objects allocated dynamically from the heap, and indices with true pointers. Generated pointers are strongly typed and elements of logically related arrays are combined into records. The algorithm is potentially useful, especially in automatic translation between high-level programming languages.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. H. Partsch and R. Steinbrüggen,Program transformation systems, ACM Computing Surveys15, 3, 199–236 (1983).

    Google Scholar 

  2. M. S. Feather,A survey and classification of some program transformation approaches and techniques, USC/Information Sciences Institute (1986).

  3. A. Prudom and M. A. Hennell,Some problems concerning the automatic translation of Fortran to Algol 68, SIGPLAN Notices12, 6, 138–143 (1977).

    Google Scholar 

  4. R. A. Freak,A Fortran to Pascal translator, Software — Practice & Experience11, 7, 717–732 (1981).

    Google Scholar 

  5. E. A. Ashcroft and Z. Manna,Translating program schemas to while-schemas, SIAM, J. Comput.4, 2, 125-146 (1975).

    Google Scholar 

  6. G. Urschler,Automatic structuring of programs, IBM J. Res. Develop.19, 181–194 (1975).

    Google Scholar 

  7. E. S. Bainbridge,Minimal while programs, Mathematical Foundations of Programming, Lecture Notes in Computer Science45, 180–186, Springer-Verlag, Berlin (1976).

    Google Scholar 

  8. B. S. Baker,An algorithm for structuring flowgraphs, J. ACM24, 1, 98–120 (1977).

    Google Scholar 

  9. M. H. Williams and H. L. Ossher,Conversion of unstructured flow diagrams to structured form, The Computer Journal21, 2, 161–167 (1978).

    Google Scholar 

  10. J. Keohane, J. C. Cherniavsky and P. B. Henderson,On transforming control structures, SIAM J. Comput.11, 2, 268–286 (1982).

    Google Scholar 

  11. G. Ouslman,Unraveling unstructured programs, The Computer Journal25, 3, 379–387 (1982).

    Google Scholar 

  12. U. Lichtblau,Decompilation of control structures by means of graph transformations, Mathematical Foundations of Software Development, Proc. Conf. on Trees and Algebras in Programming, Berlin, Lecture Notes in Computer Science185, 284–297, Springer-Verlag (1985).

    Google Scholar 

  13. L. Ramshaw,Eliminating go to's while preserving program structure, Digital Systems Research Center (1985).

  14. N. D. Jones and S. S. Muchnick,Binding time optimization in proramming languages: Some thoughts toward the design of an ideal language, 3rd ACM Symp. on Principles of Programming Languages, 77–94, Atlanta, Georgia (1976).

  15. P. Cousot and R. Cousot,Static determination of dynamic properties of generalized type unions, Proc. ACM Conf. on Language Design for Reliable Software, SIGPLAN Notices12, 3, 77–94 (1977).

    Google Scholar 

  16. P. Cousot and R. Cousot,Abstract interpretation: A unified lattice model for static analysis of programs by construction of approximation fixpoints, 4th ACM Symp. on Principles of Programming Languages, 238–252 (1977).

  17. M. A. Kaplan and J. D. Ullman,A scheme for the automatic inference of variable types, J. ACM27, 1, 128–145 (1980).

    Google Scholar 

  18. N. D. Jones and S. S. Muchnick,Flow-analysis and optimization of LISP-like structures, inProgram Flow Analysis: Theory and Applications, 102–131, N. D. Jones and S. S. Muchnick (editors), Prentice-Hall, Englewood Cliffs, New Jersey (1981).

    Google Scholar 

  19. E. Schonberg, J. T. Schwartz and M. Sharir,An automatic technique for selection of data representation in SETL programs, ACM Trans. Prog. Lang. Sys.3, 2, 126–143 (1981).

    Google Scholar 

  20. G. Weiss and E. Schonberg,Typefinding recursive structures: A data-flow analysis in the presence of infinite type sets, Proc. IEEE Int. Conf. on Computer Languages, 170–181, Washington D.C. (1986).

  21. Specification for Compuer Programming Language Pascal, report BS6192: 1982, British Standards Institution (1982).

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Jokinen, M.O. Automatically replacing indices into parallel arrays with pointers to records. BIT 29, 227–238 (1989). https://doi.org/10.1007/BF01952678

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF01952678

CR Categories

General Terms

Additional Keywords and Phrases

Navigation