/export/starexec/sandbox/solver/bin/starexec_run_standard /export/starexec/sandbox/benchmark/theBenchmark.jar /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- YES proof of /export/starexec/sandbox/benchmark/theBenchmark.jar # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty termination of the given Bare JBC problem could be proven: (0) Bare JBC problem (1) BareJBCToJBCProof [EQUIVALENT, 95 ms] (2) JBC problem (3) JBCToGraph [EQUIVALENT, 313 ms] (4) JBCTerminationGraph (5) TerminationGraphToSCCProof [SOUND, 0 ms] (6) JBCTerminationSCC (7) SCCToIRSProof [SOUND, 93 ms] (8) IRSwT (9) IRSFormatTransformerProof [EQUIVALENT, 0 ms] (10) IRSwT (11) IRSwTTerminationDigraphProof [EQUIVALENT, 47 ms] (12) IRSwT (13) IntTRSCompressionProof [EQUIVALENT, 0 ms] (14) IRSwT (15) TempFilterProof [SOUND, 53 ms] (16) IntTRS (17) PolynomialOrderProcessor [EQUIVALENT, 0 ms] (18) IntTRS (19) PolynomialOrderProcessor [EQUIVALENT, 1 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 210 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: f342_0_gcd_LE(EOS(STATIC_342), i19, i46, i46) -> f346_0_gcd_LE(EOS(STATIC_346), i19, i46, i46) :|: TRUE f346_0_gcd_LE(EOS(STATIC_346), i19, i46, i46) -> f350_0_gcd_Load(EOS(STATIC_350), i19, i46) :|: i46 > 0 f350_0_gcd_Load(EOS(STATIC_350), i19, i46) -> f354_0_gcd_LE(EOS(STATIC_354), i19, i46, i19) :|: TRUE f354_0_gcd_LE(EOS(STATIC_354), i47, i46, i47) -> f359_0_gcd_LE(EOS(STATIC_359), i47, i46, i47) :|: TRUE f359_0_gcd_LE(EOS(STATIC_359), i47, i46, i47) -> f364_0_gcd_Load(EOS(STATIC_364), i47, i46) :|: i47 > 0 f364_0_gcd_Load(EOS(STATIC_364), i47, i46) -> f369_0_gcd_Store(EOS(STATIC_369), i47, i46, i46) :|: TRUE f369_0_gcd_Store(EOS(STATIC_369), i47, i46, i46) -> f373_0_gcd_Load(EOS(STATIC_373), i47, i46, i46) :|: TRUE f373_0_gcd_Load(EOS(STATIC_373), i47, i46, i46) -> f377_0_gcd_Load(EOS(STATIC_377), i46, i46, i47) :|: TRUE f377_0_gcd_Load(EOS(STATIC_377), i46, i46, i47) -> f379_0_gcd_InvokeMethod(EOS(STATIC_379), i46, i47, i46) :|: TRUE f379_0_gcd_InvokeMethod(EOS(STATIC_379), i46, i47, i46) -> f381_0_mod_Load(EOS(STATIC_381), i46, i47, i46) :|: TRUE f381_0_mod_Load(EOS(STATIC_381), i46, i47, i46) -> f691_0_mod_Load(EOS(STATIC_691), i46, i47, i46) :|: TRUE f691_0_mod_Load(EOS(STATIC_691), i46, i72, i46) -> f692_0_mod_Load(EOS(STATIC_692), i46, i72, i46, i72) :|: TRUE f692_0_mod_Load(EOS(STATIC_692), i46, i72, i46, i72) -> f693_0_mod_LT(EOS(STATIC_693), i46, i72, i46, i72, i46) :|: TRUE f693_0_mod_LT(EOS(STATIC_693), i46, i72, i46, i72, i46) -> f697_0_mod_LT(EOS(STATIC_697), i46, i72, i46, i72, i46) :|: i72 < i46 f693_0_mod_LT(EOS(STATIC_693), i46, i72, i46, i72, i46) -> f698_0_mod_LT(EOS(STATIC_698), i46, i72, i46, i72, i46) :|: i72 >= i46 f697_0_mod_LT(EOS(STATIC_697), i46, i72, i46, i72, i46) -> f706_0_mod_Load(EOS(STATIC_706), i46, i72) :|: i72 < i46 f706_0_mod_Load(EOS(STATIC_706), i46, i72) -> f709_0_mod_Return(EOS(STATIC_709), i46, i72) :|: TRUE f709_0_mod_Return(EOS(STATIC_709), i46, i72) -> f711_0_gcd_Store(EOS(STATIC_711), i46, i72) :|: TRUE f711_0_gcd_Store(EOS(STATIC_711), i46, i72) -> f714_0_gcd_Load(EOS(STATIC_714), i72, i46) :|: TRUE f714_0_gcd_Load(EOS(STATIC_714), i72, i46) -> f716_0_gcd_Store(EOS(STATIC_716), i72, i46) :|: TRUE f716_0_gcd_Store(EOS(STATIC_716), i72, i46) -> f719_0_gcd_JMP(EOS(STATIC_719), i46, i72) :|: TRUE f719_0_gcd_JMP(EOS(STATIC_719), i46, i72) -> f725_0_gcd_Load(EOS(STATIC_725), i46, i72) :|: TRUE f725_0_gcd_Load(EOS(STATIC_725), i46, i72) -> f337_0_gcd_Load(EOS(STATIC_337), i46, i72) :|: TRUE f337_0_gcd_Load(EOS(STATIC_337), i19, i44) -> f342_0_gcd_LE(EOS(STATIC_342), i19, i44, i44) :|: TRUE f698_0_mod_LT(EOS(STATIC_698), i46, i72, i46, i72, i46) -> f708_0_mod_Load(EOS(STATIC_708), i46, i72, i46) :|: i72 >= i46 f708_0_mod_Load(EOS(STATIC_708), i46, i72, i46) -> f710_0_mod_LE(EOS(STATIC_710), i46, i72, i46, i46) :|: TRUE f710_0_mod_LE(EOS(STATIC_710), i46, i72, i46, i46) -> f712_0_mod_Load(EOS(STATIC_712), i46, i72, i46) :|: i46 > 0 f712_0_mod_Load(EOS(STATIC_712), i46, i72, i46) -> f715_0_mod_Load(EOS(STATIC_715), i46, i46, i72) :|: TRUE f715_0_mod_Load(EOS(STATIC_715), i46, i46, i72) -> f717_0_mod_IntArithmetic(EOS(STATIC_717), i46, i46, i72, i46) :|: TRUE f717_0_mod_IntArithmetic(EOS(STATIC_717), i46, i46, i72, i46) -> f720_0_mod_Store(EOS(STATIC_720), i46, i46, i72 - i46) :|: i72 > 0 && i46 > 0 f720_0_mod_Store(EOS(STATIC_720), i46, i46, i74) -> f726_0_mod_JMP(EOS(STATIC_726), i46, i74, i46) :|: TRUE f726_0_mod_JMP(EOS(STATIC_726), i46, i74, i46) -> f727_0_mod_Load(EOS(STATIC_727), i46, i74, i46) :|: TRUE f727_0_mod_Load(EOS(STATIC_727), i46, i74, i46) -> f691_0_mod_Load(EOS(STATIC_691), i46, i74, i46) :|: TRUE Combined rules. Obtained 2 IRulesP rules: f693_0_mod_LT(EOS(STATIC_693), i46:0, i72:0, i46:0, i72:0, i46:0) -> f693_0_mod_LT(EOS(STATIC_693), i46:0, i72:0 - i46:0, i46:0, i72:0 - i46:0, i46:0) :|: i72:0 >= i46:0 && i46:0 > 0 && i72:0 > 0 f693_0_mod_LT(EOS(STATIC_693), i46:0, i72:0, i46:0, i72:0, i46:0) -> f693_0_mod_LT(EOS(STATIC_693), i72:0, i46:0, i72:0, i46:0, i72:0) :|: i72:0 > 0 && i46:0 > 0 && i72:0 < i46:0 Filtered constant ground arguments: f693_0_mod_LT(x1, x2, x3, x4, x5, x6) -> f693_0_mod_LT(x2, x3, x4, x5, x6) EOS(x1) -> EOS Filtered duplicate arguments: f693_0_mod_LT(x1, x2, x3, x4, x5) -> f693_0_mod_LT(x4, x5) Finished conversion. Obtained 2 rules.P rules: f693_0_mod_LT(i72:0, i46:0) -> f693_0_mod_LT(i72:0 - i46:0, i46:0) :|: i46:0 > 0 && i72:0 > 0 && i72:0 >= i46:0 f693_0_mod_LT(i72:0, i46:0) -> f693_0_mod_LT(i46:0, i72:0) :|: i46:0 > 0 && i72:0 < i46:0 && i72:0 > 0 ---------------------------------------- (8) Obligation: Rules: f693_0_mod_LT(i72:0, i46:0) -> f693_0_mod_LT(i72:0 - i46:0, i46:0) :|: i46:0 > 0 && i72:0 > 0 && i72:0 >= i46:0 f693_0_mod_LT(x, x1) -> f693_0_mod_LT(x1, x) :|: x1 > 0 && x < x1 && x > 0 ---------------------------------------- (9) IRSFormatTransformerProof (EQUIVALENT) Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %). ---------------------------------------- (10) Obligation: Rules: f693_0_mod_LT(i72:0, i46:0) -> f693_0_mod_LT(arith, i46:0) :|: i46:0 > 0 && i72:0 > 0 && i72:0 >= i46:0 && arith = i72:0 - i46:0 f693_0_mod_LT(x, x1) -> f693_0_mod_LT(x1, x) :|: x1 > 0 && x < x1 && x > 0 ---------------------------------------- (11) IRSwTTerminationDigraphProof (EQUIVALENT) Constructed termination digraph! Nodes: (1) f693_0_mod_LT(i72:0, i46:0) -> f693_0_mod_LT(arith, i46:0) :|: i46:0 > 0 && i72:0 > 0 && i72:0 >= i46:0 && arith = i72:0 - i46:0 (2) f693_0_mod_LT(x, x1) -> f693_0_mod_LT(x1, x) :|: x1 > 0 && x < x1 && x > 0 Arcs: (1) -> (1), (2) (2) -> (1) This digraph is fully evaluated! ---------------------------------------- (12) Obligation: Termination digraph: Nodes: (1) f693_0_mod_LT(i72:0, i46:0) -> f693_0_mod_LT(arith, i46:0) :|: i46:0 > 0 && i72:0 > 0 && i72:0 >= i46:0 && arith = i72:0 - i46:0 (2) f693_0_mod_LT(x, x1) -> f693_0_mod_LT(x1, x) :|: x1 > 0 && x < x1 && x > 0 Arcs: (1) -> (1), (2) (2) -> (1) This digraph is fully evaluated! ---------------------------------------- (13) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (14) Obligation: Rules: f693_0_mod_LT(x:0, x1:0) -> f693_0_mod_LT(x1:0, x:0) :|: x1:0 > 0 && x:0 < x1:0 && x:0 > 0 f693_0_mod_LT(i72:0:0, i46:0:0) -> f693_0_mod_LT(i72:0:0 - i46:0:0, i46:0:0) :|: i46:0:0 > 0 && i72:0:0 > 0 && i72:0:0 >= i46:0:0 ---------------------------------------- (15) TempFilterProof (SOUND) Used the following sort dictionary for filtering: f693_0_mod_LT(INTEGER, INTEGER) Replaced non-predefined constructor symbols by 0. ---------------------------------------- (16) Obligation: Rules: f693_0_mod_LT(x:0, x1:0) -> f693_0_mod_LT(x1:0, x:0) :|: x1:0 > 0 && x:0 < x1:0 && x:0 > 0 f693_0_mod_LT(i72:0:0, i46:0:0) -> f693_0_mod_LT(c, i46:0:0) :|: c = i72:0:0 - i46:0:0 && (i46:0:0 > 0 && i72:0:0 > 0 && i72:0:0 >= i46:0:0) ---------------------------------------- (17) PolynomialOrderProcessor (EQUIVALENT) Found the following polynomial interpretation: [f693_0_mod_LT(x, x1)] = x1 The following rules are decreasing: f693_0_mod_LT(x:0, x1:0) -> f693_0_mod_LT(x1:0, x:0) :|: x1:0 > 0 && x:0 < x1:0 && x:0 > 0 The following rules are bounded: f693_0_mod_LT(x:0, x1:0) -> f693_0_mod_LT(x1:0, x:0) :|: x1:0 > 0 && x:0 < x1:0 && x:0 > 0 f693_0_mod_LT(i72:0:0, i46:0:0) -> f693_0_mod_LT(c, i46:0:0) :|: c = i72:0:0 - i46:0:0 && (i46:0:0 > 0 && i72:0:0 > 0 && i72:0:0 >= i46:0:0) ---------------------------------------- (18) Obligation: Rules: f693_0_mod_LT(i72:0:0, i46:0:0) -> f693_0_mod_LT(c, i46:0:0) :|: c = i72:0:0 - i46:0:0 && (i46:0:0 > 0 && i72:0:0 > 0 && i72:0:0 >= i46:0:0) ---------------------------------------- (19) PolynomialOrderProcessor (EQUIVALENT) Found the following polynomial interpretation: [f693_0_mod_LT(x, x1)] = x The following rules are decreasing: f693_0_mod_LT(i72:0:0, i46:0:0) -> f693_0_mod_LT(c, i46:0:0) :|: c = i72:0:0 - i46:0:0 && (i46:0:0 > 0 && i72:0:0 > 0 && i72:0:0 >= i46:0:0) The following rules are bounded: f693_0_mod_LT(i72:0:0, i46:0:0) -> f693_0_mod_LT(c, i46:0:0) :|: c = i72:0:0 - i46:0:0 && (i46:0:0 > 0 && i72:0:0 > 0 && i72:0:0 >= i46:0:0) ---------------------------------------- (20) YES