5.97/2.47 YES 6.21/2.48 proof of /export/starexec/sandbox/benchmark/theBenchmark.jar 6.21/2.48 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 6.21/2.48 6.21/2.48 6.21/2.48 termination of the given Bare JBC problem could be proven: 6.21/2.48 6.21/2.48 (0) Bare JBC problem 6.21/2.48 (1) BareJBCToJBCProof [EQUIVALENT, 95 ms] 6.21/2.48 (2) JBC problem 6.21/2.48 (3) JBCToGraph [EQUIVALENT, 304 ms] 6.21/2.48 (4) JBCTerminationGraph 6.21/2.48 (5) TerminationGraphToSCCProof [SOUND, 0 ms] 6.21/2.48 (6) JBCTerminationSCC 6.21/2.48 (7) SCCToIRSProof [SOUND, 118 ms] 6.21/2.48 (8) IRSwT 6.21/2.48 (9) IRSFormatTransformerProof [EQUIVALENT, 0 ms] 6.21/2.48 (10) IRSwT 6.21/2.48 (11) IRSwTTerminationDigraphProof [EQUIVALENT, 0 ms] 6.21/2.48 (12) IRSwT 6.21/2.48 (13) IntTRSCompressionProof [EQUIVALENT, 0 ms] 6.21/2.48 (14) IRSwT 6.21/2.48 (15) TempFilterProof [SOUND, 18 ms] 6.21/2.48 (16) IntTRS 6.21/2.48 (17) PolynomialOrderProcessor [EQUIVALENT, 0 ms] 6.21/2.48 (18) YES 6.21/2.48 6.21/2.48 6.21/2.48 ---------------------------------------- 6.21/2.48 6.21/2.48 (0) 6.21/2.48 Obligation: 6.21/2.48 need to prove termination of the following program: 6.21/2.48 public class Duplicate{ 6.21/2.48 6.21/2.48 public static int round (int x) { 6.21/2.48 6.21/2.48 if (x % 2 == 0) return x; 6.21/2.48 else return x+1; 6.21/2.48 } 6.21/2.48 6.21/2.48 6.21/2.48 public static void main(String[] args) { 6.21/2.48 Random.args = args; 6.21/2.48 int x = Random.random(); 6.21/2.48 int y = Random.random(); 6.21/2.48 6.21/2.48 while ((x > y) && (y > 2)) { 6.21/2.48 x++; 6.21/2.48 y = 2*y; 6.21/2.48 6.21/2.48 } 6.21/2.48 } 6.21/2.48 } 6.21/2.48 6.21/2.48 6.21/2.48 public class Random { 6.21/2.48 static String[] args; 6.21/2.48 static int index = 0; 6.21/2.48 6.21/2.48 public static int random() { 6.21/2.48 String string = args[index]; 6.21/2.48 index++; 6.21/2.48 return string.length(); 6.21/2.48 } 6.21/2.48 } 6.21/2.48 6.21/2.48 6.21/2.48 6.21/2.48 ---------------------------------------- 6.21/2.48 6.21/2.48 (1) BareJBCToJBCProof (EQUIVALENT) 6.21/2.48 initialized classpath 6.21/2.48 ---------------------------------------- 6.21/2.48 6.21/2.48 (2) 6.21/2.48 Obligation: 6.21/2.48 need to prove termination of the following program: 6.21/2.48 public class Duplicate{ 6.21/2.48 6.21/2.48 public static int round (int x) { 6.21/2.48 6.21/2.48 if (x % 2 == 0) return x; 6.21/2.48 else return x+1; 6.21/2.48 } 6.21/2.48 6.21/2.48 6.21/2.48 public static void main(String[] args) { 6.21/2.48 Random.args = args; 6.21/2.48 int x = Random.random(); 6.21/2.48 int y = Random.random(); 6.21/2.48 6.21/2.48 while ((x > y) && (y > 2)) { 6.21/2.48 x++; 6.21/2.48 y = 2*y; 6.21/2.48 6.21/2.48 } 6.21/2.48 } 6.21/2.48 } 6.21/2.48 6.21/2.48 6.21/2.48 public class Random { 6.21/2.48 static String[] args; 6.21/2.48 static int index = 0; 6.21/2.48 6.21/2.48 public static int random() { 6.21/2.48 String string = args[index]; 6.21/2.48 index++; 6.21/2.48 return string.length(); 6.21/2.48 } 6.21/2.48 } 6.21/2.48 6.21/2.48 6.21/2.48 6.21/2.48 ---------------------------------------- 6.21/2.48 6.21/2.48 (3) JBCToGraph (EQUIVALENT) 6.21/2.48 Constructed TerminationGraph. 6.21/2.48 ---------------------------------------- 6.21/2.48 6.21/2.48 (4) 6.21/2.48 Obligation: 6.21/2.48 Termination Graph based on JBC Program: 6.21/2.48 Duplicate.main([Ljava/lang/String;)V: Graph of 184 nodes with 1 SCC. 6.21/2.48 6.21/2.48 6.21/2.48 6.21/2.48 6.21/2.48 6.21/2.48 ---------------------------------------- 6.21/2.48 6.21/2.48 (5) TerminationGraphToSCCProof (SOUND) 6.21/2.48 Splitted TerminationGraph to 1 SCCs. 6.21/2.48 ---------------------------------------- 6.21/2.48 6.21/2.48 (6) 6.21/2.48 Obligation: 6.21/2.48 SCC of termination graph based on JBC Program. 6.21/2.48 SCC contains nodes from the following methods: Duplicate.main([Ljava/lang/String;)V 6.21/2.48 SCC calls the following helper methods: 6.21/2.48 Performed SCC analyses: 6.21/2.48 *Used field analysis yielded the following read fields: 6.21/2.48 6.21/2.48 *Marker field analysis yielded the following relations that could be markers: 6.21/2.48 6.21/2.48 ---------------------------------------- 6.21/2.48 6.21/2.48 (7) SCCToIRSProof (SOUND) 6.21/2.48 Transformed FIGraph SCCs to intTRSs. Log: 6.21/2.48 Generated rules. Obtained 15 IRulesP rules: 6.21/2.48 f282_0_main_Load(EOS(STATIC_282), i14, i42, i14) -> f285_0_main_LE(EOS(STATIC_285), i14, i42, i14, i42) :|: TRUE 6.21/2.48 f285_0_main_LE(EOS(STATIC_285), i14, i42, i14, i42) -> f290_0_main_LE(EOS(STATIC_290), i14, i42, i14, i42) :|: i14 > i42 6.21/2.48 f290_0_main_LE(EOS(STATIC_290), i14, i42, i14, i42) -> f298_0_main_Load(EOS(STATIC_298), i14, i42) :|: i14 > i42 6.21/2.48 f298_0_main_Load(EOS(STATIC_298), i14, i42) -> f313_0_main_ConstantStackPush(EOS(STATIC_313), i14, i42, i42) :|: TRUE 6.21/2.48 f313_0_main_ConstantStackPush(EOS(STATIC_313), i14, i42, i42) -> f318_0_main_LE(EOS(STATIC_318), i14, i42, i42, 2) :|: TRUE 6.21/2.48 f318_0_main_LE(EOS(STATIC_318), i49, i48, i48, matching1) -> f322_0_main_LE(EOS(STATIC_322), i49, i48, i48, 2) :|: TRUE && matching1 = 2 6.21/2.48 f322_0_main_LE(EOS(STATIC_322), i49, i48, i48, matching1) -> f367_0_main_Inc(EOS(STATIC_367), i49, i48) :|: i48 > 2 && matching1 = 2 6.21/2.48 f367_0_main_Inc(EOS(STATIC_367), i49, i48) -> f370_0_main_ConstantStackPush(EOS(STATIC_370), i49 + 1, i48) :|: TRUE 6.21/2.48 f370_0_main_ConstantStackPush(EOS(STATIC_370), i54, i48) -> f375_0_main_Load(EOS(STATIC_375), i54, i48, 2) :|: TRUE 6.21/2.48 f375_0_main_Load(EOS(STATIC_375), i54, i48, matching1) -> f378_0_main_IntArithmetic(EOS(STATIC_378), i54, 2, i48) :|: TRUE && matching1 = 2 6.21/2.48 f378_0_main_IntArithmetic(EOS(STATIC_378), i54, matching1, i48) -> f382_0_main_Store(EOS(STATIC_382), i54, 2 * i48) :|: i48 > 1 && matching1 = 2 6.21/2.48 f382_0_main_Store(EOS(STATIC_382), i54, i55) -> f388_0_main_JMP(EOS(STATIC_388), i54, i55) :|: TRUE 6.21/2.48 f388_0_main_JMP(EOS(STATIC_388), i54, i55) -> f411_0_main_Load(EOS(STATIC_411), i54, i55) :|: TRUE 6.21/2.48 f411_0_main_Load(EOS(STATIC_411), i54, i55) -> f279_0_main_Load(EOS(STATIC_279), i54, i55) :|: TRUE 6.21/2.48 f279_0_main_Load(EOS(STATIC_279), i14, i42) -> f282_0_main_Load(EOS(STATIC_282), i14, i42, i14) :|: TRUE 6.21/2.48 Combined rules. Obtained 1 IRulesP rules: 6.21/2.48 f282_0_main_Load(EOS(STATIC_282), i14:0, i42:0, i14:0) -> f282_0_main_Load(EOS(STATIC_282), i14:0 + 1, 2 * i42:0, i14:0 + 1) :|: i42:0 > 2 && i42:0 < i14:0 6.21/2.48 Filtered constant ground arguments: 6.21/2.48 f282_0_main_Load(x1, x2, x3, x4) -> f282_0_main_Load(x2, x3, x4) 6.21/2.48 EOS(x1) -> EOS 6.21/2.48 Filtered duplicate arguments: 6.21/2.48 f282_0_main_Load(x1, x2, x3) -> f282_0_main_Load(x2, x3) 6.21/2.48 Finished conversion. Obtained 1 rules.P rules: 6.21/2.48 f282_0_main_Load(i42:0, i14:0) -> f282_0_main_Load(2 * i42:0, i14:0 + 1) :|: i42:0 > 2 && i42:0 < i14:0 6.21/2.48 6.21/2.48 ---------------------------------------- 6.21/2.48 6.21/2.48 (8) 6.21/2.48 Obligation: 6.21/2.48 Rules: 6.21/2.48 f282_0_main_Load(i42:0, i14:0) -> f282_0_main_Load(2 * i42:0, i14:0 + 1) :|: i42:0 > 2 && i42:0 < i14:0 6.21/2.48 6.21/2.48 ---------------------------------------- 6.21/2.48 6.21/2.48 (9) IRSFormatTransformerProof (EQUIVALENT) 6.21/2.48 Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %). 6.21/2.48 ---------------------------------------- 6.21/2.48 6.21/2.48 (10) 6.21/2.48 Obligation: 6.21/2.48 Rules: 6.21/2.48 f282_0_main_Load(i42:0, i14:0) -> f282_0_main_Load(arith, arith1) :|: i42:0 > 2 && i42:0 < i14:0 && arith = 2 * i42:0 && arith1 = i14:0 + 1 6.21/2.48 6.21/2.48 ---------------------------------------- 6.21/2.48 6.21/2.48 (11) IRSwTTerminationDigraphProof (EQUIVALENT) 6.21/2.48 Constructed termination digraph! 6.21/2.48 Nodes: 6.21/2.48 (1) f282_0_main_Load(i42:0, i14:0) -> f282_0_main_Load(arith, arith1) :|: i42:0 > 2 && i42:0 < i14:0 && arith = 2 * i42:0 && arith1 = i14:0 + 1 6.21/2.48 6.21/2.48 Arcs: 6.21/2.48 (1) -> (1) 6.21/2.48 6.21/2.48 This digraph is fully evaluated! 6.21/2.48 ---------------------------------------- 6.21/2.48 6.21/2.48 (12) 6.21/2.48 Obligation: 6.21/2.48 6.21/2.48 Termination digraph: 6.21/2.48 Nodes: 6.21/2.48 (1) f282_0_main_Load(i42:0, i14:0) -> f282_0_main_Load(arith, arith1) :|: i42:0 > 2 && i42:0 < i14:0 && arith = 2 * i42:0 && arith1 = i14:0 + 1 6.21/2.48 6.21/2.48 Arcs: 6.21/2.48 (1) -> (1) 6.21/2.48 6.21/2.48 This digraph is fully evaluated! 6.21/2.48 6.21/2.48 ---------------------------------------- 6.21/2.48 6.21/2.48 (13) IntTRSCompressionProof (EQUIVALENT) 6.21/2.48 Compressed rules. 6.21/2.48 ---------------------------------------- 6.21/2.48 6.21/2.48 (14) 6.21/2.48 Obligation: 6.21/2.48 Rules: 6.21/2.48 f282_0_main_Load(i42:0:0, i14:0:0) -> f282_0_main_Load(2 * i42:0:0, i14:0:0 + 1) :|: i42:0:0 > 2 && i42:0:0 < i14:0:0 6.21/2.48 6.21/2.48 ---------------------------------------- 6.21/2.48 6.21/2.48 (15) TempFilterProof (SOUND) 6.21/2.48 Used the following sort dictionary for filtering: 6.21/2.48 f282_0_main_Load(INTEGER, INTEGER) 6.21/2.48 Replaced non-predefined constructor symbols by 0. 6.21/2.48 ---------------------------------------- 6.21/2.48 6.21/2.48 (16) 6.21/2.48 Obligation: 6.21/2.48 Rules: 6.21/2.48 f282_0_main_Load(i42:0:0, i14:0:0) -> f282_0_main_Load(c, c1) :|: c1 = i14:0:0 + 1 && c = 2 * i42:0:0 && (i42:0:0 > 2 && i42:0:0 < i14:0:0) 6.21/2.48 6.21/2.48 ---------------------------------------- 6.21/2.48 6.21/2.48 (17) PolynomialOrderProcessor (EQUIVALENT) 6.21/2.48 Found the following polynomial interpretation: 6.21/2.48 [f282_0_main_Load(x, x1)] = -x + x1 6.21/2.48 6.21/2.48 The following rules are decreasing: 6.21/2.48 f282_0_main_Load(i42:0:0, i14:0:0) -> f282_0_main_Load(c, c1) :|: c1 = i14:0:0 + 1 && c = 2 * i42:0:0 && (i42:0:0 > 2 && i42:0:0 < i14:0:0) 6.21/2.48 The following rules are bounded: 6.21/2.48 f282_0_main_Load(i42:0:0, i14:0:0) -> f282_0_main_Load(c, c1) :|: c1 = i14:0:0 + 1 && c = 2 * i42:0:0 && (i42:0:0 > 2 && i42:0:0 < i14:0:0) 6.21/2.48 6.21/2.48 ---------------------------------------- 6.21/2.48 6.21/2.48 (18) 6.21/2.48 YES 6.21/2.53 EOF