Automated Complexity Analysis of Rewrite Systems Florian Frohn RWTH - - PowerPoint PPT Presentation

automated complexity analysis of rewrite systems
SMART_READER_LITE
LIVE PREVIEW

Automated Complexity Analysis of Rewrite Systems Florian Frohn RWTH - - PowerPoint PPT Presentation

Automated Complexity Analysis of Rewrite Systems Florian Frohn RWTH Aachen University, Germany December 11, 2018 Automated Complexity Analysis of Rewrite Systems 1 Automated Complexity Analysis of Rewrite Systems Florian Frohn RWTH Aachen


slide-1
SLIDE 1

Automated Complexity Analysis of Rewrite Systems

Florian Frohn

RWTH Aachen University, Germany

December 11, 2018

Automated Complexity Analysis of Rewrite Systems 1

slide-2
SLIDE 2

Automated Complexity Analysis of Rewrite Systems

Florian Frohn

RWTH Aachen University, Germany

December 11, 2018

Automated Complexity Analysis of Rewrite Systems 1

slide-3
SLIDE 3

Automated Complexity Analysis of Rewrite Systems

Florian Frohn

RWTH Aachen University, Germany

December 11, 2018

Automated Complexity Analysis of Rewrite Systems 1

slide-4
SLIDE 4

What is Complexity Analysis?

input: x, y ∈ N z = 0 while x > 0 do x = x − 1 z = z + y end return z

Automated Complexity Analysis of Rewrite Systems 2

slide-5
SLIDE 5

What is Complexity Analysis?

input: x, y ∈ N z = 0 while x > 0 do x = x − 1 z = z + y end return z x loop iterations

Automated Complexity Analysis of Rewrite Systems 2

slide-6
SLIDE 6

What is Complexity Analysis?

input: x, y ∈ N z = 0 while x > 0 do x = x − 1 z = z + y end return z x loop iterations 5 operations per iteration

Automated Complexity Analysis of Rewrite Systems 2

slide-7
SLIDE 7

What is Complexity Analysis?

input: x, y ∈ N z = 0 while x > 0 do x = x − 1 z = z + y end return z x loop iterations 5 operations per iteration complexity 5 · x + 2

Automated Complexity Analysis of Rewrite Systems 2

slide-8
SLIDE 8

What is Complexity Analysis?

input: x, y ∈ N z = 0 while x > 0 do x = x − 1 z = z + y end return z x loop iterations 5 operations per iteration complexity 5 · x + 2 upper bound: 7 · x + 4, ...

Automated Complexity Analysis of Rewrite Systems 2

slide-9
SLIDE 9

What is Complexity Analysis?

input: x, y ∈ N z = 0 while x > 0 do x = x − 1 z = z + y end return z x loop iterations 5 operations per iteration complexity 5 · x + 2 upper bound: 7 · x + 4, ... lower bound: x + 1, ...

Automated Complexity Analysis of Rewrite Systems 2

slide-10
SLIDE 10

What is Complexity Analysis?

input: x, y ∈ N z = 0 while x > 0 do x = x − 1 z = z + y end return z x loop iterations 5 operations per iteration complexity 5 · x + 2 upper bound: 7 · x + 4, ... lower bound: x + 1, ... Goal: compute such bounds automatically

Automated Complexity Analysis of Rewrite Systems 2

slide-11
SLIDE 11

Complexity Analysis with AProVE

AProVE

Automated Complexity Analysis of Rewrite Systems 3

slide-12
SLIDE 12

Complexity Analysis with AProVE

Program (Java, C, . . .) AProVE

Automated Complexity Analysis of Rewrite Systems 3

slide-13
SLIDE 13

Complexity Analysis with AProVE

Program (Java, C, . . .) AProVE SE-Graph

Automated Complexity Analysis of Rewrite Systems 3

slide-14
SLIDE 14

Complexity Analysis with AProVE

Program (Java, C, . . .) AProVE SE-Graph AProVE

Automated Complexity Analysis of Rewrite Systems 3

slide-15
SLIDE 15

Complexity Analysis with AProVE

Program (Java, C, . . .) AProVE SE-Graph AProVE Integer Transition System Term Rewrite System

Automated Complexity Analysis of Rewrite Systems 3

slide-16
SLIDE 16

Complexity Analysis with AProVE

Program (Java, C, . . .) AProVE SE-Graph AProVE Integer Transition System Term Rewrite System AProVE CoFloCo LoAT . . .

Automated Complexity Analysis of Rewrite Systems 3

slide-17
SLIDE 17

Complexity Analysis with AProVE

Program (Java, C, . . .) AProVE SE-Graph AProVE Integer Transition System Term Rewrite System AProVE CoFloCo LoAT . . . Upper Bound

Automated Complexity Analysis of Rewrite Systems 3

slide-18
SLIDE 18

Complexity Analysis with AProVE

Program (Java, C, . . .) AProVE SE-Graph AProVE Integer Transition System Term Rewrite System AProVE CoFloCo LoAT . . . Upper Bound Lower Bound

Automated Complexity Analysis of Rewrite Systems 3

slide-19
SLIDE 19

Complexity Analysis with AProVE

Program (Java, C, . . .) AProVE SE-Graph AProVE Integer Transition System Term Rewrite System AProVE CoFloCo LoAT . . . AProVE CoFloCo LoAT . . . Upper Bound Lower Bound

Automated Complexity Analysis of Rewrite Systems 3

slide-20
SLIDE 20

What is Rewriting?

Rule-Based Representation of Programs

Automated Complexity Analysis of Rewrite Systems 4

slide-21
SLIDE 21

What is Rewriting?

Rule-Based Representation of Programs Example (Integer Transition System (ITS)) init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0]

Automated Complexity Analysis of Rewrite Systems 4

slide-22
SLIDE 22

What is Rewriting?

Rule-Based Representation of Programs Example (Integer Transition System (ITS)) init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0] input: x, y ∈ N z = 0 while x > 0 do x = x − 1 z = z + y end return z

Automated Complexity Analysis of Rewrite Systems 4

slide-23
SLIDE 23

What is Rewriting?

Rule-Based Representation of Programs Example (Integer Transition System (ITS)) init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0] input: x, y ∈ N z = 0 while x > 0 do x = x − 1 z = z + y end return z

Automated Complexity Analysis of Rewrite Systems 4

slide-24
SLIDE 24

What is Rewriting?

Rule-Based Representation of Programs Example (Integer Transition System (ITS)) init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0] input: x, y ∈ N z = 0 while x > 0 do x = x − 1 z = z + y end return z

Automated Complexity Analysis of Rewrite Systems 4

slide-25
SLIDE 25

What is Rewriting?

Rule-Based Representation of Programs Example (Integer Transition System (ITS)) init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0] input: x, y ∈ N z = 0 while x > 0 do x = x − 1 z = z + y end return z

Automated Complexity Analysis of Rewrite Systems 4

slide-26
SLIDE 26

What is Rewriting?

Rule-Based Representation of Programs Example (Integer Transition System (ITS)) init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0] input: x, y ∈ N z = 0 while x > 0 do x = x − 1 z = z + y end return z

Automated Complexity Analysis of Rewrite Systems 4

slide-27
SLIDE 27

What is Rewriting?

Rule-Based Representation of Programs Example (Integer Transition System (ITS)) init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0] input: x, y ∈ N z = 0 while x > 0 do x = x − 1 z = z + y end return z

Automated Complexity Analysis of Rewrite Systems 4

slide-28
SLIDE 28

What is Rewriting?

Rule-Based Representation of Programs Example (Integer Transition System (ITS)) init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0] input: x, y ∈ N z = 0 while x > 0 do x = x − 1 z = z + y end return z

Automated Complexity Analysis of Rewrite Systems 4

slide-29
SLIDE 29

What is Rewriting?

Rule-Based Representation of Programs Example (Integer Transition System (ITS)) init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0] input: x, y ∈ N z = 0 while x > 0 do x = x − 1 z = z + y end return z

Automated Complexity Analysis of Rewrite Systems 4

slide-30
SLIDE 30

What is Rewriting?

Rule-Based Representation of Programs Example (Integer Transition System (ITS)) init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0] Example (Term Rewrite System (TRS)) length(cons(x, x′)) − → s(length(x′)) length(nil) − → input: x, y ∈ N z = 0 while x > 0 do x = x − 1 z = z + y end return z

Automated Complexity Analysis of Rewrite Systems 4

slide-31
SLIDE 31

What is Rewriting?

Rule-Based Representation of Programs Example (Integer Transition System (ITS)) init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0] Example (Term Rewrite System (TRS)) length(cons(x, x′)) − → s(length(x′)) length(nil) − → input: x, y ∈ N z = 0 while x > 0 do x = x − 1 z = z + y end return z

  • Automated Complexity Analysis of Rewrite Systems

4

slide-32
SLIDE 32

What is Rewriting?

Rule-Based Representation of Programs Example (Integer Transition System (ITS)) init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0] Example (Term Rewrite System (TRS)) length(cons(x, x′)) − → s(length(x′)) length(nil) − → input: x, y ∈ N z = 0 while x > 0 do x = x − 1 z = z + y end return z

  • 1
  • s(0)

Automated Complexity Analysis of Rewrite Systems 4

slide-33
SLIDE 33

What is Rewriting?

Rule-Based Representation of Programs Example (Integer Transition System (ITS)) init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0] Example (Term Rewrite System (TRS)) length(cons(x, x′)) − → s(length(x′)) length(nil) − → input: x, y ∈ N z = 0 while x > 0 do x = x − 1 z = z + y end return z

  • 1
  • s(0)

2

  • s(s(0))

Automated Complexity Analysis of Rewrite Systems 4

slide-34
SLIDE 34

What is Rewriting?

Rule-Based Representation of Programs Example (Integer Transition System (ITS)) init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0] Example (Term Rewrite System (TRS)) length(cons(x, x′)) − → s(length(x′)) length(nil) − → input: x, y ∈ N z = 0 while x > 0 do x = x − 1 z = z + y end return z

  • 1
  • s(0)

2

  • s(s(0))

. . .

Automated Complexity Analysis of Rewrite Systems 4

slide-35
SLIDE 35

Upper, Lower, Worst Case, Best Case, ...

input size runtime

Automated Complexity Analysis of Rewrite Systems 5

slide-36
SLIDE 36

Upper, Lower, Worst Case, Best Case, ...

input size runtime

Automated Complexity Analysis of Rewrite Systems 5

slide-37
SLIDE 37

Upper, Lower, Worst Case, Best Case, ...

input size runtime

Automated Complexity Analysis of Rewrite Systems 5

slide-38
SLIDE 38

Upper, Lower, Worst Case, Best Case, ...

input size runtime

Automated Complexity Analysis of Rewrite Systems 5

slide-39
SLIDE 39

Upper, Lower, Worst Case, Best Case, ...

input size runtime

Automated Complexity Analysis of Rewrite Systems 5

slide-40
SLIDE 40

Outline

1 Introduction 2 Lower Bounds for ITSs 3 Lower Bounds for TRSs 4 Constant Upper Bounds for TRSs Automated Complexity Analysis of Rewrite Systems 6

slide-41
SLIDE 41

Evaluating ITSs

Example (ITS) while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0]

Automated Complexity Analysis of Rewrite Systems 7

slide-42
SLIDE 42

Evaluating ITSs

Example (ITS) while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0] Example (Evaluation) while(2, 2, 0)

Automated Complexity Analysis of Rewrite Systems 7

slide-43
SLIDE 43

Evaluating ITSs

Example (ITS) while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0] Example (Evaluation) while(2, 2, 0) [x/2, y/2, z/0]

Automated Complexity Analysis of Rewrite Systems 7

slide-44
SLIDE 44

Evaluating ITSs

Example (ITS) while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0] Example (Evaluation) while(2, 2, 0) [x/2, y/2, z/0] | = x > 0

Automated Complexity Analysis of Rewrite Systems 7

slide-45
SLIDE 45

Evaluating ITSs

Example (ITS) while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0] Example (Evaluation) while(2, 2, 0) [x/2, y/2, z/0] | = x > 0

5

− → while(1, 2, 2)

Automated Complexity Analysis of Rewrite Systems 7

slide-46
SLIDE 46

Evaluating ITSs

Example (ITS) while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0] Example (Evaluation) while(2, 2, 0) [x/2, y/2, z/0] | = x > 0

5

− → while(1, 2, 2) [x/1, y/2, z/2]

Automated Complexity Analysis of Rewrite Systems 7

slide-47
SLIDE 47

Evaluating ITSs

Example (ITS) while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0] Example (Evaluation) while(2, 2, 0) [x/2, y/2, z/0] | = x > 0

5

− → while(1, 2, 2) [x/1, y/2, z/2] | = x > 0

Automated Complexity Analysis of Rewrite Systems 7

slide-48
SLIDE 48

Evaluating ITSs

Example (ITS) while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0] Example (Evaluation) while(2, 2, 0) [x/2, y/2, z/0] | = x > 0

5

− → while(1, 2, 2) [x/1, y/2, z/2] | = x > 0

5

− → while(0, 2, 4)

Automated Complexity Analysis of Rewrite Systems 7

slide-49
SLIDE 49

Evaluating ITSs

Example (ITS) while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0] Example (Evaluation) while(2, 2, 0) [x/2, y/2, z/0] | = x > 0

5

− → while(1, 2, 2) [x/1, y/2, z/2] | = x > 0

5

− → while(0, 2, 4) [x/0, y/2, z/4]

Automated Complexity Analysis of Rewrite Systems 7

slide-50
SLIDE 50

Evaluating ITSs

Example (ITS) while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0] Example (Evaluation) while(2, 2, 0) [x/2, y/2, z/0] | = x > 0

5

− → while(1, 2, 2) [x/1, y/2, z/2] | = x > 0

5

− → while(0, 2, 4) [x/0, y/2, z/4] | = x > 0

Automated Complexity Analysis of Rewrite Systems 7

slide-51
SLIDE 51

Evaluating ITSs

Example (ITS) while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0] Example (Evaluation) while(2, 2, 0) [x/2, y/2, z/0] | = x > 0

5

− → while(1, 2, 2) [x/1, y/2, z/2] | = x > 0

5

− → while(0, 2, 4) [x/0, y/2, z/4] | = x = 0

Automated Complexity Analysis of Rewrite Systems 7

slide-52
SLIDE 52

Evaluating ITSs

Example (ITS) while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0] while(x, y, z)

1

− → return(z) [x = 0] Example (Evaluation) while(2, 2, 0) [x/2, y/2, z/0] | = x > 0

5

− → while(1, 2, 2) [x/1, y/2, z/2] | = x > 0

5

− → while(0, 2, 4) [x/0, y/2, z/4] | = x = 0

1

− → return(4)

Automated Complexity Analysis of Rewrite Systems 7

slide-53
SLIDE 53

Loop Acceleration

Example (Loop Acceleration) while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0]

Automated Complexity Analysis of Rewrite Systems 8

slide-54
SLIDE 54

Loop Acceleration

Example (Loop Acceleration) while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0]

  • while(x, y, z)

5·n

− − → while(x − n, y, z + y · n) [x > 0 ∧ 0 < n ≤ x]

Automated Complexity Analysis of Rewrite Systems 8

slide-55
SLIDE 55

Loop Acceleration

Example (Loop Acceleration) while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0]

  • while(x, y, z)

5·n

− − → while(x − n, y, z + y · n) [x > 0 ∧ 0 < n ≤ x] 5 · n: cost of n iterations

Automated Complexity Analysis of Rewrite Systems 8

slide-56
SLIDE 56

Loop Acceleration

Example (Loop Acceleration) while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0]

  • while(x, y, z)

5·n

− − → while(x − n, y, z + y · n) [x > 0 ∧ 0 < n ≤ x] 5 · n: cost of n iterations x − n: value of x after n iterations

Automated Complexity Analysis of Rewrite Systems 8

slide-57
SLIDE 57

Loop Acceleration

Example (Loop Acceleration) while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0]

  • while(x, y, z)

5·n

− − → while(x − n, y, z + y · n) [x > 0 ∧ 0 < n ≤ x] 5 · n: cost of n iterations x − n: value of x after n iterations z + y · n: value of z after n iterations

Automated Complexity Analysis of Rewrite Systems 8

slide-58
SLIDE 58

Loop Acceleration

Example (Loop Acceleration) while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0]

  • while(x, y, z)

5·n

− − → while(x − n, y, z + y · n) [x > 0 ∧ 0 < n ≤ x] 5 · n: cost of n iterations x − n: value of x after n iterations z + y · n: value of z after n iterations Example (Recurrence Equations) x(n) = x(n−1) − 1 y(n) = y(n−1) z(n) = z(n−1) + y(n−1)

Automated Complexity Analysis of Rewrite Systems 8

slide-59
SLIDE 59

Loop Acceleration

Example (Loop Acceleration) while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0]

  • while(x, y, z)

5·n

− − → while(x − n, y, z + y · n) [x > 0 ∧ 0 < n ≤ x] 5 · n: cost of n iterations x − n: value of x after n iterations z + y · n: value of z after n iterations Example (Recurrence Equations) x(n) = x(n−1) − 1 y(n) = y(n−1) z(n) = z(n−1) + y(n−1)

Automated Complexity Analysis of Rewrite Systems 8

slide-60
SLIDE 60

Loop Acceleration

Example (Loop Acceleration) while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0]

  • while(x, y, z)

5·n

− − → while(x − n, y, z + y · n) [x > 0 ∧ 0 < n ≤ x] 5 · n: cost of n iterations x − n: value of x after n iterations z + y · n: value of z after n iterations x: maximal number of loop iterations Example (Recurrence Equations) x(n) = x(n−1) − 1 y(n) = y(n−1) z(n) = z(n−1) + y(n−1)

Automated Complexity Analysis of Rewrite Systems 8

slide-61
SLIDE 61

Loop Acceleration

Example (Loop Acceleration) while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0]

  • while(x, y, z)

5·n

− − → while(x − n, y, z + y · n) [x > 0 ∧ 0 < n ≤ x] 5 · n: cost of n iterations x − n: value of x after n iterations z + y · n: value of z after n iterations x: maximal number of loop iterations

x 2, x − 1, . . . would be fine, too

Example (Recurrence Equations) x(n) = x(n−1) − 1 y(n) = y(n−1) z(n) = z(n−1) + y(n−1)

Automated Complexity Analysis of Rewrite Systems 8

slide-62
SLIDE 62

Loop Acceleration

Example (Loop Acceleration) while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0]

  • while(x, y, z)

5·n

− − → while(x − n, y, z + y · n) [x > 0 ∧ 0 < n ≤ x] 5 · n: cost of n iterations x − n: value of x after n iterations z + y · n: value of z after n iterations x: maximal number of loop iterations

x 2, x − 1, . . . would be fine, too

search for metering function

Example (Recurrence Equations) x(n) = x(n−1) − 1 y(n) = y(n−1) z(n) = z(n−1) + y(n−1)

Automated Complexity Analysis of Rewrite Systems 8

slide-63
SLIDE 63

Loop Acceleration

Example (Loop Acceleration) while(x, y, z)

5

− → while(x − 1, y, z + y) [x > 0]

  • while(x, y, z)

5·n

− − → while(x − n, y, z + y · n) [x > 0 ∧ 0 < n ≤ x] 5 · n: cost of n iterations x − n: value of x after n iterations z + y · n: value of z after n iterations x: maximal number of loop iterations

x 2, x − 1, . . . would be fine, too

search for metering function

Example (Recurrence Equations) x(n) = x(n−1) − 1 y(n) = y(n−1) z(n) = z(n−1) + y(n−1)

Automated Complexity Analysis of Rewrite Systems 8

slide-64
SLIDE 64

Chaining

Example init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, z)

5·n

− − → while(x − n, y, z + y · n) [x > 0 ∧ 0 < n ≤ x] while(x, y, z)

1

− → return(z) [x = 0]

Automated Complexity Analysis of Rewrite Systems 9

slide-65
SLIDE 65

Chaining

Example init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, z)

5·n

− − → while(x − n, y, z + y · n) [x > 0 ∧ 0 < n ≤ x] while(x, y, z)

1

− → return(z) [x = 0]

Automated Complexity Analysis of Rewrite Systems 9

slide-66
SLIDE 66

Chaining

Example init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, 0)

5·n

− − → while(x − n, y, 0 + y · n) [x > 0 ∧ 0 < n ≤ x] while(x, y, z)

1

− → return(z) [x = 0]

Automated Complexity Analysis of Rewrite Systems 9

slide-67
SLIDE 67

Chaining

Example init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, 0)

5·n

− − → while(x − n, y, y · n) [x > 0 ∧ 0 < n ≤ x] while(x, y, z)

1

− → return(z) [x = 0]

Automated Complexity Analysis of Rewrite Systems 9

slide-68
SLIDE 68

Chaining

Example init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, 0)

5·n

− − → while(x − n, y, y · n) [x > 0 ∧ 0 < n ≤ x] while(x, y, z)

1

− → return(z) [x = 0]

Automated Complexity Analysis of Rewrite Systems 9

slide-69
SLIDE 69

Chaining

Example init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, 0)

5·x

− − → while(x − x, y, y · x) [x > 0 ∧ 0 < x ≤ x] while(x, y, z)

1

− → return(z) [x = 0]

Automated Complexity Analysis of Rewrite Systems 9

slide-70
SLIDE 70

Chaining

Example init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, 0)

5·x

− − → while(0, y, y · x) [x > 0] while(x, y, z)

1

− → return(z) [x = 0]

Automated Complexity Analysis of Rewrite Systems 9

slide-71
SLIDE 71

Chaining

Example init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, 0)

5·x

− − → while(0, y, y · x) [x > 0] while(x, y, z)

1

− → return(z) [x = 0]

  • init(x, y)

5·x+2

− − − → return(y · x) [x > 0 ∧ y ≥ 0]

Automated Complexity Analysis of Rewrite Systems 9

slide-72
SLIDE 72

Chaining

Example init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, 0)

5·x

− − → while(0, y, y · x) [x > 0] while(x, y, z)

1

− → return(z) [x = 0]

  • init(x, y)

5·x+2

− − − → return(y · x) [x > 0 ∧ y ≥ 0]

Automated Complexity Analysis of Rewrite Systems 9

slide-73
SLIDE 73

Chaining

Example init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, 0)

5·x

− − → while(0, y, y · x) [x > 0] while(x, y, z)

1

− → return(z) [x = 0]

  • init(x, y)

5·x+2

− − − → return(y · x) [x > 0 ∧ y ≥ 0] whole program compressed into a single rule

Automated Complexity Analysis of Rewrite Systems 9

slide-74
SLIDE 74

Chaining

Example init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, 0)

5·x

− − → while(0, y, y · x) [x > 0] while(x, y, z)

1

− → return(z) [x = 0]

  • init(x, y)

5·x+2

− − − → return(y · x) [x > 0 ∧ y ≥ 0] whole program compressed into a single rule lower bound 5 · x + 2 for all x > 0, y ≥ 0

Automated Complexity Analysis of Rewrite Systems 9

slide-75
SLIDE 75

Chaining

Example init(x, y)

1

− → while(x, y, 0) [x ≥ 0 ∧ y ≥ 0] while(x, y, 0)

5·x

− − → while(0, y, y · x) [x > 0] while(x, y, z)

1

− → return(z) [x = 0]

  • init(x, y)

5·x+2

− − − → return(y · x) [x > 0 ∧ y ≥ 0] whole program compressed into a single rule lower bound 5 · x + 2 for all x > 0, y ≥ 0 Works for arbitrary programs!

Automated Complexity Analysis of Rewrite Systems 9

slide-76
SLIDE 76

Lower Bounds for ITSs – Wrap-Up

first technique to infer worst case lower bounds for ITSs

Automated Complexity Analysis of Rewrite Systems 10

slide-77
SLIDE 77

Lower Bounds for ITSs – Wrap-Up

first technique to infer worst case lower bounds for ITSs key idea: loop acceleration

Automated Complexity Analysis of Rewrite Systems 10

slide-78
SLIDE 78

Lower Bounds for ITSs – Wrap-Up

first technique to infer worst case lower bounds for ITSs key idea: loop acceleration many other features, e.g.:

Automated Complexity Analysis of Rewrite Systems 10

slide-79
SLIDE 79

Lower Bounds for ITSs – Wrap-Up

first technique to infer worst case lower bounds for ITSs key idea: loop acceleration many other features, e.g.:

non-determinism

Automated Complexity Analysis of Rewrite Systems 10

slide-80
SLIDE 80

Lower Bounds for ITSs – Wrap-Up

first technique to infer worst case lower bounds for ITSs key idea: loop acceleration many other features, e.g.:

non-determinism asymptotic bounds

Automated Complexity Analysis of Rewrite Systems 10

slide-81
SLIDE 81

Lower Bounds for ITSs – Wrap-Up

first technique to infer worst case lower bounds for ITSs key idea: loop acceleration many other features, e.g.:

non-determinism asymptotic bounds recursive void functions SMT encodings . . .

Automated Complexity Analysis of Rewrite Systems 10

slide-82
SLIDE 82

Lower Bounds for ITSs – Wrap-Up

first technique to infer worst case lower bounds for ITSs key idea: loop acceleration many other features, e.g.:

non-determinism asymptotic bounds recursive void functions SMT encodings . . .

LoAT Best Upper Bound rc(n) Ω(1) Ω(n) Ω(n2) Ω(n3) Ω(n4) EXP ∞ O(1) (132) – – – – – – O(n) 37 126 – – – – – O(n2) 8 14 35 – – – – O(n3) 2 – 2 1 – – – O(n4) 1 – – – 2 – – EXP – – – – – 5 – ∞ 53 31 1 – – – 176

Automated Complexity Analysis of Rewrite Systems 10

slide-83
SLIDE 83

Outline

1 Introduction 2 Lower Bounds for ITSs 3 Lower Bounds for TRSs 4 Constant Upper Bounds for TRSs Automated Complexity Analysis of Rewrite Systems 11

slide-84
SLIDE 84

Evaluating TRSs

Example (TRS) inf(y) − → cons(y,inf(s(y)))

Automated Complexity Analysis of Rewrite Systems 12

slide-85
SLIDE 85

Evaluating TRSs

Example (TRS) inf(y) − → cons(y,inf(s(y))) Example (Evaluation) inf(0)

Automated Complexity Analysis of Rewrite Systems 12

slide-86
SLIDE 86

Evaluating TRSs

Example (TRS) inf(y) − → cons(y,inf(s(y))) Example (Evaluation) inf(0) [y/0]

Automated Complexity Analysis of Rewrite Systems 12

slide-87
SLIDE 87

Evaluating TRSs

Example (TRS) inf(y) − → cons(y,inf(s(y))) Example (Evaluation) inf(0) [y/0] − → cons(0, inf(s(0)))

Automated Complexity Analysis of Rewrite Systems 12

slide-88
SLIDE 88

Evaluating TRSs

Example (TRS) inf(y) − → cons(y,inf(s(y))) Example (Evaluation) inf(0) [y/0] − → cons(0, inf(s(0))) [y/s(0)]

Automated Complexity Analysis of Rewrite Systems 12

slide-89
SLIDE 89

Evaluating TRSs

Example (TRS) inf(y) − → cons(y,inf(s(y))) Example (Evaluation) inf(0) [y/0] − → cons(0, inf(s(0))) [y/s(0)] − → cons(0, cons(s(0), inf(s(s(0)))))

Automated Complexity Analysis of Rewrite Systems 12

slide-90
SLIDE 90

Evaluating TRSs

Example (TRS) inf(y) − → cons(y,inf(s(y))) Example (Evaluation) inf(0) [y/0] − → cons(0, inf(s(0))) [y/s(0)] − → cons(0, cons(s(0), inf(s(s(0))))) [y/s(s(0))]

Automated Complexity Analysis of Rewrite Systems 12

slide-91
SLIDE 91

Evaluating TRSs

Example (TRS) inf(y) − → cons(y,inf(s(y))) Example (Evaluation) inf(0) [y/0] − → cons(0, inf(s(0))) [y/s(0)] − → cons(0, cons(s(0), inf(s(s(0))))) [y/s(s(0))] − → . . .

Automated Complexity Analysis of Rewrite Systems 12

slide-92
SLIDE 92

Evaluating TRSs

Example (TRS) inf(y) − → cons(y,inf(s(y))) Loop

Automated Complexity Analysis of Rewrite Systems 12

slide-93
SLIDE 93

Evaluating TRSs

Example (TRS) inf(y) − → cons(y,inf(s(y))) Loop = ⇒ Non-Termination

Automated Complexity Analysis of Rewrite Systems 12

slide-94
SLIDE 94

Evaluating TRSs

Example (TRS) inf(y) − → cons(y,inf(s(0))) Loop = ⇒ Non-Termination

Automated Complexity Analysis of Rewrite Systems 12

slide-95
SLIDE 95

Decreasing Loops

Example length(cons(x, x′)) − → s(length(x′))

Automated Complexity Analysis of Rewrite Systems 13

slide-96
SLIDE 96

Decreasing Loops

Example length(cons(x, x′)) − → s(length(x′)) Loop

Automated Complexity Analysis of Rewrite Systems 13

slide-97
SLIDE 97

Decreasing Loops

Example length(cons(x, x′)) − → s(length(x′)) Decreasing Loop Loop

Automated Complexity Analysis of Rewrite Systems 13

slide-98
SLIDE 98

Decreasing Loops

Example length(cons(x, x′)) − → s(length(x′)) Decreasing Loop = ⇒ Linear Lower Bound Loop

Automated Complexity Analysis of Rewrite Systems 13

slide-99
SLIDE 99

Decreasing Loops

Example length(cons(x, x′)) − → s(length(nil)) Decreasing Loop

  • =

⇒ Linear Lower Bound Loop

Automated Complexity Analysis of Rewrite Systems 13

slide-100
SLIDE 100

Decreasing Loops

Example length(cons(x, x′)) − → s(length(x′)) Decreasing Loop = ⇒ Linear Lower Bound Loop

Automated Complexity Analysis of Rewrite Systems 13

slide-101
SLIDE 101

Decreasing Loops

Example length(cons(x, x′)) − → s(length(x′))

  • length(cons(x, x′), y)

− → length(x′, s(y))

Automated Complexity Analysis of Rewrite Systems 14

slide-102
SLIDE 102

Decreasing Loops

Example length(cons(x, x′)) − → s(length(x′))

  • length(cons(x, x′), y)

− → length(x′, s(y)) Decreasing Loops Loops

Automated Complexity Analysis of Rewrite Systems 14

slide-103
SLIDE 103

Decreasing Loops

Example length(cons(x, x′)) − → s(length(x′))

  • length(cons(x, x′), y)

− → length(x′, s(y)) Decreasing Loops Revised

Automated Complexity Analysis of Rewrite Systems 14

slide-104
SLIDE 104

Decreasing Loops – Results

Theorem If a TRS has a decreasing loop, then its complexity is at least linear.

Automated Complexity Analysis of Rewrite Systems 15

slide-105
SLIDE 105

Decreasing Loops – Results

Theorem If a TRS has a decreasing loop, then its complexity is at least linear. Theorem If a TRS has several compatible decreasing loops, then its complexity is at least exponential.

Automated Complexity Analysis of Rewrite Systems 15

slide-106
SLIDE 106

Decreasing Loops – Results

Theorem If a TRS has a decreasing loop, then its complexity is at least linear. Theorem If a TRS has several compatible decreasing loops, then its complexity is at least exponential. Example (Compatible Decreasing Loops) fib(s(s(x))) − → plus(fib(s(x)), fib(x))

Automated Complexity Analysis of Rewrite Systems 15

slide-107
SLIDE 107

Decreasing Loops – Results

Theorem If a TRS has a decreasing loop, then its complexity is at least linear. Theorem If a TRS has several compatible decreasing loops, then its complexity is at least exponential. Theorem Linear lower bounds are not semi-decidable. Example (Compatible Decreasing Loops) fib(s(s(x))) − → plus(fib(s(x)), fib(x))

Automated Complexity Analysis of Rewrite Systems 15

slide-108
SLIDE 108

Decreasing Loops – Results

Theorem If a TRS has a decreasing loop, then its complexity is at least linear. Theorem If a TRS has several compatible decreasing loops, then its complexity is at least exponential. Theorem Linear lower bounds are not semi-decidable. Lemma Decreasing loops are incomplete. Example (Compatible Decreasing Loops) fib(s(s(x))) − → plus(fib(s(x)), fib(x))

Automated Complexity Analysis of Rewrite Systems 15

slide-109
SLIDE 109

Lower Bounds for TRSs – Wrap-Up

first technique to infer worst case lower bounds for TRSs

Automated Complexity Analysis of Rewrite Systems 16

slide-110
SLIDE 110

Lower Bounds for TRSs – Wrap-Up

first technique to infer worst case lower bounds for TRSs key idea: generalize loops

Automated Complexity Analysis of Rewrite Systems 16

slide-111
SLIDE 111

Lower Bounds for TRSs – Wrap-Up

first technique to infer worst case lower bounds for TRSs key idea: generalize loops linear, exponential, infinite bounds

Automated Complexity Analysis of Rewrite Systems 16

slide-112
SLIDE 112

Lower Bounds for TRSs – Wrap-Up

first technique to infer worst case lower bounds for TRSs key idea: generalize loops linear, exponential, infinite bounds

quadratic, cubic, . . .?

Automated Complexity Analysis of Rewrite Systems 16

slide-113
SLIDE 113

Lower Bounds for TRSs – Wrap-Up

first technique to infer worst case lower bounds for TRSs key idea: generalize loops linear, exponential, infinite bounds

quadratic, cubic, . . .? “induction technique”

Automated Complexity Analysis of Rewrite Systems 16

slide-114
SLIDE 114

Lower Bounds for TRSs – Wrap-Up

first second technique to infer worst case lower bounds for TRSs key idea: generalize loops linear, exponential, infinite bounds

quadratic, cubic, . . .? “induction technique”

Automated Complexity Analysis of Rewrite Systems 16

slide-115
SLIDE 115

Lower Bounds for TRSs – Wrap-Up

first second technique to infer worst case lower bounds for TRSs key idea: generalize loops linear, exponential, infinite bounds

quadratic, cubic, . . .? “induction technique”

incomplete

Automated Complexity Analysis of Rewrite Systems 16

slide-116
SLIDE 116

Lower Bounds for TRSs – Wrap-Up

first second technique to infer worst case lower bounds for TRSs key idea: generalize loops linear, exponential, infinite bounds

quadratic, cubic, . . .? “induction technique”

incomplete AProVE Ω(1) Ω(n) EXP ∞ 66 600 143 90

Automated Complexity Analysis of Rewrite Systems 16

slide-117
SLIDE 117

Outline

1 Introduction 2 Lower Bounds for ITSs 3 Lower Bounds for TRSs 4 Constant Upper Bounds for TRSs Automated Complexity Analysis of Rewrite Systems 17

slide-118
SLIDE 118

Narrowing

Example (from TPDB) f(a) − → g(h(a)) h(g(x)) − → g(h(f(x)))

Automated Complexity Analysis of Rewrite Systems 18

slide-119
SLIDE 119

Narrowing

Example (from TPDB) f(a) − → g(h(a)) h(g(x)) − → g(h(f(x))) Definition (Narrowing) Just like rewriting, but with unification instead of matching.

Automated Complexity Analysis of Rewrite Systems 18

slide-120
SLIDE 120

Narrowing

Example (from TPDB) f(a) − → g(h(a)) h(g(x)) − → g(h(f(x))) Definition (Narrowing) Just like rewriting, but with unification instead of matching. Example (Evaluation) h(y)

Automated Complexity Analysis of Rewrite Systems 18

slide-121
SLIDE 121

Narrowing

Example (from TPDB) f(a) − → g(h(a)) h(g(x)) − → g(h(f(x))) Definition (Narrowing) Just like rewriting, but with unification instead of matching. Example (Evaluation) h(y) [y/g(x)]

Automated Complexity Analysis of Rewrite Systems 18

slide-122
SLIDE 122

Narrowing

Example (from TPDB) f(a) − → g(h(a)) h(g(x)) − → g(h(f(x))) Definition (Narrowing) Just like rewriting, but with unification instead of matching. Example (Evaluation) h(y) [y/g(x)]

  • g(h(f(x)))

Automated Complexity Analysis of Rewrite Systems 18

slide-123
SLIDE 123

Narrowing

Example (from TPDB) f(a) − → g(h(a)) h(g(x)) − → g(h(f(x))) Definition (Narrowing) Just like rewriting, but with unification instead of matching. Example (Evaluation) h(y) [y/g(x)]

  • g(h(f(x)))

[x/a]

Automated Complexity Analysis of Rewrite Systems 18

slide-124
SLIDE 124

Narrowing

Example (from TPDB) f(a) − → g(h(a)) h(g(x)) − → g(h(f(x))) Definition (Narrowing) Just like rewriting, but with unification instead of matching. Example (Evaluation) h(y) [y/g(x)]

  • g(h(f(x)))

[x/a]

  • g(h(g(h(a))))

Automated Complexity Analysis of Rewrite Systems 18

slide-125
SLIDE 125

Narrowing

Example (from TPDB) f(a) − → g(h(a)) h(g(x)) − → g(h(f(x))) Definition (Narrowing) Just like rewriting, but with unification instead of matching. Example (Evaluation) h(y) [y/g(x)]

  • g(h(f(x)))

[x/a]

  • g(h(g(h(a))))

[x/h(a)]

Automated Complexity Analysis of Rewrite Systems 18

slide-126
SLIDE 126

Narrowing

Example (from TPDB) f(a) − → g(h(a)) h(g(x)) − → g(h(f(x))) Definition (Narrowing) Just like rewriting, but with unification instead of matching. Example (Evaluation) h(y) [y/g(x)]

  • g(h(f(x)))

[x/a]

  • g(h(g(h(a))))

[x/h(a)]

  • g(g(h(f(h(a)))))

Automated Complexity Analysis of Rewrite Systems 18

slide-127
SLIDE 127

Constant Upper Bounds

Theorem The complexity of a TRS is constant iff narrowing terminates for all terms f(x1, . . . , xn).

Automated Complexity Analysis of Rewrite Systems 19

slide-128
SLIDE 128

Constant Upper Bounds

Theorem The complexity of a TRS is constant iff narrowing terminates for all terms f(x1, . . . , xn). Lemma Constant complexity is semi-decidable.

Automated Complexity Analysis of Rewrite Systems 19

slide-129
SLIDE 129

Constant Upper Bounds – Wrap-Up

semi-decision procedure for constant bounds

Automated Complexity Analysis of Rewrite Systems 20

slide-130
SLIDE 130

Constant Upper Bounds – Wrap-Up

semi-decision procedure for constant bounds key idea: use narrowing

Automated Complexity Analysis of Rewrite Systems 20

slide-131
SLIDE 131

Constant Upper Bounds – Wrap-Up

semi-decision procedure for constant bounds key idea: use narrowing AProVE can (dis-)prove constant complexity in almost all cases

Automated Complexity Analysis of Rewrite Systems 20

slide-132
SLIDE 132

Constant Upper Bounds – Wrap-Up

semi-decision procedure for constant bounds key idea: use narrowing AProVE can (dis-)prove constant complexity in almost all cases Evaluation (TPDB – 899 examples) succeeds for all 57 TRSs with constant complexity

Automated Complexity Analysis of Rewrite Systems 20

slide-133
SLIDE 133

Constant Upper Bounds – Wrap-Up

semi-decision procedure for constant bounds key idea: use narrowing AProVE can (dis-)prove constant complexity in almost all cases Evaluation (TPDB – 899 examples) succeeds for all 57 TRSs with constant complexity solves 6 examples that couldn’t be solved before

Automated Complexity Analysis of Rewrite Systems 20

slide-134
SLIDE 134

What’s next?

integers and data structures

Automated Complexity Analysis of Rewrite Systems 21

slide-135
SLIDE 135

What’s next?

integers and data structures floats, arrays, . . .

Automated Complexity Analysis of Rewrite Systems 21

slide-136
SLIDE 136

What’s next?

integers and data structures floats, arrays, . . . underapproximating program transformations

Automated Complexity Analysis of Rewrite Systems 21

slide-137
SLIDE 137

What’s next?

Program (Java, C, . . .) AProVE SE-Graph AProVE Integer Transition System Term Rewrite System AProVE CoFloCo LoAT . . . Upper Bound Lower Bound

integers and data structures floats, arrays, . . . underapproximating program transformations

Automated Complexity Analysis of Rewrite Systems 21

slide-138
SLIDE 138

What’s next?

Program (Java, C, . . .) AProVE SE-Graph AProVE Integer Transition System Term Rewrite System AProVE CoFloCo LoAT . . . Upper Bound Lower Bound

integers and data structures floats, arrays, . . . underapproximating program transformations

Automated Complexity Analysis of Rewrite Systems 21

slide-139
SLIDE 139

What else?

’15 • Induction Technique for TRSs RTA ’16 • Lower Bounds for ITSs IJCAR ’17 • Decreasing Loops for TRSs JAR ’17 • Upper Bounds for TRSs (full rewriting) LPAR ’17 • Upper Bounds for TRSs (innermost rewriting) FroCoS ’17 • Upper Bounds for Java iFM ’18 • Constant Upper Bounds for TRSs IPL

Automated Complexity Analysis of Rewrite Systems 22

slide-140
SLIDE 140

What else?

’15 • Induction Technique for TRSs RTA ’16 • Lower Bounds for ITSs IJCAR ’17 • Decreasing Loops for TRSs JAR ’17 • Upper Bounds for TRSs (full rewriting) LPAR ’17 • Upper Bounds for TRSs (innermost rewriting) FroCoS ’17 • Upper Bounds for Java iFM ’18 • Constant Upper Bounds for TRSs IPL

Automated Complexity Analysis of Rewrite Systems 22

slide-141
SLIDE 141

What else?

’15 • Induction Technique for TRSs RTA ’16 • Lower Bounds for ITSs IJCAR ’17 • Decreasing Loops for TRSs JAR ’17 • Upper Bounds for TRSs (full rewriting) LPAR ’17 • Upper Bounds for TRSs (innermost rewriting) FroCoS ’17 • Upper Bounds for Java iFM ’18 • Constant Upper Bounds for TRSs IPL

Automated Complexity Analysis of Rewrite Systems 22

slide-142
SLIDE 142

What else?

’15 • Induction Technique for TRSs RTA ’16 • Lower Bounds for ITSs IJCAR ’17 • Decreasing Loops for TRSs JAR ’17 • Upper Bounds for TRSs (full rewriting) LPAR ’17 • Upper Bounds for TRSs (innermost rewriting) FroCoS ’17 • Upper Bounds for Java iFM ’18 • Constant Upper Bounds for TRSs IPL

Termination and Complexity Analysis for C AProVE Tool Papers IJCAR ’14, SEFM ’16, JAR ’17, JLAMP ’18 IJCAR ’14, JAR ’17

Automated Complexity Analysis of Rewrite Systems 22

slide-143
SLIDE 143

What else?

’15 • Induction Technique for TRSs RTA ’16 • Lower Bounds for ITSs IJCAR ’17 • Decreasing Loops for TRSs JAR ’17 • Upper Bounds for TRSs (full rewriting) LPAR ’17 • Upper Bounds for TRSs (innermost rewriting) FroCoS ’17 • Upper Bounds for Java iFM ’18 • Constant Upper Bounds for TRSs IPL

Termination and Complexity Analysis for C AProVE Tool Papers IJCAR ’14, SEFM ’16, JAR ’17, JLAMP ’18 IJCAR ’14, JAR ’17

Automated Complexity Analysis of Rewrite Systems 22

Thank you!

slide-144
SLIDE 144

AProVE at TermComp

points of AProVE points of best competitor

ITS 2016 2017 2018 w/ lower bounds 2.09 N/A 2.60 w/o lower bounds 0.66 N/A 0.92 TRS 2014 2015 2016 2017 2018 innermost 1.05 2.73 1.18 N/A 1.79 full – 2.94 1.23 N/A 1.70

Automated Complexity Analysis of Rewrite Systems 23

slide-145
SLIDE 145

Recurrence Solving

Example (Recurrence Solving) y(v+1) = 1 − y(v) x(v+1) = x(v) + 1 − 3y(v) y(v) =

1 2 − 1 2(−1)v + (−1)vy

x(v) =

3 4 − 3 4(−1)v − 3 2y − 1 2v + 3 2(−1)vy + x

Automated Complexity Analysis of Rewrite Systems 24