Interface Theories for Component-based Design Luca de Alfaro Thomas - - PowerPoint PPT Presentation

interface theories for component based design
SMART_READER_LITE
LIVE PREVIEW

Interface Theories for Component-based Design Luca de Alfaro Thomas - - PowerPoint PPT Presentation

Introduction Compositionality Interface Theories Stateful Interfaces Interface Theories for Component-based Design Luca de Alfaro Thomas A. Henzinger compositionality seminar presentation by Paul Rehrl Luca de Alfaro, Thomas A. Henzinger


slide-1
SLIDE 1

Introduction Compositionality Interface Theories Stateful Interfaces

Interface Theories for Component-based Design

Luca de Alfaro Thomas A. Henzinger compositionality seminar presentation by Paul Rehrl

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-2
SLIDE 2

Introduction Compositionality Interface Theories Stateful Interfaces Overview

Introduction

interface models → compositional abstraction component models → compositional refinement block diagrams to model system structure interface theories

stateless interfaces stateful interfaces

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-3
SLIDE 3

Introduction Compositionality Interface Theories Stateful Interfaces Overview

Interfaces vs. Components

interface models

interfaces constrain the environment interface description answers: How can it be used?

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-4
SLIDE 4

Introduction Compositionality Interface Theories Stateful Interfaces Overview

Interfaces vs. Components

interface models

interfaces constrain the environment interface description answers: How can it be used?

component models

components do not constrain the environment component description answers: What does it do?

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-5
SLIDE 5

Introduction Compositionality Interface Theories Stateful Interfaces Block Diagrams

Block Diagrams

Block diagrams are a general way of depicting system structure.

port x has type Tx ports set PF of ports block F

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-6
SLIDE 6

Introduction Compositionality Interface Theories Stateful Interfaces Block Diagrams

Composition

Composition is a partial binary function on blocks.

PFG = PF ∪ PG block F block G block F G Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-7
SLIDE 7

Introduction Compositionality Interface Theories Stateful Interfaces Block Diagrams

Connections

A connection is a partial function mapping a block F and an interconnect θ to a block Fθ.

port x to port y x y block Fθ interconnnect θ channel (x, y) connects Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-8
SLIDE 8

Introduction Compositionality Interface Theories Stateful Interfaces Block Diagrams

Hierarchy

hierachy relation on blocks is reflexive and transitive F ′ F

– block F ′ refines block F – block F abstracts block F ′

F ′ = (F1 F2 F3)θ F

F ′ F

F1 F2 F3

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-9
SLIDE 9

Introduction Compositionality Interface Theories Stateful Interfaces

Interface Algebra

A block diagram is a interface algebra if the blocks F, G, and F ′ are interfaces and F ′ refines F then F ′ G refines F G F ′θ refines Fθ

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-10
SLIDE 10

Introduction Compositionality Interface Theories Stateful Interfaces

Component Algebra

A block algebra is a component algebra if the blocks f , g, and f ′ are components and f abstracts f ′ then f g abstracts f ′ g f θ abstracts f ′θ

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-11
SLIDE 11

Introduction Compositionality Interface Theories Stateful Interfaces

Implementation

Give a interface algebra A and a component algebra B, an implementation of A by B is a relation ⊳ between components of B and interfaces of A.

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-12
SLIDE 12

Introduction Compositionality Interface Theories Stateful Interfaces

Implementation

Give a interface algebra A and a component algebra B, an implementation of A by B is a relation ⊳ between components of B and interfaces of A. The implementation ⊳ is compositional if interfaces F and G are composeable and the components f , g implement F, G then f g is defined and f g implements F G if f implements F then f θ implements Fθ for all interconnects θ

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-13
SLIDE 13

Introduction Compositionality Interface Theories Stateful Interfaces

Interface Theory

If interface algebra A implements component algebra B and ⊳ is a compositional implementation of A by B then (A, ⊳) is a interface theory for B.

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-14
SLIDE 14

Introduction Compositionality Interface Theories Stateful Interfaces

Compositional Design

Interface theories support compositional design: F is split into (F1, ..., Fn)θ interfaces Fi can be implemented independently (f1, ..., fn)θ implements F

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-15
SLIDE 15

Introduction Compositionality Interface Theories Stateful Interfaces

Component Verification

Component algebras support component verification: f is some property of the component (f1, ..., fn)θ satisfies f every fi can be verified independently

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-16
SLIDE 16

Introduction Compositionality Interface Theories Stateful Interfaces Some Interface Algebras

Some Interface Algebras

input/output interfaces

input and output ports ports are typed

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-17
SLIDE 17

Introduction Compositionality Interface Theories Stateful Interfaces Some Interface Algebras

Some Interface Algebras

input/output interfaces

input and output ports ports are typed

assume/guarantee interfaces

I/O interface constrains input value and output value ranges

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-18
SLIDE 18

Introduction Compositionality Interface Theories Stateful Interfaces Some Interface Algebras

Some Interface Algebras

input/output interfaces

input and output ports ports are typed

assume/guarantee interfaces

I/O interface constrains input value and output value ranges

port-dependency interfaces

I/O interface constrains which output ports may influence which input ports provides dependency information between input ports and

  • utput ports

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-19
SLIDE 19

Introduction Compositionality Interface Theories Stateful Interfaces Some Interface Algebras

Input/Output Interface Algebras

composition: defined if output ports do not overlap connection: only connections from output ports to input ports no two channels have the same target hierarchy: if F ′ implements F then F ′ may use all input ports of F must provide values for all output ports of F

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-20
SLIDE 20

Introduction Compositionality Interface Theories Stateful Interfaces Some Interface Algebras

Assume/Guarantee Interface Algebras

composition: corresponding I/O interface composable input assumptions and output guarantees of F and G are merged connection: I/O interface is connectable input assumption of Fθ is satisfiable

  • utput guarantees of F are not violated

hierarchy: if F ′ F then F ′ must accept all inputs that satisfy the input assumption of F and may only produce

  • utputs that satisfy the output guarantee of F

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-21
SLIDE 21

Introduction Compositionality Interface Theories Stateful Interfaces Some Interface Algebras

Port-dependency Interface Algebras

composition: I/O interface is composable connection: I/O interface is connectable port dependencies introduced by the interconnect must not lead to a dependency cycle hierarchy: a refined interface F ′ must not have more dependencies than permitted by F

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-22
SLIDE 22

Introduction Compositionality Interface Theories Stateful Interfaces Some Component Algebras

Component Algebras

For every interface algebra we give an example of a component algebra such that there is a compositional implementation. All component algebras presented in the paper are relational nets, i.e. set of blocks called processes which are connected by channels.

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-23
SLIDE 23

Introduction Compositionality Interface Theories Stateful Interfaces Some Component Algebras

Relational Nets

A relational net is well-formed if each process specifies a relation between input and output ports there exists port values that satisfy the I/O relations of all processes and identities enforced by channels

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-24
SLIDE 24

Introduction Compositionality Interface Theories Stateful Interfaces Some Component Algebras

Component Algebras

no interface theory for relational nets, but interface theories for restricted classes:

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-25
SLIDE 25

Introduction Compositionality Interface Theories Stateful Interfaces Some Component Algebras

Component Algebras

no interface theory for relational nets, but interface theories for restricted classes: rectangular nets

processes restrict the accepted input values no I/O dependencies

→ assume/guarantee interfaces

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-26
SLIDE 26

Introduction Compositionality Interface Theories Stateful Interfaces Some Component Algebras

Component Algebras

no interface theory for relational nets, but interface theories for restricted classes: rectangular nets

processes restrict the accepted input values no I/O dependencies

→ assume/guarantee interfaces total nets

processes do not restrict the accepted input values I/O dependencies

→ port-dependency interfaces

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-27
SLIDE 27

Introduction Compositionality Interface Theories Stateful Interfaces Some Component Algebras

Component Algebras

no interface theory for relational nets, but interface theories for restricted classes: rectangular nets

processes restrict the accepted input values no I/O dependencies

→ assume/guarantee interfaces total nets

processes do not restrict the accepted input values I/O dependencies

→ port-dependency interfaces total-and-rectangular nets

no restrictions on input values no I/O dependencies

→ input/output interfaces

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-28
SLIDE 28

Introduction Compositionality Interface Theories Stateful Interfaces

Stateful Interfaces

A stateful interface proceeds in steps through a state space. deterministic assume/guarantee interfaces

input assumption and output guarantee depend on state state transition function

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-29
SLIDE 29

Introduction Compositionality Interface Theories Stateful Interfaces

Stateful Interfaces

A stateful interface proceeds in steps through a state space. deterministic assume/guarantee interfaces

input assumption and output guarantee depend on state state transition function

deterministic game interfaces

a set of states and a set of ports input moves and output moves for every state

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-30
SLIDE 30

Introduction Compositionality Interface Theories Stateful Interfaces

Stateful Interfaces

Example: file

file data read close

  • pen

close?

  • pen?

data! read?

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-31
SLIDE 31

Introduction Compositionality Interface Theories Stateful Interfaces

Stateful Interfaces

Example: file

  • pen!

read! data? close! file data read close

  • pen

client close?

  • pen?

data! read?

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-32
SLIDE 32

Introduction Compositionality Interface Theories Stateful Interfaces

Stateful Interfaces

stateful interfaces are viewed as a game between the environment and the component the environment looses if the game enters a state in which the environment can not provide acceptable input (error state)

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design

slide-33
SLIDE 33

Introduction Compositionality Interface Theories Stateful Interfaces

end of presentation

Luca de Alfaro, Thomas A. Henzinger Interface Theories for Component-based Design