Skip to main content

Computing More Specific Versions of Conditional Rewriting Systems

  • Conference paper
Logic-Based Program Synthesis and Transformation (LOPSTR 2012)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 7844))

Abstract

Rewrite systems obtained by some automated transformation often have a poor syntactic structure even if they have good properties from a semantic point of view. For instance, a rewrite system might have overlapping left-hand sides even if it can only produce at most one constructor normal form (i.e., value). In this paper, we propose a method for computing “more specific” versions of deterministic conditional rewrite systems (i.e., typical functional programs) by replacing a given rule (e.g., an overlapping rule) with a finite set of instances of this rule. In some cases, the technique is able to produce a non-overlapping system from an overlapping one. We have applied the transformation to improve the systems produced by a previous technique for function inversion with encouraging results (all the overlapping systems were successfully transformed to non-overlapping systems).

This work has been partially supported by the Spanish Ministerio de Economía y Competitividad (Secretaría de Estado de Investigación, Desarrollo e Innovación) under grant TIN2008-06622-C03-02, by the Generalitat Valenciana under grant PROMETEO/2011/052, and by MEXT KAKENHI #21700011.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 72.00
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

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

    Article  MathSciNet  MATH  Google Scholar 

  2. Almendros-Jiménez, J.M., Vidal, G.: Automatic partial inversion of inductively sequential functions. In: Horváth, Z., Zsók, V., Butterfield, A. (eds.) IFL 2006. LNCS, vol. 4449, pp. 253–270. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  3. Antoy, S., Hanus, M.: Overlapping rules and logic variables in functional logic programs. In: Etalle, S., Truszczyński, M. (eds.) ICLP 2006. LNCS, vol. 4079, pp. 87–101. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

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

    Google Scholar 

  5. Bertling, H., Ganzinger, H.: Completion-time optimization of rewrite-time goal solving. In: Dershowitz, N. (ed.) RTA 1989. LNCS, vol. 355, pp. 45–58. Springer, Heidelberg (1989)

    Chapter  Google Scholar 

  6. Bockmayr, A., Werner, A.: LSE narrowing for decreasing conditional term rewrite systems. In: Dershowitz, N., Lindenstrauss, N. (eds.) CTRS 1994. LNCS, vol. 968, pp. 51–70. Springer, Heidelberg (1995)

    Chapter  Google Scholar 

  7. Bondorf, A.: Towards a self-applicable partial evaluator for term rewriting systems. In: Bjørner, D., Ershov, A., Jones, N. (eds.) Proceedings of the International Workshop on Partial Evaluation and Mixed Computation, pp. 27–50. North-Holland, Amsterdam (1988)

    Google Scholar 

  8. Bondorf, A.: A self-applicable partial evaluator for term rewriting systems. In: Díaz, J., Orejas, F. (eds.) TAPSOFT 1989. LNCS, vol. 352, pp. 81–95. Springer, Heidelberg (1989)

    Google Scholar 

  9. Bosco, P., Giovannetti, E., Moiso, C.: Narrowing vs. SLD-resolution. Theoretical Computer Science 59, 3–23 (1988)

    Article  MathSciNet  MATH  Google Scholar 

  10. Dershowitz, N.: Termination of rewriting. Journal of Symbolic Computation 3(1&2), 69–115 (1987)

    Article  MathSciNet  MATH  Google Scholar 

  11. Dershowitz, N., Jouannaud, J.-P.: Rewrite systems. In: van Leeuwen, J. (ed.) Handbook of Theoretical Computer Science. Formal Models and Semantics, vol. B, pp. 243–320. Elsevier, Amsterdam (1990)

    Google Scholar 

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

    Google Scholar 

  13. Ganzinger, H.: Order-sorted completion: The many-sorted way. Theoretical Computer Science 89(1), 3–32 (1991)

    Article  MathSciNet  MATH  Google Scholar 

  14. Glück, R., Kawabe, M.: A program inverter for a functional language with equality and constructors. In: Ohori, A. (ed.) APLAS 2003. LNCS, vol. 2895, pp. 246–264. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  15. Glück, R., Kawabe, M.: A method for automatic program inversion based on LR(0) parsing. Fundamenta Informaticae 66(4), 367–395 (2005)

    MathSciNet  MATH  Google Scholar 

  16. Hanus, M.: The integration of functions into logic programming: From theory to practice. Journal of Logic Programming 19&20, 583–628 (1994)

    Google Scholar 

  17. Harrison, P.G.: Function inversion. In: Proceedings of the International Workshop on Partial Evaluation and Mixed Computation, pp. 153–166. North-Holland, Amsterdam (1988)

    Google Scholar 

  18. Hölldobler, S.: Foundations of Equational Logic Programming. LNCS (LNAI), vol. 353. Springer, Heidelberg (1989)

    Book  MATH  Google Scholar 

  19. Hullot, J.-M.: Canonical forms and unification. In: Bibel, W., Kowalski, R.A. (eds.) Automated Deduction. LNCS, vol. 87, pp. 318–334. Springer, Heidelberg (1980)

    Google Scholar 

  20. Kawabe, M., Futamura, Y.: Case studies with an automatic program inversion system. In: Proceedings of the 21st Conference of Japan Society for Software Science and Technology, 6C-3, 5 pages (2004)

    Google Scholar 

  21. Kawabe, M., Glück, R.: The program inverter LRinv and its structure. In: Hermenegildo, M.V., Cabeza, D. (eds.) PADL 2004. LNCS, vol. 3350, pp. 219–234. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  22. Khoshnevisan, H., Sephton, K.M.: InvX: An automatic function inverter. In: Dershowitz, N. (ed.) RTA 1989. LNCS, vol. 355, pp. 564–568. Springer, Heidelberg (1989)

    Chapter  Google Scholar 

  23. Marchiori, M.: On deterministic conditional rewriting. Technical Report MIT-LCS-TM-405, MIT Laboratory for Computer Science (1997), http://www.w3.org/People/Massimo/papers/MIT-LCS-TM-405.pdf

  24. Marriott, K., Naish, L., Lassez, J.-L.: Most specific logic programs. Annals of Mathematics and Artificial Intelligence 1, 303–338 (1990), http://www.springerlink.com/content/k3p11kl316m73764/

    Article  MATH  Google Scholar 

  25. Middeldorp, A., Hamoen, E.: Completeness results for basic narrowing. Applicable Algebra in Engineering, Communication and Computing

    Google Scholar 

  26. Nishida, N., Sakai, M.: Completion after program inversion of injective functions. Electronic Notes in Theoretical Computer Science 237, 39–56 (2009)

    Article  Google Scholar 

  27. Nishida, N., Sakai, M., Sakabe, T.: Generation of inverse computation programs of constructor term rewriting systems. IEICE Transactions on Information and Systems J88-D-I(8), 1171–1183 (2005) (in Japanese)

    Google Scholar 

  28. Nishida, N., Sakai, M., Sakabe, T.: Partial inversion of constructor term rewriting systems. In: Giesl, J. (ed.) RTA 2005. LNCS, vol. 3467, pp. 264–278. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  29. Nishida, N., Vidal, G.: Program inversion for tail recursive functions. In: Schmidt-Schauß, M. (ed.) Proceedings of the 22nd International Conference on Rewriting Techniques and Applications. Leibniz International Proceedings in Informatics, vol. 10, pp. 283–298. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2011)

    Google Scholar 

  30. Nishida, N., Vidal, G.: Conversion to first-order tail recursion for improving program inversion (2012) (submitted for publication)

    Google Scholar 

  31. Nishida, N., Vidal, G.: More specific term rewriting systems. In: The 21st International Workshop on Functional and (Constraint) Logic Programming, Nagoya, Japan (2012), Informal proceedings http://www.dsic.upv.es/~gvidal/german/wflp12/paper.pdf

  32. Ohlebusch, E.: Advanced topics in term rewriting. Springer, UK (2002)

    Book  MATH  Google Scholar 

  33. Pfenning, F.: Unification and anti-unification in the calculus of constructions. In: Proceedings of the Sixth Annual Symposium on Logic in Computer Science, pp. 74–85. IEEE Computer Society (1991)

    Google Scholar 

  34. Plotkin, G.: Building-in equational theories. Machine Intelligence 7, 73–90 (1972)

    MathSciNet  MATH  Google Scholar 

  35. Ramos, J.G., Silva, J., Vidal, G.: Fast Narrowing-Driven Partial Evaluation for Inductively Sequential Systems. In: Danvy, O., Pierce, B.C. (eds.) Proceedings of the 10th ACM SIGPLAN International Conference on Functional Programming, pp. 228–239. ACM Press (2005)

    Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Nishida, N., Vidal, G. (2013). Computing More Specific Versions of Conditional Rewriting Systems. In: Albert, E. (eds) Logic-Based Program Synthesis and Transformation. LOPSTR 2012. Lecture Notes in Computer Science, vol 7844. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-38197-3_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-38197-3_10

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-38196-6

  • Online ISBN: 978-3-642-38197-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics