310 likes | 344 Views
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.
E N D
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
Assembling Component Scenarios …moving up to 1000+ components
1. Push() 4. GetData() 20Hz High Priority GPS : BM__DeviceComponent Cadena Component Assembly 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 } … create instance of LazyActive component called AirFrame airframe : BM__LazyActiveComponent
1. Push() 4. GetData() 20Hz High Priority GPS : BM__DeviceComponent Cadena Component Assembly 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 } … connect event INPUT port of current component to event OUTPUT port of GPS component airframe : BM__LazyActiveComponent
1. Push() 4. GetData() 20Hz High Priority GPS : BM__DeviceComponent Cadena Component Assembly 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 } … connect data INPUT port of current component to data OUTPUT port of GPS component airframe : BM__LazyActiveComponent
Assembly Description Compiler Java Assembly code Component Assembly Description Compiler Component Assembly Description Boeing OEP XML file Event Service Connection XML file
Design • Visitor pattern • Object diagram • Sequence diagram
Visitor Pattern: Basic Idea CAD Instance1 Instance2 Instance3 Data Connection Correlated Connection Event Connection Event Connection Event Connection
Object diagram – KSU Event Service configuration XML file generator
Sequence diagram – KSU Event Service configuration XML file generator
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 • ComponentSchema sig ComponentSchema {schemaPorts: set PortSchema} • PortSchema sig PortSchema { ptype: PortType, schemaPortOf: ComponentSchema} • Facet, receptacle, source, sink part sig Facet, Receptacle, Source, Sink extends PortSchema {} • PortType sig PortType {} • Event, interface part sig EventType, InterfaceType extends PortType {}
Modeling Component Instances • ComponentInstance sig ComponentInstance {} • PortInstance sig 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 }{…}
Air Frame Component Schema Component Instance 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 Component InstanceOf Component Instances BMLazyActive
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 type all pi : setPortInstances | (some connection[pi] => all p: connection[pi] | (portInstanceOf[pi].ptype = portInstanceOf[p].ptype))
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 condition s.setPortInstances = s'.setPortInstances s.setComponentInstances = s'.setComponentInstances all 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 A C A B B C Pre condition: Post condition: Operations - Disconnect
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 • Functionality • Data usage • Control • package and import • Computation • Maintenance • Clarity • 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 • Reference documents • Management • Documentation • Standards, practices, conventions, and metrics • Reviews and audit • Test • Code control • Media control • 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
Acknowledgement • Committee: • Dr. Hatcliff • Dr. Hankley • Dr. Dwyer
Comments? Thank you!