Adding partial functions to Constraint Logic Programming with sets

被引:5
作者
Cristia, Maximiliano [1 ,2 ]
Rossi, Gianfranco [3 ]
Frydman, Claudia [4 ]
机构
[1] CIFASIS, Rosario, Argentina
[2] UNR, Rosario, Argentina
[3] Univ Parma, I-43100 Parma, Italy
[4] Univ Toulon & Var, Aix Marseille Univ, CNRS, ENSAM,LSIS UMR 7296, Toulon, France
关键词
CLP; {log}; set theory; partial functions; LANGUAGE;
D O I
10.1017/S1471068415000290
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:651 / 665
页数:15
相关论文
共 13 条
[1]  
Abrial Jean-Raymond, 1996, The B-Book - Assigning Programs to Meanings
[2]  
[Anonymous], 1992, The Z Notation
[3]  
[Anonymous], 1986, TEXTS MONOGRAPHS COM
[4]  
Cristiá M, 2013, LECT NOTES COMPUT SC, V8137, P229, DOI 10.1007/978-3-642-40561-7_16
[5]  
DALPALU A, 2003, PPDP 03, P219
[6]  
Deville Y., 2005, 1 INT WORKSH CONSTR, P31
[7]   Sets and constraint logic programming [J].
Dovier, A ;
Piazza, C ;
Pontelli, E ;
Rossi, G .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2000, 22 (05) :861-931
[8]   {log}: A language for programming in logic with finite sets [J].
Dovier, A ;
Omodeo, EG ;
Pontelli, E ;
Rossi, G .
JOURNAL OF LOGIC PROGRAMMING, 1996, 28 (01) :1-44
[9]   Interval propagation to reason about sets: Definition and implementation of a practical language [J].
Gervet C. .
Constraints, 1997, 1 (3) :191-244
[10]  
Gervet C, 2006, FOUND ARTIF INTELL, P605