Abstract: A system (2) for refactoring a block of software (4) includes an analyzer (14) for receiving a set of workflows (6) via a user interface (8) and adapted to analyze each of the workflows (34) one at a time to determine a set of refactoring opportunity (32), the user interface (8) adapted to transfer the set of workflows (6) from a user (10) to the analyzer (14) and to transfer a set of refactoring opportunity (32) from the analyzer (14) to said user (10) after said analysis of said set of workflows (6). The system also includes set of refactoring opportunity (12) into a step-wise arrangement (36) of implementation of said set of refactoring opportunity (12) on said block of software (4), an implementation device (20) for implementing said set of refactoring opportunity (32) on said block of software (4) to produce a refactored block of software (22) and over a design (18) associated to said block of software (4) to produce a refactored design (24) associated to said refactored block of software (22).
Description
A system and method for refactoring a block of software
The present invention relates to refactoring a block of
software. More specifically, the present invention relates to
refactoring said block of software on a basis of refactoring
opportunities identified from workflows in said block of
software.
Software development is an iterative process where said block
of software is changed periodically to add new features as
per the requirements of a software user or changes are made
in reference to fix a bug while software testing process.
Continuous feature additions and bug fixing, introduces
various anti-patterns in said block of software and the
design associated to said block of software. To maintain the
software, said block of software needs to be refactored at
regular intervals, otherwise maintenance of said block of
software becomes tedious, time consuming and error prone.
To refactor software having huge number of codes is difficult
due to manual comprehensibility of such software. It becomes
even more difficult to refactor if area of implementation of
software like healthcare, industry, automation, security,
etc. is unknown to a software developer or user.
One way of refactoring is suggested in the document: M.
Fowler, "Refactoring: Improving the Design of Existing
Programs", Addison-Wesley, 1999. It suggests various code
level and design level refactoring techniques. Code level
refactorings requires just local (file/class level) knowledge
and may be performed with little knowledge of overall
software and less effort but, design level refactorings
requires relatively better understanding of software and are
harder to achieve.
It is an object of the invention to refactor a block of
software systematically such that said block of software is
maintainable by a software developer easily and in a
timesaving way.
The object of the invention is achieved from a system
according to claim 1 and a method according to claim 8.
According to an embodiment of the invention, a system for
refactoring a block of software includes an analyzer and an
user interface, wherein the analyzer is adapted to receive a
set of workflow via the user interface and adapted to analyze
each of the workflows to determine a set of refactoring
opportunit, and the user interface is adapted to receive the
set of workflows from a user and adapted to transfer said set
of workflows from the user to the analyzer and to transfer
said set of refactoring opportunity from said analyzer to
said user. Such a system makes it easy to determine the
refactoring opportunity for a software developer, as the
workflows are analyzed by the system itself.
According to one embodiment, the system has an integrator
adapted to integrate said set of refactoring opportunity into
a step-wise arrangement of implementation of said refactoring
opportunity on said block of software, so that said
refactoring opportunity can be implemented one by one in an
step-wise order to remove any possibility of haphazard and
unstructured refactoring of said block of software.
According to yet another embodiment, the integrator is
further adapted to integrate said set of refactoring
opportunity by resolving a design conflict between design
decisions proposed by said set of refactoring opportunities
for a design associated to said block of software. Such a
system helps to remove design conflicts also while
refactoring said block of software.
According to one embodiment, the system includes an
implementation device adapted to implement said set of
refactoring opportunity on said block of software to produce
a refactored block of software. Such system makes it easy to
refactor the block of software, as the refactoring is done
automatically.
According to another embodiment, the implementation device is
adapted to implement said refactoring opportunity over the
design associated to the block of the software to produce a
refactored design associated to said refactored block of
software. Such a system implements said set of refactoring
opportunity over both, said block of software and as well as
said design for said block of software, so as to produce said
refactored design associated to said refactored block of
software along with said refactored block of software.
According to yet another embodiment, the system further
includes a testing device including a test case, said testing
device is adapted to verify functionality of said refactored
block of software on a basis of result obtained by executing
said refactored block of software on said test case. This
helps to test the refactored block of software before being
used by the software user.
According to yet another embodiment, the system is adapted to
update a document related to said block of software on a
basis of a result obtained from refactoring of said block of
software. This helps to keep a track of the changes occurred
in the said block of software when said implementation device
produces said refactored block of software.
FIGURE illustrates a schematic diagram of the system
refactoring a block of software to produce refactored block
of software.
The FIGURE illustrates an embodiment of the invention which
consists of an analyzer 14 receiving a set of workflows 6 via
a user interface 8 and analyzing each of the workflow 6 one
at a time to determine a set of refactoring opportunity 32,
the user interface 8 for transferring the set of workflows 6
from a user 10 to the analyzer 14 and a set of refactoring
opportunities from the analyzer 14 to the user 10, an
integrator 16 for integrating said set of refactoring
opportunity 32 into the step-wise arrangement 36 of
implementation of said set of refactoring opportunity 32 on
said block of software 4, an implementation device 20 for
implementing said set of refactoring opportunity 32 over said
block of software 4 to produce a refactored block of software
22 and over a design 36 of said block of software 4 to
produce refatored design 24 for said refactored block of
software 22.
A workflow 34 refers to a use-case and finer level steps
involved in the use-case. In addition, the workflow 34 has
information about the classes and/or methods that realize the
steps in the use case. The workflow 34 also has information
that belongs to various levels of abstraction. For example, a
workflow for loading an image specifies a use-case for
providing an image id and load image into specific container,
steps involved in loading image from database, process image,
validate image and display image, and classes and/or methods
that correspond to the above steps in the use case for
providing and loading the image.
These workflows 34 are sent to the analyzer 14 in the set 6,
wherein the workflows 34 can occur simultaneously as well
consecutively at a same time. Before being sent to the
analyzer 14 for analysis, the set of workflows 6 are
identified from the block of the software. The workflows can
either be identified by the software user 10 or a workflow
identifying device from the block of software 4. The workflow
identifying device can be any specific or general purpose
processor having ability to identify workflows from the block
of software 4. The workflows are identified on a basis of
requirements for refactoring said block of software 4. Theses
requirements refers to factors like, new features addition to
said block of software 4, flaws in the block of software 4
identified by a testing team, synchronization requirements of
various parts of said block of software 4 or integration of
said block of software 4 to any machine or any other such
requirements. In furtherance, the workflows 34 are
prioritized and provided to the analyzer 14 in the set of
workflows 6. In spite of being provided as the set 6, the
workflows 34 can also be provided to the analyzer 14 one at a
time on the basis of the prioritization. The priority is
determined on factors, such that to reduce difficulty of
maintaining/changing a workflow, criticality of a workflow,
etc.
The analyzer 14 receives the set of workflows 6 via a user
interface 8 and analyzes each of the workflows 6 one at a
time to determine said set of refactoring opportunity 32. The
analyzer 14 analyzes the set of workflows 6 on the basis of
prioritization of the said workflows 6. Alternatively, the
analyzer 14 can analyze workflows 6 simultaneously or a
combination of simultaneous and one at a time pattern or any
other pattern, method or algorithm so that analysis of said
workflow 6 would result in said set of refactoring
opportunity 32. The analyzer 14 analyzes said workflows 6 in
a way, so that analyzing each workflow 6 produces a
refactoring opportunity or a group of refactoring
opportunity. The analyzer 14 combines all the refactoring
opportunity into a set of refactoring opportunity 32 to be
provided to the user 10 via the user interface 8. In an
alternate embodiment, the analyzer 14 also removes any
overlapping of refactoring opportunity or any contingency
between any two refactoring opportunity in the set of
refactoring opportunity. Yet alternatively, the analyzer 14
only analyzes workflow to produce refactoring opportunity and
each of the refactoring opportunity can be sent to the
integrator 16 one by one as soon each of the refactoring
opportunity is produced, while the integrator 16 can combine
all the refactoring
The set of refactoring opportunity 32 includes a plurality of
refactoring opportunities 12 determined on a basis of the
workflow 34 or a combination of the workflows 34 out of the
set of the workflows 6. The set of refactoring opportunity 12
can be arranged in a particular fashion or can be arranged
haphazardly on the basis of analysis done by analyzer.
The integrator 16 integrates the set of refactoring
opportunities 12 into the step-wise arrangement 36 of
implementation of said refactoring opportunity on said block
of software 4. So that, the block of software 4 can be
refactored in a step-wise fashion by implementing the
refactoring opportunities on the block of software 4 as per
the step-wise arrangement 36 of the refactoring
opportunities. While integration, the integrator 16 further
resolves a design conflict between design decisions proposed
by said set of refactoring opportunity 12 associated to a
design 18 for said block of software 4. In an alternate
embodiment, said design conflicts need not be removed by said
system 2 rather said system 2 only integrates said
refactoring opportunities 12 into a set of refactoring
opportunity 34. Yet alternatively, the software user 10,
whether machine or human, can integrate said set of
refactoring opportunity 12 into a step-wise arrangement 36 of
implementation of said set of refactoring opportunity on said
block of software 4. In yet another embodiment, the software
user 10 can also remove the design conflicts between design
decisions proposed by said set of refactoring opportunity for
the design 18 associated to said block of software.
The implementation device 20 implements said set of
refactoring opportunity 34 on said block of software 4 to
produce a refactored block of software 22. On the basis of
said set of refactoring opportunity 34, said implementation
device 20 makes changes in said block of software 4 in a
chronological order or step-wise fashion, applying each
refactoring opportunity 12 at a time to produce said
refactored block of software 22. The set of 'refactoring
opportunity 34 need not be applied one by one rather it can
be simultaneous to various components of said block of
software 4 simultaneously or in a combination of steps of one
by one or simultaneous. The fashion for implementing the said
set of refactoring opportunity 34 can be based on any
available algorithm, method or pattern which can optimally
implement said set of refactoring opportunity 34 on said
block of software 4 to produce said refactored block of
software 22 in a way to reduce time and resource consumption
during refactoring said block of software 4. Alternatively,
said refactored block of software 22 can be generated
manually by changing the code through changes in class and/or
method, or through abstraction or by using any other
structured or non-structured approach.
The implementation device 20 also implements said set of
refactoring opportunity 34 over said design 18 for the block
of software 4 produces a refactored design 24 for said
refactored block of software 22. Alternatively, said
refactored design 24 for said refactored block of software 22
can be generated separately by said software developer 10
manually or automatically using another device.
The testing device 26 verifies functionality of said
refactored block of software 22 on a basis of result obtained
by executing said refactored block of software 22 on a test
case 28 included in said testing device 26. The testing
device 26 tests said refactored block of software 22 by
testing functionality and non-functionality or static and
dynamic behavior of said refactored block of software 22. The
testing device 26 use testing techniques like black box
testing, white box testing or grey box testing to test said
refactored block of software 22. The testing device 26 tests
functionality of said refactored block of software 22 at
various levels by executing said refactored block of software
22 through either unit testing, integration testing, system
testing, system integration testing, regression testing,
acceptance testing, alpha testing, beta testing or any such
testing which tests various components of said refactored
block of software 22 for verifying functionality of said
refactored block of software 22 within the components, with
said components and said software user 10, or any other such
testing at the functional level. The testing device 26 also
verifies functionality of said refactored design 24 on a
basis of result obtained by executing said refactored design
24 on said test case 28. Alternatively, said refactored
design 24 for said refactored block of software 22 can be
tested separately by said software developer 10 manually or
automatically using another device.
The system 2 updates a document 30 related to said block of
software 4 on a basis of a result obtained from refactoring
of said block of software 4. The document 30 can be related
to development of said block of software 4 or the document 30
can be related to structure of codes of said block of
software 4 or formulations or representations of said design
18 for said block of software 4 or any other process related
documents for development of said block of software 4 or a
manual for said software user 10 or any other such document
in relation to said block of software 4 which can be helpful
for said software user 10 for adding or deleting any
substantial part to said block of software 4 or testing said
block of software 4.
In one embodiment, functions of the analyzer 14, or the
integrator 16, or the implementation device 20, or the
testing device 26 or combination thereof can be performed by
one processor or any general purpose processor like personal
computer, etc. enabled to perform the above-said functions.
WE CLAIM
1. A system (2) for refactoring a block of software (4)
comprising:
- an analyzer (14) adapted to receive a set of workflows (6)
via a user interface (8) and adapted to analyze each of the
workflows (34) to determine a set of refactoring opportunity
(32),
- the user interface (8) adapted to transfer the set of
workflows (6) from a user (10) to the analyzer (14) and to
transfer a set of refactoring opportunity (32) from the
analyzer (14) to said user (10) after said analysis of said
set of workflows (6).
2. The system (2) according to claim 1, further comprising:
- an integrator (16) adapted to integrate said set of
refactoring opportunity (12) into a step-wise arrangement
(36) of implementation of said set of refactoring opportunity
(12) on said block of software (4).
3. The system (2) according to claim 2, wherein the
integrator (16) is adapted to integrate said set of
refactoring opportunity (12) by resolving a design conflict
between design decisions proposed by said set of refactoring
opportunity (32) for a design (18) associated to said block
of software (4).
4. The system (2) according to any of the claims 2 or 3,
further comprising:
- an implementation device (20) adapted to implement said set
of refactoring opportunity (32) on said block of software (4)
to produce a refactored block of software (22).
5. The system (2) according to claim 4, wherein the
implementation device (20) is adapted to implement said set
refactoring opportunity (32) over said design (18) associated
to said block of software (4) to produce a refactored design
(24) associated to said refactored block of software (22).
6. The system (2) according to any of the claim 5 or 6,
further comprising:
- a testing device (26) including a test case (28), said
testing device (26) adapted to verify functionality of said
refactored block of software (22) on a basis of result
obtained by executing said refactored block of software (22)
on said test case (28).
7. The system (2) according to any of the preceding claims,
wherein the system (2) is adapted to update a document (30)
related to said block of software (4) on a basis of a result
obtained from refactoring of said block of software (4).
8. A method to refactor a block of software (4) comprises:
- transferring a set of workflows (6) from a user (10) to an
analyzer (14) via a user interface (8),
- analyzing said set of workflows (6) to determine a set of
refactoring opportunity (32), and
- transferring said set of refactoring opportunity (32) from
said analyzer (14) to said user (10) via said user interface
(8).
9. The method according to claim 8, further comprising:
- integrating said set of refactoring opportunity (32) into a
step-wise arrangement (36) of implementation of said set of
refactoring opportunity (32) on said block of software (4).
10. The method according to claim 9, further comprising:
- integrating said set of refactoring opportunity (32) by
resolving a design conflict between design decisions proposed
by said set of refactoring opportunity (12) for a design (18)
associated to said block of software (4).
11. The method according to any of the claims 12 or 13,
further comprising:
implementing said set of refactoring opportunity (32) by an
implementation device (20) over said block of software (4) to
produce a refactored block of software (22).
12. The method according to claim 11, further comprising:
- implementing said set of refactoring opportunity (32) by
said implementation device (20) over said design (18)
associated to said block of software (4) to produce a
refactored design (24) associated to said refactored block of
software (22) .
13. A method according to any of the claims 11 or 12, further
comprising:
- testing said refactored block of software (22) by a testing
device (26) to verify functionality of said refactored block
of software (22) on a basis of result obtained by executing
said refactored block of software (22) on a test case (28).
14. The method according to any of claims 10 to 18, further
comprising:
- updating a document (3) related to said block of software
(4) on a basis of a result obtained from refactoring of said
block of software (4).
A system (2) for refactoring a block of software (4) includes
an analyzer (14) for receiving a set of workflows (6) via a
user interface (8) and adapted to analyze each of the
workflows (34) one at a time to determine a set of
refactoring opportunity (32), the user interface (8) adapted
to transfer the set of workflows (6) from a user (10) to the
analyzer (14) and to transfer a set of refactoring
opportunity (32) from the analyzer (14) to said user (10)
after said analysis of said set of workflows (6). The system
also includes set of refactoring opportunity (12) into a
step-wise arrangement (36) of implementation of said set of
refactoring opportunity (12) on said block of software (4),
an implementation device (20) for implementing said set of
refactoring opportunity (32) on said block of software (4) to
produce a refactored block of software (22) and over a design
(18) associated to said block of software (4) to produce a
refactored design (24) associated to said refactored block of
software (22).
| Section | Controller | Decision Date |
|---|---|---|
| # | Name | Date |
|---|---|---|
| 1 | 559-KOL-2010_EXAMREPORT.pdf | 2016-06-30 |
| 1 | abstract-559-kol-2010.jpg | 2011-10-06 |
| 2 | 559-KOL-2010-(07-12-2015)-ANNEXURE TO FORM 3.pdf | 2015-12-07 |
| 2 | 559-kol-2010-specification.pdf | 2011-10-06 |
| 3 | 559-KOL-2010-PA.pdf | 2011-10-06 |
| 3 | 559-KOL-2010-(03-11-2015)-ABSTRACT.pdf | 2015-11-03 |
| 4 | 559-kol-2010-gpa.pdf | 2011-10-06 |
| 4 | 559-KOL-2010-(03-11-2015)-CLAIMS.pdf | 2015-11-03 |
| 5 | 559-kol-2010-form 3.pdf | 2011-10-06 |
| 5 | 559-KOL-2010-(03-11-2015)-CORRESPONDENCE.pdf | 2015-11-03 |
| 6 | 559-KOL-2010-FORM 3 1.1.pdf | 2011-10-06 |
| 6 | 559-KOL-2010-(03-11-2015)-DESCRIPTION (COMPLETE).pdf | 2015-11-03 |
| 7 | 559-kol-2010-form 2.pdf | 2011-10-06 |
| 7 | 559-KOL-2010-(03-11-2015)-DRAWINGS.pdf | 2015-11-03 |
| 8 | 559-KOL-2010-FORM 2 1.1.pdf | 2011-10-06 |
| 8 | 559-KOL-2010-(03-11-2015)-FORM-1.pdf | 2015-11-03 |
| 9 | 559-KOL-2010-(03-11-2015)-FORM-2.pdf | 2015-11-03 |
| 9 | 559-KOL-2010-FORM 13.pdf | 2011-10-06 |
| 10 | 559-KOL-2010-(03-11-2015)-OTHERS.pdf | 2015-11-03 |
| 10 | 559-kol-2010-form 1.pdf | 2011-10-06 |
| 11 | 559-KOL-2010-(03-11-2015)-PA.pdf | 2015-11-03 |
| 11 | 559-KOL-2010-FORM 1 1.1.pdf | 2011-10-06 |
| 12 | 559-KOL-2010-(03-11-2015)-PETITION UNDER RULE 137.pdf | 2015-11-03 |
| 12 | 559-kol-2010-drawings.pdf | 2011-10-06 |
| 13 | 559-KOL-2010-(05-10-2015)-ANNEXURE TO FORM 3.pdf | 2015-10-05 |
| 13 | 559-kol-2010-description (complete).pdf | 2011-10-06 |
| 14 | 559-KOL-2010-(05-10-2015)-CORRESPONDENCE.pdf | 2015-10-05 |
| 14 | 559-kol-2010-correspondence.pdf | 2011-10-06 |
| 15 | 559-KOL-2010-(04-04-2013)-CORRESPONDENCE.pdf | 2013-04-04 |
| 15 | 559-KOL-2010-CORRESPONDENCE 1.1.pdf | 2011-10-06 |
| 16 | 559-KOL-2010-(04-04-2013)-FORM 3.pdf | 2013-04-04 |
| 16 | 559-kol-2010-claims.pdf | 2011-10-06 |
| 17 | 559-kol-2010-abstract.pdf | 2011-10-06 |
| 18 | 559-kol-2010-claims.pdf | 2011-10-06 |
| 18 | 559-KOL-2010-(04-04-2013)-FORM 3.pdf | 2013-04-04 |
| 19 | 559-KOL-2010-(04-04-2013)-CORRESPONDENCE.pdf | 2013-04-04 |
| 19 | 559-KOL-2010-CORRESPONDENCE 1.1.pdf | 2011-10-06 |
| 20 | 559-KOL-2010-(05-10-2015)-CORRESPONDENCE.pdf | 2015-10-05 |
| 20 | 559-kol-2010-correspondence.pdf | 2011-10-06 |
| 21 | 559-KOL-2010-(05-10-2015)-ANNEXURE TO FORM 3.pdf | 2015-10-05 |
| 21 | 559-kol-2010-description (complete).pdf | 2011-10-06 |
| 22 | 559-KOL-2010-(03-11-2015)-PETITION UNDER RULE 137.pdf | 2015-11-03 |
| 22 | 559-kol-2010-drawings.pdf | 2011-10-06 |
| 23 | 559-KOL-2010-(03-11-2015)-PA.pdf | 2015-11-03 |
| 23 | 559-KOL-2010-FORM 1 1.1.pdf | 2011-10-06 |
| 24 | 559-kol-2010-form 1.pdf | 2011-10-06 |
| 24 | 559-KOL-2010-(03-11-2015)-OTHERS.pdf | 2015-11-03 |
| 25 | 559-KOL-2010-(03-11-2015)-FORM-2.pdf | 2015-11-03 |
| 25 | 559-KOL-2010-FORM 13.pdf | 2011-10-06 |
| 26 | 559-KOL-2010-(03-11-2015)-FORM-1.pdf | 2015-11-03 |
| 26 | 559-KOL-2010-FORM 2 1.1.pdf | 2011-10-06 |
| 27 | 559-KOL-2010-(03-11-2015)-DRAWINGS.pdf | 2015-11-03 |
| 27 | 559-kol-2010-form 2.pdf | 2011-10-06 |
| 28 | 559-KOL-2010-(03-11-2015)-DESCRIPTION (COMPLETE).pdf | 2015-11-03 |
| 28 | 559-KOL-2010-FORM 3 1.1.pdf | 2011-10-06 |
| 29 | 559-KOL-2010-(03-11-2015)-CORRESPONDENCE.pdf | 2015-11-03 |
| 29 | 559-kol-2010-form 3.pdf | 2011-10-06 |
| 30 | 559-KOL-2010-(03-11-2015)-CLAIMS.pdf | 2015-11-03 |
| 30 | 559-kol-2010-gpa.pdf | 2011-10-06 |
| 31 | 559-KOL-2010-PA.pdf | 2011-10-06 |
| 31 | 559-KOL-2010-(03-11-2015)-ABSTRACT.pdf | 2015-11-03 |
| 32 | 559-kol-2010-specification.pdf | 2011-10-06 |
| 32 | 559-KOL-2010-(07-12-2015)-ANNEXURE TO FORM 3.pdf | 2015-12-07 |
| 33 | abstract-559-kol-2010.jpg | 2011-10-06 |
| 33 | 559-KOL-2010_EXAMREPORT.pdf | 2016-06-30 |