6.07/2.56 YES 6.07/2.57 proof of /export/starexec/sandbox2/benchmark/theBenchmark.jar 6.07/2.57 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 6.07/2.57 6.07/2.57 6.07/2.57 termination of the given Bare JBC problem could be proven: 6.07/2.57 6.07/2.57 (0) Bare JBC problem 6.07/2.57 (1) BareJBCToJBCProof [EQUIVALENT, 96 ms] 6.07/2.57 (2) JBC problem 6.07/2.57 (3) JBCToGraph [EQUIVALENT, 331 ms] 6.07/2.57 (4) JBCTerminationGraph 6.07/2.57 (5) TerminationGraphToSCCProof [SOUND, 0 ms] 6.07/2.57 (6) JBCTerminationSCC 6.07/2.57 (7) SCCToIRSProof [SOUND, 64 ms] 6.07/2.57 (8) IRSwT 6.07/2.57 (9) IRSFormatTransformerProof [EQUIVALENT, 0 ms] 6.07/2.57 (10) IRSwT 6.07/2.57 (11) IRSwTTerminationDigraphProof [EQUIVALENT, 10 ms] 6.07/2.57 (12) IRSwT 6.07/2.57 (13) IntTRSCompressionProof [EQUIVALENT, 0 ms] 6.07/2.57 (14) IRSwT 6.07/2.57 (15) TempFilterProof [SOUND, 26 ms] 6.07/2.57 (16) IntTRS 6.07/2.57 (17) RankingReductionPairProof [EQUIVALENT, 0 ms] 6.07/2.57 (18) YES 6.07/2.57 6.07/2.57 6.07/2.57 ---------------------------------------- 6.07/2.57 6.07/2.57 (0) 6.07/2.57 Obligation: 6.07/2.57 need to prove termination of the following program: 6.07/2.57 public class DivMinus { 6.07/2.57 public static int div(int x, int y) { 6.07/2.57 int res = 0; 6.07/2.57 while (x >= y && y > 0) { 6.07/2.57 x = x-y; 6.07/2.57 res = res + 1; 6.07/2.57 } 6.07/2.57 return res; 6.07/2.57 } 6.07/2.57 6.07/2.57 public static void main(String[] args) { 6.07/2.57 Random.args = args; 6.07/2.57 int x = Random.random(); 6.07/2.57 int y = Random.random(); 6.07/2.57 div(x, y); 6.07/2.57 } 6.07/2.57 } 6.07/2.57 6.07/2.57 6.07/2.57 public class Random { 6.07/2.57 static String[] args; 6.07/2.57 static int index = 0; 6.07/2.57 6.07/2.57 public static int random() { 6.07/2.57 String string = args[index]; 6.07/2.57 index++; 6.07/2.57 return string.length(); 6.07/2.57 } 6.07/2.57 } 6.07/2.57 6.07/2.57 6.07/2.57 6.07/2.57 ---------------------------------------- 6.07/2.57 6.07/2.57 (1) BareJBCToJBCProof (EQUIVALENT) 6.07/2.57 initialized classpath 6.07/2.57 ---------------------------------------- 6.07/2.57 6.07/2.57 (2) 6.07/2.57 Obligation: 6.07/2.57 need to prove termination of the following program: 6.07/2.57 public class DivMinus { 6.07/2.57 public static int div(int x, int y) { 6.07/2.57 int res = 0; 6.07/2.57 while (x >= y && y > 0) { 6.07/2.57 x = x-y; 6.07/2.57 res = res + 1; 6.07/2.57 } 6.07/2.57 return res; 6.07/2.57 } 6.07/2.57 6.07/2.57 public static void main(String[] args) { 6.07/2.57 Random.args = args; 6.07/2.57 int x = Random.random(); 6.07/2.57 int y = Random.random(); 6.07/2.57 div(x, y); 6.07/2.57 } 6.07/2.57 } 6.07/2.57 6.07/2.57 6.07/2.57 public class Random { 6.07/2.57 static String[] args; 6.07/2.57 static int index = 0; 6.07/2.57 6.07/2.57 public static int random() { 6.07/2.57 String string = args[index]; 6.07/2.57 index++; 6.07/2.57 return string.length(); 6.07/2.57 } 6.07/2.57 } 6.07/2.57 6.07/2.57 6.07/2.57 6.07/2.57 ---------------------------------------- 6.07/2.57 6.07/2.57 (3) JBCToGraph (EQUIVALENT) 6.07/2.57 Constructed TerminationGraph. 6.07/2.57 ---------------------------------------- 6.07/2.57 6.07/2.57 (4) 6.07/2.57 Obligation: 6.07/2.57 Termination Graph based on JBC Program: 6.07/2.57 DivMinus.main([Ljava/lang/String;)V: Graph of 197 nodes with 1 SCC. 6.07/2.57 6.07/2.57 6.07/2.57 6.07/2.57 6.07/2.57 6.07/2.57 ---------------------------------------- 6.07/2.57 6.07/2.57 (5) TerminationGraphToSCCProof (SOUND) 6.07/2.57 Splitted TerminationGraph to 1 SCCs. 6.07/2.57 ---------------------------------------- 6.07/2.57 6.07/2.57 (6) 6.07/2.57 Obligation: 6.07/2.57 SCC of termination graph based on JBC Program. 6.07/2.57 SCC contains nodes from the following methods: DivMinus.main([Ljava/lang/String;)V 6.07/2.57 SCC calls the following helper methods: 6.07/2.57 Performed SCC analyses: 6.07/2.57 *Used field analysis yielded the following read fields: 6.07/2.57 6.07/2.57 *Marker field analysis yielded the following relations that could be markers: 6.07/2.57 6.07/2.57 ---------------------------------------- 6.07/2.57 6.07/2.57 (7) SCCToIRSProof (SOUND) 6.07/2.57 Transformed FIGraph SCCs to intTRSs. Log: 6.07/2.57 Generated rules. Obtained 17 IRulesP rules: 6.07/2.57 f593_0_div_Load(EOS(STATIC_593), i86, i87, i86) -> f596_0_div_LT(EOS(STATIC_596), i86, i87, i86, i87) :|: TRUE 6.07/2.57 f596_0_div_LT(EOS(STATIC_596), i86, i87, i86, i87) -> f603_0_div_LT(EOS(STATIC_603), i86, i87, i86, i87) :|: i86 >= i87 6.07/2.57 f603_0_div_LT(EOS(STATIC_603), i86, i87, i86, i87) -> f621_0_div_Load(EOS(STATIC_621), i86, i87) :|: i86 >= i87 6.07/2.57 f621_0_div_Load(EOS(STATIC_621), i86, i87) -> f623_0_div_LE(EOS(STATIC_623), i86, i87, i87) :|: TRUE 6.07/2.57 f623_0_div_LE(EOS(STATIC_623), i97, i96, i96) -> f627_0_div_LE(EOS(STATIC_627), i97, i96, i96) :|: TRUE 6.07/2.57 f627_0_div_LE(EOS(STATIC_627), i97, i96, i96) -> f634_0_div_Load(EOS(STATIC_634), i97, i96) :|: i96 > 0 6.07/2.57 f634_0_div_Load(EOS(STATIC_634), i97, i96) -> f639_0_div_Load(EOS(STATIC_639), i96, i97) :|: TRUE 6.07/2.57 f639_0_div_Load(EOS(STATIC_639), i96, i97) -> f641_0_div_IntArithmetic(EOS(STATIC_641), i96, i97, i96) :|: TRUE 6.07/2.57 f641_0_div_IntArithmetic(EOS(STATIC_641), i96, i97, i96) -> f644_0_div_Store(EOS(STATIC_644), i96, i97 - i96) :|: i97 > 0 && i96 > 0 6.07/2.57 f644_0_div_Store(EOS(STATIC_644), i96, i98) -> f646_0_div_Load(EOS(STATIC_646), i98, i96) :|: TRUE 6.07/2.57 f646_0_div_Load(EOS(STATIC_646), i98, i96) -> f649_0_div_ConstantStackPush(EOS(STATIC_649), i98, i96) :|: TRUE 6.07/2.57 f649_0_div_ConstantStackPush(EOS(STATIC_649), i98, i96) -> f651_0_div_IntArithmetic(EOS(STATIC_651), i98, i96) :|: TRUE 6.07/2.57 f651_0_div_IntArithmetic(EOS(STATIC_651), i98, i96) -> f654_0_div_Store(EOS(STATIC_654), i98, i96) :|: TRUE 6.07/2.57 f654_0_div_Store(EOS(STATIC_654), i98, i96) -> f656_0_div_JMP(EOS(STATIC_656), i98, i96) :|: TRUE 6.07/2.57 f656_0_div_JMP(EOS(STATIC_656), i98, i96) -> f661_0_div_Load(EOS(STATIC_661), i98, i96) :|: TRUE 6.07/2.57 f661_0_div_Load(EOS(STATIC_661), i98, i96) -> f592_0_div_Load(EOS(STATIC_592), i98, i96) :|: TRUE 6.07/2.57 f592_0_div_Load(EOS(STATIC_592), i86, i87) -> f593_0_div_Load(EOS(STATIC_593), i86, i87, i86) :|: TRUE 6.07/2.57 Combined rules. Obtained 1 IRulesP rules: 6.07/2.57 f593_0_div_Load(EOS(STATIC_593), i86:0, i87:0, i86:0) -> f593_0_div_Load(EOS(STATIC_593), i86:0 - i87:0, i87:0, i86:0 - i87:0) :|: i87:0 <= i86:0 && i87:0 > 0 && i86:0 > 0 6.07/2.57 Filtered constant ground arguments: 6.07/2.57 f593_0_div_Load(x1, x2, x3, x4) -> f593_0_div_Load(x2, x3, x4) 6.07/2.57 EOS(x1) -> EOS 6.07/2.57 Filtered duplicate arguments: 6.07/2.57 f593_0_div_Load(x1, x2, x3) -> f593_0_div_Load(x2, x3) 6.07/2.57 Finished conversion. Obtained 1 rules.P rules: 6.07/2.57 f593_0_div_Load(i87:0, i86:0) -> f593_0_div_Load(i87:0, i86:0 - i87:0) :|: i87:0 > 0 && i86:0 > 0 && i87:0 <= i86:0 6.07/2.57 6.07/2.57 ---------------------------------------- 6.07/2.57 6.07/2.57 (8) 6.07/2.57 Obligation: 6.07/2.57 Rules: 6.07/2.57 f593_0_div_Load(i87:0, i86:0) -> f593_0_div_Load(i87:0, i86:0 - i87:0) :|: i87:0 > 0 && i86:0 > 0 && i87:0 <= i86:0 6.07/2.57 6.07/2.57 ---------------------------------------- 6.07/2.57 6.07/2.57 (9) IRSFormatTransformerProof (EQUIVALENT) 6.07/2.57 Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %). 6.07/2.57 ---------------------------------------- 6.07/2.57 6.07/2.57 (10) 6.07/2.57 Obligation: 6.07/2.57 Rules: 6.07/2.57 f593_0_div_Load(i87:0, i86:0) -> f593_0_div_Load(i87:0, arith) :|: i87:0 > 0 && i86:0 > 0 && i87:0 <= i86:0 && arith = i86:0 - i87:0 6.07/2.57 6.07/2.57 ---------------------------------------- 6.07/2.57 6.07/2.57 (11) IRSwTTerminationDigraphProof (EQUIVALENT) 6.07/2.57 Constructed termination digraph! 6.07/2.57 Nodes: 6.07/2.57 (1) f593_0_div_Load(i87:0, i86:0) -> f593_0_div_Load(i87:0, arith) :|: i87:0 > 0 && i86:0 > 0 && i87:0 <= i86:0 && arith = i86:0 - i87:0 6.07/2.57 6.07/2.57 Arcs: 6.07/2.57 (1) -> (1) 6.07/2.57 6.07/2.57 This digraph is fully evaluated! 6.07/2.57 ---------------------------------------- 6.07/2.57 6.07/2.57 (12) 6.07/2.57 Obligation: 6.07/2.57 6.07/2.57 Termination digraph: 6.07/2.57 Nodes: 6.07/2.57 (1) f593_0_div_Load(i87:0, i86:0) -> f593_0_div_Load(i87:0, arith) :|: i87:0 > 0 && i86:0 > 0 && i87:0 <= i86:0 && arith = i86:0 - i87:0 6.07/2.57 6.07/2.57 Arcs: 6.07/2.57 (1) -> (1) 6.07/2.57 6.07/2.57 This digraph is fully evaluated! 6.07/2.57 6.07/2.57 ---------------------------------------- 6.07/2.57 6.07/2.57 (13) IntTRSCompressionProof (EQUIVALENT) 6.07/2.57 Compressed rules. 6.07/2.57 ---------------------------------------- 6.07/2.57 6.07/2.57 (14) 6.07/2.57 Obligation: 6.07/2.57 Rules: 6.07/2.57 f593_0_div_Load(i87:0:0, i86:0:0) -> f593_0_div_Load(i87:0:0, i86:0:0 - i87:0:0) :|: i87:0:0 > 0 && i86:0:0 > 0 && i87:0:0 <= i86:0:0 6.07/2.57 6.07/2.57 ---------------------------------------- 6.07/2.57 6.07/2.57 (15) TempFilterProof (SOUND) 6.07/2.57 Used the following sort dictionary for filtering: 6.07/2.57 f593_0_div_Load(INTEGER, INTEGER) 6.07/2.57 Replaced non-predefined constructor symbols by 0. 6.07/2.57 ---------------------------------------- 6.07/2.57 6.07/2.57 (16) 6.07/2.57 Obligation: 6.07/2.57 Rules: 6.07/2.57 f593_0_div_Load(i87:0:0, i86:0:0) -> f593_0_div_Load(i87:0:0, c) :|: c = i86:0:0 - i87:0:0 && (i87:0:0 > 0 && i86:0:0 > 0 && i87:0:0 <= i86:0:0) 6.07/2.57 6.07/2.57 ---------------------------------------- 6.07/2.57 6.07/2.57 (17) RankingReductionPairProof (EQUIVALENT) 6.07/2.57 Interpretation: 6.07/2.57 [ f593_0_div_Load ] = f593_0_div_Load_2 6.07/2.57 6.07/2.57 The following rules are decreasing: 6.07/2.57 f593_0_div_Load(i87:0:0, i86:0:0) -> f593_0_div_Load(i87:0:0, c) :|: c = i86:0:0 - i87:0:0 && (i87:0:0 > 0 && i86:0:0 > 0 && i87:0:0 <= i86:0:0) 6.07/2.57 6.07/2.57 The following rules are bounded: 6.07/2.57 f593_0_div_Load(i87:0:0, i86:0:0) -> f593_0_div_Load(i87:0:0, c) :|: c = i86:0:0 - i87:0:0 && (i87:0:0 > 0 && i86:0:0 > 0 && i87:0:0 <= i86:0:0) 6.07/2.57 6.07/2.57 6.07/2.57 ---------------------------------------- 6.07/2.57 6.07/2.57 (18) 6.07/2.57 YES 6.21/2.63 EOF