Skip to main content

Compiling Collapsing Rules in Certain Constructor Systems

  • Conference paper
  • First Online:
Logic-Based Program Synthesis and Transformation (LOPSTR 2015)

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

  • 317 Accesses

Abstract

The implementation of functional logic languages by means of graph rewriting requires a special handling of collapsing rules. Recent advances about the notion of a needed step in some constructor systems offer a new approach to this problem. We present two results: a transformation of a certain class of constructor-based rewrite systems that eliminates collapsing rules, and a rewrite-like relation that takes advantage of the absence of collapsing rules. We formally state and prove the correctness of these results. When used together, these results simplify without any loss of efficiency an implementation of graph rewriting and consequently of functional logic computations.

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 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
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

Notes

  1. 1.

    The word “collapse” is overloaded in graph parlance. In this context, its refers to a relation on graphs defined in the cited reference.

References

  1. Alpuente, M., Falaschi, M., Vidal, G.: Partial evaluation of functional logic programs. ACM Trans. Program. Lang. Syst. 20(4), 768–844 (1998)

    Article  Google Scholar 

  2. Antoy, S.: Definitional trees. In: Kirchner, H., Levi, G. (eds.) ALP 1992. LNCS, vol. 632. Springer, Heidelberg (1992)

    Chapter  Google Scholar 

  3. Antoy, S.: Optimal non-deterministic functional logic computations. In: Hanus, M., Heering, J., Meinke, K. (eds.) ALP 1997 and HOA 1997. LNCS, vol. 1298. Springer, Heidelberg (1997). http://cs.pdx.edu/antoy/homepage/publications/alp97/full.pdf

    Chapter  Google Scholar 

  4. Antoy, S.: Evaluation strategies for functional logic programming. J. Symb. Comput. 40(1), 875–903 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  5. Antoy, S.: Programming with narrowing. J. Symb. Comput. 45(5), 501–522 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  6. Antoy, S., Hanus, M.: Functional logic programming. Comm. ACM 53(4), 74–85 (2010)

    Article  Google Scholar 

  7. Antoy, S., Jost, A.: Are needed redexes really needed? In: Proceedings of the 15th Symposium on Principles and Practice of Declarative Programming, PPDP 2013, pp. 61–71. ACM, New York (2013)

    Google Scholar 

  8. Antoy, S., Peters, A.: Compiling a functional logic language: The Basic Scheme. In: Schrijvers, T., Thiemann, P. (eds.) FLOPS 2012. LNCS, vol. 7294, pp. 17–31. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  9. Ariola, Z.M., Klop, J.W.: Equational term graph rewriting. Fundam. Inf. 26, 207–240 (1996)

    MathSciNet  MATH  Google Scholar 

  10. Ariola, Z.M., Klop, J.W., Plump, D.: Bisimilarity in term graph rewriting. Inf. Comput. 156(12), 2–24 (2000)

    Article  MathSciNet  MATH  Google Scholar 

  11. Barendregt, H.P., van Eekelen, M.C.J.D., Glauert, J.R.W., Kennaway, J.R., Plasmeijer, M.J., Sleep, M.R.: Term graph rewriting. In: de Bakker, J.W., Nijman, A.J., Treleaven, P.C. (eds.) PARLE Parallel Architectures and Languages Europe. Lecture Notes in Computer Science, vol. 259, pp. 141–158. Springer, Heidelberg (1987)

    Chapter  Google Scholar 

  12. Bezem, M., Klop, J.W., de Vrijer, R.: Term Rewriting Systems. Cambridge University Press, Cambridge (2003)

    MATH  Google Scholar 

  13. Clarke, T.J.W., Gladstone, P.J.S., MacLean, C.D., Norman, A.C.: Skim - the s, k, i reduction machine. In: Proceedings of the 1980 ACM Conference on LISP and Functional Programming, LFP 1980, pp. 128–135. ACM, New York (1980)

    Google Scholar 

  14. Echahed, R.: Inductively sequential term-graph rewrite systems. In: Ehrig, H., Heckel, R., Rozenberg, G., Taentzer, G. (eds.) ICGT 2008. LNCS, vol. 5214. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  15. Echahed, R., Janodet, J.C.: On constructor-based graph rewriting systems. Technical Report 985-I, IMAG (1997). ftp://ftp.imag.fr/pub/labo-LEIBNIZ/OLD-archives/PMP/c-graph-rewriting.ps.gz

  16. Fokkink, W., van de Pol, J.: Simulation as a correct transformation of rewrite systems. In: Privara, I., Ružicka, P. (eds.) MFCS 1997. LNCS, vol. 1295. Springer, Heidelberg (1997)

    Chapter  Google Scholar 

  17. Glauert, J.R.W., Kennaway, R., Papadopoulos, G.A., Sleep, M.R.: Dactl: an experimental graph rewriting language. J. Prog. Lang. 5(1), 85–108 (1997)

    Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

  19. Hanus, M.: Functional logic programming: from theory to curry. In: Voronkov, A., Weidenbach, C. (eds.) Programming Logics. LNCS, vol. 7797, pp. 123–168. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  20. Hanus, M.: PAKCS 1.11.4: The Portland Aachen Kiel Curry System (2014). http://www.informatik.uni-kiel.de/pakcs

  21. Huet, G., Lévy, J.-J.: Computations in orthogonal term rewriting systems, I. In: Lassez, J.-L., Plotkin, G. (eds.) Computational logic.: Essays Honour Alan Robinson, pp. 395–414. MIT Press, Cambridge (1991)

    Google Scholar 

  22. Kamperman, J.F.T., Walters, H.R.: Simulating TRSs by minimal TRSs a simple, efficient, and correct compilation technique. Technical report CS-R9605, CWI (1996)

    Google Scholar 

  23. Kennaway, J.R., Klop, J.K., Sleep, M.R., de Vries, F.J.: The adequacy of term graph rewriting for simulating term rewriting. In: Sleep, M.R., Plasmeijer, M.J., van Eekelen, M.C.J.D. (eds.) Term Graph Rewriting Theory and Practice, pp. 157–169. J. Wiley & Sons, Chichester (1993)

    Google Scholar 

  24. Landin, P.J.: The mechanical evaluation of expressions. Comput. J. 6(4), 308–320 (1964)

    Article  MATH  Google Scholar 

  25. Plump, D.: Term graph rewriting. In: Kreowski, H.-J., Ehrig, H., Engels, G., Rozenberg, G., (eds.) Handbook of Graph Grammars, vol. 2, pp. 3–61. World Scientific (1999)

    Google Scholar 

  26. Plump, D.: Essentials of term graph rewriting. Electr. Notes Theor. Comput. Sci. 51, 277–289 (2001)

    Article  MATH  Google Scholar 

  27. Sleep, M.R., Plasmeijer, M.J., van Eekelen, M.C.J.D. (eds.): Term Graph Rewriting Theory and Practice. J. Wiley & Sons, Chichester (1993)

    MATH  Google Scholar 

Download references

Acknowledgments

This material is based upon work partially supported by the National Science Foundation under Grant No. CCF-1317249. Michael Hanus provided valuable comments on a preliminary version of this paper.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Sergio Antoy .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Antoy, S., Jost, A. (2015). Compiling Collapsing Rules in Certain Constructor Systems. In: Falaschi, M. (eds) Logic-Based Program Synthesis and Transformation. LOPSTR 2015. Lecture Notes in Computer Science(), vol 9527. Springer, Cham. https://doi.org/10.1007/978-3-319-27436-2_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-27436-2_4

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-27435-5

  • Online ISBN: 978-3-319-27436-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics