Skip to content

Commit f4c0c42

Browse files
committed
2 parents c4399c8 + e30a38f commit f4c0c42

File tree

3,098 files changed

+648942
-2119
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,098 files changed

+648942
-2119
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bin

README

+54-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,54 @@
1-
A Java 8 BNF in Rascal
1+
# Refactoring Java Code towards Language Evolution
2+
3+
### Motivation
4+
5+
<div style="text-align: right">
6+
... when code does not evolve with its language,
7+
maintaining backward compatibility means
8+
that a language can be expanded, but nothing can
9+
be removed
10+
... This leads to a language
11+
that is increasingly large and complex and
12+
makes the learning curve steeper and maintenance
13+
more difficult
14+
15+
(Jeffrey Overbey and Ralph Johnson, [Regrowing a Language](http://dl.acm.org/citation.cfm?id=1640127).
16+
Onward! 2009.)
17+
</div>
18+
19+
20+
### Goal
21+
22+
Implement a set of refactorings (using [Rascal-MPL](http://rascal-mpl.org))
23+
to evolve a legacy Java systems towards the usage of more recent
24+
constructs of the language.
25+
26+
### Current transformations
27+
28+
* Convert Anonymous Inner Classes into Lambda Expressions
29+
* Convert explicit typing of generic r-alues into Diamond Operator
30+
* Conver if-then-else-if on the value of strings to Switch String
31+
* Convert similar catch blocks into MultiCatch
32+
33+
### How to use it
34+
35+
* clone this repository
36+
* install [rascal-mpl ide](http://www.rascal-mpl.org/start/)
37+
* import this project to the rascal workspace
38+
* execute the rascal shell using this project as reference
39+
* import the Driver module (such as > import Driver;)
40+
* execute the function refactorProjects passing as argument a location for an input file
41+
42+
The input file is in the CSV format, with at least the following columns:
43+
44+
* project name
45+
* project revision (to help on reproducibility)
46+
* type of tranformation (DI for diamond operator, AC for anonymous to lambda, MC for multi-catch)
47+
* percentage (just a number, with the percentage of transformations with respect to the oportunities
48+
* absolute path to the project
49+
50+
### Output
51+
52+
A log of the transformations is generated on the output folder. The files of the original project are
53+
changed in place.
54+

README.md

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Refactoring Java Code towards Language Evolution
2+
3+
### Motivation
4+
5+
<div style="text-align: right">
6+
... when code does not evolve with its language,
7+
maintaining backward compatibility means
8+
that a language can be expanded, but nothing can
9+
be removed
10+
... This leads to a language
11+
that is increasingly large and complex and
12+
makes the learning curve steeper and maintenance
13+
more difficult
14+
15+
(Jeffrey Overbey and Ralph Johnson, [Regrowing a Language](http://dl.acm.org/citation.cfm?id=1640127).
16+
Onward! 2009.)
17+
</div>
18+
19+
20+
### Goal
21+
22+
Implement a set of refactorings (using [Rascal-MPL](http://rascal-mpl.org))
23+
to evolve a legacy Java systems towards the usage of more recent
24+
constructs of the language.
25+
26+
### Current transformations
27+
28+
* Convert Anonymous Inner Classes into Lambda Expressions
29+
* Convert explicit typing of generic r-alues into Diamond Operator
30+
* Conver if-then-else-if on the value of strings to Switch String
31+
* Convert similar catch blocks into MultiCatch
32+
33+
### How to use it
34+
35+
* clone this repository
36+
* install [rascal-mpl ide](http://www.rascal-mpl.org/start/)
37+
* import this project to the rascal workspace
38+
* execute the rascal shell using this project as reference
39+
* import the Driver module (such as > import Driver;)
40+
* execute the function refactorProjects passing as argument a location for an input file
41+
42+
The input file is in the CSV format, with at least the following columns:
43+
44+
* project name
45+
* project revision (to help on reproducibility)
46+
* type of tranformation (DI for diamond operator, AC for anonymous to lambda, MC for multi-catch)
47+
* percentage (just a number, with the percentage of transformations with respect to the oportunities) * absolute path to the project
48+
49+

0 commit comments

Comments
 (0)