36
Model-based Design and Implementation of Distributed Real-time Embedded Systems in Cadena http://www.cis.ksu.edu/cadena Gurdip Singh John Hatcliff Matt Dwyer Support US Army Research Office (ARO) US National Science Foundation (NSF) US National Aeronautics and Space Agency (NASA) US Department of Defense Advanced Research Projects Agency (DARPA) Rockwell-Collins ATC Honeywell Technology Center and NASA Langley Sun Microsystems Intel Venkatesh Ranganath Xianghua Deng Prashant Shanti Kumar Qiang Deng

Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Model-based Design and Implementation of Distributed Real-time Embedded Systems in Cadena

http://www.cis.ksu.edu/cadena

Gurdip SinghJohn HatcliffMatt Dwyer

SupportUS Army Research Office (ARO)US National Science Foundation (NSF)US National Aeronautics and Space Agency (NASA)US Department of Defense

Advanced Research Projects Agency (DARPA)

Rockwell-Collins ATCHoneywell Technology Center and NASA Langley Sun MicrosystemsIntel

Venkatesh RanganathXianghua DengPrashant Shanti KumarQiang Deng

Page 2: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Distributed Components

Network

Java C++ C

C++JavaC

Page 3: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Distributed Components

Middleware (e.g. CORBA)

Event Service Transaction Service

Naming Service Synchronization Service

Java C++

C++

C

JavaC

Page 4: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Real-time Embedded Systems

Middleware (e.g. CORBA)Event Service Transaction Service

Naming Service Synchronization Service

Java C++

C++

C

JavaC

Issues

! These systems are huge!! Extensive use of OO

patterns & software layering! What are appropriate

abstractions for formal reasoning?

! How can we help developers write them?

! How to auto-generate aspects?

! How can we configure middleware?

Page 5: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Example DRE SystemsExample DRE Systems

! Mission-control software for Boeing military aircraft

! Boeing’s Bold Stroke Avionics Middleware! …built on top of ACE/TAO RT CORBA

! Provided with an Open Experimental Platform (OEP) from Boeing! a sanitized version of the real system! 100,000+ lines of C++ code (including RT CORBA middleware)! 50+ page document that outline development process and describe

challenge problems! Must provide…

! tool-based solutions that can be applied by Boeing research team to realistic systems

! solutions that fit within current development process, code base, etc.! metrics for that allow Boeing research team to evaluate tool

performance and ease of use

Page 6: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Cadena –CCM Development

Integrated Development Environment

CCM Interface Definition Language

RT Aspect Specs

State Transitions

System Configuration

Eclipse Plug-In

High-level Specification Language

Cadena

High-level specification of abstract component behavior

Visualization and design-level reasoning

Code generation functions (via OpenCCM) produces code amenable to conformance checking and certification

<CONFIGURATION_PASS><HOME> <…>

<COMPONENT><ID> <…></ID><EVENT_SUPPLIER><…events this component supplies…></EVENT_SUPPLIER></COMPONENT></HOME>

</CONFIGURATION_PASS>

<CONFIGURATION_PASS><HOME> <…>

<COMPONENT><ID> <…></ID><EVENT_SUPPLIER><…events this component supplies…></EVENT_SUPPLIER></COMPONENT></HOME>

</CONFIGURATION_PASS>

Configuration and Deployment information

Page 7: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Overall Themes

ScenarioAnalysis

Scenario Deployment

MiddlewareLibrary

Component Development

Scenario Specification

…Component developer’s activities (interface & behavior specs) are centered at the CCM IDL level.

DRE Systems in a CCM Framework

DRE Systems in a CCM Framework

Themes…COTS/Industry standard

component models/frameworks

Page 8: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Overall Themes

ScenarioAnalysis

Scenario Deployment

MiddlewareLibrary

Component Development

Scenario Specification

…Specify and reason about component connections and dependencies independently of middleware services

DRE Systems in a CCM Framework

DRE Systems in a CCM Framework

Themes

Page 9: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Overall Themes

ScenarioAnalysis

Scenario Deployment

MiddlewareLibrary

Component Development

Scenario Specification

…Choose particular middleware services and synthesize QoSattributes.

DRE Systems in a CCM Framework

DRE Systems in a CCM Framework

Themes

…Check invariants, dependencies, and temporal properties.

Page 10: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Overall Themes

ScenarioAnalysis

Scenario Deployment

MiddlewareLibrary

Component Development

Scenario Specification

…Autogenerate configuration and component container code for chosen middleware services.

DRE Systems in a CCM Framework

DRE Systems in a CCM Framework

Themes

…Deploy based on deployment parameters.

Page 11: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Outline

2. Component Connections2. Component Connections

3. Dependence Information3. Dependence Information

1. Component Interface1. Component Interface

Page 12: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Component IDL

CORBA 3CCM IDLModalSP Components

Page 13: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Component IDL

CORBA 3CCM IDLModalSP Components

Page 14: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Component IDL

output data port (facet)

output data port (facet)

CORBA 3CCM IDLModalSP Components

Page 15: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Component IDL

input data port (receptacle)

input data port (receptacle)

CORBA 3CCM IDLModalSP Components

Page 16: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Leverage CORBA IDL

ComponentImplementation

Stubs & Skeletons

IDL Compiler

+dependencydefaultdependencydefaultdependencydefaultdependencydefault

== none;== none;== none;== none;

dependencies {dependencies {dependencies {dependencies {inDataAvailableinDataAvailableinDataAvailableinDataAvailable---->>>>outDataAvailableoutDataAvailableoutDataAvailableoutDataAvailable;;;;

}}}}

behavior { behavior { behavior { behavior { if (mode==enabled) {if (mode==enabled) {if (mode==enabled) {if (mode==enabled) {push push push push outDataAvailableoutDataAvailableoutDataAvailableoutDataAvailable;;;;elseelseelseelse…………}}}}

DependencyAnnotations

Transition SystemSemantics

Dependency Analysisand

Model-checking Engine

Model Builder

Page 17: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Outline

2. Component Connections2. Component Connections

Page 18: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Three Synchronized Views

ScenarioDescriptionScenarioDescription

SingleInternal

Representation

SpreadsheetView

SpreadsheetView

Graphical View

Graphical View

Textual View

Textual View

Page 19: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Textual View

Page 20: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Graphical View

Page 21: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Spreadsheet View

…ports for component type

…ports for component type

…port types…port types …port connections…port connections

…distribution sites

…distribution sites

…rate group

…rate group

RT AttributesRT Attributes

Page 22: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Aspect Synthesis

- Analysis algorithms- Synthesis of QoS and real-time aspects

Page 23: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Aspect Synthesis

Dependency-driven rate assignment to event consumers

5Hz5Hz

5Hz5Hz

5Hz5Hz

20Hz20Hz

1Hz1Hz20Hz20Hz

20Hz20Hz

20Hz20Hz

20Hz20Hz

20Hz20Hz

Page 24: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Aspect Synthesis

Automatic detection of optimization opportunities

5Hz5Hz 5Hz5Hz

20Hz20Hz

1Hz1Hz20Hz20Hz

20Hz20Hz

20Hz20Hz

20Hz20Hz

20Hz20Hz

Asynchronous message delivery to synchronous method calls (must be co-located and run at same rate)

Page 25: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Spreadsheet View

Results of automatic rate group synthesis are fed back into spreadsheet

Results of automatic rate group synthesis are fed back into spreadsheet

Page 26: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Mode-based ProjectionsScenario Diagram w/ Complete Connectivity

Enabled Connectivity for Different Modes

…NavSteeringenabledTacticalSteeringdisabled

NavSteeringenabledTacticalSteeringdisabled

NavSteeringdisabledTacticalSteeringenabled

NavSteeringdisabledTacticalSteeringenabled

Page 27: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Mode-based Projections

…possible values for mode variables

…possible values for mode variables

Multiple mode-based views are automatically created and synchronized through the design process.

Multiple mode-based views are automatically created and synchronized through the design process.

Page 28: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Model-Checking Infrastructure

! Infrastructure dedicated to event-based middleware! Complete model derived from CCM IDL, component-

assembly description and annotations! Model-checking for global system properties

Page 29: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

System ComponentsSystem Components

Complete Model

Transition SystemSpecs

Transition SystemSpecs

RT CORBA Event Channel

Configuration InfoConfiguration Info

Page 30: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Leverage CORBA IDL

ComponentImplementation

Stubs & Skeletons

IDL Compiler

+dependencydefaultdependencydefaultdependencydefaultdependencydefault

== none;== none;== none;== none;

dependencies {dependencies {dependencies {dependencies {inDataAvailableinDataAvailableinDataAvailableinDataAvailable---->>>>outDataAvailableoutDataAvailableoutDataAvailableoutDataAvailable;;;;

}}}}

behavior { behavior { behavior { behavior { if (mode==enabled) {if (mode==enabled) {if (mode==enabled) {if (mode==enabled) {push push push push outDataAvailableoutDataAvailableoutDataAvailableoutDataAvailable;;;;elseelseelseelse…………}}}}

DependencyAnnotations

Transition SystemSemantics

Dependency Analysisand

Model-checking Engine

Model Builder

Page 31: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Incremental Specification

port action dependencies

IncreasingEffort

& Strength of Verification

Specifications Component Structure

state-based dependencies

…only in mode Y

Y

component transition semantics

…state machines give abstract behavior

refinement

refinement

Page 32: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Code generation and Configuration

! OpenCCM CCM IDL to Java compiler to component stub and skeleton code generation

! XML files to container and middleware configuration

Page 33: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Container Adaptation

component code BMDevice

MonolithicImpl

BMDeviceCCM(context)

BMDeviceMonolithicWrapper

CCMObjectImplHomeCCM

auto-generatedcontainercode

Scenario Deployment

Middleware services

OpenCCM Code Generation

MiddlewareServices library

Extending COTS OpenCCMsystem to include different middleware services

Page 34: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Experiments: Mode-aware Event Service

Event Service

Modal Scenario(modified MediumSP)

BMDeviceMonolithicImpl

BMDeviceCCM(context)

BMDeviceMonolithicWrapper

CCMObjectImplHomeCCMMode-aware Event service

Synch_ModuleConfigured Event

Service

Scenario Analysis

Mode information

Page 35: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Conclusions

! Cadena: model-driven design and implementation of DRE systems

! Light-weight specifications! Component assembly description forms! Dependency analysis tools! Model-check infrastructure! Code generation and configuration

Page 36: Model-based Design and Implementation of Distributed Real ... · Automatic detection of optimization opportunities 5Hz5Hz 5Hz5Hz 20Hz20Hz 1Hz1Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz 20Hz20Hz

Project Web Site

http://www.cis.ksu.edu/cadena