6.08/2.47 YES 6.08/2.48 proof of /export/starexec/sandbox/benchmark/theBenchmark.jar 6.08/2.48 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 6.08/2.48 6.08/2.48 6.08/2.48 termination of the given Bare JBC problem could be proven: 6.08/2.48 6.08/2.48 (0) Bare JBC problem 6.08/2.48 (1) BareJBCToJBCProof [EQUIVALENT, 96 ms] 6.08/2.48 (2) JBC problem 6.08/2.48 (3) JBCToGraph [EQUIVALENT, 213 ms] 6.08/2.48 (4) JBCTerminationGraph 6.08/2.48 (5) TerminationGraphToSCCProof [SOUND, 0 ms] 6.08/2.48 (6) JBCTerminationSCC 6.08/2.48 (7) SCCToIRSProof [SOUND, 71 ms] 6.08/2.48 (8) IRSwT 6.08/2.48 (9) IRSFormatTransformerProof [EQUIVALENT, 0 ms] 6.08/2.48 (10) IRSwT 6.08/2.48 (11) IRSwTTerminationDigraphProof [EQUIVALENT, 14 ms] 6.08/2.48 (12) IRSwT 6.08/2.48 (13) IntTRSCompressionProof [EQUIVALENT, 0 ms] 6.08/2.48 (14) IRSwT 6.08/2.48 (15) TempFilterProof [SOUND, 32 ms] 6.08/2.48 (16) IntTRS 6.08/2.48 (17) PolynomialOrderProcessor [EQUIVALENT, 5 ms] 6.08/2.48 (18) YES 6.08/2.48 6.08/2.48 6.08/2.48 ---------------------------------------- 6.08/2.48 6.08/2.48 (0) 6.08/2.48 Obligation: 6.08/2.48 need to prove termination of the following program: 6.08/2.48 /** 6.08/2.48 * Example taken from "A Term Rewriting Approach to the Automated Termination 6.08/2.48 * Analysis of Imperative Programs" (http://www.cs.unm.edu/~spf/papers/2009-02.pdf) 6.08/2.48 * and converted to Java. 6.08/2.48 */ 6.08/2.48 6.08/2.48 public class PastaB6 { 6.08/2.48 public static void main(String[] args) { 6.08/2.48 Random.args = args; 6.08/2.48 int x = Random.random(); 6.08/2.48 int y = Random.random(); 6.08/2.48 6.08/2.48 while (x > 0 && y > 0) { 6.08/2.48 x--; 6.08/2.48 y--; 6.08/2.48 } 6.08/2.48 } 6.08/2.48 } 6.08/2.48 6.08/2.48 6.08/2.48 public class Random { 6.08/2.48 static String[] args; 6.08/2.48 static int index = 0; 6.08/2.48 6.08/2.48 public static int random() { 6.08/2.48 String string = args[index]; 6.08/2.48 index++; 6.08/2.48 return string.length(); 6.08/2.48 } 6.08/2.48 } 6.08/2.48 6.08/2.48 6.08/2.48 6.08/2.48 ---------------------------------------- 6.08/2.48 6.08/2.48 (1) BareJBCToJBCProof (EQUIVALENT) 6.08/2.48 initialized classpath 6.08/2.48 ---------------------------------------- 6.08/2.48 6.08/2.48 (2) 6.08/2.48 Obligation: 6.08/2.48 need to prove termination of the following program: 6.08/2.48 /** 6.08/2.48 * Example taken from "A Term Rewriting Approach to the Automated Termination 6.08/2.48 * Analysis of Imperative Programs" (http://www.cs.unm.edu/~spf/papers/2009-02.pdf) 6.08/2.48 * and converted to Java. 6.08/2.48 */ 6.08/2.48 6.08/2.48 public class PastaB6 { 6.08/2.48 public static void main(String[] args) { 6.08/2.48 Random.args = args; 6.08/2.48 int x = Random.random(); 6.08/2.48 int y = Random.random(); 6.08/2.48 6.08/2.48 while (x > 0 && y > 0) { 6.08/2.48 x--; 6.08/2.48 y--; 6.08/2.48 } 6.08/2.48 } 6.08/2.48 } 6.08/2.48 6.08/2.48 6.08/2.48 public class Random { 6.08/2.48 static String[] args; 6.08/2.48 static int index = 0; 6.08/2.48 6.08/2.48 public static int random() { 6.08/2.48 String string = args[index]; 6.08/2.48 index++; 6.08/2.48 return string.length(); 6.08/2.48 } 6.08/2.48 } 6.08/2.48 6.08/2.48 6.08/2.48 6.08/2.48 ---------------------------------------- 6.08/2.48 6.08/2.48 (3) JBCToGraph (EQUIVALENT) 6.08/2.48 Constructed TerminationGraph. 6.08/2.48 ---------------------------------------- 6.08/2.48 6.08/2.48 (4) 6.08/2.48 Obligation: 6.08/2.48 Termination Graph based on JBC Program: 6.08/2.48 PastaB6.main([Ljava/lang/String;)V: Graph of 179 nodes with 1 SCC. 6.08/2.48 6.08/2.48 6.08/2.48 6.08/2.48 6.08/2.48 6.08/2.48 ---------------------------------------- 6.08/2.48 6.08/2.48 (5) TerminationGraphToSCCProof (SOUND) 6.08/2.48 Splitted TerminationGraph to 1 SCCs. 6.08/2.48 ---------------------------------------- 6.08/2.48 6.08/2.48 (6) 6.08/2.48 Obligation: 6.08/2.48 SCC of termination graph based on JBC Program. 6.08/2.48 SCC contains nodes from the following methods: PastaB6.main([Ljava/lang/String;)V 6.08/2.48 SCC calls the following helper methods: 6.08/2.48 Performed SCC analyses: 6.08/2.48 *Used field analysis yielded the following read fields: 6.08/2.48 6.08/2.48 *Marker field analysis yielded the following relations that could be markers: 6.08/2.48 6.08/2.48 ---------------------------------------- 6.08/2.48 6.08/2.48 (7) SCCToIRSProof (SOUND) 6.08/2.48 Transformed FIGraph SCCs to intTRSs. Log: 6.08/2.48 Generated rules. Obtained 10 IRulesP rules: 6.08/2.48 f387_0_main_LE(EOS(STATIC_387), i66, i56, i66) -> f391_0_main_LE(EOS(STATIC_391), i66, i56, i66) :|: TRUE 6.08/2.48 f391_0_main_LE(EOS(STATIC_391), i66, i56, i66) -> f404_0_main_Load(EOS(STATIC_404), i66, i56) :|: i66 > 0 6.08/2.48 f404_0_main_Load(EOS(STATIC_404), i66, i56) -> f416_0_main_LE(EOS(STATIC_416), i66, i56, i56) :|: TRUE 6.08/2.48 f416_0_main_LE(EOS(STATIC_416), i66, i74, i74) -> f430_0_main_LE(EOS(STATIC_430), i66, i74, i74) :|: TRUE 6.08/2.48 f430_0_main_LE(EOS(STATIC_430), i66, i74, i74) -> f464_0_main_Inc(EOS(STATIC_464), i66, i74) :|: i74 > 0 6.08/2.48 f464_0_main_Inc(EOS(STATIC_464), i66, i74) -> f476_0_main_Inc(EOS(STATIC_476), i66 + -1, i74) :|: TRUE 6.08/2.48 f476_0_main_Inc(EOS(STATIC_476), i86, i74) -> f494_0_main_JMP(EOS(STATIC_494), i86, i74 + -1) :|: TRUE 6.08/2.48 f494_0_main_JMP(EOS(STATIC_494), i86, i91) -> f549_0_main_Load(EOS(STATIC_549), i86, i91) :|: TRUE 6.08/2.48 f549_0_main_Load(EOS(STATIC_549), i86, i91) -> f377_0_main_Load(EOS(STATIC_377), i86, i91) :|: TRUE 6.08/2.48 f377_0_main_Load(EOS(STATIC_377), i19, i56) -> f387_0_main_LE(EOS(STATIC_387), i19, i56, i19) :|: TRUE 6.08/2.48 Combined rules. Obtained 1 IRulesP rules: 6.08/2.48 f387_0_main_LE(EOS(STATIC_387), i66:0, i56:0, i66:0) -> f387_0_main_LE(EOS(STATIC_387), i66:0 - 1, i56:0 - 1, i66:0 - 1) :|: i56:0 > 0 && i66:0 > 0 6.08/2.48 Filtered constant ground arguments: 6.08/2.48 f387_0_main_LE(x1, x2, x3, x4) -> f387_0_main_LE(x2, x3, x4) 6.08/2.48 EOS(x1) -> EOS 6.08/2.48 Filtered duplicate arguments: 6.08/2.48 f387_0_main_LE(x1, x2, x3) -> f387_0_main_LE(x2, x3) 6.08/2.48 Finished conversion. Obtained 1 rules.P rules: 6.08/2.48 f387_0_main_LE(i56:0, i66:0) -> f387_0_main_LE(i56:0 - 1, i66:0 - 1) :|: i56:0 > 0 && i66:0 > 0 6.08/2.48 6.08/2.48 ---------------------------------------- 6.08/2.48 6.08/2.48 (8) 6.08/2.48 Obligation: 6.08/2.48 Rules: 6.08/2.48 f387_0_main_LE(i56:0, i66:0) -> f387_0_main_LE(i56:0 - 1, i66:0 - 1) :|: i56:0 > 0 && i66:0 > 0 6.08/2.48 6.08/2.48 ---------------------------------------- 6.08/2.48 6.08/2.48 (9) IRSFormatTransformerProof (EQUIVALENT) 6.08/2.48 Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %). 6.08/2.48 ---------------------------------------- 6.08/2.48 6.08/2.48 (10) 6.08/2.48 Obligation: 6.08/2.48 Rules: 6.08/2.48 f387_0_main_LE(i56:0, i66:0) -> f387_0_main_LE(arith, arith1) :|: i56:0 > 0 && i66:0 > 0 && arith = i56:0 - 1 && arith1 = i66:0 - 1 6.08/2.48 6.08/2.48 ---------------------------------------- 6.08/2.48 6.08/2.48 (11) IRSwTTerminationDigraphProof (EQUIVALENT) 6.08/2.48 Constructed termination digraph! 6.08/2.48 Nodes: 6.08/2.48 (1) f387_0_main_LE(i56:0, i66:0) -> f387_0_main_LE(arith, arith1) :|: i56:0 > 0 && i66:0 > 0 && arith = i56:0 - 1 && arith1 = i66:0 - 1 6.08/2.48 6.08/2.48 Arcs: 6.08/2.48 (1) -> (1) 6.08/2.48 6.08/2.48 This digraph is fully evaluated! 6.08/2.48 ---------------------------------------- 6.08/2.48 6.08/2.48 (12) 6.08/2.48 Obligation: 6.08/2.48 6.08/2.48 Termination digraph: 6.08/2.48 Nodes: 6.08/2.48 (1) f387_0_main_LE(i56:0, i66:0) -> f387_0_main_LE(arith, arith1) :|: i56:0 > 0 && i66:0 > 0 && arith = i56:0 - 1 && arith1 = i66:0 - 1 6.08/2.48 6.08/2.48 Arcs: 6.08/2.48 (1) -> (1) 6.08/2.48 6.08/2.48 This digraph is fully evaluated! 6.08/2.48 6.08/2.48 ---------------------------------------- 6.08/2.48 6.08/2.48 (13) IntTRSCompressionProof (EQUIVALENT) 6.08/2.48 Compressed rules. 6.08/2.48 ---------------------------------------- 6.08/2.48 6.08/2.48 (14) 6.08/2.48 Obligation: 6.08/2.48 Rules: 6.08/2.48 f387_0_main_LE(i56:0:0, i66:0:0) -> f387_0_main_LE(i56:0:0 - 1, i66:0:0 - 1) :|: i56:0:0 > 0 && i66:0:0 > 0 6.08/2.48 6.08/2.48 ---------------------------------------- 6.08/2.48 6.08/2.48 (15) TempFilterProof (SOUND) 6.08/2.48 Used the following sort dictionary for filtering: 6.08/2.48 f387_0_main_LE(INTEGER, INTEGER) 6.08/2.48 Replaced non-predefined constructor symbols by 0. 6.08/2.48 ---------------------------------------- 6.08/2.48 6.08/2.48 (16) 6.08/2.48 Obligation: 6.08/2.48 Rules: 6.08/2.48 f387_0_main_LE(i56:0:0, i66:0:0) -> f387_0_main_LE(c, c1) :|: c1 = i66:0:0 - 1 && c = i56:0:0 - 1 && (i56:0:0 > 0 && i66:0:0 > 0) 6.08/2.48 6.08/2.48 ---------------------------------------- 6.08/2.48 6.08/2.48 (17) PolynomialOrderProcessor (EQUIVALENT) 6.08/2.48 Found the following polynomial interpretation: 6.08/2.48 [f387_0_main_LE(x, x1)] = x1 6.08/2.48 6.08/2.48 The following rules are decreasing: 6.08/2.48 f387_0_main_LE(i56:0:0, i66:0:0) -> f387_0_main_LE(c, c1) :|: c1 = i66:0:0 - 1 && c = i56:0:0 - 1 && (i56:0:0 > 0 && i66:0:0 > 0) 6.08/2.48 The following rules are bounded: 6.08/2.48 f387_0_main_LE(i56:0:0, i66:0:0) -> f387_0_main_LE(c, c1) :|: c1 = i66:0:0 - 1 && c = i56:0:0 - 1 && (i56:0:0 > 0 && i66:0:0 > 0) 6.08/2.48 6.08/2.48 ---------------------------------------- 6.08/2.48 6.08/2.48 (18) 6.08/2.48 YES 6.44/2.60 EOF