Advertisement

Termination of narrowing via termination of rewriting

  • Naoki Nishida
  • Germán Vidal
Article

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.

Keywords

Narrowing Term rewriting Termination 

Mathematics Subject Classification (2000)

68N17 68Q42 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Albert E., Vidal G.: The narrowing-driven approach to functional logic program specialization. New Generation Comput. 20(1), 3–26 (2002)zbMATHCrossRefMathSciNetGoogle Scholar
  2. 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)Google Scholar
  3. 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)Google Scholar
  4. 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)zbMATHCrossRefMathSciNetGoogle Scholar
  5. 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)Google Scholar
  6. 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)Google Scholar
  7. 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)Google Scholar
  8. 8.
    Antoy S., Echahed R., Hanus M.: A needed narrowing strategy. J. ACM 47(4), 776–822 (2000)CrossRefMathSciNetGoogle Scholar
  9. 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)Google Scholar
  10. 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)Google Scholar
  11. 11.
    Arts T., Giesl J.: Termination of term rewriting using dependency pairs. Theor. Comput. Sci. 236(1-2), 133–178 (2000)zbMATHCrossRefMathSciNetGoogle Scholar
  12. 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)Google Scholar
  13. 13.
    Baader F., Nipkow T.: Term Rewriting and All That. Cambridge University Press, Cambridge, MA (1998)Google Scholar
  14. 14.
    Baader, F., Snyder, W.: Unification theory. In: Handbook of Automated Reasoning, pp. 445–532. Elsevier and MIT Press (2001)Google Scholar
  15. 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)Google Scholar
  16. 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)Google Scholar
  17. 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)Google Scholar
  18. 18.
    Codish M., Taboch C.: A semantic basis for the termination analysis of logic programs. J. Logic Program. 41(1), 103–123 (1999)zbMATHCrossRefMathSciNetGoogle Scholar
  19. 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)Google Scholar
  20. 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)Google Scholar
  21. 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)Google Scholar
  22. 22.
    De Schreye D., Decorte S.: Termination of logic programs: the never-ending story. J. Logic Program. 19(20), 199–260 (1994)CrossRefMathSciNetGoogle Scholar
  23. 23.
    Debray S., Warren D.S.: Automatic mode inference for logic programs. J. Logic Program. 5, 207–230 (1988)zbMATHCrossRefMathSciNetGoogle Scholar
  24. 24.
    Dershowitz N.: Termination of rewriting. J. Symb. Comput. 3(1&2), 69–115 (1987)zbMATHCrossRefMathSciNetGoogle Scholar
  25. 25.
    Dershowitz, N.: Goal solving as operational semantics. In: Proceedings of ILPS’95, pp. 3–17. The MIT Press, Cambridge, MA (1995)Google Scholar
  26. 26.
    Dershowitz, N., Sivakumar, G.: Goal-directed equation solving. In: Proceedings of 7th National Conference on Artificial Intelligence, pp. 166–170. Morgan Kaufmann (1988)Google Scholar
  27. 27.
    Hanus, M. (ed.): Curry: an Integrated Functional Logic Language. Available at: http://www.informatik.uni-kiel.de/~mh/curry/
  28. 28.
    Endrullis J., Waldmann J., Zantema H.: Matrix interpretations for proving termination of term rewriting. J. Autom. Reason. 40(2-3), 195–220 (2008)zbMATHCrossRefMathSciNetGoogle Scholar
  29. 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)zbMATHCrossRefMathSciNetGoogle Scholar
  30. 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)Google Scholar
  31. 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)Google Scholar
  32. 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)Google Scholar
  33. 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)CrossRefGoogle Scholar
  34. 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)Google Scholar
  35. 35.
    Giesl J., Thiemann R., Schneider-Kamp P., Falke S.: Mechanizing and improving dependency pairs. J. Autom. Reason. 37(3), 155–203 (2006)zbMATHCrossRefMathSciNetGoogle Scholar
  36. 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)Google Scholar
  37. 37.
    Hanus M.: The integration of functions into logic programming: from theory to practice. J. Logic Program. 19–20, 583–628 (1994)CrossRefMathSciNetGoogle Scholar
  38. 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)Google Scholar
  39. 39.
    Hölldobler S.: Foundations of Equational Logic Programming, LNAI 353. Springer, Berlin (1989)CrossRefGoogle Scholar
  40. 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)Google Scholar
  41. 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)Google Scholar
  42. 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)Google Scholar
  43. 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)Google Scholar
  44. 44.
    Jones N.D., Gomard C.K., Sestoft P.: Partial Evaluation and Automatic Program Generation. Prentice-Hall, Englewood Cliffs, NJ (1993)zbMATHGoogle Scholar
  45. 45.
    Klop J.W.: Term rewriting systems: a tutorial. Bull. Eur. Assoc. Theor. Comput. Sci. 32, 143–183 (1987)zbMATHGoogle Scholar
  46. 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)CrossRefGoogle Scholar
  47. 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)Google Scholar
  48. 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. 49.
    Lloyd J.W.: Foundations of Logic Programming. 2nd edn. Springer, Berlin (1987)zbMATHGoogle Scholar
  50. 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)Google Scholar
  51. 51.
    Martelli A., Montanari U.: An efficient unification algorithm. ACM Trans. Program. Lang. Syst. 4, 258–282 (1982)zbMATHCrossRefGoogle Scholar
  52. 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)CrossRefGoogle Scholar
  53. 53.
    Middeldorp A., Hamoen E.: Completeness results for basic narrowing. Appl. Algebra Eng. Commun. Comput. 5, 213–253 (1994)zbMATHCrossRefMathSciNetGoogle Scholar
  54. 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)Google Scholar
  55. 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)zbMATHCrossRefGoogle Scholar
  56. 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)Google Scholar
  57. 57.
    Nishida, N., Sakai, M., Sakabe, T.: Narrowing-based simulation of term rewriting systems with extra variables, ENTCS 86(3). (2003)Google Scholar
  58. 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)Google Scholar
  59. 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)Google Scholar
  60. 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. 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)Google Scholar
  62. 62.
    Slagle J.R.: Automated theorem-proving for theories with simplifiers, commutativity and associativity. J. ACM 21(4), 622–642 (1974)zbMATHCrossRefMathSciNetGoogle Scholar
  63. 63.
    Steinbach J.: Simplification orderings: histrory of results. Fundam. Inf. 24(1/2), 47–87 (1995)zbMATHMathSciNetGoogle Scholar
  64. 64.
    Verbaeten S., Sagonas K., De Schreye D.: Termination proofs for logic programs with tabling. ACM Trans. Comput. Logic 2(1), 57–92 (2001)CrossRefMathSciNetGoogle Scholar
  65. 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

Copyright information

© Springer-Verlag 2010

Authors and Affiliations

  1. 1.Graduate School of Information ScienceNagoya UniversityNagoyaJapan
  2. 2.MiST, DSIC, Universidad Politécnica de ValenciaValenciaSpain

Personalised recommendations