iwsm2014 measuring cosmic software size from functional execution traces of java business...

19
Measuring COSMIC Software Size from Functional Execution Traces of Java Business Applications IWSM Mensura 2014 Muhammet Ali SAĞ & Ayça TARHAN Department of Computer Engineering Hacettepe University, Ankara / Turkey

Category:

Software


0 download

DESCRIPTION

IWSM Presentation

TRANSCRIPT

Page 1: Iwsm2014   measuring cosmic software size from functional execution traces of java business applications (ayça tarhan - sag)

Measuring COSMIC Software Size from Functional

Execution Traces of Java Business Applications

IWSM Mensura 2014

Muhammet Ali SAĞ &

Ayça TARHAN

Department of Computer EngineeringHacettepe University, Ankara / Turkey

Page 2: Iwsm2014   measuring cosmic software size from functional execution traces of java business applications (ayça tarhan - sag)

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

Page 3: Iwsm2014   measuring cosmic software size from functional execution traces of java business applications (ayça tarhan - sag)

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 fromFunctional Execution Traces of Java Business

Applications

Page 4: Iwsm2014   measuring cosmic software size from functional execution traces of java business applications (ayça tarhan - sag)

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 fromFunctional Execution Traces of Java Business

Applications

Page 5: Iwsm2014   measuring cosmic software size from functional execution traces of java business applications (ayça tarhan - sag)

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 fromFunctional Execution Traces of Java Business

Applications

Page 6: Iwsm2014   measuring cosmic software size from functional execution traces of java business applications (ayça tarhan - sag)

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 fromFunctional Execution Traces of Java Business

Applications

Software Code (Source or

Binary)

Traces Output From Execution

Execute

Behavioral Specification

Dynamic Analysis

Page 7: Iwsm2014   measuring cosmic software size from functional execution traces of java business applications (ayça tarhan - sag)

COSMIC Solver – Measurement Process

Measuring COSMIC Software Size fromFunctional 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

Page 8: Iwsm2014   measuring cosmic software size from functional execution traces of java business applications (ayça tarhan - sag)

UML Sequence Diagram

Measuring COSMIC Software Size fromFunctional Execution Traces of Java Business

Applications

Ap

pli

cati

on

bo

un

dar

y

Page 9: Iwsm2014   measuring cosmic software size from functional execution traces of java business applications (ayça tarhan - sag)

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

Page 10: Iwsm2014   measuring cosmic software size from functional execution traces of java business applications (ayça tarhan - sag)

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 fromFunctional 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>(..))

POINTCUT PATTERNS TO CATCH DATA MOVEMENTS

before() : jdbcCall() || jdbcExecution() {[Start:{tag}>] <print signature>}after() : jdbcCall() || jdbcExecution() {[End:{tag}>] <print signature>}

Page 11: Iwsm2014   measuring cosmic software size from functional execution traces of java business applications (ayça tarhan - sag)

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 fromFunctional Execution Traces of Java Business

Applications

Page 12: Iwsm2014   measuring cosmic software size from functional execution traces of java business applications (ayça tarhan - sag)

Example Measurement

Measuring COSMIC Software Size fromFunctional Execution Traces of Java Business

Applications

Page 13: Iwsm2014   measuring cosmic software size from functional execution traces of java business applications (ayça tarhan - sag)

Example Measurement – “Delete”

Measuring COSMIC Software Size fromFunctional Execution Traces of Java Business

Applications

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)

Textual representation

Page 14: Iwsm2014   measuring cosmic software size from functional execution traces of java business applications (ayça tarhan - sag)

Example Measurement - Results

Measuring COSMIC Software Size fromFunctional Execution Traces of Java Business

Applications

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

Difference in Manual Calculation

Page 15: Iwsm2014   measuring cosmic software size from functional execution traces of java business applications (ayça tarhan - sag)

Prototype Demohttp://youtu.be/pPnlR6hCPnc

Measuring COSMIC Software Size fromFunctional Execution Traces of Java Business

Applications

Page 16: Iwsm2014   measuring cosmic software size from functional execution traces of java business applications (ayça tarhan - sag)

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 fromFunctional Execution Traces of Java Business

Applications

Page 17: Iwsm2014   measuring cosmic software size from functional execution traces of java business applications (ayça tarhan - sag)

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 fromFunctional Execution Traces of Java Business

Applications

Page 18: Iwsm2014   measuring cosmic software size from functional execution traces of java business applications (ayça tarhan - sag)

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 fromFunctional Execution Traces of Java Business

Applications

Page 19: Iwsm2014   measuring cosmic software size from functional execution traces of java business applications (ayça tarhan - sag)

Thank you!

Contact:[email protected]

[email protected]