May08-21 Model-Based Software Development Kevin Korslund Daniel De Graaf Cory Kleinheksel Benjamin Miller Client – Rockwell Collins Faculty Advisor – Dr. Suraj Kothari
May08-21 Model-Based Software Development IRP Presentation Planning Requirements Specification Project Plan Design Design Method Engineering Specification Detailed Design Implementation Build Testing Results
May08-21 Model-Based Software Development Requirements Specification Model Based Development Latest way to develop control software Visual model of software -> Automated code generation ○ Similar relationship between existing C Code -> binary equivalent Reduce number of bugs in software Map closely to requirements specification
May08-21 Model-Based Software Development
/* Outport: ' /Out1' incorporates: * Inport: ' /In1' * Inport: ' /In2' * Sum: ' /Subtract' */ may0821_Y.Out1 = may0821_U.In1 - may0821_U.In2; /* Outport: ' /Out2' incorporates: * Inport: ' /In1' * Inport: ' /In2' * Product: ' /Divide' */ may0821_Y.Out2 = may0821_U.In1 / may0821_U.In2; Requirements Specification
May08-21 Model-Based Software Development Requirements Specification Problem / Need Must verify up to 750,000 lines of code Concept Sketch / Mockup Eclipse plugin Reading c files... done Detecting Simulink blocks... done Inferring Block Relationships... done Verifying Block Correctness... done Generating Simulink File... done Done processing
May08-21 Model-Based Software Development Requirements Specification System Description 1. Convert C code into a syntax tree 2. Use heuristics to identify Simulink blocks 3. Infer relationships and common variables 4. Verify block correctness 5. Generate new dot file
May08-21 Model-Based Software Development Requirements Specification Operating Environment Java 5, Eclipse plugin User Interface Description A menu option in Eclipse
May08-21 Model-Based Software Development Requirements Specification Functional Requirements Input ○ Read the C files produced by Real-Time Workshop Output ○ Produce one or more valid dot files ○ Accurately reflect the execution flow of the source C code Non-Functional Requirements ○ Usable on any system capable of running Eclipse and Eclipse plug-ins
May08-21 Model-Based Software Development Requirements Specification Market/Literature survey Honeywell International - patent for an “Automatic computer code review tool” in ○ Never Issued Deliverables 1. Requirements specification 2. Project plan 3. Engineering specification 4. Design documents 5. Final report 6. Source code 7. User's manual 8. Project poster 9. Website
May08-21 Model-Based Software Development Project Plan Task 1 - Create Simulink models and C code Task 2 - Identify logical Simulink blocks from C code Task 3 - Process blocks Task 4 - Develop syntax tree Task 5 - Output to Simulink model Task 6 - Verify generated model is functional equivalent Task 7 - UI Task 8 - Testing and debugging Total Kevin Korslund Daniel De Graaf Cory Kleinheksel Ben Miller Total Personnel Name Work Breakdown Structure Resource Requirements Estimated man hours for each task
May08-21 Model-Based Software Development Project Plan Project Schedule
May08-21 Model-Based Software Development Project Plan Risks Project has the potential to be an unsolvable problem ○ Model data is lost during compilation ○ Blocks not yet supported could pose the possibility of an NP-Complete problem
May08-21 Model-Based Software Development Design Methods Brainstorming Creative design Innovative approach to solving research project Agile Development Iterative design steps Frequent, thorough testing (Test early -> Test often)
May08-21 Model-Based Software Development Engineering Specification Input / Output Specification Hardware Specification – N/A
May08-21 Model-Based Software Development Engineering Specification Software Specification Parse C Code ○ Eclipse C Development Tools ○ Abstract syntax tree Detect Simulink Blocks ○ Look for known patterns Infer Block Relationships ○ Link blocks by identifying common variables Verify Block Correctness ○ Verify no added functionality ○ Verify no removed functionality Output graph to dot File
May08-21 Model-Based Software Development Engineering Specification User Interface Specification Eclipse plugin Right-click menu option
May08-21 Model-Based Software Development Engineering Specification Test Specification Unit-Level Testing ○ JUnit component testing System-Level Testing ○ Large model extensibility and scalability testing User Testing ○ Test entire process
May08-21 Model-Based Software Development Software Design Detailed Design Block relationships Overall class diagram
May08-21 Model-Based Software Development Software Design (Cont.) Detailed Design Parser class diagram BlockMatcher class diagram
May08-21 Model-Based Software Development Build Environment Setup SVN repository Java 5 Eclipse 3.3 Matlab / Simulink / Real-Time Workshop Coding Package creation ○ Major components ○ Test Eclipse plugin creation Segmentation, Mutation, and Matching
May08-21 Model-Based Software Development Test Unit tests Use JUnit Run from within Eclipse System tests Parser Matcher BlockConnector ModelSplitter / dotOutput User tests
May08-21 Model-Based Software Development Test
May08-21 Model-Based Software Development Test Results 100% of tests and models pass Created bug reports in Bugzilla
May08-21 Model-Based Software Development Test
May08-21 Model-Based Software Development Earned Value Analysis Budgeted Cost of Work Scheduled (BCWS) = $4420 Actual Cost of Work Performed (ACWP) = $4500 Budgeted Cost of Work Performed (BCWP) = $4940 Cost Variance (BCWP-ACWP) = $440 Schedule Variance (BCWP-BCWS) = $520 Cost Performance Index (BCWP/ CWP) = Schedule Performance Index (BCWP/BCWS) = 1.118
May08-21 Model-Based Software Development Conclusions Prototype Observations Automatic Real-Time Workshop error detection is possible Amount of human verification can be greatly decreased Some human verification needed due to Real-Time Workshop optimizations Some blocks are functionally equivalent and others cannot be regenerated from code Project Contribution to Research Area Significant advance in process verification Greatly reduce amount of manual verification Future Work Prototype needs to be developed into a robust, commercial- grade solution Tighter Eclipse integration Improved user interface
May08-21 Model-Based Software Development Lessons Learned A carefully designed architecture reduces programming effort Version control is invaluable for concurrent development Bug tracking provides statistics and reduces bug recurrence
May08-21 Model-Based Software Development Demo
May08-21 Model-Based Software Development
Demo
May08-21 Model-Based Software Development Demo
May08-21 Model-Based Software Development Questions / Answers
May08-21 Model-Based Software Development Summary