Abstract
Partial evaluation is an optimization technique traditionally used in compilation. We have adapted this technique to the understanding of scientific application programs during their maintenance. We have implemented a tool that analyzes Fortran 90 application programs and performs an interprocedural pointer analysis. This paper presents a dynamic semantics of Fortran 90 and manually derives a partial evaluator from this semantics. The tool implementing the specifications is also detailed. The partial evaluator has been implemented in a generic programming environment and a graphical interface has been developed to visualize the information computed during the partial evaluation (values of variables, already analyzed procedures, scope of variables, removed statements, etc.).
Similar content being viewed by others
References
Abrial, J.R. 1996. The B-Book Assigning Programs to Meanins. Cambridge University Press, New York.
ACM. 1998. Symposium on Partial Evaluation, number 4 in ACM Computing Surveys.
Aho, A.V., Sethi, R., and Ullman, J.D. 1988. Compilers: Principles, Techniques and Tools. Addison-Wesley, Reading, MA.
Andersen, L.O., 1994. Program Analysis and Specialization for the C Programming Language. PhD Thesis, University of Copenhagen, DIKU report 94/19.
ANSI, 1992. NewYork. Programming Language Fortran 90, ANSI X3.198–1992 and ISO/IEC 1539–1991 (E).
Baier, R., Glück, R., and Zöchling, R. 1994. Partial evaluation of numerical programs in Fortran. In Proceedings of the Partial Evaluation and Semantics Based Program Manipulation Workshop, Melbourne, pp. 119–132. ACM SIGPLAN.
Baxter, I., Yahin, A., Moura, L., Sant'Anna, M., and Bier, L. 1998. Clone detection using abstract syntax trees. In Proc. of the Conf. on Soft. Maintenance. IEEE.
Bergstra, J.A., Dinesh, T.B., Field, J., and Heering, J. 1997. Toward a complete transformational toolkit for compilers. ACM Transactions on Programing Languages and Systems, 19(5): 639–684.
Blazy, S. and Facon, P. 1994. SFAC, a tool for program comprehension by specialization. In Proceedings of the Third Workshop on Program Comprehension, Washington D.C., pp. 162–167. IEEE.
Blazy, S. and Facon, P. 1995. Formal specification and prototyping of a program specializer. In Proceedings of the TAPSOFT Conference, Lecture Notes in Computer Science, 915, pp. 666–680. Aarhus, Elsevier Science Publishers B.V. (North-Holland), Amsterdam.
Blazy, S. and Facon, P. 1996. An automatic interprocedural analysis for the understanding of scientific application programs. In Danvy et al. (1996), pp. 1–16.
Blazy, S. and Facon, P. 1998. Partial evaluation for program understanding. ACM Computing Surveys— Symposium on Partial Evaluation, 4(4).
Carini, R. and Hind, M. 1995. Flow-sensitive interprocedural constant propagation. In Proc. of the Programming Languages Design and Implementation Conf., La Jolla, pp. 23–31. ACM SIGPLAN.
Chase, D.R., Wegman, M., and Zadeck, F.K. 1990. Analysis of pointers and structures. In Proc. of the Programming Languages Design and Implementation Conf., White Plains, pp. 296–310. ACM SIGPLAN.
Danvy, O., Gl¨ uck, R., and Thiemann, P. (Eds.), 1996. International seminar on partial evaluation, Dagstuhl castle, Elsevier Science Publishers B.V. (North-Holland), Amsterdam. Lecture Notes in Computer Science 1110.
Despeyroux, J. 1986. Proof of translation in natural semantics. In Proceedings of the Symposium on Logic in Computer Science, Cambridge, USA.
Dubois, N. and Sayarath, P. 1996. Aide ` a la compr´ ehension et ` a la maintenance: Pointeurs pour la sp´ ecialisation de programmes. Master's Thesis. IIE-CNAM, in French.
Emami, M., Ghiya, R., and Hendren, L.J. 1994. Context-sensitive interprocedural points-to analysis in the presence of function pointers. In Proc. of the Programming Languages Design and Implementation Conf., pp. 242–256. ACM SIGPLAN.
Field, J., Ramalingam, G., and Tip, F. 1995. Parametric program slicing. In Proc. of Principles of Programming Languages Conf., San Francisco, USA, pp. 379–392.
Hannan, J. 1993. Extended natural semantics. Journal of Functional Programming, 3(2):123–152.
Hasti, R. and Horwitz, S. 1998. Using static single assignment form to improve flow-insensitive pointer analysis. In Proc. of the Programming Languages Design and Implementation Conf., Montreal, pp. 97–105. ACM SIGPLAN.
INRIA, 1994. Centaur 1.2 documentation.
Jones, C.B. 1990. Systematic Development Using VDM. Prentice-Hall, Englewood Cliff.
Jones, N.D., Gomard, C.K., and Sestoft, P. 1993. Partial Evaluation and Automatic Program Generation. Prentice-Hall, Englewood Cliff.
Kahn, G. 1987. Natural semantics. In Proc. of the Symp. on Theoretical Aspects of Comp. Science, Elsevier Science Publishers B.V. (North-Holland), Amsterdam, Lecture Notes in Computer Science 247, pp. 237–257.
Landi, W. and Ryder, B.G. 1992. A safe approximate algorithm for interprocedural pointer aliasing. In Proc. of the Programming Languages Design and Implementation Conf., pp. 235–248. ACM SIGPLAN.
Liang, D. and Harrold, M.J. 1999. Efficient points-to analysis for whole-program analysis. In Proc. of ESEC/FSE Joint Conf., Toulouse, France, Lecture Notes in Computer Science 1687, pp. 199–215. ACM SIGSOFT.
Marlet, R., Thibault, S., and Consel, C. 1997. Mapping software architectures to efficient implementation via partial evaluation. In Proceedings of the Automated Software Engineering Conference, pp. 183–192. IEEE.
Muchnick, S.S. 1997. Advanced Compiler-Design and Implementation. Morgan Kaufmann. Los Altos.
Nielson, H.R. and Nielson, F. 1992. Semantics with Application—A Formal Introduction. John Wiley and Sons, New York.
Sagiv, M., Reps, T., and Wilhelm, R. 1997. Solving shape-analysis problems in languages with destructive updating. In Proc. of Principles of Programming Languages Conf.
Sellink, M.P.A. and Verhoef, C. 2000. Scaffolding for software renovation. In Proc. of the Conf. on Soft. Maintenance,Z¨ urich. IEEE.
Steensgaard, B. 1996. Points-to analysis in almost linear time. In Proc. of Principles of Programming Languages Conf., pp. 32–41.
van den Brand, M.G.J., Klint, P., and Verhoef, C. 1996. Reverse engineering and system renovation: an annotated bibliography. Technical Report P9603, University of Amsterdam, Programming Research Group.
Vassallo, R. 1996. Ergonomie et ´ evolution d'un outil de compr´ ehension de programmes. Master's thesis. IIE-CNAM, in French.
Wilson, R.P. and Lam, M.S. 1995. Efficient context-sensitive pointer analysis for c programs. In Proc. of the Programming Languages Design and Implementation Conf., pp. 1–12. ACM SIGPLAN.
Yank, H., Luker, P., and Chu, W. 1997. Code understanding through program transformation for reusable component identification. In Fifth Workshop on Program Comprehension Proceedings. IEEE.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Blazy, S. Specifying and Automatically Generating a Specialization Tool for Fortran 90. Automated Software Engineering 7, 345–376 (2000). https://doi.org/10.1023/A:1026594220718
Issue Date:
DOI: https://doi.org/10.1023/A:1026594220718