C A RIB OO An Induction Based Proof Tool for Termination with - - PowerPoint PPT Presentation

c a rib oo
SMART_READER_LITE
LIVE PREVIEW

C A RIB OO An Induction Based Proof Tool for Termination with - - PowerPoint PPT Presentation

C A RIB OO An Induction Based Proof Tool for Termination with Strategies O. Fissore, I. Gnaedig, H. Kirchner PROTHEO Project Nancy-Saarbruecken Workshop on Logic, Proofs and Programs June 1718, 2004 1 Overview 1. Introduction: Motivations


slide-1
SLIDE 1

CARIBOO

An Induction Based Proof Tool for Termination with Strategies

  • O. Fissore, I. Gnaedig, H. Kirchner

PROTHEO Project

Nancy-Saarbruecken Workshop on Logic, Proofs and Programs June 17–18, 2004

1

slide-2
SLIDE 2

Overview

  • 1. Introduction: Motivations and goals
  • 2. Theory: An induction-based method for proving termination
  • 3. CARIBOO: An induction-based tool for proving termination
  • 4. Conclusion: Going further

2

slide-3
SLIDE 3

Proof and validation tools for rule-based languages

Goal: to provide programmers with adapted and accessible tools for confluence, sufficient completeness, termination, . . . For this: finer proof techniques and algorithms than those existing:

  • specific to the working domain (ground term algebras)
  • specific to the evaluation strategies: innermost, outermost, lazy evaluation, local

strategies, . . . And: to make them easily accessible to non specialists:

  • “expertise-encapsulated” tools avoiding the user to know the underlined theory
  • avoiding user interaction (as often as possible)

3

slide-4
SLIDE 4

Termination for rule based languages

The universal termination problem: a lot of techniques

  • Syntactic and semantic methods (applying directly to the TRS)

Path orderings, polynomial interpretations...

  • Transformational approaches (transforming one TRS into another)

Semantic labelling, dependency pairs... Rule based languages: one needs more specific tools

  • termination specific to the ground term algebra
  • termination with strategies when the standard rewriting relation diverges

4

slide-5
SLIDE 5

Overview

  • 1. Introduction: Motivations and goals
  • 2. Theory: An induction-based method for proving termination
  • 3. CARIBOO: An induction-based tool for proving termination
  • 4. Conclusion: Going further

5

slide-6
SLIDE 6

An original approach: explicit induction on the termination property

  • t
  • t terminates ⇐

⇒ there is no infinite rewrite chain starting from t

  • t ∈ T (F)
  • >: noetherian ordering on T (F)
  • (∀t′ < t, t′ terminates =

⇒ t terminates)

  • > is incrementally constructed along the inductive proof

6

slide-7
SLIDE 7

Simulating the derivation trees

f(0, 1, x) → f(x, x, x) g(x, y) → x g(x, y) → y f(t, u, v)

  • f(t↓, u↓, v↓)

t↓=0 u↓=1

  • f(v↓, v↓, v↓)

g(t, u)

  • g(t↓, u↓)
  • t↓

u↓

7

slide-8
SLIDE 8

Explicit induction on the termination property: a double mechanism (1/2)

abstraction (simulating normalization) applying the induction hypothesis on the direct subterms g(t1, . . . , tm)

  • g(X1, . . . , Xm)

if tref ≻ t1, . . . , tm

  • rdering constraints

(tref > ti) stored in C abstraction constraints (ti↓= Xi) stored in A

8

slide-9
SLIDE 9

Explicit induction on the termination property: a double mechanism (2/2)

narrowing (simulating reduction) top narrowing in all possible ways in one step ({g(X1, . . . , Xm)}, A, C)

  • ({t′

1}, σ1A, C)

. . . ({t′

l}, σlA, C)

if g(X1, . . . , Xm) ǫ

σi t′ i and σi compatible with A

9

slide-10
SLIDE 10

Simulation of the derivation trees by induction

t

  • detection of

a normal form

StopN

  • . . .

u = f(u1, . . . , un)

t≻u1,...,un

  • Abstract
  • v = g(v1, . . . , vm)

t≻v

  • f(u1↓, . . . , un↓)
  • Narrow
  • ×

branch cut by induction

Stop . . . . . .

  • 10
slide-11
SLIDE 11

Overview

  • 1. Introduction: Motivations and goals
  • 2. Theory: An induction-based method for proving termination
  • 3. CARIBOO: An induction-based tool for proving termination
  • 4. Conclusion: Going further

11

slide-12
SLIDE 12

CARIBOO: From theory to practice

  • CARIBOO implements our techniques for the:

– innermost strategy – outermost strategy – local strategies

  • CARIBOO is written in ELAN for ELAN
  • CARIBOO is a clickable tool, accessible to non specialists
  • CARIBOO is a proof assistant, accessible to specialists
  • CARIBOO connects to other proof tools

12

slide-13
SLIDE 13

CARIBOO: A user-friendly tool

specification file signature variables TRS

  • ELAN proof procedure

inference rules + strategies

  • queries

delegated

features user’s answers

  • proof tree (internal file)
  • Java GUI
  • proof tree

(display) proof options rewriting strategy interaction level

  • edition tool

for the specification file

  • 13
slide-14
SLIDE 14

CARIBOO: ELAN proof procedure

Strategies

Abstract Narrow StopA StopN Stop

Integrated features Inference rules

embedding ordering usable rules narrowing unsatisfiability of A

  • rdering constraints solving

termination property of a term satisfiability of A

Delegated features

ELAN strategy operators

14

slide-15
SLIDE 15

Related work

  • The innermost case: [Gnaedig, Kirchner & Fissore 2001]

Related work: the dependency pair method [Arts & Giesl 1996, 2000]: – no other strategies

  • Local strategies on operators: [Fissore, Gnaedig & Kirchner 2001]

Related work: context-sensitive rewriting [Lucas 1996, 2001, 2002, Zantema 1997, Giesl & Middeldorp 1999]

  • Lazy evaluation: Related work:

– also studied for functional languages [Panitz & Schmidt-Schauss 1997] – on-demand strategy annotations [Alpuente, Escobar, Gramlich & Lucas 2002] – lazy rewriting inspired by graph rewriting with labels [Lucas 2002]

15

slide-16
SLIDE 16

Overview

  • 1. Introduction: Motivations and goals
  • 2. Theory: An induction-based method for proving termination
  • 3. CARIBOO: An induction-based tool for proving termination
  • 4. Conclusion: Going further

16

slide-17
SLIDE 17

Termination of rewriting with strategies – future work –

  • Extensions of the inductive proof method:

– To other rewriting strategies (lazy, needed reductions, . . . ) – To equational theories (AC) – To conditional rewriting – To the caracterisation of terminating subsets – To a proof of non-termination

  • Evolutions of CARIBOO:

– Connection with other proof tools – Automatic criterion for (un)satisfiability of constraints – Deduction of good strategies

17