International Conference on Innovations in Power and Advanced Computing Technologies [i-PACT2017]
An Assessment Framework of Routing Complexities using LOC Metrics Aswini S
Yazhini M
School of Information Technology and Engineering, VIT University, Vellore, India.
[email protected]
School of Information Technology and Engineering, VIT University, Vellore, India.
[email protected]
Abstract—Size plays a vital role in the software product or project. Lines of Code (LOC) or Source Lines of Code (SLOC) is the most important activities in the software metrics. LOC is used to measure the size of the program or size of the project or size of the text in the coding. Based on the effort we can maintain the system and it associated to the technical quality of that system. Calculated the effort in the system is difficult and challenging task for developer. We have discussed about the new trends of the Lines of Code (LOC).And further, this paper surveys on Impact of LOC on Complexity and we have also discussed about the need of LOC. Herewith we included the tools to find LOC of Routing Algorithm and compared LOC of Routing Algorithm between the tools. Keywords-component; Lines of Code, Complexity, Routing.
I.
INTRODUCTION
To measure the size of the code by means of counting the lines in the program’s source code LOC [1][3][6][9] is used. We can also call Lines of code (LOC) as Source lines of code (SLOC). LOC determines the complexity of the project. If the size of the project increased, it increases the complexity of the project. SLOC is the metric used to measure the length of the project or program by adding the number of instructions in the residential program. Observably, counting the number of instructions, lines used for comment the code and the header lines are unnoticed. One should make a systematic guess in order to calculate the LOC count at the start of a project or program. Therefore some project or programs are broken into several modules and several sub modules it can be approximately calculated. LOC is used to calculate only the volume of the program and it is used to compare or estimate programs which are in the same language and code in the program also in that same language and coding standards. To change the standards we have to change the volume of code. By measuring the complexity of the software or project we can compare without any observe to direct volume. Lines of code can be defined either by Physical LOC or Logical SLOC. LOC – Total Number of Lines of Code. SLOC – Total Number Source Lines of Code (without comment lines and header lines). Both are used to measure program size by counting number of lines in the program. The problem arises to find out the complexity of the program. To find out the complexity we have to measure program complex. Complexity is the ratio of
978-1-5090-5681-1 /17/$31.00 ©2017 IEEE
the resources usage that is expanded but the system while executing a program. A packet has to reach from source to destination by paths either it may be single or multiple path. A router is used to find the shortest and best path in multiple paths. Distance vector algorithm uses the directions and distance to find the best path to achieve the destination. Broadcast algorithm delivers the packet sends from source to all other nodes in a network. Multicast algorithms deliver a packet from source to all other subset nodes of a network. Link state algorithm used in real time networks.it is also called as shortest path first algorithms. It uses the shortest path to reach the destination. Dijkstra’s algorithm is for finding the shortest paths between nodes in a graph. This paper illustrates impact of LOC in complexity. SLOC typically used to predict amount of effort required to develop and estimation of programming productivity or complexity. In this paper we described the three open source software such as LOC metrics, Linetally, Universal code line counter. We explain the brief description of these tools. We plot the 2D and 3D for routing algorithms in C, C++ and java using octave tool. In Section II explained about the LOC Metrics and complexity. Tools are explained in section III .here based on complexity we discussed the evaluation of various routing algorithm and also measure the LOC in three different tools. And the same is plotted and discussed in section IV and we presented issues and future work in Section V Finally conclusion in Section VI. II.
LOC METRICS
Traces of code are for executable statements. It's miles be counted to guidance statements. Traces of code also represent the complexity. A way to measure the scale of a software program undertaking or software program machine is the biggest problem. The quantity of lines of code (LOC) has long been used for this reason. we can see Complexity is everywhere in the software program life cycle like requirements phase, evaluation, layout section, and of direction, implementation segment .It is straightforward to use and scope for automation counting. Total LOC Source LOC
= Physical LOC = Total LOC – (CLOC + BLOC)
Logical LOC
= No. of logics & its relevant statements
1
International Conference on Innovations in Power and Advanced Computing Technologies [i-PACT2017] A. Complexity by Size When complexity is increases the size of the program or project is increases meanwhile when the size of the project is decreases then the complexity is decreases. For instance, if the customer in the super market is increases then the maintaining the market and increasing customer’s wishes then complexity of the product also increasing. For Better calculation use the good or suitable metrics and tools. When the size and complexity of the project is increases away from manageable. This leads to be more and more functionality used in the coding section. Therefore the size of the program is an important complexity factor. B. Complexity by Error rates Complex lines of code [20]. [23], [25] in the project or program is much bigger than the simple code. And therefore they have more chance for omissions of code, accidents, syntax mistake and demonstration of code errors. Complex code is very difficult to test and therefore in many cases partial code will be done or untested some part of the code. Complex systems are also harder to design and implement it. Complex system will be secure less. Usage of Complex code rather than simpler code leads to increasing in error rate, harder to develop, test, implement and configure project or program. For complex metrics there are three types at four different level of analysis. This categorization can yield four independent metrics the standard size of the subprograms within each program, the standard size of the programs which comprise that system, and two measures of control-structure difficulty which have been normalize for size. In business situations, program size is to a great extent a programming choice. A business application framework will regularly comprise of anywhere in the range of many thousands to a great many lines of code, isolated into countless projects and subprograms, and a support or upgrade venture will ordinarily influence large portions of these programs in the meantime. The trouble of such a venture will depend to a degree on the span of these projects. In the event that a framework is isolated into excessively numerous little projects, even a minor adjustment or redesigning may compel support developers to work with countless, including an extensive overhead cost for every program that must be grasped and adjusted. In the event that framework is separated into excessively few programs, every program will be huge and complex and hard to grasp. C. Complexity by cost Cost estimation plays a vital role in increase complexity of the project. LOC will be known only after the implementation stage before that we can predict but cannot say accurately. Hence cost estimation models are used in requirement stage to predict the cost which in turn alters the size of the project. The exact LOC as a measurement measure of an application method is simplest identified after its programming is accomplished or completed the implementation segment. Consequently, it is mandatory to be estimated from necessities of software at an early segment of the development. As a result, the applicability of present LOC
headquartered program price estimation models like COCOMO relies on the accuracy of early dimension estimation. 1) Cyclomatic Complexity Greater the complexity increases the fault prone of the system which results in increase Software cost. Most of the effort is go vain in identifying technique to estimate software complexity. But in Cyclomatic complexity (CC) flow graph is used to measure the complexity. On cost estimation systems, measure metric is utilized as a basic contribution for the greater part of cost estimation models. COCOMO, SLIM, all use SLOC and different functionality situated units use operate facets units as size input. Existing application size items or complexity, estimate the scale of an implementation in most cases in phrases of number of strains of code. 2) The Constructive Cost Model COCOMO is an algorithmic technique for estimation of exertion which takes KLOC as info. Boehm's COCOMO I and II; Albrecht's Function Point; and Putnam's SLIM .These models require inputs, exact of particular characteristics, such as source line of code (SLOC), number of user screen, intricacy which are difficult to get in the early period of improvement of programming. COCOMO depicts the item into three categories which is primarily used to calculate effort. Categories the product into organic, semi-detached, embedded. Organic which is little in size and incorporates less LOC, experienced staff, and less multifaceted nature, Semidetached which incorporates experienced, unpracticed staff, and Embedded. III.
CODE METRIC TOOLS
A. LOC Metric LOC metrics is a tool used to measure the lines of code such as total Lines of Code (LOC), Blank Lines of Code (BLOC), Comment Lines of Code (CLOC), McCabe VG complexity (MVG), etc. It supports the files like C++, C, Java, CS, and SQL. In this LOC Metrics we implemented Routing algorithm such as Broad Cast, Dijkstra, Distance Vector, Flood Fill, Link State Route and Multicast are compiled in JAVA, C, C++. The source files, Directories, LOC, BLOC, SLOC, McCabe VG Complexity, HCLOC of the Routing Algorithm are mentioned in the Fig 1. B. Linetally Linetally is a application of open source software which allows the programmer to find out the LOC in the source file. It supports the 31 programming language like visual basic, B++,C++,C#,AWK, Coldfusion, XML, python, TCL, etc. In this LINETALLY we implemented Routing algorithm such as Broad Cast, Dijikstra, Distance Vector, Flood Fill, Link State Route and Multicast are compiled in JAVA, C, C++. The Code Line, Comment Line, Mixed Line, Blank Line and Total Line of the Routing Algorithm.
2
International Conference on Innovations in Power and Advanced Computing Technologies [i-PACT2017] C. Universal Code Line Counter Universal code line counter is the easiest and fastest tool which used to count the LOC. It supports the languages like Prolog, Python, ASP, COBOL, HTML, XML, MQL, CSS, Ruby, etc. It is an integrated help system. Programs are automatically updated so that it reduces the tasks of users. For any queries or problems, email is available. It is a free of costs for updates. In this Universal code line counter we implemented Routing algorithm such as Broad Cast, Dijkstra, Distance Vector, Flood Fill, Link State Route and Multicast are compiled in JAVA, C, C++. In Fig. 1, Fig. 2 and Fig. 3, we have implemented C, C++ and JAVA language for various routing algorithms and the same is represented in the following Pie Charts.
LOC metrics and universal code line counter supports the multi programs in a single execution but Linetally execute a program in single execution. Linetally has the special feature to count non-predefined languages that included by the user. There will be a graphical representation (pie chart and torus chart) and detailed report (table) in universal code line counter. This feature is not available in LOC metrics and Linetally. IV.
Using octave tools, we plot the 2-Dimension and 3Dimension of various routing algorithm such as broadcast, link state vector, distance vector, flow based, multicast, Dijkstra, flood fill in C, C++ and JAVA languages. TABLE I.
Figure 1. Routing chart using C.
Figure 2. Routing chart using C++.
RESULT ANALYSIS
ROUTING ANALYSIS USING LOC METRICS.
Alg.
A1
A2
A3
A4
A5
Lang
Broadcast
21
5
13
0
3
C
Dijkstra
141
141
0
0
0
C
Distance vector
139
125
0
0
14
C
Flow based
70
63
0
7
0
C
Flood fill
307
172
97
0
38
C
Broadcast
39
37
0
0
2
C++
Dijkstra
105
63
26
1
15
C++
Distance vector
83
71
0
0
12
C++
Flow based
83
71
0
0
12
C++
Flood fill
126
74
12
30
10
C++
Broadcast
48
45
0
0
3
JAVA
Dijkstra
49
43
1
4
1
JAVA
Distance vector
84
55
9
1
19
JAVA
Flow based
69
32
19
1
17
JAVA
Flood Fill
84
55
9
1
19
JAVA
A1-TLOC; A2-SLOC; A3-CLOC; A4-MLOC; A5-BLOC;
Figure 3. Routing chart using JAVA. Figure 4. Routing graph of C Language.
Linetally and Universal code line counter measures the mixed lines count whereas LOC metrics is not applicable.
3
International Conference on Innovations in Power and Advanced Computing Technologies [i-PACT2017]
Figure 5. Routing graph of C++ Language.
Figure 9. 3D view of Routing LOC - JAVA Language.
V.
Figure 6. Routing graph of JAVA Language.
OPEN ISSUES AND FUTURE SCOPE
Depends on the facts or events of the programmer, the logic of the code varies from one another. Therefore the lines of code varies from one another and also a well-known programmer may produce the logic in less LOC whereas the other gives more SLOC even they did in similar language. Even the programs lines of code are similar; the logic varies like complex and simple. Logic with more complexity has to be provided with higher effort than the simpler one. Productivity of code is measured by LOC. Code with more or huge LOC need not be standard as well as the efficient. Fewer LOC has to be drafted to get the result of more productivity and less complexity. VI.
Figure 7. 3D view of Routing LOC - C Language.
CONCLUSION
Software complexity as well as the costs of the projects in software increases if and only if LOC increases. The error level is high whenever the LOC increases. The performance, the efficiency and the effort increases whenever the LOC increases. The LOC is given as the input in the models called COCOMO and SLIM. For calculating the metrics SLOC metrics is used. There are some controls or constraints for the SLOC metric which makes unprotected while depending on it. We can easily measure the LOC by using the tools in software metrics. Size will be taken as the input in many cases and also be counted in LOC, FP, and class point. In these we have implemented Routing algorithm in different tools it shows different lines of code, even though it has a similar program coding. From the result shown in Table1 it is very clear that language complexity of the various routing algorithm is high in C, C++ whereas in Java it is similar to all the algorithms. ACKNOWLEDGMENT
Figure 8. 3D view Routing LOC - C++ Language.
We are thankful to Prof. Chandrasegar Thirumalai for providing an opportunity to write this paper and for guiding through every step from the beginning. We always got continuous motivation and support from sir.
4
International Conference on Innovations in Power and Advanced Computing Technologies [i-PACT2017] REFERENCES [1] Sonam Bhatia ,Dr. Jyoteesh Malhotra” A Survey on Impact of SLines of Code On Software Complexity”, Proc. IEEE Int. Conf. Commun. (ICC),August 2014. [2] Rajib Mall, “Fundamentals of Software Engineering”, 2009. [3] Shalley Sharma, Arvind Kalia, “ Empirical Investatigation of the Effect of the LOC Function Point In Embedded”, an International Journal of Engineering Sciences ISSN: 2229 6913, Vol. 4 Issue Sept 2011. [4] Ilja Heitlager, Tobias Kui pers, Joost Visser, “Practical Model for Measuring Maintainability”, 2007. [5] Chandrasegar Thirumalai, Viswanathan P, “Diophantine based Asymmetric Cryptomata for Cloud Confidentiality and Blind Signature applications,” JISA, Elsevier, 2017. [6] Vu Nguyen, Sophia Deeds- Rubin*, Thomas Tan, Barry Boehm11, “A SLOC Counting Standard”, 2007. [7] Sou my abrata Mukherjee, Bishnubhrata,Suvajit Mandal, “A Survey on metrics, models & tools of software cost estimation”, International Journal of Advanced Research in Computer Engineering & Technology, Volume 2, Issue 9, September 2013. [8] Chandrasegar Thirumalai, Rashad Manzoor, “Cost Optimization using Normal Linear Regression Method for Breast Cancer Type I Skin,” IEEE IPACT 2017. [9] Joseph K. Kearney, Robert L Sedlmeyer, William B Thompson, Michael A Gray, Mich e A Adler , “ Software Complexity Measurement”, Communications of the ACM Volume 29, November 1986. [10] Geetika Batra, Kuntal Barua, “A Review on Cost and Effort Estimation Approach for Software Development”, International Journal Of Engineering and Innovative Technology Volume l3, Issue 4, October 2013. [11] Chandrasegar Thirumalai, “Review on the memory efficient RSA variants,” International Journal of Pharmacy and Technology, Vol. 8 Issue 4, Dec. 2016, pp. 4907-4916. [12] Klaus Pohl, Günter Böckle, Frank J .van de Linden, “Software Product Line Engineering: Foundations, Principles and Techniques”, SpringerVerlag New York, Inc. Secaucus, NJ, USA, 2005. [13] Rajiv D. Banker,Srikant M. Datar Dani Maintainability, ICIS '89 of the tenth International conference on Information Systems,1989. [14] Graylin Jay, Joanne E.Hale, Randy K. Smithi, David Hale, Nicholas A Krafti , Charles Ward, “Cyclomatic Complexity and Lines of Code: Empirical Evidence of a Stable Linear Relationship,” Journal of Software Engineering and Applications, Vol. 2 No. 3, 2009. [15] Chandrasegar Thirumalai, Himanshu Kar, “Memory Efficient Multi Key (MEMK) generation scheme for secure transportation of sensitive data over Cloud and IoT devices,” IEEE IPACT 2017. [16] Iman Attarzadeh, Siew Hock Ow, “Improving Estimation Accuracy of the COCOMO II Using an Adaptive Fuzzy Logic Model”, IEEE International Conference on Fuzz Systems Taipei, Taiwan June 27-30, 2011 . [17] Vinothini S, Chandra Segar Thirumalai, Vijayaragavan R, “Analyzing the performance of AFRA with its traditional routing,” IRJET, Vol. 2 No. 2, May 2015, pp.373-382 [18] Chandrasegar Thirumalai, Senthilkumar M, Vaishnavi B, “Physicians Medicament using Linear Public Key Crypto System,” in International conference on Electrical, Electronics, and Optimization Techniques, ICEEOT, IEEE & 978-1-4673-9939-5, March 2016. [19] P. Dhavachelvan, Chandra Segar T, K. Satheskumar, "Evaluation of SOA Complexity Metrics Using Weyuker’s Axioms," IEEE International Advance Computing (IACC), India, pp. 2325 – 2329, March 2009 [20] F. Fioravanti, P. Nesi, “A method and tool for assessing object-oriented projects and metrics management,” Journal of Systems and Software, Volume 53, Issue 2, 31 August 2000, Pages 111-136 [21] Chandrasegar Thirumalai, “Physicians Drug encoding system using an Efficient and Secured Linear Public Key Cryptosystem (ESLPKC),” International journal of pharmacy and technology, Vol. 8 Issue 3, Sep. 2016, pp. 16296-16303 [22] Software metric Numerical Data analysis using Box plot and control chart methods, VIT University, DOI:10.13140/RG.2.2.27422.95041 [23] Chandrasegar Thirumalai, Senthilkumar M, “Secured E-Mail System using Base 128 Encoding Scheme,” International journal of pharmacy and technology, Vol. 8 Issue 4, Dec. 2016, pp. 21797-21806.
[24] Halstead Metric for Intelligence, Effort, Time predictions, DOI:10.13140/RG.2.2.17988.42881 [25] Chandrasegar Thirumalai, Senthilkumar M, “Spanning Tree approach for Error Detection and Correction,” IJPT, Vol. 8, Issue No. 4, Dec-2016, pp. 5009-5020 [26] Vaishnavi B, Karthikeyan J, Kiran Yarrakula, Chandrasegar Thirumalai, “An Assessment Framework for Precipitation Decision Making Using AHP”, International Conference on Electronics and Communication Systems (ICECS), IEEE & 978-1-4673-7832-1, Feb. 2016 [27] E Malathy, Chandra Segar Thirumalai, "Review on non-linear set associative cache design," IJPT, Dec-2016, Vol. 8, Issue No.4, pp. 53205330 [28] Chandrasegar Thirumalai, Sathish Shanmugam, “Multi-key distribution scheme using Diophantine form for secure IoT communications,” IEEE IPACT 2017. [29] Rashad Manzoor, Chandrasegar Thirumalai, “Analysing the Breast Cancer Tissue using Semi-Supervised Learning And Similarity Measure,” IEEE IPACT 2017. [30] Chandrasegar Thirumalai, Senthilkumar M, “An Assessment Framework of Intuitionistic Fuzzy Network for C2B Decision Making”, International Conference on Electronics and Communication Systems (ICECS), IEEE & 978-1-4673-7832-1, Feb. 2016 [31] M.Senthilkumar, T.Chandrasegar, M.K. Nallakaruppan, S.Prasanna, “A Modified and Efficient Genetic Algorithm to Address a Travelling Salesman Problem,” in International Journal of Applied Engineering Research, Vol. 9 No. 10, 2014, pp. 1279-1288 [32] Nallakaruppan, M.K., Senthil Kumar, M., Chandrasegar, T., Suraj, K.A., Magesh, G., “Accident avoidance in railway tracks using Adhoc wireless networks,” 2014, International Journal of Applied Engineering Research, 9 (21), pp. 9551-9556. [33] Chandrasegar Thirumalai, Senthilkumar M, Silambarasan R, Carlos Becker Westphall, “Analyzing the strength of Pell’s RSA,” IJPT, Vol. 8 Issue 4, Dec. 2016, pp. 21869-21874. [34] Chandramowliswaran N, Srinivasan.S and Chandra Segar T, “A Novel scheme for Secured Associative Mapping” The International J. of Computer Science and Applications (TIJCSA) & India, TIJCSA Publishers & 2278-1080, Vol. 1, No 5 / pp. 1-7 / July 2012 [35] Vinothini S, Chandra Segar Thirumalai, Vijayaragavan R, Senthil Kumar M, “A Cubic based Set Associative Cache encoded mapping,” International Research Journal of Engineering and Technology (IRJET), Volume: 02 Issue: 02 May -2015 [36] Chandramowliswaran N, Srinivasan.S and Chandra Segar.T, “A Note on Linear based Set Associative Cache address System” International J. on Computer Science and Engg. (IJCSE) & India, Engineering Journals & 0975-3397, Vol. 4 No. 08 / pp. 1383-1386 / Aug. 2012.
Aswini S currently pursuing M.Tech (Software Engineering) at VIT University, Vellore Campus Vellore, India.
Yazhini M currently pursuing M.S (Software Engineering) at VIT University, Vellore Campus, Vellore, India.
5