Component Assembly Description Compiler Sue (Shufeng) Li MSE final Project Presentation II
Dec 31, 2015
Outline Review of the SRS Design Formal Requirement Specification Test Plan Formal Technical Inspection Software Quality Assurance Plan Executable Prototype References
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 } …
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
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
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
Visitor Pattern: Basic Idea
CAD
Instance1 Instance2 Instance3
DataConnection
EventConnection
CorrelatedConnection
EventConnection
EventConnection
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
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 {}
Modeling Component Instances
ComponentInstancesig ComponentInstance {}
PortInstancesig PortInstance {}
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
}{…}
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
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))
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:
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
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)
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
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
Executable Prototype
Total line of code: 1800 Same structures Easy to modify or add more
functions Some part’s logic is complicated
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