Derivatives of WS1S Formulas Dmitriy Traytel Isabelle = - - PowerPoint PPT Presentation

derivatives of ws1s formulas
SMART_READER_LITE
LIVE PREVIEW

Derivatives of WS1S Formulas Dmitriy Traytel Isabelle = - - PowerPoint PPT Presentation

Derivatives of WS1S Formulas Dmitriy Traytel Isabelle = Logic-Automaton Connection WS1S = T | F | x X | x < y | | | x . | X . finite Logic-Automaton Connection WS1S I . I


slide-1
SLIDE 1

Derivatives of WS1S Formulas

Dmitriy Traytel

λ → ∀

=

Isabelle

β α

slide-2
SLIDE 2

Logic-Automaton Connection

WS1S

ϕ = T | F | x ∈ X | x < y | ϕ∨ϕ | ¬ϕ | ∃x. ϕ | ∃X. ϕ

finite

slide-3
SLIDE 3

Logic-Automaton Connection

WS1S

ϕ = T | F | x ∈ X | x < y | ϕ∨ϕ | ¬ϕ | ∃x. ϕ | ∃X. ϕ

finite ∀I. I ϕ ⇐ ⇒ I ψ?

slide-4
SLIDE 4

Logic-Automaton Connection

WS1S

ϕ = T | F | x ∈ X | x < y | ϕ∨ϕ | ¬ϕ | ∃x. ϕ | ∃X. ϕ

finite ∀I. I ϕ ⇐ ⇒ I ψ? Finite Automata

MONA

slide-5
SLIDE 5

Logic-Automaton Connection

WS1S ∀I. I ϕ ⇐ ⇒ I ψ? Regular Expressions L(α) = L(β)? Finite Automata

MONA

slide-6
SLIDE 6

Logic-Automaton Connection

WS1S ∀I. I ϕ ⇐ ⇒ I ψ?

Π-Extended Regular Expressions

L(α) = L(β)? ∀I. I ϕ ⇐ ⇒ enc I ∈ L(mkRE ϕ) Finite Automata

MONA

  • T. & Nipkow, ICFP 2013
slide-7
SLIDE 7

a∗ ?

≡ ε+ a· a∗ for Σ = {a,b}

a∗

ε+ a· a∗

slide-8
SLIDE 8

a∗ ?

≡ ε+ a· a∗ for Σ = {a,b}

a∗

ε+ a· a∗

Brzozowski derivative d: letter → regex → regex

L(da r) = {w | aw ∈ L(r)} ε· a∗ ∅+ε· a∗

da

slide-9
SLIDE 9

a∗ ?

≡ ε+ a· a∗ for Σ = {a,b}

a∗

ε+ a· a∗ ε· a∗ ∅+ε· a∗ ∅· a∗ ∅+∅· a∗

da db

slide-10
SLIDE 10

a∗ ?

≡ ε+ a· a∗ for Σ = {a,b}

a∗

ε+ a· a∗ ε· a∗ ∅+ε· a∗ ∅· a∗ +ε· a∗ ∅+∅· a∗ +ε· a∗ ∅· a∗ ∅+∅· a∗

da da db

slide-11
SLIDE 11

a∗ ?

≡ ε+ a· a∗ for Σ = {a,b}

a∗

ε+ a· a∗ ε· a∗ ∅+ε· a∗ ∅· a∗ +ε· a∗ ∅+∅· a∗ +ε· a∗ ∅· a∗ +∅· a∗ +ε· a∗ ∅+∅· a∗ +∅· a∗ +ε· a∗ ∅· a∗ ∅+∅· a∗

da da da db

slide-12
SLIDE 12

a∗ ?

≡ ε+ a· a∗ for Σ = {a,b}

a∗

ε+ a· a∗ ε· a∗ ∅+ε· a∗ ∅· a∗ +ε· a∗ ∅+∅· a∗ +ε· a∗ ∅· a∗ +∅· a∗ +ε· a∗ ∅+∅· a∗ +∅· a∗ +ε· a∗ ∅· a∗ ∅+∅· a∗

da da da ACI db

slide-13
SLIDE 13

a∗ ?

≡ ε+ a· a∗ for Σ = {a,b}

a∗

ε+ a· a∗ ε· a∗ ∅+ε· a∗ ∅· a∗ +ε· a∗ ∅+∅· a∗ +ε· a∗ ∅· a∗ +∅· a∗ +ε· a∗ ∅+∅· a∗ +∅· a∗ +ε· a∗ ∅· a∗ ∅+∅· a∗ ∅· a∗ +∅· a∗ ∅+∅· a∗ +∅· a∗ ∅· a∗ +∅· a∗ +∅· a∗ ∅+∅· a∗ +∅· a∗ +∅· a∗

da da da ACI db db db ACI ACI da db

slide-14
SLIDE 14

Key ingredients: Derivative + Acceptance Test

slide-15
SLIDE 15

Key ingredients: Derivative + Acceptance Test Let’s define them on WS1S formulas directly!

slide-16
SLIDE 16

(∃X.x ∈ X)

?

≡ (¬x < x) for Σ = {(T),(F)}

∃X.x ∈ X ¬x < x ∃X.(T∨ F) ¬F ∃X.(T∨ F)∨(T∨ F) ¬F ∃X.(x ∈ X ∨ x ∈ X) ¬ x < x

d(T) d(T), d(F) ACI d(F) ACI

slide-17
SLIDE 17

Derivative

d v T

=

T d v F

=

F d v (x ∈ X)

=     

x ∈ X if ¬v[x] T if v[x]∧ v[X] F

  • therwise

d v (x < y)

= ···

d v (ϕ∨ψ)

=

d v ϕ∨ d v ψ d v (¬ϕ)

= ¬ d v ϕ

d v (∃X. ϕ)

= ∃X. (d (vX→T) ϕ∨ d (vX→F) ϕ)

slide-18
SLIDE 18

Acceptance Test

ε T =

T

ε F =

F

ε (x ∈ X) =

F

ε (x < y) =

F

ε (ϕ∨ψ) = ε ϕ∨ε ψ ε (¬ϕ) = ¬ε ϕ ε (∃X. ϕ) =

action happens here

slide-19
SLIDE 19

Acceptance Test

ε T =

T

ε F =

F

ε (x ∈ X) =

F

ε (x < y) =

F

ε (ϕ∨ψ) = ε ϕ∨ε ψ ε (¬ϕ) = ¬ε ϕ ε (∃X. ϕ) =

action happens here futurization

derivatives from the right

slide-20
SLIDE 20

Altogether

A decision procedure for WS1S that

slide-21
SLIDE 21

Altogether

A decision procedure for WS1S that

  • perates on formulas directly and
slide-22
SLIDE 22

Altogether

A decision procedure for WS1S that

  • perates on formulas directly and

is verified in

λ → ∀

=

Isabelle

β α

HOL

and

slide-23
SLIDE 23

Altogether

A decision procedure for WS1S that

  • perates on formulas directly and

is verified in

λ → ∀

=

Isabelle

β α

HOL

and

  • utperforms MONA on very well selected examples.
slide-24
SLIDE 24

Altogether

A decision procedure for WS1S that

  • perates on formulas directly and

is verified in

λ → ∀

=

Isabelle

β α

HOL

and

  • utperforms MONA on very well selected examples.
  • Thanks. Questions?
slide-25
SLIDE 25

Derivatives of WS1S Formulas

Dmitriy Traytel

λ → ∀

=

Isabelle

β α