Advertisement

A Fix-Point Characterization of Herbrand Equivalence of Expressions in Data Flow Frameworks

  • Jasine BabuEmail author
  • Karunakaran Murali Krishnan
  • Vineeth Paleri
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11600)

Abstract

Computing Herbrand equivalences of terms in data flow frameworks is well studied in program analysis. While algorithms use iterative fix-point computation on some abstract lattice of expressions relevant to the flow graph, the definition of Herbrand equivalences is based on an equivalence over all program paths formulation, on the (infinite) set of all expressions. The aim of this paper is to develop a lattice theoretic fix-point formulation of Herbrand equivalence on a concrete lattice defined over the set of all terms constructible from variables, constants and operators of a program. This new formulation makes explicit the underlying lattice framework as well as the monotone function involved in computing Herbrand equivalences. We introduce the notion of Herbrand congruence and define an (infinite) concrete lattice of Herbrand congruences. Herbrand equivalence is defined as the maximum fix-point of a composite transfer function defined over an appropriate product lattice of the above concrete lattice. We then re-formulate the traditional meet over all paths definition in our lattice theoretic framework. and prove that the maximum fix-point (MFP) and the meet-over-all-paths (MOP) formulations coincide as expected.

Keywords

Herbrand equivalence Data flow framework Fix-point 

References

  1. 1.
    Nielson, F., Nielson, H.R., Hankin, C.: Principles of Program Analysis, vol. 1. Springer, Heidelberg (1999).  https://doi.org/10.1007/978-3-662-03811-6CrossRefzbMATHGoogle Scholar
  2. 2.
    Aho, A.V., Lam, M.S., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, and Tools, vol. 2. Addison-Wesley Reading, Boston (2006)zbMATHGoogle Scholar
  3. 3.
    Kam, J.B., Ullman, J.D.: Monotone data flow analysis frameworks. Acta Informatica 7(3), 305–317 (1977)MathSciNetCrossRefGoogle Scholar
  4. 4.
    Rüthing, O., Knoop, J., Steffen, B.: Detecting equalities of variables: combining efficiency with precision. In: Cortesi, A., Filé, G. (eds.) SAS 1999. LNCS, vol. 1694, pp. 232–247. Springer, Heidelberg (1999).  https://doi.org/10.1007/3-540-48294-6_15CrossRefGoogle Scholar
  5. 5.
    Steffen, B., Knoop, J., Rüthing, O.: The value flow graph: a program representation for optimal program transformations. In: Jones, N. (ed.) ESOP 1990. LNCS, vol. 432, pp. 389–405. Springer, Heidelberg (1990).  https://doi.org/10.1007/3-540-52592-0_76CrossRefGoogle Scholar
  6. 6.
    Müller-Olm, M., Rüthing, O., Seidl, H.: Checking herbrand equalities and beyond. In: Cousot, R. (ed.) VMCAI 2005. LNCS, vol. 3385, pp. 79–96. Springer, Heidelberg (2005).  https://doi.org/10.1007/978-3-540-30579-8_6CrossRefzbMATHGoogle Scholar
  7. 7.
    Gulwani, S., Necula, G.C.: A polynomial-time algorithm for global value numbering. Sci. Comput. Program. 64(1), 97–114 (2007)MathSciNetCrossRefGoogle Scholar
  8. 8.
    Pai, R.R.: Detection of redundant expressions: a precise, efficient, and pragmatic algorithm in SSA. Comput. Lang. Syst. Struct. 46, 167–181 (2016)zbMATHGoogle Scholar
  9. 9.
    Kildall, G.A.: A unified approach to global program optimization. In: Proceedings of the 1st Annual ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, POPL 1973, pp. 194–206. ACM (1973)Google Scholar
  10. 10.
    Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: Proceedings of the 4th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, POPL 1977, pp. 238–252. ACM (1977)Google Scholar
  11. 11.
    Kam, J.B., Ullman, J.D.: Global data flow analysis and iterative algorithms. J. ACM 23(1), 158–171 (1976)MathSciNetCrossRefGoogle Scholar
  12. 12.
    Alpern, B., Wegman, M.N., Zadeck, F.K.: Detecting equality of variables in programs. In: Proceedings of the 15th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 1988, pp. 1–11. ACM (1988)Google Scholar
  13. 13.
    Rosen, B.K., Wegman, M.N., Zadeck, F.K.: Global value numbers and redundant computations. In: Proceedings of the 15th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 1988, pp. 12–27. ACM (1988)Google Scholar
  14. 14.
    Tarski, A.: A lattice-theoretical fixpoint theorem and its applications. Pacific J. Math. 5(2), 285–309 (1955)MathSciNetCrossRefGoogle Scholar
  15. 15.
    Cousot, P.: Asynchronous iterative methods for solving a fixed point system of monotone equations in a complete lattice. In: Research Report R.R. 88, Laboratoire IMAG, Université scientifique et médicale de Grenoble, Grenoble, France, 15 p., September 1977Google Scholar
  16. 16.
    Geser, A., Knoop, J., Lüttgen, G., Rüthing, O., Steffen, B.: Non-monotone fixpoint iterations to resolve second order effects. In: Gyimóthy, T. (ed.) CC 1996. LNCS, vol. 1060, pp. 106–118. Springer, Heidelberg (1996).  https://doi.org/10.1007/3-540-61053-7_56CrossRefGoogle Scholar
  17. 17.
    Babu, J., Krishnan, K.M., Paleri, V.: A fix-point characterization of herbrand equivalence of expressions in data flow frameworks. arXiv:1708.04976 (2017)

Copyright information

© Springer-Verlag GmbH Germany, part of Springer Nature 2019

Authors and Affiliations

  • Jasine Babu
    • 1
    Email author
  • Karunakaran Murali Krishnan
    • 2
  • Vineeth Paleri
    • 2
  1. 1.Indian Institute of Technology PalakkadPalakkadIndia
  2. 2.National Institute of Technology CalicutKozhikodeIndia

Personalised recommendations