Abstract
In this paper we present our first steps towards a new system to compile functional logic programs of the source language Curry into purely functional Haskell programs. Our implementation is based on the idea to represent non-deterministic results as values of the data types corresponding to the results. This enables the application of various search strategies to extract values from the search space. We show by several benchmarks that our implementation can compete with or outperform other existing implementations of Curry.
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
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., Hanus, M., Huch, F., Oliver, J., Vidal, G.: Operational semantics for declarative multi-paradigm languages. Journal of Symbolic Computation 40(1), 795–829 (2005)
Alqaddoumi, A., Antoy, S., Fischer, S., Reck, F.: The pull-tab transformation. In: Proc. of the Third International Workshop on Graph Computation Models, pp. 127–132. Enschede, The Netherlands (2010), http://gcm-events.org/gcm2010/pages/gcm2010-preproceedings.pdf
Antoy, S.: Constructor-based conditional narrowing. In: Proc. of the 3rd International ACM SIGPLAN Conference on Principles and Practice of Declarative Programming (PPDP 2001), pp. 199–206. ACM Press, New York (2001)
Antoy, S.: On the correctness of the pull-tab transformation. In: To Appear in Proceedings of the 27th International Conference on Logic Programming, ICLP 2011 (2011)
Antoy, S., Hanus, M.: Compiling multi-paradigm declarative programs into Prolog. In: Kirchner, H. (ed.) FroCos 2000. LNCS, vol. 1794, pp. 171–185. Springer, Heidelberg (2000)
Antoy, S., Hanus, M.: Functional logic design patterns. In: Hu, Z., Rodríguez-Artalejo, M. (eds.) FLOPS 2002. LNCS, vol. 2441, pp. 67–87. Springer, Heidelberg (2002)
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)
Antoy, S., Hanus, M.: Functional logic programming. Communications of the ACM 53(4), 74–85 (2010)
Antoy, S., Hanus, M., Liu, J., Tolmach, A.: A virtual machine for functional logic computations. In: Grelck, C., Huch, F., Michaelson, G.J., Trinder, P. (eds.) IFL 2004. LNCS, vol. 3474, pp. 108–125. Springer, Heidelberg (2005)
Augustsson, L., Rittri, M., Synek, D.: On generating unique names. Journal of Functional Programming 4(1), 117–123 (1994)
Braßel, B.: Implementing Functional Logic Programs by Translation into Purely Functional Programs. PhD thesis, Christian-Albrechts-Universität zu Kiel (2011)
Braßel, B., Fischer, S.: From functional logic programs to purely functional programs preserving laziness. In: Pre-Proceedings of the 20th Workshop on Implementation and Application of Functional Languages, IFL 2008 (2008)
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)
Braßel, B., Hanus, M., Müller, M.: High-level database programming in curry. In: Hudak, P., Warren, D.S. (eds.) PADL 2008. LNCS, vol. 4902, pp. 316–332. Springer, Heidelberg (2008)
Braßel, B., Huch, F.: On a tighter integration of functional and logic programming. In: Shao, Z. (ed.) APLAS 2007. LNCS, vol. 4807, pp. 122–138. Springer, Heidelberg (2007)
Braßel, B., Huch, F.: The kiel curry system kiCS. In: Seipel, D., Hanus, M., Wolf, A. (eds.) INAP 2007. LNCS(LNAI), vol. 5437, pp. 195–205. Springer, Heidelberg (2009)
Caballero, R., López-Fraguas, F.J.: A functional-logic perspective of parsing. In: Middeldorp, A. (ed.) FLOPS 1999. LNCS, vol. 1722, pp. 85–99. Springer, Heidelberg (1999)
Fischer, S.: A functional logic database library. In: Proc. of the ACM SIGPLAN 2005 Workshop on Curry and Functional Logic Programming (WCFLP 2005), pp. 54–59. ACM Press, New York (2005)
Fischer, S., Kiselyov, O., Shan, C.: Purely functional lazy non-deterministic programming. In: Proceeding of the 14th ACM SIGPLAN International Conference on Functional Programming (ICFP 2009), pp. 11–22. ACM, New York (2009)
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. Journal of Logic Programming 40, 47–87 (1999)
Hanus, M.: A functional logic programming approach to graphical user interfaces. In: Pontelli, E., Santos Costa, V. (eds.) PADL 2000. LNCS, vol. 1753, pp. 47–62. Springer, Heidelberg (2000)
Hanus, M.: High-level server side web scripting in curry. In: Ramakrishnan, I.V. (ed.) PADL 2001. LNCS, vol. 1990, pp. 76–92. Springer, Heidelberg (2001)
Hanus, M.: Type-oriented construction of web user interfaces. In: Proceedings of the 8th ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming (PPDP 2006), pp. 27–38. ACM Press, New York (2006)
Hanus, M.: Multi-paradigm declarative languages. In: Dahl, V., Niemelä, I. (eds.) ICLP 2007. LNCS, vol. 4670, pp. 45–75. Springer, Heidelberg (2007)
Hanus, M., Antoy, S., Braßel, B., Engelke, M., Höppner, K., Koj, J., Niederau, P., Sadre, R., Steiner, F.: PAKCS: The Portland Aachen Kiel Curry System (2010), http://www.informatik.uni-kiel.de/~pakcs/
Hanus, M., Koschnicke, S.: An ER-based framework for declarative web programming. In: Carro, M., Peña, R. (eds.) PADL 2010. LNCS, vol. 5937, pp. 201–216. Springer, Heidelberg (2010)
Hanus, M., Sadre, R.: An abstract machine for curry and its concurrent implementation in java. Journal of Functional and Logic Programming 1999(6) (1999)
Hanus, M. (ed.): Curry: An integrated functional logic language, vers. 0.8.2 (2006), http://www.curry-language.org
Hussmann, H.: Nondeterministic algebraic specifications and nonconfluent term rewriting. Journal of Logic Programming 12, 237–255 (1992)
Fraguas, F.J.L., Hernández, J.S.: TOY: A multiparadigm declarative system. In: Narendran, P., Rusinowitch, M. (eds.) RTA 1999. LNCS, vol. 1631, pp. 244–247. Springer, Heidelberg (1999)
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, New York (2007)
Lux, W.: Implementing encapsulated search for a lazy functional logic language. In: Middeldorp, A. (ed.) FLOPS 1999. LNCS, vol. 1722, pp. 100–113. Springer, Heidelberg (1999)
Moreno-Navarro, J.J., Kuchen, H., Loogen, R., Rodríguez-Artalejo, M.: Lazy narrowing in a graph machine. In: Kirchner, H., Wechler, W. (eds.) ALP 1990. LNCS, vol. 463, pp. 298–317. Springer, Heidelberg (1990)
Partain, W.: The nofib benchmark suite of Haskell programs. In: Proceedings of the 1992 Glasgow Workshop on Functional Programming, pp. 195–202. Springer, Heidelberg (1993)
Peyton Jones, S. (ed.): Haskell 98 Language and Libraries—The Revised Report. Cambridge University Press, Cambridge (2003)
Wadler, P.: How to replace failure by a list of successes. In: Jouannaud, J.-P. (ed.) FPCA 1985. LNCS, vol. 201, pp. 113–128. Springer, Heidelberg (1985)
Zartmann, F.: Denotational Abstract Interpretation of Functional Logic Programs. In: Van Hentenryck, P. (ed.) SAS 1997. LNCS, vol. 1302, pp. 141–156. Springer, Heidelberg (1997)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Braßel, B., Hanus, M., Peemöller, B., Reck, F. (2011). KiCS2: A New Compiler from Curry to Haskell. In: Kuchen, H. (eds) Functional and Constraint Logic Programming. WFLP 2011. Lecture Notes in Computer Science, vol 6816. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-22531-4_1
Download citation
DOI: https://doi.org/10.1007/978-3-642-22531-4_1
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-22530-7
Online ISBN: 978-3-642-22531-4
eBook Packages: Computer ScienceComputer Science (R0)