zbMATH — the first resource for mathematics

Default rules for Curry. (English) Zbl 1379.68037
Summary: In functional logic programs, rules are applicable independently of textual order, i.e., any rule can potentially be used to evaluate an expression. This is similar to logic languages and contrary to functional languages, e.g., Haskell enforces a strict sequential interpretation of rules. However, in some situations it is convenient to express alternatives by means of compact default rules. Although default rules are often used in functional programs, the non-deterministic nature of functional logic programs does not allow to directly transfer this concept from functional to functional logic languages in a meaningful way. In this paper, we propose a new concept of default rules for Curry that supports a programming style similar to functional programming while preserving the core properties of functional logic programming, i.e., completeness, non-determinism, and logic-oriented use of functions. We discuss the basic concept and propose an implementation which exploits advanced features of functional logic languages.
68N17 Logic programming
68N18 Functional programming and lambda calculus
68Q55 Semantics in the theory of computing
Haskell; Curry; KiCS2
PDF BibTeX Cite
Full Text: DOI
[1] Antoy, S., Proc. of the 3rd International Conference on Algebraic and Logic Programming, Definitional trees, 143-157, (1992), Springer LNCS, Berlin Heidelberg
[2] Antoy, S., Proc. of 6th Int’l Conf. on Algebraic and Logic Programming (ALP’97), Optimal non-deterministic functional logic computations, 16-30, (1997), Springer, Southampton, UK · Zbl 0886.68034
[3] Antoy, S.; Echahed, R.; Hanus, M., A needed narrowing strategy, Journal of the ACM, 47, 4, 776-822, (2000) · Zbl 1327.68141
[4] Antoy, S.; Hanus, M., Proceedings of the International Symposium on Logic-based Program Synthesis and Transformation (LOPSTR’05), Declarative programming with function patterns, 6-22, (2005), Springer LNCS, Berlin Heidelberg · Zbl 1156.68339
[5] Antoy, S.; Hanus, M., Proc. of the 22nd International Conference on Logic Programming (ICLP 2006), Overlapping rules and logic variables in functional logic programs, 87-101, (2006), Springer LNCS, Berlin Heidelberg · Zbl 1131.68364
[6] Antoy, S.; Hanus, M., Proc. of the 11th ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming (PPDP’09), Set functions for functional logic programming, 73-82, (2009), ACM Press
[7] Antoy, S.; Hanus, M., Functional logic programming, Communications of the ACM, 53, 4, 74-85, (2010)
[8] Antoy, S.; Hanus, M., pp., (2014)
[9] Antoy, S.; Middeldorp, A., A sequential strategy, Theoretical Computer Science, 165, 75-95, (1996) · Zbl 0872.68080
[10] Berry, G., Bottom-up computation of recursive programs, Informatique Théorique et Applications, 10, 47-82, (1976)
[11] Brassel, B.; Hanus, M.; Huch, F., Encapsulating non-determinism in functional logic computations, Journal of Functional and Logic Programming, 2004, pp., (2004) · Zbl 1084.68511
[12] Brassel, B.; Hanus, M.; Peemöller, B.; Reck, F., Proc. of the 20th International Workshop on Functional and (Constraint) Logic Programming (WFLP 2011), KiCS2: A new compiler from Curry to Haskell, 1-18, (2011), Springer LNCS, Berlin Heidelberg
[13] Christiansen, J.; Hanus, M.; Reck, F.; Seidel, D., Proc. of the 15th International Symposium on Principle and Practice of Declarative Programming (PPDP’13), A semantics for weakly encapsulated search in functional logic programs, 49-60, (2013), ACM Press, New York
[14] Deransart, P.; Ed-Dbali, A.; Cervoni, L., Prolog - The Standard: Reference Manual, pp., (1996), Springer, Berlin Heidelberg · Zbl 0844.68017
[15] González-Moreno, J.; Hortalá-González, M.; López-Fraguas, F.; Rodríguez-Artalejo, M., An approach to declarative programming based on a rewriting logic, Journal of Logic Programming, 40, 47-87, (1999) · Zbl 0942.68060
[16] Hanus, M., Technical Communications of the 27th International Conference on Logic Programming, Declarative processing of semistructured web data, 198-208, (2011), Schloss Dagstuhl - Leibniz-Zentrum für Informatik, Dagstuhl (Germany) · Zbl 1245.68074
[17] Hanus, M., Programming Logics - Essays in Memory of Harald Ganzinger, Functional logic programming: From theory to Curry, 123-168, (2013), Springer LNCS, Berlin Heidelberg
[18] Hanus, M., pp., (2016)
[19] Hanus, M.; Antoy, S.; Brassel, B.; Engelke, M.; Höppner, K.; Koj, J.; Niederau, P.; Sadre, R.; Steiner, F., pp., (2016)
[20] López-Fraguas, F.; Sánchez-Hernández, J., A proof theoretic approach to failure in functional logic programming, Theory and Practice of Logic Programming, 4, 1, 41-74, (2004) · Zbl 1085.68021
[21] Moreno-Navarro, J., In Proc. 11th International Conference on Logic Programming, Default rules: An extension of constructive negation for narrowing-based languages, 535-549, (1994), MIT Press, Cambridge (USA)
[22] O’Donnell, M. J., Computing in Systems Described by Equations, pp., (1977), Springer, Berlin Heidelberg · Zbl 0421.68038
[23] Peyton, Jones, S., Haskell 98 Language and Libraries—The Revised Report, pp., (2003), Cambridge University Press, Cambridge · Zbl 1067.68041
[24] Reddy, U., Proc. IEEE Internat. Symposium on Logic Programming, Narrowing as the operational semantics of functional languages, 138-151, (1985), IEEE-CS, Boston
[25] Sánchez-Hernández, J., Constructive failure in functional-logic programming: from theory to implementation, Journal of Universal Computer Science, 12, 11, 1574-1593, (2006)
[26] Slagle, J., Automated theorem-proving for theories with simplifiers, commutativity, and associativity, Journal of the ACM, 21, 4, 622-642, (1974) · Zbl 0296.68092
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. It attempts to reflect the references listed in the original paper as accurately as possible without claiming the completeness or perfect precision of the matching.