Playing with \(\cal{TOY}\): Constraints and Domain Cooperation

  • Sonia Estévez-Martín
  • Antonio J. Fernández
  • Fernando Sáenz-Pérez
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4960)


This paper describes \(\cal{TOY}\), an implementation of a Constraint Functional Logic Programming scheme CFLP(C), where C is a coordination domain involving the cooperation among several constraint domains D 1,...,D n via a mediatorial domain M. This implementation follows a cooperative goal solving calculus for CFLP(C) based on lazy narrowing, invocation of solvers for each domain D i , and projection operations for converting D i constraints into D j constraints with the aid of mediatorial constraints supplied by M. Mediatorial constraints allow solving programs that require constraints of different domains, and projection may improve performance, allowing certain solvers to profit from (the projected forms) of constraints originally intended for other solvers. As a relevant concrete instance of our CFLP(C), we implemented the cooperation among Herbrand, real arithmetic and finite domain constraints, and the mediatorial constraints relate numeric variables belonging to the last two domains. These mediatorial constraints are the bridge #== :: int -> real -> bool (that evaluates to true if their arguments are equivalent -i.e., the real value is considered to represent the integer one- and false otherwise), and the antibridge #/== :: int -> real -> bool (with a countermeaning).


Integrate Development Environment Constraint Domain Functional Logic Declarative Programming Real Arithmetic 
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.


  1. 1.
    Arenas, P., Fernández, A., Gil, A., López, F., Rodríguez, M., Sáenz, F.: \(\mathcal{TOY}\). In: Caballero, R., Sánchez, J. (eds.) A Multiparadigm Declarative Language. Version 2.3.0 (2007), Available at
  2. 2.
    Sáenz-Pérez, F.: ACIDE: An Integrated Development Environment Configurable for LaTeX. The PracTeX Journal 2007(3) (2007)Google Scholar
  3. 3.
    Damas, L., Milner, R.: Principal type-schemes for functional programs. In: POPL 1982, pp. 207–212. ACM Press, New York (1982)CrossRefGoogle Scholar
  4. 4.
    Arenas, P., Gil, A., López, F.: Combining Lazy Narrowing with Disequality Constraints. In: Penjam, J. (ed.) PLILP 1994. LNCS, vol. 844, pp. 385–399. Springer, Heidelberg (1994)Google Scholar
  5. 5.
    Hortalá, T., López, F., Sánchez, J., Ullán, E.: Declarative Programming with Real Constraints. Research Report SIP 5997, U.C.M (1997)Google Scholar
  6. 6.
    Fernández, A.J., Hortalá, T., Sáenz, F., del Vado, R.: Constraint Functional Logic Programming over Finite Domains. Theory Pract. Log. Program. 7(5), 537–582 (2007)zbMATHCrossRefMathSciNetGoogle Scholar
  7. 7.
    Loogen, R., López-Fraguas, F.J., Rodríguez-Artalejo, M.: A demand driven computation strategy for lazy narrowing. In: Penjam, J., Bruynooghe, M. (eds.) PLILP 1993. LNCS, vol. 714, pp. 184–200. Springer, Heidelberg (1993)Google Scholar
  8. 8.
    Caballero, R., García-Ruiz, Y.: Implementing dynamic cut in toy. Electr. Notes Theor. Comput. Sci. 177, 153–168 (2007)CrossRefGoogle Scholar
  9. 9.
    López, F., Rodríguez, M., del Vado, R.: A new generic scheme for functional logic programming with constraints. Higher-Order and Symbolic Computation 20(1/2), 73–122 (2007)zbMATHCrossRefGoogle Scholar
  10. 10.
    Estévez, S., Fernández, A.J., Hortalá, M.T., Rodríguez, M., del Vado, R.: A fully sound goal solving calculus for the cooperation of solvers in the CFLP scheme. ENTCS 177, 235–252 (2007)Google Scholar
  11. 11.
    Estévez, S., Fernández, A., Hortalá, T., Rodríguez, M., Sáenz, F., del Vado, R.: A Proposal for the Cooperation of Solvers in Constraint Functional Logic Programming. ENTCS 188, 37–51 (2007)Google Scholar
  12. 12.
    Hofstedt, P., Pepper, P.: Integration of declarative and constraint programming. Theory Pract. Log. Program. 7(1-2), 93–121 (2007)zbMATHCrossRefMathSciNetGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Sonia Estévez-Martín
    • 1
  • Antonio J. Fernández
    • 2
  • Fernando Sáenz-Pérez
    • 3
  1. 1.Dpto. de Sistemas Informáticos y CompUniv. Complutense de MadridSpain
  2. 2.Dpto. de Lenguajes y Ciencias de la ComputaciónUniv. de MálagaSpain
  3. 3.Dpto. de Inteligencia Artificial e Ing. SWUniv. Complutense de MadridSpain

Personalised recommendations