Compiling constraints in clp(FD)

被引:69
作者
Codognet, P
Diaz, D
机构
[1] INRIA-Rocquencourt, 78153 Le Chesnay
来源
JOURNAL OF LOGIC PROGRAMMING | 1996年 / 27卷 / 03期
关键词
D O I
10.1016/0743-1066(95)00121-2
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
We present the clp(FD) system: a constraint logic programming language with finite domain constraints. We detail its implementation, and present an abstract instruction set for the constraint solver that can be smoothly integrated into the WAM architecture. It is based on the use of a single primitive constraint X in r that embeds the core propagation mechanism. Complex user constraints such as linear equations or inequations are compiled into X in r expressions that encode the propagation scheme chosen to solve the constraint. The uniform treatment of a single primitive constraint leads to a better understanding of the overall constraint-solving process, and allows three main general optimizations that encompass many previous particular optimizations of ''black-box'' finite domain solvers. Implementation results show that this approach combines both simplicity and efficiency. Our clp(FD) system is about four times faster than CHIP on average, with peak speedup reaching eight. We also show that, following the ''glass-box'' approach, clp(FD) can be naturally enhanced with various new constraints such as constructive disjunction, Boolean constraints, nonlinear constraints, and symbolic constraints.
引用
收藏
页码:185 / 226
页数:42
相关论文
共 51 条
[1]  
AGGOUN A, 1993, CONSTRAINT LOGIC PRO
[2]  
AGGOUN A, 1990, ACT SEM 1990 PROGR L
[3]  
AITKACI H, 1991, WARRENS ABSTRACT MAC
[4]  
*BELL NO RES, 1988, BNR PROL US MAN
[5]  
BOCKMAYR A, 1991, MPII91227 M PLANCK I
[6]  
BRYANT RE, 1986, IEEE T COMPUT, V35, P677, DOI 10.1109/TC.1986.1676819
[7]   EMBEDDING BOOLEAN EXPRESSIONS INTO LOGIC PROGRAMMING [J].
BUTTNER, W ;
SIMONIS, H .
JOURNAL OF SYMBOLIC COMPUTATION, 1987, 4 (02) :191-205
[8]  
CARLSSON B, 1993, CONSTRAINT SOLVING E
[9]  
CARLSSON B, 1994, 11 INT C LOG PROGR S
[10]  
CODOGNET P, 1993, CONSTRAINT LOGIC PRO