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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Albert, E., Vidal, G.: The narrowing-driven approach to functional logic program specialization. New Generation Computing 20(1), 3–26 (2002)
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)
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)
Baader, F., Nipkow, T.: Term Rewriting and All That. Cambridge University Press (1998)
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)
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)
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)
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)
Bosco, P., Giovannetti, E., Moiso, C.: Narrowing vs. SLD-resolution. Theoretical Computer Science 59, 3–23 (1988)
Dershowitz, N.: Termination of rewriting. Journal of Symbolic Computation 3(1&2), 69–115 (1987)
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)
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)
Ganzinger, H.: Order-sorted completion: The many-sorted way. Theoretical Computer Science 89(1), 3–32 (1991)
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)
Glück, R., Kawabe, M.: A method for automatic program inversion based on LR(0) parsing. Fundamenta Informaticae 66(4), 367–395 (2005)
Hanus, M.: The integration of functions into logic programming: From theory to practice. Journal of Logic Programming 19&20, 583–628 (1994)
Harrison, P.G.: Function inversion. In: Proceedings of the International Workshop on Partial Evaluation and Mixed Computation, pp. 153–166. North-Holland, Amsterdam (1988)
Hölldobler, S.: Foundations of Equational Logic Programming. LNCS (LNAI), vol. 353. Springer, Heidelberg (1989)
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)
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)
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)
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)
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
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/
Middeldorp, A., Hamoen, E.: Completeness results for basic narrowing. Applicable Algebra in Engineering, Communication and Computing
Nishida, N., Sakai, M.: Completion after program inversion of injective functions. Electronic Notes in Theoretical Computer Science 237, 39–56 (2009)
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)
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)
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)
Nishida, N., Vidal, G.: Conversion to first-order tail recursion for improving program inversion (2012) (submitted for publication)
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
Ohlebusch, E.: Advanced topics in term rewriting. Springer, UK (2002)
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)
Plotkin, G.: Building-in equational theories. Machine Intelligence 7, 73–90 (1972)
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)
Slagle, J.R.: Automated theorem-proving for theories with simplifiers, commutativity and associativity. Journal of the ACM 21(4), 622–642 (1974)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)