The following example shows how the simple “if’
statement is stored to the given structure. Let the
statement that we want to store be the following one.
if (a >= b) //SomeStatement;
Let part “//SomeStatement(s)” represents list of
statements. The graphical representation of the
matching part of the eCST is presented in figure 3.
Figure 3: Simple "if" statement.
Figure 4 illustrates equivalent part of the XML tree.
Figure 4: XML tree representing “if” statement.
“BRANCH_STATEMENT”, “BRANCH” and
“
CONDITION” are imaginary nodes added to achieve
IPL independency. “
BRANCH_STATEMENT”
represents the beginning of the block that contains
“if” branching. It may contain one or more sub-trees
whose root is node named “
BRANCH”. It represents
start of the each branch in the branching block.
Moreover, each sub-tree that contains single branch
may contain sub-tree representing condition. Root of
this sub-tree is “
CONDITION” node.
5 CONCLUSIONS
SM tools are at this moment a weak point in SM
field and their wider application because of the
numerous limitations of available implementations.
In this paper, the most important weaknesses in
this area have been examined and presented together
with possible solutions. In that direction the basic
idea for development of a new SM tool and its
prototype were proposed.
Current prototype works for IPLs Modula-2 and
Java, calculating two characteristic SM (LOC and
CC). It is based on usage of parser generator
producing eCST which is stored in XML structure.
The immediate following task is to add more
IPLs by generating appropriate scanners and parsers.
Similarly much more SM algorithms will be
supported, primarily by adding imaginary nodes.
ACKNOWLEDGEMENTS
We acknowledge support of DAAD (German
Academic Exchange Service), project "Software
Engineering: Computer Science Education and
Research Cooperation" for partial support of the
reported work. We are also grateful to a bilateral
project between Serbia and Slovenia (project no. 27)
that enabled the exchange of visits and ideas with
colleagues of Faculty of Electronics, Computing and
Informatics (Maribor, Slovenia).
REFERENCES
CampwoodSoftware, 2009, Source Monitor,
http://www.campwoodsw.com/sourcemonitor.html
Christodoulakis D.N, Tsalidis C, C.J.M. van Gogh,.
Stinesen V.W, 1989, Towards an automated tool for
Software Certification, , International Workshop on
Tools for Artificial Intelligence,. Architectures,
Languages and Algorithms, IEEE, ISBN: 0-8186-
1984-8, pp. 670-676
CodeSquale, 2009, http://codesquale.googlepages.com/
Geronesoft, 2009, Code Counter Pro
http://www.geronesoft.com/
Kan S., 2003, Metrics and Models in Software Quality
Engineering - Second Edition, Addison-Wesley,
Boston, ISBN 0-201-72915-6
MSquaredTechnologies, 2009, Resource Standard Metrics
– RSM, http://msquaredtechnologies.com/
Parr T., 2007, The Definitive ANTLR Reference - Building
Domain-Specific Languages, The Pragmatic
Bookshelf, USA, ISBN: 0-9787392-5-6
PowerSoftware, 2009, Krakatau Essential PM (KEPM)-
User guide 1.11.0.0, http://www.powersoftware.com/
PowerSoftware, 2009, Krakatau Suite Management
Overview, http://www.powersoftware.com/
ScientificToolworks, 2009, Understand 2.0 User Guide
and Reference Manual March 2008,
http://www.scitools.com
Wheeler D. A., 2009, SLOCCount User's Guide,
http://www.dwheeler.com/sloccount/
ICSOFT 2010 - 5th International Conference on Software and Data Technologies
266