31
Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Embed Size (px)

Citation preview

Page 1: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Component Assembly Description Compiler

Sue (Shufeng) Li

MSE final Project Presentation II

Page 2: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Outline Review of the SRS Design Formal Requirement Specification Test Plan Formal Technical Inspection Software Quality Assurance Plan Executable Prototype References

Page 3: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Assembling Component Scenarios

…moving up to 1000+ components

Page 4: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Cadena Component Assembly

GPS : BM__DeviceComponent

20Hz High Priority

1. Push() 4. GetData()

airframe : BM__LazyActiveComponent

create instance of LazyActive component

called AirFrame

create instance of LazyActive component

called AirFrame

system ModalSP {

locations l1,l2,l3; rates 1,5,20,60;

instance AirFrame of BMLazyActive on l2 { connect dataAvailable to GPS.dataCurrent atRate 20 connect dataIn to GPS.dataOut

instance GPS of BMDevice on l2 { connect timeout to EventChannel.timeout20 } …

Page 5: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

system ModalSP {

locations l1,l2,l3; rates 1,5,20,60;

instance AirFrame of BMLazyActive on l2 { connect dataAvailable to GPS.dataCurrent atRate 20 connect dataIn to GPS.dataOut

instance GPS of BMDevice on l2 { connect timeout to EventChannel.timeout20 } …

Cadena Component Assembly

GPS : BM__DeviceComponent

20Hz High Priority

1. Push() 4. GetData()

airframe : BM__LazyActiveComponent

connect event INPUT port of current component

to event OUTPUT port of GPS component

connect event INPUT port of current component

to event OUTPUT port of GPS component

Page 6: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

system ModalSP {

locations l1,l2,l3; rates 1,5,20,60;

instance AirFrame of BMLazyActive on l2 { connect dataAvailable to GPS.dataCurrent atRate 20 connect dataIn to GPS.dataOut

instance GPS of BMDevice on l2 { connect timeout to EventChannel.timeout20 } …

Cadena Component Assembly

GPS : BM__DeviceComponent

20Hz High Priority

1. Push() 4. GetData()

airframe : BM__LazyActiveComponent

connect data INPUT port of current component

to data OUTPUT port of GPS component

connect data INPUT port of current component

to data OUTPUT port of GPS component

Page 7: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Assembly Description Compiler

ComponentAssembly DescriptionCompiler

Java Assembly code

Java Assembly code

Boeing OEP XML file

Boeing OEP XML file

Event Service Connection XML file

Event Service Connection XML file

Component Assembly Description

Component Assembly Description

Page 8: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Design Visitor pattern Object diagram Sequence diagram

Page 9: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Visitor Pattern: Basic Idea

CAD

Instance1 Instance2 Instance3

DataConnection

EventConnection

CorrelatedConnection

EventConnection

EventConnection

Page 10: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Object diagram – Glue code generator

Page 11: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Object diagram – OEP XML Generator

Page 12: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Object diagram – KSU Event Service configuration XML file generator

Page 13: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Sequence diagram – Glue code generator

Page 14: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Sequence diagram – OEP XML generator

Page 15: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Sequence diagram – KSU Event Service configuration XML file generator

Page 16: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Formal requirement specification (Alloy model)

Mainly based on the course homework #1 and #2 of CIS771, software specification, taught by Dr.Hatcliff

Domains: ComponentSchema, PortSchema, PortType, EventType,

InterfaceType, ComponentInstance, PortInstance Relations among:

Component Schema & Component Instance Component Schema & Port Schema Port Schema & Port Type Connections & Port Types, Port Instances, Component Instances …

Operations: Create a componentInstance, Dispose a ComponentInstance, Disconnect

two PortInstances, Connect Source & Sink, Connect Facet & Receptacle

Formal requirement specification detail

Page 17: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

ModalSP Example

Page 18: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Modeling Component Schemas

ComponentSchemasig ComponentSchema {schemaPorts: set

PortSchema} PortSchema

sig PortSchema { ptype: PortType, schemaPortOf: ComponentSchema}

Facet, receptacle, source, sinkpart sig Facet, Receptacle, Source, Sink extends

PortSchema {} PortType

sig PortType {} Event, interface

part sig EventType, InterfaceType extends PortType {}

Page 19: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Modeling Component Instances

ComponentInstancesig ComponentInstance {}

PortInstancesig PortInstance {}

Page 20: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Global State

sig State {setComponentInstances : set ComponentInstance,

setPortInstances : set PortInstance,componentInstanceOf : ComponentInstance -> ?ComponentSchema,componentInstances : ComponentSchema? ->ComponentInstance,portInstanceOf : PortInstance -> ?PortSchema,

portInstances : PortSchema? -> PortInstance,instancePorts : ComponentInstance? -> PortInstance, instancePartOf: PortInstance -> ?ComponentInstance,connection : PortInstance -> PortInstance

}{…}

Page 21: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Relations among Schemas and Instances

Each port instance pi of a component instance ci has a corresponding port schema ps in the component schema cs associated with ci.all ci : setComponentInstances | all pi : instancePorts[ci] |

portInstanceOf[pi] in (componentInstanceOf[ci]).schemaPorts

Each port schema ps declared in a component schema cs must have a corresponding port instance pi in every component instance ci of cs.all ci : setComponentInstances |all ps : (componentInstanceOf[ci]).schemaPorts

| one pi : portInstances[ps] | instancePartOf[pi]

= ci

BMLazyActiv

e

AirFram

e

ComponentInstances

ComponentInstanceOf

Component

SchemaCompone

nt Instance

Page 22: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Modeling Connections Connection relation should be symmetric

all pi1 : setPortInstances |all pi2 : connection[pi1] | (pi1 in connection[pi2])

Connections must be made between different component instances, i.e., a component instance cannot connect to itself. all pi : setPortInstances |

all p: connection[pi] |not instancePartOf[pi] = instancePartOf[p]

Each connection must only connect to things of the same typeall pi : setPortInstances |

(some connection[pi] => all p: connection[pi] | (portInstanceOf[pi].ptype = portInstanceOf[p].ptype))

Page 23: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Operations - Disconnect fun Disconnect(pi1,pi2: PortInstance, s,s':

State) { //pre condition

(pi2 in s.connection[pi1]) && (pi1 in s.connection[pi2]) //post condition

(not pi2 in s'.connection[pi1]) && (not pi1 in s'.connection[pi2])

//frame conditions.setPortInstances = s'.setPortInstances s.setComponentInstances = s'.setComponentInstancesall ci: s.setComponentInstances |

s.componentInstanceOf[ci] = s'.componentInstanceOf[ci]all pi: s.setPortInstances |

(s.portInstanceOf[pi] = s'.portInstanceOf[pi]) && (s.instancePartOf[pi] = s'.instancePartOf[pi])

all pi: s.setPortInstances - pi1 - pi2 |s.connection[pi] = s'.connection[pi]

} run Disconnect for 4

BA C

Pre condition:

A B C

Post condition:

Page 24: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Test plan Test deliverables

Test Plan Test Case specifications Resolution of defects Test Summary Report

Testing tasks Glue code generator test KSU event service configuration XML file generator Boeing OEP XML file generator

Approach Insert assertions Coverage test Regression test Black box testing

Test plan details

Page 25: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Test cases Small examples to test each aspect of

functionality Visit component instances but no connections among

them Only data connections exist Only basic event connection exist Only correlated event connection exist Three kinds of connections exist at the same time Error messages Test case examples

Boeing scenario examples BasicSP (3 components, 5 connections) ModalSP (8 components, 16 connections, 2 correlations) MediumSP(49 components, 123 connections, 8

correlations) MultiRateMP(8 components, 10 connections, 2

processors)

Page 26: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Formal Technical Inspection A formal checklist for implementation phase Source code inspection checklist

1. Functionality2. Data usage 3. Control4. package and import5. Computation6. Maintenance7. Clarity8. Overall

The inspectors will be two students in our group

Detail

Page 27: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Software Quality Assurance Plan (SQAP) SQAP describes the standards, processes and

procedures used in this project Structure

1 Reference documents2 Management3 Documentation4 Standards, practices, conventions, and metrics5 Reviews and audit6 Test7 Code control8 Media control9 Supplier control

Detail

Page 28: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Executable Prototype

Total line of code: 1800 Same structures Easy to modify or add more

functions Some part’s logic is complicated

Page 29: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

References CORBA & CCM OMG CORBA 3.0 new Components Chapters CORBA Component Model: Discussion and Use with OpenCCM

(Raphaël Marvie, Philippe Merle ) OpenORB Cadena: An Integrated Development, Analysis, and Verification

Environment for Component-based Systems, John Hatcliff, William Deng, Matthew Dwyer, Georg Jung, Venkatesh Prasad (submitted for publication -- SAnToS Laboratory Technical Report 2002-02): www.cis.ksu.edu/cadean

CORBA Component Model Tutorial Gerald Brose, Andreas Vogel, Keith Duddy, Java Programming with

CORBA, Third Edition, ISBN: 0-471-37681-7, 2001 CIS771 homework, www.cis.ksu.edu/~hatcliff/771/homework.html The Alloy Analyzer reference manual

Page 30: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Acknowledgement

Committee: Dr. Hatcliff Dr. Hankley Dr. Dwyer

Page 31: Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II

Comments?

Thank you!