advanced tool architectures

26
Chess Review October 4, 2006 Alexandria, VA Edited and presented by Advanced Tool Architectures Edward A. Lee UC Berkeley

Upload: melvin-dodson

Post on 31-Dec-2015

27 views

Category:

Documents


1 download

DESCRIPTION

Advanced Tool Architectures. Edward A. Lee UC Berkeley. Thrust III:Advanced Tool Architectures. Syntax and Synthesis Semantic Composition Visual Concrete Syntaxes Modal Models Interface Theories Virtual Machine Architectures Components for Embedded Systems. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Advanced Tool Architectures

Chess ReviewOctober 4, 2006Alexandria, VA

Edited and presented by

Advanced Tool Architectures

Edward A. LeeUC Berkeley

Page 2: Advanced Tool Architectures

ITR Review, Oct. 4, 2006"Advanced Tool Architectures," Edward A. Lee 2

Thrust III:Advanced Tool Architectures

• Syntax and Synthesis– Semantic Composition– Visual Concrete Syntaxes– Modal Models

• Interface Theories• Virtual Machine Architectures• Components for Embedded Systems

Page 3: Advanced Tool Architectures

ITR Review, Oct. 4, 2006"Advanced Tool Architectures," Edward A. Lee 3

Major Concepts 1: Metamodeling of Abstract Syntax

OutputPort<<Atom>>

InputPort<<Atom>>

Port<<Atom>>

Relation<<Atom>>

IndirectLink<<Connection>>

CompositeEntity<<Model>>

ComponentEntity<<Model>>

Computation<<Set>>

inputs : fieldoutputs : fieldcomputation : field

DirectLink<<Connection>>

0..*

0..*

0..*

0..*

0..*

0..* 0..*0..*

0..*

0,1 0,1

0..*

Using GME (from Vanderbilt) an abstract syntax is specified as an object model (in UML) with constraints (in OCL), or alternatively, with MOF.

Such a spec can be used to synthesize visual editors and models transformers.

Meta-model of Ptolemy II abstract syntax, constructed in GME by H. Y. Zheng.

Page 4: Advanced Tool Architectures

ITR Review, Oct. 4, 2006"Advanced Tool Architectures," Edward A. Lee 4

Major Concepts 2:Actor Abstract Semantics

A port is either aninput or an output.

11 Ss 22 Ss

A process is a function from input signals to output signals. That function is defined in terms of two functions.

21: SSF

The function f gives outputs in terms of inputs and the current state. The function g updates the state.

21: SSf 1: Sg

state space

Signals are monoids (can be incrementally constructed) (e.g. streams, discrete-event signals).

Page 5: Advanced Tool Architectures

ITR Review, Oct. 4, 2006"Advanced Tool Architectures," Edward A. Lee 5

Major Concepts 3:Experimental Tools & Frameworks

Page 6: Advanced Tool Architectures

ITR Review, Oct. 4, 2006"Advanced Tool Architectures," Edward A. Lee 6

What We Have Learned

Hybrid and embedded software systems demand a different approach to

computation.

Page 7: Advanced Tool Architectures

ITR Review, Oct. 4, 2006"Advanced Tool Architectures," Edward A. Lee 7

Instead of a Program Specifying…

f : {0,1} {0,1}

Page 8: Advanced Tool Architectures

ITR Review, Oct. 4, 2006"Advanced Tool Architectures," Edward A. Lee 8

… A Program Should Specify

f : [T {0,1}]P [T {0,1}]P

…where T is a set representing time, precedence ordering, causality, synchronization, etc.

“signal” “signal”“actor”

Page 9: Advanced Tool Architectures

ITR Review, Oct. 4, 2006"Advanced Tool Architectures," Edward A. Lee 9

The Catch…

f : [T {0,1}]P [T {0,1}]P

• This is not what (mainstream) programming languages do.

• This is not what (mainstream) software component technologies do.

The second problem is easier to solve…

Page 10: Advanced Tool Architectures

ITR Review, Oct. 4, 2006"Advanced Tool Architectures," Edward A. Lee 10

Actor-Oriented Design

The alternative: “Actor oriented:”

actor name

data (state)

ports

Input data

parameters

Output data

What flows through an object is

evolving data

class name

data

methods

call return

What flows through an object is

sequential control

The established: Object-oriented:

Things happen to objects

Actors make things happen

Page 11: Advanced Tool Architectures

ITR Review, Oct. 4, 2006"Advanced Tool Architectures," Edward A. Lee 11

Examples of Actor-Oriented “Languages”

• CORBA event service (distributed push-pull)• ROOM and UML-2 (dataflow, Rational, IBM)• VHDL, Verilog (discrete events, Cadence, Synopsys, ...)• LabVIEW (structured dataflow, National Instruments)• Modelica (continuous-time, constraint-based, Linkoping)• OPNET (discrete events, Opnet Technologies)• SDL (process networks)• Occam (rendezvous)• Simulink (Continuous-time, The MathWorks)• SPW (synchronous dataflow, Cadence, CoWare)• …

Many of these are domain specific.

Many of these have visual syntaxes.

The semantics of these differ considerably, but all can be modeled as

f : [T {0,1}]P [T {0,1}]Pwith appropriate choices of the set T.

Page 12: Advanced Tool Architectures

ITR Review, Oct. 4, 2006"Advanced Tool Architectures," Edward A. Lee 12

Actor-Oriented Component Composition

• Cascade connections• Parallel connections• Feedback connections

If actors are functions on signals, then the nontrivial part of this is feedback.

Some of the PossibleModels of Computation:

• Time-Triggered• Discrete Events• Dataflow• Rendezvous• Synchronous/Reactive• Continuous Time• …

x [T {0,1}*]

Page 13: Advanced Tool Architectures

ITR Review, Oct. 4, 2006"Advanced Tool Architectures," Edward A. Lee 13

Major Ongoing Efforts

• Model Transformations and Code Generation• Abstract Semantics and heterogeneous

modeling• Interface algebras for

– real-time– causality– refinement

• Scalability• Models for distributed real-time computing• Relationships between models of computation

– Unification of SR/DE/CT semantics– Trading latency for composability in time-based

models

Page 14: Advanced Tool Architectures

ITR Review, Oct. 4, 2006"Advanced Tool Architectures," Edward A. Lee 14

Focus on Interface Algebras

Algebraic interface theories for:

• Real-time – [Matic, Henzinger]

• Causality– [Lee, Zheng, Zhou]

• Refinement– [Passerone, Al Sangiovanni-Vincentelli]

Page 15: Advanced Tool Architectures

ITR Review, Oct. 4, 2006"Advanced Tool Architectures," Edward A. Lee 15

Interface Algebra for Real-Time Graphs

Incremental design

Independent refinement

Composition operations: connect, join, combine

Assumption

input jitter offset

input jitter resource capacity

Guarantee

output jitteroutput latency

2

3

1

3

1

2

i1

i2

i3

o1

o2

o3

i1

i2

i3

i1

i2

i3

o1

o2

o3

o12

o3

i1

i2o3 i2 o3

o3

i2

combine(F1,F2,F3) join(o1,o2) connect(o12,i3) connect(o3,i1) =

j 1

c

j 3

j 2t31

t21

Page 16: Advanced Tool Architectures

ITR Review, Oct. 4, 2006"Advanced Tool Architectures," Edward A. Lee 16

Interface Algebra for Causality Analysis

An algebra of interfaces provides operators for cascade and parallel composition and necessary and sufficient conditions for causality loops, zero-delay loops, and deadlock.

Page 17: Advanced Tool Architectures

ITR Review, Oct. 4, 2006"Advanced Tool Architectures," Edward A. Lee 17

Example: Fixed Point is Not Constructive

In a synchronous language, the program at the right has a unique non-empty behavior, but that behavior cannot be found constructively by repeatedly application of monotonic functions.

Page 18: Advanced Tool Architectures

ITR Review, Oct. 4, 2006"Advanced Tool Architectures," Edward A. Lee 18

Example: Causality Loops

In a synchronous language, the programs at the right do not have unique non-empty behaviors. This defect is called a causality loop.

Page 19: Advanced Tool Architectures

ITR Review, Oct. 4, 2006"Advanced Tool Architectures," Edward A. Lee 19

Example: Deadlock

In a process networks and dataflow models, programs may exhibit deadlock, where behavior is empty or finite.

Deadlock in such programs is, in general, undecidable.

Page 20: Advanced Tool Architectures

ITR Review, Oct. 4, 2006"Advanced Tool Architectures," Edward A. Lee 20

Tools and Software Frameworks

• Software Tools– GReAT– HyVisual– Visualsense– Viptos

• Meta Tools– GME– Metropolis & Metropolis II– Ptolemy II– UDM

Meta tools are software frameworks that function as laboratories for model-based design

Page 21: Advanced Tool Architectures

ITR Review, Oct. 4, 2006"Advanced Tool Architectures," Edward A. Lee 21

Global “spaces” for Transformations

Global spaces hold intermediate results of the transformationConsequence: The transformations are simplified.

DS-PI ModelDS-PI Model

Source Models

DS-PS ModelDS-PS Model

Target Model

Global space<<Temps>>

Sorting the transformation results

A transformation rule typically operates on a sequence of matched objects that could be sorted after the rule is applied. Consequence: Model transformation results are ordered by the sorting function.

sort():…

Additional language features:• Distinguished cross-product: a new built-in operator

of the language that refines pattern matching semantics

• Match-any associations: “wild-card” pattern matching construct for matching arbitrary associations

• Support for automatic connection of multi-ported objects in the modeling tool

Model Transformation Tool features:

• User code libraries• Integration with new development

platform (Microsoft VS 7+)• Support for XML namespaces• Integration with Java • Support for structured text input and

output with declarative specification of the syntax

Model Transformation Tools

The Graph Rewrite And Transformation (GReAT) tool suite, Vanderbilt.

Page 22: Advanced Tool Architectures

ITR Review, Oct. 4, 2006"Advanced Tool Architectures," Edward A. Lee 22

Current Directions in Meta ToolsMetropolis II

• An object is the basic entity• An object interacts with the

outside world using ports• A port has an associated set of

services • A port can be of three types:

– Input: Services provided by object– Output: Services used by object– View: Services that can be observed

• An object may have zero or more input, output and view ports– Services can overlap

Obj1

S(P1)={S1,S2,S3}

S(P2)={S3,S4,S5}

P1 P2

P3

S(P3)={S1,S4,S6}

Page 23: Advanced Tool Architectures

ITR Review, Oct. 4, 2006"Advanced Tool Architectures," Edward A. Lee 23

Metropolis II Infrastructure

Object

1. Input port2. Output port3. View port4. Assumption5. Guarantee6. Object Type

Object Types

MetaModelPre-

compiledC/C++

VHDL/Verilog ...

Syntax Information

Semantics Information

Structure Information

Compiler

Elaborator

Simulator

Formal Verifier

Synthesizer

Page 24: Advanced Tool Architectures

ITR Review, Oct. 4, 2006"Advanced Tool Architectures," Edward A. Lee 24

Ptolemy II and HyVisual

Unification of synchronous/reactive, discrete-event, and continuous-time semantics led to major redesign of hybrid systems modeler HyVisual.

HyVisual is a specialization of the meta framework Ptolemy II.

Page 25: Advanced Tool Architectures

ITR Review, Oct. 4, 2006"Advanced Tool Architectures," Edward A. Lee 25

glue that binds heterogeneous activities in ensemble

CoordinationLanguages

Metropolis,Ptolemy II

Hierarchical Timing Language(HTL)

coordination of heterogeneous activitieswith time as the coordination medium

refinement based hierarchical coordination

LET Model of Task ExecutionSynchronous Reactive Languages Time Triggered Architecture

amenable to efficient analysis time-triggered paradigm for real-time constraints deterministic, portable, composable

Timed Languages

LET model for tasks

a framework to ensemble design activities with emphasis on formal models, separation of concerns

and abstraction-refinement

Next DirectionsHTL: Sources and Motivation

Coordination Languageslack formal semantics provide formal semantics for coordination

Metropolis/ Ptolemy IIgeneral framework provide a model for time triggered coordination

withefficient verification schemeTimed Languages

latency reduce latency

restricted to one level hierarchical refinement based structure

schedulability gets harder with expressiveness efficient analysis while compact representation

Page 26: Advanced Tool Architectures

ITR Review, Oct. 4, 2006"Advanced Tool Architectures," Edward A. Lee 26

HTL: Key Points and Relation to Ecosystem

Tagged Signal Model

Process Network Semantics

Firing Semantics

Stateful Firing Semantics

Kahn Process Network

Hybrid Systems

Continuous Time

Discrete Event

Synchronous/Reactive

TDL

Giotto

TM

xGiotto

HTL

A coordination language (HTL) for hard real-time applications; HTL programs are extensible in two dimensions without changing timing behavior

Time invariance under parallel composition (adding new program modules) is achieved by ensuring that different program modules communicate at specified instances of time

Time invariance under vertical extension (refinement of individual tasks) is achieved by conservative scheduling of the top level