7.32/2.81 YES 7.32/2.86 proof of /export/starexec/sandbox/benchmark/theBenchmark.jar 7.32/2.86 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 7.32/2.86 7.32/2.86 7.32/2.86 termination of the given Bare JBC problem could be proven: 7.32/2.86 7.32/2.86 (0) Bare JBC problem 7.32/2.86 (1) BareJBCToJBCProof [EQUIVALENT, 95 ms] 7.32/2.86 (2) JBC problem 7.32/2.86 (3) JBCToGraph [EQUIVALENT, 367 ms] 7.32/2.86 (4) JBCTerminationGraph 7.32/2.86 (5) TerminationGraphToSCCProof [SOUND, 0 ms] 7.32/2.86 (6) JBCTerminationSCC 7.32/2.86 (7) SCCToIRSProof [SOUND, 109 ms] 7.32/2.86 (8) IRSwT 7.32/2.86 (9) IRSFormatTransformerProof [EQUIVALENT, 0 ms] 7.32/2.86 (10) IRSwT 7.32/2.86 (11) IRSwTTerminationDigraphProof [EQUIVALENT, 54 ms] 7.32/2.86 (12) IRSwT 7.32/2.86 (13) IntTRSCompressionProof [EQUIVALENT, 0 ms] 7.32/2.86 (14) IRSwT 7.32/2.86 (15) TempFilterProof [SOUND, 49 ms] 7.32/2.86 (16) IntTRS 7.32/2.86 (17) PolynomialOrderProcessor [EQUIVALENT, 1 ms] 7.32/2.86 (18) IntTRS 7.32/2.86 (19) PolynomialOrderProcessor [EQUIVALENT, 0 ms] 7.32/2.86 (20) YES 7.32/2.86 7.32/2.86 7.32/2.86 ---------------------------------------- 7.32/2.86 7.32/2.86 (0) 7.32/2.86 Obligation: 7.32/2.86 need to prove termination of the following program: 7.32/2.86 /** 7.32/2.86 * Example taken from "A Term Rewriting Approach to the Automated Termination 7.32/2.86 * Analysis of Imperative Programs" (http://www.cs.unm.edu/~spf/papers/2009-02.pdf) 7.32/2.86 * and converted to Java. 7.32/2.86 */ 7.32/2.86 7.32/2.86 public class PastaC1 { 7.32/2.86 public static void main(String[] args) { 7.32/2.86 Random.args = args; 7.32/2.86 int x = Random.random(); 7.32/2.86 7.32/2.86 while (x >= 0) { 7.32/2.86 int y = 1; 7.32/2.86 while (x > y) { 7.32/2.86 y = 2*y; 7.32/2.86 } 7.32/2.86 x--; 7.32/2.86 } 7.32/2.86 } 7.32/2.86 } 7.32/2.86 7.32/2.86 7.32/2.86 public class Random { 7.32/2.86 static String[] args; 7.32/2.86 static int index = 0; 7.32/2.86 7.32/2.86 public static int random() { 7.32/2.86 String string = args[index]; 7.32/2.86 index++; 7.32/2.86 return string.length(); 7.32/2.86 } 7.32/2.86 } 7.32/2.86 7.32/2.86 7.32/2.86 7.32/2.86 ---------------------------------------- 7.32/2.86 7.32/2.86 (1) BareJBCToJBCProof (EQUIVALENT) 7.32/2.86 initialized classpath 7.32/2.86 ---------------------------------------- 7.32/2.86 7.32/2.86 (2) 7.32/2.86 Obligation: 7.32/2.86 need to prove termination of the following program: 7.32/2.86 /** 7.32/2.86 * Example taken from "A Term Rewriting Approach to the Automated Termination 7.32/2.86 * Analysis of Imperative Programs" (http://www.cs.unm.edu/~spf/papers/2009-02.pdf) 7.32/2.86 * and converted to Java. 7.32/2.86 */ 7.32/2.86 7.32/2.86 public class PastaC1 { 7.32/2.86 public static void main(String[] args) { 7.32/2.86 Random.args = args; 7.32/2.86 int x = Random.random(); 7.32/2.86 7.32/2.86 while (x >= 0) { 7.32/2.86 int y = 1; 7.32/2.86 while (x > y) { 7.32/2.86 y = 2*y; 7.32/2.86 } 7.32/2.86 x--; 7.32/2.86 } 7.32/2.86 } 7.32/2.86 } 7.32/2.86 7.32/2.86 7.32/2.86 public class Random { 7.32/2.86 static String[] args; 7.32/2.86 static int index = 0; 7.32/2.86 7.32/2.86 public static int random() { 7.32/2.86 String string = args[index]; 7.32/2.86 index++; 7.32/2.86 return string.length(); 7.32/2.86 } 7.32/2.86 } 7.32/2.86 7.32/2.86 7.32/2.86 7.32/2.86 ---------------------------------------- 7.32/2.86 7.32/2.86 (3) JBCToGraph (EQUIVALENT) 7.32/2.86 Constructed TerminationGraph. 7.32/2.86 ---------------------------------------- 7.32/2.86 7.32/2.86 (4) 7.32/2.86 Obligation: 7.32/2.86 Termination Graph based on JBC Program: 7.32/2.86 PastaC1.main([Ljava/lang/String;)V: Graph of 124 nodes with 1 SCC. 7.32/2.86 7.32/2.86 7.32/2.86 7.32/2.86 7.32/2.86 7.32/2.86 ---------------------------------------- 7.32/2.86 7.32/2.86 (5) TerminationGraphToSCCProof (SOUND) 7.32/2.86 Splitted TerminationGraph to 1 SCCs. 7.32/2.86 ---------------------------------------- 7.32/2.86 7.32/2.86 (6) 7.32/2.86 Obligation: 7.32/2.86 SCC of termination graph based on JBC Program. 7.32/2.86 SCC contains nodes from the following methods: PastaC1.main([Ljava/lang/String;)V 7.32/2.86 SCC calls the following helper methods: 7.32/2.86 Performed SCC analyses: 7.32/2.86 *Used field analysis yielded the following read fields: 7.32/2.86 7.32/2.86 *Marker field analysis yielded the following relations that could be markers: 7.32/2.86 7.32/2.86 ---------------------------------------- 7.32/2.86 7.32/2.86 (7) SCCToIRSProof (SOUND) 7.32/2.86 Transformed FIGraph SCCs to intTRSs. Log: 7.32/2.86 Generated rules. Obtained 23 IRulesP rules: 7.32/2.86 f813_0_main_LT(EOS(STATIC_813), i83, i83) -> f817_0_main_LT(EOS(STATIC_817), i83, i83) :|: TRUE 7.32/2.86 f817_0_main_LT(EOS(STATIC_817), i83, i83) -> f819_0_main_ConstantStackPush(EOS(STATIC_819), i83) :|: i83 >= 0 7.32/2.86 f819_0_main_ConstantStackPush(EOS(STATIC_819), i83) -> f821_0_main_Store(EOS(STATIC_821), i83, 1) :|: TRUE 7.32/2.86 f821_0_main_Store(EOS(STATIC_821), i83, matching1) -> f823_0_main_Load(EOS(STATIC_823), i83, 1) :|: TRUE && matching1 = 1 7.32/2.86 f823_0_main_Load(EOS(STATIC_823), i83, matching1) -> f905_0_main_Load(EOS(STATIC_905), i83, 1) :|: TRUE && matching1 = 1 7.32/2.86 f905_0_main_Load(EOS(STATIC_905), i92, i93) -> f954_0_main_Load(EOS(STATIC_954), i92, i93) :|: TRUE 7.32/2.86 f954_0_main_Load(EOS(STATIC_954), i102, i103) -> f984_0_main_Load(EOS(STATIC_984), i102, i103) :|: TRUE 7.32/2.86 f984_0_main_Load(EOS(STATIC_984), i111, i112) -> f985_0_main_Load(EOS(STATIC_985), i111, i112, i111) :|: TRUE 7.32/2.86 f985_0_main_Load(EOS(STATIC_985), i111, i112, i111) -> f986_0_main_LE(EOS(STATIC_986), i111, i112, i111, i112) :|: TRUE 7.32/2.86 f986_0_main_LE(EOS(STATIC_986), i111, i112, i111, i112) -> f991_0_main_LE(EOS(STATIC_991), i111, i112, i111, i112) :|: i111 <= i112 7.32/2.86 f986_0_main_LE(EOS(STATIC_986), i111, i112, i111, i112) -> f992_0_main_LE(EOS(STATIC_992), i111, i112, i111, i112) :|: i111 > i112 7.32/2.86 f991_0_main_LE(EOS(STATIC_991), i111, i112, i111, i112) -> f998_0_main_Inc(EOS(STATIC_998), i111) :|: i111 <= i112 7.32/2.86 f998_0_main_Inc(EOS(STATIC_998), i111) -> f1004_0_main_JMP(EOS(STATIC_1004), i111 + -1) :|: TRUE 7.32/2.86 f1004_0_main_JMP(EOS(STATIC_1004), i118) -> f1008_0_main_Load(EOS(STATIC_1008), i118) :|: TRUE 7.32/2.86 f1008_0_main_Load(EOS(STATIC_1008), i118) -> f808_0_main_Load(EOS(STATIC_808), i118) :|: TRUE 7.32/2.86 f808_0_main_Load(EOS(STATIC_808), i80) -> f813_0_main_LT(EOS(STATIC_813), i80, i80) :|: TRUE 7.32/2.86 f992_0_main_LE(EOS(STATIC_992), i111, i112, i111, i112) -> f1003_0_main_ConstantStackPush(EOS(STATIC_1003), i111, i112) :|: i111 > i112 7.32/2.86 f1003_0_main_ConstantStackPush(EOS(STATIC_1003), i111, i112) -> f1006_0_main_Load(EOS(STATIC_1006), i111, i112, 2) :|: TRUE 7.32/2.86 f1006_0_main_Load(EOS(STATIC_1006), i111, i112, matching1) -> f1009_0_main_IntArithmetic(EOS(STATIC_1009), i111, 2, i112) :|: TRUE && matching1 = 2 7.32/2.86 f1009_0_main_IntArithmetic(EOS(STATIC_1009), i111, matching1, i112) -> f1010_0_main_Store(EOS(STATIC_1010), i111, 2 * i112) :|: i112 >= 1 && matching1 = 2 7.32/2.86 f1010_0_main_Store(EOS(STATIC_1010), i111, i120) -> f1012_0_main_JMP(EOS(STATIC_1012), i111, i120) :|: TRUE 7.32/2.86 f1012_0_main_JMP(EOS(STATIC_1012), i111, i120) -> f1021_0_main_Load(EOS(STATIC_1021), i111, i120) :|: TRUE 7.32/2.86 f1021_0_main_Load(EOS(STATIC_1021), i111, i120) -> f984_0_main_Load(EOS(STATIC_984), i111, i120) :|: TRUE 7.32/2.86 Combined rules. Obtained 2 IRulesP rules: 7.32/2.86 f986_0_main_LE(EOS(STATIC_986), i111:0, i112:0, i111:0, i112:0) -> f986_0_main_LE(EOS(STATIC_986), i111:0 - 1, 1, i111:0 - 1, 1) :|: i111:0 > 0 && i112:0 >= i111:0 7.32/2.86 f986_0_main_LE(EOS(STATIC_986), i111:0, i112:0, i111:0, i112:0) -> f986_0_main_LE(EOS(STATIC_986), i111:0, 2 * i112:0, i111:0, 2 * i112:0) :|: i112:0 < i111:0 && i112:0 > 0 7.32/2.86 Filtered constant ground arguments: 7.32/2.86 f986_0_main_LE(x1, x2, x3, x4, x5) -> f986_0_main_LE(x2, x3, x4, x5) 7.32/2.86 EOS(x1) -> EOS 7.32/2.86 Filtered duplicate arguments: 7.32/2.86 f986_0_main_LE(x1, x2, x3, x4) -> f986_0_main_LE(x3, x4) 7.32/2.86 Finished conversion. Obtained 2 rules.P rules: 7.32/2.86 f986_0_main_LE(i111:0, i112:0) -> f986_0_main_LE(i111:0 - 1, 1) :|: i111:0 > 0 && i112:0 >= i111:0 7.32/2.86 f986_0_main_LE(i111:0, i112:0) -> f986_0_main_LE(i111:0, 2 * i112:0) :|: i112:0 < i111:0 && i112:0 > 0 7.32/2.86 7.32/2.86 ---------------------------------------- 7.32/2.86 7.32/2.86 (8) 7.32/2.86 Obligation: 7.32/2.86 Rules: 7.32/2.86 f986_0_main_LE(i111:0, i112:0) -> f986_0_main_LE(i111:0 - 1, 1) :|: i111:0 > 0 && i112:0 >= i111:0 7.32/2.86 f986_0_main_LE(x, x1) -> f986_0_main_LE(x, 2 * x1) :|: x1 < x && x1 > 0 7.32/2.86 7.32/2.86 ---------------------------------------- 7.32/2.86 7.32/2.86 (9) IRSFormatTransformerProof (EQUIVALENT) 7.32/2.86 Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %). 7.32/2.86 ---------------------------------------- 7.32/2.86 7.32/2.86 (10) 7.32/2.86 Obligation: 7.32/2.86 Rules: 7.32/2.86 f986_0_main_LE(i111:0, i112:0) -> f986_0_main_LE(arith, 1) :|: i111:0 > 0 && i112:0 >= i111:0 && arith = i111:0 - 1 7.32/2.86 f986_0_main_LE(x2, x3) -> f986_0_main_LE(x2, x4) :|: x3 < x2 && x3 > 0 && x4 = 2 * x3 7.32/2.86 7.32/2.86 ---------------------------------------- 7.32/2.86 7.32/2.86 (11) IRSwTTerminationDigraphProof (EQUIVALENT) 7.32/2.86 Constructed termination digraph! 7.32/2.86 Nodes: 7.32/2.86 (1) f986_0_main_LE(i111:0, i112:0) -> f986_0_main_LE(arith, 1) :|: i111:0 > 0 && i112:0 >= i111:0 && arith = i111:0 - 1 7.32/2.86 (2) f986_0_main_LE(x2, x3) -> f986_0_main_LE(x2, x4) :|: x3 < x2 && x3 > 0 && x4 = 2 * x3 7.32/2.86 7.32/2.86 Arcs: 7.32/2.86 (1) -> (1), (2) 7.32/2.86 (2) -> (1), (2) 7.32/2.86 7.32/2.86 This digraph is fully evaluated! 7.32/2.86 ---------------------------------------- 7.32/2.86 7.32/2.86 (12) 7.32/2.86 Obligation: 7.32/2.86 7.32/2.86 Termination digraph: 7.32/2.86 Nodes: 7.32/2.86 (1) f986_0_main_LE(i111:0, i112:0) -> f986_0_main_LE(arith, 1) :|: i111:0 > 0 && i112:0 >= i111:0 && arith = i111:0 - 1 7.32/2.86 (2) f986_0_main_LE(x2, x3) -> f986_0_main_LE(x2, x4) :|: x3 < x2 && x3 > 0 && x4 = 2 * x3 7.32/2.86 7.32/2.86 Arcs: 7.32/2.86 (1) -> (1), (2) 7.32/2.86 (2) -> (1), (2) 7.32/2.86 7.32/2.86 This digraph is fully evaluated! 7.32/2.86 7.32/2.86 ---------------------------------------- 7.32/2.86 7.32/2.86 (13) IntTRSCompressionProof (EQUIVALENT) 7.32/2.86 Compressed rules. 7.32/2.86 ---------------------------------------- 7.32/2.86 7.32/2.86 (14) 7.32/2.86 Obligation: 7.32/2.86 Rules: 7.32/2.86 f986_0_main_LE(x2:0, x3:0) -> f986_0_main_LE(x2:0, 2 * x3:0) :|: x3:0 < x2:0 && x3:0 > 0 7.32/2.86 f986_0_main_LE(i111:0:0, i112:0:0) -> f986_0_main_LE(i111:0:0 - 1, 1) :|: i111:0:0 > 0 && i112:0:0 >= i111:0:0 7.32/2.86 7.32/2.86 ---------------------------------------- 7.32/2.86 7.32/2.86 (15) TempFilterProof (SOUND) 7.32/2.86 Used the following sort dictionary for filtering: 7.32/2.86 f986_0_main_LE(INTEGER, VARIABLE) 7.32/2.86 Replaced non-predefined constructor symbols by 0. 7.32/2.86 ---------------------------------------- 7.32/2.86 7.32/2.86 (16) 7.32/2.86 Obligation: 7.32/2.86 Rules: 7.32/2.86 f986_0_main_LE(x2:0, x3:0) -> f986_0_main_LE(x2:0, c) :|: c = 2 * x3:0 && (x3:0 < x2:0 && x3:0 > 0) 7.32/2.86 f986_0_main_LE(i111:0:0, i112:0:0) -> f986_0_main_LE(c1, c2) :|: c2 = 1 && c1 = i111:0:0 - 1 && (i111:0:0 > 0 && i112:0:0 >= i111:0:0) 7.32/2.86 7.32/2.86 ---------------------------------------- 7.32/2.86 7.32/2.86 (17) PolynomialOrderProcessor (EQUIVALENT) 7.32/2.86 Found the following polynomial interpretation: 7.32/2.86 [f986_0_main_LE(x, x1)] = x 7.32/2.86 7.32/2.86 The following rules are decreasing: 7.32/2.86 f986_0_main_LE(i111:0:0, i112:0:0) -> f986_0_main_LE(c1, c2) :|: c2 = 1 && c1 = i111:0:0 - 1 && (i111:0:0 > 0 && i112:0:0 >= i111:0:0) 7.32/2.86 The following rules are bounded: 7.32/2.86 f986_0_main_LE(x2:0, x3:0) -> f986_0_main_LE(x2:0, c) :|: c = 2 * x3:0 && (x3:0 < x2:0 && x3:0 > 0) 7.32/2.86 f986_0_main_LE(i111:0:0, i112:0:0) -> f986_0_main_LE(c1, c2) :|: c2 = 1 && c1 = i111:0:0 - 1 && (i111:0:0 > 0 && i112:0:0 >= i111:0:0) 7.32/2.86 7.32/2.86 ---------------------------------------- 7.32/2.86 7.32/2.86 (18) 7.32/2.86 Obligation: 7.32/2.86 Rules: 7.32/2.86 f986_0_main_LE(x2:0, x3:0) -> f986_0_main_LE(x2:0, c) :|: c = 2 * x3:0 && (x3:0 < x2:0 && x3:0 > 0) 7.32/2.86 7.32/2.86 ---------------------------------------- 7.32/2.86 7.32/2.86 (19) PolynomialOrderProcessor (EQUIVALENT) 7.32/2.86 Found the following polynomial interpretation: 7.32/2.86 [f986_0_main_LE(x, x1)] = -1 + x - x1 7.32/2.86 7.32/2.86 The following rules are decreasing: 7.32/2.86 f986_0_main_LE(x2:0, x3:0) -> f986_0_main_LE(x2:0, c) :|: c = 2 * x3:0 && (x3:0 < x2:0 && x3:0 > 0) 7.32/2.86 The following rules are bounded: 7.32/2.86 f986_0_main_LE(x2:0, x3:0) -> f986_0_main_LE(x2:0, c) :|: c = 2 * x3:0 && (x3:0 < x2:0 && x3:0 > 0) 7.32/2.86 7.32/2.86 ---------------------------------------- 7.32/2.86 7.32/2.86 (20) 7.32/2.86 YES 7.58/2.90 EOF