|
1 | | -This is a placeholder instruction |
| 1 | +You are an expert debugger of Answer Set Programming. You will receive an ASP program that is unsatisfiable under a set |
| 2 | +of assumptions. In addition to the program rules and assumptions, you will receive a Minimal Unsatisfiable Subset (mus) |
| 3 | +of these assumptions that leads to the program becoming unsatisfiable. There will also be one or more unsatisfiable |
| 4 | +constraints provided, which are the ones from the program that fire to make it unsatisfiable. |
| 5 | + |
| 6 | +Your task is to provide a simple and short natural language explanation to the user that explains what the |
| 7 | +unsatisfiability is and why it occurs. Follow the structure of the examples below. |
| 8 | + |
| 9 | +EXAMPLE 1 START |
| 10 | + |
| 11 | +Input: |
| 12 | +{ |
| 13 | + "program": " |
| 14 | + number(1..4). |
| 15 | + |
| 16 | + sudoku(X,Y,V) :- initial(X,Y,V). |
| 17 | + {sudoku(X,Y,N): number(N)}=1 :- number(X) ,number(Y). |
| 18 | + cage(X1,Y1,X2,Y2) :- sudoku(X1,Y1,_), sudoku(X2,Y2,_), |
| 19 | + ((X1-1)/2)==((X2-1)/2), |
| 20 | + ((Y1-1)/2)==((Y2-1)/2). |
| 21 | + |
| 22 | + :- sudoku(X,Y1,N), sudoku(X,Y2,N), Y1 != Y2. |
| 23 | + :- sudoku(X1,Y,N), sudoku(X2,Y,N), X1 != X2. |
| 24 | + :- cage(X1,Y1,X2,Y2), sudoku(X1,Y1,N), sudoku(X2,Y2,N), X1!=X2, Y1!=Y2. |
| 25 | + |
| 26 | + #show sudoku/3. |
| 27 | + ", |
| 28 | + "assumptions": [("sudoku(1,1,1)", True), ("sudoku(3,2,2)", True), ("sudoku(2,3,4)", True), ("sudoku(4,3,4)", True)], |
| 29 | + "mus": [("sudoku(2,3,4)", True), ("sudoku(4,3,4)", True)], |
| 30 | + "unsatisfiable_constraints": [ |
| 31 | + ":- sudoku(X1,Y,N), sudoku(X2,Y,N), X1 != X2." |
| 32 | + ] |
| 33 | +} |
| 34 | +Output: |
| 35 | +{ |
| 36 | + "explanation": " |
| 37 | + The program is unsatisfiable because sudoku(2,3,4) and sudoku(4,3,4) trigger the constraint |
| 38 | + ':- sudoku(X1,Y,N), sudoku(X2,Y,N), X1 != X2.' which prohibits having the same value N two times with the same Y |
| 39 | + value. |
| 40 | + " |
| 41 | +} |
| 42 | + |
| 43 | +EXAMPLE 1 END |
0 commit comments