6.40/2.58 YES 6.40/2.59 proof of /export/starexec/sandbox/benchmark/theBenchmark.jar 6.40/2.59 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 6.40/2.59 6.40/2.59 6.40/2.59 termination of the given Bare JBC problem could be proven: 6.40/2.59 6.40/2.59 (0) Bare JBC problem 6.40/2.59 (1) BareJBCToJBCProof [EQUIVALENT, 96 ms] 6.40/2.59 (2) JBC problem 6.40/2.59 (3) JBCToGraph [EQUIVALENT, 400 ms] 6.40/2.59 (4) JBCTerminationGraph 6.40/2.59 (5) TerminationGraphToSCCProof [SOUND, 0 ms] 6.40/2.59 (6) JBCTerminationSCC 6.40/2.59 (7) SCCToIRSProof [SOUND, 49 ms] 6.40/2.59 (8) IRSwT 6.40/2.59 (9) IRSFormatTransformerProof [EQUIVALENT, 0 ms] 6.40/2.59 (10) IRSwT 6.40/2.59 (11) IRSwTTerminationDigraphProof [EQUIVALENT, 5 ms] 6.40/2.59 (12) IRSwT 6.40/2.59 (13) IntTRSCompressionProof [EQUIVALENT, 0 ms] 6.40/2.59 (14) IRSwT 6.40/2.59 (15) TempFilterProof [SOUND, 40 ms] 6.40/2.59 (16) IntTRS 6.40/2.59 (17) PolynomialOrderProcessor [EQUIVALENT, 11 ms] 6.40/2.59 (18) YES 6.40/2.59 6.40/2.59 6.40/2.59 ---------------------------------------- 6.40/2.59 6.40/2.59 (0) 6.40/2.59 Obligation: 6.40/2.59 need to prove termination of the following program: 6.40/2.59 public class MinusMin{ 6.40/2.59 6.40/2.59 public static int min (int x, int y) { 6.40/2.59 6.40/2.59 if (x < y) return x; 6.40/2.59 else return y; 6.40/2.59 } 6.40/2.59 6.40/2.59 6.40/2.59 public static void main(String[] args) { 6.40/2.59 Random.args = args; 6.40/2.59 int x = Random.random(); 6.40/2.59 int y = Random.random(); 6.40/2.59 int res = 0; 6.40/2.59 6.40/2.59 6.40/2.59 6.40/2.59 while (min(x-1,y) == y) { 6.40/2.59 6.40/2.59 y++; 6.40/2.59 res++; 6.40/2.59 6.40/2.59 } 6.40/2.59 6.40/2.59 6.40/2.59 } 6.40/2.59 6.40/2.59 } 6.40/2.59 6.40/2.59 6.40/2.59 public class Random { 6.40/2.59 static String[] args; 6.40/2.59 static int index = 0; 6.40/2.59 6.40/2.59 public static int random() { 6.40/2.59 String string = args[index]; 6.40/2.59 index++; 6.40/2.59 return string.length(); 6.40/2.59 } 6.40/2.59 } 6.40/2.59 6.40/2.59 6.40/2.59 6.40/2.59 ---------------------------------------- 6.40/2.59 6.40/2.59 (1) BareJBCToJBCProof (EQUIVALENT) 6.40/2.59 initialized classpath 6.40/2.59 ---------------------------------------- 6.40/2.59 6.40/2.59 (2) 6.40/2.59 Obligation: 6.40/2.59 need to prove termination of the following program: 6.40/2.59 public class MinusMin{ 6.40/2.59 6.40/2.59 public static int min (int x, int y) { 6.40/2.59 6.40/2.59 if (x < y) return x; 6.40/2.59 else return y; 6.40/2.59 } 6.40/2.59 6.40/2.59 6.40/2.59 public static void main(String[] args) { 6.40/2.59 Random.args = args; 6.40/2.59 int x = Random.random(); 6.40/2.59 int y = Random.random(); 6.40/2.59 int res = 0; 6.40/2.59 6.40/2.59 6.40/2.59 6.40/2.59 while (min(x-1,y) == y) { 6.40/2.59 6.40/2.59 y++; 6.40/2.59 res++; 6.40/2.59 6.40/2.59 } 6.40/2.59 6.40/2.59 6.40/2.59 } 6.40/2.59 6.40/2.59 } 6.40/2.59 6.40/2.59 6.40/2.59 public class Random { 6.40/2.59 static String[] args; 6.40/2.59 static int index = 0; 6.40/2.59 6.40/2.59 public static int random() { 6.40/2.59 String string = args[index]; 6.40/2.59 index++; 6.40/2.59 return string.length(); 6.40/2.59 } 6.40/2.59 } 6.40/2.59 6.40/2.59 6.40/2.59 6.40/2.59 ---------------------------------------- 6.40/2.59 6.40/2.59 (3) JBCToGraph (EQUIVALENT) 6.40/2.59 Constructed TerminationGraph. 6.40/2.59 ---------------------------------------- 6.40/2.59 6.40/2.59 (4) 6.40/2.59 Obligation: 6.40/2.59 Termination Graph based on JBC Program: 6.40/2.59 MinusMin.main([Ljava/lang/String;)V: Graph of 194 nodes with 1 SCC. 6.40/2.59 6.40/2.59 6.40/2.59 6.40/2.59 6.40/2.59 6.40/2.59 ---------------------------------------- 6.40/2.59 6.40/2.59 (5) TerminationGraphToSCCProof (SOUND) 6.40/2.59 Splitted TerminationGraph to 1 SCCs. 6.40/2.59 ---------------------------------------- 6.40/2.59 6.40/2.59 (6) 6.40/2.59 Obligation: 6.40/2.59 SCC of termination graph based on JBC Program. 6.40/2.59 SCC contains nodes from the following methods: MinusMin.main([Ljava/lang/String;)V 6.40/2.59 SCC calls the following helper methods: 6.40/2.59 Performed SCC analyses: 6.40/2.59 *Used field analysis yielded the following read fields: 6.40/2.59 6.40/2.59 *Marker field analysis yielded the following relations that could be markers: 6.40/2.59 6.40/2.59 ---------------------------------------- 6.40/2.59 6.40/2.59 (7) SCCToIRSProof (SOUND) 6.40/2.59 Transformed FIGraph SCCs to intTRSs. Log: 6.40/2.59 Generated rules. Obtained 17 IRulesP rules: 6.40/2.59 f656_0_main_ConstantStackPush(EOS(STATIC_656), i19, i92, i19) -> f658_0_main_IntArithmetic(EOS(STATIC_658), i19, i92, i19, 1) :|: TRUE 6.40/2.59 f658_0_main_IntArithmetic(EOS(STATIC_658), i19, i92, i19, matching1) -> f659_0_main_Load(EOS(STATIC_659), i19, i92, i19 - 1) :|: i19 >= 0 && matching1 = 1 6.40/2.59 f659_0_main_Load(EOS(STATIC_659), i19, i92, i99) -> f660_0_main_InvokeMethod(EOS(STATIC_660), i19, i92, i99, i92) :|: TRUE 6.40/2.59 f660_0_main_InvokeMethod(EOS(STATIC_660), i19, i92, i99, i92) -> f661_0_min_Load(EOS(STATIC_661), i19, i92, i99, i92) :|: TRUE 6.40/2.59 f661_0_min_Load(EOS(STATIC_661), i19, i92, i99, i92) -> f662_0_min_Load(EOS(STATIC_662), i19, i92, i99, i92, i99) :|: TRUE 6.40/2.59 f662_0_min_Load(EOS(STATIC_662), i19, i92, i99, i92, i99) -> f663_0_min_GE(EOS(STATIC_663), i19, i92, i99, i92, i99, i92) :|: TRUE 6.40/2.59 f663_0_min_GE(EOS(STATIC_663), i19, i92, i99, i92, i99, i92) -> f667_0_min_GE(EOS(STATIC_667), i19, i92, i99, i92, i99, i92) :|: i99 >= i92 6.40/2.59 f667_0_min_GE(EOS(STATIC_667), i19, i92, i99, i92, i99, i92) -> f676_0_min_Load(EOS(STATIC_676), i19, i92, i92) :|: i99 >= i92 6.40/2.59 f676_0_min_Load(EOS(STATIC_676), i19, i92, i92) -> f679_0_min_Return(EOS(STATIC_679), i19, i92, i92) :|: TRUE 6.40/2.59 f679_0_min_Return(EOS(STATIC_679), i19, i92, i92) -> f681_0_main_Load(EOS(STATIC_681), i19, i92, i92) :|: TRUE 6.40/2.59 f681_0_main_Load(EOS(STATIC_681), i19, i92, i92) -> f691_0_main_NE(EOS(STATIC_691), i19, i92, i92, i92) :|: TRUE 6.40/2.59 f691_0_main_NE(EOS(STATIC_691), i19, i92, i92, i92) -> f709_0_main_Inc(EOS(STATIC_709), i19, i92) :|: TRUE 6.40/2.59 f709_0_main_Inc(EOS(STATIC_709), i19, i92) -> f723_0_main_Inc(EOS(STATIC_723), i19, i92 + 1) :|: TRUE 6.40/2.59 f723_0_main_Inc(EOS(STATIC_723), i19, i106) -> f726_0_main_JMP(EOS(STATIC_726), i19, i106) :|: TRUE 6.40/2.59 f726_0_main_JMP(EOS(STATIC_726), i19, i106) -> f741_0_main_Load(EOS(STATIC_741), i19, i106) :|: TRUE 6.40/2.59 f741_0_main_Load(EOS(STATIC_741), i19, i106) -> f651_0_main_Load(EOS(STATIC_651), i19, i106) :|: TRUE 6.40/2.59 f651_0_main_Load(EOS(STATIC_651), i19, i92) -> f656_0_main_ConstantStackPush(EOS(STATIC_656), i19, i92, i19) :|: TRUE 6.40/2.59 Combined rules. Obtained 1 IRulesP rules: 6.40/2.59 f656_0_main_ConstantStackPush(EOS(STATIC_656), i19:0, i92:0, i19:0) -> f656_0_main_ConstantStackPush(EOS(STATIC_656), i19:0, i92:0 + 1, i19:0) :|: i19:0 > -1 && i92:0 <= i19:0 - 1 6.40/2.59 Filtered constant ground arguments: 6.40/2.59 f656_0_main_ConstantStackPush(x1, x2, x3, x4) -> f656_0_main_ConstantStackPush(x2, x3, x4) 6.40/2.59 EOS(x1) -> EOS 6.40/2.59 Filtered duplicate arguments: 6.40/2.59 f656_0_main_ConstantStackPush(x1, x2, x3) -> f656_0_main_ConstantStackPush(x2, x3) 6.40/2.59 Finished conversion. Obtained 1 rules.P rules: 6.40/2.59 f656_0_main_ConstantStackPush(i92:0, i19:0) -> f656_0_main_ConstantStackPush(i92:0 + 1, i19:0) :|: i19:0 > -1 && i92:0 <= i19:0 - 1 6.40/2.59 6.40/2.59 ---------------------------------------- 6.40/2.59 6.40/2.59 (8) 6.40/2.59 Obligation: 6.40/2.59 Rules: 6.40/2.59 f656_0_main_ConstantStackPush(i92:0, i19:0) -> f656_0_main_ConstantStackPush(i92:0 + 1, i19:0) :|: i19:0 > -1 && i92:0 <= i19:0 - 1 6.40/2.59 6.40/2.59 ---------------------------------------- 6.40/2.59 6.40/2.59 (9) IRSFormatTransformerProof (EQUIVALENT) 6.40/2.59 Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %). 6.40/2.59 ---------------------------------------- 6.40/2.59 6.40/2.59 (10) 6.40/2.59 Obligation: 6.40/2.59 Rules: 6.40/2.59 f656_0_main_ConstantStackPush(i92:0, i19:0) -> f656_0_main_ConstantStackPush(arith, i19:0) :|: i19:0 > -1 && i92:0 <= i19:0 - 1 && arith = i92:0 + 1 6.40/2.59 6.40/2.59 ---------------------------------------- 6.40/2.59 6.40/2.59 (11) IRSwTTerminationDigraphProof (EQUIVALENT) 6.40/2.59 Constructed termination digraph! 6.40/2.59 Nodes: 6.40/2.59 (1) f656_0_main_ConstantStackPush(i92:0, i19:0) -> f656_0_main_ConstantStackPush(arith, i19:0) :|: i19:0 > -1 && i92:0 <= i19:0 - 1 && arith = i92:0 + 1 6.40/2.59 6.40/2.59 Arcs: 6.40/2.59 (1) -> (1) 6.40/2.59 6.40/2.59 This digraph is fully evaluated! 6.40/2.59 ---------------------------------------- 6.40/2.59 6.40/2.59 (12) 6.40/2.59 Obligation: 6.40/2.59 6.40/2.59 Termination digraph: 6.40/2.59 Nodes: 6.40/2.59 (1) f656_0_main_ConstantStackPush(i92:0, i19:0) -> f656_0_main_ConstantStackPush(arith, i19:0) :|: i19:0 > -1 && i92:0 <= i19:0 - 1 && arith = i92:0 + 1 6.40/2.59 6.40/2.59 Arcs: 6.40/2.59 (1) -> (1) 6.40/2.59 6.40/2.59 This digraph is fully evaluated! 6.40/2.59 6.40/2.59 ---------------------------------------- 6.40/2.59 6.40/2.59 (13) IntTRSCompressionProof (EQUIVALENT) 6.40/2.59 Compressed rules. 6.40/2.59 ---------------------------------------- 6.40/2.59 6.40/2.59 (14) 6.40/2.59 Obligation: 6.40/2.59 Rules: 6.40/2.59 f656_0_main_ConstantStackPush(i92:0:0, i19:0:0) -> f656_0_main_ConstantStackPush(i92:0:0 + 1, i19:0:0) :|: i19:0:0 > -1 && i92:0:0 <= i19:0:0 - 1 6.40/2.59 6.40/2.59 ---------------------------------------- 6.40/2.59 6.40/2.59 (15) TempFilterProof (SOUND) 6.40/2.59 Used the following sort dictionary for filtering: 6.40/2.59 f656_0_main_ConstantStackPush(INTEGER, INTEGER) 6.40/2.59 Replaced non-predefined constructor symbols by 0. 6.40/2.59 ---------------------------------------- 6.40/2.59 6.40/2.59 (16) 6.40/2.59 Obligation: 6.40/2.59 Rules: 6.40/2.59 f656_0_main_ConstantStackPush(i92:0:0, i19:0:0) -> f656_0_main_ConstantStackPush(c, i19:0:0) :|: c = i92:0:0 + 1 && (i19:0:0 > -1 && i92:0:0 <= i19:0:0 - 1) 6.40/2.59 6.40/2.59 ---------------------------------------- 6.40/2.59 6.40/2.59 (17) PolynomialOrderProcessor (EQUIVALENT) 6.40/2.59 Found the following polynomial interpretation: 6.40/2.59 [f656_0_main_ConstantStackPush(x, x1)] = -x + x1 6.40/2.59 6.40/2.59 The following rules are decreasing: 6.40/2.59 f656_0_main_ConstantStackPush(i92:0:0, i19:0:0) -> f656_0_main_ConstantStackPush(c, i19:0:0) :|: c = i92:0:0 + 1 && (i19:0:0 > -1 && i92:0:0 <= i19:0:0 - 1) 6.40/2.59 The following rules are bounded: 6.40/2.59 f656_0_main_ConstantStackPush(i92:0:0, i19:0:0) -> f656_0_main_ConstantStackPush(c, i19:0:0) :|: c = i92:0:0 + 1 && (i19:0:0 > -1 && i92:0:0 <= i19:0:0 - 1) 6.40/2.59 6.40/2.59 ---------------------------------------- 6.40/2.59 6.40/2.59 (18) 6.40/2.59 YES 6.40/2.63 EOF