6.00/2.48 YES 6.31/2.49 proof of /export/starexec/sandbox/benchmark/theBenchmark.jar 6.31/2.49 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 6.31/2.49 6.31/2.49 6.31/2.49 termination of the given Bare JBC problem could be proven: 6.31/2.49 6.31/2.49 (0) Bare JBC problem 6.31/2.49 (1) BareJBCToJBCProof [EQUIVALENT, 91 ms] 6.31/2.49 (2) JBC problem 6.31/2.49 (3) JBCToGraph [EQUIVALENT, 246 ms] 6.31/2.49 (4) JBCTerminationGraph 6.31/2.49 (5) TerminationGraphToSCCProof [SOUND, 0 ms] 6.31/2.49 (6) JBCTerminationSCC 6.31/2.49 (7) SCCToIRSProof [SOUND, 122 ms] 6.31/2.49 (8) IRSwT 6.31/2.49 (9) IRSFormatTransformerProof [EQUIVALENT, 0 ms] 6.31/2.49 (10) IRSwT 6.31/2.49 (11) IRSwTTerminationDigraphProof [EQUIVALENT, 25 ms] 6.31/2.49 (12) IRSwT 6.31/2.49 (13) IntTRSCompressionProof [EQUIVALENT, 0 ms] 6.31/2.49 (14) IRSwT 6.31/2.49 (15) FilterProof [EQUIVALENT, 0 ms] 6.31/2.49 (16) IntTRS 6.31/2.49 (17) IntTRSCompressionProof [EQUIVALENT, 0 ms] 6.31/2.49 (18) IntTRS 6.31/2.49 (19) RankingReductionPairProof [EQUIVALENT, 0 ms] 6.31/2.49 (20) YES 6.31/2.49 6.31/2.49 6.31/2.49 ---------------------------------------- 6.31/2.49 6.31/2.49 (0) 6.31/2.49 Obligation: 6.31/2.49 need to prove termination of the following program: 6.31/2.49 package example_2; 6.31/2.49 6.31/2.49 6.31/2.49 public class Test { 6.31/2.49 6.31/2.49 public static int divBy(int x){ 6.31/2.49 int r = 0; 6.31/2.49 int y; 6.31/2.49 while (x > 0) { 6.31/2.49 y = 2; 6.31/2.49 x = x/y; 6.31/2.49 r = r + x; 6.31/2.49 } 6.31/2.49 return r; 6.31/2.49 } 6.31/2.49 6.31/2.49 public static void main(String[] args) { 6.31/2.49 if (args.length > 0) { 6.31/2.49 int x = args[0].length(); 6.31/2.49 int r = divBy(x); 6.31/2.49 // System.out.println("Result: " + r); 6.31/2.49 } 6.31/2.49 // else System.out.println("Error: Incorrect call"); 6.31/2.49 } 6.31/2.49 } 6.31/2.49 6.31/2.49 6.31/2.49 6.31/2.49 ---------------------------------------- 6.31/2.49 6.31/2.49 (1) BareJBCToJBCProof (EQUIVALENT) 6.31/2.49 initialized classpath 6.31/2.49 ---------------------------------------- 6.31/2.49 6.31/2.49 (2) 6.31/2.49 Obligation: 6.31/2.49 need to prove termination of the following program: 6.31/2.49 package example_2; 6.31/2.49 6.31/2.49 6.31/2.49 public class Test { 6.31/2.49 6.31/2.49 public static int divBy(int x){ 6.31/2.49 int r = 0; 6.31/2.49 int y; 6.31/2.49 while (x > 0) { 6.31/2.49 y = 2; 6.31/2.49 x = x/y; 6.31/2.49 r = r + x; 6.31/2.49 } 6.31/2.49 return r; 6.31/2.49 } 6.31/2.49 6.31/2.49 public static void main(String[] args) { 6.31/2.49 if (args.length > 0) { 6.31/2.49 int x = args[0].length(); 6.31/2.49 int r = divBy(x); 6.31/2.49 // System.out.println("Result: " + r); 6.31/2.49 } 6.31/2.49 // else System.out.println("Error: Incorrect call"); 6.31/2.49 } 6.31/2.49 } 6.31/2.49 6.31/2.49 6.31/2.49 6.31/2.49 ---------------------------------------- 6.31/2.49 6.31/2.49 (3) JBCToGraph (EQUIVALENT) 6.31/2.49 Constructed TerminationGraph. 6.31/2.49 ---------------------------------------- 6.31/2.49 6.31/2.49 (4) 6.31/2.49 Obligation: 6.31/2.49 Termination Graph based on JBC Program: 6.31/2.49 example_2.Test.main([Ljava/lang/String;)V: Graph of 67 nodes with 1 SCC. 6.31/2.49 6.31/2.49 6.31/2.49 6.31/2.49 6.31/2.49 6.31/2.49 ---------------------------------------- 6.31/2.49 6.31/2.49 (5) TerminationGraphToSCCProof (SOUND) 6.31/2.49 Splitted TerminationGraph to 1 SCCs. 6.31/2.49 ---------------------------------------- 6.31/2.49 6.31/2.49 (6) 6.31/2.49 Obligation: 6.31/2.49 SCC of termination graph based on JBC Program. 6.31/2.49 SCC contains nodes from the following methods: example_2.Test.main([Ljava/lang/String;)V 6.31/2.49 SCC calls the following helper methods: 6.31/2.49 Performed SCC analyses: 6.31/2.49 *Used field analysis yielded the following read fields: 6.31/2.49 6.31/2.49 *Marker field analysis yielded the following relations that could be markers: 6.31/2.49 6.31/2.49 ---------------------------------------- 6.31/2.49 6.31/2.49 (7) SCCToIRSProof (SOUND) 6.31/2.49 Transformed FIGraph SCCs to intTRSs. Log: 6.31/2.49 Generated rules. Obtained 15 IRulesP rules: 6.31/2.49 f996_0_divBy_LE(EOS(STATIC_996), i163, i163) -> f998_0_divBy_LE(EOS(STATIC_998), i163, i163) :|: TRUE 6.31/2.49 f998_0_divBy_LE(EOS(STATIC_998), i163, i163) -> f1000_0_divBy_ConstantStackPush(EOS(STATIC_1000), i163) :|: i163 > 0 6.31/2.49 f1000_0_divBy_ConstantStackPush(EOS(STATIC_1000), i163) -> f1005_0_divBy_Store(EOS(STATIC_1005), i163, 2) :|: TRUE 6.31/2.49 f1005_0_divBy_Store(EOS(STATIC_1005), i163, matching1) -> f1010_0_divBy_Load(EOS(STATIC_1010), i163, 2) :|: TRUE && matching1 = 2 6.31/2.49 f1010_0_divBy_Load(EOS(STATIC_1010), i163, matching1) -> f1017_0_divBy_Load(EOS(STATIC_1017), 2, i163) :|: TRUE && matching1 = 2 6.31/2.49 f1017_0_divBy_Load(EOS(STATIC_1017), matching1, i163) -> f1021_0_divBy_IntArithmetic(EOS(STATIC_1021), i163, 2) :|: TRUE && matching1 = 2 6.31/2.49 f1021_0_divBy_IntArithmetic(EOS(STATIC_1021), i163, matching1) -> f1024_0_divBy_Store(EOS(STATIC_1024), i165) :|: i165 = i163 / 2 && i163 >= 1 && i165 < i163 && matching1 = 2 6.31/2.49 f1024_0_divBy_Store(EOS(STATIC_1024), i165) -> f1027_0_divBy_Load(EOS(STATIC_1027), i165) :|: TRUE 6.31/2.49 f1027_0_divBy_Load(EOS(STATIC_1027), i165) -> f1029_0_divBy_Load(EOS(STATIC_1029), i165) :|: TRUE 6.31/2.49 f1029_0_divBy_Load(EOS(STATIC_1029), i165) -> f1030_0_divBy_IntArithmetic(EOS(STATIC_1030), i165, i165) :|: TRUE 6.31/2.49 f1030_0_divBy_IntArithmetic(EOS(STATIC_1030), i165, i165) -> f1033_0_divBy_Store(EOS(STATIC_1033), i165) :|: i165 >= 0 6.31/2.49 f1033_0_divBy_Store(EOS(STATIC_1033), i165) -> f1036_0_divBy_JMP(EOS(STATIC_1036), i165) :|: TRUE 6.31/2.49 f1036_0_divBy_JMP(EOS(STATIC_1036), i165) -> f1087_0_divBy_Load(EOS(STATIC_1087), i165) :|: TRUE 6.31/2.49 f1087_0_divBy_Load(EOS(STATIC_1087), i165) -> f949_0_divBy_Load(EOS(STATIC_949), i165) :|: TRUE 6.31/2.49 f949_0_divBy_Load(EOS(STATIC_949), i144) -> f996_0_divBy_LE(EOS(STATIC_996), i144, i144) :|: TRUE 6.31/2.49 Combined rules. Obtained 2 IRulesP rules: 6.31/2.49 f996_0_divBy_LE(EOS(STATIC_996), i163:0, i163:0) -> f996_0_divBy_LE'(EOS(STATIC_996), i163:0, i163:0) :|: i163:0 > 0 && div > -1 && i163:0 > div 6.31/2.49 f996_0_divBy_LE'(EOS(STATIC_996), i163:0, i163:0) -> f996_0_divBy_LE(EOS(STATIC_996), div, div) :|: i163:0 > 0 && i163:0 > div && div > -1 && i163:0 - 2 * div < 2 && i163:0 - 2 * div > -2 6.31/2.49 Filtered constant ground arguments: 6.31/2.49 f996_0_divBy_LE(x1, x2, x3) -> f996_0_divBy_LE(x2, x3) 6.31/2.49 f996_0_divBy_LE'(x1, x2, x3) -> f996_0_divBy_LE'(x2, x3) 6.31/2.49 EOS(x1) -> EOS 6.31/2.49 Filtered duplicate arguments: 6.31/2.49 f996_0_divBy_LE(x1, x2) -> f996_0_divBy_LE(x2) 6.31/2.49 f996_0_divBy_LE'(x1, x2) -> f996_0_divBy_LE'(x2) 6.31/2.49 Finished conversion. Obtained 2 rules.P rules: 6.31/2.49 f996_0_divBy_LE(i163:0) -> f996_0_divBy_LE'(i163:0) :|: div > -1 && i163:0 > div && i163:0 > 0 6.31/2.49 f996_0_divBy_LE'(i163:0) -> f996_0_divBy_LE(div) :|: i163:0 > div && i163:0 > 0 && div > -1 && i163:0 - 2 * div > -2 && i163:0 - 2 * div < 2 6.31/2.49 6.31/2.49 ---------------------------------------- 6.31/2.49 6.31/2.49 (8) 6.31/2.49 Obligation: 6.31/2.49 Rules: 6.31/2.49 f996_0_divBy_LE(x) -> f996_0_divBy_LE'(x) :|: x1 > -1 && x > x1 && x > 0 6.31/2.49 f996_0_divBy_LE'(x2) -> f996_0_divBy_LE(x3) :|: x2 > x3 && x2 > 0 && x3 > -1 && x2 - 2 * x3 > -2 && x2 - 2 * x3 < 2 6.31/2.49 6.31/2.49 ---------------------------------------- 6.31/2.49 6.31/2.49 (9) IRSFormatTransformerProof (EQUIVALENT) 6.31/2.49 Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %). 6.31/2.49 ---------------------------------------- 6.31/2.49 6.31/2.49 (10) 6.31/2.49 Obligation: 6.31/2.49 Rules: 6.31/2.49 f996_0_divBy_LE(x) -> f996_0_divBy_LE'(x) :|: x1 > -1 && x > x1 && x > 0 6.31/2.49 f996_0_divBy_LE'(x2) -> f996_0_divBy_LE(x3) :|: x2 > x3 && x2 > 0 && x3 > -1 && x2 - 2 * x3 > -2 && x2 - 2 * x3 < 2 6.31/2.49 6.31/2.49 ---------------------------------------- 6.31/2.49 6.31/2.49 (11) IRSwTTerminationDigraphProof (EQUIVALENT) 6.31/2.49 Constructed termination digraph! 6.31/2.49 Nodes: 6.31/2.49 (1) f996_0_divBy_LE(x) -> f996_0_divBy_LE'(x) :|: x1 > -1 && x > x1 && x > 0 6.31/2.49 (2) f996_0_divBy_LE'(x2) -> f996_0_divBy_LE(x3) :|: x2 > x3 && x2 > 0 && x3 > -1 && x2 - 2 * x3 > -2 && x2 - 2 * x3 < 2 6.31/2.49 6.31/2.49 Arcs: 6.31/2.49 (1) -> (2) 6.31/2.49 (2) -> (1) 6.31/2.49 6.31/2.49 This digraph is fully evaluated! 6.31/2.49 ---------------------------------------- 6.31/2.49 6.31/2.49 (12) 6.31/2.49 Obligation: 6.31/2.49 6.31/2.49 Termination digraph: 6.31/2.49 Nodes: 6.31/2.49 (1) f996_0_divBy_LE(x) -> f996_0_divBy_LE'(x) :|: x1 > -1 && x > x1 && x > 0 6.31/2.49 (2) f996_0_divBy_LE'(x2) -> f996_0_divBy_LE(x3) :|: x2 > x3 && x2 > 0 && x3 > -1 && x2 - 2 * x3 > -2 && x2 - 2 * x3 < 2 6.31/2.49 6.31/2.49 Arcs: 6.31/2.49 (1) -> (2) 6.31/2.49 (2) -> (1) 6.31/2.49 6.31/2.49 This digraph is fully evaluated! 6.31/2.49 6.31/2.49 ---------------------------------------- 6.31/2.49 6.31/2.49 (13) IntTRSCompressionProof (EQUIVALENT) 6.31/2.49 Compressed rules. 6.31/2.49 ---------------------------------------- 6.31/2.49 6.31/2.49 (14) 6.31/2.49 Obligation: 6.31/2.49 Rules: 6.31/2.49 f996_0_divBy_LE(x:0) -> f996_0_divBy_LE(x3:0) :|: x:0 - 2 * x3:0 < 2 && x1:0 > -1 && x:0 > x1:0 && x:0 - 2 * x3:0 > -2 && x3:0 > -1 && x:0 > 0 && x:0 > x3:0 6.31/2.49 6.31/2.49 ---------------------------------------- 6.31/2.49 6.31/2.49 (15) FilterProof (EQUIVALENT) 6.31/2.49 Used the following sort dictionary for filtering: 6.31/2.49 f996_0_divBy_LE(INTEGER) 6.31/2.49 Replaced non-predefined constructor symbols by 0. 6.31/2.49 ---------------------------------------- 6.31/2.49 6.31/2.49 (16) 6.31/2.49 Obligation: 6.31/2.49 Rules: 6.31/2.49 f996_0_divBy_LE(x:0) -> f996_0_divBy_LE(x3:0) :|: x:0 - 2 * x3:0 < 2 && x1:0 > -1 && x:0 > x1:0 && x:0 - 2 * x3:0 > -2 && x3:0 > -1 && x:0 > 0 && x:0 > x3:0 6.31/2.49 6.31/2.49 ---------------------------------------- 6.31/2.49 6.31/2.49 (17) IntTRSCompressionProof (EQUIVALENT) 6.31/2.49 Compressed rules. 6.31/2.49 ---------------------------------------- 6.31/2.49 6.31/2.49 (18) 6.31/2.49 Obligation: 6.31/2.49 Rules: 6.31/2.49 f996_0_divBy_LE(x:0:0) -> f996_0_divBy_LE(x3:0:0) :|: x:0:0 > 0 && x:0:0 > x3:0:0 && x3:0:0 > -1 && x:0:0 - 2 * x3:0:0 > -2 && x:0:0 > x1:0:0 && x1:0:0 > -1 && x:0:0 - 2 * x3:0:0 < 2 6.31/2.49 6.31/2.49 ---------------------------------------- 6.31/2.49 6.31/2.49 (19) RankingReductionPairProof (EQUIVALENT) 6.31/2.49 Interpretation: 6.31/2.49 [ f996_0_divBy_LE ] = f996_0_divBy_LE_1 6.31/2.49 6.31/2.49 The following rules are decreasing: 6.31/2.49 f996_0_divBy_LE(x:0:0) -> f996_0_divBy_LE(x3:0:0) :|: x:0:0 > 0 && x:0:0 > x3:0:0 && x3:0:0 > -1 && x:0:0 - 2 * x3:0:0 > -2 && x:0:0 > x1:0:0 && x1:0:0 > -1 && x:0:0 - 2 * x3:0:0 < 2 6.31/2.49 6.31/2.49 The following rules are bounded: 6.31/2.49 f996_0_divBy_LE(x:0:0) -> f996_0_divBy_LE(x3:0:0) :|: x:0:0 > 0 && x:0:0 > x3:0:0 && x3:0:0 > -1 && x:0:0 - 2 * x3:0:0 > -2 && x:0:0 > x1:0:0 && x1:0:0 > -1 && x:0:0 - 2 * x3:0:0 < 2 6.31/2.49 6.31/2.49 6.31/2.49 ---------------------------------------- 6.31/2.49 6.31/2.49 (20) 6.31/2.49 YES 6.48/2.65 EOF