Commit Graph

34 Commits

Author SHA1 Message Date
Julian Dolby 41d254d547 more type parameters for analysis engine 2018-04-10 16:00:44 -04:00
Ben Liblit 6087b73cee Fix or suppress all 242 Eclipse warnings about unused parameters
In general, my approach was to try to eliminate each unused parameter
using Eclipse's "Change Method Signature" refactoring.  That did not
always succeed: a parameter may be unused in some base class method,
but then be used in subclass's override of that method.  In cases
where refactoring to eliminate a parameter failed, I instead annotated
the parameter with '@SuppressWarnings("unused")' to silence the
warning.

Note: this group of changes creates a significant risk of
incompatibility for third-party WALA code.  Some removed parameters
change externally-visible APIs.  Furthermore, these changes do not
necessarily lead to Java compilation errors.  For example, suppose
third-party code subclasses a WALA class or interface, overrides a
method, but does not annotate that method as @Override.  Removing a
parameter means that the third-party method no longer overrides.  This
can quietly change code behavior without compile-time errors or
warnings.  This is exactly why one should use @Override wherever
possible, but we cannot guarantee that third-party WALA users have
done that.
2017-07-31 15:29:00 -07:00
Ben Liblit 191904d607 Remove "throws XYZ" declarations where XYZ cannot be thrown
Unnecessary "throws" declarations tend to cascade.  If foo() calls
bar() and bar() falsely declares that it might throw IOException, that
often leads a programmer to declare that foo() might throw IOException
as well.  Fixing the bar() throws declaration then reveals that we can
fix the foo() throws declaration too.  By the time we reach a fixed
point with cleaning these up, we have removed roughly 320 unnecessary
throws declarations.

In a few cases, this cleanup even lets us remove entire "try
... catch" statements where the only thing being caught was an
exception that we now statically know cannot be thrown.  Nice!

In Eclipse project configurations, upgrade any future such shenanigans
from warnings to errors.  Now that we've fixed this, we don't want it
coming back again.

There is a potential drawback to this change.  Conceivably some public
WALA API entry point might have declared that it could throw some
exception merely to reserve the *option* of throwing that exception in
third-party code that subclasses and overrides the API entry point in
question.  I have no idea whether this is a significant concern in
practice, though.
2017-07-28 10:20:28 -07:00
Ben Liblit a888a49fdd Fix all Eclipse warnings about unnecessary semicolons
I have *not* upgraded this problem to be treated as an error in the
future.  Unfortunately Eclipse uses a single configuration setting for
both unnecessary semicolons and also for empty control-flow statements
like `while (p) ;`.  I'm not convinced that it's worth rewriting all
instances of the latter into `while (p) { }`.  So this is just going
to stay as a warning for now.
2017-07-14 22:39:01 -07:00
Ben Liblit 6766f1e261 Fix 42 Eclipse warnings about unused imports 2017-03-20 00:43:48 -05:00
Ben Liblit fde65340d2 Fix 132 Eclipse warnings about using raw generic types 2017-03-15 11:08:20 -05:00
Julian Dolby d24519e974 cross-cutting changes to make more of WALA runnable with TeaVM. The biggest change is refactoring to AnalysisCache and friends; since TeaVM does not support SoftReference, I needed to add a layer of interfaces so that I can use a more simpleminded caching implementation for TeaVM. There are other changes to Module and friends to break connections with File and URL, which also cause TeaVM grief. I also organized imports in many places to remove unused types that caused trouble. 2017-02-02 20:33:27 -05:00
Julian Dolby 74cc8454e3 make more of WALA run on TeaVM 2017-01-17 13:14:56 -05:00
Julian Dolby c9b1006305 changes for allowing seq. and conc. CHAs 2017-01-12 16:34:54 -05:00
Julian Dolby 0f0c3d6bd9 add more functionality to analysis engine: create SDGs and
parameterize to do both regular and field-based analysis in JavaScript
2016-08-18 22:43:12 -04:00
Julian Dolby 7b59f3141c fix analysis options in js engine 2016-07-25 18:34:40 -04:00
Michael Heilmann 0bb5e6998e Remove redundant casts and imports, improve doc comments 2014-06-26 17:51:26 +02:00
Julian Dolby 080325b5f6 merge 2013-06-25 11:57:37 -04:00
msridhar1 ea7be296c8 create JSAnalysisOptions, and use to add proper option to disable handling of call / apply
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4405 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:48:01 +00:00
dolby-oss cdd42a68b6 updates to processing of Web pages:
1) adopted the code from Rational for HTML handling
    i) extended it to integrate better source mapping into IR
    ii) integrated fixes from the old html processing to collect more info on forms
    iii) added some copyright comments
  2) updated version of jericho
  3) added support for nu.validator for html5
  4) added script to fetch html parser jars, and removed binary jar
  

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4090 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-04-04 15:23:58 +00:00
msridhar1 857e456806 organize imports
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4081 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-04-03 04:08:05 +00:00
dolby-oss 9baccf9a10 loosen types
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3996 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2010-11-09 19:01:07 +00:00
dolby-oss a3dc6411ae separate Rhino-specific portions of javascript analysis
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3731 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-07-16 18:09:54 +00:00
sjfink db1bc2fadc fix broken CAst builds.
deprecate Internal and NonNull annotations

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3577 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-05-07 13:51:24 +00:00
dolby-oss 637f06b2c0 further work on lexical scoping
more bug fixes for Anders


git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3136 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-12-16 14:54:09 +00:00
sjfink 787c047d6e Delete CallGraphBuilderFactory. Related cleanups.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2457 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-01-24 22:38:50 +00:00
sjfink 1a72f854b3 delete obsolete 'preserveNames' SSAOption
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2403 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-01-16 21:19:14 +00:00
sjfink 742c46a61d clean up Language and AnalysisScope interface
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2153 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-12-11 16:34:02 +00:00
sjfink fd81fd7bcf fix compile bugs due to changes in wala.core
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2138 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-12-10 05:26:56 +00:00
rmfuhrer fc1cf61c1b buildAnalysisScope() now adds the Language object for JavaScript to the scope's Language set (since the AnalysisScope now holds that information).
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2109 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-12-06 14:29:54 +00:00
sjfink 7f62dc3c04 decouple IR caching from AnalysisOptions with a new AnalysisCache object
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1519 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-07-20 15:20:23 +00:00
sjfink 99a97fb477 massive overhaul of Warnings management
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1389 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-07-06 22:09:08 +00:00
dolby-oss 66b19b8666 support for cross-language call graphs
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1216 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-06-01 03:32:56 +00:00
sjfink 5a8c0fa6d1 delete Entrypoints interface.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1125 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-05-15 17:44:43 +00:00
dolby-oss c8fb2a22af use new boolean-typed constants. adapt to new symbol declaration api
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@923 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-04-04 13:05:48 +00:00
dolby-oss 4668eb57d2 further analysis engine surgery, motivated by string analysis example
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@707 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-02-12 18:30:10 +00:00
sjfink f1ac319ca0 squash remaining Eclipse warnings
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@702 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-02-09 15:34:25 +00:00
sjfink 86bcc926ee miscellaneous minor cleanups. eclipse build stuff. import statements.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@677 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-02-08 19:07:30 +00:00
dolby-oss d8f21f8ee5 Initial contribution of core script analysis code
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@622 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-02-02 17:25:09 +00:00