Commit Graph

86 Commits

Author SHA1 Message Date
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 594525a83f Fix Eclipse warnings about methods that can be declared static
The fix is to add "static" where appropriate, of course.  I've also
simplified calls to such methods to reflect the fact that they no
longer need a specific object to call the method on.

In projects that contain test inputs, I've left the non-static
declarations unchanged, and instead downgraded the warning to be
ignored.  In all other projects, this warning has been upgraded to an
error.
2017-07-14 22:38:38 -07:00
Manu Sridharan 7d29573a26 Remove code to scan call sites for max param count
We cannot find any case where this code fixes a problem,
and it doesn't seem to be a good fix anyway.
2017-06-22 14:39:13 +02:00
Manu Sridharan 554a6e7ee9 Add options to ignore inter-procedural control dependence
In certain cases, one may want to ignore inter-procedural control
dependence.  Consider the following example:

    flag = getFlagVal();
    if (flag) {
      doStuff();
    }

If we are ignoring interprocedural control dependence, a forward slice
from the first statement will *not* include statements inside doStuff()
and its transitive callees.

This option is useful in scenarios where the effects of statements
inside control-dependent callees can be accounted for via some cheaper
effect analysis.  E.g., if you only care about heap effects of control-
dependent callees, you can compute that using mod-ref analysis,
rather than sucking all the control-dependent callee statements into the
slice.

Also added some more detailed comments, a new unit test, and removed
some trailing whitespace.
2017-05-26 15:29:08 -07: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 f3b5d41af9 refactor CFG to separate instructions from CFGs; this is to allow code like CDGs to be reused without an IR. 2016-09-26 13:37:51 -04:00
Julian Dolby e87b2e5d84 fixes for slicing of field-based CGs 2016-02-14 17:18:21 -05:00
Julian Dolby eb7748a745 fixes for slicing of graphs built with the field-based builder 2016-02-11 11:51:39 -05:00
Manu Sridharan 13a46d8ea3 Fixes #82
PrunedCFG had been changed to always include an entry and exit node.
The logic for detecting an "empty" ExceptionPrunedCFG inside the PDG
construction code had not been updated appropriately.
2015-08-06 11:08:27 -07:00
Cosmin Radoi 853b5fc37a replace Filter with Predicate 2014-11-25 13:23:47 -06:00
Julian Dolby a1bc84356d scandriod merge 2014-10-01 21:32:36 -04:00
Juergen Graf eb9e74f442 add/remove @SuppressWarnings to keep in sync with wala main branch 2014-07-30 16:17:37 +02:00
Juergen Graf 6f8aee80c6 Merge branch 'wala' into master 2014-07-28 17:09:02 +02:00
Julian Dolby 3910608d60 JavaScript slicer support 2014-07-11 11:55:02 -04:00
Juergen Graf 4772f36d47 add standard type parameter to most pointer analysis references. When it breaks we move back to ? extends InstanceKey. 2014-05-20 22:00:06 +02:00
Juergen Graf 428a3975ed Merge branch 'wala' into master
Conflicts:
	com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/loader/JavaSourceLoaderImpl.java
	com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/ssa/AstJavaInstructionFactory.java
	com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/ssa/AstJavaInvokeInstruction.java
	com.ibm.wala.cast.js.test/harness-src/com/ibm/wala/cast/js/test/TestSimpleCallGraphShape.java
	com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/html/WebPageLoaderFactory.java
	com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/loader/JavaScriptLoader.java
	com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/ssa/JSInstructionFactory.java
	com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/ssa/JavaScriptInvoke.java
	com.ibm.wala.cast/source/java/com/ibm/wala/cast/ipa/callgraph/AstCallGraph.java
	com.ibm.wala.cast/source/java/com/ibm/wala/cast/ir/ssa/AbstractLexicalInvoke.java
	com.ibm.wala.cast/source/java/com/ibm/wala/cast/ir/ssa/AstInstructionFactory.java
	com.ibm.wala.cast/source/java/com/ibm/wala/cast/ir/ssa/AstLexicalRead.java
	com.ibm.wala.cast/source/java/com/ibm/wala/cast/ir/ssa/AstLexicalWrite.java
	com.ibm.wala.cast/source/java/com/ibm/wala/cast/ir/ssa/FixedParametersInvokeInstruction.java
	com.ibm.wala.cast/source/java/com/ibm/wala/cast/ir/translator/AstTranslator.java
	com.ibm.wala.core/.classpath
	com.ibm.wala.core/.settings/org.eclipse.jdt.core.prefs
	com.ibm.wala.ide/src/com/ibm/wala/ide/util/ProgressMonitorDelegate.java
	com.ibm.wala.util/src/com/ibm/wala/util/NullProgressMonitor.java
	com.ibm.wala.util/src/com/ibm/wala/util/ProgressMaster.java
2014-05-20 17:59:16 +02:00
Julian Dolby 0ccaae3b2c pull exclusions file support into util project and then share it with
the shrike-based dynamic call graph builder so that static and dynamic
graphs can be built consistently more easily.
2013-11-14 13:02:56 -05:00
Juergen Graf cdaaddf88b Merge branch 'wala' into master 2013-07-02 14:23:24 +02:00
Julian Dolby 080325b5f6 merge 2013-06-25 11:57:37 -04:00
Juergen Graf 61d7a33928 remove warnings in com.ibm.wala.core 2013-03-12 00:50:17 +01:00
Juergen Graf b82d5dba90 Merge branch 'wala' into master 2012-11-06 04:23:10 +01:00
Manu Sridharan 256cd06460 Convert all Java source files to use Unix line endings; no semantic change 2012-09-04 15:56:05 -07:00
Juergen Graf 56cdf169b0 distinguish control deps from data deps in the pdg 2011-03-30 13:03:16 +02:00
msridhar1 0ca5dc1c0e better fix for PDG bug reported by Ravi Chandran
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3967 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2010-10-06 17:03:35 +00:00
msridhar1 029b1fc1fd Fix for bug reported by Ravi Chandran on the mailing list (10/01/2010). Properly add edges from method entry in the PDG
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3965 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2010-10-05 18:45:43 +00:00
msridhar1 460477e074 fix bug in PDG contruction for a case involving infeasible bytecodes; add corresponding test
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3843 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2010-05-17 16:57:52 +00:00
msridhar1 19bcb326a4 slicer bug fix: properly include the actual call statement (along with various PARAM_CALLER statements) in the set of call statements
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3807 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2010-04-19 23:03:47 +00:00
sjfink a26c27be44 fix generic types on EdgeManager.getPredNodes and getSuccNodes. finally.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3707 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-06-26 14:14:21 +00:00
sjfink 1d560e809d tweak comments and formatting
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3653 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-06-12 14:19:54 +00:00
sjfink de6adbc4d7 more migration to Java assertions
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3559 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-05-01 17:42:28 +00:00
sjfink 9939142eae switch from Assertions._assert to Java assertions
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3555 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-04-30 13:16:52 +00:00
sjfink 04722c0331 comments and imports
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3478 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-04-17 20:01:35 +00:00
msridhar1 e08ed2663f Deprecate Iterator2Collection.toCollection(); use toSet() or toList() instead.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3421 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-04-09 15:24:42 +00:00
yinnon_haviv 235a85fe36 Added the possibility to serialize analysis scope.
ShallowAnalysisScope can be created from an analysis scope.
It includes all information but the array class loader (for which serialization is problematic).



git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3276 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-03-11 15:26:28 +00:00
sjfink 4d1f7ab35f more IllegalArgumentExceptions
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3272 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-03-10 21:18:07 +00:00
dolby-oss b61135c8be adapt to Shrike changes: divorce SSAInstruction from the Shrike Instruction, which requires adding a type parameter to ControlFlowGraph and propagating that change. Also, stop using the JVML opcode in a few places where it was (unnecessarily) being used.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3227 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-02-19 15:58:31 +00:00
sjfink dfcbf65e7b misc. minor cleanups
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2988 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-08-14 21:05:14 +00:00
sjfink 9cbbc78c86 tweak phi dependencies
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2971 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-07-27 22:16:41 +00:00
dolby-oss 86a007ea0d account for control dependences of phi nodes
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2967 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-07-27 21:37:47 +00:00
sjfink af88727114 avoid some calls to clone()
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2798 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-05-12 12:25:00 +00:00
sjfink 8bdf08b27d lazy calculation of callee params
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2761 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-04-15 19:56:50 +00:00
sjfink f89380f996 fix hashcode problems and misc. minor cleanups
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2734 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-03-31 15:47:58 +00:00
sjfink 660f3a6707 more reflection support
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2673 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-03-04 19:48:51 +00:00
sjfink 8a42bbb018 remove troublesome assertion
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2552 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-02-08 02:09:30 +00:00
sjfink fffb7ac8bc bug fixes and new tests for new Class.forName processing.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2544 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-02-05 21:21:33 +00:00
sjfink 1ceeeebe3f generalize support for partially balanced tabulation
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2539 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-02-05 15:56:32 +00:00
sjfink c38525d185 tabulation API generalization
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2532 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-02-04 21:01:34 +00:00
msridhar1 6b274cdc57 make ignoring alloc heap defs a parameter instead of a static final boolean
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2473 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-01-25 03:24:29 +00:00
sjfink 5281ead5d8 implement hasEdge
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2418 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-01-21 14:10:34 +00:00