6.16/2.67 YES 6.16/2.67 proof of /export/starexec/sandbox/benchmark/theBenchmark.jar 6.16/2.67 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 6.16/2.67 6.16/2.67 6.16/2.67 termination of the given Bare JBC problem could be proven: 6.16/2.67 6.16/2.67 (0) Bare JBC problem 6.16/2.67 (1) BareJBCToJBCProof [EQUIVALENT, 95 ms] 6.16/2.67 (2) JBC problem 6.16/2.67 (3) JBCToGraph [EQUIVALENT, 240 ms] 6.16/2.67 (4) JBCTerminationGraph 6.16/2.67 (5) TerminationGraphToSCCProof [SOUND, 0 ms] 6.16/2.67 (6) JBCTerminationSCC 6.16/2.67 (7) SCCToIRSProof [SOUND, 97 ms] 6.16/2.67 (8) IRSwT 6.16/2.67 (9) IRSFormatTransformerProof [EQUIVALENT, 0 ms] 6.16/2.67 (10) IRSwT 6.16/2.67 (11) IRSwTTerminationDigraphProof [EQUIVALENT, 24 ms] 6.16/2.67 (12) IRSwT 6.16/2.67 (13) IntTRSCompressionProof [EQUIVALENT, 0 ms] 6.16/2.67 (14) IRSwT 6.16/2.67 (15) TempFilterProof [SOUND, 39 ms] 6.16/2.67 (16) IntTRS 6.16/2.67 (17) PolynomialOrderProcessor [EQUIVALENT, 15 ms] 6.16/2.67 (18) YES 6.16/2.67 6.16/2.67 6.16/2.67 ---------------------------------------- 6.16/2.67 6.16/2.67 (0) 6.16/2.67 Obligation: 6.16/2.67 need to prove termination of the following program: 6.16/2.67 public class LogMult{ 6.16/2.67 6.16/2.67 public static int log(int x, int y) { 6.16/2.67 6.16/2.67 int res = 1; 6.16/2.67 6.16/2.67 if (x < 0 || y < 1) return 0; 6.16/2.67 else { 6.16/2.67 while (x > y) { 6.16/2.67 y = y*y; 6.16/2.67 res = 2*res; 6.16/2.67 } 6.16/2.67 } 6.16/2.67 return res; 6.16/2.67 6.16/2.67 } 6.16/2.67 6.16/2.67 6.16/2.67 6.16/2.67 6.16/2.67 6.16/2.67 public static void main(String[] args) { 6.16/2.67 Random.args = args; 6.16/2.67 6.16/2.67 int x = Random.random(); 6.16/2.67 log(x,2); 6.16/2.67 } 6.16/2.67 } 6.16/2.67 6.16/2.67 6.16/2.67 public class Random { 6.16/2.67 static String[] args; 6.16/2.67 static int index = 0; 6.16/2.67 6.16/2.67 public static int random() { 6.16/2.67 String string = args[index]; 6.16/2.67 index++; 6.16/2.67 return string.length(); 6.16/2.67 } 6.16/2.67 } 6.16/2.67 6.16/2.67 6.16/2.67 6.16/2.67 ---------------------------------------- 6.16/2.67 6.16/2.67 (1) BareJBCToJBCProof (EQUIVALENT) 6.16/2.67 initialized classpath 6.16/2.67 ---------------------------------------- 6.16/2.67 6.16/2.67 (2) 6.16/2.67 Obligation: 6.16/2.67 need to prove termination of the following program: 6.16/2.67 public class LogMult{ 6.16/2.67 6.16/2.67 public static int log(int x, int y) { 6.16/2.67 6.16/2.67 int res = 1; 6.16/2.67 6.16/2.67 if (x < 0 || y < 1) return 0; 6.16/2.67 else { 6.16/2.67 while (x > y) { 6.16/2.67 y = y*y; 6.16/2.67 res = 2*res; 6.16/2.67 } 6.16/2.67 } 6.16/2.67 return res; 6.16/2.67 6.16/2.67 } 6.16/2.67 6.16/2.67 6.16/2.67 6.16/2.67 6.16/2.67 6.16/2.67 public static void main(String[] args) { 6.16/2.67 Random.args = args; 6.16/2.67 6.16/2.67 int x = Random.random(); 6.16/2.67 log(x,2); 6.16/2.67 } 6.16/2.67 } 6.16/2.67 6.16/2.67 6.16/2.67 public class Random { 6.16/2.67 static String[] args; 6.16/2.67 static int index = 0; 6.16/2.67 6.16/2.67 public static int random() { 6.16/2.67 String string = args[index]; 6.16/2.67 index++; 6.16/2.67 return string.length(); 6.16/2.67 } 6.16/2.67 } 6.16/2.67 6.16/2.67 6.16/2.67 6.16/2.67 ---------------------------------------- 6.16/2.67 6.16/2.67 (3) JBCToGraph (EQUIVALENT) 6.16/2.67 Constructed TerminationGraph. 6.16/2.67 ---------------------------------------- 6.16/2.67 6.16/2.67 (4) 6.16/2.67 Obligation: 6.16/2.67 Termination Graph based on JBC Program: 6.16/2.67 LogMult.main([Ljava/lang/String;)V: Graph of 130 nodes with 1 SCC. 6.16/2.67 6.16/2.67 6.16/2.67 6.16/2.67 6.16/2.67 6.16/2.67 ---------------------------------------- 6.16/2.67 6.16/2.67 (5) TerminationGraphToSCCProof (SOUND) 6.16/2.67 Splitted TerminationGraph to 1 SCCs. 6.16/2.67 ---------------------------------------- 6.16/2.67 6.16/2.67 (6) 6.16/2.67 Obligation: 6.16/2.67 SCC of termination graph based on JBC Program. 6.16/2.67 SCC contains nodes from the following methods: LogMult.main([Ljava/lang/String;)V 6.16/2.67 SCC calls the following helper methods: 6.16/2.67 Performed SCC analyses: 6.16/2.67 *Used field analysis yielded the following read fields: 6.16/2.67 6.16/2.67 *Marker field analysis yielded the following relations that could be markers: 6.16/2.67 6.16/2.67 ---------------------------------------- 6.16/2.67 6.16/2.67 (7) SCCToIRSProof (SOUND) 6.16/2.67 Transformed FIGraph SCCs to intTRSs. Log: 6.16/2.67 Generated rules. Obtained 14 IRulesP rules: 6.16/2.67 f473_0_log_Load(EOS(STATIC_473), i64, i65, i64) -> f475_0_log_LE(EOS(STATIC_475), i64, i65, i64, i65) :|: TRUE 6.16/2.67 f475_0_log_LE(EOS(STATIC_475), i64, i65, i64, i65) -> f487_0_log_LE(EOS(STATIC_487), i64, i65, i64, i65) :|: i64 > i65 6.16/2.67 f487_0_log_LE(EOS(STATIC_487), i64, i65, i64, i65) -> f493_0_log_Load(EOS(STATIC_493), i64, i65) :|: i64 > i65 6.16/2.67 f493_0_log_Load(EOS(STATIC_493), i64, i65) -> f495_0_log_Load(EOS(STATIC_495), i64, i65, i65) :|: TRUE 6.16/2.67 f495_0_log_Load(EOS(STATIC_495), i64, i65, i65) -> f497_0_log_IntArithmetic(EOS(STATIC_497), i64, i65, i65) :|: TRUE 6.16/2.67 f497_0_log_IntArithmetic(EOS(STATIC_497), i64, i65, i65) -> f499_0_log_Store(EOS(STATIC_499), i64, i65 * i65) :|: i65 > 1 && i65 > 1 6.16/2.67 f499_0_log_Store(EOS(STATIC_499), i64, i75) -> f504_0_log_ConstantStackPush(EOS(STATIC_504), i64, i75) :|: TRUE 6.16/2.67 f504_0_log_ConstantStackPush(EOS(STATIC_504), i64, i75) -> f505_0_log_Load(EOS(STATIC_505), i64, i75) :|: TRUE 6.16/2.67 f505_0_log_Load(EOS(STATIC_505), i64, i75) -> f509_0_log_IntArithmetic(EOS(STATIC_509), i64, i75) :|: TRUE 6.16/2.67 f509_0_log_IntArithmetic(EOS(STATIC_509), i64, i75) -> f512_0_log_Store(EOS(STATIC_512), i64, i75) :|: TRUE 6.16/2.67 f512_0_log_Store(EOS(STATIC_512), i64, i75) -> f513_0_log_JMP(EOS(STATIC_513), i64, i75) :|: TRUE 6.16/2.67 f513_0_log_JMP(EOS(STATIC_513), i64, i75) -> f525_0_log_Load(EOS(STATIC_525), i64, i75) :|: TRUE 6.16/2.67 f525_0_log_Load(EOS(STATIC_525), i64, i75) -> f471_0_log_Load(EOS(STATIC_471), i64, i75) :|: TRUE 6.16/2.67 f471_0_log_Load(EOS(STATIC_471), i64, i65) -> f473_0_log_Load(EOS(STATIC_473), i64, i65, i64) :|: TRUE 6.16/2.67 Combined rules. Obtained 1 IRulesP rules: 6.16/2.67 f473_0_log_Load(EOS(STATIC_473), i64:0, i65:0, i64:0) -> f473_0_log_Load(EOS(STATIC_473), i64:0, i65:0 * i65:0, i64:0) :|: i65:0 < i64:0 && i65:0 > 1 6.16/2.67 Filtered constant ground arguments: 6.16/2.67 f473_0_log_Load(x1, x2, x3, x4) -> f473_0_log_Load(x2, x3, x4) 6.16/2.67 EOS(x1) -> EOS 6.16/2.67 Filtered duplicate arguments: 6.16/2.67 f473_0_log_Load(x1, x2, x3) -> f473_0_log_Load(x2, x3) 6.16/2.67 Finished conversion. Obtained 1 rules.P rules: 6.16/2.67 f473_0_log_Load(i65:0, i64:0) -> f473_0_log_Load(i65:0 * i65:0, i64:0) :|: i65:0 < i64:0 && i65:0 > 1 6.16/2.67 6.16/2.67 ---------------------------------------- 6.16/2.67 6.16/2.67 (8) 6.16/2.67 Obligation: 6.16/2.67 Rules: 6.16/2.67 f473_0_log_Load(i65:0, i64:0) -> f473_0_log_Load(i65:0 * i65:0, i64:0) :|: i65:0 < i64:0 && i65:0 > 1 6.16/2.67 6.16/2.67 ---------------------------------------- 6.16/2.67 6.16/2.67 (9) IRSFormatTransformerProof (EQUIVALENT) 6.16/2.67 Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %). 6.16/2.67 ---------------------------------------- 6.16/2.67 6.16/2.67 (10) 6.16/2.67 Obligation: 6.16/2.67 Rules: 6.16/2.67 f473_0_log_Load(i65:0, i64:0) -> f473_0_log_Load(arith, i64:0) :|: i65:0 < i64:0 && i65:0 > 1 && arith = i65:0 * i65:0 6.16/2.67 6.16/2.67 ---------------------------------------- 6.16/2.67 6.16/2.67 (11) IRSwTTerminationDigraphProof (EQUIVALENT) 6.16/2.67 Constructed termination digraph! 6.16/2.67 Nodes: 6.16/2.67 (1) f473_0_log_Load(i65:0, i64:0) -> f473_0_log_Load(arith, i64:0) :|: i65:0 < i64:0 && i65:0 > 1 && arith = i65:0 * i65:0 6.16/2.67 6.16/2.67 Arcs: 6.16/2.67 (1) -> (1) 6.16/2.67 6.16/2.67 This digraph is fully evaluated! 6.16/2.67 ---------------------------------------- 6.16/2.67 6.16/2.67 (12) 6.16/2.67 Obligation: 6.16/2.67 6.16/2.67 Termination digraph: 6.16/2.67 Nodes: 6.16/2.67 (1) f473_0_log_Load(i65:0, i64:0) -> f473_0_log_Load(arith, i64:0) :|: i65:0 < i64:0 && i65:0 > 1 && arith = i65:0 * i65:0 6.16/2.68 6.16/2.68 Arcs: 6.16/2.68 (1) -> (1) 6.16/2.68 6.16/2.68 This digraph is fully evaluated! 6.16/2.68 6.16/2.68 ---------------------------------------- 6.16/2.68 6.16/2.68 (13) IntTRSCompressionProof (EQUIVALENT) 6.16/2.68 Compressed rules. 6.16/2.68 ---------------------------------------- 6.16/2.68 6.16/2.68 (14) 6.16/2.68 Obligation: 6.16/2.68 Rules: 6.16/2.68 f473_0_log_Load(i65:0:0, i64:0:0) -> f473_0_log_Load(i65:0:0 * i65:0:0, i64:0:0) :|: i65:0:0 < i64:0:0 && i65:0:0 > 1 6.16/2.68 6.16/2.68 ---------------------------------------- 6.16/2.68 6.16/2.68 (15) TempFilterProof (SOUND) 6.16/2.68 Used the following sort dictionary for filtering: 6.16/2.68 f473_0_log_Load(INTEGER, INTEGER) 6.16/2.68 Replaced non-predefined constructor symbols by 0. 6.16/2.68 ---------------------------------------- 6.16/2.68 6.16/2.68 (16) 6.16/2.68 Obligation: 6.16/2.68 Rules: 6.16/2.68 f473_0_log_Load(i65:0:0, i64:0:0) -> f473_0_log_Load(c, i64:0:0) :|: c = i65:0:0 * i65:0:0 && (i65:0:0 < i64:0:0 && i65:0:0 > 1) 6.16/2.68 6.16/2.68 ---------------------------------------- 6.16/2.68 6.16/2.68 (17) PolynomialOrderProcessor (EQUIVALENT) 6.16/2.68 Found the following polynomial interpretation: 6.16/2.68 [f473_0_log_Load(x, x1)] = -x + x1 6.16/2.68 6.16/2.68 The following rules are decreasing: 6.16/2.68 f473_0_log_Load(i65:0:0, i64:0:0) -> f473_0_log_Load(c, i64:0:0) :|: c = i65:0:0 * i65:0:0 && (i65:0:0 < i64:0:0 && i65:0:0 > 1) 6.16/2.68 The following rules are bounded: 6.16/2.68 f473_0_log_Load(i65:0:0, i64:0:0) -> f473_0_log_Load(c, i64:0:0) :|: c = i65:0:0 * i65:0:0 && (i65:0:0 < i64:0:0 && i65:0:0 > 1) 6.16/2.68 6.16/2.68 ---------------------------------------- 6.16/2.68 6.16/2.68 (18) 6.16/2.68 YES 6.80/2.79 EOF