6.28/2.58 YES 6.28/2.60 proof of /export/starexec/sandbox/benchmark/theBenchmark.jar 6.28/2.60 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 6.28/2.60 6.28/2.60 6.28/2.60 termination of the given Bare JBC problem could be proven: 6.28/2.60 6.28/2.60 (0) Bare JBC problem 6.28/2.60 (1) BareJBCToJBCProof [EQUIVALENT, 96 ms] 6.28/2.60 (2) JBC problem 6.28/2.60 (3) JBCToGraph [EQUIVALENT, 320 ms] 6.28/2.60 (4) JBCTerminationGraph 6.28/2.60 (5) TerminationGraphToSCCProof [SOUND, 0 ms] 6.28/2.60 (6) JBCTerminationSCC 6.28/2.60 (7) SCCToIRSProof [SOUND, 55 ms] 6.28/2.60 (8) IRSwT 6.28/2.60 (9) IRSFormatTransformerProof [EQUIVALENT, 0 ms] 6.28/2.60 (10) IRSwT 6.28/2.60 (11) IRSwTTerminationDigraphProof [EQUIVALENT, 0 ms] 6.28/2.60 (12) IRSwT 6.28/2.60 (13) IntTRSCompressionProof [EQUIVALENT, 0 ms] 6.28/2.60 (14) IRSwT 6.28/2.60 (15) TempFilterProof [SOUND, 45 ms] 6.28/2.60 (16) IntTRS 6.28/2.60 (17) PolynomialOrderProcessor [EQUIVALENT, 0 ms] 6.28/2.60 (18) YES 6.28/2.60 6.28/2.60 6.28/2.60 ---------------------------------------- 6.28/2.60 6.28/2.60 (0) 6.28/2.60 Obligation: 6.28/2.60 need to prove termination of the following program: 6.28/2.60 public class PlusSwap{ 6.28/2.60 public static void main(String[] args) { 6.28/2.60 Random.args = args; 6.28/2.60 int x = Random.random(); 6.28/2.60 int y = Random.random(); 6.28/2.60 int z; 6.28/2.60 int res = 0; 6.28/2.60 6.28/2.60 while (y > 0) { 6.28/2.60 6.28/2.60 z = x; 6.28/2.60 x = y-1; 6.28/2.60 y = z; 6.28/2.60 res++; 6.28/2.60 6.28/2.60 } 6.28/2.60 6.28/2.60 res = res + x; 6.28/2.60 } 6.28/2.60 } 6.28/2.60 6.28/2.60 6.28/2.60 public class Random { 6.28/2.60 static String[] args; 6.28/2.60 static int index = 0; 6.28/2.60 6.28/2.60 public static int random() { 6.28/2.60 String string = args[index]; 6.28/2.60 index++; 6.28/2.60 return string.length(); 6.28/2.60 } 6.28/2.60 } 6.28/2.60 6.28/2.60 6.28/2.60 6.28/2.60 ---------------------------------------- 6.28/2.60 6.28/2.60 (1) BareJBCToJBCProof (EQUIVALENT) 6.28/2.60 initialized classpath 6.28/2.60 ---------------------------------------- 6.28/2.60 6.28/2.60 (2) 6.28/2.60 Obligation: 6.28/2.60 need to prove termination of the following program: 6.28/2.60 public class PlusSwap{ 6.28/2.60 public static void main(String[] args) { 6.28/2.60 Random.args = args; 6.28/2.60 int x = Random.random(); 6.28/2.60 int y = Random.random(); 6.28/2.60 int z; 6.28/2.60 int res = 0; 6.28/2.60 6.28/2.60 while (y > 0) { 6.28/2.60 6.28/2.60 z = x; 6.28/2.60 x = y-1; 6.28/2.60 y = z; 6.28/2.60 res++; 6.28/2.60 6.28/2.60 } 6.28/2.60 6.28/2.60 res = res + x; 6.28/2.60 } 6.28/2.60 } 6.28/2.60 6.28/2.60 6.28/2.60 public class Random { 6.28/2.60 static String[] args; 6.28/2.60 static int index = 0; 6.28/2.60 6.28/2.60 public static int random() { 6.28/2.60 String string = args[index]; 6.28/2.60 index++; 6.28/2.60 return string.length(); 6.28/2.60 } 6.28/2.60 } 6.28/2.60 6.28/2.60 6.28/2.60 6.28/2.60 ---------------------------------------- 6.28/2.60 6.28/2.60 (3) JBCToGraph (EQUIVALENT) 6.28/2.60 Constructed TerminationGraph. 6.28/2.60 ---------------------------------------- 6.28/2.60 6.28/2.60 (4) 6.28/2.60 Obligation: 6.28/2.60 Termination Graph based on JBC Program: 6.28/2.60 PlusSwap.main([Ljava/lang/String;)V: Graph of 190 nodes with 1 SCC. 6.28/2.60 6.28/2.60 6.28/2.60 6.28/2.60 6.28/2.60 6.28/2.60 ---------------------------------------- 6.28/2.60 6.28/2.60 (5) TerminationGraphToSCCProof (SOUND) 6.28/2.60 Splitted TerminationGraph to 1 SCCs. 6.28/2.60 ---------------------------------------- 6.28/2.60 6.28/2.60 (6) 6.28/2.60 Obligation: 6.28/2.60 SCC of termination graph based on JBC Program. 6.28/2.60 SCC contains nodes from the following methods: PlusSwap.main([Ljava/lang/String;)V 6.28/2.60 SCC calls the following helper methods: 6.28/2.60 Performed SCC analyses: 6.28/2.60 *Used field analysis yielded the following read fields: 6.28/2.60 6.28/2.60 *Marker field analysis yielded the following relations that could be markers: 6.28/2.60 6.28/2.60 ---------------------------------------- 6.28/2.60 6.28/2.60 (7) SCCToIRSProof (SOUND) 6.28/2.60 Transformed FIGraph SCCs to intTRSs. Log: 6.28/2.60 Generated rules. Obtained 14 IRulesP rules: 6.28/2.60 f1518_0_main_LE(EOS(STATIC_1518), i234, i251, i251) -> f1521_0_main_LE(EOS(STATIC_1521), i234, i251, i251) :|: TRUE 6.28/2.60 f1521_0_main_LE(EOS(STATIC_1521), i234, i251, i251) -> f1525_0_main_Load(EOS(STATIC_1525), i234, i251) :|: i251 > 0 6.28/2.60 f1525_0_main_Load(EOS(STATIC_1525), i234, i251) -> f1528_0_main_Store(EOS(STATIC_1528), i251, i234) :|: TRUE 6.28/2.60 f1528_0_main_Store(EOS(STATIC_1528), i251, i234) -> f1534_0_main_Load(EOS(STATIC_1534), i251, i234) :|: TRUE 6.28/2.60 f1534_0_main_Load(EOS(STATIC_1534), i251, i234) -> f1538_0_main_ConstantStackPush(EOS(STATIC_1538), i234, i251) :|: TRUE 6.28/2.60 f1538_0_main_ConstantStackPush(EOS(STATIC_1538), i234, i251) -> f1543_0_main_IntArithmetic(EOS(STATIC_1543), i234, i251, 1) :|: TRUE 6.28/2.60 f1543_0_main_IntArithmetic(EOS(STATIC_1543), i234, i251, matching1) -> f1548_0_main_Store(EOS(STATIC_1548), i234, i251 - 1) :|: i251 > 0 && matching1 = 1 6.28/2.60 f1548_0_main_Store(EOS(STATIC_1548), i234, i256) -> f1550_0_main_Load(EOS(STATIC_1550), i256, i234) :|: TRUE 6.28/2.60 f1550_0_main_Load(EOS(STATIC_1550), i256, i234) -> f1552_0_main_Store(EOS(STATIC_1552), i256, i234) :|: TRUE 6.28/2.60 f1552_0_main_Store(EOS(STATIC_1552), i256, i234) -> f1555_0_main_Inc(EOS(STATIC_1555), i256, i234) :|: TRUE 6.28/2.60 f1555_0_main_Inc(EOS(STATIC_1555), i256, i234) -> f1557_0_main_JMP(EOS(STATIC_1557), i256, i234) :|: TRUE 6.28/2.60 f1557_0_main_JMP(EOS(STATIC_1557), i256, i234) -> f1631_0_main_Load(EOS(STATIC_1631), i256, i234) :|: TRUE 6.28/2.60 f1631_0_main_Load(EOS(STATIC_1631), i256, i234) -> f1512_0_main_Load(EOS(STATIC_1512), i256, i234) :|: TRUE 6.28/2.60 f1512_0_main_Load(EOS(STATIC_1512), i234, i235) -> f1518_0_main_LE(EOS(STATIC_1518), i234, i235, i235) :|: TRUE 6.28/2.60 Combined rules. Obtained 1 IRulesP rules: 6.28/2.60 f1518_0_main_LE(EOS(STATIC_1518), i234:0, i251:0, i251:0) -> f1518_0_main_LE(EOS(STATIC_1518), i251:0 - 1, i234:0, i234:0) :|: i251:0 > 0 6.28/2.60 Filtered constant ground arguments: 6.28/2.60 f1518_0_main_LE(x1, x2, x3, x4) -> f1518_0_main_LE(x2, x3, x4) 6.28/2.60 EOS(x1) -> EOS 6.28/2.60 Filtered duplicate arguments: 6.28/2.60 f1518_0_main_LE(x1, x2, x3) -> f1518_0_main_LE(x1, x3) 6.28/2.60 Finished conversion. Obtained 1 rules.P rules: 6.28/2.60 f1518_0_main_LE(i234:0, i251:0) -> f1518_0_main_LE(i251:0 - 1, i234:0) :|: i251:0 > 0 6.28/2.60 6.28/2.60 ---------------------------------------- 6.28/2.60 6.28/2.60 (8) 6.28/2.60 Obligation: 6.28/2.60 Rules: 6.28/2.60 f1518_0_main_LE(i234:0, i251:0) -> f1518_0_main_LE(i251:0 - 1, i234:0) :|: i251:0 > 0 6.28/2.60 6.28/2.60 ---------------------------------------- 6.28/2.60 6.28/2.60 (9) IRSFormatTransformerProof (EQUIVALENT) 6.28/2.60 Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %). 6.28/2.60 ---------------------------------------- 6.28/2.60 6.28/2.60 (10) 6.28/2.60 Obligation: 6.28/2.60 Rules: 6.28/2.60 f1518_0_main_LE(i234:0, i251:0) -> f1518_0_main_LE(arith, i234:0) :|: i251:0 > 0 && arith = i251:0 - 1 6.28/2.60 6.28/2.60 ---------------------------------------- 6.28/2.60 6.28/2.60 (11) IRSwTTerminationDigraphProof (EQUIVALENT) 6.28/2.60 Constructed termination digraph! 6.28/2.60 Nodes: 6.28/2.60 (1) f1518_0_main_LE(i234:0, i251:0) -> f1518_0_main_LE(arith, i234:0) :|: i251:0 > 0 && arith = i251:0 - 1 6.28/2.60 6.28/2.60 Arcs: 6.28/2.60 (1) -> (1) 6.28/2.60 6.28/2.60 This digraph is fully evaluated! 6.28/2.60 ---------------------------------------- 6.28/2.60 6.28/2.60 (12) 6.28/2.60 Obligation: 6.28/2.60 6.28/2.60 Termination digraph: 6.28/2.60 Nodes: 6.28/2.60 (1) f1518_0_main_LE(i234:0, i251:0) -> f1518_0_main_LE(arith, i234:0) :|: i251:0 > 0 && arith = i251:0 - 1 6.28/2.60 6.28/2.60 Arcs: 6.28/2.60 (1) -> (1) 6.28/2.60 6.28/2.60 This digraph is fully evaluated! 6.28/2.60 6.28/2.60 ---------------------------------------- 6.28/2.60 6.28/2.60 (13) IntTRSCompressionProof (EQUIVALENT) 6.28/2.60 Compressed rules. 6.28/2.60 ---------------------------------------- 6.28/2.60 6.28/2.60 (14) 6.28/2.60 Obligation: 6.28/2.60 Rules: 6.28/2.60 f1518_0_main_LE(i234:0:0, i251:0:0) -> f1518_0_main_LE(i251:0:0 - 1, i234:0:0) :|: i251:0:0 > 0 6.28/2.60 6.28/2.60 ---------------------------------------- 6.28/2.60 6.28/2.60 (15) TempFilterProof (SOUND) 6.28/2.60 Used the following sort dictionary for filtering: 6.28/2.60 f1518_0_main_LE(VARIABLE, VARIABLE) 6.28/2.60 Replaced non-predefined constructor symbols by 0. 6.28/2.60 ---------------------------------------- 6.28/2.60 6.28/2.60 (16) 6.28/2.60 Obligation: 6.28/2.60 Rules: 6.28/2.60 f1518_0_main_LE(i234:0:0, i251:0:0) -> f1518_0_main_LE(c, i234:0:0) :|: c = i251:0:0 - 1 && i251:0:0 > 0 6.28/2.60 6.28/2.60 ---------------------------------------- 6.28/2.60 6.28/2.60 (17) PolynomialOrderProcessor (EQUIVALENT) 6.28/2.60 Found the following polynomial interpretation: 6.28/2.60 [f1518_0_main_LE(x, x1)] = x^2 + x1^2 6.28/2.60 6.28/2.60 The following rules are decreasing: 6.28/2.60 f1518_0_main_LE(i234:0:0, i251:0:0) -> f1518_0_main_LE(c, i234:0:0) :|: c = i251:0:0 - 1 && i251:0:0 > 0 6.28/2.60 The following rules are bounded: 6.28/2.60 f1518_0_main_LE(i234:0:0, i251:0:0) -> f1518_0_main_LE(c, i234:0:0) :|: c = i251:0:0 - 1 && i251:0:0 > 0 6.28/2.60 6.28/2.60 ---------------------------------------- 6.28/2.60 6.28/2.60 (18) 6.28/2.60 YES 6.58/2.63 EOF