Hostname: page-component-76fb5796d-25wd4 Total loading time: 0 Render date: 2024-04-26T16:00:57.453Z Has data issue: false hasContentIssue false

Adding partial functions to Constraint Logic Programming with sets

Published online by Cambridge University Press:  03 September 2015

MAXIMILIANO CRISTIÁ
Affiliation:
CIFASIS and UNR, Rosario, Argentina (e-mail: cristia@cifasis-conicet.gov.ar)
GIANFRANCO ROSSI
Affiliation:
Università degli Studi di Parma, Parma, Italy (e-mail: gianfranco.rossi@unipr.it)
CLAUDIA FRYDMAN
Affiliation:
Aix Marseille Univ., CNRS, ENSAM, Univ. de Toulon, LSIS UMR 7296, France (e-mail: claudia.frydman@lsis.org)

Abstract

Partial functions are common abstractions in formal specification notations such as Z, B and Alloy. Conversely, executable programming languages usually provide little or no support for them. In this paper we propose to add partial functions as a primitive feature to a Constraint Logic Programming (CLP) language, namely {log}. Although partial functions could be programmed on top of {log}, providing them as first-class citizens adds valuable flexibility and generality to the form of set-theoretic formulas that the language can safely deal with. In particular, the paper shows how the {log} constraint solver is naturally extended in order to accommodate for the new primitive constraints dealing with partial functions. Efficiency of the new version is empirically assessed by running a number of non-trivial set-theoretical goals involving partial functions, obtained from specifications written in Z.

Type
Regular Papers
Copyright
Copyright © Cambridge University Press 2015 

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Abrial, J.-R. 1996. The B-book: Assigning Programs to Meanings. Cambridge University Press, New York, NY, USA.CrossRefGoogle Scholar
Cristiá, M., Rossi, G., and Frydman, C. S. 2013. {log} as a test case generator for the Test Template Framework. In SEFM, Hierons, R. M., Merayo, M. G., and Bravetti, M., Eds. Lecture Notes in Computer Science, vol. 8137. Springer, 229243.Google Scholar
Dal Palù, A., Dovier, A., Pontelli, E., and Rossi, G. 2003. Integrating finite domain constraints and CLP with sets. In PPDP. ACM, 219229.CrossRefGoogle Scholar
Deville, Y., Dooms, G., Zampelli, S., and Dupont, P. 2005. CP(graph+map) for approximate graph matching. In 1st International Workshop on Constraint Programming Beyond Finite Integer Domains. 3147.Google Scholar
Dovier, A., Omodeo, E. G., Pontelli, E., and Rossi, G. 1996. A language for programming in logic with finite sets. J. Log. Program. 28, 1, 144.CrossRefGoogle Scholar
Dovier, A., Piazza, C., Pontelli, E., and Rossi, G. 2000. Sets and constraint logic programming. ACM Trans. Program. Lang. Syst. 22, 5, 861931.CrossRefGoogle Scholar
Gervet, C. 1997. Interval propagation to reason about sets: Definition and implementation of a practical language. Constraints 1, 3, 191244.CrossRefGoogle Scholar
Gervet, C. 2006. Handbook of Constraint Programming. Elsevier, Chapter Constraints over Structured Domains, 605638.CrossRefGoogle Scholar
Jackson, D. 2003. Alloy: A logical modelling language. In ZB 2003: Formal Specification and Development in Z and B, Third International Conference of B and Z Users, Turku, Finland, June 4-6, 2003, Proceedings, Bert, D., Bowen, J. P., King, S., and Waldén, M. A., Eds. Lecture Notes in Computer Science, vol. 2651. Springer, 1.Google Scholar
Saaltink, M. 1997. The Z/EVES mathematical toolkit version 2.2 for Z/EVES version 1.5. Tech. rep., ORA Canada.Google Scholar
Schwartz, J. T., Dewar, R. B. K., Dubinsky, E., and Schonberg, E. 1986. Programming with Sets - An Introduction to SETL. Texts and Monographs in Computer Science. Springer.CrossRefGoogle Scholar
Spivey, J. M. 1992. The Z notation: a reference manual. Prentice Hall International (UK) Ltd., Hertfordshire, UK, UK.Google Scholar
Supplementary material: PDF

Cristiá supplementary material

Online Appendix

Download Cristiá supplementary material(PDF)
PDF 177.1 KB