6.11/2.53 YES 6.11/2.54 proof of /export/starexec/sandbox2/benchmark/theBenchmark.jar 6.11/2.54 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 6.11/2.54 6.11/2.54 6.11/2.54 termination of the given Bare JBC problem could be proven: 6.11/2.54 6.11/2.54 (0) Bare JBC problem 6.11/2.54 (1) BareJBCToJBCProof [EQUIVALENT, 96 ms] 6.11/2.54 (2) JBC problem 6.11/2.54 (3) JBCToGraph [EQUIVALENT, 311 ms] 6.11/2.54 (4) JBCTerminationGraph 6.11/2.54 (5) TerminationGraphToSCCProof [SOUND, 0 ms] 6.11/2.54 (6) JBCTerminationSCC 6.11/2.54 (7) SCCToIRSProof [SOUND, 96 ms] 6.11/2.54 (8) IRSwT 6.11/2.54 (9) IRSFormatTransformerProof [EQUIVALENT, 0 ms] 6.11/2.54 (10) IRSwT 6.11/2.54 (11) IRSwTTerminationDigraphProof [EQUIVALENT, 0 ms] 6.11/2.54 (12) IRSwT 6.11/2.54 (13) IntTRSCompressionProof [EQUIVALENT, 0 ms] 6.11/2.54 (14) IRSwT 6.11/2.54 (15) TempFilterProof [SOUND, 33 ms] 6.11/2.54 (16) IntTRS 6.11/2.54 (17) RankingReductionPairProof [EQUIVALENT, 0 ms] 6.11/2.54 (18) YES 6.11/2.54 6.11/2.54 6.11/2.54 ---------------------------------------- 6.11/2.54 6.11/2.54 (0) 6.11/2.54 Obligation: 6.11/2.54 need to prove termination of the following program: 6.11/2.54 /** 6.11/2.54 * Example taken from "A Term Rewriting Approach to the Automated Termination 6.11/2.54 * Analysis of Imperative Programs" (http://www.cs.unm.edu/~spf/papers/2009-02.pdf) 6.11/2.54 * and converted to Java. 6.11/2.54 */ 6.11/2.54 6.11/2.54 public class PastaA6 { 6.11/2.54 public static void main(String[] args) { 6.11/2.54 Random.args = args; 6.11/2.54 int x = Random.random(); 6.11/2.54 int y = Random.random(); 6.11/2.54 int z = Random.random(); 6.11/2.54 6.11/2.54 while (x > y + z) { 6.11/2.54 y++; 6.11/2.54 z++; 6.11/2.54 } 6.11/2.54 } 6.11/2.54 } 6.11/2.54 6.11/2.54 6.11/2.54 public class Random { 6.11/2.54 static String[] args; 6.11/2.54 static int index = 0; 6.11/2.54 6.11/2.54 public static int random() { 6.11/2.54 String string = args[index]; 6.11/2.54 index++; 6.11/2.54 return string.length(); 6.11/2.54 } 6.11/2.54 } 6.11/2.54 6.11/2.54 6.11/2.54 6.11/2.54 ---------------------------------------- 6.11/2.54 6.11/2.54 (1) BareJBCToJBCProof (EQUIVALENT) 6.11/2.54 initialized classpath 6.11/2.54 ---------------------------------------- 6.11/2.54 6.11/2.54 (2) 6.11/2.54 Obligation: 6.11/2.54 need to prove termination of the following program: 6.11/2.54 /** 6.11/2.54 * Example taken from "A Term Rewriting Approach to the Automated Termination 6.11/2.54 * Analysis of Imperative Programs" (http://www.cs.unm.edu/~spf/papers/2009-02.pdf) 6.11/2.54 * and converted to Java. 6.11/2.54 */ 6.11/2.54 6.11/2.54 public class PastaA6 { 6.11/2.54 public static void main(String[] args) { 6.11/2.54 Random.args = args; 6.11/2.54 int x = Random.random(); 6.11/2.54 int y = Random.random(); 6.11/2.54 int z = Random.random(); 6.11/2.54 6.11/2.54 while (x > y + z) { 6.11/2.54 y++; 6.11/2.54 z++; 6.11/2.54 } 6.11/2.54 } 6.11/2.54 } 6.11/2.54 6.11/2.54 6.11/2.54 public class Random { 6.11/2.54 static String[] args; 6.11/2.54 static int index = 0; 6.11/2.54 6.11/2.54 public static int random() { 6.11/2.54 String string = args[index]; 6.11/2.54 index++; 6.11/2.54 return string.length(); 6.11/2.54 } 6.11/2.54 } 6.11/2.54 6.11/2.54 6.11/2.54 6.11/2.54 ---------------------------------------- 6.11/2.54 6.11/2.54 (3) JBCToGraph (EQUIVALENT) 6.11/2.54 Constructed TerminationGraph. 6.11/2.54 ---------------------------------------- 6.11/2.54 6.11/2.54 (4) 6.11/2.54 Obligation: 6.11/2.54 Termination Graph based on JBC Program: 6.11/2.54 PastaA6.main([Ljava/lang/String;)V: Graph of 244 nodes with 1 SCC. 6.11/2.54 6.11/2.54 6.11/2.54 6.11/2.54 6.11/2.54 6.11/2.54 ---------------------------------------- 6.11/2.54 6.11/2.54 (5) TerminationGraphToSCCProof (SOUND) 6.11/2.54 Splitted TerminationGraph to 1 SCCs. 6.11/2.54 ---------------------------------------- 6.11/2.54 6.11/2.54 (6) 6.11/2.54 Obligation: 6.11/2.54 SCC of termination graph based on JBC Program. 6.11/2.54 SCC contains nodes from the following methods: PastaA6.main([Ljava/lang/String;)V 6.11/2.54 SCC calls the following helper methods: 6.11/2.54 Performed SCC analyses: 6.11/2.54 *Used field analysis yielded the following read fields: 6.11/2.55 6.11/2.55 *Marker field analysis yielded the following relations that could be markers: 6.11/2.55 6.11/2.55 ---------------------------------------- 6.11/2.55 6.11/2.55 (7) SCCToIRSProof (SOUND) 6.11/2.55 Transformed FIGraph SCCs to intTRSs. Log: 6.11/2.55 Generated rules. Obtained 10 IRulesP rules: 6.11/2.55 f422_0_main_Load(EOS(STATIC_422), i14, i48, i72, i14) -> f425_0_main_Load(EOS(STATIC_425), i14, i48, i72, i14, i48) :|: TRUE 6.11/2.55 f425_0_main_Load(EOS(STATIC_425), i14, i48, i72, i14, i48) -> f427_0_main_IntArithmetic(EOS(STATIC_427), i14, i48, i72, i14, i48, i72) :|: TRUE 6.11/2.55 f427_0_main_IntArithmetic(EOS(STATIC_427), i14, i48, i72, i14, i48, i72) -> f430_0_main_LE(EOS(STATIC_430), i14, i48, i72, i14, i48 + i72) :|: i48 >= 0 && i72 >= 0 6.11/2.55 f430_0_main_LE(EOS(STATIC_430), i14, i48, i72, i14, i74) -> f434_0_main_LE(EOS(STATIC_434), i14, i48, i72, i14, i74) :|: i14 > i74 6.11/2.55 f434_0_main_LE(EOS(STATIC_434), i14, i48, i72, i14, i74) -> f450_0_main_Inc(EOS(STATIC_450), i14, i48, i72) :|: i14 > i74 6.11/2.55 f450_0_main_Inc(EOS(STATIC_450), i14, i48, i72) -> f464_0_main_Inc(EOS(STATIC_464), i14, i48 + 1, i72) :|: TRUE 6.11/2.55 f464_0_main_Inc(EOS(STATIC_464), i14, i77, i72) -> f474_0_main_JMP(EOS(STATIC_474), i14, i77, i72 + 1) :|: TRUE 6.11/2.55 f474_0_main_JMP(EOS(STATIC_474), i14, i77, i79) -> f519_0_main_Load(EOS(STATIC_519), i14, i77, i79) :|: TRUE 6.11/2.55 f519_0_main_Load(EOS(STATIC_519), i14, i77, i79) -> f419_0_main_Load(EOS(STATIC_419), i14, i77, i79) :|: TRUE 6.11/2.55 f419_0_main_Load(EOS(STATIC_419), i14, i48, i72) -> f422_0_main_Load(EOS(STATIC_422), i14, i48, i72, i14) :|: TRUE 6.11/2.55 Combined rules. Obtained 1 IRulesP rules: 6.11/2.55 f422_0_main_Load(EOS(STATIC_422), i14:0, i48:0, i72:0, i14:0) -> f422_0_main_Load(EOS(STATIC_422), i14:0, i48:0 + 1, i72:0 + 1, i14:0) :|: i72:0 > -1 && i48:0 > -1 && i48:0 + i72:0 < i14:0 6.11/2.55 Filtered constant ground arguments: 6.11/2.55 f422_0_main_Load(x1, x2, x3, x4, x5) -> f422_0_main_Load(x2, x3, x4, x5) 6.11/2.55 EOS(x1) -> EOS 6.11/2.55 Filtered duplicate arguments: 6.11/2.55 f422_0_main_Load(x1, x2, x3, x4) -> f422_0_main_Load(x2, x3, x4) 6.11/2.55 Finished conversion. Obtained 1 rules.P rules: 6.11/2.55 f422_0_main_Load(i48:0, i72:0, i14:0) -> f422_0_main_Load(i48:0 + 1, i72:0 + 1, i14:0) :|: i48:0 > -1 && i48:0 + i72:0 < i14:0 && i72:0 > -1 6.11/2.55 6.11/2.55 ---------------------------------------- 6.11/2.55 6.11/2.55 (8) 6.11/2.55 Obligation: 6.11/2.55 Rules: 6.11/2.55 f422_0_main_Load(i48:0, i72:0, i14:0) -> f422_0_main_Load(i48:0 + 1, i72:0 + 1, i14:0) :|: i48:0 > -1 && i48:0 + i72:0 < i14:0 && i72:0 > -1 6.11/2.55 6.11/2.55 ---------------------------------------- 6.11/2.55 6.11/2.55 (9) IRSFormatTransformerProof (EQUIVALENT) 6.11/2.55 Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %). 6.11/2.55 ---------------------------------------- 6.11/2.55 6.11/2.55 (10) 6.11/2.55 Obligation: 6.11/2.55 Rules: 6.11/2.55 f422_0_main_Load(i48:0, i72:0, i14:0) -> f422_0_main_Load(arith, arith1, i14:0) :|: i48:0 > -1 && i48:0 + i72:0 < i14:0 && i72:0 > -1 && arith = i48:0 + 1 && arith1 = i72:0 + 1 6.11/2.55 6.11/2.55 ---------------------------------------- 6.11/2.55 6.11/2.55 (11) IRSwTTerminationDigraphProof (EQUIVALENT) 6.11/2.55 Constructed termination digraph! 6.11/2.55 Nodes: 6.11/2.55 (1) f422_0_main_Load(i48:0, i72:0, i14:0) -> f422_0_main_Load(arith, arith1, i14:0) :|: i48:0 > -1 && i48:0 + i72:0 < i14:0 && i72:0 > -1 && arith = i48:0 + 1 && arith1 = i72:0 + 1 6.11/2.55 6.11/2.55 Arcs: 6.11/2.55 (1) -> (1) 6.11/2.55 6.11/2.55 This digraph is fully evaluated! 6.11/2.55 ---------------------------------------- 6.11/2.55 6.11/2.55 (12) 6.11/2.55 Obligation: 6.11/2.55 6.11/2.55 Termination digraph: 6.11/2.55 Nodes: 6.11/2.55 (1) f422_0_main_Load(i48:0, i72:0, i14:0) -> f422_0_main_Load(arith, arith1, i14:0) :|: i48:0 > -1 && i48:0 + i72:0 < i14:0 && i72:0 > -1 && arith = i48:0 + 1 && arith1 = i72:0 + 1 6.11/2.55 6.11/2.55 Arcs: 6.11/2.55 (1) -> (1) 6.11/2.55 6.11/2.55 This digraph is fully evaluated! 6.11/2.55 6.11/2.55 ---------------------------------------- 6.11/2.55 6.11/2.55 (13) IntTRSCompressionProof (EQUIVALENT) 6.11/2.55 Compressed rules. 6.11/2.55 ---------------------------------------- 6.11/2.55 6.11/2.55 (14) 6.11/2.55 Obligation: 6.11/2.55 Rules: 6.11/2.55 f422_0_main_Load(i48:0:0, i72:0:0, i14:0:0) -> f422_0_main_Load(i48:0:0 + 1, i72:0:0 + 1, i14:0:0) :|: i48:0:0 > -1 && i48:0:0 + i72:0:0 < i14:0:0 && i72:0:0 > -1 6.11/2.55 6.11/2.55 ---------------------------------------- 6.11/2.55 6.11/2.55 (15) TempFilterProof (SOUND) 6.11/2.55 Used the following sort dictionary for filtering: 6.11/2.55 f422_0_main_Load(INTEGER, INTEGER, INTEGER) 6.11/2.55 Replaced non-predefined constructor symbols by 0. 6.11/2.55 ---------------------------------------- 6.11/2.55 6.11/2.55 (16) 6.11/2.55 Obligation: 6.11/2.55 Rules: 6.11/2.55 f422_0_main_Load(i48:0:0, i72:0:0, i14:0:0) -> f422_0_main_Load(c, c1, i14:0:0) :|: c1 = i72:0:0 + 1 && c = i48:0:0 + 1 && (i48:0:0 > -1 && i48:0:0 + i72:0:0 < i14:0:0 && i72:0:0 > -1) 6.11/2.55 6.11/2.55 ---------------------------------------- 6.11/2.55 6.11/2.55 (17) RankingReductionPairProof (EQUIVALENT) 6.11/2.55 Interpretation: 6.11/2.55 [ f422_0_main_Load ] = -1*f422_0_main_Load_1 + f422_0_main_Load_3 6.11/2.55 6.11/2.55 The following rules are decreasing: 6.11/2.55 f422_0_main_Load(i48:0:0, i72:0:0, i14:0:0) -> f422_0_main_Load(c, c1, i14:0:0) :|: c1 = i72:0:0 + 1 && c = i48:0:0 + 1 && (i48:0:0 > -1 && i48:0:0 + i72:0:0 < i14:0:0 && i72:0:0 > -1) 6.11/2.55 6.11/2.55 The following rules are bounded: 6.11/2.55 f422_0_main_Load(i48:0:0, i72:0:0, i14:0:0) -> f422_0_main_Load(c, c1, i14:0:0) :|: c1 = i72:0:0 + 1 && c = i48:0:0 + 1 && (i48:0:0 > -1 && i48:0:0 + i72:0:0 < i14:0:0 && i72:0:0 > -1) 6.11/2.55 6.11/2.55 6.11/2.55 ---------------------------------------- 6.11/2.55 6.11/2.55 (18) 6.11/2.55 YES 6.11/2.58 EOF