(Intentional) Constraint Automata

Constraint Automata
David Costa
CWI
IPA Lentedagen 2007



Motivation
Timed Data Streams
Constraint Automata

Automata Operators




Behaviour equivalence and containment
Related work
Conclusions
Ongoing work
◦ Data Constraints
◦ Models of Reo connectors
◦ Product
◦ Hiding
Outline
April 4
IPA Lentedagen 2007
2

Observable data flow of coordinating connectors
◦ data flow at input/output ports (source/sink nodes) of
a connector

Composition operators
◦ facilitate the modelling of large systems

We abstain from what:
◦ data flow direction
◦ topology of the connector
Motivation
What do we want to model?
April 4
IPA Lentedagen 2007
3

Non-empty set of data: Data
◦ domain of data that can flow through the connector

The set of a data streams over the set Data, are
all the infinite sequences over Data denoted by:

The set of timed streams over the set IR+, are all
the infinite sequences over IR+ denoted by:
Timed Data Stream (TDS)
April 4
IPA Lentedagen 2007
4

The set of timed data streams, TDS, over the
set Data, is given by:

A set of Names to use for the input or output
ports of the connector

Assigning a TDS to a connector port Ai defines
the data flow behaviour of a port Ai
Timed Data Stream (TDS)
April 4
IPA Lentedagen 2007
5

Channels
◦ assigning a binary relations R µ TDS£TDS defines
the data flow behaviour of a channel.

Example
◦ the data flow behaviour of a synchronous channel is
formally described by the relation:
Reference:
F.Arbab and J.J.M.M.Rutten. A coinductive calculus of
component connectors. WADT 2002.
Connectors as TDS-tupples
April 4
IPA Lentedagen 2007
6

Automata
◦ as acceptors of relations on timed data streams, such
automaton observes the data occurring at certain
input/output ports and either fires a transition according
to the observed data or rejects it if there is no
corresponding transition in the automaton.

State
◦ possible configurations (buffer contents)

Transition
◦ one-step possible data flow satisfying some data constraints
and its effect on the present configuration
Constraint Automata
The idea/Informaly
April 4
IPA Lentedagen 2007
7
Symbolic representation of sets of data
assignments (subsets of Data)
 Built from the atoms: dA = d with the grammar:


Common derived data constraints:

DC(N, Data)
◦ N non-empty subset of Names
◦ denotes the set of data constraints dA = d, A 2 N
Data Constraints
April 4
IPA Lentedagen 2007
8
Constraint Automata
Formal definition
April 4
IPA Lentedagen 2007
9

buffer FIFO1 with ports A and B
buffer FIFO1
1-Bounded FIFO Channel
April 4
IPA Lentedagen 2007
10

Channels
sync
syncdrain/syncspout
asyncdrain/asyncspout
Constraint Automata
Models of Reo connectors (I)
April 4
IPA Lentedagen 2007
11

Merger
merger
Constraint Automata
Models of Reo connectors (II)
April 4
IPA Lentedagen 2007
12

lossy (synchronous) channel
lossy/lossysync
Constraint Automata
Models of Reo connectors (III)
April 4
IPA Lentedagen 2007
13

Given a TDS-tuple we inspect whether it
corresponds to an accepting run of the automaton.

Accepting runs (accepting behaviour)
◦ is given by all infinite runs of the automaton starting
from an initial state

Rejecting runs (rejecting behaviour)
◦ is given by all finite (possibly empty) run of the
automaton
Intuitive behaviour of a CA
April 4
IPA Lentedagen 2007
14
Now we know how to model small connectors.
 The question next is: what can we do with these
models?

◦ Combine them to build models of larger systems
 Composition and abstraction operators
◦ Check for equivalence between two models
◦ Check for behaviour containment of one model into
another model.
◦ Adapt know model checking methods from reactive
systems and !-automata for our constraint automata
Operators and Analysis methods
April 4
IPA Lentedagen 2007
15
Automata Operators
Product
April 4
IPA Lentedagen 2007
16

We consider 2 FIFO1 over Data = f1g with
ports fA, Cg and fC, Bg respectively
Product of two FIFO1
April 4
IPA Lentedagen 2007
17

Hiding a port C in constraint automata
corresponds to make unobservable the data flow
at that port.

Removes all the information about port C.
Hiding operation
April 4
IPA Lentedagen 2007
18
Automata Operators
Hiding
April 4
IPA Lentedagen 2007
19

9C [FIFO1 ./ FIFO1]
Hiding C on product of two FIFO1
April 4
IPA Lentedagen 2007
20

An alternative characterization of language
equivalence and inclusion can be given using
branching time relations
◦ they allow a simpler way to verify if two automata are
language equivalent, or if the language is contained in
the language of the other.
Bisimulation and Simulation
April 4
IPA Lentedagen 2007
21
Behaviour Equivalence
Bisimulation vs. Language Equiv.
April 4
IPA Lentedagen 2007
22
Behaviour Containment
Simulation vs. Language Inclusion
April 4
IPA Lentedagen 2007
23

Congruence result for bisimulation equivalence
and the simulation preorder for the operators
product and hiding
What do you mean: Compositionality?
April 4
IPA Lentedagen 2007
24

Briefly mention:
◦ other similar automata formalism:
 IO automata
◦ labels with action names (data independent)
◦ input enabledness
◦ strict notion of time
 timed port automata
◦ input enabledness
◦ strict notion of time
 interface automata
◦ based on game theory
◦ allow automatic checking of compatibility between interfaces
Related Work
April 4
IPA Lentedagen 2007
25
CA allows to build formal models of the data
flow behaviour of coordinating connectors
 provides composition and abstraction operators
to build larger models out of existing models
 provides analysis and verification methods
adapted from known methods for reactive
systems or formal languages

Conclusions
April 4
IPA Lentedagen 2007
26

Extend the formalism to allow models for
context sensitive connectors
◦ two approaches
 capturing intentional behaviour
 embedding some notion of priority in the behaviour
domain

Implementation of model checking algorithms
Ongoing work
April 4
IPA Lentedagen 2007
27