skip to main content
10.1145/1085099.1085105acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article

Designing an efficient computation strategy in CFLP(FD) using definitional trees

Published: 29 September 2005 Publication History

Abstract

This paper proposes the integration of finite domain (FD) constraints into a general purpose lazy functional logic programming language by means of a concrete instance of the generic scheme CFLP(D), proposed in [19] for lazy Constraint Functional Logic Programming over a parametrically given constraint domain D. We sketch in this CFLP(FD) language the basis of an efficient computation strategy for solving goals for programs by using definitional trees [1] in order to efficiently control the computation and maintain the good properties shown for needed and demand-driven narrowing strategies [4, 15, 25] in functional logic programming. This convenient computation mechanism is obtained as an optimization of the generic Constrained Lazy Narrowing Calculus CLNC(D) presented in [20], which has been proved sound and strongly complete w.r.t. a suitable CFLP(D) semantics, and provides a formal foundation for efficient implementations in existing systems such as Curry [11] and TOY [17]. Finally, we describe the execution of an example implemented in the CFLP(FD) system called TOY(FD) [9], which is based on the theoretical ideas introduced in this paper, following our computation strategy.

References

[1]
S. Antoy. Definitional trees. In Proc. Int. Conf. on Algebraic and Logic Programming (ALP'92), volume 632 of Springer LNCS, pp. 143--157, 1992.]]
[2]
S. Antoy. Optimal non-deterministic functional logic computations. In Proc. of ALP'97, pages 16--30. Springer LNCS 1298, 1997.]]
[3]
S. Antoy. Constructor-based conditional narrowing. In Proc. PPDP'01, ACM Press, pp. 199--206, 2001.]]
[4]
S. Antoy, R. Echahed, M. Hanus. A needed narrowing strategy. Journal of the ACM, 47(4): 776--822, 2000.]]
[5]
P. Arenas-Sánchez and M. Rodríguez-Artalejo. A general framework for lazy functional logic programming with algebraic polymorphic types. Theory and Practice of Logic Programming 1(2), pp. 185--245, 2001.]]
[6]
R. Caballero and M. Rodríguez-Artalejo. A Declarative Debugging System for Lazy Functional Logic Programs. Electronic Notes in Theoretical Computer Science 64, 63 pages, 2002.]]
[7]
R. Caballero and M. Rodríguez-Artalejo. DDT : A Declarative Debugging Tool for Functional Logic Languages. Proc. of the 7th International Symposium on Functional and Logic Programming (FLOPS'04), volume 2998 of Springer LNCS, pp. 70--84, 2004.]]
[8]
A.J. Fernández, M.T. Hortalá-González and F. Sáenz Pérez. Solving Combinatorial Problems with a Constraint Functional Logic Language. Proc. of the 5th International Symposium on Practical Aspects of Declarative Languages (PADL'2003), Springer LNCS 2562, pp. 320--338, 2003.]]
[9]
A.J. Fernández, M.T. Hortalá-González and F. Sáenz Pérez. TOY (FD) . User's Manual, October 27, 2003. System available at http://www.lcc.uma.es/~afdez/cflpfd/.]]
[10]
M. Hanus. The Integration of Functions into Logic Programming: From Theory to Practice. Journal of Logic Programming 19&20, pp. 583--628, 1994.]]
[11]
M. Hanus (ed.), Curry: an Integrated Functional Logic Language, Version 0.8, April 15, 2003. System available at http://www-i2.informatik.uni-kiel.de/~curry/.]]
[12]
M. Hanus, C. Prehofer. Higher-Order Narrowing with Definitional Trees. Journal of Functional Programming, 9(1):33--75, 1999.]]
[13]
J. Jaffar and M.J. Maher. Constraint Logic Programming: A Survey. The Journal of Logic Programming 19&20, pp. 503--581, 1994.]]
[14]
J. Jaffar, M.J. Maher, K. Marriott and P.J. Stuckey. The Semantics of Constraint Logic Programs. Journal of Logic Programming, 37 (1-3) pp. 1--46, 1998.]]
[15]
R. Loogen, F.J. López-Fraguas, M. Rodríguez-Artalejo. A demand driven computation strategy for lazy narrowing. In Proc. Int. Symp. on Programming Language Implementation and Logic Programming (PLILP'93), volume 714 of Springer LNCS pp. 184--200, 1993.]]
[16]
F.J. López-Fraguas. A General Scheme for Constraint Functional Logic Programming. In Proc. Int. Conf. on Algebraic and Logic Programming (ALP'92), Springer LNCS 632, pp. 213--227, 1992.]]
[17]
F.J. López-Fraguas, J. Sánchez-Hernández. T OY : A Multiparadigm Declarative System. Proc. RTA'99, Springer LNCS 1631, pp 244--247, 1999. System available at http://toy.sourceforge.net.]]
[18]
F.J. López-Fraguas, J. Sánchez-Hernández. A Proof Theoretic Approach to Failure in Functional Logic Programming. Theory and Practice of Logic Programming 4(1), pp. 41--74, 2004.]]
[19]
F.J. López-Fraguas, M. Rodríguez-Artalejo and R. del Vado-Vírseda. Constraint Functional Logic Programming Revisited. WRLA'2004, Elsevier ENTCS series, vol 117, pp. 5--50, 2005.]]
[20]
F.J. López-Fraguas, M. Rodríguez-Artalejo and R. del Vado-Vírseda. A lazy narrowing calculus for declarative constraint programming. 6th International Conference on PPDP'04, ACM Press, pp. 43--54, 2004.]]
[21]
M. Marin, T. Ida and W. Schreiner. CFLP: a Mathematica Imple-mentation of a Distributed Constraint Solving System. In Third In-ternational Mathematical Symposium (IMS'99), Hagenberg, Austria, August 23-25, 10 pages, 1999.]]
[22]
M. Marin, T. Ida and T. Suzuki. Cooperative Constraint Functional Logic Programming. In IPSE'2000, pp. 223--230, Nov. 1-2, 2000.]]
[23]
K. Marriott and P.J. Stuckey. Programming with Constraints, An Introduction. The MIT Press, 1998.]]
[24]
A. Tessier and G. Ferrand. Declarative Diagnosis in the CLP Scheme. In P. Deransart, M. Hermenegildo and J. Maluszynski (eds.), Analysis and Visualization Tools for Constraint Programming, Chapter 5, pp. 151--174. Springer LNCS 1870, 2000.]]
[25]
R. del Vado-Vírseda. A Demand-driven Narrowing Calculus with Overlapping Definitional Trees. 5th International Conference on Principles and Practice of Declarative Programming (PPDP'03), ACM Press, pp. 213--227, 2003.]]
[26]
R. del Vado-Vírseda. Declarative Constraint Programming with Definitional Trees. To appear in Proc. of the 5th International Workshop on Frontiers of Combining Systems (FroCoS 2005), Springer LNCS, 2005.]]
[27]
P. Van Hentenryck. Constraint logic programming. The Knowledge Engineering Review, Vol. 6:3, pp. 151--194, 1991.]]

Cited By

View all
  • (2008)Declarative diagnosis of missing answers in constraint functional-logic programmingProceedings of the 9th international conference on Functional and logic programming10.5555/1788446.1788478(305-321)Online publication date: 14-Apr-2008
  • (2007)Constraint functional logic programming over finite domainsTheory and Practice of Logic Programming10.1017/S14710684060029247:5(537-582)Online publication date: 1-Sep-2007
  • (2007)A new generic scheme for functional logic programming with constraintsHigher-Order and Symbolic Computation10.1007/s10990-007-9002-420:1-2(73-122)Online publication date: 1-Jun-2007

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
WCFLP '05: Proceedings of the 2005 ACM SIGPLAN workshop on Curry and functional logic programming
September 2005
78 pages
ISBN:1595930698
DOI:10.1145/1085099
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 29 September 2005

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. constraint logic programming
  2. definitional trees
  3. finite domains
  4. functional logic languages
  5. narrowing

Qualifiers

  • Article

Conference

WCFLP05
Sponsor:

Upcoming Conference

ICFP '25
ACM SIGPLAN International Conference on Functional Programming
October 12 - 18, 2025
Singapore , Singapore

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 03 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2008)Declarative diagnosis of missing answers in constraint functional-logic programmingProceedings of the 9th international conference on Functional and logic programming10.5555/1788446.1788478(305-321)Online publication date: 14-Apr-2008
  • (2007)Constraint functional logic programming over finite domainsTheory and Practice of Logic Programming10.1017/S14710684060029247:5(537-582)Online publication date: 1-Sep-2007
  • (2007)A new generic scheme for functional logic programming with constraintsHigher-Order and Symbolic Computation10.1007/s10990-007-9002-420:1-2(73-122)Online publication date: 1-Jun-2007

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media