Skip to main content
Log in

Proving termination of GHC programs

  • Regular Papers
  • Published:
New Generation Computing Aims and scope Submit manuscript

Abstract

A transformational approach for proving termination of parallel logic programs such as GHC programs is proposed. A transformation from GHC programs to term rewriting systems is developed; it exploits the fact that unifications in GHC-resolution correspond to matchings. The termination of a GHC program for a class of queries is implied by the termination of the resulting rewrite system. This approach facilitates the applicability of a wide range of termination techniques developed for rewrite systems in proving termination of GHC programs. The method consists of three steps: (a) deriving moding information from a given GHC program, (b) transforming the GHC program into a term rewriting system using the moding information, and finally (c) proving termination of the resulting rewrite system. Using this method, the termination of many benchmark GHC programs such as quick-sort, merge-sort, merge, split, fair-split and append, etc., can be proved.

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

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

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

Instant access to the full article PDF.

Similar content being viewed by others

Explore related subjects

Discover the latest articles, news and stories from top researchers in related subjects.

References

  1. Dauchet, M., “Simulation of Turing Machines by a Left-Linear Rewrite Rule,”Proc. of RTA’89, Lecture Notes in Computer Science, 355, Springer-Verlag, pp. 109–120, 1989.

  2. De Schreye, D. and Decorte, S., “Termination of Logic Programs: The Never-Ending Story,”J. Logic Programming, 19/20, pp. 199–260, 1993.

    Google Scholar 

  3. Dershowitz, N., “Orderings for Term-Rewriting Systems,”TCS, 17, pp. 279–301, 1982.

    Article  MATH  MathSciNet  Google Scholar 

  4. Dershowitz, N., “Termination of Rewriting,”J. Symb. Comp., 3, pp. 69–116, 1987.

    Article  MATH  MathSciNet  Google Scholar 

  5. Furukawa, K., Okumura, A., and Murakami, M., “Unfolding Rules for GHC Programs,”New Generation Computing, 6, pp. 143–157, 1988.

    Article  MATH  Google Scholar 

  6. Harel, D. and Pnueli, A., “On the Development of Reactive Systems,” inLogics and Models of Concurrent Systems (K. R. Apt, ed.), Springer-Verlag, 1985.

  7. Kamin, S. and Levi, J.-J., “Two Generalizations of Recursive Path Ordering,”unpublished note, Department of Computer Science, University of Illinois, Urbana, 1980.

    Google Scholar 

  8. Kapur, D. and Zhang, H., “An Overview of Rewrite Rule Laboratory (RRL),”Proc. of RTA’89, Lecture Notes in Computer Science, 355, Springer-Verlag, pp. 559–563, 1989.

  9. Kleinman, A., Moscowitz, Y., Pnueli, A., and Shapiro, E., “Communication with Directed Logic Variables,”Proc. 18th ACM Symposium on Principles of Programming Languages, POPL’91, pp. 221–232, 1991.

  10. Krishna Rao, M. R. K., Kapur, D., and Shyamasundar, R. K., “A Transformational Methodology for Proving Termination of Logic Programs,”Proc. of Computer Science Logic, CSL’91, Lecture Notes in Computer Scienc, 626, Springer-Verlag, pp. 213–226, 1991. Revised version to appear in J. Logic Programming, 1997.

  11. Krishna Rao, M. R. K., Pandya, P. K., and Shyamasundar, R. K., “Verification Tools in the Development of Provably Correct Compilers,”Proc. of 5th Symposium on Formal Methods Europe, FME’93, Lecture Notes in Computer Science, 670, Springer-Verlag, pp. 442–461, 1993.

  12. Krishna Rao, M. R. K., Kapur, D., and Shyamasundar, R. K., “Proving Termination of GHC Programs,”Proc. of 10th International Conference on Logic Programming, ICLP’93, pp. 720–736, 1993.

  13. Lescanne, P., “Computer Experiments with the REVE Term Rewriting Systems Generator,”Proc. of 10th ACM POPL’83, pp. 99–108, 1983.

  14. Lescanne, P., “Termination of Rewriting Systems by Elementary Interpretations,”Proc. of Algebraic and Logic Programming, ALP’92, Lecture Notes in Computer Science, 632, Springer-Verlag, pp. 21–36, 1992.

  15. Massey, B. and Tick, E., “Sequentialization of Parallel Logic Programs with Mode Analysis,”Proc. of LPAR’93, Lecture Notes in Computer Science, 698, Springer-Verlag, pp. 205–216, 1993.

  16. Tick, E. and Koshimura, “Static Analysis of Concurrent Logic Programs,”J. of Programming Language Design and Implementation, 1995.

  17. Plümer, L., “Termination Proofs for Logic Programs,”Ph.D. thesis, University of Dortmund. Also appears asLecture Notes in Computer Science, 446, Springer-Verlag, 1990.

  18. Plümer, L., “Automatic Termination Proofs for Prolog Programs Operating on Nonground Terms,”Proc. of International Logic Programming Symposiun, ILPS’91, pp. 503–517, 1991.

  19. Plümer, L., “Automatic Verification of Parallel Logic Programs: Termination” inLogic Programming: Formal Methods and Practical Applications (C. Beirle and L. Plümer, ed.), North-Holland, 1994. Preliminary version as “Automatic Verification of GHC-Programs: Termination,”Proc. of EGCS’92.

  20. Shapiro, E.,Concurrent Prolog, collected papers Volume 1 and 2, MIT Press, 1987.

  21. Shapiro, E., “The Family of Concurrent Logic Programming Languages,”ACM Computing Surveys, 21 pp. 413–510, 1989.

    Article  Google Scholar 

  22. Shyamasundar, R. K., Krishna Rao, M. R. K., and Kapur, D., “Rewriting Concepts in the Study of Termination of Logic Programs,”Proc. of ALPUK’92 Conference (K. Broda, ed.), Workshops in Computing Series, Springer-Verlag, pp. 3–20, 1990.

  23. Takeuchi, A. and Furukawa, K., “Parallel Logic Programming Languages,” inConcurrent Prolog (E. Shapiro, ed.), Chapter 6, pp. 188–201, 1987.

  24. Ueda, K., “Guarded Horn Clauses,”Proc. of Logic Programming’85, Lecture Notes in Computer Science, 221, Springer-Verlag, pp. 168–179, 1985. Also appears as chapter 4 in Ref. 20 Shapiro, E.,Concurrent Prolog, collected papers Volume 1 and 2, MIT Press, 1987).

  25. Ueda, K. and Furnkawa, K., “Transformation Rules for GHC programs,”Proc. of FGCS’88, pp. 582–591, 1988.

  26. Ueda, K., “Designing a Concurrent Programming Language,”Proc. of InfoJapan’90 (organized by the Information Processing Society of Japan), pp. 87–94, 1990.

  27. Ueda K. and Morita, M., “A New Implementation Technique for Flat GHC,”Proc. of International Conference Logic Programming, ICLP’90, pp. 3–17, 1990. Revised version appears as “Moded Flat GHC and Its Message-Oriented Implementation Technique,”New Generation Computing, 13, pp. 3–43.

  28. Ueda, K., “I/O Mode Analysis in Concurrent Logic Programming,”Proc. of TPPP’94, Lecture Notes in Computer Science, 907, Springer-Verlag, pp. 356–368, 1994.

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to M. R. K. Krishna Rao.

Additional information

This is a revised and extended version of Ref. 12). The work was partially supported by the NSF Indo-US grant INT-9416687

Kapur was partially supported by NSF Grant nos. CCR-8906678 and INT-9014074.

M. R. K. Krishna Rao, Ph.D.: He currently works as a senior research fellow at Griffith University, Brisbane, Australia. His current interests are in the areas of logic programming, modular aspects and noncopying implementations of term rewriting, learning logic programs from examples and conuterexamples and dynamics of mental states in rational agent architectures. He received his Ph.D in computer science from Tata Institute of Fundamental Research (TIFR), Bombay in 1993 and worked at TIFR and Max Planck Institut für Informatik, Saarbrücken until January 1997.

Deepak Kapur, Ph.D.: He currently works as a professor at the State University of New York at Albany. His research interests are in the areas of automated reasoning, term rewriting, constraint solving, algebraic and geometric reasoning and its applications in computer vision, symbolic computation, formal methods, specification and verification. He obtained his Ph.D. in Computer Science from MIT in 1980. He worked at General Electric Corporate Research and Development until 1987. Prof. Kapur is the editor-in-chief of the Journal of Automated Reasoning. He also serves on the editorial boards of Journal of Logic Programming, Journal on Constraints, and Journal of Applicable Algebra in Engineering, Communication and Computer Science.

R. K. Shyamasundar, Ph.D.: He currently works as a professor at Tata Institute of Fundamental Research (TIFR), Bombay. His current intersts are in the areas of logic programming, reactive and real time programming, constraint solving, formal methods, specification and verification. He received his Ph.D in computer science from Indian Institute of Science, Bangalore in 1975 and has been a faculty member at Tata Institute of Fundamental Research since then. He has been a visiting/regular faculty member at Technological University of Eindhoven, University of Utrecht, IBM TJ Watson Research Centre, Pennsylvania State University, University of Illinois at Urbana-Champaign, INRIA and ENSMP, France. He has served on (and chaired) Program Committees of many International Conferences and has been on the Editorial Committees.

About this article

Cite this article

Krishna Rao, M.R.K., Kapur, D. & Shyamasundar, R.K. Proving termination of GHC programs. New Gener Comput 15, 293–338 (1997). https://doi.org/10.1007/BF03037949

Download citation

  • Received:

  • Revised:

  • Issue Date:

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

Keywords

Navigation