Commit Graph

5665 Commits

Author SHA1 Message Date
Julian Dolby b68ff20c82
Merge pull request #269 from liblit/modernization-java-8-lambdas-and-method-references
Use Java 8 lambdas and method references wherever possible
2017-12-03 09:54:09 +08:00
Julian Dolby 4a53da36ea fix type-o 2017-12-01 20:22:37 +08:00
Julian Dolby 803243ea53 Merge branch 'master' of https://github.com/wala/WALA 2017-12-01 20:02:00 +08:00
Julian Dolby 7cd2a2acf8 Fixes for instrumentation of invoke dynamic 2017-12-01 20:01:16 +08:00
Julian Dolby d685fbb71f Add Jeff's group's incremental pointer analysis project to trigger 2017-12-01 13:05:25 +08:00
Ben Liblit 9c83e87cc1 Merge branch 'master' into modernization-java-8-lambdas-and-method-references 2017-11-29 10:51:33 -06:00
Julian Dolby 6be349096c
Merge pull request #271 from liblit/modernization-loops-and-iterators
Modernize loops and iterators
2017-11-29 04:30:28 -05:00
Ben Liblit ebfd885d22 Use modern for-each loops where possible
Java sources used as test data have been excluded from this mass
clean-up.
2017-11-28 14:44:53 -06:00
Ben Liblit 12ca05ddb7 Enforce not using raw types more forcefully where possible
These are all modules where no such warnings currently arise.  If any
arise in the future, then, let's treat them as errors so we keep
things clean.
2017-11-28 14:09:42 -06:00
Ben Liblit 8ef6ad5069 Add proper type parameters to nearly all uses of Iterator
Java sources used as test data have been excluded.
2017-11-28 14:09:30 -06:00
Ben Liblit 456b0e45c3 Remove additional unnecessary casts of lambda expressions 2017-11-27 15:00:13 -06:00
Ben Liblit 5bc0e11e90 Ignore invalid Javadoc here, in case we don't have Android's SDK 2017-11-27 11:31:15 -06:00
Ben Liblit 6261880264 Remove unnecessary casts of lambda expressions 2017-11-27 11:31:15 -06:00
Ben Liblit 16913ffc80 Remove an apparently-useless no-op walk over elements of a set 2017-11-27 11:31:15 -06:00
Ben Liblit 2e084bdec7 Use existing IteratorUtil.filter when that's exactly what we need 2017-11-27 11:31:15 -06:00
Ben Liblit b2e1081221 Clean up IteratorUtil.filter
Use method references where possible.  Remove no-longer-needed
annotations.
2017-11-27 11:31:15 -06:00
Ben Liblit 5fa3643652 Don't suppress javadoc warnings; these are disabled entirely anyway 2017-11-27 11:31:15 -06:00
Ben Liblit de2690dfac Remove two imports that are no longer used 2017-11-27 11:31:15 -06:00
Ben Liblit 4b81b69165 Disable annotation-based nullness analysis
Using constructor references apparently pulls in something involving
nullness annotations.  However, we don't actually build with a jar
file that defines those annotations, so this leads to Eclipse build
failures.  I don't know the right way to add such a jar file to our
current configuration mishmash of Ant, Maven, and Eclipse.  So the
easier thing to do is just disable annotation-based nullness analysis.
I doubt we were getting any benefit from such an analysis anyway,
given that WALA itself doesn't use those annotations at all.
2017-11-27 11:31:15 -06:00
Ben Liblit 74e0640771 Replace simple lambdas with method references wherever possible 2017-11-27 11:31:15 -06:00
Ben Liblit 790d37781b Convert many single-method anonymous classes to lambdas
Eclipse's automated code clean-up tool did most of the heavy lifting
here: it specifically has a clean-up option for converting functional
interfaces to lambdas.  I merely had to revert the automated changes
for a single enumeration class for which it produced invalid results,
and for a few test inputs that apparently aren't set up to be compiled
with Java 8.
2017-11-27 11:31:15 -06:00
Ben Liblit 28f0e09435 Make FilterIterator and Predicate statically type-correct
Previously FilterIterator was very permissive regarding the type
relationships between the original iterator, the filtered iterator,
and the predicate used to prune the former down to the latter.  Now we
enforce those relationships more strictly, including proper use of
covariant ("<? extends T>") and contravariant ("<? super T>")
polymorphic type parameters where appropriate.

This lets us get rid of seven suppressed warnings about generic types
and/or unchecked conversions.  It also moves us toward being able to
use modern Java features like lambdas and streams more easily.
2017-11-27 11:31:14 -06:00
Julian Dolby 5ac8bf881d
Merge pull request #265 from liblit/java-8-build-configuration
Update more parts of the build configuration to use Java 8
2017-11-26 20:53:28 -05:00
Ben Liblit 11828c57f4 Update more parts of the build configuration to use Java 8
Julian Dolby assures me that WALA is now supposed to be using Java 8
everywhere.  This covers nearly all remaining places that I can find
where an earlier Java version was still being used.  (The few
exceptions are places where switching to Java 8 causes test failures.
I'll address those separately, probably by reaching out to the WALA
maintainers for help.)
2017-11-26 18:46:00 -06:00
Ben Liblit 9ef6ff1a9c Remove "build.xml" files not used by corresponding "pom.xml" files 2017-11-26 18:11:56 -06:00
Ben Liblit ded9e880b1 Update Maven Central configurations to also use Java 8 (#264)
E-mail exchanged with Julian Dolby suggests that this is the right
thing to do, and that it should have been done back when we converted
other parts of the build configuration to Java 8.
2017-11-23 12:55:05 -08:00
Julian Dolby 49b5fe83b5 Merge branch 'master' of https://github.com/wala/WALA 2017-11-22 20:15:10 -05:00
Julian Dolby 45da66a95d cleanups and changes for TAMU work 2017-11-22 18:24:39 -05:00
Ben Liblit e89c5c6562 Disable deprecation warnings in modules where they are unavoidable (#263)
These two modules refer to "AST.JLS8".  If you have Java 9 installed,
then "AST.JLS8" is marked as deprecated, and we can a warning unless
we suppress or disable the deprecation warning wherever "AST.JLS8" is
used.  However, if you don't have Java 9 installed, then "AST.JLS8" is
not deprecated, and trying to suppress deprecation warnings where
"AST.JLS8" is used instead produces warnings about unnecessary warning
suppression.  Aagh!  Turning off the deprecation warnings entirely for
these two modules seems like the only sane compromise.
2017-11-21 18:00:43 -08:00
Julian Dolby 5faae993e9
Merge pull request #261 from liblit/warning-fixes-deprecated-AST-JLS8
Suppress deprecation warnings about requesting an old AST version
2017-11-19 17:41:59 -05:00
Julian Dolby 96559826c2
Merge pull request #262 from liblit/warning-fix-unnecessary-default-encoding
Remove a default encoding setting that Eclipse considers unnecessary
2017-11-19 17:41:20 -05:00
Ben Liblit 221a1a26ed Remove a default encoding setting that Eclipse considers unnecessary
Removing fixes one Eclipse error diagnostic: "Default encoding (UTF-8)
for library '.' should be removed as the workspace does not specify an
explicit encoding."

This reapplies the fox from ecd1ff72fe,
which was reverted (apparently unintentionally) as part of a larger
group of changes in 8d65788aef.
2017-11-19 15:46:40 -06:00
Ben Liblit d79707e137 Suppress deprecation warnings about requesting an old AST version
Near as I can tell, the requests for deprecated versions here are
intentional.  The non-deprecated version (AST.JLS9) is the latest and
greatest, but as far as I can tell we really do want the older version
here.

This is similar to 6caecce3e7, though in
that case JLS8 was the non-reprecated latest version and we were still
asking for JLS3.
2017-11-19 15:43:45 -06:00
Raffi Khatchadourian 1d239dac52 Remove explicit super call (#252) 2017-11-18 09:19:43 -05:00
Manu Sridharan 808688b793 use lambda shorthand 2017-11-12 10:08:57 -08:00
Julian Dolby d124256835 remove java 7 support 2017-11-11 21:20:41 -05:00
Julian Dolby 8fc5a35c91 Merge branch 'master' of https://github.com/wala/WALA 2017-11-11 20:32:14 -05:00
Julian Dolby 8d65788aef convert to Java 8 Function and Predicate 2017-11-11 20:29:04 -05:00
Julian Dolby 12882baba4 Merge pull request #253 from karimhamdanali/master
Support for Averroes + Dynamic call graphs
2017-10-23 23:02:54 -04:00
Karim Ali 423db824b3 adding support for the dynamic call graph experiments
currentSite should be ThreadLocal because not having this screws up a lot of the instrumentation-based dynamic call graphs we generate for the shootout benchmarks.

I have also conditionally changed how the string of the currentSite is created based on the output format that Julian came up with for the dynamic call graph. This support is necessary, because the Java std libraries are not instrumented. Therefore, they would appear as if calls from them show up from nowhere in the log that WALA generates for the dynamic call graph. This fix make those calls originate from a fake library BLOB node in the call graph.
2017-10-23 17:54:01 -06:00
Karim Ali d22ee36b09 adding some support for averroes
- adding multi-flow AnalysisOption
- enable/disable special handling of zero-length arrays

Both are required to enable precise analysis of some Dacapo benchmarks when using the Averroes-generated summaries
2017-10-23 17:43:28 -06:00
Julian Dolby 26d354d1fc remove debug printing 2017-10-19 17:38:37 -04:00
Julian Dolby 11120329e1 fix messages about final; these vaiables do not need to be final in Java 8, really. 2017-10-19 15:02:19 -04:00
Julian Dolby 0f2d9b7635 fixes to dynamic CG to minimize bloating of methods 2017-10-19 13:12:21 -04:00
Julian Dolby 84ff23f852 expose implicit keys predicate 2017-10-19 13:09:27 -04:00
Julian Dolby b38286621a remove unneeded type parameter 2017-10-19 13:08:34 -04:00
Julian Dolby 207181aa89 linking issues on Linux. It seems that the name 'launch' for a function was causing some weird linking issues that only happened sometimes. Quite ikely, the issue is another library using the same name. 2017-10-18 01:49:25 +00:00
Julian Dolby 601c9fae7b clean up native init 2017-10-17 20:25:46 -04:00
Julian Dolby 02e2193875 clean up native init 2017-10-17 20:14:35 -04:00
Julian Dolby 6961748fb2 Merge branch 'master' of https://github.com/wala/WALA 2017-10-17 20:12:43 -04:00