Abstract
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).
Chapter PDF
Similar content being viewed by others
Keywords
- 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.
References
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 http://toy.sourceforge.net
Sáenz-Pérez, F.: ACIDE: An Integrated Development Environment Configurable for LaTeX. The PracTeX Journal 2007(3) (2007)
Damas, L., Milner, R.: Principal type-schemes for functional programs. In: POPL 1982, pp. 207–212. ACM Press, New York (1982)
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)
Hortalá, T., López, F., Sánchez, J., Ullán, E.: Declarative Programming with Real Constraints. Research Report SIP 5997, U.C.M (1997)
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)
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)
Caballero, R., García-Ruiz, Y.: Implementing dynamic cut in toy. Electr. Notes Theor. Comput. Sci. 177, 153–168 (2007)
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)
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)
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)
Hofstedt, P., Pepper, P.: Integration of declarative and constraint programming. Theory Pract. Log. Program. 7(1-2), 93–121 (2007)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Estévez-Martín, S., Fernández, A.J., Sáenz-Pérez, F. (2008). Playing with \(\cal{TOY}\): Constraints and Domain Cooperation. In: Drossopoulou, S. (eds) Programming Languages and Systems. ESOP 2008. Lecture Notes in Computer Science, vol 4960. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-78739-6_9
Download citation
DOI: https://doi.org/10.1007/978-3-540-78739-6_9
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-78738-9
Online ISBN: 978-3-540-78739-6
eBook Packages: Computer ScienceComputer Science (R0)