9.51/3.40 YES 9.51/3.41 proof of /export/starexec/sandbox2/benchmark/theBenchmark.jar 9.51/3.41 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 9.51/3.41 9.51/3.41 9.51/3.41 termination of the given Bare JBC problem could be proven: 9.51/3.41 9.51/3.41 (0) Bare JBC problem 9.51/3.41 (1) BareJBCToJBCProof [EQUIVALENT, 95 ms] 9.51/3.41 (2) JBC problem 9.51/3.41 (3) JBCToGraph [EQUIVALENT, 184 ms] 9.51/3.41 (4) JBCTerminationGraph 9.51/3.41 (5) TerminationGraphToSCCProof [SOUND, 1 ms] 9.51/3.41 (6) JBCTerminationSCC 9.51/3.41 (7) SCCToIRSProof [SOUND, 75 ms] 9.51/3.41 (8) IRSwT 9.51/3.41 (9) IRSFormatTransformerProof [EQUIVALENT, 0 ms] 9.51/3.41 (10) IRSwT 9.51/3.41 (11) IRSwTTerminationDigraphProof [EQUIVALENT, 20 ms] 9.51/3.41 (12) IRSwT 9.51/3.41 (13) IntTRSCompressionProof [EQUIVALENT, 0 ms] 9.51/3.41 (14) IRSwT 9.51/3.41 (15) IRSwTChainingProof [EQUIVALENT, 0 ms] 9.51/3.41 (16) IRSwT 9.51/3.41 (17) IRSwTTerminationDigraphProof [EQUIVALENT, 16 ms] 9.51/3.41 (18) TRUE 9.51/3.41 9.51/3.41 9.51/3.41 ---------------------------------------- 9.51/3.41 9.51/3.41 (0) 9.51/3.41 Obligation: 9.51/3.41 need to prove termination of the following program: 9.51/3.41 public class Random { 9.51/3.41 static String[] args; 9.51/3.41 static int index = 0; 9.51/3.41 9.51/3.41 public static int random() { 9.51/3.41 String string = args[index]; 9.51/3.41 index++; 9.51/3.41 return string.length(); 9.51/3.41 } 9.51/3.41 } 9.51/3.41 9.51/3.41 9.51/3.41 public class Round3{ 9.51/3.41 public static void main(String[] args) { 9.51/3.41 Random.args = args; 9.51/3.41 int x = Random.random(); 9.51/3.41 9.51/3.41 while (x % 3 != 0) { 9.51/3.41 x++; 9.51/3.41 } 9.51/3.41 } 9.51/3.41 } 9.51/3.41 9.51/3.41 9.51/3.41 9.51/3.41 ---------------------------------------- 9.51/3.41 9.51/3.41 (1) BareJBCToJBCProof (EQUIVALENT) 9.51/3.41 initialized classpath 9.51/3.41 ---------------------------------------- 9.51/3.41 9.51/3.41 (2) 9.51/3.41 Obligation: 9.51/3.41 need to prove termination of the following program: 9.51/3.41 public class Random { 9.51/3.41 static String[] args; 9.51/3.41 static int index = 0; 9.51/3.41 9.51/3.41 public static int random() { 9.51/3.41 String string = args[index]; 9.51/3.41 index++; 9.51/3.41 return string.length(); 9.51/3.41 } 9.51/3.41 } 9.51/3.41 9.51/3.41 9.51/3.41 public class Round3{ 9.51/3.41 public static void main(String[] args) { 9.51/3.41 Random.args = args; 9.51/3.41 int x = Random.random(); 9.51/3.41 9.51/3.41 while (x % 3 != 0) { 9.51/3.41 x++; 9.51/3.41 } 9.51/3.41 } 9.51/3.41 } 9.51/3.41 9.51/3.41 9.51/3.41 9.51/3.41 ---------------------------------------- 9.51/3.41 9.51/3.41 (3) JBCToGraph (EQUIVALENT) 9.51/3.41 Constructed TerminationGraph. 9.51/3.41 ---------------------------------------- 9.51/3.41 9.51/3.41 (4) 9.51/3.41 Obligation: 9.51/3.41 Termination Graph based on JBC Program: 9.51/3.41 Round3.main([Ljava/lang/String;)V: Graph of 108 nodes with 1 SCC. 9.51/3.41 9.51/3.41 9.51/3.41 9.51/3.41 9.51/3.41 9.51/3.41 ---------------------------------------- 9.51/3.41 9.51/3.41 (5) TerminationGraphToSCCProof (SOUND) 9.51/3.41 Splitted TerminationGraph to 1 SCCs. 9.51/3.41 ---------------------------------------- 9.51/3.41 9.51/3.41 (6) 9.51/3.41 Obligation: 9.51/3.41 SCC of termination graph based on JBC Program. 9.51/3.41 SCC contains nodes from the following methods: Round3.main([Ljava/lang/String;)V 9.51/3.41 SCC calls the following helper methods: 9.51/3.41 Performed SCC analyses: 9.51/3.41 *Used field analysis yielded the following read fields: 9.51/3.41 9.51/3.41 *Marker field analysis yielded the following relations that could be markers: 9.51/3.41 9.51/3.41 ---------------------------------------- 9.51/3.41 9.51/3.41 (7) SCCToIRSProof (SOUND) 9.51/3.41 Transformed FIGraph SCCs to intTRSs. Log: 9.51/3.41 Generated rules. Obtained 8 IRulesP rules: 9.51/3.41 f124_0_main_ConstantStackPush(EOS(STATIC_124), i19, i19) -> f132_0_main_IntArithmetic(EOS(STATIC_132), i19, i19, 3) :|: TRUE 9.51/3.41 f132_0_main_IntArithmetic(EOS(STATIC_132), i19, i19, matching1) -> f140_0_main_EQ(EOS(STATIC_140), i19, i19 % 3) :|: TRUE && matching1 = 3 9.51/3.41 f140_0_main_EQ(EOS(STATIC_140), i19, i24) -> f148_0_main_EQ(EOS(STATIC_148), i19, i24) :|: TRUE 9.51/3.41 f148_0_main_EQ(EOS(STATIC_148), i19, i24) -> f162_0_main_Inc(EOS(STATIC_162), i19) :|: i24 > 0 9.51/3.41 f162_0_main_Inc(EOS(STATIC_162), i19) -> f173_0_main_JMP(EOS(STATIC_173), i19 + 1) :|: TRUE 9.51/3.41 f173_0_main_JMP(EOS(STATIC_173), i26) -> f244_0_main_Load(EOS(STATIC_244), i26) :|: TRUE 9.51/3.41 f244_0_main_Load(EOS(STATIC_244), i26) -> f114_0_main_Load(EOS(STATIC_114), i26) :|: TRUE 9.51/3.41 f114_0_main_Load(EOS(STATIC_114), i19) -> f124_0_main_ConstantStackPush(EOS(STATIC_124), i19, i19) :|: TRUE 9.51/3.41 Combined rules. Obtained 2 IRulesP rules: 9.51/3.41 f124_0_main_ConstantStackPush(EOS(STATIC_124), i19:0, i19:0) -> f124_0_main_ConstantStackPush'(EOS(STATIC_124), i19:0, i19:0) :|: i19:0 - 3 * div > 0 9.51/3.41 f124_0_main_ConstantStackPush'(EOS(STATIC_124), i19:0, i19:0) -> f124_0_main_ConstantStackPush(EOS(STATIC_124), i19:0 + 1, i19:0 + 1) :|: i19:0 - 3 * div < 3 && i19:0 - 3 * div > 0 9.51/3.41 Filtered constant ground arguments: 9.51/3.41 f124_0_main_ConstantStackPush(x1, x2, x3) -> f124_0_main_ConstantStackPush(x2, x3) 9.51/3.41 f124_0_main_ConstantStackPush'(x1, x2, x3) -> f124_0_main_ConstantStackPush'(x2, x3) 9.51/3.41 EOS(x1) -> EOS 9.51/3.41 Filtered duplicate arguments: 9.51/3.41 f124_0_main_ConstantStackPush(x1, x2) -> f124_0_main_ConstantStackPush(x2) 9.51/3.41 f124_0_main_ConstantStackPush'(x1, x2) -> f124_0_main_ConstantStackPush'(x2) 9.51/3.41 Finished conversion. Obtained 2 rules.P rules: 9.51/3.41 f124_0_main_ConstantStackPush(i19:0) -> f124_0_main_ConstantStackPush'(i19:0) :|: i19:0 - 3 * div > 0 9.51/3.41 f124_0_main_ConstantStackPush'(i19:0) -> f124_0_main_ConstantStackPush(i19:0 + 1) :|: i19:0 - 3 * div < 3 && i19:0 - 3 * div > 0 9.51/3.41 9.51/3.41 ---------------------------------------- 9.51/3.41 9.51/3.41 (8) 9.51/3.41 Obligation: 9.51/3.41 Rules: 9.51/3.41 f124_0_main_ConstantStackPush(x) -> f124_0_main_ConstantStackPush'(x) :|: x - 3 * x1 > 0 9.51/3.41 f124_0_main_ConstantStackPush'(x2) -> f124_0_main_ConstantStackPush(x2 + 1) :|: x2 - 3 * x3 < 3 && x2 - 3 * x3 > 0 9.51/3.41 9.51/3.41 ---------------------------------------- 9.51/3.41 9.51/3.41 (9) IRSFormatTransformerProof (EQUIVALENT) 9.51/3.41 Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %). 9.51/3.41 ---------------------------------------- 9.51/3.41 9.51/3.41 (10) 9.51/3.41 Obligation: 9.51/3.41 Rules: 9.51/3.41 f124_0_main_ConstantStackPush(x) -> f124_0_main_ConstantStackPush'(x) :|: x - 3 * x1 > 0 9.51/3.41 f124_0_main_ConstantStackPush'(x2) -> f124_0_main_ConstantStackPush(arith) :|: x2 - 3 * x3 < 3 && x2 - 3 * x3 > 0 && arith = x2 + 1 9.51/3.41 9.51/3.41 ---------------------------------------- 9.51/3.41 9.51/3.41 (11) IRSwTTerminationDigraphProof (EQUIVALENT) 9.51/3.41 Constructed termination digraph! 9.51/3.41 Nodes: 9.51/3.41 (1) f124_0_main_ConstantStackPush(x) -> f124_0_main_ConstantStackPush'(x) :|: x - 3 * x1 > 0 9.51/3.41 (2) f124_0_main_ConstantStackPush'(x2) -> f124_0_main_ConstantStackPush(arith) :|: x2 - 3 * x3 < 3 && x2 - 3 * x3 > 0 && arith = x2 + 1 9.51/3.41 9.51/3.41 Arcs: 9.51/3.41 (1) -> (2) 9.51/3.41 (2) -> (1) 9.51/3.41 9.51/3.41 This digraph is fully evaluated! 9.51/3.41 ---------------------------------------- 9.51/3.41 9.51/3.41 (12) 9.51/3.41 Obligation: 9.51/3.41 9.51/3.41 Termination digraph: 9.51/3.41 Nodes: 9.51/3.41 (1) f124_0_main_ConstantStackPush(x) -> f124_0_main_ConstantStackPush'(x) :|: x - 3 * x1 > 0 9.51/3.41 (2) f124_0_main_ConstantStackPush'(x2) -> f124_0_main_ConstantStackPush(arith) :|: x2 - 3 * x3 < 3 && x2 - 3 * x3 > 0 && arith = x2 + 1 9.51/3.41 9.51/3.41 Arcs: 9.51/3.41 (1) -> (2) 9.51/3.41 (2) -> (1) 9.51/3.41 9.51/3.41 This digraph is fully evaluated! 9.51/3.41 9.51/3.41 ---------------------------------------- 9.51/3.41 9.51/3.41 (13) IntTRSCompressionProof (EQUIVALENT) 9.51/3.41 Compressed rules. 9.51/3.41 ---------------------------------------- 9.51/3.41 9.51/3.41 (14) 9.51/3.41 Obligation: 9.51/3.41 Rules: 9.51/3.41 f124_0_main_ConstantStackPush(x:0) -> f124_0_main_ConstantStackPush(x:0 + 1) :|: x:0 - 3 * x3:0 < 3 && x:0 - 3 * x3:0 > 0 && x:0 - 3 * x1:0 > 0 9.51/3.41 9.51/3.41 ---------------------------------------- 9.51/3.41 9.51/3.41 (15) IRSwTChainingProof (EQUIVALENT) 9.51/3.41 Chaining! 9.51/3.41 ---------------------------------------- 9.51/3.41 9.51/3.41 (16) 9.51/3.41 Obligation: 9.51/3.41 Rules: 9.51/3.41 f124_0_main_ConstantStackPush(x) -> f124_0_main_ConstantStackPush(x + 2) :|: TRUE && x + -3 * x1 <= 2 && x + -3 * x1 >= 1 && x + -3 * x2 >= 1 && x + -3 * x4 <= 1 && x + -3 * x4 >= 0 && x + -3 * x5 >= 0 9.51/3.41 9.51/3.41 ---------------------------------------- 9.51/3.41 9.51/3.41 (17) IRSwTTerminationDigraphProof (EQUIVALENT) 9.51/3.41 Constructed termination digraph! 9.51/3.41 Nodes: 9.51/3.41 (1) f124_0_main_ConstantStackPush(x) -> f124_0_main_ConstantStackPush(x + 2) :|: TRUE && x + -3 * x1 <= 2 && x + -3 * x1 >= 1 && x + -3 * x2 >= 1 && x + -3 * x4 <= 1 && x + -3 * x4 >= 0 && x + -3 * x5 >= 0 9.51/3.41 9.51/3.41 No arcs! 9.51/3.41 9.51/3.41 This digraph is fully evaluated! 9.51/3.41 ---------------------------------------- 9.51/3.41 9.51/3.41 (18) 9.51/3.41 TRUE 9.51/3.45 EOF