motivations
play

Motivations Numerous CP modeling languages and platforms have been - PowerPoint PPT Presentation

On T esting C onstraint P rograms Nadjib LAZAAR* , Arnaud GOTLIEB*, Yahia LEBBAH** *INRIA Rennes Bretagne Atlantique ** Universit d'Oran Es-Senia CP2010 St -Andrews, Scotland 08 september 1 /21 Motivations Numerous CP modeling


  1. On T esting C onstraint P rograms Nadjib LAZAAR* , Arnaud GOTLIEB*, Yahia LEBBAH** *INRIA Rennes Bretagne Atlantique ** Université d'Oran Es-Senia CP’2010 St -Andrews, Scotland 08 september 1 /21

  2. Motivations  Numerous CP modeling languages and platforms have been developed (OPL, SICStus Prolog, ZINC, GECODE, CHOCO…) for solving combinatorial problems that arise in optimization, planning, scheduling… 2 /21

  3. Motivations  Numerous CP modeling languages and platforms have been developed (OPL, SICStus Prolog, ZINC, GECODE, CHOCO…) for solving combinatorial problems that arise in optimization, planning, scheduling…  CP programs begin to be used in business-critical systems (e.g., combinatorial auctions) 2 /21

  4. Motivations  Numerous CP modeling languages and platforms have been developed (OPL, SICStus Prolog, ZINC, GECODE, CHOCO…) for solving combinatorial problems that arise in optimization, planning, scheduling…  CP programs begin to be used in business-critical systems (e.g., combinatorial auctions)  Refinement in CP 2 /21

  5. Motivations  Numerous CP modeling languages and platforms have been developed (OPL, SICStus Prolog, ZINC, GECODE, CHOCO…) for solving combinatorial problems that arise in optimization, planning, scheduling…  CP programs begin to be used in business-critical systems (e.g., combinatorial auctions)  Refinement in CP SPEC 2 /21

  6. Motivations  Numerous CP modeling languages and platforms have been developed (OPL, SICStus Prolog, ZINC, GECODE, CHOCO…) for solving combinatorial problems that arise in optimization, planning, scheduling…  CP programs begin to be used in business-critical systems (e.g., combinatorial auctions)  Refinement in CP SPEC 2 /21

  7. Motivations  Numerous CP modeling languages and platforms have been developed (OPL, SICStus Prolog, ZINC, GECODE, CHOCO…) for solving combinatorial problems that arise in optimization, planning, scheduling…  CP programs begin to be used in business-critical systems (e.g., combinatorial auctions)  Refinement in CP SPEC 2 /21

  8. Motivations  Numerous CP modeling languages and platforms have been developed (OPL, SICStus Prolog, ZINC, GECODE, CHOCO…) for solving combinatorial problems that arise in optimization, planning, scheduling…  CP programs begin to be used in business-critical systems (e.g., combinatorial auctions)  Refinement in CP SPEC 2 /21

  9. Golomb Rulers 3 /21

  10. Golomb Rulers 3 /21

  11. Golomb Rulers in O ptimization P rogramming L anguage M using CP; int m=...; dvar int x[1..m] in 0..m*m; minimize x[m]; subject to { (1) forall (i in 1..m-1) x[i] < x[i+1]; (2) forall (i in 1..m, j in 1..m, k in 1..m, l in 1..m: (i < j, k < l)) x[j] - x[i] != x[l] - x[k]; } 4 /21

  12. Golomb Rulers in O ptimization P rogramming L anguage M P using CP; using CP; int m=...; int m=...; tuple indexerTuple {int i; dvar int x[1..m] in 0..m*m; int j;} {indexerTuple} indexes1 = {<i, j> | ordered i,j in 1..m}; minimize x[m]; {indexerTuple} indexes2 = {<i, j> | ordered i,j in 1..m div 2}; subject to { dvar int x[1..m] in 0..m*m; (1) forall (i in 1..m-1) dvar int d[indexes1]; x[i] < x[i+1]; (2) forall (i in 1..m, j in 1..m, minimize x[m]; k in 1..m, l in 1..m: (i < j, k < l)) subject to { x[j] - x[i] != x[l] - x[k]; (1) x[1]==0; } (2) forall (i in (1)..m-1) x[i] < x[i+1]; (3) forall(ind in indexes1) d[ind] == x[ind.i]-x[ind.j]; (4) x[m] >= (m * (m - 1)) / 2; (5) x[2] <= x[m]-x[m-1]; (6) forall(ind1,ind2,ind3:(ind1.i==ind2.i)&&(ind2.j==ind3.i)&& (ind1.j==ind3.j)&&( ind1.i < ind2.j < ind1.j)) d[ind1]==d[ind2]+d[ind3]; (7) forall(ind1,ind2,ind3,ind4 in indexes2 : (ind1.i==ind2.i)&&(ind1.j==ind3.j)&&(ind2.j==ind4.j) &&(ind3.i==ind4.i)&&(ind1.i<m-1)&&(3<ind1.j<m+1) &&(2<ind2.j<m)&&(1<ind3.i<m-1)&& (ind1.i < ind3.i < ind2.j < ind1.j)) d[ind1]==d[ind2]+d[ind3]-d[ind4]; (8) forall(ind in indexes2, k in 1..m div 2) x[ind.i+1]==x[ind.i]+k => x[ind.j+1] != x[ind.j]+k; } 4 /21

  13. Golomb Rulers in O ptimization P rogramming L anguage M P using CP; using CP; int m=...; int m=...; tuple indexerTuple {int i; dvar int x[1..m] in 0..m*m; int j;} {indexerTuple} indexes1 = {<i, j> | ordered i,j in 1..m}; minimize x[m]; {indexerTuple} indexes2 = {<i, j> | ordered i,j in 1..m div 2}; subject to { dvar int x[1..m] in 0..m*m; (1) forall (i in 1..m-1) dvar int d[indexes1]; x[i] < x[i+1]; (2) forall (i in 1..m, j in 1..m, minimize x[m]; k in 1..m, l in 1..m: (i < j, k < l)) subject to { x[j] - x[i] != x[l] - x[k]; (1) x[1]==0; } (2) forall (i in (1)..m-1) x[i] < x[i+1]; (3) forall(ind in indexes1) d[ind] == x[ind.i]-x[ind.j]; (4) x[m] >= (m * (m - 1)) / 2; (5) x[2] <= x[m]-x[m-1]; Does P conform to M (6) forall(ind1,ind2,ind3:(ind1.i==ind2.i)&&(ind2.j==ind3.i)&& (ind1.j==ind3.j)&&( ind1.i < ind2.j < ind1.j)) d[ind1]==d[ind2]+d[ind3]; (7) forall(ind1,ind2,ind3,ind4 in indexes2 : (ind1.i==ind2.i)&&(ind1.j==ind3.j)&&(ind2.j==ind4.j) &&(ind3.i==ind4.i)&&(ind1.i<m-1)&&(3<ind1.j<m+1) &&(2<ind2.j<m)&&(1<ind3.i<m-1)&& (ind1.i < ind3.i < ind2.j < ind1.j)) d[ind1]==d[ind2]+d[ind3]-d[ind4]; (8) forall(ind in indexes2, k in 1..m div 2) x[ind.i+1]==x[ind.i]+k => x[ind.j+1] != x[ind.j]+k; } 4 /21

  14. Golomb Rulers in O ptimization P rogramming L anguage M P using CP; using CP; int m=...; int m=...; tuple indexerTuple {int i; dvar int x[1..m] in 0..m*m; int j;} {indexerTuple} indexes1 = {<i, j> | ordered i,j in 1..m}; minimize x[m]; {indexerTuple} indexes2 = {<i, j> | ordered i,j in 1..m div 2}; subject to { dvar int x[1..m] in 0..m*m; (1) forall (i in 1..m-1) dvar int d[indexes1]; x[i] < x[i+1]; (2) forall (i in 1..m, j in 1..m, minimize x[m]; k in 1..m, l in 1..m: (i < j, k < l)) subject to { x[j] - x[i] != x[l] - x[k]; (1) x[1]==0; } (2) forall (i in (1)..m-1) x[i] < x[i+1]; (3) forall(ind in indexes1) d[ind] == x[ind.i]-x[ind.j]; (4) x[m] >= (m * (m - 1)) / 2; (5) x[2] <= x[m]-x[m-1]; Does P conform to M (6) forall(ind1,ind2,ind3:(ind1.i==ind2.i)&&(ind2.j==ind3.i)&& (ind1.j==ind3.j)&&( ind1.i < ind2.j < ind1.j)) d[ind1]==d[ind2]+d[ind3]; m=8 (7) forall(ind1,ind2,ind3,ind4 in indexes2 : (ind1.i==ind2.i)&&(ind1.j==ind3.j)&&(ind2.j==ind4.j) &&(ind3.i==ind4.i)&&(ind1.i<m-1)&&(3<ind1.j<m+1) &&(2<ind2.j<m)&&(1<ind3.i<m-1)&& X= [0 1 3 6 10 26 27 28] (ind1.i < ind3.i < ind2.j < ind1.j)) d[ind1]==d[ind2]+d[ind3]-d[ind4]; (8) forall(ind in indexes2, k in 1..m div 2) x[ind.i+1]==x[ind.i]+k => x[ind.j+1] != x[ind.j]+k; } 4 /21

  15. Golomb Rulers in O ptimization P rogramming L anguage M P using CP; using CP; int m=...; int m=...; tuple indexerTuple {int i; dvar int x[1..m] in 0..m*m; int j;} {indexerTuple} indexes1 = {<i, j> | ordered i,j in 1..m}; minimize x[m]; {indexerTuple} indexes2 = {<i, j> | ordered i,j in 1..m div 2}; subject to { dvar int x[1..m] in 0..m*m; (1) forall (i in 1..m-1) dvar int d[indexes1]; x[i] < x[i+1]; (2) forall (i in 1..m, j in 1..m, minimize x[m]; k in 1..m, l in 1..m: (i < j, k < l)) subject to { x[j] - x[i] != x[l] - x[k]; (1) x[1]==0; } (2) forall (i in (1)..m-1) x[i] < x[i+1]; (3) forall(ind in indexes1) d[ind] == x[ind.i]-x[ind.j]; (4) x[m] >= (m * (m - 1)) / 2; (5) x[2] <= x[m]-x[m-1]; Does P conform to M (6) forall(ind1,ind2,ind3:(ind1.i==ind2.i)&&(ind2.j==ind3.i)&& (ind1.j==ind3.j)&&( ind1.i < ind2.j < ind1.j)) d[ind1]==d[ind2]+d[ind3]; m=8 (7) forall(ind1,ind2,ind3,ind4 in indexes2 : (ind1.i==ind2.i)&&(ind1.j==ind3.j)&&(ind2.j==ind4.j) &&(ind3.i==ind4.i)&&(ind1.i<m-1)&&(3<ind1.j<m+1) &&(2<ind2.j<m)&&(1<ind3.i<m-1)&& X= [0 1 3 6 10 26 27 28] (ind1.i < ind3.i < ind2.j < ind1.j)) d[ind1]==d[ind2]+d[ind3]-d[ind4]; 1 1 (8) forall(ind in indexes2, k in 1..m div 2) x[ind.i+1]==x[ind.i]+k => x[ind.j+1] != x[ind.j]+k; Fault detected in P ! } 4 /21

  16. Contributions • A first framework for testing constraint programs Definitions of testing notions Conformity relations: • Constraint solving problem • Optimization problem • A method and a tool, called CPTEST to detect non- conformities ( e.g., X= [0 1 3 6 10 26 27 28] ) • An experimental validation on two classical benchmarks (Golomb rulers, car sequencing) 5 /21

  17. Notations Model- Oracle M x (k ) 6 /21

  18. Notations Model- CPUT Oracle P z (k) M x (k ) 6 /21

  19. Notations Model- CPUT Oracle Conformity Relation P z (k) M x (k ) 6 /21

  20. Conformity relation in constraint solving problem  One Solution (conf k one ) 7 /21

  21. Conformity relation in constraint solving problem  One Solution (conf k one ) non-conform M : solutions set of M P : solutions set of P 7 /21

  22. Conformity relation in constraint solving problem  One Solution (conf k one ) non-conform M : solutions set of M P : solutions set of P 7 /21

  23. Conformity relation in constraint solving problem  One Solution (conf k one ) non-conform M : solutions set of M P : solutions set of P 7 /21

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend