The document discusses software metrics and regression testing. It defines software metrics as quantitative methods for assessing software quality. Metrics can be measured through techniques applied to the software development lifecycle and products. This allows for providing meaningful management information and improving processes. Types of metrics discussed include size, control flow, and data metrics. Regression testing involves re-running existing test suites on modified programs to identify new issues. The document also provides examples of measuring complexity for a sample program using metrics like lines of code, cyclomatic complexity, and Halstead metrics to analyze effort.
Program slicing technique is used for decomposition of a program by analyzing that particular program data
and control flow. The main application of program slicing includes various software engineering activities such as
program debugging, understanding, program maintenance, and testing and complexity measurement. When a slicing
technique gathers information about the data and control flow of the program taking an actual and specific execution
(or set of executions) of it, then it is said to be dynamic slicing, otherwise it is said to be static slicing. Generally,
dynamic slices are smaller than static because the statements of the program that affect by the slicing criterion for a
particular execution are contained by dynamic slicing. This paper reports a new approach of program slicing that is a
mixed approach of static and dynamic slice (S-D slicing) using Object Oriented Concepts in C++ Language that will
reduce the complexity of the program and simplify the program for various software engineering applications like
program debubbing.
Program slicing technique is used for decomposition of a program by analyzing that particular program data
and control flow. The main application of program slicing includes various software engineering activities such as
program debugging, understanding, program maintenance, and testing and complexity measurement. When a slicing
technique gathers information about the data and control flow of the program taking an actual and specific execution
(or set of executions) of it, then it is said to be dynamic slicing, otherwise it is said to be static slicing. Generally,
dynamic slices are smaller than static because the statements of the program that affect by the slicing criterion for a
particular execution are contained by dynamic slicing. This paper reports a new approach of program slicing that is a
mixed approach of static and dynamic slice (S-D slicing) using Object Oriented Concepts in C++ Language that will
reduce the complexity of the program and simplify the program for various software engineering applications like
program debubbing.
In software testing, there are many paths between the entry and exit of a software program. So it’s difficult to fully test all paths of even a simple unit. This is a challenge when we design test cases.
Software analytics focuses on analyzing and modeling a rich source of software data using well-established data analytics techniques in order to glean actionable insights for improving development practices, productivity, and software quality. However, if care is not taken when analyzing and modeling software data, the predictions and insights that are derived from analytical models may be inaccurate and unreliable. The goal of this hands-on tutorial is to guide participants on how to (1) analyze software data using statistical techniques like correlation analysis, hypothesis testing, effect size analysis, and multiple comparisons, (2) develop accurate, reliable, and reproducible analytical models, (3) interpret the models to uncover relationships and insights, and (4) discuss pitfalls associated with analytical techniques including hands-on examples with real software data. R will be the primary programming language. Code samples will be available in a public GitHub repository. Participants will do exercises via either RStudio or Jupyter Notebook through Binder.
How to calculte Cyclomatic Complexity through various methodsharsimratDeo
A brief description about cyclomatic complexity is given.Various methods along with an example is described to calculate it. Advantages and disadvantages are also mentioned.
Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...MLconf
Graph Representation Learning with Deep Embedding Approach:
Graphs are commonly used data structure for representing the real-world relationships, e.g., molecular structure, knowledge graphs, social and communication networks. The effective encoding of graphical information is essential to the success of such applications. In this talk I’ll first describe a general deep learning framework, namely structure2vec, for end to end graph feature representation learning. Then I’ll present the direct application of this model on graph problems on different scales, including community detection and molecule graph classification/regression. We then extend the embedding idea to temporal evolving user-product interaction graph for recommendation. Finally I’ll present our latest work on leveraging the reinforcement learning technique for graph combinatorial optimization, including vertex cover problem for social influence maximization and traveling salesman problem for scheduling management.
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docxshandicollingwood
E2 – Fundamentals, Functions & Arrays
Please refer to announcements for details about this exam. Make sure you fill the information below to avoid not being graded properly;
Last Name
Hanrahan
First Name
Kane
Student ID #
U84918862
Here is the grading matrix where the TA will leave feedback. If you scored 100%, you will most likely not see any feedback
Question
# points
Feedback
Max
Scored
1
Tracing
3
2
Testing
2
3
Refactoring
2
4
Debugging
3
Interlude – How to Trace Recursive Programs
To help you fill the trace table in question #1, we start with an example of a small recursive program & provide you with the trace table we expect you to draw.
Example Program to Trace
This program implements a power function recursively. We do not have local variables in either function, thus making the information in each activation record a bit shorter.
#include
#include
int pwr(int x, int y){
if( y == 0 ) return 1;
if( y == 1 ) return x;
return x * pwr(x, y-1);
}
int main(){
printf("%d to power %d is %d\n", 5, 3, pwr(5,3));
return EXIT_SUCCESS;
}
Example Trace Table
Please note the following about the table below;
We only write down the contents of the stack when it is changed, i.e. when we enter a function or assign a new value to a variable in the current activation record.
When we write the contents of the stack, we write the contents of the whole stack, including previous activation records.
Each activation record is identified by a bold line specifying the name of the function & the parameters passed to it when it was invoked.
It is followed by a bullet list with one item per parameter or local variable.
New activation records are added at the end of the contents of the previous stack
Line #
What happens?
Stack is
10
Entering main function
main’s activation record
No local vars / parameters
11
Invoking function pwr as part of executing the printf
Stack is the same, no need to repeat it
4
Entering pwr function with arguments 5 & 3
main’s activation record
No local vars / parameters
pwr(5,3) activation record
x is 5
y is 3
5
Testing if y is 0
false
6
Testing if y is 1
false
7
Invoking pwr(5,2) as part of return statement
4
Entering pwr function with arguments 5 & 2
main’s activation record
No local vars / parameters
pwr(5,3) activation record
x is 5
y is 3
pwr(5,2) activation record
x is 5
y is 2
5
Testing if y is 0
false
6
Testing if y is 1
false
7
Invoking pwr(5,1)
4
Entering pwr function with arguments 5 & 1
main’s activation record
No local vars / parameters
pwr(5,3) activation record
x is 5
y is 3
pwr(5,2) activation record
x is 5
y is 2
pwr(5,1) activation record
x is 5
y is 1
5
Testing if y is 0
false
6
Testing if y is 1
true
6
Return value x which is 5
7
Back from invocation of pwr(5,1) with result 5.
main’s activation record
No local vars / parameters
pwr(5,3) activation record
x is 5
y is 3
pwr(5,2) activation record
x is 5
y is 2
7
Return the result * x
= 5 * 5
= .
In software testing, there are many paths between the entry and exit of a software program. So it’s difficult to fully test all paths of even a simple unit. This is a challenge when we design test cases.
Software analytics focuses on analyzing and modeling a rich source of software data using well-established data analytics techniques in order to glean actionable insights for improving development practices, productivity, and software quality. However, if care is not taken when analyzing and modeling software data, the predictions and insights that are derived from analytical models may be inaccurate and unreliable. The goal of this hands-on tutorial is to guide participants on how to (1) analyze software data using statistical techniques like correlation analysis, hypothesis testing, effect size analysis, and multiple comparisons, (2) develop accurate, reliable, and reproducible analytical models, (3) interpret the models to uncover relationships and insights, and (4) discuss pitfalls associated with analytical techniques including hands-on examples with real software data. R will be the primary programming language. Code samples will be available in a public GitHub repository. Participants will do exercises via either RStudio or Jupyter Notebook through Binder.
How to calculte Cyclomatic Complexity through various methodsharsimratDeo
A brief description about cyclomatic complexity is given.Various methods along with an example is described to calculate it. Advantages and disadvantages are also mentioned.
Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...MLconf
Graph Representation Learning with Deep Embedding Approach:
Graphs are commonly used data structure for representing the real-world relationships, e.g., molecular structure, knowledge graphs, social and communication networks. The effective encoding of graphical information is essential to the success of such applications. In this talk I’ll first describe a general deep learning framework, namely structure2vec, for end to end graph feature representation learning. Then I’ll present the direct application of this model on graph problems on different scales, including community detection and molecule graph classification/regression. We then extend the embedding idea to temporal evolving user-product interaction graph for recommendation. Finally I’ll present our latest work on leveraging the reinforcement learning technique for graph combinatorial optimization, including vertex cover problem for social influence maximization and traveling salesman problem for scheduling management.
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docxshandicollingwood
E2 – Fundamentals, Functions & Arrays
Please refer to announcements for details about this exam. Make sure you fill the information below to avoid not being graded properly;
Last Name
Hanrahan
First Name
Kane
Student ID #
U84918862
Here is the grading matrix where the TA will leave feedback. If you scored 100%, you will most likely not see any feedback
Question
# points
Feedback
Max
Scored
1
Tracing
3
2
Testing
2
3
Refactoring
2
4
Debugging
3
Interlude – How to Trace Recursive Programs
To help you fill the trace table in question #1, we start with an example of a small recursive program & provide you with the trace table we expect you to draw.
Example Program to Trace
This program implements a power function recursively. We do not have local variables in either function, thus making the information in each activation record a bit shorter.
#include
#include
int pwr(int x, int y){
if( y == 0 ) return 1;
if( y == 1 ) return x;
return x * pwr(x, y-1);
}
int main(){
printf("%d to power %d is %d\n", 5, 3, pwr(5,3));
return EXIT_SUCCESS;
}
Example Trace Table
Please note the following about the table below;
We only write down the contents of the stack when it is changed, i.e. when we enter a function or assign a new value to a variable in the current activation record.
When we write the contents of the stack, we write the contents of the whole stack, including previous activation records.
Each activation record is identified by a bold line specifying the name of the function & the parameters passed to it when it was invoked.
It is followed by a bullet list with one item per parameter or local variable.
New activation records are added at the end of the contents of the previous stack
Line #
What happens?
Stack is
10
Entering main function
main’s activation record
No local vars / parameters
11
Invoking function pwr as part of executing the printf
Stack is the same, no need to repeat it
4
Entering pwr function with arguments 5 & 3
main’s activation record
No local vars / parameters
pwr(5,3) activation record
x is 5
y is 3
5
Testing if y is 0
false
6
Testing if y is 1
false
7
Invoking pwr(5,2) as part of return statement
4
Entering pwr function with arguments 5 & 2
main’s activation record
No local vars / parameters
pwr(5,3) activation record
x is 5
y is 3
pwr(5,2) activation record
x is 5
y is 2
5
Testing if y is 0
false
6
Testing if y is 1
false
7
Invoking pwr(5,1)
4
Entering pwr function with arguments 5 & 1
main’s activation record
No local vars / parameters
pwr(5,3) activation record
x is 5
y is 3
pwr(5,2) activation record
x is 5
y is 2
pwr(5,1) activation record
x is 5
y is 1
5
Testing if y is 0
false
6
Testing if y is 1
true
6
Return value x which is 5
7
Back from invocation of pwr(5,1) with result 5.
main’s activation record
No local vars / parameters
pwr(5,3) activation record
x is 5
y is 3
pwr(5,2) activation record
x is 5
y is 2
7
Return the result * x
= 5 * 5
= .
Saudi Arabia stands as a titan in the global energy landscape, renowned for its abundant oil and gas resources. It's the largest exporter of petroleum and holds some of the world's most significant reserves. Let's delve into the top 10 oil and gas projects shaping Saudi Arabia's energy future in 2024.
Water scarcity is the lack of fresh water resources to meet the standard water demand. There are two type of water scarcity. One is physical. The other is economic water scarcity.
Hierarchical Digital Twin of a Naval Power SystemKerry Sado
A hierarchical digital twin of a Naval DC power system has been developed and experimentally verified. Similar to other state-of-the-art digital twins, this technology creates a digital replica of the physical system executed in real-time or faster, which can modify hardware controls. However, its advantage stems from distributing computational efforts by utilizing a hierarchical structure composed of lower-level digital twin blocks and a higher-level system digital twin. Each digital twin block is associated with a physical subsystem of the hardware and communicates with a singular system digital twin, which creates a system-level response. By extracting information from each level of the hierarchy, power system controls of the hardware were reconfigured autonomously. This hierarchical digital twin development offers several advantages over other digital twins, particularly in the field of naval power systems. The hierarchical structure allows for greater computational efficiency and scalability while the ability to autonomously reconfigure hardware controls offers increased flexibility and responsiveness. The hierarchical decomposition and models utilized were well aligned with the physical twin, as indicated by the maximum deviations between the developed digital twin hierarchy and the hardware.
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...Amil Baba Dawood bangali
Contact with Dawood Bhai Just call on +92322-6382012 and we'll help you. We'll solve all your problems within 12 to 24 hours and with 101% guarantee and with astrology systematic. If you want to take any personal or professional advice then also you can call us on +92322-6382012 , ONLINE LOVE PROBLEM & Other all types of Daily Life Problem's.Then CALL or WHATSAPP us on +92322-6382012 and Get all these problems solutions here by Amil Baba DAWOOD BANGALI
#vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore#blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #blackmagicforlove #blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #Amilbabainuk #amilbabainspain #amilbabaindubai #Amilbabainnorway #amilbabainkrachi #amilbabainlahore #amilbabaingujranwalan #amilbabainislamabad
Overview of the fundamental roles in Hydropower generation and the components involved in wider Electrical Engineering.
This paper presents the design and construction of hydroelectric dams from the hydrologist’s survey of the valley before construction, all aspects and involved disciplines, fluid dynamics, structural engineering, generation and mains frequency regulation to the very transmission of power through the network in the United Kingdom.
Author: Robbie Edward Sayers
Collaborators and co editors: Charlie Sims and Connor Healey.
(C) 2024 Robbie E. Sayers
Welcome to WIPAC Monthly the magazine brought to you by the LinkedIn Group Water Industry Process Automation & Control.
In this month's edition, along with this month's industry news to celebrate the 13 years since the group was created we have articles including
A case study of the used of Advanced Process Control at the Wastewater Treatment works at Lleida in Spain
A look back on an article on smart wastewater networks in order to see how the industry has measured up in the interim around the adoption of Digital Transformation in the Water Industry.
2. SW Metrics
SW metrics provide quantitative methods for
assessing the software quality.
“You cannot control what you cannot measure”
“The continuous application of measurement
based techniques to the SDLC and its products to
supply meaningful and timely management
information, together with the use of those
techniques to improve that process and its
products “
3. Measured through SW Metrics techniques
If measured, its likely to reduce
Time Spent
Cost
in Testing Phase.
Improves Quality of the Software
Types - Size, Control Flow and Data Metrics
SW Maintenance requires SW complexity measurement to
identify degrees to which characteristics that hamper SW
Maintenance are present.
SW Complexity
4. Regression testing is done after modification is
made in the implemented program.
Existing test suites are re-run on modified
program to identify if new modification has
effected existing functionality.
Writing new test cases to ensure adequate
coverage.
Regression Testing
6. Structural testing criteria depends on internal
structure of the program implementation to derive
testing criteria.
Require all possible execution paths identification
to develop test cases.
Tester determines Test Coverage.
Change in Implementation leads to change in test
cases.
Program Characteristics
7. • Requires the execution of components
(blocks) of the program under test in
condition of subsequent elements of CFG
• Nodes, Edges and Paths
Control Flow
Graph[CFG]
• Requires execution of all independent paths
of the program
MaCabe’s
Complexity
Concept
• Both Data Flow and Control Flow
information are used to perform testing
Data Flow
Program Characteristics
8. Complexity is measure of Code Quality
Requires model to convert internal quality
attributes to code reliability
High degree of complexity is bad and vice versa
Various internal code attributes are used to
indirectly assess code quality
Enables tester to count acyclic execution paths
through fragment(function, subroutine, object,
class)
LOC, NPATH, McCabe’s Cyclomatic Complexity
number, Data Quality, Halstead SW Science
SW Complexity ( Re-visited)
9. Static Metrics
• Obtainable at early
Phases of SDLC
• Does not deal with OO
features and real time
systems
• Easy to gather
• Estimate amount of
effort to develop and
maintain code
Dynamic Metrics
• Late stage of SW
development
• Supports all OO
features and real time
systems
• Capture dynamic
behavior of the system
• Hard to obtain and
obtained from traces
of the code
SW Complexity metrics Classification
11. A path is feasible if there is input datum to these
paths.
Predicate is considered as simple Boolean form in
condition.
Path containing lower number of Predicates than it
has higher probability of being feasible.
If A1 are paths through a code module, suppose that
A1 consists of Pred1 > 0 predicates and A2 consists of
Pred2 > Pred1, then A1 is likely to be more feasible.
Feasibility & Predicates
12. Halstead Method measures number of operators and the number of
operands and their respective occurrence in the program.
n1 = number of Unique Operators
n2 = number of Unique Operands
N1 = total number of Operators
N2 = total number of Operands
Length (N) =N1+N2
Vocabulary (n) =n1+n2
Volume of a Program (V) =N*log2n
Potential Volume (V*) = (2+n2) log2 (2+n2)
Program Level (L) =L=V*/V
Program Difficulty (D) =1/L
Estimated Program Length (N) =n1log2n1+n2log2n2
Estimated Program Level (L) =2n2/ (n1N2)
Estimated Difficulty (D) =1/L=n1N2/2n2
Effort (E) =V/L=V*D= (n1 x N2) / 2n2
Halstead Metrics
13. #include<stdio.h>
void main()
1{
1 int a,b,c,n;
1 scanf(“%d %d”, & a,&b);
2 if (a < b)
2 {
3 c = a;
3 }
4 if(c= =b)
4 {
5 c= a+1;
5 }
5 else
5 {
6 c=b;
7 if (c==b)
7 {
8 c=b+1;
8 }
8 }
9 n = c;
10 while ( n < 8 )
10 {
11 if ( b > c )
11 {
12 c = 2;
12 }
12 else
12 {
13 n = n + c +7;
14 }
14 n = n + 1;
14 }
15 printf(“%d%d%d”,a,b, n);
15}
#include< stdio.h>
void main()
1{
1 int a,b,c,n;
1 scanf (“%d%d”, &a,&b);
2 if ( a < b)
2 {
3 c = a;
3 }
4 if(c= =b)
4 {
5 c= =a+1;
5 }
5 else
5 {
6 c= a - 1;
6 }
6 else
6 {
7 c=b;
8 if (c= = b)
8 {
9 c = b + 1;
9 }
9 else
9 {
10 c = b – 1;
10 }
11 n = c;
12 while (n<=8)
12 {
13 if (b>c)
13 {
14 c = 2;
14 }
14 else
14 {
15 n = n+c+7;
15 }
16 n = n+1;
16 }
17 printf(“%d%d%d”,a,b, n);
Example
16. All the complexity weights for all paths of old and new version
of Program P and P’ are evaluated
Number of Predicates in each path help tester to identify
feasible and infeasible paths and subsequently ease of test data
generation.
P4, P 5, P9 have higher number of probability of being feasible
among all paths in Table 1 and P5,P6 and P12 in Table 2.
With above analysis between P and P’ change of code
performance is identified and tester can use this approach to
execute test case.
SW Quality and productivity can be improved.
Conclusion
17. Static and dynamic software metrics complexity analysis in regression
testing
Debbarma, M.K. ; Kar, N. ; Saha, A. Computer Communication and Informatics
(ICCCI), 2012 International Conference on
Digital Object Identifier: 10.1109/ICCCI.2012.6158825
Publication Year: 2012 , Page(s): 1 - 6
Metric Attitude
Risi, M. ; Scanniello, G. ; Tortora, G. Software Maintenance and Reengineering
(CSMR), 2013 17th European Conference on
Digital Object Identifier: 10.1109/CSMR.2013.59
Publication Year: 2013 , Page(s): 405 - 408
References