Initial Problem

Start: n_start
Program_Vars: Arg_0, Arg_1
Temp_Vars:
Locations: n_end___1, n_end___3, n_start, n_sumto___2, n_sumto___4
Transitions:
0:n_start(Arg_0,Arg_1) -> n_sumto___4(Arg_0,Arg_1)
1:n_sumto___2(Arg_0,Arg_1) -> n_end___1(Arg_0,Arg_1):|:Arg_0<=1+Arg_1 && 1+Arg_1<=Arg_0
2:n_sumto___2(Arg_0,Arg_1) -> n_sumto___2(Arg_0+1,Arg_1):|:Arg_0<=1+Arg_1 && Arg_0<=Arg_1
3:n_sumto___4(Arg_0,Arg_1) -> n_end___3(Arg_0,Arg_1):|:1+Arg_1<=Arg_0
4:n_sumto___4(Arg_0,Arg_1) -> n_sumto___2(Arg_0+1,Arg_1):|:Arg_0<=Arg_1

Preprocessing

Found invariant 1+Arg_1<=Arg_0 for location n_end___3

Found invariant Arg_0<=1+Arg_1 for location n_sumto___2

Found invariant 1+Arg_1<=Arg_0 && Arg_0<=1+Arg_1 for location n_end___1

Problem after Preprocessing

Start: n_start
Program_Vars: Arg_0, Arg_1
Temp_Vars:
Locations: n_end___1, n_end___3, n_start, n_sumto___2, n_sumto___4
Transitions:
0:n_start(Arg_0,Arg_1) -> n_sumto___4(Arg_0,Arg_1)
1:n_sumto___2(Arg_0,Arg_1) -> n_end___1(Arg_0,Arg_1):|:Arg_0<=1+Arg_1 && Arg_0<=1+Arg_1 && 1+Arg_1<=Arg_0
2:n_sumto___2(Arg_0,Arg_1) -> n_sumto___2(Arg_0+1,Arg_1):|:Arg_0<=1+Arg_1 && Arg_0<=1+Arg_1 && Arg_0<=Arg_1
3:n_sumto___4(Arg_0,Arg_1) -> n_end___3(Arg_0,Arg_1):|:1+Arg_1<=Arg_0
4:n_sumto___4(Arg_0,Arg_1) -> n_sumto___2(Arg_0+1,Arg_1):|:Arg_0<=Arg_1

MPRF for transition 2:n_sumto___2(Arg_0,Arg_1) -> n_sumto___2(Arg_0+1,Arg_1):|:Arg_0<=1+Arg_1 && Arg_0<=1+Arg_1 && Arg_0<=Arg_1 of depth 1:

new bound:

Arg_0+Arg_1+2 {O(n)}

MPRF:

n_sumto___2 [Arg_1+1-Arg_0 ]

All Bounds

Timebounds

Overall timebound:Arg_0+Arg_1+6 {O(n)}
0: n_start->n_sumto___4: 1 {O(1)}
1: n_sumto___2->n_end___1: 1 {O(1)}
2: n_sumto___2->n_sumto___2: Arg_0+Arg_1+2 {O(n)}
3: n_sumto___4->n_end___3: 1 {O(1)}
4: n_sumto___4->n_sumto___2: 1 {O(1)}

Costbounds

Overall costbound: Arg_0+Arg_1+6 {O(n)}
0: n_start->n_sumto___4: 1 {O(1)}
1: n_sumto___2->n_end___1: 1 {O(1)}
2: n_sumto___2->n_sumto___2: Arg_0+Arg_1+2 {O(n)}
3: n_sumto___4->n_end___3: 1 {O(1)}
4: n_sumto___4->n_sumto___2: 1 {O(1)}

Sizebounds

0: n_start->n_sumto___4, Arg_0: Arg_0 {O(n)}
0: n_start->n_sumto___4, Arg_1: Arg_1 {O(n)}
1: n_sumto___2->n_end___1, Arg_0: 3*Arg_0+Arg_1+4 {O(n)}
1: n_sumto___2->n_end___1, Arg_1: 2*Arg_1 {O(n)}
2: n_sumto___2->n_sumto___2, Arg_0: 2*Arg_0+Arg_1+3 {O(n)}
2: n_sumto___2->n_sumto___2, Arg_1: Arg_1 {O(n)}
3: n_sumto___4->n_end___3, Arg_0: Arg_0 {O(n)}
3: n_sumto___4->n_end___3, Arg_1: Arg_1 {O(n)}
4: n_sumto___4->n_sumto___2, Arg_0: Arg_0+1 {O(n)}
4: n_sumto___4->n_sumto___2, Arg_1: Arg_1 {O(n)}