Tracking IV&V Analysis Through Multiple FSW Builds Jacob T Cox 1.

Slides:



Advertisements
Similar presentations
R4 Dynamically loading processes. Overview R4 is closely related to R3, much of what you have written for R3 applies to R4 In R3, we executed procedures.
Advertisements

Module R2 CS450. Next Week R1 is due next Friday ▫Bring manuals in a binder - make sure to have a cover page with group number, module, and date. You.
1 Various Methods of Populating Arrays Randomly generated integers.
Previously… Processes –Process States –Context Switching –Process Queues Threads –Thread Mappings Scheduling –FCFS –SJF –Priority scheduling –Round Robin.
FIT FIT1002 Computer Programming Unit 19 Testing and Debugging.
A Review. a review of lessons learned so far… ( 2 steps forward - 1 step back) Software Development Cycle: design, implement, test, debug, document Large.
6/10/2015C++ for Java Programmers1 Pointers and References Timothy Budd.
Tutorial 6 & 7 Symbol Table
Department of Computer Science University of Maryland, College Park
More on Numerical Computation CS-2301 B-term More on Numerical Computation CS-2301, System Programming for Non-majors (Slides include materials from.
Computer Science 1620 Programming & Problem Solving.
1 CMSC 132: Object-Oriented Programming II Nelson Padua-Perez William Pugh Department of Computer Science University of Maryland, College Park.
Instructions for Moving a Cognos Report Studio Query to a New Package.
1 CSE1301 Computer Programming: Lecture 15 Flowcharts, Testing and Debugging.
Guide To UNIX Using Linux Third Edition
1 Lab Session-III CSIT-120 Spring 2001 Revising Previous session Data input and output While loop Exercise Limits and Bounds GOTO SLIDE 13 Lab session.
COMP 14: Intro. to Intro. to Programming May 23, 2000 Nick Vallidis.
Topic 4 – Programmer- Defined Functions. CISC 105 – Topic 4 Functions So far, we have only seen programs with one function, main. These programs begin.
Overview of Mini-Edit and other Tools Access DB Oracle DB You Need to Send Entries From Your Std To the Registry You Need to Get Back Updated Entries From.
The Pseudocode Programming Process Chapter 9. Summary of Steps in Building Classes and Routines.
JS Arrays, Functions, Events Week 5 INFM 603. Agenda Arrays Functions Event-Driven Programming.
1 Lab Session-III CSIT-120 Fall 2000 Revising Previous session Data input and output While loop Exercise Limits and Bounds Session III-B (starts on slide.
Chapter 5: Control Structures II (Repetition)
CHAPTER 5: CONTROL STRUCTURES II INSTRUCTOR: MOHAMMAD MOJADDAM.
EGR 2261 Unit 5 Control Structures II: Repetition  Read Malik, Chapter 5.  Homework #5 and Lab #5 due next week.  Quiz next week.
Introduction to Programming David Goldschmidt, Ph.D. Computer Science The College of Saint Rose Java Fundamentals (Comments, Variables, etc.)
Standard Algorithms –search for an item in an array –count items in an array –find the largest (or smallest) item in an array.
Hello.java Program Output 1 public class Hello { 2 public static void main( String [] args ) 3 { 4 System.out.println( “Hello!" ); 5 } // end method main.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
Chapter 5: Control Structures II (Repetition). Objectives In this chapter, you will: – Learn about repetition (looping) control structures – Learn how.
CS Midterm Study Guide Fall General topics Definitions and rules Technical names of things Syntax of C++ constructs Meaning of C++ constructs.
Introduction to C++ Version 1.1. Topics C++ Structure Primitive Data Types I/O Casting Strings Control Flow.
CS Data Structures I Chapter 2 Principles of Programming & Software Engineering.
Software Development Problem Analysis and Specification Design Implementation (Coding) Testing, Execution and Debugging Maintenance.
Method Overloading  Methods of the same name can be declared in the same class for different sets of parameters  As the number, types and order of the.
12 CVS Mauro Jaskelioff (originally by Gail Hopkins)
1 Software Quality Engineering. 2 Quality Management Models –Tools for helping to monitor and manage the quality of software when it is under development.
CSC Java Programming, Fall, 2008 Week 3: Objects, Classes, Strings, Text I/O, September 11.
2: Basics Basics Programming C# © 2003 DevelopMentor, Inc. 12/1/2003.
1Software Development Using KIDS Software Development using KIDS Developed by David Whitten WorldVistA Education Meeting Las Cruces, NM May 2007.
CSC Java Programming, Spring, 2010 Week 2: Java Data Types, Control Constructs, and their C++ counterparts.
CS 1704 Introduction to Data Structures and Software Engineering.
Chapter 17: Linked Lists. Objectives In this chapter, you will: – Learn about linked lists – Learn the basic properties of linked lists – Explore insertion.
Functions CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
C++ Programming: Program Design Including Data Structures, Fourth Edition Chapter 17: Linked Lists.
Linked Lists and Generics Written by J.J. Shepherd.
C++ Programming: From Problem Analysis to Program Design, Fourth Edition Chapter 18: Linked Lists.
1 Huffman Codes Computing an Optimal Code for a Document.
CSC Java Programming, Fall, 2008 Week 2: Java Data Types, Control Constructs, and their C++ counterparts, September 9.
Introduction to Algorithmic Processes CMPSC 201C Fall 2000.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Lecture 3: More Java Basics Michael Hsu CSULA. Recall From Lecture Two  Write a basic program in Java  The process of writing, compiling, and running.
L131 Assignment Operators Topics Increment and Decrement Operators Assignment Operators Debugging Tips rand( ) math library functions Reading Sections.
Dynamic Allocation in C
Chapter 16: Linked Lists.
IMPAACT 2010 Screening Visits
IMPAACT 2010 Screening Visits
C++ Programming:. Program Design Including
The Pseudocode Programming Process
IMPAACT 2010 Screening Visits
Pointers and References
Conversions of the type of the value of an expression
C Arrays.
Managing Rosters Screener Training Module Module 5
[Chapter 4; Chapter 6, pp ] CSC 143 Linked Lists [Chapter 4; Chapter 6, pp ]
Pointer Operations.
More Loops Topics Relational Operators Logical Operators for Loops.
CSC Java Programming, Spring, 2012
EECE.2160 ECE Application Programming
Finding the maximum matching of a bipartite graph
Presentation transcript:

Tracking IV&V Analysis Through Multiple FSW Builds Jacob T Cox 1

Agenda An algorithm to remap lines in text file versions Several problems this may help solve – Flexelint efficiencies – Code assessment tracking Questions 2

Algorithm to Map Source Files in Consecutive Builds of Code Using the Unix ‘diff‘ utility it is possible to map lines in text files from one version to another version of the same file. Shipped with version 5 of Unix in 1970 Uses the Hunt–McIlroy algorithm Produces a format that ‘ed’ can use to recreate the original from the current file version 3

Diff Utility Output 20,21c20,21 51d50 54,59c53,55 62,63c58,59 556d a c558, ,574c577, ,579c c583, ,592d ,607d d ,798d c c828 20,21c20,21 < * \version $Revision: $ < * \date $Date: :10: (Fri, 15 Jul 2011) $ --- > * \version $Revision: $ > * \date $Date: :13: (Tue, 10 Jan 2012) $ 50a51 > I32 j ; 53,55c54,59 < for (i=0 ; i<DMS_PDP_NUM_PENDING ; i++) { hinfo[i].cix == cix) { < break ; --- > > for (i=0 ; i<DMS_PDP_NUM_RTYPE ; i++) { > for (j=0 ; j<DMS_PDP_NUM_PENDING ; j++) { > if (dms_state->hinfo[i][j].cix == cix) { > return &dms_state->hinfo[i][j] ; > } 58,59c62,63 < FSW_ASSERT_1(i < DMS_PDP_NUM_PENDING, cix) ; hinfo[i] ; --- > FSW_ASSERT_1(FALSE, cix) ; > return NULL ; 551a556 > I32 rt ; 556d560 < phi = NULL ; Diff Output Useful Diff Output 4

Explicit Changes pluto:experiment>../bin/codeFragment prev/dms/dms_pdp.c : 49: STATIC DmsPdpHandle * dms_pdp_get_handle(DmsCatIndex cix) { 50: I32 i ; 51: 52: FSW_ASSERT_1(cix < DMS_CAPACITY, cix) ; 53: for (i=0 ; i<DMS_PDP_NUM_PENDING ; i++) { 54: if (dms_state->hinfo[i].cix == cix) { 55: break ; 56: } 57: } 58: FSW_ASSERT_1(i < DMS_PDP_NUM_PENDING, cix) ; 59: return &dms_state->hinfo[i] ; 60: } 61: 62: DmsPdpInfo const * dms_pdp_get_info(DmsCatIndex cix) { 63: DmsPdpHandle const * phi ; 64: 65: phi = dms_pdp_get_handle(cix) ; pluto:experiment>../bin/codeFragment curr/dms/dms_pdp.c : 49: STATIC DmsPdpHandle * dms_pdp_get_handle(DmsCatIndex cix) { 50: I32 i ; 51: I32 j ; 52: 53: FSW_ASSERT_1(cix < DMS_CAPACITY, cix) ; 54: 55: for (i=0 ; i<DMS_PDP_NUM_RTYPE ; i++) { 56: for (j=0 ; j<DMS_PDP_NUM_PENDING ; j++) { 57: if (dms_state->hinfo[i][j].cix == cix) { 58: return &dms_state->hinfo[i][j] ; 59: } 60: } 61: } 62: FSW_ASSERT_1(FALSE, cix) ; 63: return NULL ; 64: } 65: 66: DmsPdpInfo const * dms_pdp_get_info(DmsCatIndex cix) { 67: DmsPdpHandle const * phi ; 68: 69: phi = dms_pdp_get_handle(cix) ; Red text is changed text 5

The Algorithm Parse the diff file lines and store on a list convert Line Number( target line) { for each parsed line in the diff file { determine a trigger line in the current files to update line counts set skips based on whether the diff line is add, change or delete if target occurs prior to next change, return calculated value move to trigger line if at target then return perform skips if past target then it is in a deleted section and does not map } The target is past the last diff line so calculate and return } 6

Assumptions Lines do not move from file to file Lines do not change relative order within a file Internal changes do not make a previous false positive a true positive Noise from randomly matching lines will be inconsequential 7

Aids in Solutions to Identify repeated Static Code Analysis warnings through consecutive builds Identifying fixed issues in a new build Identify where changes in software source have invalidated prior implementation verification analysis Identify source elements that have no reference in project documentation 8

Common component Mapping lines of source code to their equivalent in successive builds of code. Given a line of code in a {new, previous} build, what line is it in the {previous, new} build. File.c … 202 int I; if (I = j( a, b)) { … 214 } File.c … 213 int I; if (I = j( a, b)) { … 225 }

Some Possible Uses 10

Repeated Static Code Analysis Warnings Klocwork can show new warnings on consecutive builds Klocwork can show when an issue was fixed It is difficult to show new warnings for consecutive Flexelint builds 11

Finding if a Warning was in the Previous Build File.c … 202 int I; if (I = j( a, b)) { … 214 } File.c … 213 int I; if (I = j( a, b)) { … 225 } Error 313 fexelint finds error 313 on line

Finding if a Warning was in the Previous Build Ctd. File.c … 202 int I; if (I = j( a, b)) { … 214 } File.c … 213 int I; if (I = j( a, b)) { … 225 } Error 313 Use the algorithm to see what the equivalent to line 215 was in the previous build 13

Finding if a Warning was in the Previous Build Ctd. File.c … 202 int I; if (I = j( a, b)) { … 214 } File.c … 213 int I; if (I = j( a, b)) { … 225 } Error 313 fexelint has the same error on line 204 of the previous Build which is equivalent to line 215. Error

Identifying a Fixed Warnings File.c … 202 int I; if (I = j( a, b)) { … 214 } File.c … 213 float I; if (I = j( a, b)) { … 225 } The error on line 204 of the previous Build no longer exists. If an issue had been written it may be closed. Error

Fexelint Warnings curr\dms\dms_pdp.c 274 Warning 570 "Loss of sign (arg. no. 2) (int to unsigned int)" curr\dms\dms_pdp.c 289 Info 737 "Loss of sign in promotion from int to unsigned int" curr\dms\dms_pdp.c 289 Info 713 "Loss of precision (assignment) (unsigned int to int)" curr\dms\dms_pdp.c 297 Warning 570 "Loss of sign (arg. no. 2) (int to unsigned int)" curr\dms\dms_pdp.c 305 Warning 570 "Loss of sign (arg. no. 2) (int to unsigned int)" curr\dms\dms_pdp.c 346 Warning 570 "Loss of sign (arg. no. 2) (int to unsigned int)" curr\dms\dms_pdp.c 360 Warning 570 "Loss of sign (arg. no. 2) (int to unsigned int)" curr\dms\dms_pdp.c 375 Warning 570 "Loss of sign (arg. no. 2) (int to unsigned int)" curr\dms\dms_pdp.c 377 Info 713 "Loss of precision (assignment) (unsigned int to int)" curr\dms\dms_pdp.c 377 Warning 613 "Possible use of null pointer 'p_dpo_id' in argument to operator 'unary *' …" curr\dms\dms_pdp.c 327 Info 831 "Reference cited in prior message" curr\dms\dms_pdp.c 378 Warning 613 "Possible use of null pointer 'p_dpo_length' in argument to operator 'unary *' …" curr\dms\dms_pdp.c 328 Info 831 "Reference cited in prior message" curr\dms\dms_pdp.c 379 Warning 613 "Possible use of null pointer 'p_dp_offset' in argument to operator 'unary …" curr\dms\dms_pdp.c 329 Info 831 "Reference cited in prior message" curr\dms\dms_pdp.c 406 Warning 570 "Loss of sign (arg. no. 2) (int to unsigned int)" curr\dms\dms_pdp.c 417 Warning 570 "Loss of sign (arg. no. 2) (int to unsigned int)" curr\dms\dms_pdp.c 417 Info 717 "do... while(0);" curr\dms\dms_pdp.c 430 Warning 570 "Loss of sign (arg. no. 2) (int to unsigned int)" curr\dms\dms_pdp.c 430 Info 717 "do... while(0);" 16

Fexelint Warnings Flex Filter Algorithm Previous Warnings Diff File Current Warnings New Warnings 17

Results A test on the DMS module for MSL version and gave 69 warnings from an initial 5,846. With 44,864 C lines of code Warning with equivalent line numbers and the same error code were removed. {I’m sure some folks can come up with improved heuristics but it seems to work well right now.} 18

New Topic: Assessment Tracking 19

Code Assessments in MSL The project had a schedule relating requirements to the build in which they were to be implemented The IV&V project verified that the requirements were implemented in the build This assessment including the location was captured in clear text The locations could not be kept current as new builds were delivered 20

Tracking Code Assessments File.c … 202 int I; if (I = j( a, b)) { … 214 } File.c … 213 int I; if (I = j( a, b)) { … 225 } Assessment Semantic assessment that a requirement is implemented on line

Tracking Code Assessments Ctd. File.c … 202 int I; if (I = j( a, b)) { … 214 } File.c … 213 int I; if (I = j( a, b)) { … 225 } Assessment Use algorithm to find line 204 in the next build. 22

Tracking Code Assessments Ctd File.c … 202 int I; if (I = j( a, b)) { … 214 } File.c … 213 int I; if (I = j( a, b)) { … 225 } Assessment Assessment now maps to line 215 in the new build. 23

Identifying an Assessment has been Invalidated File.c … 202 int I; if (I = j( a, b)) { … 214 } File.c … 213 int I; if (I = k( a, b)) { … 225 } Assessment Changes in software invalidates the assessment. 24

Moving Assessments Forward Build 1 A new build is delivered

Moving Assessments Forward Assessment Build 1 Assessment Assessments are made

Moving Assessments Forward Assessment Build 1 Build 2 27 A new build arrives

Moving Assessments Forward Assessment Build 1 Build 2 28 Use algorithm to bring assessments forward

Moving Assessments Forward Assessment Build 1 Build 2 29 Make more assessments

Moving Assessments Forward Assessment Build 1 Build 2 Build 3 30

Moving Assessments Forward Assessment Build 1 Build 2 Build 3 31

Moving Assessments Forward Assessment Build 1 Build 2 Build 3 32

Identifying Un-Assessed Software Final Build Assessment Un-assessed Software 33

To Make This Work A standard way to store assessments A way to associate assessments with source code A process to move the assessments forward 34

Finale The ability to remap assessments or warnings to consecutive builds could be useful. 35

Questions? 36