1 / 23
www.software.imdea.org
Description and Evaluation of a Generic Design to Integrate CLP and Tabled Execution
Joaquín Arias1,2 Manuel Carro1,2
1IMDEA Software Institute, 2Technical University of Madrid
Description and Evaluation of a Generic Design to Integrate CLP and - - PowerPoint PPT Presentation
www.software.imdea.org Description and Evaluation of a Generic Design to Integrate CLP and Tabled Execution Joaqun Arias 1 , 2 Manuel Carro 1 , 2 1 IMDEA Software Institute, 2 Technical University of Madrid 1 / 23 www.software.imdea.org
1 / 23
1IMDEA Software Institute, 2Technical University of Madrid
1 / 23
Tabling engine Modular TCLP Interface Prolog-based CLP solver External CLP solver WAM
2 / 23
3 / 23
3 / 23
4 / 23
4 / 23
5 / 23
5 / 23
5 / 23
6 / 23
Termination properties of similar programs.
7 / 23
7 / 23
8 / 23
9 / 23
10 / 23
11 / 23
tabled call lookup table 1 store projection 2 retrieve projection 3 current store 4 save generator 5 call entail 6 suspend consumer 7 execute generator 8 lookup table 9 store projection 10 retrieve projection 11 save answer 12 answer compare 13 remove answer 14 reinstall store 15 retrieve answer 16 apply answer 17 no yes no yes new answer no yes > fails resume complete yes no fails success
12 / 23
13 / 23
13 / 23
14 / 23
15 / 23
16 / 23
Saved Discarded Removed Returned
17 / 23
Saved Discarded Removed Returned
18 / 23
Run time (ms) for dist/3. A ‘–’ means no termination.
1Graph of 25 nodes and 584 edges. 2Graph of 25 nodes and 785 edges.
19 / 23
top num
0+
bottom var str atom
t(x1, x2, . . . , xn) = i f x1 x2 then x2 else t(t(x1 1, x2, . . . , xn), . . . , t(xn 1, x1, . . . , xn1)) takeuchi(X1, X2, ..., _Xn, R) : X1 < X2, R = X2 . takeuchi(X1, X2, ..., _Xn, R) : X1 =:= X2, R = X2 . takeuchi(X1, X2, ..., Xn, R) : X1 > X2, N1 is X1 1, takeuchi(N1, X2, ..., Xn, R1 ) , N2 is X2 1, takeuchi(N2, X3, ..., X1, R2 ) , . . . , Nn is Xn 1, takeuchi(Nn, X1, ..., Xn1, Rn ) , takeuchi(R1, R2, ..., Rn, R).
20 / 23
21 / 23
\=[] \=[1] \=[1,3] \=[1,2] \=[1,4] =3 =4 =2 bottom
22 / 23
22 / 23
23 / 23
24 / 23