-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTECHNICAL.txt
64 lines (44 loc) · 2.28 KB
/
TECHNICAL.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
When you have a fresh clone of the git repository, enter the command `sbt compile` in the
top-level directory to compile EpCoGen. sbt will properly install all necessary software
libraries.
We have tested with sbt versions of 1.7.1, 1.9.8, and 1.10.7.
If your Java version is too advanced for the sbt, you may need to add the
following to the build.st file to lower the associated Java version.
javacOptions ++= Seq("-source", "11", "-target", "11"),
And then you can install an openJDK version of Java 11 and use it by setting JAVA_HOME
properly and/or configuring PATH variable appropriately.
===================================
Examples to run
===================================
Sample commands to run. The first column shows the time it was launched, so to generate all
evolution stages for all approaches on a Linux machine took just under an hour. And the
compiling process for all code took just about three hours.
15:17 sbt language-java/run
16:08 cd target/
16:09 cd ep-java
16:11 python3 ../../scripts/compare.py ../../scripts/systems/system-main.json >> REPORT
16:12 python3 ../../scripts/compile-java.py
19:08 python3 ../../scripts/process-java.py > STATISTICS
19:09 cd ..
19:11 sbt "helloWorld/runMain org.combinators.fibonacci.FibonacciWithLucasScalaDirectToDiskMain"
19:13 cd target/fib
19:13 cd scala/
19:13 sbt test
---------------------------------
When generating the full Java implementations for all approaches and all evolution stages,
there are 19,842 Java files containing 513,094 total lines of code.
Using the CLOC utility, a more accurate picture appears. Of these only 3890 are truly
unique files. The reason? Because the Expression Problem shows how to extend a system without
modifying already created code, so it makes perfect sense that 80% of the code is duplicated!
% $CLOC --csv `find . -name "*.java"`
19842 text files.
3890 unique files.
15952 files ignored.
files,language,blank,comment,code,"github.com/AlDanial/cloc v 1.86 T=17.31 s (224.7 files/s, 7917.7 lines/s)"
3890,Java,27755,4,109292
3890,SUM,27755,4,109292
cloc reports 109,292 lines of code.
Now run and turn off the uniqueness check:
% $CLOC --csv `find . -name "*.java"` --skip-uniqueness
19842,Java,117328,516,395250
This reveals that 395,250 lines of Java code were generated.