(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, 1).


The TRS R consists of the following rules:

not(x) → xor(x, true)
implies(x, y) → xor(and(x, y), xor(x, true))
or(x, y) → xor(and(x, y), xor(x, y))
=(x, y) → xor(x, xor(y, true))

Rewrite Strategy: INNERMOST

(1) TrsToWeightedTrsProof (BOTH BOUNDS(ID, ID) transformation)

Transformed TRS to weighted TRS

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, 1).


The TRS R consists of the following rules:

not(x) → xor(x, true) [1]
implies(x, y) → xor(and(x, y), xor(x, true)) [1]
or(x, y) → xor(and(x, y), xor(x, y)) [1]
=(x, y) → xor(x, xor(y, true)) [1]

Rewrite Strategy: INNERMOST

(3) CpxWeightedTrsRenamingProof (BOTH BOUNDS(ID, ID) transformation)

Renamed defined symbols to avoid conflicts with arithmetic symbols:

= => eq

(4) Obligation:

The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, 1).


The TRS R consists of the following rules:

not(x) → xor(x, true) [1]
implies(x, y) → xor(and(x, y), xor(x, true)) [1]
or(x, y) → xor(and(x, y), xor(x, y)) [1]
eq(x, y) → xor(x, xor(y, true)) [1]

Rewrite Strategy: INNERMOST

(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(6) Obligation:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

not(x) → xor(x, true) [1]
implies(x, y) → xor(and(x, y), xor(x, true)) [1]
or(x, y) → xor(and(x, y), xor(x, y)) [1]
eq(x, y) → xor(x, xor(y, true)) [1]

The TRS has the following type information:
not :: and → true:xor
xor :: and → true:xor → true:xor
true :: true:xor
implies :: and → true:xor → true:xor
and :: and → true:xor → and
or :: and → true:xor → true:xor
eq :: and → and → true:xor

Rewrite Strategy: INNERMOST

(7) CompletionProof (UPPER BOUND(ID) transformation)

The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added:
none

And the following fresh constants:

const

(8) Obligation:

Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

not(x) → xor(x, true) [1]
implies(x, y) → xor(and(x, y), xor(x, true)) [1]
or(x, y) → xor(and(x, y), xor(x, y)) [1]
eq(x, y) → xor(x, xor(y, true)) [1]

The TRS has the following type information:
not :: and → true:xor
xor :: and → true:xor → true:xor
true :: true:xor
implies :: and → true:xor → true:xor
and :: and → true:xor → and
or :: and → true:xor → true:xor
eq :: and → and → true:xor
const :: and

Rewrite Strategy: INNERMOST

(9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID) transformation)

Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction.
The constant constructors are abstracted as follows:

true => 0
const => 0

(10) Obligation:

Complexity RNTS consisting of the following rules:

eq(z, z') -{ 1 }→ 1 + x + (1 + y + 0) :|: x >= 0, y >= 0, z = x, z' = y
implies(z, z') -{ 1 }→ 1 + (1 + x + y) + (1 + x + 0) :|: x >= 0, y >= 0, z = x, z' = y
not(z) -{ 1 }→ 1 + x + 0 :|: x >= 0, z = x
or(z, z') -{ 1 }→ 1 + (1 + x + y) + (1 + x + y) :|: x >= 0, y >= 0, z = x, z' = y

Only complete derivations are relevant for the runtime complexity.

(11) CompleteCoflocoProof (EQUIVALENT transformation)

Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo:

eq(start(V, V2),0,[not(V, Out)],[V >= 0]).
eq(start(V, V2),0,[implies(V, V2, Out)],[V >= 0,V2 >= 0]).
eq(start(V, V2),0,[or(V, V2, Out)],[V >= 0,V2 >= 0]).
eq(start(V, V2),0,[eq(V, V2, Out)],[V >= 0,V2 >= 0]).
eq(not(V, Out),1,[],[Out = 1 + V1,V1 >= 0,V = V1]).
eq(implies(V, V2, Out),1,[],[Out = 3 + 2*V3 + V4,V3 >= 0,V4 >= 0,V = V3,V2 = V4]).
eq(or(V, V2, Out),1,[],[Out = 3 + 2*V5 + 2*V6,V5 >= 0,V6 >= 0,V = V5,V2 = V6]).
eq(eq(V, V2, Out),1,[],[Out = 2 + V7 + V8,V7 >= 0,V8 >= 0,V = V7,V2 = V8]).
input_output_vars(not(V,Out),[V],[Out]).
input_output_vars(implies(V,V2,Out),[V,V2],[Out]).
input_output_vars(or(V,V2,Out),[V,V2],[Out]).
input_output_vars(eq(V,V2,Out),[V,V2],[Out]).

CoFloCo proof output:
Preprocessing Cost Relations
=====================================

#### Computed strongly connected components
0. non_recursive : [eq/3]
1. non_recursive : [implies/3]
2. non_recursive : [not/2]
3. non_recursive : [or/3]
4. non_recursive : [start/2]

#### Obtained direct recursion through partial evaluation
0. SCC is completely evaluated into other SCCs
1. SCC is completely evaluated into other SCCs
2. SCC is completely evaluated into other SCCs
3. SCC is completely evaluated into other SCCs
4. SCC is partially evaluated into start/2

Control-Flow Refinement of Cost Relations
=====================================

### Specialization of cost equations start/2
* CE 2 is refined into CE [3]


### Cost equations --> "Loop" of start/2
* CEs [3] --> Loop 2

### Ranking functions of CR start(V,V2)

#### Partial ranking functions of CR start(V,V2)


Computing Bounds
=====================================

#### Cost of chains of start(V,V2):
* Chain [2]: 1
with precondition: [V>=0]


Closed-form bounds of start(V,V2):
-------------------------------------
* Chain [2] with precondition: [V>=0]
- Upper bound: 1
- Complexity: constant

### Maximum cost of start(V,V2): 1
Asymptotic class: constant
* Total analysis performed in 15 ms.

(12) BOUNDS(1, 1)