a decision procedure for bisimilarity of generalized ... · a decision procedure for bisimilarity...

66
A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue 1,2 G. Caltais 5 E. Goriac 5 D. Lucanu 4 J. Rutten 1,3 A. Silva 1 1 Centrum Wiskunde & Informatica, The Netherlands 2 LIACS - Leiden University, The Netherlands 3 Radboud Universiteit Nijmegen, The Netherlands 4 Faculty of Computer Science - Alexandru Ioan Cuza University, Romania 5 School of Computer Science - Reykjavik University, Iceland SBMF’10, November 2010 Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 1 / 23

Upload: others

Post on 20-Jul-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

A decision procedure for bisimilarity of generalizedregular expressions

M. Bonsangue1,2 G. Caltais5 E. Goriac5 D. Lucanu4

J. Rutten1,3 A. Silva1

1Centrum Wiskunde & Informatica, The Netherlands2LIACS - Leiden University, The Netherlands

3Radboud Universiteit Nijmegen, The Netherlands4Faculty of Computer Science - Alexandru Ioan Cuza University, Romania

5School of Computer Science - Reykjavik University, Iceland

SBMF’10, November 2010

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 1 / 23

Page 2: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Motivation

Deterministic automata (DA)Widely used model inComputer Science.Acceptors of languages

Regular expressionsUser-friendly alternative to DAnotation.Many applications: patternmatching (grep), specificationof circuits, . . .

Kleene’s TheoremLet A ⊆ Σ∗. The following are equivalent.

1 A = L(A), for some finite automaton A.2 A = L(r), for some regular expression r .

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 2 / 23

Page 3: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Motivation

Deterministic automata (DA)Widely used model inComputer Science.Acceptors of languages

Regular expressionsUser-friendly alternative to DAnotation.Many applications: patternmatching (grep), specificationof circuits, . . .

Kleene’s TheoremLet A ⊆ Σ∗. The following are equivalent.

1 A = L(A), for some finite automaton A.2 A = L(r), for some regular expression r .

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 2 / 23

Page 4: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Motivation

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 3 / 23

Page 5: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Motivation

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 3 / 23

Page 6: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Motivation

Can we fill the ? in the diagram?

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 3 / 23

Page 7: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

In previous work . . .

We presented:a generalized notion of regular expressions;an analogue of Kleene’s theorem;and sound and complete axiomatizations with respect tobisimilarity

for a large class of systems (labelled transition systems, Mealymachines, probabilistic automata).

All the above was derived modularly from the type of each system.

Question: Can we automate the reasoning on equivalence ofexpressions, also in a modular way?

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 4 / 23

Page 8: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

In previous work . . .

We presented:a generalized notion of regular expressions;an analogue of Kleene’s theorem;and sound and complete axiomatizations with respect tobisimilarity

for a large class of systems (labelled transition systems, Mealymachines, probabilistic automata).

All the above was derived modularly from the type of each system.

Question: Can we automate the reasoning on equivalence ofexpressions, also in a modular way?

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 4 / 23

Page 9: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

In previous work . . .

We presented:a generalized notion of regular expressions;an analogue of Kleene’s theorem;and sound and complete axiomatizations with respect tobisimilarity

for a large class of systems (labelled transition systems, Mealymachines, probabilistic automata).

All the above was derived modularly from the type of each system.

Question: Can we automate the reasoning on equivalence ofexpressions, also in a modular way?

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 4 / 23

Page 10: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

The ultimate goal. . .

TOOLType of the system

1) Specification language & axioms

2) Algorithms to convert expressions to systems and back

3) Integrated environment to automatically decide whether two expressions are

equivalent

In this talk, we will be focusing on 1) and 3).

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 5 / 23

Page 11: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

The ultimate goal. . .

TOOLType of the system

1) Specification language & axioms

2) Algorithms to convert expressions to systems and back

3) Integrated environment to automatically decide whether two expressions are

equivalent

In this talk, we will be focusing on 1) and 3).

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 5 / 23

Page 12: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Outline

Generalized regular expressionsEquivalence of expressionsSnapshot of the tool

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 6 / 23

Page 13: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

What do these things have in common?

(S, δ : S → 2× SA)

(S, δ : S → (B × S)A)

(S, δ : S → 1 + (PS)A)

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 7 / 23

Page 14: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

What do these things have in common?

(S, δ : S → 2× SA)

(S, δ : S → (B × S)A)

(S, δ : S → 1 + (PS)A)

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 7 / 23

Page 15: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

What do these things have in common?

(S, δ : S → 2× SA)

(S, δ : S → (B × S)A)

(S, δ : S → 1 + (PS)A)

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 7 / 23

Page 16: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

What do these things have in common?

(S, δ : S → 2× SA)

(S, δ : S → (B × S)A)

(S, δ : S → 1 + (PS)A)

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 7 / 23

Page 17: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

What do these things have in common?

(S, δ : S → 2×SA)

(S, δ : S → (B×S)A)

(S, δ : S → 1 + (PS)A)

(S, δ : S → GS)

G-coalgebras

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 8 / 23

Page 18: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

What do these things have in common?

(S, δ : S → 2×SA)

(S, δ : S → (B×S)A)

(S, δ : S → 1 + (PS)A)

(S, δ : S → GS)

G-coalgebras

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 8 / 23

Page 19: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

What do these things have in common?

(S, δ : S → 2×SA)

(S, δ : S → (B×S)A)

(S, δ : S → 1 + (PS)A)

(S, δ : S → GS) G-coalgebras

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 8 / 23

Page 20: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Coalgebras

Generalizations of deterministic automataSet of states S and a transition function t : S → GS where G

encodes the type of the system:

G:: = Id | B | G× G | G + G | GA | PG

P finite

Examples

G = 2× IdA Deterministic automataG = (B × Id)A Mealy machinesG = 1 + (PId)A LTS (with explicit termination). . .

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 9 / 23

Page 21: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Coalgebras

Generalizations of deterministic automataSet of states S and a transition function t : S → GS where G

encodes the type of the system:

G:: = Id | B | G× G | G + G | GA | PG

P finite

Examples

G = 2× IdA Deterministic automataG = (B × Id)A Mealy machinesG = 1 + (PId)A LTS (with explicit termination). . .

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 9 / 23

Page 22: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

The power of G

The functor G determines:

1 notion of observational equivalence (coalg. bisimulation)2 behaviour (final coalgebra)3 set of expressions describing finite systems4 axioms to prove bisimulation equivalence of expressions

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 10 / 23

Page 23: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

The power of G

The functor G determines:

1 notion of observational equivalence (coalg. bisimulation)2 behaviour (final coalgebra)3 set of expressions describing finite systems4 axioms to prove bisimulation equivalence of expressions

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 10 / 23

Page 24: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

The power of G

The functor G determines:

1 notion of observational equivalence (coalg. bisimulation)2 behaviour (final coalgebra)3 set of expressions describing finite systems4 axioms to prove bisimulation equivalence of expressions

1 + 2 are standard universal coalgebra; 3 + 4 are [BRS10]

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 10 / 23

Page 25: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

In a nutshell — beyond deterministic automata

Deterministic automata G-coalgebrasQ → 2×QΣ Q → GQ

m m

Regular Expressions G-expressions

m m

Formal Languages Final coalgebra

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 11 / 23

Page 26: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

G-expressions

E :: = ∅ | ε | E · E | E + E | E∗

EG :: = ?

How do we define EG?

Untyped expressions

G-typed expressions

Type system parametrized with G

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 12 / 23

Page 27: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

G-expressions

E :: = ∅ | ε | E · E | E + E | E∗

EG :: = ?

How do we define EG?

Untyped expressions

G-typed expressions

Type system parametrized with G

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 12 / 23

Page 28: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Examples

Deterministic automata expressions – G = 2× IdA

ε :: = ∅ | ε⊕ ε | µx .γ︸ ︷︷ ︸G

|

1︸︷︷︸2

|

0︸︷︷︸2

|

a(ε)︸︷︷︸IdA

︸ ︷︷ ︸×

LTS expressions – G = 1 + (PId)A

ε :: = ∅ | ε⊕ ε | µx .γ

|√︸︷︷︸1

| ∂︸︷︷︸(PId)A

| a.ε︸︷︷︸(PId)A

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 13 / 23

Page 29: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Examples

Deterministic automata expressions – G = 2× IdA

ε :: = ∅ | ε⊕ ε | µx .γ︸ ︷︷ ︸G

|

1︸︷︷︸2

|

0︸︷︷︸2

|

a(ε)︸︷︷︸IdA

︸ ︷︷ ︸×

LTS expressions – G = 1 + (PId)A

ε :: = ∅ | ε⊕ ε | µx .γ

|√︸︷︷︸1

| ∂︸︷︷︸(PId)A

| a.ε︸︷︷︸(PId)A

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 13 / 23

Page 30: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Examples

Deterministic automata expressions – G = 2× IdA

ε :: = ∅ | ε⊕ ε | µx .γ︸ ︷︷ ︸G

| 1︸︷︷︸2

| 0︸︷︷︸2

| a(ε)︸︷︷︸IdA︸ ︷︷ ︸

×

LTS expressions – G = 1 + (PId)A

ε :: = ∅ | ε⊕ ε | µx .γ

|√︸︷︷︸1

| ∂︸︷︷︸(PId)A

| a.ε︸︷︷︸(PId)A

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 13 / 23

Page 31: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Examples

Deterministic automata expressions – G = 2× IdA

ε :: = ∅ | ε⊕ ε | µx .γ︸ ︷︷ ︸G

| 1︸︷︷︸2

| 0︸︷︷︸2

| a(ε)︸︷︷︸IdA︸ ︷︷ ︸

×

LTS expressions – G = 1 + (PId)A

ε :: = ∅ | ε⊕ ε | µx .γ

|√︸︷︷︸1

| ∂︸︷︷︸(PId)A

| a.ε︸︷︷︸(PId)A

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 13 / 23

Page 32: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Examples

Deterministic automata expressions – G = 2× IdA

ε :: = ∅ | ε⊕ ε | µx .γ︸ ︷︷ ︸G

| 1︸︷︷︸2

| 0︸︷︷︸2

| a(ε)︸︷︷︸IdA︸ ︷︷ ︸

×

LTS expressions – G = 1 + (PId)A

ε :: = ∅ | ε⊕ ε | µx .γ |√︸︷︷︸1

| ∂︸︷︷︸(PId)A

| a.ε︸︷︷︸(PId)A

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 13 / 23

Page 33: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Operational semantics

The set of G-expressions has a coalgebraic structure given by

δG : ExpG → G(ExpG)

δG . . .. . . provides an operational semantics for the set of expressions. . . defines the dynamics of the system. . . is used for observing the behaviour of the system

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 14 / 23

Page 34: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Operational semantics

The set of G-expressions has a coalgebraic structure given by

δG : ExpG → G(ExpG)

δG . . .. . . provides an operational semantics for the set of expressions. . . defines the dynamics of the system. . . is used for observing the behaviour of the system

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 14 / 23

Page 35: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Operational semantics

The set of G-expressions has a coalgebraic structure given by

δG : ExpG → G(ExpG)

δG . . .. . . provides an operational semantics for the set of expressions. . . defines the dynamics of the system. . . is used for observing the behaviour of the system

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 14 / 23

Page 36: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Operational semantics

The set of G-expressions has a coalgebraic structure given by

δG : ExpG → G(ExpG)

δG . . .. . . provides an operational semantics for the set of expressions. . . defines the dynamics of the system. . . is used for observing the behaviour of the system

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 14 / 23

Page 37: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

The goal: proving equivalence

Automatically proving equivalence (bisimilarity) of expressions;Tool: Circ

Meta-language implemented in Maude

Input: Algebraic specification + coalgebraic structure (dynamics)

Engine: circular coinduction – constructing bisimulation

Output: Yes / No / ?

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 15 / 23

Page 38: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

The goal: proving equivalence

Automatically proving equivalence (bisimilarity) of expressions;Tool: Circ

Meta-language implemented in Maude

Input: Algebraic specification + coalgebraic structure (dynamics)

Engine: circular coinduction – constructing bisimulation

Output: Yes / No / ?

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 15 / 23

Page 39: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

The goal: proving equivalence

Automatically proving equivalence (bisimilarity) of expressions;Tool: Circ

Meta-language implemented in Maude

Input: Algebraic specification + coalgebraic structure (dynamics)

Engine: circular coinduction – constructing bisimulation

Output: Yes / No / ?

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 15 / 23

Page 40: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Our challenge

ExpG

'/WWWWWWWWWWWWWWWWWWWW

WWWWWWWWWWWWWWWWWWWW

coalgebraic structure(δG) +3 algebraic specification // CIRC

ε1∼Gε2

��

G− bisimilarity +3 deduction relation

44jjjjjjjjjjjjjjjj

YES/NO

How to guarantee that the prover always says YES/NO?

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 16 / 23

Page 41: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Our challenge

ExpG

'/WWWWWWWWWWWWWWWWWWWW

WWWWWWWWWWWWWWWWWWWW

coalgebraic structure(δG) +3 algebraic specification // CIRC

ε1∼Gε2

��

G− bisimilarity +3 deduction relation

44jjjjjjjjjjjjjjjj

YES/NO

How to guarantee that the prover always says YES/NO?

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 16 / 23

Page 42: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Unraveling can be infinite

ε = µx .a(b(x))⊕ 1

εδa // 〈1,b(ε)〉 δb // 〈1, ε〉

µx .a(b(x))⊕ 1 b(ε)

a

b

b

a

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 17 / 23

Page 43: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Unraveling can be infinite

ε = µx .a(b(x))⊕ 1

εδa //

δb

""FFFFFFFFFF 〈1,b(ε)〉 δb //

δa��

〈1, ε〉

〈0, ∅〉

µx .a(b(x))⊕ 1 b(ε)

a

b

b

a

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 17 / 23

Page 44: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Unraveling can be infinite

ε = µx .a(b(x))⊕ 1

εδa //

δb

""FFFFFFFFFF 〈1,b(ε)〉 δb //

δa��

〈1, ε〉

〈0, ∅〉

µx .a(b(x))⊕ 1 b(ε)

a

b

b

a

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 17 / 23

Page 45: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Unraveling can be infinite

But . . .ε = µx .a(x ⊕ x)

εδ7−→ 〈0, ε⊕ε〉 δ7−→ 〈0, (ε⊕ε)⊕(ε⊕ε)〉 δ7−→ 〈0, (ε⊕ε)⊕(ε⊕ε)⊕(ε⊕ε)〉 . . .

We need ACI!

µx .a(x ⊕ x) a

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 18 / 23

Page 46: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Unraveling can be infinite

But . . .ε = µx .a(x ⊕ x)

εδ7−→ 〈0, ε⊕ε〉

δ7−→ 〈0, (ε⊕ε)⊕(ε⊕ε)〉 δ7−→ 〈0, (ε⊕ε)⊕(ε⊕ε)⊕(ε⊕ε)〉 . . .

We need ACI!

µx .a(x ⊕ x) a

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 18 / 23

Page 47: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Unraveling can be infinite

But . . .ε = µx .a(x ⊕ x)

εδ7−→ 〈0, ε⊕ε〉 δ7−→ 〈0, (ε⊕ε)⊕(ε⊕ε)〉 δ7−→ 〈0, (ε⊕ε)⊕(ε⊕ε)⊕(ε⊕ε)〉 . . .

We need ACI!

µx .a(x ⊕ x) a

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 18 / 23

Page 48: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Unraveling can be infinite

But . . .ε = µx .a(x ⊕ x)

εδ7−→ 〈0, ε⊕ε〉 δ7−→ 〈0, (ε⊕ε)⊕(ε⊕ε)〉 δ7−→ 〈0, (ε⊕ε)⊕(ε⊕ε)⊕(ε⊕ε)〉 . . .

We need ACI!

µx .a(x ⊕ x) a

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 18 / 23

Page 49: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Unraveling can be infinite

But . . .ε = µx .a(x ⊕ x)

εδ7−→ 〈0, ε⊕ε〉 δ7−→ 〈0, (ε⊕ε)⊕(ε⊕ε)〉 δ7−→ 〈0, (ε⊕ε)⊕(ε⊕ε)⊕(ε⊕ε)〉 . . .

We need ACI!

µx .a(x ⊕ x) a

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 18 / 23

Page 50: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

A decision procedure for bisimilarity

ExpG

'/WWWWWWWWWWWWWWWWWWWW

WWWWWWWWWWWWWWWWWWWW

coalgebraic structure(δG) +3 algebraic specification // CIRC

ε1∼Gε2

��

G− bisimilarity +3 deduction relation

44jjjjjjjjjjjjjjjj

ACI

/7ggggggggggggggggggggg

ggggggggggggggggggggg YES/NO

Adding equations is possible because Circ is an extension ofMaude

With ACI, the bisimulation game is decidable!Algebra meets coalgebra

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 19 / 23

Page 51: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

A decision procedure for bisimilarity

ExpG

'/WWWWWWWWWWWWWWWWWWWW

WWWWWWWWWWWWWWWWWWWW

coalgebraic structure(δG) +3 algebraic specification // CIRC

ε1∼Gε2

��

G− bisimilarity +3 deduction relation

44jjjjjjjjjjjjjjjj

ACI

/7ggggggggggggggggggggg

ggggggggggggggggggggg YES/NO

Adding equations is possible because Circ is an extension ofMaude

With ACI, the bisimulation game is decidable!Algebra meets coalgebra

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 19 / 23

Page 52: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Example

εX = µx .a.x ⊕ b.∅ ⊕ a.(µy .a.y ⊕ b.∅ ⊕ b.b.√

)⊕ b.b.√

εZ = µz.a.z ⊕ b.∅ ⊕ b.b.√

76540123Xa&& b //

a��

b

��========76540123∅ /.-,()*+Z a

xx

b��

b

��<<<<<<<<

76540123∅ 76540123Y awwboo

b

����������/.-,()*+

b��

/.-,()*+b

��

76540123∅

/.-,()*+ b //?>=<89:;√ ?>=<89:;√ ?>=<89:;√

Question Are εX and εZ equivalent?

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 20 / 23

Page 53: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Example

εX = µx .a.x ⊕ b.∅ ⊕ a.(µy .a.y ⊕ b.∅ ⊕ b.b.√

)⊕ b.b.√

εZ = µz.a.z ⊕ b.∅ ⊕ b.b.√

76540123Xa&& b //

a��

b

��========76540123∅ /.-,()*+Z a

xx

b��

b

��<<<<<<<<

76540123∅ 76540123Y awwboo

b

����������/.-,()*+

b��

/.-,()*+b

��

76540123∅

/.-,()*+ b //?>=<89:;√ ?>=<89:;√ ?>=<89:;√

Question Are εX and εZ equivalent?

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 20 / 23

Page 54: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Tool Snapshot

Maude> in protofunctorizer.maude

(alph A is a b endalph)

(alph B is tick endalph)

(functor B + P(Id)A .)

(E1 = mu X. ... )

(E2 = mu Z. ... )

(set goal E1 = E2 .)

(generate coalgebra .)

296 lines of CIRC specification!

Maude> in circ.maude XandZ.maude

(coinduction .)

Proof succeeded.

G = B + P(Id)A,A = {a,b},B = {√}

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 21 / 23

Page 55: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Tool Snapshot

Maude> in protofunctorizer.maude

(alph A is a b endalph)

(alph B is tick endalph)

(functor B + P(Id)A .)

(E1 = mu X. ... )

(E2 = mu Z. ... )

(set goal E1 = E2 .)

(generate coalgebra .)

296 lines of CIRC specification!

Maude> in circ.maude XandZ.maude

(coinduction .)

Proof succeeded.

G = B + P(Id)A,A = {a,b},B = {√}

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 21 / 23

Page 56: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Tool Snapshot

Maude> in protofunctorizer.maude

(alph A is a b endalph)

(alph B is tick endalph)

(functor B + P(Id)A .)

(E1 = mu X. ... )

(E2 = mu Z. ... )

(set goal E1 = E2 .)

(generate coalgebra .)

296 lines of CIRC specification!

Maude> in circ.maude XandZ.maude

(coinduction .)

Proof succeeded.

G = B + P(Id)A,A = {a,b},B = {√}

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 21 / 23

Page 57: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Tool Snapshot

Maude> in protofunctorizer.maude

(alph A is a b endalph)

(alph B is tick endalph)

(functor B + P(Id)A .)

(E1 = mu X. ... )

(E2 = mu Z. ... )

(set goal E1 = E2 .)

(generate coalgebra .)

296 lines of CIRC specification!

Maude> in circ.maude XandZ.maude

(coinduction .)

Proof succeeded.

G = B + P(Id)A,A = {a,b},B = {√}

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 21 / 23

Page 58: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Tool Snapshot

Maude> in protofunctorizer.maude

(alph A is a b endalph)

(alph B is tick endalph)

(functor B + P(Id)A .)

(E1 = mu X. ... )

(E2 = mu Z. ... )

(set goal E1 = E2 .)

(generate coalgebra .)

296 lines of CIRC specification!

Maude> in circ.maude XandZ.maude

(coinduction .)

Proof succeeded.

G = B + P(Id)A,A = {a,b},B = {√}

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 21 / 23

Page 59: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Tool Snapshot

Maude> in protofunctorizer.maude

(alph A is a b endalph)

(alph B is tick endalph)

(functor B + P(Id)A .)

(E1 = mu X. ... )

(E2 = mu Z. ... )

(set goal E1 = E2 .)

(generate coalgebra .)

296 lines of CIRC specification!

Maude> in circ.maude XandZ.maude

(coinduction .)

Proof succeeded.

G = B + P(Id)A,A = {a,b},B = {√}

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 21 / 23

Page 60: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Tool Snapshot

Maude> in protofunctorizer.maude

(alph A is a b endalph)

(alph B is tick endalph)

(functor B + P(Id)A .)

(E1 = mu X. ... )

(E2 = mu Z. ... )

(set goal E1 = E2 .)

(generate coalgebra .)

296 lines of CIRC specification!

Maude> in circ.maude XandZ.maude

(coinduction .)

Proof succeeded.

G = B + P(Id)A,A = {a,b},B = {√}

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 21 / 23

Page 61: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Tool Snapshot

Maude> in protofunctorizer.maude

(alph A is a b endalph)

(alph B is tick endalph)

(functor B + P(Id)A .)

(E1 = mu X. ... )

(E2 = mu Z. ... )

(set goal E1 = E2 .)

(generate coalgebra .)

296 lines of CIRC specification!

Maude> in circ.maude XandZ.maude

(coinduction .)

Proof succeeded.

G = B + P(Id)A,A = {a,b},B = {√}

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 21 / 23

Page 62: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Tool Snapshot

Maude> in protofunctorizer.maude

(alph A is a b endalph)

(alph B is tick endalph)

(functor B + P(Id)A .)

(E1 = mu X. ... )

(E2 = mu Z. ... )

(set goal E1 = E2 .)

(generate coalgebra .)

296 lines of CIRC specification!

Maude> in circ.maude XandZ.maude

(coinduction .)

Proof succeeded.

G = B + P(Id)A,A = {a,b},B = {√}

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 21 / 23

Page 63: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Tool Snapshot

Maude> in protofunctorizer.maude

(alph A is a b endalph)

(alph B is tick endalph)

(functor B + P(Id)A .)

(E1 = mu X. ... )

(E2 = mu Z. ... )

(set goal E1 = E2 .)

(generate coalgebra .)

296 lines of CIRC specification!

Maude> in circ.maude XandZ.maude

(coinduction .)

Proof succeeded.

G = B + P(Id)A,A = {a,b},B = {√}

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 21 / 23

Page 64: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Conclusions and Future work

ConclusionsGeneric framework to uniformly derive language and axioms for alarge class of systemsGeneralization of Kleene theorem and Kleene algebra, parametricon the functor.Automation in Circ: decision procedure for equivalence ofexpressions.

Future workMaking the tool more user friendly;Extending the class of systems to include quantitative systems(probabilistic automata, etc)Apply it to a serious case study (circuit design, compileroptimization, . . . )

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 22 / 23

Page 65: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Conclusions and Future work

ConclusionsGeneric framework to uniformly derive language and axioms for alarge class of systemsGeneralization of Kleene theorem and Kleene algebra, parametricon the functor.Automation in Circ: decision procedure for equivalence ofexpressions.

Future workMaking the tool more user friendly;Extending the class of systems to include quantitative systems(probabilistic automata, etc)Apply it to a serious case study (circuit design, compileroptimization, . . . )

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 22 / 23

Page 66: A decision procedure for bisimilarity of generalized ... · A decision procedure for bisimilarity of generalized regular expressions M. Bonsangue1;2 G. Caltais5 E. Goriac5 D. Lucanu4

Thank you!

for more details see:“Non-deterministic Kleene coalgebras"

A.Silva, M. Bonsangue, J. Rutten“Circular coinduction - A proof theoretical foundation"

G. Rosu, D. Lucanu

QUESTIONS?

Alexandra Silva (CWI) Decision procedure for bisimilarity SBMF’10 23 / 23