Commit Graph

67 Commits

Author SHA1 Message Date
Julian Dolby b2503628a4 1) a bit more source mappimg information
2) fixes to how Contexts are combined
2018-10-13 08:42:08 -04:00
Julian Dolby 9aed4e058d more tracking of sourse positions for function parameters 2018-06-05 15:00:31 -04:00
Julian Dolby 400b2055ce break basic blocks at eachelementget instructions 2018-05-30 12:26:19 -04:00
Julian Dolby c8cdaf8616 further refactoring to enable more reuse
eliminate all non-jva 8 compilation
2018-02-05 15:18:37 -08:00
Julian Dolby cd944a8f12 refactoring of CAst front end machinery to allow more reuse 2018-01-25 14:42:27 -05:00
Ben Liblit 0286c2b048 Use Iterator2Iterable helper to convert more loops to for-each 2017-12-04 14:04:39 -08:00
Ben Liblit 61e9641094 Semantics-preserving control-flow tweaks to fix switch warnings
Eclipse was warning that these `switch` statements had no `default`
cases.  Each did have some default behavior, but implemented outside
the `switch`.  By moving the default behavior into a `default` case
within the `switch`, we eliminate a static warning with no change
whatsoever to the run-time behavior.
2017-08-15 14:55:34 -07:00
Julian Dolby cc8831ebcf misc fixes, and optional new translation for for..in; ultimately, this new translation is better, but for now it breaks some correlation-tracking tests, so it is available only as an option. 2017-08-06 18:36:33 -04:00
Julian Dolby 12e736b36f Merge branch 'master' of https://github.com/wala/WALA 2017-07-15 14:01:51 -04: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
Julian Dolby 289efc3bb8 Merge branch 'master' of https://github.com/wala/WALA 2017-07-12 08:08:34 -04:00
Julian Dolby 163e10f5e4 Merge branch 'warning-fixes-plug-in-development-misc' of https://github.com/liblit/WALA 2017-06-22 09:27:47 +02:00
Ben Liblit 72c754e874 Declare private methods static wherever possible
If a method is private, there's no risk that a subclass elsewhere
might be overriding it and depending on dynamic dispatch to choose the
right implementation.  So all of these private methods can safely be
declared static without risk of regression in either WALA code or
unseen third-party code.
2017-06-07 08:29:23 -07:00
Julian Dolby f54346b36c Merge branch 'master' of https://github.com/wala/WALA 2017-05-08 10:48:05 -04:00
Ben Liblit 4cef26162c Add @Override annotations wherever possible (#178)
* Fix warnings about unset javacProjectSettings build entries

Specifically, these are all warnings of the form "The
'javacProjectSettings' build entry should be set when there are project
specific compiler settings".

* Add @Override annotations to all methods that do override

This fixes 287 Eclipse code style warnings.

* Cannot add @Override annotations here, so suppress warnings instead

We should be able to add these @Override annotations in the future,
one Eclipse Mars and earlier are no longer supported.  For now,
though, they have to go away in order to be compatible with older
Eclipse releases.
2017-05-08 07:39:49 -07:00
Julian Dolby 0bd59c95b6 merge 2017-05-07 19:51:30 -04:00
Ben Liblit aa878f0b68 Fix 11 Eclipse warnings about redundant interfaces 2017-03-20 00:43:57 -05:00
Ben Liblit 994a70500f Remove redundant generic type parameters where possible
Instead, rely on Java's ability to infer type parameters in many
contexts.  This removes 665 Eclipse warnings.

Note: a few of these changes are to files under "test" subdirectories.
Presumably those are files that serve as test inputs rather than being
part of WALA code proper.  As far as I can tell, these changes do not
break any WALA tests.  But if any of those tests were specifically
intended to exercise WALA on code with non-inferred generic type
parameters, then I really should be leaving those alone.
2017-03-11 21:20:51 -06:00
Ben Liblit 1cf7f0f3d3 Merge branch 'master' of github.com:wala/WALA 2017-03-11 20:21:51 -06:00
Ben Liblit 5a5cccc062 Strip execute bits from many non-executable (i.e., non-script) files 2017-02-23 06:10:08 -06: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 50ce960170 fix to rewriter creation 2017-01-19 22:13:53 -05:00
Julian Dolby 2396d0fad3 Revert "Revert "fixes to getting source positions from JVML""
This reverts commit 619df0a83d.
2017-01-19 19:12:22 -05:00
Julian Dolby 619df0a83d Revert "fixes to getting source positions from JVML"
This reverts commit 9e35099326.
2017-01-19 18:49:02 -05:00
Julian Dolby 9e35099326 fixes to getting source positions from JVML
CAst rewriter abstraction
2017-01-19 17:52:42 -05:00
Julian Dolby 31e4028a94 adapt to wala changes 2015-10-14 13:36:48 -04:00
Julian Dolby 487f6cc150 move to Rhino 1.7.6 2015-08-14 12:27:13 -04:00
Julian Dolby 563b6ba6aa fixes for for ... in ... form in JavaScript 2015-07-24 22:44:10 -04:00
Julian Dolby c9ad359d65 new test to remind me that prototype no longer works with correlation tracking:
com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/test/TestPrototypeCallGraphShapeRhino.java
com.ibm.wala.cast.js.test/harness-src/com/ibm/wala/cast/js/test/TestPrototypeCallGraphShape.java
com.ibm.wala.cast.js.test.data/examples-src/pages/prototype.html

work (not yet finished) on fixes to property accesses for JavaScript:
com.ibm.wala.cast/source/java/com/ibm/wala/cast/ipa/callgraph/AstSSAPropagationCallGraphBuilder.java
com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/ipa/callgraph/AstJavaSSAPropagationCallGraphBuilder.java
com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/ipa/callgraph/JSSSAPropagationCallGraphBuilder.java

currently unused tests to remind me to fix bugs:
com.ibm.wala.cast.js.test/harness-src/com/ibm/wala/cast/js/test/TestSimpleCallGraphShape.java
com.ibm.wala.cast.js.test.data/examples-src/tests/loops.js
com.ibm.wala.cast.js.test.data/examples-src/tests/primitive_strings.js

fixes to exception handler code generation in JavaScript:
com.ibm.wala.cast.js.rhino/source/com/ibm/wala/cast/js/translator/RhinoToAstTranslator.java
com.ibm.wala.cast.js.test.data/examples-src/tests/try.js
com.ibm.wala.cast.js.test/harness-src/com/ibm/wala/cast/js/test/TestSimpleCallGraphShape.java

fixes to make the system build on both juno and luna
com.ibm.wala.cast.js.test.data/pom.xml
pom.xml
targets/e42/e42.target
targets/e44/e44.target
targets/pom.xml
com.ibm.wala.core.tests/META-INF/MANIFEST.MF
com.ibm.wala.dalvik.test/META-INF/MANIFEST.MF
com.ibm.wala.ide.jdt.test/META-INF/MANIFEST.MF
com.ibm.wala.ide.jdt/source/com/ibm/wala/cast/java/translator/jdt/FakeExceptionTypeBinding.java
com.ibm.wala.ide.jdt/source/com/ibm/wala/ide/util/JavaEclipseProjectPath.java
com.ibm.wala.ide.jsdt.tests/META-INF/MANIFEST.MF
com.ibm.wala.ide.jsdt.tests/src/com/ibm/wala/ide/jsdt/tests/AbstractJSProjectScopeTest.java
com.ibm.wala.ide/src/com/ibm/wala/ide/util/EclipseProjectPath.java
com.ibm.wala.ide/src/com/ibm/wala/ide/util/ProgressMonitorDelegate.java

beginnings of "pointer analysis" on top of field-based analysis
com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/callgraph/fieldbased/flowgraph/FlowGraph.java
com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/callgraph/fieldbased/flowgraph/vertices/PropVertex.java
com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/callgraph/fieldbased/flowgraph/vertices/RetVertex.java
com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/callgraph/fieldbased/flowgraph/vertices/VarVertex.java
com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/callgraph/fieldbased/flowgraph/vertices/VertexFactory.java
com.ibm.wala.core/src/com/ibm/wala/ipa/callgraph/propagation/PointerAnalysis.java
com.ibm.wala.core/src/com/ibm/wala/ipa/callgraph/propagation/cfa/ExceptionReturnValueKey.java

fixes for crashes in correlartion tracking
com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/ipa/callgraph/correlations/extraction/ClosureExtractor.java

fixes for Dalvik IR generation
com.ibm.wala.core/src/com/ibm/wala/cfg/BytecodeCFG.java
com.ibm.wala.core/src/com/ibm/wala/cfg/ShrikeCFG.java
com.ibm.wala.core/src/com/ibm/wala/ssa/SSACFG.java
com.ibm.wala.dalvik.test/source/com/ibm/wala/dalvik/drivers/APKCallGraphDriver.java
com.ibm.wala.dalvik.test/source/com/ibm/wala/dalvik/test/callGraph/JVMLDalvikComparison.java
com.ibm.wala.dalvik/src/com/ibm/wala/dalvik/classLoader/DexCFG.java
com.ibm.wala.dalvik/src/com/ibm/wala/dalvik/dex/instructions/UnaryOperation.java
com.ibm.wala.dalvik/src/com/ibm/wala/dalvik/ssa/AbstractIntRegisterMachine.java
com.ibm.wala.dalvik/src/com/ibm/wala/dalvik/ssa/DexSSABuilder.java

fixes to stack map generation when instrumenting for Java 7
com.ibm.wala.shrike/src/com/ibm/wala/shrike/cg/DynamicCallGraph.java
com.ibm.wala.shrike/src/com/ibm/wala/shrikeBT/ConstantInstruction.java
com.ibm.wala.shrike/src/com/ibm/wala/shrikeBT/analysis/Analyzer.java
com.ibm.wala.shrike/src/com/ibm/wala/shrikeBT/analysis/ClassHierarchy.java
com.ibm.wala.shrike/src/com/ibm/wala/shrikeBT/analysis/Verifier.java
com.ibm.wala.shrike/src/com/ibm/wala/shrikeBT/shrikeCT/ClassInstrumenter.java
com.ibm.wala.shrike/src/com/ibm/wala/shrikeCT/StackMapConstants.java
com.ibm.wala.shrike/src/com/ibm/wala/shrikeCT/StackMapTableReader.java
com.ibm.wala.shrike/src/com/ibm/wala/shrikeCT/StackMapTableWriter.java
2014-10-15 16:01:38 +09:00
Julian Dolby dd3124479e allow control flow in induced cfgs, and various related fixes 2014-07-08 14:44:06 -04:00
Julian Dolby e58ec4dba8 new special parent scope for cases where JavaScript redefines a variable using a reference to the existing definition 2014-06-26 11:05:43 -04:00
Julian Dolby a5a80e7848 heurisitics to make readable names for anonymous functions 2014-05-28 13:32:55 -04:00
Julian Dolby 893f4b7308 type in CAst var decls 2014-03-16 18:05:49 -04:00
Julian Dolby 27dc4c0bb2 ignore debugger token 2014-02-08 21:35:53 -05:00
Julian Dolby 026f04cbfc get more error information from Rhino 2013-11-26 17:20:16 -05:00
Julian Dolby beab92e359 Fixed bugs in the front end handling esoteric cases of weird control
flow.

added support for JavaScript projects read from Eclipse that are based
on HTML files as well as JavaScript files
2013-07-30 14:04:08 -04:00
Julian Dolby 080325b5f6 merge 2013-06-25 11:57:37 -04:00
Manu Sridharan 3b1889121b add missing copyright headers 2013-05-22 15:39:19 -07:00
Julian Dolby 87b856928c fixes for handling parse errors in JS and HTML 2013-03-01 10:07:20 -05:00
Julian Dolby afccdd2189 Annotation support 2013-02-02 21:27:45 -05:00
Julian Dolby 9aa474fdb1 1) added InstanceKey.getCreation sites and its implementations
2) fixes for issues with keys representing dynamic properties
  i) all properties are converted to strings, in an approximation of JS
semantics
3) fix to handling of instance keys representing numbers in binary +;
now it understands that adding constant keys of type Number requires
adding a non-constant Number key to the lval
2013-01-07 20:18:27 -05:00
dolby f7a7d66b28 move loop unrolling code to wala from Miniatur/MemSAT 2012-10-03 10:53:04 -04:00
dolby 319eacc529 merge changes and changes for atomic sets work 2012-08-29 16:35:34 -04:00
dolby b6ee356641 tests for source mapping 2012-05-11 15:03:10 -04:00
dolby dfe06b8ff3 changes to Web source mapping to exploit rhino 1.7R3 source offsets 2012-05-08 13:17:01 -04:00
dolby-oss a9ec87f360 Changes motivated by analysis issues in JavaScript. The main change is that calls of the form f.x() in JavaScript are now analyzed like 'method calls' so that the 'this' pointer in the receiver functions can be filtered based upon the types that actually have the method being invoked. This requires much more dynamic filtering than in a language like Java, since properties like 'x' are simply properties that happen to hold functions, and so can be assigned in a first-class manner. Thus, the filtering needs to handle variance in both the types and the values of their properties; this is implemented as multiple levels of abstract object directed side effect equations in the dataflow system.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4535 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-03-01 02:45:51 +00:00
dolby-oss 00b51cd14c make more stuff into BLOCK_STMT
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4454 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-08 17:10:24 +00:00
msridhar1 a52455972c Adding support for unary "void" operator.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4447 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-08 15:34:10 +00:00
msridhar1 daf36902bd Avoid plugging in the same AST node twice when creating code for a
method call.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4444 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-08 15:33:35 +00:00
msridhar1 1e0ad9dbc6 Put stderr output under DEBUG flag.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4437 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-08 15:32:03 +00:00