/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, 119 ms] (2) JBC problem (3) JBCToGraph [EQUIVALENT, 312 ms] (4) JBCTerminationGraph (5) TerminationGraphToSCCProof [SOUND, 5 ms] (6) JBCTerminationSCC (7) SCCToIRSProof [SOUND, 111 ms] (8) IRSwT (9) IRSFormatTransformerProof [EQUIVALENT, 0 ms] (10) IRSwT (11) IRSwTTerminationDigraphProof [EQUIVALENT, 33 ms] (12) IRSwT (13) IntTRSCompressionProof [EQUIVALENT, 0 ms] (14) IRSwT (15) TempFilterProof [SOUND, 48 ms] (16) IntTRS (17) PolynomialOrderProcessor [EQUIVALENT, 5 ms] (18) IntTRS (19) PolynomialOrderProcessor [EQUIVALENT, 0 ms] (20) YES ---------------------------------------- (0) Obligation: need to prove termination of the following program: public class GCD4 { public static int mod(int a, int b) { while(a>=b && b > 0) { a -= b; } return a; } public static int gcd(int a, int b) { int tmp; while(b > 0 && a > 0) { tmp = b; b = mod(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 GCD4 { public static int mod(int a, int b) { while(a>=b && b > 0) { a -= b; } return a; } public static int gcd(int a, int b) { int tmp; while(b > 0 && a > 0) { tmp = b; b = mod(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: GCD4.main([Ljava/lang/String;)V: Graph of 211 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: GCD4.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 33 IRulesP rules: f429_0_gcd_LE(EOS(STATIC_429), i52, i58, i58) -> f431_0_gcd_LE(EOS(STATIC_431), i52, i58, i58) :|: TRUE f431_0_gcd_LE(EOS(STATIC_431), i52, i58, i58) -> f433_0_gcd_Load(EOS(STATIC_433), i52, i58) :|: i58 > 0 f433_0_gcd_Load(EOS(STATIC_433), i52, i58) -> f436_0_gcd_LE(EOS(STATIC_436), i52, i58, i52) :|: TRUE f436_0_gcd_LE(EOS(STATIC_436), i60, i58, i60) -> f460_0_gcd_LE(EOS(STATIC_460), i60, i58, i60) :|: TRUE f460_0_gcd_LE(EOS(STATIC_460), i60, i58, i60) -> f463_0_gcd_Load(EOS(STATIC_463), i60, i58) :|: i60 > 0 f463_0_gcd_Load(EOS(STATIC_463), i60, i58) -> f466_0_gcd_Store(EOS(STATIC_466), i60, i58, i58) :|: TRUE f466_0_gcd_Store(EOS(STATIC_466), i60, i58, i58) -> f469_0_gcd_Load(EOS(STATIC_469), i60, i58, i58) :|: TRUE f469_0_gcd_Load(EOS(STATIC_469), i60, i58, i58) -> f474_0_gcd_Load(EOS(STATIC_474), i58, i58, i60) :|: TRUE f474_0_gcd_Load(EOS(STATIC_474), i58, i58, i60) -> f475_0_gcd_InvokeMethod(EOS(STATIC_475), i58, i60, i58) :|: TRUE f475_0_gcd_InvokeMethod(EOS(STATIC_475), i58, i60, i58) -> f476_0_mod_Load(EOS(STATIC_476), i58, i60, i58) :|: TRUE f476_0_mod_Load(EOS(STATIC_476), i58, i60, i58) -> f547_0_mod_Load(EOS(STATIC_547), i58, i60, i58) :|: TRUE f547_0_mod_Load(EOS(STATIC_547), i58, i70, i58) -> f548_0_mod_Load(EOS(STATIC_548), i58, i70, i58, i70) :|: TRUE f548_0_mod_Load(EOS(STATIC_548), i58, i70, i58, i70) -> f549_0_mod_LT(EOS(STATIC_549), i58, i70, i58, i70, i58) :|: TRUE f549_0_mod_LT(EOS(STATIC_549), i58, i70, i58, i70, i58) -> f551_0_mod_LT(EOS(STATIC_551), i58, i70, i58, i70, i58) :|: i70 < i58 f549_0_mod_LT(EOS(STATIC_549), i58, i70, i58, i70, i58) -> f552_0_mod_LT(EOS(STATIC_552), i58, i70, i58, i70, i58) :|: i70 >= i58 f551_0_mod_LT(EOS(STATIC_551), i58, i70, i58, i70, i58) -> f558_0_mod_Load(EOS(STATIC_558), i58, i70) :|: i70 < i58 f558_0_mod_Load(EOS(STATIC_558), i58, i70) -> f563_0_mod_Return(EOS(STATIC_563), i58, i70) :|: TRUE f563_0_mod_Return(EOS(STATIC_563), i58, i70) -> f565_0_gcd_Store(EOS(STATIC_565), i58, i70) :|: TRUE f565_0_gcd_Store(EOS(STATIC_565), i58, i70) -> f567_0_gcd_Load(EOS(STATIC_567), i70, i58) :|: TRUE f567_0_gcd_Load(EOS(STATIC_567), i70, i58) -> f569_0_gcd_Store(EOS(STATIC_569), i70, i58) :|: TRUE f569_0_gcd_Store(EOS(STATIC_569), i70, i58) -> f571_0_gcd_JMP(EOS(STATIC_571), i58, i70) :|: TRUE f571_0_gcd_JMP(EOS(STATIC_571), i58, i70) -> f592_0_gcd_Load(EOS(STATIC_592), i58, i70) :|: TRUE f592_0_gcd_Load(EOS(STATIC_592), i58, i70) -> f427_0_gcd_Load(EOS(STATIC_427), i58, i70) :|: TRUE f427_0_gcd_Load(EOS(STATIC_427), i52, i53) -> f429_0_gcd_LE(EOS(STATIC_429), i52, i53, i53) :|: TRUE f552_0_mod_LT(EOS(STATIC_552), i58, i70, i58, i70, i58) -> f562_0_mod_Load(EOS(STATIC_562), i58, i70, i58) :|: i70 >= i58 f562_0_mod_Load(EOS(STATIC_562), i58, i70, i58) -> f564_0_mod_LE(EOS(STATIC_564), i58, i70, i58, i58) :|: TRUE f564_0_mod_LE(EOS(STATIC_564), i58, i70, i58, i58) -> f566_0_mod_Load(EOS(STATIC_566), i58, i70, i58) :|: i58 > 0 f566_0_mod_Load(EOS(STATIC_566), i58, i70, i58) -> f568_0_mod_Load(EOS(STATIC_568), i58, i58, i70) :|: TRUE f568_0_mod_Load(EOS(STATIC_568), i58, i58, i70) -> f570_0_mod_IntArithmetic(EOS(STATIC_570), i58, i58, i70, i58) :|: TRUE f570_0_mod_IntArithmetic(EOS(STATIC_570), i58, i58, i70, i58) -> f578_0_mod_Store(EOS(STATIC_578), i58, i58, i70 - i58) :|: i70 > 0 && i58 > 0 f578_0_mod_Store(EOS(STATIC_578), i58, i58, i72) -> f595_0_mod_JMP(EOS(STATIC_595), i58, i72, i58) :|: TRUE f595_0_mod_JMP(EOS(STATIC_595), i58, i72, i58) -> f601_0_mod_Load(EOS(STATIC_601), i58, i72, i58) :|: TRUE f601_0_mod_Load(EOS(STATIC_601), i58, i72, i58) -> f547_0_mod_Load(EOS(STATIC_547), i58, i72, i58) :|: TRUE Combined rules. Obtained 2 IRulesP rules: f549_0_mod_LT(EOS(STATIC_549), i58:0, i70:0, i58:0, i70:0, i58:0) -> f549_0_mod_LT(EOS(STATIC_549), i70:0, i58:0, i70:0, i58:0, i70:0) :|: i70:0 > 0 && i58:0 > 0 && i70:0 < i58:0 f549_0_mod_LT(EOS(STATIC_549), i58:0, i70:0, i58:0, i70:0, i58:0) -> f549_0_mod_LT(EOS(STATIC_549), i58:0, i70:0 - i58:0, i58:0, i70:0 - i58:0, i58:0) :|: i70:0 >= i58:0 && i58:0 > 0 && i70:0 > 0 Filtered constant ground arguments: f549_0_mod_LT(x1, x2, x3, x4, x5, x6) -> f549_0_mod_LT(x2, x3, x4, x5, x6) EOS(x1) -> EOS Filtered duplicate arguments: f549_0_mod_LT(x1, x2, x3, x4, x5) -> f549_0_mod_LT(x4, x5) Finished conversion. Obtained 2 rules.P rules: f549_0_mod_LT(i70:0, i58:0) -> f549_0_mod_LT(i58:0, i70:0) :|: i58:0 > 0 && i70:0 < i58:0 && i70:0 > 0 f549_0_mod_LT(i70:0, i58:0) -> f549_0_mod_LT(i70:0 - i58:0, i58:0) :|: i58:0 > 0 && i70:0 > 0 && i70:0 >= i58:0 ---------------------------------------- (8) Obligation: Rules: f549_0_mod_LT(i70:0, i58:0) -> f549_0_mod_LT(i58:0, i70:0) :|: i58:0 > 0 && i70:0 < i58:0 && i70:0 > 0 f549_0_mod_LT(x, x1) -> f549_0_mod_LT(x - x1, x1) :|: x1 > 0 && x > 0 && x >= x1 ---------------------------------------- (9) IRSFormatTransformerProof (EQUIVALENT) Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %). ---------------------------------------- (10) Obligation: Rules: f549_0_mod_LT(i70:0, i58:0) -> f549_0_mod_LT(i58:0, i70:0) :|: i58:0 > 0 && i70:0 < i58:0 && i70:0 > 0 f549_0_mod_LT(x, x1) -> f549_0_mod_LT(arith, x1) :|: x1 > 0 && x > 0 && x >= x1 && arith = x - x1 ---------------------------------------- (11) IRSwTTerminationDigraphProof (EQUIVALENT) Constructed termination digraph! Nodes: (1) f549_0_mod_LT(i70:0, i58:0) -> f549_0_mod_LT(i58:0, i70:0) :|: i58:0 > 0 && i70:0 < i58:0 && i70:0 > 0 (2) f549_0_mod_LT(x, x1) -> f549_0_mod_LT(arith, x1) :|: x1 > 0 && x > 0 && x >= x1 && arith = x - x1 Arcs: (1) -> (2) (2) -> (1), (2) This digraph is fully evaluated! ---------------------------------------- (12) Obligation: Termination digraph: Nodes: (1) f549_0_mod_LT(i70:0, i58:0) -> f549_0_mod_LT(i58:0, i70:0) :|: i58:0 > 0 && i70:0 < i58:0 && i70:0 > 0 (2) f549_0_mod_LT(x, x1) -> f549_0_mod_LT(arith, x1) :|: x1 > 0 && x > 0 && x >= x1 && arith = x - x1 Arcs: (1) -> (2) (2) -> (1), (2) This digraph is fully evaluated! ---------------------------------------- (13) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (14) Obligation: Rules: f549_0_mod_LT(x:0, x1:0) -> f549_0_mod_LT(x:0 - x1:0, x1:0) :|: x1:0 > 0 && x:0 > 0 && x:0 >= x1:0 f549_0_mod_LT(i70:0:0, i58:0:0) -> f549_0_mod_LT(i58:0:0, i70:0:0) :|: i58:0:0 > 0 && i70:0:0 < i58:0:0 && i70:0:0 > 0 ---------------------------------------- (15) TempFilterProof (SOUND) Used the following sort dictionary for filtering: f549_0_mod_LT(INTEGER, INTEGER) Replaced non-predefined constructor symbols by 0. ---------------------------------------- (16) Obligation: Rules: f549_0_mod_LT(x:0, x1:0) -> f549_0_mod_LT(c, x1:0) :|: c = x:0 - x1:0 && (x1:0 > 0 && x:0 > 0 && x:0 >= x1:0) f549_0_mod_LT(i70:0:0, i58:0:0) -> f549_0_mod_LT(i58:0:0, i70:0:0) :|: i58:0:0 > 0 && i70:0:0 < i58:0:0 && i70:0:0 > 0 ---------------------------------------- (17) PolynomialOrderProcessor (EQUIVALENT) Found the following polynomial interpretation: [f549_0_mod_LT(x, x1)] = x1 The following rules are decreasing: f549_0_mod_LT(i70:0:0, i58:0:0) -> f549_0_mod_LT(i58:0:0, i70:0:0) :|: i58:0:0 > 0 && i70:0:0 < i58:0:0 && i70:0:0 > 0 The following rules are bounded: f549_0_mod_LT(x:0, x1:0) -> f549_0_mod_LT(c, x1:0) :|: c = x:0 - x1:0 && (x1:0 > 0 && x:0 > 0 && x:0 >= x1:0) f549_0_mod_LT(i70:0:0, i58:0:0) -> f549_0_mod_LT(i58:0:0, i70:0:0) :|: i58:0:0 > 0 && i70:0:0 < i58:0:0 && i70:0:0 > 0 ---------------------------------------- (18) Obligation: Rules: f549_0_mod_LT(x:0, x1:0) -> f549_0_mod_LT(c, x1:0) :|: c = x:0 - x1:0 && (x1:0 > 0 && x:0 > 0 && x:0 >= x1:0) ---------------------------------------- (19) PolynomialOrderProcessor (EQUIVALENT) Found the following polynomial interpretation: [f549_0_mod_LT(x, x1)] = x The following rules are decreasing: f549_0_mod_LT(x:0, x1:0) -> f549_0_mod_LT(c, x1:0) :|: c = x:0 - x1:0 && (x1:0 > 0 && x:0 > 0 && x:0 >= x1:0) The following rules are bounded: f549_0_mod_LT(x:0, x1:0) -> f549_0_mod_LT(c, x1:0) :|: c = x:0 - x1:0 && (x1:0 > 0 && x:0 > 0 && x:0 >= x1:0) ---------------------------------------- (20) YES