Networking Systems Code Studies
Download
Report
Transcript Networking Systems Code Studies
8th NCTT Annual Curriculum Workshop
Springfield, Massachusetts, July 11-14, 2005
Challenging Projects and Virtual Labs
in Web-enhanced IT Classes
Vladimir Riabov
Associate Professor
Department of Mathematics & Computer Science
Rivier College, USA
E-mail: [email protected]
Agenda:
•
•
•
•
•
Web-enhanced IT Classes at Rivier College;
Lecture Notes and Web Resources;
Class Assignments;
Virtual OPNET Labs;
Examples of Students’ Projects and Research:
–
–
–
•
Project Papers (SANs, WiFi, Gigabit Ethernet, etc.)
Digital Video Cluster Simulation with OMNeT++
Code Complexity Analysis for two projects in
Networking
Conclusion
July 2005
Web-enhanced IT Classes
2
Web-enhanced IT Classes at Rivier College
• Undergraduate and Graduate Programs in CS & CIS
http://www.rivier.edu/departments/mathcs/home/cs/CSIndex.htm
• Certificates in Networking and Information Technologies
• IT-related Courses:
–
–
–
–
–
–
–
–
CS553: Introduction to Networking Technology
CS572: Computer Security
CS573: Advanced Wide Area Networks
CS575: Advanced Local Area Networks
CS597: Multimedia and Web Development
CS612: Information Technology
CS632: Client/Server Computing
CS685: Network Management, and others
• Web-enhanced Classes across CS/CIS Curricula
July 2005
Web-enhanced IT Classes
3
Lecture Notes and Web Resources
• Instructor’s Web site (Teaching, Research &
Publications):
http://www.rivier.edu/faculty/vriabov/
• Web sites for IT Courses
–
–
–
–
–
–
Syllabi
Lecture Notes
Assignments
Schedules
Resources
Examples of Students’ Project Papers
• Web Resources
July 2005
Web-enhanced IT Classes
4
Class Assignments
•
•
•
•
•
•
•
Warm-up Exercises
Homework Assignments
Virtual Labs
Midterm Exams
Project Papers
Research Reports
Final Exams
July 2005
Web-enhanced IT Classes
5
Warm-up Exercises (examples)
• What is the last digit of the number 25975927
[mod(10)]?
• Using MSExcel™ spreadsheet, find the last
digit of the number 253 [mod(10)]?
• How to use your findings in these two cases
for encrypting e-messages?
July 2005
Web-enhanced IT Classes
6
Last digit of the number 25975927 [mod(10)]?
• It’s enough to consider the last
digit of a simpler number 75927;
• Do your experiments (see Table)!
• “LAST” can be 7, 9, 3, or 1 only;
therefore, it is a cycle of four
cases;
• The power, 5927 can be
represented as 5927 = 4*1481+3;
• Therefore, “LAST” of 75927 is the
same as the “LAST” of 73, which is
“3”.
• Answer: “3”.
July 2005
Web-enhanced IT Classes
N
7^N
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
7
49
343
2401
16807
117649
823543
5764801
40353607
282475249
1977326743
13841287201
96889010407
678223072849
4747561509943
33232930569601
7
Last digit of the number 253 [mod(10)]?
• “LAST” digit can be 2, 4, 8, or 6 only;
therefore, it is a cycle of four cases;
• The power, 53 can be represented as
53 = 4*13+1;
• The “LAST” of 253 is the same as the
“LAST” of 21, which is “2”.
• Therefore, following this algorithm, the
last digit of the number 253 must be 2;
• Try MS Excel™Spreadsheet (see
Table)!
• Why the last digit of the number 253 is 0
there?
• HINT: Consider the number of
“valuable” digits in large natural
numbers calculated with MS Excel™!
July 2005
Web-enhanced IT Classes
N
2^N
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
2
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32768
65536
131072
262144
524288
1048576
2097152
4194304
8388608
16777216
33554432
67108864
134217728
268435456
536870912
1073741824
2147483648
4294967296
8589934592
17179869184
34359738368
68719476736
137438953472
274877906944
549755813888
1099511627776
2199023255552
4398046511104
8796093022208
17592186044416
35184372088832
70368744177664
140737488355328
281474976710656
562949953421312
1125899906842620
2251799813685250
4503599627370500
9007199254740990
7^N
7
49
343
2401
16807
117649
823543
5764801
40353607
282475249
1977326743
13841287201
96889010407
678223072849
4747561509943
33232930569601
232630513987207
1628413597910450
11398895185373100
79792266297612000
558545864083284000
3909821048582990000
27368747340080900000
191581231380566000000
1341068619663960000000
9387480337647750000000
65712362363534300000000
459986536544740000000000
3219905755813180000000000
22539340290692300000000000
8
Homework Assignments (example 1)
• Using Manchester Encoding Format, encode a bit-stream that
represents two first letters of your last name previously written in
the ASCII (7-bit) Coding Standard. Using MS Word, plot a
diagram that illustrates your Manchester code.
July 2005
Web-enhanced IT Classes
9
Homework Assignments (example 2)
• Plot a diagram that
illustrates a virtual
private connection
from your home
computer to the Rivier
College Network.
Briefly describe issues
that should be
resolved for
establishing this
connection.
July 2005
Web-enhanced IT Classes
10
Homework Assignments (example 3)
A LAN has a data rate of r=4 Mbps and a propagation delay between two stations
at opposite ends of d=20 μs. For what range of PDU sizes (S, measured in bits)
does the stop-and-wait flow control give an efficiency of at least 50%, E > 0.5?
(neglect the transmission time for the ACK signal). The efficiency, E is defined as
a ratio of the PDU transmission time (time for inserting the PDU onto the medium)
to the total time the medium is occupied for this one PDU.
Stop-and-wait flow control
Crystal Yu’s solution: S=?
T=S/r is PDU-transmission time;
E=T/(T+d+d); E > 0.5;
T>0.5*(T+2*d); T>2d;
S>2*d*r; S>2*20*10-6*4*106;
Answer: S>160 bits
July 2005
Web-enhanced IT Classes
11
Visiting the IT Services Department
July 2005
Web-enhanced IT Classes
12
Visiting the IT Services Department
July 2005
Web-enhanced IT Classes
13
Virtual Labs
• OPNET IT Guru Academic Edition™ :
http://enterprise37.opnet.com/4dcgi/COMMUNITY_HOME
http://www.opnet.com/services/university/home.html
• OPNET Virtual Lab Manuals:
– http://www.opnet.com/services/university/lab_manuals.html
• William Stallings, Business Data Communications, Fifth Edition
• William Stallings, Data and Computer Communications,
Seventh Edition
• Raymond R. Panko, Business Data Networks and
Telecommunications, Fourth Edition
• Larry L. Peterson and Bruce S. Davie, Computer Networks – A
Systems Approach,Third Edition.
July 2005
Web-enhanced IT Classes
14
Virtual Labs
•
Four-Six OPNET™ Virtual Labs per Course:
http://www1.us.elsevierhealth.com:8300/MKP/Aboelela/manual/index.html
L00: Introduction - Basics of OPNET IT Guru Academic Edition™
L01: Ethernet - A Direct Link Network with Media Access Control
L02: Token Ring - A Shared-Media Network with Media Access Control
L03: Switched LANs - A Set of Local Area Networks Interconnected by Switches
L04: Network Design - Planning a Network with Different Users, Hosts, and Services
L05: ATM - A Connection-Oriented, Cell-Switching Technology
L06: RIP: Routing Information Protocol - A Routing Protocol Based on the
Distance-Vector Algorithm
L07: OSPF: Open Shortest Path First - A Routing Protocol Based on the Link-State
Algorithm
L08: TCP: Transmission Control Protocol - A Reliable, Connection-Oriented, ByteStream Service
L09: Queuing Disciplines - Order of Packet Transmission and Dropping
L10: RSVP: Resource Reservation Protocol - Providing QoS by Reserving
Resources in the Network
L11: Firewalls and VPN - Network Security and Virtual Private Networks
L12: Applications - Network Application Performance Analysis
July 2005
Web-enhanced IT Classes
15
Virtual Lab Basics
July 2005
Web-enhanced IT Classes
16
Lab Project Editor Window
July 2005
Web-enhanced IT Classes
17
Lab: Network Expansion Plan
In this lesson, you plan
for the expansion of a
small company’s
intranet. Currently, the
company has a star
topology network on the
first floor of its office
building and plans to
add an additional star
topology network on
another floor. You will
build and test this “whatif” scenario to ensure
that the load added by
the second network will
not cause the network
to fail.
July 2005
Web-enhanced IT Classes
18
Creating a New Scenario
Use the Startup Wizard to set up a new
scenario:
1 If IT Guru is not already running, start it.
5 Enter the values shown in the following
table in the dialog boxes of the Startup
Wizard:
2 Select File > New....
3 Select Project from the pull-down menu
and click OK.
4 Name the project and scenario, as follows:
4.1 Name the project <initials>_Sm_Int
Include your initials in the project name to
distinguish it from other versions of this
project.
4.2 Name the scenario first_floor.
4.3 Click OK. The Startup Wizard opens.
July 2005
Web-enhanced IT Classes
19
Creating the Network
July 2005
Web-enhanced IT Classes
20
Creating the Network (Step 2)
Building a Server, Application & Profile
July 2005
Web-enhanced IT Classes
21
Expanding the Network & Comparing Results (Step 3)
Comparing Results
July 2005
Web-enhanced IT Classes
22
Students’ Project Papers: “Storage Area Networks (SANs)”
Fibre Channel Technology for Storage Area Networks
by David Norman (fibre.pdf file is available)
July 2005
V. Riabov, "Storage Area Networks," The Internet
Encyclopedia, Wiley & Sons, Dec. 2003, pp. 1-11.
Web-enhanced IT Classes
23
Students’ Project Papers on Selected Networking Protocols
Gigabit Ethrnet, QoS, and Multimedia Applications
by Jeff Corbit (gigabit-ethernet.pdf file is available)
July 2005
V. Riabov, “Simple Mail Transfer Protocol," The
Handbook of Information Security, Wiley & Sons,
Dec. 2005, pp. 1-22.
Web-enhanced IT Classes
24
Students’ Project Papers: “WiFi Technologies”
Secure Wi-Fi Technologies for Enterprise LAN Network
by Tom Borick (wifi.pdf file is available)
July 2005
V. Riabov, “Going Wireless," Rivier Today Magazine,
March 2005.
Web-enhanced IT Classes
25
Digital Video Cluster Simulation with OMNeT++
Digital Video Cluster Simulation by Martin Milkovits
(cluster.pdf file is available)
Varga, Andras. 2004, OMNeT++
Version 3.0 User Manual [online].
Available via
<http://www.omnetpp.org/>.
July 2005
Web-enhanced IT Classes
26
Digital Video Cluster Simulation (continue)
From: Digital Video Cluster Simulation by Martin Milkovits
July 2005
Web-enhanced IT Classes
27
Digital Video Cluster Simulation (results)
From: Digital Video Cluster Simulation by Martin Milkovits
July 2005
Web-enhanced IT Classes
28
Research Project: “Networking Software Studies with the
Structured Testing Methodology”
Presented by V. Riabov at the International Conference on Computer Science & Information Systems, Athens,
Greece, 16-18 June 2005 (software.pdf file is available on Web)
July 2005
Web-enhanced IT Classes
29
McCabe’s Structured Testing Methodology Approach
and Tools for Networking Software Development
• McCabe’s Structured Testing Methodology is:
a unique methodology for software testing proposed by McCabe in
1976;
approved as the NIST Standard (1996) in the structured testing;
a leading tool in computer, military, and aerospace industries
(HP, GTE, AT&T, Alcatel, GIG, Boeing, NASA, etc.) since 1977;
provides Code Coverage Capacity.
• Author’s Experience with McCabe IQ Tools since 1998
leaded three projects in networking industry that required Code
Analysis, Code Coverage, and Test Coverage;
completed BCN Code Analysis with McCabe Tools;
completed BSN Code Analysis with McCabe Tools;
studied BSN-OSPF Code Coverage & Test Coverage;
included these topics into Software Engineering and Networking
classes
since 1999.
July 2005
Web-enhanced IT Classes
30
McCabe’s Structured Testing Methodology Basics
• The key requirement of structured testing is that all decision
outcomes must be exercised independently during testing.
• The number of tests required for a software module is equal to the
cyclomatic complexity of that module.
• The software complexity is measured by metrics:
cyclomatic complexity, v
essential complexity, ev
module design complexity, iv
system design, S0, and system integration complexity, S1,
Halstead metrics, and 52 metrics more.
• The testing methodology allows to identify unreliable-andunmaintainable code, predict number of code errors and
maintenance efforts, develop strategies for unit/module testing,
integration testing, and test/code coverage.
July 2005
Web-enhanced IT Classes
31
Basics: Analyzing a Module
• For each module (a function or subroutine with a single entry point
and a single exit point), an annotated source listing and flowgraph
is generated.
• Flowgraph is an architectural diagram of a software module’s logic.
Statement
Number
1
2
3
4
5
6
7
8
9
Code
main()
{
printf(“example”);
if (y > 10)
b();
else
c();
printf(“end”);
}
Battlemap
main Flowgraph
1-3
main
4
b
c
printf
5
condition
7
end of condition
8-9
July 2005
node:statement or block
of sequential statements
Web-enhanced IT Classes
edge: flow of control
between nodes
32
Flowgraph Notation (in C)
if (i) ;
if (i) ; else ;
do ; while (i);
July 2005
while (i) ;
Web-enhanced IT Classes
if (i && j) ;
if (i || j) ;
switch(i) { case 0: break; ... }
33
Flowgraph and Its Annotated Source Listing
Origin information
Module: marketing
Annotated Source Listing
Metric information
0
Program : corp4
09/23/99
File
: ..\code\corp4.i
Language: instc_npp
Module Module
Start Num of
Letter Name
v(G) ev(G) iv(G) Line Lines
------ ----------------------------------------------------------- ----- -----B
marketing
2
1
2
16
10
16
17
18
19
20
21
22
23
24
25
B0
B1* B2
B3
B4* B5
B9
B6* B7 B8
}
marketing()
{
int purchase;
1*
2
3
4*
6*
5
7
Decision construct
purchase = query("Is this a purchase");
if ( purchase == 1 )
development();
else
support();
8
9
Node correspondence
July 2005
Web-enhanced IT Classes
34
Would you buy a used car from this software?
• Problem: There are size
and complexity boundaries
beyond which software
becomes hopeless
– Too error-prone to use
– Too complex to fix
– Too large to redevelop
• Solution: Control complexity
during development and
maintenance
– Stay away from the boundaries.
July 2005
Web-enhanced IT Classes
35
Important Complexity Measures
• Cyclomatic complexity: v = e - n + 2
(e=edges; n=nodes)
– Amount of decision logic
• Essential complexity: ev
– Amount of poorly-structured logic
• Module design complexity: iv
– Amount of logic involved with subroutine calls
• System design complexity: S0 = iv
– Amount of independent unit (module) tests for a system
• System integration complexity: S1 = S0 - N + 1
– Amount of integration tests for a system of N modules.
July 2005
Web-enhanced IT Classes
36
Cyclomatic Complexity
• Cyclomatic complexity, v - A measure of the decision
logic of a software module.
– Applies to decision logic embedded within written
code.
– Is derived from predicates in decision logic.
– Is calculated for each module in the Battlemap.
– Grows from 1 to high, finite number based on the
amount of decision logic.
– Is correlated to software quality and testing
quantity; units with higher v, v>10, are less reliable
and require high levels of testing.
July 2005
Web-enhanced IT Classes
37
Cyclomatic Complexity
1
1
edges and node method
e = 24, n = 15
v = e – n + 2 = 24 -15 +2
v = 11
2
R1
3
=1
5
2
=2
3
4
R2
6
7
4
=1
R3
5
R4
9
8
10
6
R5
11
7
=1
predicate (logical) method
v=+1
v = 11
12
R11
8
13
14
region (topology) method
regions = 11
18
10
=1
R6
15
11
=1
R8
16
R7
19
21
Beware of crossing lines
17
9
=2
20
12
R9
22
13
R10
23
23
July 2005
Web-enhanced IT Classes
14
=1
24
38
15
Essential Complexity - Unstructured Logic
Branching out of a loop
July 2005
Branching in to a loop
Branching into a
Branching out of a
decision
decision
Web-enhanced IT Classes
39
Essential Complexity, ev
• Flowgraph and reduced flowgraph after structured constructs
have been removed, revealing decisions that are unstructured.
v=5
July 2005
Reduced flowgraph
v=3
Therefore ev of the original flowgraph = 3
Web-enhanced IT Classes
Superimposed
essential flowgraph
40
Essential Complexity, ev
• Essential complexity helps detect unstructured code.
v = 10
ev = 1
Good designs
v = 11
ev = 10
Can quickly
deteriorate!
July 2005
Web-enhanced IT Classes
41
Module Design Complexity, iv
• Example:
main()
{
if (a == b) progd();
if (m == n) proge();
switch(expression)
{
case value_1:
statement1;
break;
case value_2:
statement2;
break;
case value_3:
statement3;
}
}
main
iv = 3
progd
main
Reduced Flowgraph
v=5
v=3
progd()
progd()
proge()
proge()
do not impact calls
July 2005
proge
Web-enhanced IT Classes
Therefore,
iv of the original flowgraph = 3
42
Module Metrics Report
v, number of unit test paths for a module
Page 1
iv, number of integration tests for a module
10/01/99
Module Metrics Report
July
Program: less
Module Name Mod # v(G) ev(G) iv(G)
File Name
------------- ----- ------ ----- ----- -----------------CH:fch_get
118
12
5
6 ..\code\CH.I
CH:buffered
117
3
3
1 ..\code\CH.I
ch_seek
105
4
4
2 ..\code\CH.I
ch_tell
108
1
1
1 ..\code\CH.I
ch_forw_get
106
4
1
2 ..\code\CH.I
ch_back_get
110
6
5
5 ..\code\CH.I
forw_line
101
11
7
9 ..\code\INPUT.I
back_line
86
12
11
12 ..\code\INPUT.I
prewind
107
1
1
1 ..\code\LINE.I
pappend
109
36
26
3 ..\code\LINE.I
control_char
119
2
1
1 ..\code\OUTPUT.I
carat_char
120
2
1
1 ..\code\OUTPUT.I
flush
130
1
1
1 ..\code\OUTPUT.I
putc
122
2
1
2 ..\code\OUTPUT.I
puts
100
2
1
2 ..\code\OUTPUT.I
error
83
5
1
2 ..\code\OUTPUT.I
position
114
3
1
1 ..\code\POSITION.I
add_forw_pos
99
2
1
1 ..\code\POSITION.I
pos_clear
98
2
1
1 ..\code\POSITION.I
PRIM:eof_bell
104
2
1
2 ..\code\PRIM.I
PRIM:forw
95
15
8
12 ..\code\PRIM.I
PRIM:prepaint
94
1
1
1 ..\code\PRIM.I
repaint
93
1
1
1 ..\code\PRIM.I
home
97
1
1
1 ..\code\SCREEN.I
lower_left
127
1
1
1 ..\code\SCREEN.I
bell
116
2
1
2 ..\code\SCREEN.I
vbell
121
2
1
2 ..\code\SCREEN.I
clear
96
1
1
1 ..\code\SCREEN.I
clear_eol
128
1
1
1 ..\code\SCREEN.I
so_enter
89
1
1
1 ..\code\SCREEN.I
so_exit
90
1
1
1 ..\code\SCREEN.I
getc
91
2
1
2 ..\code\TTYIN.I
------------- ----- ------ ----- ----- -----------------2005
IT Classes
Total:
142
93Web-enhanced
82
Average:
4.44 2.91 2.56
Rows in Report: 32
Total number of test paths for all modules
Average number of test
paths for each module
43
Low Complexity Software
• Reliable
– Simple logic
• Low cyclomatic complexity
– Not error-prone
– Easy to test
• Maintainable
– Good structure
• Low essential complexity
– Easy to understand
– Easy to modify
July 2005
Web-enhanced IT Classes
44
Moderately Complex Software
• Unreliable
– Complicated logic
• High cyclomatic complexity
– Error-prone
– Hard to test
• Maintainable
– Can be understood
– Can be modified
– Can be improved
July 2005
Web-enhanced IT Classes
45
Highly Complex Software
• Unreliable
– Error prone
– Very hard to test
• Unmaintainable
– Poor structure
• High essential complexity
– Hard to understand
– Hard to modify
– Hard to improve
July 2005
Web-enhanced IT Classes
46
McCabe QA
McCabe QA measures
software quality with
industry-standard metrics
– Manage technical risk factors as
software is developed and changed
– Improve software quality using detailed
reports and visualization
– Shorten the time
between releases
– Develop contingency
plans to address
unavoidable risks
July 2005
Web-enhanced IT Classes
47
Processing with McCabe Tools
Traditional Procedures
Project Code
BUILD
Level
CM
Compile
& Link
Preprocess
src files
Run
& Test
inst.exe
ClearCase
inst-src
New McCabe’s Procedures
Trace File
Inst-lib.c
src
TEST
Level
*.E
IMPORT
Instrumented src
inst-src; inst-lib.c
Battlemap
PARSE
ANALYSIS
Level
Flowgraphs
Reports
Text
July 2005
Output
Test Plan
Graphics
Web-enhanced IT Classes
Coverage
Analysis
Coverage
Report
48
Project B: Backbone™ Concentration Node
July 2005
Web-enhanced IT Classes
49
Project B: Backbone Concentration Node
• This system has been designed to
support carrier networks. It provides
both services of conventional Layer
2 switches and the routing and
control services of Layer 3 devices.
• Nine protocol-based subtrees of the
code (3400 modules written in the
C programming language for BGP,
DVMRP, Frame Relay, ISIS, IP,
MOSPF, OSPF2, PIM, and PPP
protocols) have been analyzed.
July 2005
Web-enhanced IT Classes
50
Project-B Protocol-Based Code Analysis
• Unreliable modules: 38% of the code modules have
the Cyclomatic Complexity more than 10 (including
592 functions with v > 20);
• Only two code parts (FR, ISIS) are reliable;
• BGP and PIM have the worst characteristics (49% of
the code modules have v > 10);
• 1147 modules (34%) are unreliable and
unmaintainable with v > 10 and ev > 4;
• BGP, DVMRP, and MOSPF are the most unreliable
and unmaintainable (42% modules);
• The Project-B was cancelled.
July 2005
Web-enhanced IT Classes
51
Project-B Code Protocol-Based Analysis
(continue)
• 1066 functions (31%) have the Module Design Complexity more
than 5. The System Integration Complexity is 16026, which is a top
estimation of the number of integration tests;
• Only FR, ISIS, IP, and PPP modules require 4 integration tests per
module. BGP, MOSPF, and PIM have the worst characteristics
(42% of the code modules require more than 7 integration tests per
module);
• B-2.0.0.0int18 Release potentially contains 2920 errors estimated
by the Halstead approach. FR, ISIS, and IP have relatively low
(significantly less than average level of 0.86 error per module) Berror metrics. For BGP, DVMRP, MOSPF, and PIM, the error level is
the highest one (more than one error per module).
July 2005
Web-enhanced IT Classes
52
Comparing Project-B Core Code Releases
•
•
•
•
•
•
•
•
•
•
NEW B-1.3 Release (262 modules) vs. OLD B-1.2 Release (271 modules);
16 modules were deleted (7 with v >10);
7 new modules were added (all with v < 10, ev = 1);
Sixty percent of changes have been made in the code modules with
the parameters of the Cyclomatic Complexity metric more than 20.
63 modules are still unreliable and unmainaitable;
39 out of 70 (56%) modules with v >10 were targeted for changing and
remained unreliable;
7 out of 12 (58%) modules have increased v > 10;
Significant reduction achieved in System Design (S0) and System
Integration Metrics (S1):
S1 from 1126 to 1033; S0 from 1396 to 1294.
New Release potentially contains 187 errors (vs. 206 errors) estimated
by the Halstead approach.
Nevertheless, the Project-B was cancelled.
July 2005
Web-enhanced IT Classes
53
Project C: Broadband Service Node
• Broadband Service Node (BSN)
allows service providers to
aggregate tens of thousands of
subscribers onto one platform and
apply customized IP services to
these subscribers;
• Different networking services [IPVPNs, Firewalls, Network Address
Translations (NAT), IP Quality-ofService (QoS), Web steering, and
others] are provided.
July 2005
Web-enhanced IT Classes
54
Project-C Code Subtrees-Based Analysis
• THREE branches of the Project-C code (Release 2.5int21) have been
analyzed, namely RMC, CT3, and PSP subtrees (23,136 modules);
• 26% of the code modules have the Cyclomatic Complexity more than
10 (including 2,634 functions with v > 20); - unreliable modules!
• All three code parts are approximately at the same level of complexity
(average per module: v = 9.9; ev = 3.89; iv = 5.53).
• 1.167 Million lines of code have been studied (50 lines average per
module);
• 3,852 modules (17%) are unreliable and unmaintainable with v > 10
and ev > 4;
• Estimated number of possible ERRORS is 11,460;
• 128,013 unit tests and 104,880 module integration tests should be
developed to cover all modules of the Project-C code.
July 2005
Web-enhanced IT Classes
55
Project-C Protocol-Based Code Analysis
•
•
•
•
•
•
•
•
•
•
NINE protocol-based areas of the code (2,141 modules) have been analyzed,
namely BGP, FR, IGMP, IP, ISIS, OSPF, PPP, RIP, and SNMP.
130,000 lines of code have been studied.
28% of the code modules have the Cyclomatic Complexity more than 10
(including 272 functions with v > 20); - unreliable modules!
FR & SNMP parts are well designed & programmed with few possible errors.
39% of the BGP and PPP code areas are unreliable (v > 10).
416 modules (19.4%) are unreliable & unmaintainable (v >10 & ev >4).
27.4% of the BGP and IP code areas are unreliable & unmaintainable.
Estimated number of possible ERRORS is 1,272;
12,693 unit tests and 10,561 module integration tests should be developed to
cover NINE protocol-based areas of the Project-C code.
The decision has been made in re-designing the Project-C software and
developing a new system prototype.
July 2005
Web-enhanced IT Classes
56
Correlation between the Number of Error Submits,
the Number of Unreliable Functions (v > 10), and
the Number of Possible Errors for Six Protocols
BGP
400
300
RIP
FR
200
Submits
100
Unreliable
Functions
0
Possible Errors
OSPF
IP
ISIS
July 2005
Web-enhanced IT Classes
57
Correlation between the Number of Customer Reports,
the Number of Unreliable Functions (v > 10), and the
Number of Possible Errors for Five Protocols
BGP
400
300
200
RIP
Customer Reports
FR
100
Unreliable
Functions
0
Possible Errors
OSPF
July 2005
ISIS
Web-enhanced IT Classes
58
The Structured Testing Methodology has done for us:
• Identified complex code areas (high v).
• Identified unreliable & unmaintainable code (v >10 & ev >4).
• Predicted number of code errors and maintenance efforts [Halstead B,
E-, and T-metrics].
• Estimated manpower to develop, test, and maintain the code.
• Developed strategies for unit/module testing, integration testing.
• Provided Test & Code Coverage [paths vs. lines].
• Identified “dead” code areas.
• Improved Software Design and Coding Standards.
• Improved Reengineering Efforts in many other projects.
• Validated Automated Test Effectiveness.
July 2005
Web-enhanced IT Classes
59
Conclusions
• Web-enhanced classes in Networking Technologies
and other related areas provide students with better
instructional support than “traditional” classes;
• Warm-up in-class exercises, homework assignments,
lecture notes, field trips to IT Services, and virtual
labs help students being familiar with modern stateof-the-arts networking technologies;
• Students’ challenge projects and research become
vital components of their active studies at colleges
that help students finding jobs and being promoted in
the networking companies;
• Instructional openness and support become powerful
resource for students in classroom and in their future
professional life.
July 2005
Web-enhanced IT Classes
60