Advertisement

Synthesizing Set Functions

  • Sergio Antoy
  • Michael HanusEmail author
  • Finn Teegen
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11285)

Abstract

Set functions are a feature of functional logic programming to encapsulate all results of a non-deterministic computation in a single data structure. Given a function f of a functional logic program written in Curry, we describe a technique to synthesize the definition of the set function of f. The definition produced by our technique is based on standard Curry constructs. Our approach is interesting for three reasons. It allows reasoning about set functions, it offers an implementation of set functions which can be added to any Curry system, and it has the potential of changing our thinking about the implementation of non-determinism, a notoriously difficult problem.

References

  1. 1.
    Alqaddoumi, A., Antoy, S., Fischer, S., Reck, F.: The pull-tab transformation. In: Proceedings of the Third International Workshop on Graph Computation Models, Enschede, The Netherlands, pp. 127–132 (2010). http://gcm-events.org/gcm2010/pages/gcm2010-preproceedings.pdf
  2. 2.
    Antoy, S., Echahed, R., Hanus, M.: A needed narrowing strategy. J. ACM 47(4), 776–822 (2000)MathSciNetCrossRefGoogle Scholar
  3. 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).  https://doi.org/10.1007/11799573_9CrossRefzbMATHGoogle Scholar
  4. 4.
    Antoy, S., Hanus, M.: Set functions for functional logic programming. In: Proceedings of the 11th ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming (PPDP 2009), pp. 73–82. ACM Press (2009)Google Scholar
  5. 5.
    Antoy, S., Hanus, M.: Functional logic programming. Commun. ACM 53(4), 74–85 (2010)CrossRefGoogle Scholar
  6. 6.
    Atkey, R., Johann, P.: Interleaving data and effects. J. Funct. Programm. 25, e20 (2015).  https://doi.org/10.1017/S0956796815000209MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Braßel, B., Fischer, S., Hanus, M., Reck, F.: Transforming functional logic programs into monadic functional programs. In: Mariño, J. (ed.) WFLP 2010. LNCS, vol. 6559, pp. 30–47. Springer, Heidelberg (2011).  https://doi.org/10.1007/978-3-642-20775-4_2CrossRefzbMATHGoogle Scholar
  8. 8.
    Braßel, B., Hanus, M., Huch, F.: Encapsulating non-determinism in functional logic computations. J. Funct. Log. Program. 6, 2004 (2004)MathSciNetzbMATHGoogle Scholar
  9. 9.
    Braßel, B., Hanus, M., Peemöller, B., Reck, F.: KiCS2: a new compiler from curry to Haskell. In: Kuchen, H. (ed.) WFLP 2011. LNCS, vol. 6816, pp. 1–18. Springer, Heidelberg (2011).  https://doi.org/10.1007/978-3-642-22531-4_1CrossRefGoogle Scholar
  10. 10.
    Christiansen, J., Hanus, M., Reck, F., Seidel, D.: A semantics for weakly encapsulated search in functional logic programs. In: Proceedings of the 15th International Symposium on Principle and Practice of Declarative Programming (PPDP 2013), pp. 49–60. ACM Press (2013)Google Scholar
  11. 11.
    de Dios Castro, J., López-Fraguas, F.J.: Extra variables can be eliminated from functional logic programs. Electron. Notes Theor. Comput. Sci. 188, 3–19 (2007)CrossRefGoogle Scholar
  12. 12.
    Dijkstra, E.W.: A note on two problems in connexion with graphs. Numer. Math. 1(1), 269–271 (1959)MathSciNetCrossRefGoogle Scholar
  13. 13.
    Fischer, S., Kiselyov, O., Shan, C.: Purely functional lazy nondeterministic programming. J. Funct. program. 21(4&5), 413–465 (2011)MathSciNetCrossRefGoogle Scholar
  14. 14.
    González-Moreno, J.C., Hortalá-González, M.T., López-Fraguas, F.J., Rodríguez-Artalejo, M.: An approach to declarative programming based on a rewriting logic. J. Log. Program. 40, 47–87 (1999)MathSciNetCrossRefGoogle Scholar
  15. 15.
    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).  https://doi.org/10.1007/978-3-642-37651-1_6CrossRefzbMATHGoogle Scholar
  16. 16.
    Hanus, M., et al.: PAKCS: the Portland Aachen Kiel curry system (2018). http://www.informatik.uni-kiel.de/~pakcs/
  17. 17.
    Hanus, M. (ed.): Curry: an integrated functional logic language (vers. 0.9.0) (2016). http://www.curry-language.org
  18. 18.
    Hinze, R.: Prolog’s control constructs in a functional setting - axioms and implementation. Int. J. Found. Comput. Sci. 12(2), 125–170 (2001)CrossRefGoogle Scholar
  19. 19.
    Hussmann, H.: Nondeterministic algebraic specifications and nonconfluent term rewriting. J. Log. Program. 12, 237–255 (1992)MathSciNetCrossRefGoogle Scholar
  20. 20.
    López-Fraguas, F.J., Rodríguez-Hortalá, J., Sánchez-Hernández, J.: A simple rewrite notion for call-time choice semantics. In: Proceedings of the 9th ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming (PPDP 2007), pp. 197–208. ACM Press (2007)Google Scholar
  21. 21.
    José Moreno-Navarro, J., Kuchen, H., Loogen, R.: Lazy narrowing in a graph machine. In: Kirchner, H., Wechler, W. (eds.) ALP 1990. LNCS, vol. 463, pp. 298–317. Springer, Heidelberg (1990).  https://doi.org/10.1007/3-540-53162-9_47CrossRefGoogle Scholar
  22. 22.
    Riesco, A., Rodríguez-Hortalá, J.: Singular and plural functions for functional logic programming. Theory Pract. Log. Program. 14(1), 65–116 (2014)MathSciNetCrossRefGoogle Scholar
  23. 23.
    Seres, S., Spivey, M., Hoare, T.: Algebra of logic programming. In: Proceedings of the ICLP 1999, pp. 184–199. MIT Press (1999)Google Scholar
  24. 24.
    Wadler, P.: How to replace failure by a list of successes a method for exception handling, backtracking, and pattern matching in lazy functional languages. In: Jouannaud, J.-P. (ed.) FPCA 1985. LNCS, vol. 201, pp. 113–128. Springer, Heidelberg (1985).  https://doi.org/10.1007/3-540-15975-4_33CrossRefGoogle Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.Computer Science DepartmentPortland State UniversityPortlandUSA
  2. 2.Institut für InformatikCAU KielKielGermany

Personalised recommendations