Software sizing the cornerstone for iceaa's scebok - Carol Dekkers
Iwsm2014 measuring cosmic software size from functional execution traces of java business applications (ayça tarhan - sag)
1. IWSM Mensura 2014
Muhammet Ali SAĞ &
Ayça TARHAN
Department of Computer Engineering
Hacettepe University, Ankara / Turkey
2. Functional Size Measurement (FSM)
Measures software size by quantifying its functional
user requirements
Mk II Function Point Analysis (FPA)
International Function Point Users Group (IFPUG) FPA
Common Software Measurement International
Consortium (COSMIC) Measurement Method
Functional software size in Cosmic Function Points (CFP)
Measuring COSMIC Software Size from
Functional Execution Traces of Java Business Applications
3. Study Aim and Scope
Automatic measurement of COSMIC functional size from
source or binary code
via a prototype of a target tool called ‘COSMIC Solver’
Using UML Sequence Diagrams derived from functional
execution traces of Java Business Applications at runtime
Measuring COSMIC Software Size from
Functional Execution Traces of Java Business Applications
4. Why to Automate FSM?
To eliminate the judgment on the part of the measurer
To reduce the cost of measurement
e.g. for building organizational repository of functional software size
To ease instant project management;
by tracking the size of developed functionality and accuracy of the estimation,
especially during the execution of large-scale projects
Measuring COSMIC Software Size from
Functional Execution Traces of Java Business Applications
5. Related Work on FSM Automation
Measurement via mapping of UML (Unified Modeling Language)
diagrams onto COSMIC measurement model
Use-case
Class diagrams
Sequence diagrams
Measurement from source code directly
By static and dynamic analysis
Measurement via mapping of source code to data-flow charts from
where FSM is carried out
Measuring COSMIC Software Size from
Functional Execution Traces of Java Business Applications
6. COSMIC Solver - Method
Catch and tag UML Sequence Diagrams from functional execution traces of use-case
scenarios run in a Java application, with the help of AspectJ technology
Apply COSMIC FSM rules on tagged diagrams to measure the size of the use-case
scenarios run
Measuring COSMIC Software Size from
Functional Execution Traces of Java Business Applications
Software Code
(Source or Binary)
Traces Output
From Execution
Execute
Behavioral
Specification
Dynamic Analysis
7. COSMIC Solver – Measurement Process
Measuring COSMIC Software Size from
Functional Execution Traces of Java Business Applications
Javaagent &
AspectJ pointcuts;
Application software
Mapping Phase Tagged (textual)
sequence diagram
Measurement
Phase
Functional size of the
software in units of CFP
Tracer Component
Cosmic Calculator
Component
8. UML Sequence Diagram
Measuring COSMIC Software Size from
Functional Execution Traces of Java Business Applications
Application boundary
9. Aspect Oriented Programming & AspectJ
Addresses the ‘cross-cutting concerns’ (e.g. security or logging) that
compromise the modularity of Object-Oriented systems
Measuring COSMIC Software Size from
Functional Execution Traces of Java Business Applications
Service a;
Service b;
public void doSomething(){
Instrument.beforeNormalCall();
a.callService();
Instrument.afterNormalCall();
Instrument.beforeNormalCall();
b.callService();
Instrument.afterNormalCall();
}
doSomething();
beforeNormalCall();
afterNormalCall();
callService();
AspectJ: The implementation of AOP in Java environment
10. Tracer Component
Captures all join point executions and calls in order to construct the
structured text representation of a sequence diagram
Measuring COSMIC Software Size from
POINTCUT PATTERNS TO CATCH DATA MOVEMENTS
Functional Execution Traces of Java Business Applications
TAG POINTCUT
SWING: execution(* java.awt.event.ActionListener+.actionPerformed (..))
DIALOG: call(* javax.swing.JComponent+.show*(..))
JDBC: execution(* java.sql.Statement.exec*(..))
call(* java.sql.Statement.exec*(..))
JPA: execution(* java.sql.Connection.prepareStatement(..))
call(* java.sql.Connection.prepareStatement(..))
JAX-RPC: call(* javax.xml.rpc.Service+.createCall(..))
OTHER: execution(* <PackageName>..*(..)) ||
call(* <PackageName>.<methodName>(..))
before() : jdbcCall() || jdbcExecution() {
[Start:{tag}>] <print signature>
}
after() : jdbcCall() || jdbcExecution() {
[End:{tag}>] <print signature>
}
11. Cosmic Calculator Component
Calculates the functional size of the application by applying COSMIC
measurement rules to tagged (textual) UML sequence diagrams
Analyze Candidate FURs (Functional User Requirements)
Identify Application Boundary
Evaluate Functional Processes
Measuring COSMIC Software Size from
Functional Execution Traces of Java Business Applications
13. Example Measurement – “Delete”
Textual representation
Start:SWING>void gui.testGUI2.5.actionPerformed(ActionEvent)
…
Start:>String Model.Model.removePerson(String)
Start:>boolean Data.DataController.deletePerson(Person)
…
Start:JPA>PreparedStatement
java.sql.Connection.prepareStatement(String)
SELECT ID, BORNPLACE, NAME, SURNAME FROM PERSON
WHERE (ID = ?)
End:JPA>PreparedStatement
java.sql.Connection.prepareStatement(String)
Start:JPA>PreparedStatement
java.sql.Connection.prepareStatement(String)
DELETE FROM PERSON WHERE (ID = ?)
End:JPA>PreparedStatement
java.sql.Connection.prepareStatement(String)
…
End:>boolean Data.DataController.deletePerson(Person)
End:>String Model.Model.removePerson(String)
…
End:SWING>void gui.testGUI2.5.actionPerformed(ActionEvent)
Measuring COSMIC Software Size from
Functional Execution Traces of Java Business Applications
14. Example Measurement - Results
Functional Process E R W X Total
Add Person 1 1 1 1 4
Find Person 1 1 - 1 3
Update Person 1 2 1 1 5
Delete Person 1 1 1 1 4
List Person 1 1 - 1 3
Make Payment 1 2 1 1 5
List Payment 1 2 1 1 5
Get Weather Info 1 - - 1 2
Total: 8 10 5 8 31
Functional Process E R W X Total
Make Payment 2 2 1 1 6
Total: 9 10 5 8 32
Measuring COSMIC Software Size from
Functional Execution Traces of Java Business Applications
Difference in Manual Calculation
16. Prototype - Constraints
AspectJ works with Java 1.5+ versions -- previous versions not supported
To handle technologies other than implemented ones, developer should
modify Tracer and Calculator components -- necessity of domain knowledge
Defined constraints for functional size measurement
3-tier application architecture is required
Reporting with multi-level aggregations is not handled
Multi-thread operations are not handled
Caching mechanism of the persistence API must be disabled
Measuring COSMIC Software Size from
Functional Execution Traces of Java Business Applications
17. Prototype - Benefits
Measurement process automation
Measurement from source or binary code at runtime
Minimizing the measurer’s influence on the results
No need for any code additions to the target application
Possibility for customization and extensibility
Likely elimination of effort and cost (e.g., for training people on size
measurement, and for manual size measurement)
Measuring COSMIC Software Size from
Functional Execution Traces of Java Business Applications
18. Future Work
Development of the prototype into a robust tool
Application of a published framework to verify the accuracy
of the results measured by the tool
E.g. Verifying the accuracy of automation tools for the measurement of
COSMIC – ISO 19761 (Soubra et al, 2014)
Conduct of empirical work (e.g. case studies) to evaluate the
usability and usefulness of the tool
Measuring COSMIC Software Size from
Functional Execution Traces of Java Business Applications