/export/starexec/sandbox/solver/bin/starexec_run_complexity /export/starexec/sandbox/benchmark/theBenchmark.koat /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- MAYBE proof of /export/starexec/sandbox/benchmark/theBenchmark.koat # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The runtime complexity of the given CpxIntTrs could be proven to be BOUNDS(1, INF). (0) CpxIntTrs (1) Loat Proof [FINISHED, 631 ms] (2) BOUNDS(1, INF) ---------------------------------------- (0) Obligation: Complexity Int TRS consisting of the following rules: evalfstart(A, B) -> Com_1(evalfentryin(A, B)) :|: TRUE evalfentryin(A, B) -> Com_1(evalfbb3in(B, A)) :|: A >= 1 && B >= A + 1 evalfbb3in(A, B) -> Com_1(evalfreturnin(A, B)) :|: 0 >= A evalfbb3in(A, B) -> Com_1(evalfbb4in(A, B)) :|: A >= 1 evalfbb4in(A, B) -> Com_1(evalfbbin(A, B)) :|: 0 >= C + 1 evalfbb4in(A, B) -> Com_1(evalfbbin(A, B)) :|: C >= 1 evalfbb4in(A, B) -> Com_1(evalfreturnin(A, B)) :|: TRUE evalfbbin(A, B) -> Com_1(evalfbb1in(A, B)) :|: B >= A + 1 evalfbbin(A, B) -> Com_1(evalfbb2in(A, B)) :|: A >= B evalfbb1in(A, B) -> Com_1(evalfbb3in(A + 1, B)) :|: TRUE evalfbb2in(A, B) -> Com_1(evalfbb3in(A - B, B)) :|: TRUE evalfreturnin(A, B) -> Com_1(evalfstop(A, B)) :|: TRUE The start-symbols are:[evalfstart_2] ---------------------------------------- (1) Loat Proof (FINISHED) ### Pre-processing the ITS problem ### Initial linear ITS problem Start location: evalfstart 0: evalfstart -> evalfentryin : [], cost: 1 1: evalfentryin -> evalfbb3in : A'=B, B'=A, [ A>=1 && B>=1+A ], cost: 1 2: evalfbb3in -> evalfreturnin : [ 0>=A ], cost: 1 3: evalfbb3in -> evalfbb4in : [ A>=1 ], cost: 1 4: evalfbb4in -> evalfbbin : [ 0>=1+free ], cost: 1 5: evalfbb4in -> evalfbbin : [ free_1>=1 ], cost: 1 6: evalfbb4in -> evalfreturnin : [], cost: 1 7: evalfbbin -> evalfbb1in : [ B>=1+A ], cost: 1 8: evalfbbin -> evalfbb2in : [ A>=B ], cost: 1 9: evalfbb1in -> evalfbb3in : A'=1+A, [], cost: 1 10: evalfbb2in -> evalfbb3in : A'=A-B, [], cost: 1 11: evalfreturnin -> evalfstop : [], cost: 1 Checking for constant complexity: The following rule is satisfiable with cost >= 1, yielding constant complexity: 0: evalfstart -> evalfentryin : [], cost: 1 Removed unreachable and leaf rules: Start location: evalfstart 0: evalfstart -> evalfentryin : [], cost: 1 1: evalfentryin -> evalfbb3in : A'=B, B'=A, [ A>=1 && B>=1+A ], cost: 1 3: evalfbb3in -> evalfbb4in : [ A>=1 ], cost: 1 4: evalfbb4in -> evalfbbin : [ 0>=1+free ], cost: 1 5: evalfbb4in -> evalfbbin : [ free_1>=1 ], cost: 1 7: evalfbbin -> evalfbb1in : [ B>=1+A ], cost: 1 8: evalfbbin -> evalfbb2in : [ A>=B ], cost: 1 9: evalfbb1in -> evalfbb3in : A'=1+A, [], cost: 1 10: evalfbb2in -> evalfbb3in : A'=A-B, [], cost: 1 Simplified all rules, resulting in: Start location: evalfstart 0: evalfstart -> evalfentryin : [], cost: 1 1: evalfentryin -> evalfbb3in : A'=B, B'=A, [ A>=1 && B>=1+A ], cost: 1 3: evalfbb3in -> evalfbb4in : [ A>=1 ], cost: 1 5: evalfbb4in -> evalfbbin : [], cost: 1 7: evalfbbin -> evalfbb1in : [ B>=1+A ], cost: 1 8: evalfbbin -> evalfbb2in : [ A>=B ], cost: 1 9: evalfbb1in -> evalfbb3in : A'=1+A, [], cost: 1 10: evalfbb2in -> evalfbb3in : A'=A-B, [], cost: 1 ### Simplification by acceleration and chaining ### Eliminated locations (on linear paths): Start location: evalfstart 12: evalfstart -> evalfbb3in : A'=B, B'=A, [ A>=1 && B>=1+A ], cost: 2 13: evalfbb3in -> evalfbbin : [ A>=1 ], cost: 2 14: evalfbbin -> evalfbb3in : A'=1+A, [ B>=1+A ], cost: 2 15: evalfbbin -> evalfbb3in : A'=A-B, [ A>=B ], cost: 2 Eliminated locations (on tree-shaped paths): Start location: evalfstart 12: evalfstart -> evalfbb3in : A'=B, B'=A, [ A>=1 && B>=1+A ], cost: 2 16: evalfbb3in -> evalfbb3in : A'=1+A, [ A>=1 && B>=1+A ], cost: 4 17: evalfbb3in -> evalfbb3in : A'=A-B, [ A>=1 && A>=B ], cost: 4 Accelerating simple loops of location 2. Accelerating the following rules: 16: evalfbb3in -> evalfbb3in : A'=1+A, [ A>=1 && B>=1+A ], cost: 4 17: evalfbb3in -> evalfbb3in : A'=A-B, [ A>=1 && A>=B ], cost: 4 Accelerated rule 16 with metering function -A+B, yielding the new rule 18. Found no metering function for rule 17. Removing the simple loops: 16. Accelerated all simple loops using metering functions (where possible): Start location: evalfstart 12: evalfstart -> evalfbb3in : A'=B, B'=A, [ A>=1 && B>=1+A ], cost: 2 17: evalfbb3in -> evalfbb3in : A'=A-B, [ A>=1 && A>=B ], cost: 4 18: evalfbb3in -> evalfbb3in : A'=B, [ A>=1 && B>=1+A ], cost: -4*A+4*B Chained accelerated rules (with incoming rules): Start location: evalfstart 12: evalfstart -> evalfbb3in : A'=B, B'=A, [ A>=1 && B>=1+A ], cost: 2 19: evalfstart -> evalfbb3in : A'=-A+B, B'=A, [ A>=1 && B>=1+A && B>=1 ], cost: 6 Removed unreachable locations (and leaf rules with constant cost): Start location: evalfstart ### Computing asymptotic complexity ### Fully simplified ITS problem Start location: evalfstart Obtained the following overall complexity (w.r.t. the length of the input n): Complexity: Constant Cpx degree: 0 Solved cost: 1 Rule cost: 1 Rule guard: [] WORST_CASE(Omega(1),?) ---------------------------------------- (2) BOUNDS(1, INF)