/export/starexec/sandbox2/solver/bin/starexec_run_standard /export/starexec/sandbox2/benchmark/theBenchmark.jar /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- YES proof of /export/starexec/sandbox2/benchmark/theBenchmark.jar # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty termination of the given Bare JBC problem could be proven: (0) Bare JBC problem (1) BareJBCToJBCProof [EQUIVALENT, 96 ms] (2) JBC problem (3) JBCToGraph [EQUIVALENT, 208 ms] (4) JBCTerminationGraph (5) TerminationGraphToSCCProof [SOUND, 0 ms] (6) JBCTerminationSCC (7) SCCToIRSProof [SOUND, 81 ms] (8) IRSwT (9) IRSFormatTransformerProof [EQUIVALENT, 0 ms] (10) IRSwT (11) IRSwTTerminationDigraphProof [EQUIVALENT, 91 ms] (12) IRSwT (13) IntTRSCompressionProof [EQUIVALENT, 0 ms] (14) IRSwT (15) TempFilterProof [SOUND, 48 ms] (16) IntTRS (17) RankingReductionPairProof [EQUIVALENT, 0 ms] (18) YES ---------------------------------------- (0) Obligation: need to prove termination of the following program: public class GCD5 { public static int gcd(int a, int b) { int tmp; while(b > 0 && a > 0) { tmp = b; b = a % b; a = tmp; } return a; } public static void main(String[] args) { Random.args = args; int x = Random.random(); int y = Random.random(); gcd(x, y); } } public class Random { static String[] args; static int index = 0; public static int random() { String string = args[index]; index++; return string.length(); } } ---------------------------------------- (1) BareJBCToJBCProof (EQUIVALENT) initialized classpath ---------------------------------------- (2) Obligation: need to prove termination of the following program: public class GCD5 { public static int gcd(int a, int b) { int tmp; while(b > 0 && a > 0) { tmp = b; b = a % b; a = tmp; } return a; } public static void main(String[] args) { Random.args = args; int x = Random.random(); int y = Random.random(); gcd(x, y); } } public class Random { static String[] args; static int index = 0; public static int random() { String string = args[index]; index++; return string.length(); } } ---------------------------------------- (3) JBCToGraph (EQUIVALENT) Constructed TerminationGraph. ---------------------------------------- (4) Obligation: Termination Graph based on JBC Program: GCD5.main([Ljava/lang/String;)V: Graph of 195 nodes with 1 SCC. ---------------------------------------- (5) TerminationGraphToSCCProof (SOUND) Splitted TerminationGraph to 1 SCCs. ---------------------------------------- (6) Obligation: SCC of termination graph based on JBC Program. SCC contains nodes from the following methods: GCD5.main([Ljava/lang/String;)V SCC calls the following helper methods: Performed SCC analyses: *Used field analysis yielded the following read fields: *Marker field analysis yielded the following relations that could be markers: ---------------------------------------- (7) SCCToIRSProof (SOUND) Transformed FIGraph SCCs to intTRSs. Log: Generated rules. Obtained 16 IRulesP rules: f521_0_gcd_LE(EOS(STATIC_521), i62, i71, i71) -> f526_0_gcd_LE(EOS(STATIC_526), i62, i71, i71) :|: TRUE f526_0_gcd_LE(EOS(STATIC_526), i62, i71, i71) -> f530_0_gcd_Load(EOS(STATIC_530), i62, i71) :|: i71 > 0 f530_0_gcd_Load(EOS(STATIC_530), i62, i71) -> f534_0_gcd_LE(EOS(STATIC_534), i62, i71, i62) :|: TRUE f534_0_gcd_LE(EOS(STATIC_534), i74, i71, i74) -> f546_0_gcd_LE(EOS(STATIC_546), i74, i71, i74) :|: TRUE f546_0_gcd_LE(EOS(STATIC_546), i74, i71, i74) -> f555_0_gcd_Load(EOS(STATIC_555), i74, i71) :|: i74 > 0 f555_0_gcd_Load(EOS(STATIC_555), i74, i71) -> f563_0_gcd_Store(EOS(STATIC_563), i74, i71, i71) :|: TRUE f563_0_gcd_Store(EOS(STATIC_563), i74, i71, i71) -> f569_0_gcd_Load(EOS(STATIC_569), i74, i71, i71) :|: TRUE f569_0_gcd_Load(EOS(STATIC_569), i74, i71, i71) -> f578_0_gcd_Load(EOS(STATIC_578), i71, i71, i74) :|: TRUE f578_0_gcd_Load(EOS(STATIC_578), i71, i71, i74) -> f581_0_gcd_IntArithmetic(EOS(STATIC_581), i71, i74, i71) :|: TRUE f581_0_gcd_IntArithmetic(EOS(STATIC_581), i71, i74, i71) -> f583_0_gcd_Store(EOS(STATIC_583), i71, i74 % i71) :|: TRUE f583_0_gcd_Store(EOS(STATIC_583), i71, i77) -> f586_0_gcd_Load(EOS(STATIC_586), i77, i71) :|: TRUE f586_0_gcd_Load(EOS(STATIC_586), i77, i71) -> f588_0_gcd_Store(EOS(STATIC_588), i77, i71) :|: TRUE f588_0_gcd_Store(EOS(STATIC_588), i77, i71) -> f591_0_gcd_JMP(EOS(STATIC_591), i71, i77) :|: TRUE f591_0_gcd_JMP(EOS(STATIC_591), i71, i77) -> f626_0_gcd_Load(EOS(STATIC_626), i71, i77) :|: TRUE f626_0_gcd_Load(EOS(STATIC_626), i71, i77) -> f514_0_gcd_Load(EOS(STATIC_514), i71, i77) :|: TRUE f514_0_gcd_Load(EOS(STATIC_514), i62, i63) -> f521_0_gcd_LE(EOS(STATIC_521), i62, i63, i63) :|: TRUE Combined rules. Obtained 2 IRulesP rules: f521_0_gcd_LE(EOS(STATIC_521), i62:0, i71:0, i71:0) -> f521_0_gcd_LE'(EOS(STATIC_521), i62:0, i71:0, i71:0) :|: i62:0 > 0 && i71:0 > 0 f521_0_gcd_LE'(EOS(STATIC_521), i62:0, i71:0, i71:0) -> f521_0_gcd_LE(EOS(STATIC_521), i71:0, i62:0 - i71:0 * div, i62:0 - i71:0 * div1) :|: i71:0 > 0 && i62:0 > 0 && i62:0 - i71:0 * div + i71:0 > 0 && i71:0 > i62:0 - i71:0 * div && i71:0 > i62:0 - i71:0 * div1 && i62:0 - i71:0 * div1 + i71:0 > 0 Filtered constant ground arguments: f521_0_gcd_LE(x1, x2, x3, x4) -> f521_0_gcd_LE(x2, x3, x4) f521_0_gcd_LE'(x1, x2, x3, x4) -> f521_0_gcd_LE'(x2, x3, x4) EOS(x1) -> EOS Filtered duplicate arguments: f521_0_gcd_LE'(x1, x2, x3) -> f521_0_gcd_LE'(x1, x3) Finished conversion. Obtained 2 rules.P rules: f521_0_gcd_LE(i62:0, i71:0, i71:0) -> f521_0_gcd_LE'(i62:0, i71:0) :|: i62:0 > 0 && i71:0 > 0 f521_0_gcd_LE'(i62:0, i71:0) -> f521_0_gcd_LE(i71:0, i62:0 - i71:0 * div, i62:0 - i71:0 * div1) :|: i62:0 > 0 && i71:0 > 0 && i62:0 - i71:0 * div + i71:0 > 0 && i71:0 > i62:0 - i71:0 * div && i62:0 - i71:0 * div1 + i71:0 > 0 && i71:0 > i62:0 - i71:0 * div1 ---------------------------------------- (8) Obligation: Rules: f521_0_gcd_LE(i62:0, i71:0, i71:0) -> f521_0_gcd_LE'(i62:0, i71:0) :|: i62:0 > 0 && i71:0 > 0 f521_0_gcd_LE'(x, x1) -> f521_0_gcd_LE(x1, x - x1 * x2, x - x1 * x3) :|: x > 0 && x1 > 0 && x - x1 * x2 + x1 > 0 && x1 > x - x1 * x2 && x - x1 * x3 + x1 > 0 && x1 > x - x1 * x3 ---------------------------------------- (9) IRSFormatTransformerProof (EQUIVALENT) Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %). ---------------------------------------- (10) Obligation: Rules: f521_0_gcd_LE(i62:0, i71:0, i71:0) -> f521_0_gcd_LE'(i62:0, i71:0) :|: i62:0 > 0 && i71:0 > 0 f521_0_gcd_LE'(x, x1) -> f521_0_gcd_LE(x1, arith, arith1) :|: x > 0 && x1 > 0 && x - x1 * x2 + x1 > 0 && x1 > x - x1 * x2 && x - x1 * x3 + x1 > 0 && x1 > x - x1 * x3 && arith = x - x1 * x2 && arith1 = x - x1 * x3 ---------------------------------------- (11) IRSwTTerminationDigraphProof (EQUIVALENT) Constructed termination digraph! Nodes: (1) f521_0_gcd_LE(i62:0, i71:0, i71:0) -> f521_0_gcd_LE'(i62:0, i71:0) :|: i62:0 > 0 && i71:0 > 0 (2) f521_0_gcd_LE'(x, x1) -> f521_0_gcd_LE(x1, arith, arith1) :|: x > 0 && x1 > 0 && x - x1 * x2 + x1 > 0 && x1 > x - x1 * x2 && x - x1 * x3 + x1 > 0 && x1 > x - x1 * x3 && arith = x - x1 * x2 && arith1 = x - x1 * x3 Arcs: (1) -> (2) (2) -> (1) This digraph is fully evaluated! ---------------------------------------- (12) Obligation: Termination digraph: Nodes: (1) f521_0_gcd_LE(i62:0, i71:0, i71:0) -> f521_0_gcd_LE'(i62:0, i71:0) :|: i62:0 > 0 && i71:0 > 0 (2) f521_0_gcd_LE'(x, x1) -> f521_0_gcd_LE(x1, arith, arith1) :|: x > 0 && x1 > 0 && x - x1 * x2 + x1 > 0 && x1 > x - x1 * x2 && x - x1 * x3 + x1 > 0 && x1 > x - x1 * x3 && arith = x - x1 * x2 && arith1 = x - x1 * x3 Arcs: (1) -> (2) (2) -> (1) This digraph is fully evaluated! ---------------------------------------- (13) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (14) Obligation: Rules: f521_0_gcd_LE(i62:0:0, i71:0:0, i71:0:0) -> f521_0_gcd_LE(i71:0:0, i62:0:0 - i71:0:0 * x2:0, i62:0:0 - i71:0:0 * x3:0) :|: i71:0:0 > i62:0:0 - i71:0:0 * x3:0 && i62:0:0 - i71:0:0 * x3:0 + i71:0:0 > 0 && i71:0:0 > i62:0:0 - i71:0:0 * x2:0 && i62:0:0 - i71:0:0 * x2:0 + i71:0:0 > 0 && i71:0:0 > 0 && i62:0:0 > 0 ---------------------------------------- (15) TempFilterProof (SOUND) Used the following sort dictionary for filtering: f521_0_gcd_LE(INTEGER, INTEGER, INTEGER) Replaced non-predefined constructor symbols by 0. ---------------------------------------- (16) Obligation: Rules: f521_0_gcd_LE(i62:0:0, i71:0:0, i71:0:0) -> f521_0_gcd_LE(i71:0:0, c, c1) :|: c1 = i62:0:0 - i71:0:0 * x3:0 && c = i62:0:0 - i71:0:0 * x2:0 && (i71:0:0 > i62:0:0 - i71:0:0 * x3:0 && i62:0:0 - i71:0:0 * x3:0 + i71:0:0 > 0 && i71:0:0 > i62:0:0 - i71:0:0 * x2:0 && i62:0:0 - i71:0:0 * x2:0 + i71:0:0 > 0 && i71:0:0 > 0 && i62:0:0 > 0) ---------------------------------------- (17) RankingReductionPairProof (EQUIVALENT) Interpretation: [ f521_0_gcd_LE ] = f521_0_gcd_LE_3 The following rules are decreasing: f521_0_gcd_LE(i62:0:0, i71:0:0, i71:0:0) -> f521_0_gcd_LE(i71:0:0, c, c1) :|: c1 = i62:0:0 - i71:0:0 * x3:0 && c = i62:0:0 - i71:0:0 * x2:0 && (i71:0:0 > i62:0:0 - i71:0:0 * x3:0 && i62:0:0 - i71:0:0 * x3:0 + i71:0:0 > 0 && i71:0:0 > i62:0:0 - i71:0:0 * x2:0 && i62:0:0 - i71:0:0 * x2:0 + i71:0:0 > 0 && i71:0:0 > 0 && i62:0:0 > 0) The following rules are bounded: f521_0_gcd_LE(i62:0:0, i71:0:0, i71:0:0) -> f521_0_gcd_LE(i71:0:0, c, c1) :|: c1 = i62:0:0 - i71:0:0 * x3:0 && c = i62:0:0 - i71:0:0 * x2:0 && (i71:0:0 > i62:0:0 - i71:0:0 * x3:0 && i62:0:0 - i71:0:0 * x3:0 + i71:0:0 > 0 && i71:0:0 > i62:0:0 - i71:0:0 * x2:0 && i62:0:0 - i71:0:0 * x2:0 + i71:0:0 > 0 && i71:0:0 > 0 && i62:0:0 > 0) ---------------------------------------- (18) YES