Skip to main content
Log in

Termination of narrowing via termination of rewriting

  • Published:
Applicable Algebra in Engineering, Communication and Computing Aims and scope

Abstract

Narrowing extends rewriting with logic capabilities by allowing logic variables in terms and by replacing matching with unification. Narrowing has been widely used in different contexts, ranging from theorem proving (e.g., protocol verification) to language design (e.g., it forms the basis of functional logic languages). Surprisingly, the termination of narrowing has been mostly overlooked. In this work, we present a novel approach for analyzing the termination of narrowing in left-linear constructor systems—a widely accepted class of systems—that allows us to reuse existing methods in the literature on termination of rewriting.

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.

Institutional subscriptions

Similar content being viewed by others

References

  1. Albert E., Vidal G.: The narrowing-driven approach to functional logic program specialization. New Generation Comput. 20(1), 3–26 (2002)

    Article  MATH  MathSciNet  Google Scholar 

  2. Alpuente, M., Escobar, S., Iborra, J.: Termination of narrowing using dependency pairs. In: de la Banda M.G., Pontelli E. (eds.) Proceedings of the 24th International Conference on Logic Programming (ICLP 2008), LNCS 5366, pp. 317–331. Springer, Berlin (2008)

  3. Alpuente, M., Falaschi, M., Ramis, M.J., Vidal, G.: Narrowing approximations as an optimization for equational logic programs. In: Proceedings of the 5th International Symposium on Programming Language Implementation and Logic Programming (PLILP’93), LNCS 714, pp. 391–409. Springer, Berlin (1993)

  4. Alpuente M., Hanus M., Lucas S., Vidal G.: Specialization of functional logic programs based on needed narrowing. Theory Pract. Logic Program. 5(3), 273–303 (2005)

    Article  MATH  MathSciNet  Google Scholar 

  5. Antoy, S.: Definitional trees. In: Proceedings of the 3rd International Conference on Algebraic and Logic Programming (ALP’92), LNCS 632, pp. 143–157. Springer, Berlin (1992)

  6. Antoy, S.: Optimal non-deterministic functional logic computations. In: Proceedings of the International Conference on Algebraic and Logic Programming (ALP’97), LNCS 1298, pp. 16–30. Springer, Berlin (1997)

  7. Antoy, S., Ariola, Z.: Narrowing the narrowing space. In: Proceedings of the 9th International Symposium on Programming Languages: Implementations, Logics, and Programs (PLILP’97), LNCS 1292, pp. 1–15. Springer, Berlin (1997)

  8. Antoy S., Echahed R., Hanus M.: A needed narrowing strategy. J. ACM 47(4), 776–822 (2000)

    Article  MathSciNet  Google Scholar 

  9. Antoy, S., Hanus, M.: Overlapping rules and logic variables in functional logic programs. In: Proceedings of the 22nd International Conference on Logic Programming (ICLP’06), LNCS 4079, pp. 87–101. Springer, Berlin (2006)

  10. Arroyo, G., Ramos, J.G., Silva, J., Vidal, G.: Improving offline narrowing-driven partial evaluation using size-change graphs. In: Logic-Based Program Synthesis and Transformation, Revised and Selected Papers from LOPSTR’06, LNCS 4407, pp. 60–76. Springer, Berlin (2007)

  11. Arts T., Giesl J.: Termination of term rewriting using dependency pairs. Theor. Comput. Sci. 236(1-2), 133–178 (2000)

    Article  MATH  MathSciNet  Google Scholar 

  12. Arts, T., Zantema, H.: Termination of logic programs using semantic unification. In: Proceedings of the 5th International Workshop on Logic Programming Synthesis and Transformation (LOPSTR’95), LNCS 1048, pp. 219–233. Springer, Berlin (1996)

  13. Baader F., Nipkow T.: Term Rewriting and All That. Cambridge University Press, Cambridge, MA (1998)

    Google Scholar 

  14. Baader, F., Snyder, W.: Unification theory. In: Handbook of Automated Reasoning, pp. 445–532. Elsevier and MIT Press (2001)

  15. Bert, D., Echahed, R.: Design and implementation of a generic, logic and functional programming language. In: Proceedings of the 1st European Symposium on Programming (ESOP’86), LNCS 213, pp. 119–132. Springer, Berlin (1986)

  16. Chabin, J., Réty, P.: Narrowing directed by a graph of terms. In: Proceedings of the 4th International Conference on Rewriting Techniques and Applications (RTA’91), LNCS 488, pp. 112–123. Springer, Berlin (1991)

  17. Christian, J.: Some termination criteria for narrowing and e-narrowing. In: Proceedings of the 11th International Conference on Automated Deduction (CADE-11), LNCS 607, pp. 582–588. Springer, Berlin (1992)

  18. Codish M., Taboch C.: A semantic basis for the termination analysis of logic programs. J. Logic Program. 41(1), 103–123 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  19. Comon-Lundh, H., Delaune, S.: The finite variant property: how to get rid of some algebraic properties. In: Proceedings of the 16th International Conference on Term Rewriting and Applications (RTA’05), LNCS 3467, pp. 294–307. Springer, Berlin (2005)

  20. Darlington, J., Guo, Y.: Narrowing and unification in functional programming: an evaluation mechanism for absolute set abstraction. In: Proceedings of the 3rd International Conference on Rewriting Techniques and Applications (RTA’89), LNCS 355, pp. 92–108. Springer, Berlin (1989)

  21. de Dios-Castro, J., López-Fraguas, F.: Extra variables can be eliminated from functional logic programs. In: Proceedings of the 6th Spanish Conference on Programming and Languages (PROLE’06), ENTCS 188, pp. 3–19. (2007)

  22. De Schreye D., Decorte S.: Termination of logic programs: the never-ending story. J. Logic Program. 19(20), 199–260 (1994)

    Article  MathSciNet  Google Scholar 

  23. Debray S., Warren D.S.: Automatic mode inference for logic programs. J. Logic Program. 5, 207–230 (1988)

    Article  MATH  MathSciNet  Google Scholar 

  24. Dershowitz N.: Termination of rewriting. J. Symb. Comput. 3(1&2), 69–115 (1987)

    Article  MATH  MathSciNet  Google Scholar 

  25. Dershowitz, N.: Goal solving as operational semantics. In: Proceedings of ILPS’95, pp. 3–17. The MIT Press, Cambridge, MA (1995)

  26. Dershowitz, N., Sivakumar, G.: Goal-directed equation solving. In: Proceedings of 7th National Conference on Artificial Intelligence, pp. 166–170. Morgan Kaufmann (1988)

  27. Hanus, M. (ed.): Curry: an Integrated Functional Logic Language. Available at: http://www.informatik.uni-kiel.de/~mh/curry/

  28. Endrullis J., Waldmann J., Zantema H.: Matrix interpretations for proving termination of term rewriting. J. Autom. Reason. 40(2-3), 195–220 (2008)

    Article  MATH  MathSciNet  Google Scholar 

  29. Escobar S., Meadows C., Meseguer J.: A rewriting-based inference system for the NRL protocol analyzer and its meta-logical properties. Theor. Comput. Sci. 367(1-2), 162–202 (2006)

    Article  MATH  MathSciNet  Google Scholar 

  30. Escobar, S., Meseguer, J.: Symbolic model checking of infinite-state systems using narrowing. In: Proceedings of 18th International Conference on Rewriting Techniques and Applications (RTA’07), LNCS 4533, pp. 153–168. Springer, Berlin (2007)

  31. Fribourg, L.: SLOG: a logic programming language interpreter based on clausal superposition and rewriting. In: Proceedings of the Symposium on Logic Programming (SLP’85), pp. 172–185. IEEE Press (1985)

  32. Giesl, J., Schneider-Kamp, P., Thiemann, R.: AProVE 1.2: automatic termination proofs in the dependency pair framework. In: Proceedings of the International Joint Conference on Automated Reasoning (IJCAR’06), LNCS 4130, pp. 281–286. Springer, Berlin (2006)

  33. Giesl J., Swiderski S., Schneider-Kamp P., Thiemann R.: Automated termination analysis for haskell: from term rewriting to programming languages. In: Pfenning, F. (eds) Proceedings of the 17th International Conference on Term Rewriting and Applications (RTA 2006), LNCS 4098, pp. 297–312. Springer, Berlin (2006)

    Chapter  Google Scholar 

  34. Giesl, J., Thiemann, R., Schneider-Kamp, P.: The dependency pair framework: combining techniques for automated termination proofs. In: Proceedings of the 11th International Conference on Logic for Programming, Artificial Intelligence, and Reasoning (LPAR’04), LNCS 3452, pp. 301–331. Springer, Berlin (2005)

  35. Giesl J., Thiemann R., Schneider-Kamp P., Falke S.: Mechanizing and improving dependency pairs. J. Autom. Reason. 37(3), 155–203 (2006)

    Article  MATH  MathSciNet  Google Scholar 

  36. Hanus, M.: Compiling logic programs with equality. In: Proceedings of the 2nd International Workshop on Programming Language Implementation and Logic Programming (PLILP’90), LNCS 456, pp. 387–401. Springer, Berlin (1990)

  37. Hanus M.: The integration of functions into logic programming: from theory to practice. J. Logic Program. 19–20, 583–628 (1994)

    Article  MathSciNet  Google Scholar 

  38. Hanus, M.: Multi-paradigm declarative languages. In: Proceedings of the International Conference on Logic Programming (ICLP 2007), LNCS 4670, pp. 45–75. Springer, Berlin (2007)

  39. Hölldobler S.: Foundations of Equational Logic Programming, LNAI 353. Springer, Berlin (1989)

    Book  Google Scholar 

  40. Huet, G., Lévy, J.J.: Computations in orthogonal rewriting systems, Part I + II. In: Lassez, J.L., Plotkin, G.D. (eds.) Computational Logic—Essays in Honor of Alan Robinson. pp. 395–443 (1992)

  41. Hullot, J.M.: Canonical forms and unification. In: Proceedings of the 5th International Conference on Automated Deduction, LNCS 87, pp. 318–334. Springer, Berlin (1980)

  42. Iborra J., Nishida, N., Vidal, G.: Goal-directed and relative dependency pairs for proving the termination of narrowing. In: De Schreye D. (ed.) Proceedings of the 19th International Symposium on Logic-based Program Synthesis and Transformation (LOPSTR 2009). Springer, Berlin, LNCS (to appear) (2010)

  43. Jacquemard, F., Rusinowitch, M., Vigneron, L.: Compiling and verifying security protocols. In: Proceedings of the 7th International Conference on Logic for Programming and Automated Reasoning (LPAR’00), LNAI 1955, pp. 131–160. Springer, Berlin (2000)

  44. Jones N.D., Gomard C.K., Sestoft P.: Partial Evaluation and Automatic Program Generation. Prentice-Hall, Englewood Cliffs, NJ (1993)

    MATH  Google Scholar 

  45. Klop J.W.: Term rewriting systems: a tutorial. Bull. Eur. Assoc. Theor. Comput. Sci. 32, 143–183 (1987)

    MATH  Google Scholar 

  46. Koprowski A.: TPA: Termination proved automatically. In: Pfenning, F. (eds) Proceedings of the 17th International Conference on Term Rewriting and Applications (RTA 2006), LNCS 4098, pp. 257–266. Springer, Berlin (2006)

    Chapter  Google Scholar 

  47. Kusakari, K., Nakamura, M., Toyama, Y.: Argument filtering transformation. In: Proceedings of the International Conference on Principles and Practice of Declarative Programming (PPDP’99), LNCS 1702, pp. 48–62. Springer, Berlin (1999)

  48. Lindenstrauss N., Sagiv Y., Serebrenik A.: Proving termination for logic programs by the query-mapping pairs approach. In: Bruynooghe, M., Lau, K.-K. (eds) Program Development in Computational Logic, LNCS 3049, pp. 453–498. Springer, Berlin (2004)

    Google Scholar 

  49. Lloyd J.W.: Foundations of Logic Programming. 2nd edn. Springer, Berlin (1987)

    MATH  Google Scholar 

  50. López-Fraguas, F., Sánchez-Hernández, J.: TOY: a multiparadigm declarative system. In: Proceedings of the 10th International Conference on Rewriting Techniques and Applications (RTA’99), LNCS 1631, pp. 244–247. Springer, Berlin (1999)

  51. Martelli A., Montanari U.: An efficient unification algorithm. ACM Trans. Program. Lang. Syst. 4, 258–282 (1982)

    Article  MATH  Google Scholar 

  52. Meseguer J., Thati P.: Symbolic reachability analysis using narrowing and its application to verification of cryptographic protocols. Electron. Notes Theor. Comput. Sci. 117, 153–182 (2005)

    Article  Google Scholar 

  53. Middeldorp A., Hamoen E.: Completeness results for basic narrowing. Appl. Algebra Eng. Commun. Comput. 5, 213–253 (1994)

    Article  MATH  MathSciNet  Google Scholar 

  54. Moreno-Navarro, J.J., Kuchen, H., Loogen, R., Rodriguez-Artalejo, M.: Lazy narrowing in a graph machine. In: Proceedings of the 2nd International Conference on Algebraic and Logic Programming (ALP’90), LNCS 463, pp. 298–317. Springer, Berlin (1990)

  55. Moreno-Navarro J.J., Rodríguez-Artalejo M.: Logic programming with functions and predicates: the language babel. J. Logic Program. 12(3), 191–224 (1992)

    Article  MATH  Google Scholar 

  56. Nishida, N., Miura, K.: Dependency graph method for proving termination of narrowing. In: Proceedings of the 8th International Workshop on Termination (WST’06), pp. 12–16. (2006)

  57. Nishida, N., Sakai, M., Sakabe, T.: Narrowing-based simulation of term rewriting systems with extra variables, ENTCS 86(3). (2003)

  58. Ramos, J.G., Silva, J., Vidal, G.: Fast narrowing-driven partial evaluation for inductively sequential systems. In: Proceedings of the 10th ACM SIGPLAN International Conference on Functional Programming (ICFP’05), pp. 228–239. ACM Press (2005)

  59. Reddy, U.S.: Narrowing as the operational semantics of functional languages. In: Proceedings of the Symposium on Logic Programming (SLP’85) pp. 138–151. IEEE Press (1985)

  60. Schneider-Kamp P., Giesl J., Serebrenik A., Thiemann R.: Automated termination proofs for logic programs by term rewriting. ACM Trans. Program. Lang. 11(1), 1–52 (2009)

    Google Scholar 

  61. Sheard, T.: Type-level computation using narrowing in Ωmega. In: Proceedings of the Workshop on Programming Languages meets Program Verification (PLPV’06), ENTCS 174, pp. 105–128. (2007)

  62. Slagle J.R.: Automated theorem-proving for theories with simplifiers, commutativity and associativity. J. ACM 21(4), 622–642 (1974)

    Article  MATH  MathSciNet  Google Scholar 

  63. Steinbach J.: Simplification orderings: histrory of results. Fundam. Inf. 24(1/2), 47–87 (1995)

    MATH  MathSciNet  Google Scholar 

  64. Verbaeten S., Sagonas K., De Schreye D.: Termination proofs for logic programs with tabling. ACM Trans. Comput. Logic 2(1), 57–92 (2001)

    Article  MathSciNet  Google Scholar 

  65. Vidal G.: Termination of narrowing in left-linear constructor systems. In: Garrigue, J., Hermenegildo, M. (eds) Proceedings of the 9th International Symposium on Functional and Logic Languages (FLOPS 2008), LNCS 4989, pp. 113–129. Springer, Berlin (2008)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Germán Vidal.

Additional information

A preliminary short version of this paper appeared in the Proceedings of FLOPS 2008 [65].

This work has been partially supported by the Spanish Ministerio de Ciencia e Innovación under grant TIN2008-06622-C03-02, by Generalitat Valenciana under grant ACOMP/2009/017, and by UPV (programs PAID-05-08 and PAID-06-08).

Rights and permissions

Reprints and permissions

About this article

Cite this article

Nishida, N., Vidal, G. Termination of narrowing via termination of rewriting. AAECC 21, 177–225 (2010). https://doi.org/10.1007/s00200-010-0122-4

Download citation

  • Received:

  • Revised:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00200-010-0122-4

Keywords

Mathematics Subject Classification (2000)

Navigation