Theorem Knuth and Bendix, 1970 TRS is terminating if it is KBO N terminating Theorem Dershowitz, 1979 TRS is terminating if it is KBO R � 0 terminating Dick, Kalmus, and Martin, 1990 Theorem KBO R � 0 termination is decidable within exponential time Theorem Korovin and Voronkov, 2001, 2003 TRS is KBO N terminating ⇐ ⇒ it is KBO R � 0 terminating KBO R � 0 termination is decidable within polynomial time Theorem Zankl and Middeldorp, 2007 KBO { 0 , 1 ,...,B } termination ( B ∈ N ) can reduce to SAT and PBC KBO Orientability 12/32
This Talk MAIN RESULT for every TRS R and N = � l → r ∈R ( | l | + | r | ) + 1 R is KBO N terminating ⇐ ⇒ R is KBO { 0 , 1 ,...,B } terminating where, B = N 4 N +1 KBO Orientability 13/32
This Talk MAIN RESULT for every TRS R and N = � l → r ∈R ( | l | + | r | ) + 1 R is KBO N terminating ⇐ ⇒ R is KBO { 0 , 1 ,...,B } terminating where, B = N 4 N +1 OVERVIEW OF PROOF Principal Solutions KBO Orientability 13/32
This Talk MAIN RESULT for every TRS R and N = � l → r ∈R ( | l | + | r | ) + 1 R is KBO N terminating ⇐ ⇒ R is KBO { 0 , 1 ,...,B } terminating where, B = N 4 N +1 OVERVIEW OF PROOF Principal Solutions MCD KBO Orientability 13/32
This Talk MAIN RESULT for every TRS R and N = � l → r ∈R ( | l | + | r | ) + 1 R is KBO N terminating ⇐ ⇒ R is KBO { 0 , 1 ,...,B } terminating where, B = N 4 N +1 OVERVIEW OF PROOF Principal Solutions MCD Bound by Norm KBO Orientability 13/32
Principal Solutions KBO Orientability 14/32
Example given precedence, KBO N problem reduces to linear integral constraints Example a ( a ( x )) → b ( b ( b ( x ))) b ( b ( b ( b ( b ( x ))))) → a ( a ( a ( x ))) KBO Orientability 15/32
Example given precedence, KBO N problem reduces to linear integral constraints Example a ( a ( x )) → b ( b ( b ( x ))) b ( b ( b ( b ( b ( x ))))) → a ( a ( a ( x ))) for precedence a > b, solve wrt w ( a ) , w ( b ) ∈ N 2 · w ( a ) − 3 · w ( b ) � 0 − 3 · w ( a ) + 5 · w ( b ) > 0 KBO Orientability 15/32
Example given precedence, KBO N problem reduces to linear integral constraints Example a ( a ( x )) → b ( b ( b ( x ))) b ( b ( b ( b ( b ( x ))))) → a ( a ( a ( x ))) for precedence a > b, solve wrt w ( a ) , w ( b ) ∈ N 2 · w ( a ) − 3 · w ( b ) � 0 − 3 · w ( a ) + 5 · w ( b ) > 0 for precedence > = ∅ solve wrt w ( a ) , w ( b ) ∈ N 2 · w ( a ) − 3 · w ( b ) > 0 − 3 · w ( a ) + 5 · w ( b ) > 0 KBO Orientability 15/32
Principal Solutions Gale, 1960; Dick, Kalmus and Martin, 1990; Korovin and Voronkov, 2003 set I of KBO inequalities are of form a i ∈ Z n , � { � a i · � x i R i 0 } i with R i ∈ { � , > } ,� x ∈ N KBO Orientability 16/32
Principal Solutions Gale, 1960; Dick, Kalmus and Martin, 1990; Korovin and Voronkov, 2003 set I of KBO inequalities are of form a i ∈ Z n , � { � a i · � x i R i 0 } i with R i ∈ { � , > } ,� x ∈ N Definition write A I for ( � a i ) 1 ,...,n KBO Orientability 16/32
Principal Solutions Gale, 1960; Dick, Kalmus and Martin, 1990; Korovin and Voronkov, 2003 set I of KBO inequalities are of form a i ∈ Z n , � { � a i · � x i R i 0 } i with R i ∈ { � , > } ,� x ∈ N Definition write A I for ( � a i ) 1 ,...,n x ∈ N n � x is solution of A I if A I � x � 0 and � KBO Orientability 16/32
Principal Solutions Gale, 1960; Dick, Kalmus and Martin, 1990; Korovin and Voronkov, 2003 set I of KBO inequalities are of form a i ∈ Z n , � { � a i · � x i R i 0 } i with R i ∈ { � , > } ,� x ∈ N Definition write A I for ( � a i ) 1 ,...,n x ∈ N n � x is solution of A I if A I � x � 0 and � solution � x maximizing { i | � a i · � x > 0 } wrt ⊆ is principal KBO Orientability 16/32
Principal Solutions Gale, 1960; Dick, Kalmus and Martin, 1990; Korovin and Voronkov, 2003 set I of KBO inequalities are of form a i ∈ Z n , � { � a i · � x i R i 0 } i with R i ∈ { � , > } ,� x ∈ N Definition write A I for ( � a i ) 1 ,...,n x ∈ N n � x is solution of A I if A I � x � 0 and � solution � x maximizing { i | � a i · � x > 0 } wrt ⊆ is principal Theorem principal solution of A always exists ∀ principal solution � x : ( I is solvable ⇐ ⇒ � x satisfies I ) KBO Orientability 16/32
� � � � 2 · w ( a ) − 3 · w ( b ) 0 2 − 3 > I = A I = − 3 · w ( a ) + 5 · w ( b ) 0 − 3 5 > KBO Orientability 17/32
� � � � 2 · w ( a ) − 3 · w ( b ) 0 2 − 3 > I = A I = − 3 · w ( a ) + 5 · w ( b ) 0 − 3 5 > since � 3 � � 0 � � 13 � � 2 � A I = A I = 2 1 8 1 � 3 � is not principal solution of A I 2 KBO Orientability 17/32
� � � � 2 · w ( a ) − 3 · w ( b ) 0 2 − 3 > I = A I = − 3 · w ( a ) + 5 · w ( b ) 0 − 3 5 > since � 3 � � 0 � � 13 � � 2 � A I = A I = 2 1 8 1 � 3 � is not principal solution of A I 2 � � 13 is principal solution of A I and satisfies I 8 hence I is solvable KBO Orientability 17/32
Example 2 · w ( a ) − 3 · w ( b ) > 0 2 − 3 I = − 3 · w ( a ) + 5 · w ( b ) > 0 A I = − 3 5 − 4 · w ( a ) + 3 · w ( b ) 0 − 4 3 � KBO Orientability 18/32
Example 2 · w ( a ) − 3 · w ( b ) > 0 2 − 3 I = − 3 · w ( a ) + 5 · w ( b ) > 0 A I = − 3 5 − 4 · w ( a ) + 3 · w ( b ) 0 − 4 3 � � 0 � principal solution of A I is and does not satisfy I 0 KBO Orientability 18/32
Example 2 · w ( a ) − 3 · w ( b ) > 0 2 − 3 I = − 3 · w ( a ) + 5 · w ( b ) > 0 A I = − 3 5 − 4 · w ( a ) + 3 · w ( b ) 0 − 4 3 � � 0 � principal solution of A I is and does not satisfy I 0 hence I is not solvable KBO Orientability 18/32
Example 2 · w ( a ) − 3 · w ( b ) > 0 2 − 3 I = − 3 · w ( a ) + 5 · w ( b ) > 0 A I = − 3 5 − 4 · w ( a ) + 3 · w ( b ) 0 − 4 3 � � 0 � principal solution of A I is and does not satisfy I 0 hence I is not solvable QUESTION how to find principal solution? KBO Orientability 18/32
Example 2 · w ( a ) − 3 · w ( b ) > 0 2 − 3 I = − 3 · w ( a ) + 5 · w ( b ) > 0 A I = − 3 5 − 4 · w ( a ) + 3 · w ( b ) 0 − 4 3 � � 0 � principal solution of A I is and does not satisfy I 0 hence I is not solvable QUESTION how to find principal solution? MCD ☞ KBO Orientability 18/32
MCD: Method of Complete Description KBO Orientability 19/32
MCD Dick, Kalmus and Martin, 1990 ( a 1 , . . . , a n ) κ = ( � e i | a i � 0) + +( a j � e i − a i � e j | a i < 0 , a j > 0) KBO Orientability 20/32
MCD Dick, Kalmus and Martin, 1990 ( a 1 , . . . , a n ) κ = ( � e i | a i � 0) + +( a j � e i − a i � e j | a i < 0 , a j > 0) for m × n matrix A and 0 � i � m � E n if i = 0 S A i = S A a i S A i − 1 ) κ i − 1 ( � otherwise KBO Orientability 20/32
MCD Dick, Kalmus and Martin, 1990 ( a 1 , . . . , a n ) κ = ( � e i | a i � 0) + +( a j � e i − a i � e j | a i < 0 , a j > 0) for m × n matrix A and 0 � i � m � E n if i = 0 S A i = S A a i S A i − 1 ) κ i − 1 ( � otherwise sum of all column vectors of S A s A m is denoted by � KBO Orientability 20/32
MCD Dick, Kalmus and Martin, 1990 ( a 1 , . . . , a n ) κ = ( � e i | a i � 0) + +( a j � e i − a i � e j | a i < 0 , a j > 0) for m × n matrix A and 0 � i � m � E n if i = 0 S A i = S A a i S A i − 1 ) κ i − 1 ( � otherwise sum of all column vectors of S A s A m is denoted by � Theorem s A is principal solution of A � KBO Orientability 20/32
Example � 2 � � � 2 · w ( a ) − 3 · w ( b ) 0 − 3 > I = A I = − 3 · w ( a ) + 5 · w ( b ) 0 − 3 5 > KBO Orientability 21/32
Example � 2 � � � 2 · w ( a ) − 3 · w ( b ) 0 − 3 > I = A I = − 3 · w ( a ) + 5 · w ( b ) 0 − 3 5 > performing MCD KBO Orientability 21/32
Example � 2 � � � 2 · w ( a ) − 3 · w ( b ) 0 − 3 > I = A I = − 3 · w ( a ) + 5 · w ( b ) 0 − 3 5 > performing MCD � � 1 0 S A I = 0 0 1 � 1 � 3 0 ) κ = S A I = S A I 0 ((2 − 3) S A I 1 0 2 � 3 � 10 1 ) κ = S A I = S A I 1 (( − 3 5) S A I 2 2 6 KBO Orientability 21/32
Example � 2 � � � 2 · w ( a ) − 3 · w ( b ) 0 − 3 > I = A I = − 3 · w ( a ) + 5 · w ( b ) 0 − 3 5 > performing MCD � � 1 0 S A I = 0 0 1 � 1 � 3 0 ) κ = S A I = S A I 0 ((2 − 3) S A I 1 0 2 � 3 � 10 1 ) κ = S A I = S A I 1 (( − 3 5) S A I 2 2 6 we obtain principal solution � � � � � � 3 10 13 s A I = � + = 2 6 8 KBO Orientability 21/32
Example � 2 � � � 2 · w ( a ) − 3 · w ( b ) 0 − 3 > I = A I = − 3 · w ( a ) + 5 · w ( b ) 0 − 3 5 > performing MCD � � 1 0 S A I = 0 0 1 � 1 � 3 0 ) κ = S A I = S A I 0 ((2 − 3) S A I 1 0 2 � 3 � 10 1 ) κ = S A I = S A I 1 (( − 3 5) S A I 2 2 6 we obtain principal solution � � � � � � 3 10 13 s A I = � + = 2 6 8 which satisfies I . hence I is solvable KBO Orientability 21/32
Bound by Norm KBO Orientability 22/32
MCD ( a 1 , . . . , a n ) κ = ( � e i | a i � 0) + +( a j � e i − a i � e j | a i < 0 , a j > 0) for m × n matrix A and 0 � i � m � if i = 0 E n S A i = S A a i S A i − 1 ) κ i − 1 ( � otherwise sum of all column vectors of S A s A m is denoted by � KBO Orientability 23/32
MCD ( a 1 , . . . , a n ) κ = ( � e i | a i � 0) + +( a j � e i − a i � e j | a i < 0 , a j > 0) for m × n matrix A and 0 � i � m � if i = 0 E n S A i = S A a i S A i − 1 ) κ i − 1 ( � otherwise sum of all column vectors of S A s A m is denoted by � GOAL s A ∈ { 0 , 1 , . . . , B } n bound � KBO Orientability 23/32
MCD ( a 1 , . . . , a n ) κ = ( � e i | a i � 0) + +( a j � e i − a i � e j | a i < 0 , a j > 0) for m × n matrix A and 0 � i � m � if i = 0 E n S A i = S A a i S A i − 1 ) κ i − 1 ( � otherwise sum of all column vectors of S A s A m is denoted by � GOAL s A ∈ { 0 , 1 , . . . , B } n bound � APPROACH s A I � with B = � � s A I � define norm � · � to calculate � � KBO Orientability 23/32
Norm Definition � A � = max i,j | a ij | for m × n matrix A = ( a ij ) ij KBO Orientability 24/32
Norm Definition � A � = max i,j | a ij | for m × n matrix A = ( a ij ) ij Lemma for every m × n matrix A and n × p matrix B � a κ � = � a � KBO Orientability 24/32
Norm Definition � A � = max i,j | a ij | for m × n matrix A = ( a ij ) ij Lemma for every m × n matrix A and n × p matrix B � a κ � = � a � � AB � � n � A �� B � KBO Orientability 24/32
Norm Definition � A � = max i,j | a ij | for m × n matrix A = ( a ij ) ij Lemma for every m × n matrix A and n × p matrix B � a κ � = � a � � AB � � n � A �� B � ( a 1 , . . . , a n ) κ is n × k matrix with k � n 2 . i is m × k matrix with k � n 2 i . S A KBO Orientability 24/32
Norm Definition � A � = max i,j | a ij | for m × n matrix A = ( a ij ) ij Lemma for every m × n matrix A and n × p matrix B � a κ � = � a � � AB � � n � A �� B � ( a 1 , . . . , a n ) κ is n × k matrix with k � n 2 . i is m × k matrix with k � n 2 i . S A i � � (2 m � A � ) 2 i − 1 � S A s A � � n 2 m · (2 m � A � ) 2 m − 1 � � KBO Orientability 24/32
Lemma let R be TRS of size N I be set of inequalities induced by KBO with fixed precedence A I be of size m × n m � N n � N � A I � � N therefore s A I � � N 4 N +1 := B � � thus, s A I ∈ { 0 , 1 , . . . , B } n � KBO Orientability 25/32
Main Result Theorem R is KBO N terminating ⇐ ⇒ R is KBO { 0 , 1 ,...,B } terminating where, B = N 4 N +1 KBO Orientability 26/32
Main Result Theorem R is KBO N terminating ⇐ ⇒ R is KBO { 0 , 1 ,...,B } terminating where, B = N 4 N +1 Corollary Zankl and Middeldorp’s SAT and PBC encodings are complete for this B KBO Orientability 26/32
Summary l → r ∈R ( | l | + | r | ) + 1 , and B = N 4 N +1 let R be TRS, N = � R is KBO R � 0 terminating ⇐ ⇒ R is KBO N terminating Korovin and Voronkov ⇐ ⇒ R is KBO { 0 , 1 ,...,B } terminating this talk KBO Orientability 27/32
Summary l → r ∈R ( | l | + | r | ) + 1 , and B = N 4 N +1 let R be TRS, N = � R is KBO R � 0 terminating ⇐ ⇒ R is KBO N terminating Korovin and Voronkov ⇐ ⇒ R is KBO { 0 , 1 ,...,B } terminating this talk theoretical interest of decidability issue is more or less closed KBO Orientability 27/32
Summary l → r ∈R ( | l | + | r | ) + 1 , and B = N 4 N +1 let R be TRS, N = � R is KBO R � 0 terminating ⇐ ⇒ R is KBO N terminating Korovin and Voronkov ⇐ ⇒ R is KBO { 0 , 1 ,...,B } terminating this talk theoretical interest of decidability issue is more or less closed how about automation? ☞ KBO Orientability 27/32
Automation KBO Orientability 28/32
Dick, Kalmus, and Martin, 1990 Theorem KBO R � 0 termination is decidable by MCD KBO Orientability 29/32
Dick, Kalmus, and Martin, 1990 Theorem KBO R � 0 termination is decidable by MCD Korovin and Voronkov, 2001, 2003 Theorem KBO R � 0 termination is decidable by Karmarkar/Khachiyan algorithm KBO Orientability 29/32
Dick, Kalmus, and Martin, 1990 Theorem KBO R � 0 termination is decidable by MCD Korovin and Voronkov, 2001, 2003 Theorem KBO R � 0 termination is decidable by Karmarkar/Khachiyan algorithm Zankl and Middeldorp, 2007 Theorem KBO { 0 , 1 ,...,B } termination ( B ∈ N ) is decidable via SAT/PBC encodings KBO Orientability 29/32
Dick, Kalmus, and Martin, 1990 Theorem KBO R � 0 termination is decidable by MCD Korovin and Voronkov, 2001, 2003 Theorem KBO R � 0 termination is decidable by Karmarkar/Khachiyan algorithm Zankl and Middeldorp, 2007 Theorem KBO { 0 , 1 ,...,B } termination ( B ∈ N ) is decidable via SAT/PBC encodings Theorem KBO R � 0 termination is decidable via SMT (linear arithmetic) encoding KBO Orientability 29/32
Experiments test-bed: 1381 TRSs from Termination Problem Data Base 4.0 KBO Orientability 30/32
Experiments test-bed: 1381 TRSs from Termination Problem Data Base 4.0 PC: 8 dual-core AMD Opteron 885, 2.6 GHz, 64 GB KBO Orientability 30/32
Experiments test-bed: 1381 TRSs from Termination Problem Data Base 4.0 PC: 8 dual-core AMD Opteron 885, 2.6 GHz, 64 GB 60 seconds timeout KBO Orientability 30/32
Experiments test-bed: 1381 TRSs from Termination Problem Data Base 4.0 PC: 8 dual-core AMD Opteron 885, 2.6 GHz, 64 GB 60 seconds timeout method( B ) total time (sec) #success #timeout MCD 444 102 7 KBO Orientability 30/32
Experiments test-bed: 1381 TRSs from Termination Problem Data Base 4.0 PC: 8 dual-core AMD Opteron 885, 2.6 GHz, 64 GB 60 seconds timeout method( B ) total time (sec) #success #timeout MCD 444 102 7 simplex 370 105 4 KBO Orientability 30/32
Experiments test-bed: 1381 TRSs from Termination Problem Data Base 4.0 PC: 8 dual-core AMD Opteron 885, 2.6 GHz, 64 GB 60 seconds timeout method( B ) total time (sec) #success #timeout MCD 444 102 7 simplex 370 105 4 SAT/PBC( 4 ) 31/90 104/104 0/0 KBO Orientability 30/32
Experiments test-bed: 1381 TRSs from Termination Problem Data Base 4.0 PC: 8 dual-core AMD Opteron 885, 2.6 GHz, 64 GB 60 seconds timeout method( B ) total time (sec) #success #timeout MCD 444 102 7 simplex 370 105 4 SAT/PBC( 4 ) 31/90 104/104 0/0 SAT/PBC( 8 ) 32/93 106/106 0/0 KBO Orientability 30/32
Experiments test-bed: 1381 TRSs from Termination Problem Data Base 4.0 PC: 8 dual-core AMD Opteron 885, 2.6 GHz, 64 GB 60 seconds timeout method( B ) total time (sec) #success #timeout MCD 444 102 7 simplex 370 105 4 SAT/PBC( 4 ) 31/90 104/104 0/0 SAT/PBC( 8 ) 32/93 106/106 0/0 SAT/PBC( 16 ) 34/100 107/107 0/0 KBO Orientability 30/32
Experiments test-bed: 1381 TRSs from Termination Problem Data Base 4.0 PC: 8 dual-core AMD Opteron 885, 2.6 GHz, 64 GB 60 seconds timeout method( B ) total time (sec) #success #timeout MCD 444 102 7 simplex 370 105 4 SAT/PBC( 4 ) 31/90 104/104 0/0 SAT/PBC( 8 ) 32/93 106/106 0/0 SAT/PBC( 16 ) 34/100 107/107 0/0 SAT/PBC( 1024 ) 351/187 107/107 3/1 KBO Orientability 30/32
Experiments test-bed: 1381 TRSs from Termination Problem Data Base 4.0 PC: 8 dual-core AMD Opteron 885, 2.6 GHz, 64 GB 60 seconds timeout method( B ) total time (sec) #success #timeout MCD 444 102 7 simplex 370 105 4 SAT/PBC( 4 ) 31/90 104/104 0/0 SAT/PBC( 8 ) 32/93 106/106 0/0 SAT/PBC( 16 ) 34/100 107/107 0/0 SAT/PBC( 1024 ) 351/187 107/107 3/1 SMT 26 107 0 KBO Orientability 30/32
Conclusion l → r ∈R ( | l | + | r | ) + 1 , and B = N 4 N +1 let R be TRS, N = � R is KBO R � 0 terminating ⇐ ⇒ R is KBO N terminating Korovin and Voronkov ⇐ ⇒ R is KBO { 0 , 1 ,...,B } terminating this talk CONCLUSION finite characterization of KBO orientability use SMT solver to automate KBO Orientability 31/32
Recommend
More recommend