Download Personal Software Process for Engineers - Program 3 Assignment Kit - Prof. Jay Morris and more Study notes Software Engineering in PDF only on Docsity!
CS 350: Assignment Kit for
Program 3
Fall 2005
Version 1.1 (subject to revision)
Personal Software Process for Engineers
Assignment Kit for Program 3
Overview
Overview This assignment kit covers the following topics. Section See Page Prerequisites (^2) Program 3 requirements (^3) Numerical integration with Simpson’s rule (^4) The t distribution (^6) Using the t distribution in the PSP (^6) An example (^9) Assignment instructions (^11) PSP1 planning script (^12) Due dates and evaluation criteria (^18) Prerequisites Reading
Numerical integration with Simpson’s rule
Overview (^) Numerical integration is the process of determining the area “under” some function. Numerical integration calculates this area by dividing it into vertical “strips” and summing their individual areas. The key is to minimize the error in this approximation. Simpson’s rule Simpson’s rule can be used to integrate a symmetrical statistical distribution function over a specified range (e.g., from 0 to some value x ).
- num_seg = initial number of segments, an even number
- W = x / num_seg , the segment width
- E = the acceptable error, e.g., 0.
- Compute the integral value with the following equation.
= + ∑ + ∑ + − = − = F FiW FiW F x
W
p num seg i num seg i _ 2 2 , 4 , 6 ... _ 1 1 , 3 , 5 ...
- Compute the integral value again, but this time with num_seg = num_seg *2.
- If the difference between these two results is greater than E, double num_seg and compute the integral value again. Continue doing this until the difference between the last two results is less than E. The latest result is the answer. Continued on next page
Integrating a function
Numerical integration with Simpson’s rule, Continued
A simple example Let’s look at a simple function, where F( x ) = 2 x. Note: This example is a triangle. The area of a triangle is
( base )( height )
2 1
2 32 4 8 2 1 = = In this example, we can expand Simpson’s rule
= + ∑ + ∑ + − = − = F FiW FiW F x
W
p num seg i num seg i _ 2 2 , 4 , 6 ... _ 1 1 , 3 , 5 ...
to [ ( 0 ) 4 ( 1 ) 2 ( 2 ) 4 ( 3 ) ( 4 )] 3 1 p = F + F + F + F + F and then substitute calculated values for the function F( x )= 2 x [ ( )] [ ] 16 3 48 0 8 8 24 8 3 1 ( 0 ) 4 ( 2 ) 2 ( 4 ) 4 ( 6 ) 8 3 1 p = + + + + = + + + + = = F( x ) = 2 x num_seg = 4 W = 4/4 = 1 x = 4
The t distribution, Continued
T distribution function When numerically integrating the t distribution with Simpson’s rule, use the following function. ( ) 2 (^1 )/^2 1 / 2
− + ⎟⎟ ⎠
dof dof x dof dof dof F x π where
- dof = degrees of freedom
- is the gamma function The gamma function is ( x) =( x− 1 )( x− 1 ), where
- (^1 )=^1
- ( 1 / 2 )= π Continued on next page
The t distribution, Continued
An example of calculating gamma for an integer value ( x )for integer values is € ( x ) = (^) ( x − (^1) )!. ( 5 )= 4 != 24 An example of calculating gamma for a non-integer value ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ ⎥=^ ⎥ ⎥ ⎥ ⎥ ⎥ 2 7 2 7 2 9 ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥=^ ⎥ ⎥ ⎥ ⎥ ⎥ 2 5 2 5
2 7 2 7 2 7 ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ ⎥=^ ⎥ ⎥ ⎥ ⎥ ⎥ 2 3 2 3
2 5
2 7 2 5 2 5
2 7 ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ ⎥=^ ⎥ ⎥ ⎥ ⎥ ⎥ 2 1 2 1
2 3
2 5
2 7 2 3 2 3
2 5
2 7
2 3
2 5
2 7 2 1 2 1
2 3
2 5
2 7 ⎟= = ⎠ ⎞ ⎜ ⎝ ⎛ π
0.53221 0.^388035 0.
Result (^) 0. Table 2
An example, Continued Example, continued
- Compute the integral value again, but this time with num_seg = 20. The new result is 0.35005864.
- We compare the new result to the old result.
- 0.^3500589 −^0.^35005864 < E
- We can then return the value p =0.35005864.
Assignment instructions, Continued
Planning phase Plan program 3 following the PSP1 planning phase and the PROBE estimating scripts.
PSP1 Planning Script
Purpose To guide the PSP planning process Entry Criteria - Problem description
- PSP1 Project Plan Summary form
- Size Estimating template
- Historical size and time data (estimated and actual)
- Time Recording log Step Activities Description 1 Program Requirements
- Produce or obtain a requirements statement for the program.
- Ensure that the requirements statement is clear and unambiguous.
- Resolve any questions. 2 Size Estimate
- Produce a program conceptual design. Use any format that you prefer.
- Use the PROBE method to estimate the added and modified size of this program.
- Complete the Size Estimating template and Project Plan Summary form. 3 Resource Estimate
- Use the PROBE method to estimate the time required to develop this program.
- Using the To Date % from the most recently developed program as a guide, distribute the development time over the planned project phases. Exit Criteria - Documented requirements statement
- Program conceptual design
- Completed Size Estimating template
- Completed Project Plan Summary form with estimated program size and development time data
- Completed Time Recording log Verify that you have met all of the exit criteria for the planning phase, then have an instructor review your plan. After your plan has been reviewed, proceed to the development phase. Continued on next page
Assignment instructions, Continued
Use the PROBE method to create size and resource estimates. Purpose To guide the size and time estimating process using the PROBE method Entry Criteria - Requirements statement
- Size Estimating template and instructions
- Size per item data for part types
- Time Recording log
- Historical size and time data General - This script assumes that you are using added and modified size data as the size-accounting types for making size and time estimates.
- If you choose some other size-accounting types, replace every “added and modified” in this script with the size-accounting types of your choice. Step Activities Description 1 Conceptual Design Review the requirements and produce a conceptual design. 2 Parts Additions Follow the Size Estimating Template instructions to estimate the parts additions and the new reusable parts sizes. 3 Base Parts and Reused Parts
- For the base program, estimate the size of the base, deleted, modified, and added code.
- Measure and/or estimate the side of the parts to be reused. 4 Size Estimating Procedure
- If you have sufficient estimated proxy size and actual added and modified size data (three or more points that correlate), use procedure 4A.
- If you do not have sufficient estimated data but have sufficient plan added and modified and actual added and modified size data (three or more points that correlate), use procedure 4B.
- If you have insufficient data or they do not correlate, use procedure 4C.
- If you have no historical data, use procedure 4D. 4A Size Estimating Procedure 4A
- Using the linear-regression method, calculate the β^0 and β 1 parameters from the estimated proxy size and actual added and modified size data.
- If the absolute value of β 0 is not near 0 (less than about 25% of the expected size of the new program), or β 1 is not near 1.0 (between about 0.5 and 2.0), use procedure 4B. 4B Size Estimating Procedure 4B
- Using the linear-regression method, calculate the β^0 and β 1 parameters from the plan added and modified size and actual added and modified size data.
- If the absolute value of β^0 is not near 0 (less than about 25% of the expected size of the new program), or β 1 is not near 1.0 (between about 0.5 and 2.0), use procedure 4C. 4C Size Estimating Procedure 4C If you have any data on plan added and modified size and actual added and modified size, set β 0 = 0 and β 1 = (actual total added and modified size to date/plan total added and modified size to date). 4D Size Estimating Procedure 4D If you have no historical data, use your judgment to estimate added and modified size. (continued) Continued on next page
Assignment instructions, Continued
Development phase Develop the program following the PSP1 development phase script.
PSP1 Development Script
Purpose To guide the development of small programs Entry Criteria - Requirements statement
- Project Plan Summary form with estimated program size and development time
- Time and Defect Recording logs
- Defect Type standard and Coding standard Step Activities Description 1 Design - Review the requirements and produce a design to meet them.
- Record in the Defect Recording log any requirements defects found.
- Record time in the Time Recording log. 2 Code - Implement the design following the Coding standard.
- Record in the Defect Recording log any requirements or design defects found.
- Record time in the Time Recording log. 3 Compile - Compile the program until there are no compile errors.
- Fix all defects found.
- Record defects in the Defect Recording log.
- Record time in the Time Recording log. 4 Test - Test until all tests run without error.
- Fix all defects found.
- Record defects in the Defect Recording log.
- Record time in the Time Recording log.
- Complete a Test Report template on the tests conducted and the results obtained. Exit Criteria - A thoroughly tested program that conforms to the Coding standard
- Completed Test Report template
- Completed Time and Defect Recording logs Verify that you have met all of the exit criteria for the development phase, then proceed to the postmortem phase. Continued on next page
Assignment instructions, Continued
Postmortem phase Conduct the postmortem following the PSP1 postmortem script.
PSP1 Postmortem Script
Purpose To guide the PSP postmortem process Entry Criteria - Problem description and requirements statement
- Project Plan Summary form with program size and development time data
- Completed Test Report template
- Completed Time and Defect Recording logs
- A tested and running program that conforms to the coding and size measurement standards Step Activities Description 1 Defect Recording - Review the Project Plan Summary to verify that all of the defects found in each phase were recorded.
- Using your best recollection, record any omitted defects. 2 Defect Data Consistency
- Check that the data on every defect in the Defect Recording log are accurate and complete.
- Verify that the numbers of defects injected and removed per phase are reasonable and correct.
- Using your best recollection, correct any missing or incorrect defect data. 3 Size - Count the size of the completed program.
- Determine the size of the base, reused, deleted, modified, added, total, added and modified, and new reusable code.
- Enter these data in the Project Plan Summary form. 4 Time - Review the completed Time Recording log for errors or omissions.
- Using your best recollection, correct any missing or incomplete time data. Exit Criteria - A thoroughly tested program that conforms to the coding and size measurement standards
- Completed Test Report template
- Completed Project Plan Summary form
- Completed PIP forms describing process problems, improvement suggestions, and lessons learned
- Completed Time and Defect Recording logs Verify that you have met all of the exit criteria for the PSP1 postmortem phase, then submit your assignment. Continued on next page
Guidelines and evaluation criteria for program 3
Evaluation criteria Bonus points Your process report must be
- complete
- legible
- in the specified order If you pass the function to your integration routine, you will receive 10 bonus points. Your process data must be - accurate - precise - self-consistent Suggestions Keep your programs simple. You will learn as much from developing small programs as from large ones. If you are not sure about something, ask for clarification. Software is not a solo business, so you do not have to work alone.
- You must, however, produce your own estimates, designs, code, and completed forms and reports.
- You may have others review your work, and you may change it as a result.
- You should note any help you receive from others in your process report. Log the review time that you and your associates spend, and log the defects found or any changes made.