Compare commits

...

2536 Commits

Author SHA1 Message Date
Achim D. Brucker b3ac9e29ba Marked development version 2018-10-29 08:26:36 +00:00
Achim D. Brucker 96b9968b65 Preparing release of version 1.5.1.S.DASCA.1.0.0. 2018-10-29 08:04:08 +00:00
Achim D. Brucker 87bef0017e Updated publishing URL. 2018-10-27 15:43:15 +01:00
Achim D. Brucker 186a33333f Updated versioning schema. 2018-10-27 14:45:13 +01:00
Achim D. Brucker af0b88038a Marked development version. 2018-10-27 10:50:29 +01:00
Achim D. Brucker ffd165a7f2 Updated instructions how to update version strings. 2018-10-27 10:50:07 +01:00
Achim D. Brucker 8e11e605a4 Updated documentation. 2018-10-27 10:41:21 +01:00
Achim D. Brucker 29a2dcec9d Added configuration for publishing artifacts to artifacts.logicalhacking.com. 2018-10-27 10:31:44 +01:00
Achim D. Brucker d28d21d820 Added DASCA version postfix. 2018-10-23 21:00:48 +01:00
Achim D. Brucker c285cc72d2 Moved resource declaration into try-statement. 2018-10-21 20:20:13 +01:00
Achim D. Brucker d53814e154 Restored error level for org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable. 2018-10-21 18:29:40 +01:00
Achim D. Brucker 3d5dec0b0c Manual merge. 2018-10-21 16:31:25 +01:00
Julian Dolby 2d2d6070ff more talking 2018-10-20 12:16:43 -04:00
Julian Dolby 8381141e54 try out instead of err output 2018-10-19 22:31:10 -04:00
Julian Dolby a1649be85b talk to Travis 2018-10-18 23:23:24 -04:00
Julian Dolby 869ca81272 more memory, parallelism for tests 2018-10-18 22:55:13 -04:00
Julian Dolby 38c5de6160 fix for forName selector: use the CHA in getRelevantParameters to resolve
the declared target of the call site.  This is needed to make sure
forName targets loaded with the Application loader get resolved to point
to the real metod reference for forName.

this issue actually manifested itself in the Kawa Chess program, and so
I have added an assertion to make sure this resolution is done properly.
2018-10-18 22:25:21 -04:00
Julian Dolby 533d392bda support for method argument default values 2018-10-17 19:44:44 -04:00
Julian Dolby 948d69cbb8 fix for Soot: trim instruction array to avoid nulls 2018-10-16 21:43:26 -04:00
Julian Dolby d690d94cdd more use for object literals 2018-10-16 00:34:31 -04:00
Julian Dolby bf3c419e1c test for presence of nodes in Kawa chess test that need method handles
and string constants to play nicely together.
2018-10-15 02:12:42 -04:00
Julian Dolby 89492c28fa more heap space for tests 2018-10-13 09:27:38 -04:00
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 31cf42674a Merge branch 'master' of github.com:wala/WALA 2018-10-03 09:02:26 -04:00
Julian Dolby 7a7d341c94 merge 2018-10-03 09:02:07 -04:00
Erik Derr 018e9d20eb Fixes Exception in AndroidAnalysisScope (#361)
Fixes inconsistent behavior of the exclusions argument.
Depending on the androidLib argument, setting exclusions to null
is either fine or raises and exception.

This patch makes exclusions truely optional for any case
when null is passed.
2018-10-02 22:29:44 -07:00
Erik Derr ee13713c4d Impl of IMethod.is(Wala)Synthetic and IClass.isSynthetic (#359)
* Impl of IMethod isSynthetic and isWalaSynthetic

So far IMethod.isSynthetic referred to WALA-generated helper functions
and there was no equivalent to check whether an IMethod is synthetic in
terms of compiler-generated.

To make naming consistent this patch first renames the isSynthetic to
isWalaSynthetic to clearly indicate that a given IMethod was generated
by WALA. Then, we re-introduce isSynthetic that from now on checks
whether an IMethod is synthetic/compiler-generated (referring to the
synthetic flag in bytecode)

* Implementation of IClass.isSynthetic

Complementary to IMethod.isSynthetic, this method checks whether
an IClass is compiler-generated.

* updated JavaDoc
2018-10-02 22:28:21 -07:00
Erik Derr 751444a656 Fixes IllegalStateException (#358)
* Fixes IllegalStateException

Reverts refactored code with try-with-resource back to potentially
leaking implementation. The refactored code threw an exception since
JarFileModule does not implement the AutoClosable interface. Further,
removed the printStackTrace() call, as this is not an exceptional case
but intended control-flow in case DexFileModule creation fails.

* Downgrade JarFile leak diagnostic from warning to error

This is consistent with how we are treating potential JarFile leaks in
other WALA components.  WALA issue #236 already notes that these
should be cleaned up eventually, although doing so will not be easy.
2018-09-30 12:19:14 -07:00
Sifis Lagouvardos 6fd67b886e Added multidex apk file in dalvik.test/data and a new test for multidex apk files. 2018-09-21 19:08:06 -07:00
Sifis Lagouvardos 819e7e1a7f Added test for the new DexFileModule constructor that supports specific .dex files. 2018-09-21 19:08:06 -07:00
Sifis Lagouvardos 2ab002df3e Added new DexFileModule constructor to support specific dex files inside apks. 2018-09-21 19:08:06 -07:00
Julian Dolby 1867b57425 move utility so other tests can use it 2018-09-20 14:48:06 -04:00
Julian Dolby 1c6a6b0cbd
Merge pull request #352 from sifislag/master
Added a CAstNode and a CAstOperator to support some wanted python features.
2018-09-12 15:55:57 -04:00
Sifis Lagouvardos be0ef4e16b Added CAstOperator to support the not in operation in Python. 2018-09-12 18:25:21 +03:00
Sifis Lagouvardos 9ce10ab5b9 Added GLOBAL_DECL CAstNode for the python global statement. 2018-09-12 18:21:00 +03:00
Julian Dolby b32704b8a3 Merge branch 'master' of github.com:wala/WALA 2018-09-11 13:57:32 -04:00
Julian Dolby 7f47c7200a dexlib -> 2.2.5 2018-09-11 13:43:07 -04:00
Julian Dolby e4f62978cb comment out non-working test; it seems to look at a URL that no longer
works
2018-09-11 13:39:06 -04:00
Julian Dolby e85f01b2b3 fix for Dalvik instruction generation 2018-09-11 13:36:29 -04:00
Julian Dolby d13a38fbe1
Merge pull request #345 from SunghoLee/master
Fix the comparison method for ConstantKey
2018-08-27 21:47:46 -04:00
Sungho Lee 2640b97b5d Fix comparison method for ConstantKey 2018-08-28 09:47:09 +09:00
Julian Dolby 762389c315
Merge pull request #344 from bryantam/cast_constant-h-add-changes
add missing CAstNodeType to cast_constant.h that are defined in CAstNode
2018-08-26 22:35:58 -04:00
Bryan Tam 6f317bc9fa add missing CAstNodeType to cast_constant.h that are defined in CAstNode 2018-08-23 21:16:24 -04:00
Manu Sridharan 49628fdf44 Start new development version 2018-08-22 12:01:19 -07:00
Manu Sridharan 6b46ce4faa Version 1.5.0 2018-08-22 11:19:51 -07:00
Manu Sridharan 5d7b4d5988 Update change-version.py to handle build.gradle, and clean it up 2018-08-22 09:51:54 -07:00
Julian Dolby c40c7e34f0
Merge pull request #340 from liblit/assorted-gradle-test-fixes
Assorted Gradle test fixes
2018-08-11 16:53:41 -04:00
Ben Liblit 32795455fb Avoid redundant copying of some test resources
These specific test resources are already included in the "testArchives"
configuration of the "com.ibm.wala.core.tests" subproject, upon which
the "com.ibm.wala.dalvik.test" tests already depend.  So there's no need
to also copy these resources into the "com.ibm.wala.dalvik.test" test
resources area as well.
2018-08-11 12:40:44 -05:00
Ben Liblit d9f7abdad3 Augment cleanTest tasks rather than replacing them
Previously I hadn't realized that Gradle's "java" plugin would generate
default "cleanTest" tasks for us.  By defining my own "cleanTest" tasks
we were replacing the generated ones, but what we really wanted to do
was augment them with additional files to delete.
2018-08-11 12:36:22 -05:00
Julian Dolby d92c732dec fix more osx builds 2018-08-08 21:53:41 -05:00
Julian Dolby be7b0deb5f
Merge pull request #338 from liblit/kawa-gradle-improvements
Improvements for Kawa- and JNI-related Gradle build tasks
2018-08-04 18:52:05 -04:00
Ben Liblit e4bb8f2246 Remove redundant "afterEclipseBuildshipImport" dependencies
Every dependency task listed here is already a dependency of at least
one subproject's "processTestResources" task, and each
"processTestResources" task already depends on the corresponding
"afterEclipseBuildshipImport" task.  So listing these tasks here too
is unnecessary.
2018-08-04 05:15:08 -05:00
Ben Liblit febf20145e Rework Kawa download and build tasks to be more Gradle'y
All Kawa-related downloads now use our existing VerifiedDownload task
class.  This gives us Gradle-integrated progress reporting,
incremental build support, build caching, correct dependencies, etc.

Using Kawa to compile Scheme into bytecode now also has proper
dependency management, incremental build support, and build caching.
Same goes for bundling these compiled bytecode files into jar archives
for later use in regression tests.

Also, when downloading kawa-chess, grab a specific commit hash rather
than whatever is the most recent master commit.  If this project
changes in the future, we don't want our tests to break unexpectedly.
Perhaps we'd want to pick up any new kawa-chess commits; perhaps not.
Either way, that should be a conscious decision rather than something
that can happen behind our backs.
2018-08-04 04:37:41 -05:00
Ben Liblit 8324a9cb56 Ignore downloaded "kawa-chess" subdirectory
This is not our source code.  It's just a clone of someone else's Git
repository.  Maven or Gradle will recreate it when asked to do so.
2018-08-04 04:35:30 -05:00
Ben Liblit a7cef8e77a Declare a task's outputs, enabling incremental build and caching
This specific task runs an external command, and we consider the task
successful if that command exits without error.  We don't actually
examine the stdout or stderr of the command being run.

However, it is still useful to log the stdout and stderr to a file,
and to declare that file to be the output of the task.  Otherwise, the
task has no declared outputs at all.  A task with no outputs is
ineligible for caching and is always considered to be out-of-date.

squash! Declare a task's outputs, enabling incremental build and caching
2018-08-04 04:29:59 -05:00
Julian Dolby e0ad8fd9f7 try Xcode version recommended by Travis 2018-08-03 16:21:03 -04:00
Julian Dolby c5cdb9e32a clean up MethodHandle support 2018-08-03 15:52:24 -04:00
Julian Dolby 25bb519221 set version for macos 2018-08-03 08:21:41 -04:00
Julian Dolby d54859f923 revert chnage 2018-08-03 00:29:29 -04:00
Julian Dolby 530c6d5bd7 put kawa.jar in proper place 2018-08-03 00:08:46 -04:00
Julian Dolby 768a546f19 try to force kawa compiles 2018-08-03 00:02:12 -04:00
Julian Dolby 01af1c6ddc try more kawa compile hacks 2018-08-02 23:21:47 -04:00
Julian Dolby 62931350eb try hacks for kawa 2018-08-02 22:56:15 -04:00
Julian Dolby b9400f816e copy kawa jar 2018-08-02 21:58:05 -04:00
Julian Dolby 82061c83e0 exclusions for GUI 2018-08-02 21:41:08 -04:00
Julian Dolby 415fd39f0d ant work 2018-08-02 21:20:06 -04:00
Julian Dolby 834927239c gradle work 2018-08-02 21:17:52 -04:00
Julian Dolby a4eb79edbe another try to fix gradle on travis 2018-08-02 20:21:18 -04:00
Julian Dolby 9af2e30262 try fix to gradle build 2018-08-02 20:08:21 -04:00
Julian Dolby e6136a0045 Merge branch 'master' of github.com:wala/WALA 2018-08-02 19:38:14 -04:00
Julian Dolby 7e6cfe84f6 more support for method handles, particularly for ones created with
reflection.
2018-08-02 19:35:32 -04:00
Ben Liblit cc2ba19b7c Categorize Eclipse sources as main vs. test
This leverages new Eclipse 4.8 (Photon) features that distinguish main
code from test code:
<https://www.eclipse.org/photon/noteworthy/index.php#test-sources>.
An eventual fix to <https://github.com/gradle/gradle/issues/4802>
might mean that Buildship starts doing this automatically, but for now
we can do it ourselves.

If using an older Eclipse release, this change does nothing useful,
but neither does it cause any harm.
2018-07-30 09:17:05 -07:00
Julian Dolby 0ad11fefc3 work on Wala with Yannis' group 2018-07-22 16:19:32 -04:00
Ben Liblit 8edfd285d7 Turn off a Gradle warning about Gradle 5.0 incompatibility
The issue here is a planned change to how "publishing" blocks work.
Per
<https://docs.gradle.org/4.9/userguide/publishing_maven.html#publishing_maven:deferred_configuration>,
the right way to prepare for this change is to enable it and check for
unexpected changes in what gets published to a local repository.  I
have done this, and find no unexpected changes.

So we are actually ready for Gradle 5.0; the warning is a false
positive for us.  Leaving the future change enabled means we won't
keep seeing this warning.  It also means that any further changes to
our use of "publishing" will be tested under that future change, which
is a good way to avoid surprises later.
2018-07-22 02:42:54 +02:00
Leo Li d15f49bd90 Add install_name when build libcast on macos. (#332)
Gradle won't pass absolute path when build libcast. We need to set install_name manually otherwise `dyld` would not able to find libcast at runtime.

This is only needed on macos since `ld` will look up all runtime search path automatically.
2018-07-22 02:42:19 +02:00
Ben Liblit bc3ea1a777 Fix a spelling error in a comment 2018-07-20 08:44:23 +02:00
Ben Liblit 2b2483abd6 Avoid dereferencing null if no C/C++ compiler is present
Fixes #328, which requested better diagnostic messages in the case of
a missing C/C++ compiler toolchain.  Gradle actually has perfectly
good, informative messages in that case.  Unfortunately, we were
killing the build by dereferencing null before Gradle had a chance to
explain.  Now we bail out of some setup work early to avoid the null
dereference, thereby letting Gradle explain things properly.
2018-07-20 08:44:23 +02:00
Ben Liblit 10d3adf324 Retry download task if the destination file is missing
Under some circumstances, Gradle seems to decide that the destination
file being absent is the download task's expected outcome.  It caches
this state, and refuses to retry the download in the future since it
thinks the task is up-to-date.  We can correct this by telling Gradle
that the task should not be considered up-to-date if the file is
missing, as recommended by
<https://discuss.gradle.org/t/task-up-to-date-but-outputfile-not-created/17568/2>.
2018-07-20 08:44:23 +02:00
Ben Liblit 0510c914bb Update Gradle wrapper to release 4.9
Gradle 4.9 has no new features of particular interest to us.  It's
good to stay up-to-date, though.
2018-07-20 08:44:23 +02:00
Ben Liblit 72e9ba31f8 Use more complete Gradle package for better IDE support
In particular, using the "all" package (which includes source) allows
IntelliJ IDEA to provide autocompletion and other nice features that
are unavailable when using the "bin" package.
2018-07-20 08:44:23 +02:00
Ben Liblit c242f6126c Publish all generated Java bytecode jar archives
Previously we were only publishing source archives.  This fixes
wala/WALA#326 if I got everything right on the first try.  More likely
is that we will need a few rounds of revision before it's all doing
what it should.  For example, we may need to customize aspects of the
Gradle-generated "*.pom" files as described at
<https://docs.gradle.org/current/userguide/publishing_maven.html#sec:identity_values_in_the_generated_pom>
and
<https://docs.gradle.org/current/userguide/publishing_maven.html#sec:modifying_the_generated_pom>.
2018-07-19 22:23:14 +02:00
Manu Sridharan 2b1d82d1bb Expand missing super test 2018-07-19 18:17:59 +02:00
Manu Sridharan a78af3f67e
Add API to add an InputStream for a jar to an AnalysisScope (#330)
This is useful, e.g., if you have the bytes of a jar file in memory and want to load it into an `AnalysisScope`.
2018-07-19 17:01:51 +02:00
Manu Sridharan aeb17dfca4
Allow for classes with missing superclasses in class hierarchy (#329)
Fixes #322 

We add an option `createPhantomSuperclasses` to `ClassHierarchy`.  When set, if a superclass is missing, we create a new `PhantomClass` in its place and allow the subclass to be added.

To use, you can create the `ClassHierarchy` with the new `ClassHierarchyFactory.makeWithPhantom` methods.
2018-07-19 16:10:35 +02:00
Julian Dolby 5edf49254c ore meta data 2018-07-19 14:02:04 +02:00
Julian Dolby fc261b6ee7 mata data 2018-07-19 13:51:06 +02:00
Julian Dolby 6e6b29339c latest dexlib 2018-07-19 12:45:17 +02:00
Julian Dolby 1bbca5a222 Merge branch 'master' of github.com:wala/WALA 2018-07-15 12:41:25 +02:00
Julian Dolby c5f812d784 fix script for python 3 2018-07-15 12:41:18 +02:00
Ben Liblit 1ac4ca9475 Tweaks and instructions for WALA as an IntelliJ IDEA project
We already had some IntelliJ IDEA project metadata files in ".idea".
I've revisited and updated those now that I have more experience with
Gradle + IntelliJ IDEA + Git.  I think this now represents a better
set of decisions regarding what does and does not belong in version
control.

This commit also extends "README-Gradle.md" with clear instructions on
how to bringup WALA as a top-level IntelliJ IDEA project.  The
instructions are of a similar flavor to the Eclipse instructions that
were already present, though the details vary.  Most notably, with
IntelliJ IDEA you should *open* WALA as an existing project,
not *import* it as a new Gradle project derived from "build.gradle".
This is exactly the reverse of what one should and shouldn't do for
WALA in Eclipse.
2018-07-12 14:52:13 -07:00
Julian Dolby ed59197ae3
Merge pull request #325 from liblit/miscellaneous-ide-updates
Miscellaneous IDE updates
2018-07-12 12:57:40 -04:00
Ben Liblit 858148e91b Reorganize how we deal with shared JavaScript test examples
When IntelliJ IDEA imports WALA's Gradle configuration, it creates
what is calls a "module" for each sourceSet of each Gradle subproject.
In so doing, it automatically picks up the source and resource
directories used by each of these sourceSets.  Unfortunately, IntelliJ
IDEA does not allow multiple modules to share a single root directory
as their source or resource directories, and that's exactly what was
going on with the "example-src" subdirectory under
"com.ibm.wala.cast.js.test.data".

This revised Gradle configuration still has is copying the necessary
"example-src" resources to the appropriate locations for use as test
resources.  But IntelliJ IDEA no longer treats "example-src" as a root
directory for resources in the automatically-generated modules.  So
now we get along nicer with IntelliJ IDEA while keeping everything
working with Gradle as well.
2018-07-11 16:13:05 -05:00
Ben Liblit 3d9e4d23d8 Add helper task for extra setup after opening in IntelliJ IDEA
This task serves a similar role to the "afterEclipseBuildshipImport"
task used with Eclipse.  It should only be necessary to build this
task once:  in a freshly checked-out tree, just after opening it for
the first time in IntelliJ IDEA.

Ideally this extra setup task would be triggered automatically using
the "Tasks Activation" feature of IntelliJ IDEA's Gradle support.
Unfortunately, "Tasks Activation" settings are recorded in
".idea/workspace.xml", which is used for non-revision-tracked personal
settings.
2018-07-11 15:13:39 -05:00
Ben Liblit 7c2189849f Add a stub JDT preferences file, originally created by Buildship 2018-07-11 15:11:44 -05:00
Julian Dolby dc47e1da98 add default methods to instruction visitors
relax dump api
2018-07-10 21:53:48 -04:00
Julian Dolby ef89dc5345 a little tolerance for sloppy models 2018-07-04 15:46:06 -04:00
Julian Dolby bc0309b5ba Merge branch 'master' of github.com:wala/WALA 2018-06-27 14:58:10 -04:00
Julian Dolby fe1247f2ce switch to rhino 1.7.10 2018-06-27 14:57:35 -04:00
Ben Liblit 6be7a1a8a2 Have Travis CI periodically try to build each subproject separately
If Gradle dependencies are set up correctly, then it should be
possible to build any subproject starting with a pristine tree.
These take too long to use for every commit, pull request, etc.  But
running an extensive test like this periodically (e.g., weekly) seems
reasonable.
2018-06-26 09:19:02 -07:00
Ben Liblit 36320a078c Upgrade Gradle wrapper to release 4.8.1
No significant changes in this release that affect us, but it's good
to stay up-to-date.
2018-06-26 08:31:59 -07:00
Julian Dolby 0752bf321c Merge branch 'master' of github.com:wala/WALA 2018-06-22 21:49:06 -04:00
Julian Dolby 37eea27f4a more support for out-of-order lexical declarations 2018-06-22 19:49:49 -04:00
Julian Dolby 4de0ed876d remove overly conservative assertion 2018-06-22 07:26:38 -04:00
Julian Dolby af639ec654
Merge pull request #319 from liblit/minor-tidying-up
Minor tidying up
2018-06-10 22:01:03 -04:00
Ben Liblit bc86a27e85 Remove a subproject ".gitignore" whose patterns no longer apply
Perhaps files once existed here that matched the given exclusion
patterns, but there are certainly no such files here now.
2018-06-09 18:46:11 -05:00
Ben Liblit 2fcd079fe2 Anchor many ignore patterns that only apply at the topmost level 2018-06-09 18:46:11 -05:00
Ben Liblit ddeb2bd8ab Ignore a Visual Studio Code settings file
The settings I am seeing in here so far seem like per-developer
preferences, not shared per-project configuration information.
2018-06-09 18:46:11 -05:00
Ben Liblit c4f127f371 Subproject "com.ibm.wala.cast.js.test.data" contains no Java code 2018-06-09 18:46:11 -05:00
Julian Dolby b1b09684bd
Merge pull request #317 from liblit/future-java-compatibility-fixes
Future Java compatibility fixes
2018-06-06 12:52:51 -04:00
Ben Liblit 5336a08af2 Avoid using deprecated boxing constructors
Boxing a primitive using the constructor ("new Integer(4)") always
creates a distinct new boxed instance.  That's rarely what you need,
and in fact all of those constructors have been deprecated in Java 9.
Using the static "valueOf" method instead ("Integer.valueOf(4)") can
give better performance by reusing existing instances.  You no longer
get a unique boxed object, but generally that's OK.
2018-06-05 14:44:59 -05:00
Julian Dolby 9aed4e058d more tracking of sourse positions for function parameters 2018-06-05 15:00:31 -04:00
Ben Liblit 32e105a3c0 Skip a specific test if offline; this test requires network access 2018-06-04 12:29:57 -05:00
Ben Liblit 5cf8b7efe3 Stop using deprecated "javah" to generate JNI headers
"javah" was deprecated in Java 9, and has been removed entirely in
Java 10.  The right way to generate headers now is by using the "-h"
flag to "javac".  When "javac" is run in this way, it still generates
bytecode too.  So ideally, we'd run "javac" just once to generate
bytecode and headers simultaneously.  Fortunately, the Gradle JNI
plugin at <https://github.com/wpilibsuite/gradle-jni> help us do this
cleanly.  Nice!
2018-06-04 12:29:57 -05:00
Ben Liblit 85651608e9 Don't use interpolated strings unless actually needed 2018-06-04 12:28:42 -05:00
Ben Liblit 6679262707 Refactor linker logic, and add "smoke_main" to automated tests
Previously we were compiling and linking "smoke_main", but not
actually running it as part of automated testing.  I simply overlooked
this in the process of recreating the Maven build logic in Gradle.
Now we run "smoke_main" when testing, which turns out to be a pretty
good test of our management of both Java search paths as well as
linker / shared library search paths.
2018-06-04 12:28:42 -05:00
Ben Liblit fbac524a02 Find JVM shared library better across versions and operating systems
We now use "-rpath" on both Linux and macOS.  This linker flag sets
the ELF RPATH on Linux, and the "@rpath" attribute on macOS, but
effectively it's doing the same thing, and that same thing is exactly
what we want.  I think.

On Linux, we also now look for the JVM shared library in three
different places.  The library has moved between Java 8 and 9, and
even on Java 9 it goes in a different place on Fedora 28 versus Ubuntu
16.04.
2018-06-04 12:28:42 -05:00
Ben Liblit 24151e7422 Don't specify Java version; defaults to whatever JVM is being used 2018-06-04 12:28:42 -05:00
Ben Liblit c7344e611a Remove TODO comment about producing native components for test only
According to
<https://docs.gradle.org/current/userguide/native_software.html>,
"When you assemble dependents of a component, the component and all of
its dependents are compiled and linked, including any test suite
binaries."  So it's intentional that the "assemble" task causes
creation of the smoke_main executable and xlator_test shared library.
Nothing TODO here; the current behavior is as designed.
2018-06-04 12:28:42 -05:00
Ben Liblit 2067d6c37a Open up some more vertical white space 2018-06-04 12:28:42 -05:00
Ben Liblit 989ef3ec43 Help Java 9 with some tricky generics type inference
The existing code worked fine under Java 8, but Java 9 fails to
resolve type constraints unless it has more explicit information about
at least one of the arguments to anyOf.  Weird.
2018-06-04 12:28:42 -05:00
Julian Dolby d2852beebf
Merge pull request #312 from liblit/gradle-load-plugins-modernization
Load Gradle plugins using “plugins” closure rather than “apply plugin”
2018-06-04 12:22:33 -04:00
Julian Dolby d1840f0531 make slicer handle multiple languages, using the Language to build mod and ref visitors 2018-06-01 13:56:08 -04:00
Julian Dolby 196f7cb153 fix for nasty bug in decoding dup2_x2 2018-05-31 19:32:02 -04:00
Julian Dolby 400b2055ce break basic blocks at eachelementget instructions 2018-05-30 12:26:19 -04:00
Ben Liblit e2ce6a84b0 Load plugins using "plugins" closure rather than "apply plugin"
Apparently the latter is considered a "legacy method":
<https://docs.gradle.org/current/userguide/plugins.html#sec:old_plugin_application>.
2018-05-23 16:47:58 -05:00
Julian Dolby 24d7757814
Merge pull request #309 from liblit/junit-4.12
Require JUnit 4.12 instead of 4.11
2018-05-21 21:46:05 -04:00
Julian Dolby 4a372eff2d
Merge pull request #308 from liblit/git-ignore-cleanups
Git ignore cleanups
2018-05-21 21:45:39 -04:00
Ben Liblit decd164fa6 Require JUnit 4.12 instead of 4.11
WALA itself does not use any JUnit 4.12 features.  However, I am
working on a WALA-based project that does require JUnit 4.12.  Mixing
jar versions is a path to madness.  So if the WALA maintainers don't
mind, it would make my life easier if WALA itself required JUnit 4.12.
Otherwise, I need to maintain that 4.11/4.12 difference indefinitely
as a divergence between official WALA and my WALA variant.

I suppose an alternative could be to let the JUnit version be
specified externally somehow. I have not explored this option in
depth, but could look into it if simply moving to JUnit 4.12 is
undesirable.
2018-05-21 17:27:54 -05:00
Ben Liblit b2e190ceed Remove a Java bytecode file that shouldn't be revision-tracked
We have the corresponding ".java" source file, so we can (and do)
rebuild this bytecode file whenever needed.
2018-05-21 16:15:53 -05:00
Ben Liblit 6fe9959a73 Ignore some more IntelliJ IDEA project metadata
I *think* that the per-module configuration metadata that goes here
should be per-developer, not tracked in git.
2018-05-21 16:14:48 -05:00
Ben Liblit 8146db20ff Remove git ignore patterns for several revision-tracked files
Someone may have thought that we were ignoring these files, but we
aren't.  From what I can tell, for these specific files, revision
tracking is intentional.
2018-05-21 16:14:48 -05:00
Julian Dolby 5236b95bd2 tighten type 2018-05-11 12:30:32 -04:00
Julian Dolby a3a6ce3f51 expose copy propagation records to allow better source position mapping even when copy propagation has occurred. 2018-05-09 18:10:20 -04:00
Julian Dolby 6b2db3e190 more-detailed source mapping information 2018-05-08 08:01:35 -04:00
Julian Dolby 8005b665b9 flexibility in how to model constants 2018-04-30 19:09:59 -04:00
Julian Dolby 2a7a98ed32 move code for sharing between javascript and python 2018-04-30 13:33:48 -04:00
Julian Dolby 27a8fff714 ast-based constant folding 2018-04-28 12:05:49 +02:00
Julian Dolby bc4939db97
Merge pull request #303 from liblit/tweaks-for-IntelliJ-IDEA
Tweaks for IntelliJ IDEA
2018-04-25 00:43:40 -04:00
Ben Liblit 45ea8969ed Add or ignore several metadata files created by IntelliJ IDEA
I decided which to keep and which to ignore by following advice given
at
<https://intellij-support.jetbrains.com/hc/en-us/articles/206544839>
and
<https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore>,
which in turn influenced <https://www.gitignore.io/api/jetbrains>.
2018-04-23 15:02:21 -05:00
Ben Liblit f7d07fe757 Ignore "out" subdirectories into which IntelliJ IDEA puts binaries 2018-04-23 14:53:49 -05:00
Ben Liblit e77535a41f Use the full Gradle wrapper distribution instead of just binaries
This follows an IntelliJ IDEA recommendation.  Having the full
distribution allows IntelliJ IDEA to provide contextual help,
autocompletion, etc. for Gradle build scripts.  The disadvantage, I
suppose, is that it imposes a larger download time on first use of
"gradlew".
2018-04-23 14:53:07 -05:00
Julian Dolby 49b0d66512
Merge pull request #300 from liblit/gradle-4.7
Upgrade Gradle wrapper to release 4.7
2018-04-19 08:06:45 -04:00
Ben Liblit 8e27f98f2d Upgrade Gradle wrapper to release 4.7
New features that I like from this release: (1) better output grouping
when building in parallel, and (2) automatic test ordering to try
previously-failing tests first.
2018-04-18 19:32:04 -05:00
Julian Dolby a6096e6d75
Merge pull request #299 from liblit/gradle-and-buildship
Build WALA using Gradle instead of Maven
2018-04-18 12:36:59 -04:00
Ben Liblit 209086f068 Bump version to 1.5.0-SNAPSHOT before merging with WALA master
This gives the WALA maintainers the option of doing future 1.4.5+
releases from of a pre-Gradle branch if these merged Gradle changes
turn out to be more disruptive than expected.
2018-04-18 11:29:29 -05:00
Ben Liblit 8529c10491 Use Gradle to create selected Eclipse metadata before Maven builds
The Eclipse metadata files created in this way are not identical to
those that Buildship would create when importing into Eclipse.  The
tests in com.ibm.wala.cast.java.test.JDTJava15IRTests and
com.ibm.wala.cast.java.test.JDTJavaIRTests seem to pass using either
the Gradle-generated or the Buildship-generated versions.

As an aside, if you generate these files using Gradle first and *then*
import using Buildship, you end up with metadata that is identical to
what you would have had if you'd only imported with
Buildship.  (There's one irrelevant difference in an unimportant
"<comment>" element.)  So Maven's tests should run fine under any
wacky mix of Gradle- and Buildship-generated Eclipse metadata files.

That being said, I recommend not mixing build systems.  WALA can be
built using either Maven, Gradle, or Eclipse+Buildship, but you're
probably better off only using one of these in any given build tree.
A mixed tree *should* probably work, but I haven't tested it
thoroughly, and consider better to avoid doing.

Incidentally, if there are other Maven-preparation steps that we'd
like Gradle to automate for us, that can now be done easily by
creating more "prepareMavenBuild" Gradle tasks in other subprojects
and adding the appropriate dependencies.  For example, it would be
trivial to use this to automate downloading "/tmp/DroidBench",
installing the Android SDK, etc.
2018-04-18 11:29:29 -05:00
Julian Dolby 61972810d0 more work on file names 2018-04-18 11:29:29 -05:00
Julian Dolby 380d0027d7 fixes for nodejs performance 2018-04-18 11:29:29 -05:00
Ben Liblit 00478ea806 Tell Travis CI to be even more patient during initial p2AsMaven downloads 2018-04-18 11:29:29 -05:00
Ben Liblit f28b63a025 Tell Travis CI to be more patient during initial p2AsMaven downloads 2018-04-18 11:29:29 -05:00
Ben Liblit 7cbccb33fb Simplify how we refer to the outputs of certain tasks 2018-04-18 11:29:29 -05:00
Ben Liblit 0e629f68e7 Exclude a test that has started failing due to running out of memory
I don't know what changes are triggering this.  Presumably it's
something to do with the temporary-file code, but I don't see why that
would happen.  For now, let's just skip this test.
2018-04-18 11:29:29 -05:00
Ben Liblit b14804bfdc Don't put fixed-name, writable files into "java.io.tmpdir"
If multiple tests both write to "/tmp/cg.txt" (for example), then
these tests cannot safely run concurrently.  That never used to be a
problem with Maven, since our Maven tests were all strictly sequential
anyway.  But parallelized testing using Gradle requires that we do
better.  Fortunately, Java has perfectly reasonable APIs for
generating uniquely-named temporary files and directories.
2018-04-18 11:29:29 -05:00
Ben Liblit ba01621de5 Don't use build cache (a.k.a. task output caching) under Travis CI
The performance improvement offered by the build cache is modest when
run by Travis CI.  This is probably because Travis CI does not keep
the cache on any local machine.  Instead, Travis CI uploads the build
cache across a network at the end of each run, then restores the cache
across the network at the start of the next run.  So in many cases
we're simply trading network access to original downloads for network
access to the cache image.

Furthermore, it's probably a better test to perform Travis CI testing
jobs from something closer to a clean slate.  We really want to know
whether everything builds and passes tests correctly starting from
nothing.  We don't want to risk accidentally thinking something would
work simply because we have a cached copy of what it did when it
worked previously.
2018-04-18 11:29:29 -05:00
Ben Liblit 47539da731 Unpack Android SDK and install extra components as a single task
Previously we unpacked in one task, then installed two extra
components in two dependent tasks.  However, installing extra
components modifies some files in place, effectively making those
files both inputs and outputs.  That creates race conditions, and
probably interferes with task output caching.  Better, then, to treat
the unpack and extra installations all as a single task whose output
is the complete Android SDK tree with all required components
installed.
2018-04-18 11:29:29 -05:00
Ben Liblit 01fc8fcae5 If tests fail, print full stack traces to aid debugging 2018-04-18 11:29:29 -05:00
Ben Liblit bd42510c6b Enable both parallel builds and build output caching by default
This should give us a nice build-performance boost, both locally and
in Travis CI.  I've used parallel builds routinely for months now, and
they're working fine.  Build output caching is newer, but it also
seems to be working well and saves us tremendous time on downloads.
2018-04-18 11:29:29 -05:00
Ben Liblit 3a1b1d1d1e Allow parallel testing within each subproject
Without this setting, Gradle would run multiple "test" tasks from
multiple subprojects concurrently, but each "test" task would only run
a single test at a time.  Some of our subprojects' test tasks take a
long time to complete, which could easily leave us sequentially
testing on just one or two CPU cores while other cores sit idle.

With this change, Gradle will use as many task slots as are
available (e.g., when run with "--parallel") to run multiple
simultaneous JUnit test classes within any given subproject.  This
seems to be fine for us:  I am unaware of any shared global state that
would cause conflicts between two test classes within any given
subproject.
2018-04-18 11:29:29 -05:00
Ben Liblit 4840966807 Don't try to exhaustively anticipate all generated header names
When JNI headers for a given class, each nested class will end up with
its own additional header.  But I don't want to try to parse nested
class details out of the Java source files just so we can determine
exactly which headers will be created.  Instead, simply treat the
entire header destination directory as the output of this task.
2018-04-18 11:29:29 -05:00
Ben Liblit 36fe02d71c Improve build caching by reducing path sensitivity where appropriate 2018-04-18 11:29:29 -05:00
Ben Liblit 74523f5058 Enable caching of task outputs for custom build tasks 2018-04-18 11:29:29 -05:00
Ben Liblit 000b21f36e Rename a build task to more clearly reflect what it builds
This task has an input named "hello_hash.ml", and an output named
"hello_hash.jar".  So calling this task "generateHelloHash" is too
vague.  Now we call it "generateHelloHashJar" instead.
2018-04-18 11:29:29 -05:00
Ben Liblit c0ec959e4a Extend Gradle's "clean" task to remove some additional build targets 2018-04-18 11:29:29 -05:00
Ben Liblit 328b1ec52b Merge info from existing, hand-authored manifests when building jars 2018-04-18 11:29:29 -05:00
Ben Liblit 4dc1e41529 Tell Eclipse to ignore some questionable manifest contents
These manifest files are here for use by the Maven build, but Eclipse
is now using Gradle (via Buildship).  So the manifests as seen by
Eclipse do not entirely make sense.  I'm hesitant to change the
manifests directly, since presumably they were correct for Maven and
still are.

Perhaps some day we'll be using Gradle to generate manifests.  Until
that day comes, we're better off leaving the manifests as they are and
just suppressing Eclipse's warnings instead.
2018-04-18 11:29:29 -05:00
Ben Liblit 7dcff25dcf After Builldship import, put "dx.jar" where the manifest expects it 2018-04-18 11:29:29 -05:00
Ben Liblit 72e5eb2b8d Restore old manifests in hope of fixing Maven regressions 2018-04-18 11:29:29 -05:00
Ben Liblit 7b96281e77 Bail out if any Travis CI testing commands fail
Previously we could fail some "mvn" stage but keep running anyway,
thereby fooling us into thinking that everything was OK.
2018-04-18 11:29:29 -05:00
Ben Liblit 3961b3a20e Incremental improvements to Windows JDK library configuration
This still doesn't actually work, but it's closer than it was before.
There's still some problem with improper mixing of 32-bit ("x86") and
64-bit ("x64") libraries.
2018-04-18 11:29:29 -05:00
Ben Liblit 298d6654d6 Clean up questionable memory management during string construction
Avoid allocating memory using strdup() and then releasing it using
operator delete.  strdup()-allocated memory should be released using
free(), not delete.  But in these specific cases, there really was
never any good reason to duplicate the C-style strings in the first
place.  Instead, we can safely pass those NUL-terminated char pointers
directly in calls to JNI's NewStringUTF().  NewStringUTF() does not
take ownership of its argument, but rather clones that string data
internally before returning.  So using strdup() and delete was just
unnecessary memory churn.

In cases where we need to format, concatenate, or construct new
strings, don't use sprintf() into variable-sized, stack-allocated
arrays.  Variable-sized arrays are not portable, and in particular are
rejected by Microsoft's Visual Studio 2017 C++ compiler.  Instead, do
our string formatting and manipulations using std::ostringstream
and/or std::string.  We just need to be a bit careful about the
lifetimes and ownership responsibilities of allocated data.  In
brief, (1) ostringstream::str() returns a temporary string instance
that expires at the end of the enclosing statement, independent of the
lifetime of the ostringstream instance; while (2) string::c_str()
returns an pointer to internal data that remains valid as long as the
string on which it was called is valid and unmodified.
2018-04-18 11:29:29 -05:00
Ben Liblit 216981f7e3 Somebody decided to use three-space indentation in this file only
OK, whatever makes you happy.
2018-04-18 11:29:29 -05:00
Ben Liblit 86fe6e9334 Fill in likely (but untested) JVM library path on Windows 2018-04-18 11:29:29 -05:00
Ben Liblit 5f2d64f85a Factor out common code for installing Android SDK components 2018-04-18 11:29:28 -05:00
Ben Liblit 587d0a95dc Skip DroidBench tests on Windows, for now
The default location of DroidBench in "/tmp/DroidBench" does not work
well on Windows. So let's disable these tests until someone has time to
make that path more portable.
2018-04-18 11:29:28 -05:00
Ben Liblit c642ec4039 Fix Android SDK installation under Windows 2018-04-18 11:29:28 -05:00
Ben Liblit 9295bcdd0d Switch to a different DroidBench download URL
This URL skips over a redirect that the previous URL went through.
This URL also avoids an annoying "Invalid cookie header" warning that
the previous URL produced.
2018-04-18 11:29:28 -05:00
Ben Liblit afd4bb49bb Use download task instead of "git clone" to get DroidBench
This gives us better progress reporting during the download, better
caching, better file-level dependency tracking, etc.
2018-04-18 11:29:28 -05:00
Ben Liblit 1d2a8a3e7e Factor out recurring pattern in download tasks 2018-04-18 11:29:28 -05:00
Ben Liblit 848530f39a Experimental combined task for download and checksum verification
Not working yet:
<https://github.com/michel-kraemer/gradle-download-task/issues/108>.
2018-04-18 11:29:28 -05:00
Ben Liblit 03e43d100b Update gradle-download-plugin and use some of its new features
We now download and verify checksums as a single task, rather than as
two separate tasks.  This simplifies other task dependencies, since we
no longer have a checksum-verified "stamp" file separate from the
download itself.  Unfortunately the combined task now has a
significant amount of repeated boilerplate.  I'm hoping to refactor
that all out into a custom task class, but haven't yet figured out the
details:
<https://github.com/michel-kraemer/gradle-download-task/issues/108>.

We now also use ETags to be smarter about when a fresh download is or
is not actually needed.  I think there are still opportunities for
improved caching here, but this is a step in the right direction.
2018-04-18 11:29:28 -05:00
Ben Liblit 9baf192416 If Travis CI gives us multiple CPUs, we may as well use them
I believe Travis CI jobs get two CPUs by default.

Doing parallel builds regularly is also a good way to help us discover
any build race conditions we may have.  There's no guarantee that any
such races will be revealed, but even exposing them
nondeterministically is better than having no possibility of exposing
them at all.
2018-04-18 11:29:28 -05:00
Ben Liblit 3cb91d1e67 Fix a shellcheck warning when setting a variable to the empty string 2018-04-18 11:29:28 -05:00
Ben Liblit 361b689966 Update to Gradle 4.6
No significant new features of interest for us in this release, but I
like to keep current.
2018-04-18 11:29:28 -05:00
Ben Liblit ea239ba484 Add a new README with Gradle-specific instructions and tips 2018-04-18 11:29:28 -05:00
Ben Liblit 49e5aa4f52 Remove two Maven repositories that we no longer use for anything
We used to use these to find various Eclipse packages, but that was
always a dodgy affair since we never quite knew whether we had
matching versions of everything.  Now that we are using the
"com.diffplug.gradle.p2.asmaven" plug-in, though, we have much better
control over getting exactly the Eclipse material we need.  These two
Maven repositories no longer provide anything we use, and therefore
can be removed.
2018-04-18 11:29:28 -05:00
Ben Liblit c0e6cd37b0 We only expect ".gradle" directories in two specific places 2018-04-18 11:29:28 -05:00
Ben Liblit 17fc048599 Generalize post-import Eclipse run configuration for more fixups
Previously this launcher's job was to run "processTestResources" and
any other Gradle tasks needed to create files that Eclipse was
expecting to be available.  But we also want to use it to revert the
bad changes that Buildship applies to ".launch" configuration files.

This is a temporary hack to work around
<https://github.com/eclipse/buildship/issues/653>.
2018-04-18 11:29:28 -05:00
Ben Liblit c6a6ef8b97 Minor indentation fix 2018-04-18 11:29:28 -05:00
Ben Liblit bcbd298808 Extra help for finding "cast" native library on macOS
Unlike Linux, macOS has no "RPATH" facility for embedding additional
search paths within shared libraries.  Instead, we need to set
"DYLD_LIBRARY_PATH" appropriately in the environment.  This
environment variable is the macOS analogue of "LD_LIBRARY_PATH" on
Linux.

Note that adding the required path to the "java.library.path" system
property will *not* work.  This property only affects where the JVM
looks for shared objects that it is loading directly.  This property
does not influence the search for other, transitively-required shared
objects.

Fixes #3.
2018-04-18 11:29:28 -05:00
Ben Liblit 48ffce525c Fix remaining Javadoc warnings
This fixes the last of our Javadoc warnings without creating a
circular dependency between ":com.ibm.wala.cast:javadoc" and
":com.ibm.wala.cast.js:javadoc".  Fixes #4, wherein more details about
this tricky dependency challenge can be found.
2018-04-18 11:29:28 -05:00
Ben Liblit 2a75244914 Use ".singleFile" instead of "[0]" when we expect just one file
This documents our intent more clearly, and actively checks for
mistakes rather than silently ignoring unexpected extra files.
2018-04-18 11:29:28 -05:00
Ben Liblit 1d8869bb0a Start exploring publication features by adding source jar archives 2018-04-18 11:29:28 -05:00
Ben Liblit 7fd8f02382 Replicate test include/exclude patterns already used in Maven builds 2018-04-18 11:29:28 -05:00
Ben Liblit 9a2af5bbb8 Add "com.ibm.wala.core.testdata" to classpath for testing
This lets the "DynamicCallGraphTest" tests pass.  The tests in that
class expect to find some element of the classpath that includes the
substring "com.ibm.wala.core.testdata".  They then treat that as a
collection of bytecode files to instrument.
2018-04-18 11:29:28 -05:00
Ben Liblit 4c179e51bc Skip a test intentionally; Maven already does the same
Big thanks to Julian for showing me where this exclusion logic lives
in the Maven configuration.  There's a "**/*AndroidLibs*.java"
exclusion pattern in the top-level "pom.xml".
2018-04-18 11:29:28 -05:00
Ben Liblit fca0f7c117 Fix jar exclusion patterns to match what Ant uses
One previously-failing test class now passes.  Progress!
2018-04-18 11:29:28 -05:00
Ben Liblit c2b1930248 Add some Eclipse dependencies needed only when running tests
This allows two test classes to pass that previously were failing.
Yay!
2018-04-18 11:29:28 -05:00
Ben Liblit bb98b2f84d Add a resource directory containing a zip archive used for testing
The excluded test in this subproject still does not pass, though now
it's failing for a different reason than before.  Progress, I suppose!
2018-04-18 11:29:28 -05:00
Ben Liblit 20be2b59c4 Disable Gradle linter check for unused dependencies in Travis CI
It's telling me to remove "eclipse-deps:org.eclipse.core.runtime:+"
and "org.osgi:org.osgi.core:4.2.0" as unused dependencies in the
"com.ibm.wala.cast.java.ecj" subproject.  However, these two
dependencies (jar files) are actually needed; compilation fails
without them.
2018-04-18 11:29:28 -05:00
Ben Liblit d0bf53474b Also get Eclipse JSDT from a P2 repository, but not the same one 2018-04-18 11:29:28 -05:00
Ben Liblit c16f172932 Find Eclipse jars using local Maven mirror of Eclipse P2 repository
This should give us a set of mutually-consistent jars rather than
picking up random, outdated pieces from Maven Central or wherever else
I could find them.  We now also have a single, central place where we
set the Eclipse version that we're building against.  Much, *much*
cleaner.
2018-04-18 11:29:28 -05:00
Ben Liblit fc0b951ead Assume that Eclipse needs all standard test-resource processing 2018-04-18 11:29:28 -05:00
Ben Liblit a99db6b946 Trivial whitespace tweak 2018-04-18 11:29:28 -05:00
Ben Liblit 01e54886df Exclude one macOS test that I don't know how to fix right now 2018-04-18 11:29:28 -05:00
Ben Liblit 3d026d409e Download appropriate Android SDK for current OS 2018-04-18 11:29:28 -05:00
Ben Liblit baee9d32e1 Try to continue building/testing even after the first failure
If other, non-dependent tasks would also fail, I'd rather discover all
of them at once.
2018-04-18 11:29:28 -05:00
Ben Liblit d8948324f7 "rm" on macOS apparently doesn't understand long ("--foo") flags 2018-04-18 11:29:28 -05:00
Ben Liblit 393ef13622 macOS doesn't seem to have "xvfb-run", and may not need it anyway 2018-04-18 11:29:28 -05:00
Ben Liblit b5cfd56041 Enable macOS (a.k.a. OS X) Travis CI testing for Gradle builds
We're not going to attempt macOS Travis CI testing for Maven builds,
because I don't know whether that's even expected to work on the
official WALA master branch.  Our main focus here is Gradle.

Note that Travis macOS images do not support JDK switching, so
explicitly selecting the JDK version now becomes part of the
Linux-only configuration.

Travis macOS images also do not support Android as a build "language".
So our Travis CI configuration for Gradle builds now declares that
this is a Java project rather than an Android one.  That's OK, though,
because our Gradle scripts already handle downloading the Android SDK;
we don't need Travis CI to do that for us.  When building using Maven,
though, we still call this an Android project because Maven builds do
still rely on Travis CI to provide the Android SDK.

squash! Enable macOS (a.k.a. OS X) Travis CI testing for Gradle builds
2018-04-18 11:29:27 -05:00
Ben Liblit 4853d2b275 Download a specific DroidBench release that we know works for us
If future DroidBench changes include things we need, then we can
decide to move to those newer revisions.  But we shouldn't allow
DroidBench to change out from under us implicitly whenever someone
commits something new to the DroidBench repository.
2018-04-18 11:29:27 -05:00
Ben Liblit c223625f22 Add "TODO" reminders of furture refactoring opportunities 2018-04-18 11:29:27 -05:00
Ben Liblit af5a22d4bb Factor out some repeated accesses to a task's output files 2018-04-18 11:29:27 -05:00
Ben Liblit 1cf1d7c05a Derive Android platforms version from Android build-tools version
This should help us keep the two in sync if the latter changes one
day.
2018-04-18 11:29:27 -05:00
Ben Liblit dfe3659dcb Got DynamicDalvikComparisonJavaLibsTest working at some point 2018-04-18 11:29:27 -05:00
Ben Liblit bbc9ec7e97 Ignore a transient file that appears during testing 2018-04-18 11:29:27 -05:00
Ben Liblit eb00a84a40 Grab an additional archive needed by DalvikAnnotationsTest 2018-04-18 11:29:27 -05:00
Ben Liblit 22245f8cb4 Download a few additional supporting files needed by tests 2018-04-18 11:29:27 -05:00
Ben Liblit 79c8cf1411 Import a class that we will soon be using multiple times 2018-04-18 11:29:27 -05:00
Ben Liblit 2e04ac9838 Fix accidental copying of entire subproject as test resource 2018-04-18 11:29:27 -05:00
Ben Liblit 90a947dad1 Use an "android.jar" that matches the "dx.jar" we are already using
Nothing was obviously failing with the older "android.jar", but I feel
more comfortable knowing that these two are more closely matched.
2018-04-18 11:29:27 -05:00
Ben Liblit fde718b5d3 Suppress harmless broken-pipe warnings from "yes" 2018-04-18 11:29:27 -05:00
Ben Liblit 386cdc117b Set Android build-tools version in just one place 2018-04-18 11:29:27 -05:00
Ben Liblit bc0062e4b0 Use more recent "dx.jar" than is available through Maven Central
This lets us ditch pre-Java-8 in the Gradle build.  (The official WALA
master branch recently got rid of pre-Java-8 in its Maven build.)
That, in turn, lets two "com.ibm.wala.dalvik.test" tests pass that
previously were failing.  We still have two other failing tests in
that subproject, but this is definitely progress!

Our Gradle build scripts manage the entire process of downloading and
locally installing the appropriate Android SDK.  That includes
automatically accepting a license.  Maybe some lawyer will throw a fit
about that some day.  Until then, I'd rather have a build system that
does everything needed without imposing additional manual steps on
developers.
2018-04-18 11:29:27 -05:00
Ben Liblit a09be64332 Ignore some transient files that appear during testing 2018-04-18 11:29:27 -05:00
Ben Liblit 77e0fc2b9c Set name and version to help Gradle composite-build substitutions 2018-04-18 11:29:27 -05:00
Ben Liblit 5398570308 Update Eclipse JUnit test launchers for use with Buildship
Previously Buildship removed its classpath from all of these
launchers.  Now it's automatically putting that back in as soon as I
visit each launcher in Eclipse's "Run Configurations" dialog.  Not
sure what's going on here, but it certainly seems more sane to me to
assume that the Buildship-computed classpath *is* needed for all of
these.  I have an open question on the Gradle discussion forum to try
to understand what's going on here and how to fix it:
<https://discuss.gradle.org/t/launchers-lose-buildship-classpath-on-import-regain-it-later/25641>.
2018-04-18 11:29:27 -05:00
Ben Liblit 525c4aa5fe Update Eclipse "Java Application" launchers for use with Buildship 2018-04-18 11:29:27 -05:00
Ben Liblit c2edaf3119 Use Eclipse-computed paths rather than hard-coding absolute paths 2018-04-18 11:29:27 -05:00
Ben Liblit ca17b12187 Remove launchers whose main Java code is found nowhere in WALA 2018-04-18 11:29:27 -05:00
Ben Liblit f6db318c91 Note some excessive resource copying that we should eventually fix 2018-04-18 11:29:27 -05:00
Ben Liblit 39781604a2 Create a broad "Process Test Resources" Eclipse launch configuration
This should prepare test resources for all subprojects.  A WALA
developer should run this once before running any tests inside
Eclipse.  Initially I'd hoped to make this more narrowly focused, but
Eclipse just doesn't have the infrastructure to deal with fine-grained
dependencies.  On the other hand, running "./gradlew
eclipsePrepareTestResources" automatically for each build seems like
overkill, and could end up being rather slow.  So for now we require
that the developer run this once, by hand.
2018-04-18 11:29:27 -05:00
Ben Liblit 61d8ee1b02 Fix various warnings produced by "./gradlew javadoc"
Three stubborn warnings remain, but this is progress!
2018-04-18 11:29:27 -05:00
Ben Liblit eb4e97a665 Fix warnings about Javadoc links to "java.lang.reflect" package 2018-04-18 11:29:27 -05:00
Ben Liblit da90d1cf5a Trigger custom clean tasks whenever running "./gradlew clean"
A cleaned tree is now much closer to a pristine tree that has just
been checked out and never built.  The only extra created files that
are left behind are ".gradle", "buildSrc/.gradle", and
"buildSrc/build".
2018-04-18 11:29:27 -05:00
Ben Liblit 51cef18bc9 Unpack node.js in the same place that Maven unpacks it
This gets rid of some Eclipse warnings that stem from Buildship being
confused about what it should treat as a source directory if Maven and
Gradle are both being used in the same tree.
2018-04-18 11:29:27 -05:00
Ben Liblit b3dab4c2b0 Tweak Buildship-generated Eclipse ".project" file for extra jars 2018-04-18 11:29:27 -05:00
Ben Liblit 504849e6f5 Update Gradle wrapper to Gradle 4.5
No major new features for us here, but better native caching and other
performance improvements.
2018-04-18 11:29:27 -05:00
Ben Liblit 5f2bab0f3d Get a core test to work by putting "bcel-5.2.jar" where expected 2018-04-18 11:29:27 -05:00
Ben Liblit 031740338f Get a Dalvik test to work by putting "dx.jar" where expected 2018-04-18 11:29:27 -05:00
Ben Liblit 817166c128 Compute a library path from the native software model
Previously we were repeating the library path twice, but that's not
good for long-term maintenance.  That being said, extracting this
information from the depths of the native software model seems *far*
more complex than it should be.  I had hoped for something nicer in
response to
<https://discuss.gradle.org/t/compute-wl-rpath-flag-suitable-for-native-shared-library/25278>,
but so far there's nothing.
2018-04-18 11:29:27 -05:00
Ben Liblit 50bed1cbe8 Compute a library path from the corresponding linker task
Previously we were repeating the library path twice, but that's not
good for long-term maintenance.
2018-04-18 11:29:27 -05:00
Ben Liblit 22421c6882 rpath only matters for shared libraries 2018-04-18 11:29:27 -05:00
Ben Liblit 7c4c2c895c Add previously-undeclared dependency of tests on native library 2018-04-18 11:29:27 -05:00
Ben Liblit a98b913373 Avoid random leftover junk by using "Sync" instead of "Copy" 2018-04-18 11:29:27 -05:00
Ben Liblit c98ea16374 Simplify filtering of archive contents 2018-04-18 11:29:26 -05:00
Ben Liblit 8303eaba4c Override specific "cleanFooBar" tasks instead of generic "clean" 2018-04-18 11:29:26 -05:00
Ben Liblit 5b825997bf Be more concise by calling property setters instead of assigning 2018-04-18 11:29:26 -05:00
Ben Liblit ad1f024b77 Be more concise by omitting implicit "it." in closures 2018-04-18 11:29:26 -05:00
Ben Liblit 2aadd55227 Change archive file names while unpacking, rather than in two stages 2018-04-18 11:29:26 -05:00
Ben Liblit c812e72cb5 Use Groovy's implicit "it" closure argument 2018-04-18 11:29:26 -05:00
Ben Liblit 17b1d85f76 Remove leftover debugging output that I no longer need 2018-04-18 11:29:26 -05:00
Ben Liblit 2e54ec4b0c Download "android-4.1.1.4.jar" (as "android.jar") when needed
Previously Maven did this, but Gradle did not.  So Gradle testing
would only succeed if we'd already done a Maven build first.  Now
these tests pass in a fresh tree that's never seen a Maven build.
2018-04-18 11:29:26 -05:00
Ben Liblit d745f4509f Simplify how we refer to a task's only output 2018-04-18 11:29:26 -05:00
Ben Liblit 07dd646a40 Don't bother importing when we only need one symbol, one time 2018-04-18 11:29:26 -05:00
Ben Liblit f1b2080f99 Download NodeJS and include its "lib/*.js" files in jar archive 2018-04-18 11:29:26 -05:00
Ben Liblit 70fd9a3091 Remove "extraBundledJars" task, which nothing else actually uses
Some tests in other subprojects do depend on some these extra jar
files.  But they can declare those specific dependencies as needed.
Nothing seems to depend on the entire group of extra jars, so it's not
really useful to declare a task that is merely an alias for all of
them.
2018-04-18 11:29:26 -05:00
Ben Liblit 1346a8ac55 Set working directory in the same way Maven does
This seems to help ECJSyncDuplicatorTest find a "./src/Monitor2.java"
file that it needs.  The test still fails, though, for other reasons.
2018-04-18 11:29:26 -05:00
Ben Liblit da30f5dbb4 Enable a few more tests that started working, or perhaps always did 2018-04-18 11:29:26 -05:00
Ben Liblit 20cba8a8d8 Factor out recurring pattern of MD5 checksum + stamp file 2018-04-18 11:29:26 -05:00
Ben Liblit b7b01c8486 Replicate Maven's extra system property settings for some tests 2018-04-18 11:29:26 -05:00
Ben Liblit a1cf040897 Add missing test resources to make many more regression tests pass 2018-04-18 11:29:26 -05:00
Ben Liblit afeba0d984 Remove some test exclusions that are not actually needed now 2018-04-18 11:29:26 -05:00
Ben Liblit 51f748bddc Replicate Maven's heap size limits for tests 2018-04-18 11:29:26 -05:00
Ben Liblit 1bfdf978f2 Buildship removed classpath provider thing from more launch configs
This is more of the same sort of change first seen in a1bd95d.  Still
no idea why it happens; still hoping that Buildship knows what it's
doing.
2018-04-18 11:29:26 -05:00
Ben Liblit 5040019cec Turn on proper regression testing in Travis-CI
Many tests are excluded until
<https://github.com/liblit/WALA/issues/5> is fixed.  But we can at
least have Travis-CI watching over our shoulder to ensure that
no *new* regressions sneak into the tree.
2018-04-18 11:29:26 -05:00
Ben Liblit 5c30dd7581 Explicitly disable regression tests that are currently failing
<https://github.com/liblit/WALA/issues/5> notes that several
subprojects' tests are currently broken under Gradle.  I'd still like
to be able to run non-broken tests, though.  So here I'm disabling the
failing tests.  The intent is to treat these exclusions as a to-do
list.  We can remove exclusions as we get the corresponding tests
working.  No more exclusions means
<https://github.com/liblit/WALA/issues/5> is fixed.
2018-04-18 11:29:26 -05:00
Ben Liblit 91ca24584b Explicitly make "/tmp/DroidBench" be a file, not just a string
I'm hoping this might remove some seemingly-spurious reruns of this
task.  Still not sure why those are happening, though.
2018-04-18 11:29:26 -05:00
Ben Liblit e6677c5aed Do not run Gradle linter by default
It's rather slow, adding roughly five seconds to every "./gradlew"
invocation.  And the advice it gives might not even be reaching a
fixed point.  I like the idea of running the linter as part of CI
testing, but I now think it's overkill to impose on every developer
build.
2018-04-18 11:29:26 -05:00
Ben Liblit d720046110 Dependency tweaks suggested by Gradle linter
I'm starting to wonder whether the linter might be driving us in
cycles rather than reaching a fixed point.  We should keep our eyes on
this.
2018-04-18 11:29:26 -05:00
Ben Liblit 3ba04469ad Teach Gradle how to download "/tmp/DroidBench" when needed
One less thing for developers to have to remember to do manually!
2018-04-18 11:29:26 -05:00
Ben Liblit e9eb934b82 Give each verification task an output for better incremental building 2018-04-18 11:29:26 -05:00
Ben Liblit 98324cd148 Simplify how we refer to existing tasks 2018-04-18 11:29:26 -05:00
Ben Liblit ed275f12a9 Add missing resources for "com.ibm.wala.cast.js.test" tests
The ":com.ibm.wala.cast.js.test:build" task now passes.
2018-04-18 11:29:26 -05:00
Ben Liblit 01acd0e338 RPath settings apply only to Linux; some only to Linux on x86_64
I don't know whether Windows or MacOS needs anything similar.  If they
do, the details will differ, and should be handled by adding suitable
cases to these switch statements.
2018-04-18 11:29:26 -05:00
Ben Liblit 564a4eb9bd Correctly declare dependency on a task that has not been defined yet 2018-04-18 11:29:26 -05:00
Ben Liblit 054a106ae5 Dependency tweaks suggested by Gradle linter
This partially reverts 72bc456b7.  I'm starting to wonder whether the
linter might be driving us in cycles rather than reaching a fixed
point.  We should keep our eyes on this.
2018-04-18 11:29:26 -05:00
Ben Liblit 16ec6d7461 Simplify file management for a download task 2018-04-18 11:29:26 -05:00
Ben Liblit 0bb899b503 Download, extract, and/or construct various additional bundled jars
I don't really know what these are all used for.  However, Maven+Ant
builds them, so for now Gradle should too.
2018-04-18 11:29:26 -05:00
Ben Liblit 1e1de1bdb9 Prefer single-quoted (non-interpolated) strings where sufficient 2018-04-18 11:29:26 -05:00
Ben Liblit 35663c1264 Teach Gradle how to find and copy a Jar archive that we bundle
I'm not actually sure why this archive is needed, except that it is
mentioned in "META-INF/MANIFEST.MF" and "build.properties".  If we
eventually stop supporting Maven, then we may be able to discard the
"copyJarsIntoLib" task and the corresponding lines in
"META-INF/MANIFEST.MF" and "build.properties"
2018-04-18 11:29:25 -05:00
Ben Liblit dd1f51e8f0 Buildship removed classpath provider thing from all launch configs
This consistently happens when I import WALA as an existing Gradle
project into Eclipse with Buildship.  I don't really know what this
change means, or whether it's desirable.  For now, I'm going to trust
Buildship and see what happens.
2018-04-18 11:29:25 -05:00
Ben Liblit 1ebabf8b60 Complain more loudly about missing output directories 2018-04-18 11:29:25 -05:00
Ben Liblit 3380b78f38 This is no longer how we'll build the native library in Eclipse 2018-04-18 11:29:25 -05:00
Ben Liblit ba5849afb6 Simplify inclusion of "OSGI-INF" and the only file it contains 2018-04-18 11:29:25 -05:00
Ben Liblit 6bcca003a2 Tweak output dirs to match what Buildship puts into ".classpath" 2018-04-18 11:29:25 -05:00
Ben Liblit 9a3ecd6ab9 Disable some Eclipse warnings on Java test inputs
I think these were previously not being compiled at all.  Now, with
Buildship generating Eclipse ".project" settings automatically, these
are being processed.  In general we don't care much about questionable
code in test data, though.
2018-04-18 11:29:25 -05:00
Ben Liblit 89860b53bb Let Buildship create new settings files when importing
These settings files currently are generated with an initial timestamp
comment line, which is not something we'd want to track in version
control.  Fortunately, the contents of these files are entirely
mundane, so there should be no problem with having Buildship generate
them anew each time a developer imports WALA into Eclipse as an
existing Gradle project.
2018-04-18 11:29:25 -05:00
Ben Liblit 4b48f8ee4d Have Buildship add Eclipse plugin (PDE) nature to some subprojects
Specifically, we need this for subprojects that build included plugins
for any of the "*_feature" subprojects.
2018-04-18 11:29:25 -05:00
Ben Liblit 310ef1daa5 Exclude Eclipse ".project" and ".classpath" from version control
Apparently Buildship generates these when one uses Import -> Existing
Gradle Project:
<https://discuss.gradle.org/t/buildship-eclipse-plug-in-multiproject-builds/24030/5>.
We can use the Gradle "eclipse" plugin if customizations are
necessary, but my impression is that the intent is to treat ".project"
and ".classpath" as generated files, not sources to be tracked in
source control.
2018-04-18 11:29:25 -05:00
Ben Liblit 8d0f64f3c6 Update Gradle wrapper to latest version (4.4.1) 2018-04-18 11:29:25 -05:00
Sungho Lee 3984cd0001 Fill the dynamic library path for OSX 2018-04-18 11:29:25 -05:00
Sungho Lee c1f6b70eb0 Fill the dynamic library path for OSX 2018-04-18 11:29:25 -05:00
Ben Liblit 3ce242a22c Simplify loading of plugins shared by many subprojects 2018-04-18 11:29:25 -05:00
Ben Liblit 1432e18c37 Clean up some simple syntactic redundancy in dependency declarations 2018-04-18 11:29:25 -05:00
Sungho Lee 9084cb9ad3 Check Java version 2018-04-18 11:29:25 -05:00
Sungho Lee 6bc547a48b Remove unused dependencies 2018-04-18 11:29:25 -05:00
Ben Liblit 69a67fe7ec Better handling of OS- and architecture-specific JDK paths 2018-04-18 11:29:25 -05:00
Ben Liblit 0500d237f9 Add various test resource directories
Unfortunately these tests are still not finding their resources
properly at test run time.  I don't know why.  It seems to have
something to do with how the tests instantiate and use class loaders.
I'm probably going to need expert help with this.
2018-04-18 11:29:25 -05:00
Ben Liblit 7fc607cc1c Dependency tweaks suggested by Gradle linter 2018-04-18 11:29:25 -05:00
Ben Liblit 3d973e9d61 Find the "xlator_test" shared library at test run time
Dependencies are still not set properly here, so you need to have
built the shared library ("./gradlew xlator_testSharedLibrary") before
running the ":com.ibm.wala.cast.test:test" test task.  But at least
the tests do now find and load that shared library properly.
2018-04-18 11:29:25 -05:00
Ben Liblit 5d5fa18b5f Replace source directories rather than appending to them
I was confused about the differences among:

	srcDir 'foo'
	srcDirs ['foo']
	srcDirs = ['foo']

As it turns out, the first two append to the set of source
directories, while the last replaces this set entirely.  I generally
want replacement, since WALA's current directory layout never matches
Gradle's assumed defaults.
2018-04-18 11:29:25 -05:00
Ben Liblit 0704a66ab1 Cleaner way to form colon-deliminated search path from list of paths 2018-04-18 11:29:25 -05:00
Ben Liblit 0f69db6fe3 Cleaner approach to augmenting Javadoc classpath 2018-04-18 11:29:25 -05:00
Ben Liblit 01a4fe025e Start getting some unit tests to pass
The main requirement here is to arrange for the proper classpath
settings when tests are running so that they can find any associated
resources (i.e., other supporting files).
2018-04-18 11:29:25 -05:00
Ben Liblit 04d9397a1d Tweak classpath for some Javadoc build tasks
This comes up when the Javadoc comments refer to classes in other
subprojects that the corresponding Java code did not actually depend
upon.
2018-04-18 11:29:25 -05:00
Ben Liblit e52c8d981d Declare common library dependencies for source sets, not binaries
No sense repeating this for each binary when it's the same for all of
them.
2018-04-18 11:29:25 -05:00
Ben Liblit b9e712bfa9 Add a second native library and a native executable 2018-04-18 11:29:25 -05:00
Ben Liblit 43a482dfae Add Gradle logic for building a native library
This approach uses no external makefiles; it's pure Gradle.  Nice!
2018-04-18 11:29:25 -05:00
Ben Liblit 6007b11c3f Compile test code, but don't run it for now
The tests are currently broken due to some sort of problem using class
loaders to find supporting resources.  Until I figure this out, better
to have Travis-CI verify only the things we think work.
2018-04-18 11:29:25 -05:00
Ben Liblit 377d7586ef Consistently use simple sorted order for dependencies
This isn't even sorting by library or subproject name.  It's just a
dumb textual sort of the contents of each line.
2018-04-18 11:29:25 -05:00
Ben Liblit db2d34b60d Leave Gradle linter turned on by default, now that it's quieter 2018-04-18 11:29:25 -05:00
Ben Liblit afa982adf2 Properly distinguish main from test code, now that I know how 2018-04-18 11:29:25 -05:00
Ben Liblit a56a3616dc Selectively disable some Gradle linter rules
Specifically, we're not really in a position now to deal with
duplicated classes among our dependencies.  Maybe we can try harder to
examine those in the future, but for now they are a distraction from
other issues that we can attack more readily.
2018-04-18 11:29:25 -05:00
Ben Liblit 9cd5d2ba56 Split generic Java setup from OSGi substitution setup 2018-04-18 11:29:25 -05:00
Ben Liblit 1ca17e93be Automated Gradle-driven download of JLex test input 2018-04-18 11:29:25 -05:00
Ben Liblit 9664b1e5b3 Disable Javadoc linter for now
Some of the linter's checks produce failures (errors) when Gradle
builds the Javadoc documentation.  Fixing them isn't really a Gradle
issue, though, so I don't want to deal with them now.
2018-04-18 11:29:24 -05:00
Ben Liblit 18495ab44d Improve documentation for broad sections of top-level build script 2018-04-18 11:29:24 -05:00
Ben Liblit 9e905c7a04 More Gradle dependency clean-ups suggested by linter
Unfortunately the linter does not reach a fixpoint if you keep trying
to apply its suggestions.  If you include "compile
'org.eclipse.core:org.eclipse.core.runtime:3.10.0.v20140318-2214'" in
the dependencies for "com.ibm.wala.ide.jdt", then the linter tells you
that this dependency is unused and can be removed.  If you remove it,
then the linter tells you that it should be added.  Sigh.
2018-04-18 11:29:24 -05:00
Ben Liblit b3dbdd3357 Fix a tricky cross-subproject Javadoc dependency
By default, each subproject's Javadoc task depends on the same
subproject's Java compilation task, and uses the same classpath.
Thus, any classes that some Java code uses will also be visible when
building the same Java code's documentation.

In this case, we need to see one of the "com.ibm.wala.core" classes in
order to build the "com.ibm.wala.util" documentation.  However, we
cannot have Java compilation of "com.ibm.wala.util" depend on Java
compilation of "com.ibm.wala.core", because that would create a
dependency cycle.  So we need to add this as a special dependency just
for the "com.ibm.wala.util" documentation task, and add the
appropriate classpath as well.

I'm quite proud of myself for figuring out how to do this properly.
2018-04-18 11:29:24 -05:00
Ben Liblit ad60605fe8 In Travis-CI, test Maven and Gradle separately and concurrently
This should help identify cases where the Gradle build only works if
it runs before or after a Maven build.  It will also help us recognize
any Maven regressions accidentally introduced by our Gradle work.
2018-04-18 11:29:24 -05:00
Ben Liblit dec3b8f15b Add a Gradle linter to help me write clean build configurations
The linter does not run by default.  To activate it, use "./gradlew
autoLintGradle".
2018-04-18 11:29:24 -05:00
Ben Liblit 2ef04905c2 Additional explicit dependencies suggested by Gradle linter 2018-04-18 11:29:24 -05:00
Ben Liblit eac47334ca Automated Gradle-driven download of AJAXSLT test inputs
I'm not sure that I am doing this in the best way possible.  But it
seems to be working.  Refinements are welcome!
2018-04-18 11:29:24 -05:00
Ben Liblit 2716731357 Add Gradle build script for a subproject that previously had none 2018-04-18 11:29:24 -05:00
Ben Liblit 209c1d25c6 Add Gradle build script for a subproject that previously had none 2018-04-18 11:29:24 -05:00
Ben Liblit cd304237ea Add Gradle build script for a subproject that previously had none 2018-04-18 11:29:24 -05:00
Ben Liblit 8e5415e3db Add Gradle build script for a subproject that previously had none 2018-04-18 11:29:24 -05:00
Ben Liblit 25a52254f5 Add Gradle build script for a subproject that previously had none 2018-04-18 11:29:24 -05:00
Ben Liblit f41baeb0f8 Add a direct dependency that previously we picked up transitively 2018-04-18 11:29:24 -05:00
Ben Liblit cebf14c8c5 Run a Gradle build after the Maven build
Eventually I'll want to swap that order, so that we know that Gradle
builds work even without any help from Maven build setup logic.  For
now, though, I just want to test whether the Gradle build works at
all.
2018-04-18 11:29:24 -05:00
Ben Liblit 530d74929f Many improvements to Gradle build support, including within Eclipse 2018-04-18 11:29:24 -05:00
Sungho Lee ffaa2e4626 change hamcrest library version of core.tests 2018-04-18 11:29:24 -05:00
Sungho Lee b4fa7f425b Support the gradlew build 2018-04-18 11:29:24 -05:00
Sungho Lee 50d0f7ee71 Change build.gradle files for proper format and delete all tests 2018-04-18 11:29:24 -05:00
Sungho Lee 4a31927b00 Gradle build scripts 2018-04-18 11:29:24 -05:00
Ben Liblit 99c2493e37 Revert "Build WALA using Gradle instead of Maven" (#298) 2018-04-18 12:15:56 -04:00
Julian Dolby 8f41069b23
Merge pull request #278 from liblit/gradle-and-buildship
Build WALA using Gradle instead of Maven
2018-04-18 08:22:25 -04:00
Ben Liblit 6639d8b93a Bump version to 1.5.0-SNAPSHOT before merging with WALA master
This gives the WALA maintainers the option of doing future 1.4.5+
releases from of a pre-Gradle branch if these merged Gradle changes
turn out to be more disruptive than expected.
2018-04-17 15:32:01 -05:00
Ben Liblit 742cad58e9 Use Gradle to create selected Eclipse metadata before Maven builds
The Eclipse metadata files created in this way are not identical to
those that Buildship would create when importing into Eclipse.  The
tests in com.ibm.wala.cast.java.test.JDTJava15IRTests and
com.ibm.wala.cast.java.test.JDTJavaIRTests seem to pass using either
the Gradle-generated or the Buildship-generated versions.

As an aside, if you generate these files using Gradle first and *then*
import using Buildship, you end up with metadata that is identical to
what you would have had if you'd only imported with
Buildship.  (There's one irrelevant difference in an unimportant
"<comment>" element.)  So Maven's tests should run fine under any
wacky mix of Gradle- and Buildship-generated Eclipse metadata files.

That being said, I recommend not mixing build systems.  WALA can be
built using either Maven, Gradle, or Eclipse+Buildship, but you're
probably better off only using one of these in any given build tree.
A mixed tree *should* probably work, but I haven't tested it
thoroughly, and consider better to avoid doing.

Incidentally, if there are other Maven-preparation steps that we'd
like Gradle to automate for us, that can now be done easily by
creating more "prepareMavenBuild" Gradle tasks in other subprojects
and adding the appropriate dependencies.  For example, it would be
trivial to use this to automate downloading "/tmp/DroidBench",
installing the Android SDK, etc.
2018-04-17 15:02:36 -05:00
Julian Dolby 89ffb96acf more work on file names 2018-04-17 15:02:36 -05:00
Julian Dolby 1ba0082896 fixes for nodejs performance 2018-04-17 15:02:36 -05:00
Ben Liblit 563d7446d1 Tell Travis CI to be even more patient during initial p2AsMaven downloads 2018-04-17 15:02:36 -05:00
Ben Liblit 0290469ba7 Tell Travis CI to be more patient during initial p2AsMaven downloads 2018-04-17 15:02:36 -05:00
Ben Liblit 5df33f85d7 Simplify how we refer to the outputs of certain tasks 2018-04-17 15:02:36 -05:00
Ben Liblit 929fdb99af Exclude a test that has started failing due to running out of memory
I don't know what changes are triggering this.  Presumably it's
something to do with the temporary-file code, but I don't see why that
would happen.  For now, let's just skip this test.
2018-04-17 15:02:36 -05:00
Ben Liblit 7886fa13dc Don't put fixed-name, writable files into "java.io.tmpdir"
If multiple tests both write to "/tmp/cg.txt" (for example), then
these tests cannot safely run concurrently.  That never used to be a
problem with Maven, since our Maven tests were all strictly sequential
anyway.  But parallelized testing using Gradle requires that we do
better.  Fortunately, Java has perfectly reasonable APIs for
generating uniquely-named temporary files and directories.
2018-04-17 15:02:36 -05:00
Ben Liblit 6599d3d294 Don't use build cache (a.k.a. task output caching) under Travis CI
The performance improvement offered by the build cache is modest when
run by Travis CI.  This is probably because Travis CI does not keep
the cache on any local machine.  Instead, Travis CI uploads the build
cache across a network at the end of each run, then restores the cache
across the network at the start of the next run.  So in many cases
we're simply trading network access to original downloads for network
access to the cache image.

Furthermore, it's probably a better test to perform Travis CI testing
jobs from something closer to a clean slate.  We really want to know
whether everything builds and passes tests correctly starting from
nothing.  We don't want to risk accidentally thinking something would
work simply because we have a cached copy of what it did when it
worked previously.
2018-04-17 15:02:36 -05:00
Ben Liblit 93c8d126b8 Unpack Android SDK and install extra components as a single task
Previously we unpacked in one task, then installed two extra
components in two dependent tasks.  However, installing extra
components modifies some files in place, effectively making those
files both inputs and outputs.  That creates race conditions, and
probably interferes with task output caching.  Better, then, to treat
the unpack and extra installations all as a single task whose output
is the complete Android SDK tree with all required components
installed.
2018-04-17 15:02:36 -05:00
Ben Liblit b13e5d72b1 If tests fail, print full stack traces to aid debugging 2018-04-17 15:02:36 -05:00
Ben Liblit 9cbfff23f5 Enable both parallel builds and build output caching by default
This should give us a nice build-performance boost, both locally and
in Travis CI.  I've used parallel builds routinely for months now, and
they're working fine.  Build output caching is newer, but it also
seems to be working well and saves us tremendous time on downloads.
2018-04-17 15:02:36 -05:00
Ben Liblit c034dce3c3 Allow parallel testing within each subproject
Without this setting, Gradle would run multiple "test" tasks from
multiple subprojects concurrently, but each "test" task would only run
a single test at a time.  Some of our subprojects' test tasks take a
long time to complete, which could easily leave us sequentially
testing on just one or two CPU cores while other cores sit idle.

With this change, Gradle will use as many task slots as are
available (e.g., when run with "--parallel") to run multiple
simultaneous JUnit test classes within any given subproject.  This
seems to be fine for us:  I am unaware of any shared global state that
would cause conflicts between two test classes within any given
subproject.
2018-04-17 15:02:36 -05:00
Ben Liblit 3f5460231e Don't try to exhaustively anticipate all generated header names
When JNI headers for a given class, each nested class will end up with
its own additional header.  But I don't want to try to parse nested
class details out of the Java source files just so we can determine
exactly which headers will be created.  Instead, simply treat the
entire header destination directory as the output of this task.
2018-04-17 15:02:36 -05:00
Ben Liblit 66a4d20e3a Improve build caching by reducing path sensitivity where appropriate 2018-04-17 15:02:36 -05:00
Ben Liblit 6869a4d5f4 Enable caching of task outputs for custom build tasks 2018-04-17 15:02:36 -05:00
Ben Liblit e42e36c4de Rename a build task to more clearly reflect what it builds
This task has an input named "hello_hash.ml", and an output named
"hello_hash.jar".  So calling this task "generateHelloHash" is too
vague.  Now we call it "generateHelloHashJar" instead.
2018-04-17 15:02:36 -05:00
Ben Liblit 4f94b4c341 Extend Gradle's "clean" task to remove some additional build targets 2018-04-17 15:02:36 -05:00
Ben Liblit b4fca9c38d Merge info from existing, hand-authored manifests when building jars 2018-04-17 15:02:36 -05:00
Ben Liblit 272e3adaf8 Tell Eclipse to ignore some questionable manifest contents
These manifest files are here for use by the Maven build, but Eclipse
is now using Gradle (via Buildship).  So the manifests as seen by
Eclipse do not entirely make sense.  I'm hesitant to change the
manifests directly, since presumably they were correct for Maven and
still are.

Perhaps some day we'll be using Gradle to generate manifests.  Until
that day comes, we're better off leaving the manifests as they are and
just suppressing Eclipse's warnings instead.
2018-04-17 15:02:36 -05:00
Ben Liblit 9d7df5de7e After Builldship import, put "dx.jar" where the manifest expects it 2018-04-17 15:02:36 -05:00
Ben Liblit 7a5f140127 Restore old manifests in hope of fixing Maven regressions 2018-04-17 15:02:36 -05:00
Ben Liblit 4a707d954a Bail out if any Travis CI testing commands fail
Previously we could fail some "mvn" stage but keep running anyway,
thereby fooling us into thinking that everything was OK.
2018-04-17 15:02:36 -05:00
Ben Liblit 08dc11ad7d Incremental improvements to Windows JDK library configuration
This still doesn't actually work, but it's closer than it was before.
There's still some problem with improper mixing of 32-bit ("x86") and
64-bit ("x64") libraries.
2018-04-17 15:02:36 -05:00
Ben Liblit e8b86fdf82 Clean up questionable memory management during string construction
Avoid allocating memory using strdup() and then releasing it using
operator delete.  strdup()-allocated memory should be released using
free(), not delete.  But in these specific cases, there really was
never any good reason to duplicate the C-style strings in the first
place.  Instead, we can safely pass those NUL-terminated char pointers
directly in calls to JNI's NewStringUTF().  NewStringUTF() does not
take ownership of its argument, but rather clones that string data
internally before returning.  So using strdup() and delete was just
unnecessary memory churn.

In cases where we need to format, concatenate, or construct new
strings, don't use sprintf() into variable-sized, stack-allocated
arrays.  Variable-sized arrays are not portable, and in particular are
rejected by Microsoft's Visual Studio 2017 C++ compiler.  Instead, do
our string formatting and manipulations using std::ostringstream
and/or std::string.  We just need to be a bit careful about the
lifetimes and ownership responsibilities of allocated data.  In
brief, (1) ostringstream::str() returns a temporary string instance
that expires at the end of the enclosing statement, independent of the
lifetime of the ostringstream instance; while (2) string::c_str()
returns an pointer to internal data that remains valid as long as the
string on which it was called is valid and unmodified.
2018-04-17 15:02:36 -05:00
Ben Liblit 4b04f8d812 Somebody decided to use three-space indentation in this file only
OK, whatever makes you happy.
2018-04-17 15:02:36 -05:00
Ben Liblit e9fa6f31b3 Fill in likely (but untested) JVM library path on Windows 2018-04-17 15:02:36 -05:00
Ben Liblit 0a21f20348 Factor out common code for installing Android SDK components 2018-04-17 15:02:36 -05:00
Ben Liblit ad111547de Skip DroidBench tests on Windows, for now
The default location of DroidBench in "/tmp/DroidBench" does not work
well on Windows. So let's disable these tests until someone has time to
make that path more portable.
2018-04-17 15:02:36 -05:00
Ben Liblit f568db5de6 Fix Android SDK installation under Windows 2018-04-17 15:02:36 -05:00
Ben Liblit 7f8de6d611 Switch to a different DroidBench download URL
This URL skips over a redirect that the previous URL went through.
This URL also avoids an annoying "Invalid cookie header" warning that
the previous URL produced.
2018-04-17 15:02:36 -05:00
Ben Liblit e4f9fedf38 Use download task instead of "git clone" to get DroidBench
This gives us better progress reporting during the download, better
caching, better file-level dependency tracking, etc.
2018-04-17 15:02:36 -05:00
Ben Liblit 813c79caa0 Factor out recurring pattern in download tasks 2018-04-17 15:02:36 -05:00
Ben Liblit 4749fe47c0 Experimental combined task for download and checksum verification
Not working yet:
<https://github.com/michel-kraemer/gradle-download-task/issues/108>.
2018-04-17 15:02:36 -05:00
Ben Liblit ba455f4737 Update gradle-download-plugin and use some of its new features
We now download and verify checksums as a single task, rather than as
two separate tasks.  This simplifies other task dependencies, since we
no longer have a checksum-verified "stamp" file separate from the
download itself.  Unfortunately the combined task now has a
significant amount of repeated boilerplate.  I'm hoping to refactor
that all out into a custom task class, but haven't yet figured out the
details:
<https://github.com/michel-kraemer/gradle-download-task/issues/108>.

We now also use ETags to be smarter about when a fresh download is or
is not actually needed.  I think there are still opportunities for
improved caching here, but this is a step in the right direction.
2018-04-17 15:02:36 -05:00
Ben Liblit 17f42c3725 If Travis CI gives us multiple CPUs, we may as well use them
I believe Travis CI jobs get two CPUs by default.

Doing parallel builds regularly is also a good way to help us discover
any build race conditions we may have.  There's no guarantee that any
such races will be revealed, but even exposing them
nondeterministically is better than having no possibility of exposing
them at all.
2018-04-17 15:02:36 -05:00
Ben Liblit 96055cca75 Fix a shellcheck warning when setting a variable to the empty string 2018-04-17 15:02:36 -05:00
Ben Liblit 00a645100e Update to Gradle 4.6
No significant new features of interest for us in this release, but I
like to keep current.
2018-04-17 15:02:36 -05:00
Ben Liblit 596c9091bb Add a new README with Gradle-specific instructions and tips 2018-04-17 15:02:36 -05:00
Ben Liblit 29fad5b1e0 Remove two Maven repositories that we no longer use for anything
We used to use these to find various Eclipse packages, but that was
always a dodgy affair since we never quite knew whether we had
matching versions of everything.  Now that we are using the
"com.diffplug.gradle.p2.asmaven" plug-in, though, we have much better
control over getting exactly the Eclipse material we need.  These two
Maven repositories no longer provide anything we use, and therefore
can be removed.
2018-04-17 15:02:36 -05:00
Ben Liblit 43f7704d5d We only expect ".gradle" directories in two specific places 2018-04-17 15:02:36 -05:00
Ben Liblit 84f1977ab4 Generalize post-import Eclipse run configuration for more fixups
Previously this launcher's job was to run "processTestResources" and
any other Gradle tasks needed to create files that Eclipse was
expecting to be available.  But we also want to use it to revert the
bad changes that Buildship applies to ".launch" configuration files.

This is a temporary hack to work around
<https://github.com/eclipse/buildship/issues/653>.
2018-04-17 15:02:36 -05:00
Ben Liblit 5b1aed99a7 Minor indentation fix 2018-04-17 15:02:36 -05:00
Ben Liblit faf3b86e1b Extra help for finding "cast" native library on macOS
Unlike Linux, macOS has no "RPATH" facility for embedding additional
search paths within shared libraries.  Instead, we need to set
"DYLD_LIBRARY_PATH" appropriately in the environment.  This
environment variable is the macOS analogue of "LD_LIBRARY_PATH" on
Linux.

Note that adding the required path to the "java.library.path" system
property will *not* work.  This property only affects where the JVM
looks for shared objects that it is loading directly.  This property
does not influence the search for other, transitively-required shared
objects.

Fixes #3.
2018-04-17 15:02:36 -05:00
Ben Liblit cac0e87082 Fix remaining Javadoc warnings
This fixes the last of our Javadoc warnings without creating a
circular dependency between ":com.ibm.wala.cast:javadoc" and
":com.ibm.wala.cast.js:javadoc".  Fixes #4, wherein more details about
this tricky dependency challenge can be found.
2018-04-17 15:02:36 -05:00
Ben Liblit 709c38c049 Use ".singleFile" instead of "[0]" when we expect just one file
This documents our intent more clearly, and actively checks for
mistakes rather than silently ignoring unexpected extra files.
2018-04-17 15:02:36 -05:00
Ben Liblit e4f8d00cbe Start exploring publication features by adding source jar archives 2018-04-17 15:02:36 -05:00
Ben Liblit 2bf92e1214 Replicate test include/exclude patterns already used in Maven builds 2018-04-17 15:02:36 -05:00
Ben Liblit f287ee5c41 Add "com.ibm.wala.core.testdata" to classpath for testing
This lets the "DynamicCallGraphTest" tests pass.  The tests in that
class expect to find some element of the classpath that includes the
substring "com.ibm.wala.core.testdata".  They then treat that as a
collection of bytecode files to instrument.
2018-04-17 15:02:36 -05:00
Ben Liblit b8f1bb3aaf Skip a test intentionally; Maven already does the same
Big thanks to Julian for showing me where this exclusion logic lives
in the Maven configuration.  There's a "**/*AndroidLibs*.java"
exclusion pattern in the top-level "pom.xml".
2018-04-17 15:02:36 -05:00
Ben Liblit 2763589d1f Fix jar exclusion patterns to match what Ant uses
One previously-failing test class now passes.  Progress!
2018-04-17 15:02:36 -05:00
Ben Liblit d301a89f4f Add some Eclipse dependencies needed only when running tests
This allows two test classes to pass that previously were failing.
Yay!
2018-04-17 15:02:36 -05:00
Ben Liblit 06d464216b Add a resource directory containing a zip archive used for testing
The excluded test in this subproject still does not pass, though now
it's failing for a different reason than before.  Progress, I suppose!
2018-04-17 15:02:36 -05:00
Ben Liblit 7227deb8a9 Disable Gradle linter check for unused dependencies in Travis CI
It's telling me to remove "eclipse-deps:org.eclipse.core.runtime:+"
and "org.osgi:org.osgi.core:4.2.0" as unused dependencies in the
"com.ibm.wala.cast.java.ecj" subproject.  However, these two
dependencies (jar files) are actually needed; compilation fails
without them.
2018-04-17 15:02:36 -05:00
Ben Liblit 7e0ac84a03 Also get Eclipse JSDT from a P2 repository, but not the same one 2018-04-17 15:02:36 -05:00
Ben Liblit 5e0e251766 Find Eclipse jars using local Maven mirror of Eclipse P2 repository
This should give us a set of mutually-consistent jars rather than
picking up random, outdated pieces from Maven Central or wherever else
I could find them.  We now also have a single, central place where we
set the Eclipse version that we're building against.  Much, *much*
cleaner.
2018-04-17 15:02:36 -05:00
Ben Liblit 196dd2d971 Assume that Eclipse needs all standard test-resource processing 2018-04-17 15:02:36 -05:00
Ben Liblit d230fe836c Trivial whitespace tweak 2018-04-17 15:02:36 -05:00
Ben Liblit eb2d2dd850 Exclude one macOS test that I don't know how to fix right now 2018-04-17 15:02:36 -05:00
Ben Liblit e9ea4d7f1d Download appropriate Android SDK for current OS 2018-04-17 15:02:36 -05:00
Ben Liblit c02776fc4d Try to continue building/testing even after the first failure
If other, non-dependent tasks would also fail, I'd rather discover all
of them at once.
2018-04-17 15:02:36 -05:00
Ben Liblit fb33cbe03b "rm" on macOS apparently doesn't understand long ("--foo") flags 2018-04-17 15:02:36 -05:00
Ben Liblit cb72ebc177 macOS doesn't seem to have "xvfb-run", and may not need it anyway 2018-04-17 15:02:36 -05:00
Ben Liblit aff4067c39 Enable macOS (a.k.a. OS X) Travis CI testing for Gradle builds
We're not going to attempt macOS Travis CI testing for Maven builds,
because I don't know whether that's even expected to work on the
official WALA master branch.  Our main focus here is Gradle.

Note that Travis macOS images do not support JDK switching, so
explicitly selecting the JDK version now becomes part of the
Linux-only configuration.

Travis macOS images also do not support Android as a build "language".
So our Travis CI configuration for Gradle builds now declares that
this is a Java project rather than an Android one.  That's OK, though,
because our Gradle scripts already handle downloading the Android SDK;
we don't need Travis CI to do that for us.  When building using Maven,
though, we still call this an Android project because Maven builds do
still rely on Travis CI to provide the Android SDK.

squash! Enable macOS (a.k.a. OS X) Travis CI testing for Gradle builds
2018-04-17 15:02:36 -05:00
Ben Liblit 0e231b4363 Download a specific DroidBench release that we know works for us
If future DroidBench changes include things we need, then we can
decide to move to those newer revisions.  But we shouldn't allow
DroidBench to change out from under us implicitly whenever someone
commits something new to the DroidBench repository.
2018-04-17 15:02:36 -05:00
Ben Liblit 49eda8ffab Add "TODO" reminders of furture refactoring opportunities 2018-04-17 15:02:36 -05:00
Ben Liblit cdd4aac942 Factor out some repeated accesses to a task's output files 2018-04-17 15:02:35 -05:00
Ben Liblit 9b5cc743fe Derive Android platforms version from Android build-tools version
This should help us keep the two in sync if the latter changes one
day.
2018-04-17 15:02:35 -05:00
Ben Liblit 18a4edd84e Got DynamicDalvikComparisonJavaLibsTest working at some point 2018-04-17 15:02:35 -05:00
Ben Liblit ff8f6ec348 Ignore a transient file that appears during testing 2018-04-17 15:02:35 -05:00
Ben Liblit e3ebd87242 Grab an additional archive needed by DalvikAnnotationsTest 2018-04-17 15:02:35 -05:00
Ben Liblit 22acff5130 Download a few additional supporting files needed by tests 2018-04-17 15:02:35 -05:00
Ben Liblit d78d68176e Import a class that we will soon be using multiple times 2018-04-17 15:02:35 -05:00
Ben Liblit e529c9d96f Fix accidental copying of entire subproject as test resource 2018-04-17 15:02:35 -05:00
Ben Liblit e70ddf4dec Use an "android.jar" that matches the "dx.jar" we are already using
Nothing was obviously failing with the older "android.jar", but I feel
more comfortable knowing that these two are more closely matched.
2018-04-17 15:02:35 -05:00
Ben Liblit 1a82397fd7 Suppress harmless broken-pipe warnings from "yes" 2018-04-17 15:02:35 -05:00
Ben Liblit bcf685ba40 Set Android build-tools version in just one place 2018-04-17 15:02:35 -05:00
Ben Liblit b2fa87efe3 Use more recent "dx.jar" than is available through Maven Central
This lets us ditch pre-Java-8 in the Gradle build.  (The official WALA
master branch recently got rid of pre-Java-8 in its Maven build.)
That, in turn, lets two "com.ibm.wala.dalvik.test" tests pass that
previously were failing.  We still have two other failing tests in
that subproject, but this is definitely progress!

Our Gradle build scripts manage the entire process of downloading and
locally installing the appropriate Android SDK.  That includes
automatically accepting a license.  Maybe some lawyer will throw a fit
about that some day.  Until then, I'd rather have a build system that
does everything needed without imposing additional manual steps on
developers.
2018-04-17 15:02:35 -05:00
Ben Liblit 16c056f196 Ignore some transient files that appear during testing 2018-04-17 15:02:35 -05:00
Ben Liblit 9082a5205a Set name and version to help Gradle composite-build substitutions 2018-04-17 15:02:35 -05:00
Ben Liblit 2674806aa5 Update Eclipse JUnit test launchers for use with Buildship
Previously Buildship removed its classpath from all of these
launchers.  Now it's automatically putting that back in as soon as I
visit each launcher in Eclipse's "Run Configurations" dialog.  Not
sure what's going on here, but it certainly seems more sane to me to
assume that the Buildship-computed classpath *is* needed for all of
these.  I have an open question on the Gradle discussion forum to try
to understand what's going on here and how to fix it:
<https://discuss.gradle.org/t/launchers-lose-buildship-classpath-on-import-regain-it-later/25641>.
2018-04-17 15:02:35 -05:00
Ben Liblit 5de787bb2a Update Eclipse "Java Application" launchers for use with Buildship 2018-04-17 15:02:35 -05:00
Ben Liblit 83abb6a10a Use Eclipse-computed paths rather than hard-coding absolute paths 2018-04-17 15:02:35 -05:00
Ben Liblit b30da752e0 Remove launchers whose main Java code is found nowhere in WALA 2018-04-17 15:02:35 -05:00
Ben Liblit 557ea62426 Note some excessive resource copying that we should eventually fix 2018-04-17 15:02:35 -05:00
Ben Liblit 5b7e3f750e Create a broad "Process Test Resources" Eclipse launch configuration
This should prepare test resources for all subprojects.  A WALA
developer should run this once before running any tests inside
Eclipse.  Initially I'd hoped to make this more narrowly focused, but
Eclipse just doesn't have the infrastructure to deal with fine-grained
dependencies.  On the other hand, running "./gradlew
eclipsePrepareTestResources" automatically for each build seems like
overkill, and could end up being rather slow.  So for now we require
that the developer run this once, by hand.
2018-04-17 15:02:35 -05:00
Ben Liblit 62d7980ea3 Fix various warnings produced by "./gradlew javadoc"
Three stubborn warnings remain, but this is progress!
2018-04-17 15:02:35 -05:00
Ben Liblit 72a9ddd2d7 Fix warnings about Javadoc links to "java.lang.reflect" package 2018-04-17 15:02:35 -05:00
Ben Liblit 57e3dc15fa Trigger custom clean tasks whenever running "./gradlew clean"
A cleaned tree is now much closer to a pristine tree that has just
been checked out and never built.  The only extra created files that
are left behind are ".gradle", "buildSrc/.gradle", and
"buildSrc/build".
2018-04-17 15:02:35 -05:00
Ben Liblit 48fe74cba7 Unpack node.js in the same place that Maven unpacks it
This gets rid of some Eclipse warnings that stem from Buildship being
confused about what it should treat as a source directory if Maven and
Gradle are both being used in the same tree.
2018-04-17 15:02:35 -05:00
Ben Liblit 4809a365de Tweak Buildship-generated Eclipse ".project" file for extra jars 2018-04-17 15:02:35 -05:00
Ben Liblit ca5824a214 Update Gradle wrapper to Gradle 4.5
No major new features for us here, but better native caching and other
performance improvements.
2018-04-17 15:02:35 -05:00
Ben Liblit f7f8dd4351 Get a core test to work by putting "bcel-5.2.jar" where expected 2018-04-17 15:02:35 -05:00
Ben Liblit 2233d56d2a Get a Dalvik test to work by putting "dx.jar" where expected 2018-04-17 15:02:35 -05:00
Ben Liblit 9df594189d Compute a library path from the native software model
Previously we were repeating the library path twice, but that's not
good for long-term maintenance.  That being said, extracting this
information from the depths of the native software model seems *far*
more complex than it should be.  I had hoped for something nicer in
response to
<https://discuss.gradle.org/t/compute-wl-rpath-flag-suitable-for-native-shared-library/25278>,
but so far there's nothing.
2018-04-17 15:02:35 -05:00
Ben Liblit a3f524f7a9 Compute a library path from the corresponding linker task
Previously we were repeating the library path twice, but that's not
good for long-term maintenance.
2018-04-17 15:02:35 -05:00
Ben Liblit 2a6eee85a4 rpath only matters for shared libraries 2018-04-17 15:02:35 -05:00
Ben Liblit 3b8e32b322 Add previously-undeclared dependency of tests on native library 2018-04-17 15:02:35 -05:00
Ben Liblit b2ba188176 Avoid random leftover junk by using "Sync" instead of "Copy" 2018-04-17 15:02:35 -05:00
Ben Liblit 1b4e04be6a Simplify filtering of archive contents 2018-04-17 15:02:35 -05:00
Ben Liblit df8a61a8d7 Override specific "cleanFooBar" tasks instead of generic "clean" 2018-04-17 15:02:35 -05:00
Ben Liblit 84b0846517 Be more concise by calling property setters instead of assigning 2018-04-17 15:02:35 -05:00
Ben Liblit d3ddbd6343 Be more concise by omitting implicit "it." in closures 2018-04-17 15:02:35 -05:00
Ben Liblit f12f5faa83 Change archive file names while unpacking, rather than in two stages 2018-04-17 15:02:35 -05:00
Ben Liblit 016538b688 Use Groovy's implicit "it" closure argument 2018-04-17 15:02:35 -05:00
Ben Liblit 3b4ae0f210 Remove leftover debugging output that I no longer need 2018-04-17 15:02:35 -05:00
Ben Liblit cad94b7076 Download "android-4.1.1.4.jar" (as "android.jar") when needed
Previously Maven did this, but Gradle did not.  So Gradle testing
would only succeed if we'd already done a Maven build first.  Now
these tests pass in a fresh tree that's never seen a Maven build.
2018-04-17 15:02:35 -05:00
Ben Liblit 141e4a6b41 Simplify how we refer to a task's only output 2018-04-17 15:02:35 -05:00
Ben Liblit f628ee1e08 Don't bother importing when we only need one symbol, one time 2018-04-17 15:02:35 -05:00
Ben Liblit 8058acb18b Download NodeJS and include its "lib/*.js" files in jar archive 2018-04-17 15:02:35 -05:00
Ben Liblit aabace3241 Remove "extraBundledJars" task, which nothing else actually uses
Some tests in other subprojects do depend on some these extra jar
files.  But they can declare those specific dependencies as needed.
Nothing seems to depend on the entire group of extra jars, so it's not
really useful to declare a task that is merely an alias for all of
them.
2018-04-17 15:02:35 -05:00
Ben Liblit 3b172370d0 Set working directory in the same way Maven does
This seems to help ECJSyncDuplicatorTest find a "./src/Monitor2.java"
file that it needs.  The test still fails, though, for other reasons.
2018-04-17 15:02:35 -05:00
Ben Liblit b24f60e727 Enable a few more tests that started working, or perhaps always did 2018-04-17 15:02:35 -05:00
Ben Liblit 60870d7231 Factor out recurring pattern of MD5 checksum + stamp file 2018-04-17 15:02:35 -05:00
Ben Liblit 2c1bc5c52c Replicate Maven's extra system property settings for some tests 2018-04-17 15:02:35 -05:00
Ben Liblit 9c58a94056 Add missing test resources to make many more regression tests pass 2018-04-17 15:02:35 -05:00
Ben Liblit 9d9b10cd0a Remove some test exclusions that are not actually needed now 2018-04-17 15:02:35 -05:00
Ben Liblit b1f0cfce15 Replicate Maven's heap size limits for tests 2018-04-17 15:02:35 -05:00
Ben Liblit 737e948640 Buildship removed classpath provider thing from more launch configs
This is more of the same sort of change first seen in a1bd95d.  Still
no idea why it happens; still hoping that Buildship knows what it's
doing.
2018-04-17 15:02:35 -05:00
Ben Liblit bde936eec5 Turn on proper regression testing in Travis-CI
Many tests are excluded until
<https://github.com/liblit/WALA/issues/5> is fixed.  But we can at
least have Travis-CI watching over our shoulder to ensure that
no *new* regressions sneak into the tree.
2018-04-17 15:02:35 -05:00
Ben Liblit e2e340b490 Explicitly disable regression tests that are currently failing
<https://github.com/liblit/WALA/issues/5> notes that several
subprojects' tests are currently broken under Gradle.  I'd still like
to be able to run non-broken tests, though.  So here I'm disabling the
failing tests.  The intent is to treat these exclusions as a to-do
list.  We can remove exclusions as we get the corresponding tests
working.  No more exclusions means
<https://github.com/liblit/WALA/issues/5> is fixed.
2018-04-17 15:02:35 -05:00
Ben Liblit 6a4ed60e9a Explicitly make "/tmp/DroidBench" be a file, not just a string
I'm hoping this might remove some seemingly-spurious reruns of this
task.  Still not sure why those are happening, though.
2018-04-17 15:02:35 -05:00
Ben Liblit 56b3c1d37c Do not run Gradle linter by default
It's rather slow, adding roughly five seconds to every "./gradlew"
invocation.  And the advice it gives might not even be reaching a
fixed point.  I like the idea of running the linter as part of CI
testing, but I now think it's overkill to impose on every developer
build.
2018-04-17 15:02:35 -05:00
Ben Liblit 582fb2a97b Dependency tweaks suggested by Gradle linter
I'm starting to wonder whether the linter might be driving us in
cycles rather than reaching a fixed point.  We should keep our eyes on
this.
2018-04-17 15:02:35 -05:00
Ben Liblit a32a3e3191 Teach Gradle how to download "/tmp/DroidBench" when needed
One less thing for developers to have to remember to do manually!
2018-04-17 15:02:35 -05:00
Ben Liblit 75270b18ca Give each verification task an output for better incremental building 2018-04-17 15:02:35 -05:00
Ben Liblit 365d17bf32 Simplify how we refer to existing tasks 2018-04-17 15:02:35 -05:00
Ben Liblit e654e3dd16 Add missing resources for "com.ibm.wala.cast.js.test" tests
The ":com.ibm.wala.cast.js.test:build" task now passes.
2018-04-17 15:02:35 -05:00
Ben Liblit 6fec4bba94 RPath settings apply only to Linux; some only to Linux on x86_64
I don't know whether Windows or MacOS needs anything similar.  If they
do, the details will differ, and should be handled by adding suitable
cases to these switch statements.
2018-04-17 15:02:35 -05:00
Ben Liblit 23a301cfff Correctly declare dependency on a task that has not been defined yet 2018-04-17 15:02:35 -05:00
Ben Liblit 6baa918963 Dependency tweaks suggested by Gradle linter
This partially reverts 72bc456b7.  I'm starting to wonder whether the
linter might be driving us in cycles rather than reaching a fixed
point.  We should keep our eyes on this.
2018-04-17 15:02:35 -05:00
Ben Liblit e4cc086476 Simplify file management for a download task 2018-04-17 15:02:35 -05:00
Ben Liblit cf9281719a Download, extract, and/or construct various additional bundled jars
I don't really know what these are all used for.  However, Maven+Ant
builds them, so for now Gradle should too.
2018-04-17 15:02:35 -05:00
Ben Liblit e32b495354 Prefer single-quoted (non-interpolated) strings where sufficient 2018-04-17 15:02:35 -05:00
Ben Liblit be8f22145e Teach Gradle how to find and copy a Jar archive that we bundle
I'm not actually sure why this archive is needed, except that it is
mentioned in "META-INF/MANIFEST.MF" and "build.properties".  If we
eventually stop supporting Maven, then we may be able to discard the
"copyJarsIntoLib" task and the corresponding lines in
"META-INF/MANIFEST.MF" and "build.properties"
2018-04-17 15:02:35 -05:00
Ben Liblit fd4d68d278 Buildship removed classpath provider thing from all launch configs
This consistently happens when I import WALA as an existing Gradle
project into Eclipse with Buildship.  I don't really know what this
change means, or whether it's desirable.  For now, I'm going to trust
Buildship and see what happens.
2018-04-17 15:02:35 -05:00
Ben Liblit 0d557aec3b Complain more loudly about missing output directories 2018-04-17 15:02:35 -05:00
Ben Liblit 18e34918d5 This is no longer how we'll build the native library in Eclipse 2018-04-17 15:02:35 -05:00
Ben Liblit 8f52ab8d36 Simplify inclusion of "OSGI-INF" and the only file it contains 2018-04-17 15:02:35 -05:00
Ben Liblit d14d40ee3f Tweak output dirs to match what Buildship puts into ".classpath" 2018-04-17 15:02:35 -05:00
Ben Liblit 51c9e062f4 Disable some Eclipse warnings on Java test inputs
I think these were previously not being compiled at all.  Now, with
Buildship generating Eclipse ".project" settings automatically, these
are being processed.  In general we don't care much about questionable
code in test data, though.
2018-04-17 15:02:35 -05:00
Ben Liblit efd3a6ab18 Let Buildship create new settings files when importing
These settings files currently are generated with an initial timestamp
comment line, which is not something we'd want to track in version
control.  Fortunately, the contents of these files are entirely
mundane, so there should be no problem with having Buildship generate
them anew each time a developer imports WALA into Eclipse as an
existing Gradle project.
2018-04-17 15:02:35 -05:00
Ben Liblit da27efec97 Have Buildship add Eclipse plugin (PDE) nature to some subprojects
Specifically, we need this for subprojects that build included plugins
for any of the "*_feature" subprojects.
2018-04-17 15:02:35 -05:00
Ben Liblit be11083cd8 Exclude Eclipse ".project" and ".classpath" from version control
Apparently Buildship generates these when one uses Import -> Existing
Gradle Project:
<https://discuss.gradle.org/t/buildship-eclipse-plug-in-multiproject-builds/24030/5>.
We can use the Gradle "eclipse" plugin if customizations are
necessary, but my impression is that the intent is to treat ".project"
and ".classpath" as generated files, not sources to be tracked in
source control.
2018-04-17 15:02:35 -05:00
Ben Liblit 2753810958 Update Gradle wrapper to latest version (4.4.1) 2018-04-17 15:02:35 -05:00
Sungho Lee 41fe177e89 Fill the dynamic library path for OSX 2018-04-17 15:02:35 -05:00
Sungho Lee 2e03ded0f8 Fill the dynamic library path for OSX 2018-04-17 15:02:35 -05:00
Ben Liblit 2bc0768242 Simplify loading of plugins shared by many subprojects 2018-04-17 15:02:35 -05:00
Ben Liblit db348b4ddd Clean up some simple syntactic redundancy in dependency declarations 2018-04-17 15:02:35 -05:00
Sungho Lee a185ae500e Check Java version 2018-04-17 15:02:35 -05:00
Sungho Lee 6016bfa21f Remove unused dependencies 2018-04-17 15:02:35 -05:00
Ben Liblit 95d7bf775e Better handling of OS- and architecture-specific JDK paths 2018-04-17 15:02:35 -05:00
Ben Liblit 4b6c26eb07 Add various test resource directories
Unfortunately these tests are still not finding their resources
properly at test run time.  I don't know why.  It seems to have
something to do with how the tests instantiate and use class loaders.
I'm probably going to need expert help with this.
2018-04-17 15:02:35 -05:00
Ben Liblit e9a79212c8 Dependency tweaks suggested by Gradle linter 2018-04-17 15:02:35 -05:00
Ben Liblit e64fbc7050 Find the "xlator_test" shared library at test run time
Dependencies are still not set properly here, so you need to have
built the shared library ("./gradlew xlator_testSharedLibrary") before
running the ":com.ibm.wala.cast.test:test" test task.  But at least
the tests do now find and load that shared library properly.
2018-04-17 15:02:35 -05:00
Ben Liblit 651f40c170 Replace source directories rather than appending to them
I was confused about the differences among:

	srcDir 'foo'
	srcDirs ['foo']
	srcDirs = ['foo']

As it turns out, the first two append to the set of source
directories, while the last replaces this set entirely.  I generally
want replacement, since WALA's current directory layout never matches
Gradle's assumed defaults.
2018-04-17 15:02:35 -05:00
Ben Liblit f7c7419351 Cleaner way to form colon-deliminated search path from list of paths 2018-04-17 15:02:35 -05:00
Ben Liblit 5f513fd643 Cleaner approach to augmenting Javadoc classpath 2018-04-17 15:02:35 -05:00
Ben Liblit e23e6786da Start getting some unit tests to pass
The main requirement here is to arrange for the proper classpath
settings when tests are running so that they can find any associated
resources (i.e., other supporting files).
2018-04-17 15:02:35 -05:00
Ben Liblit a81d583cbf Tweak classpath for some Javadoc build tasks
This comes up when the Javadoc comments refer to classes in other
subprojects that the corresponding Java code did not actually depend
upon.
2018-04-17 15:02:35 -05:00
Ben Liblit 1a3a1570af Declare common library dependencies for source sets, not binaries
No sense repeating this for each binary when it's the same for all of
them.
2018-04-17 15:02:35 -05:00
Ben Liblit 35e04bc598 Add a second native library and a native executable 2018-04-17 15:02:35 -05:00
Ben Liblit df2e39b0fc Add Gradle logic for building a native library
This approach uses no external makefiles; it's pure Gradle.  Nice!
2018-04-17 15:02:35 -05:00
Ben Liblit 3f3de7a7fa Compile test code, but don't run it for now
The tests are currently broken due to some sort of problem using class
loaders to find supporting resources.  Until I figure this out, better
to have Travis-CI verify only the things we think work.
2018-04-17 15:02:35 -05:00
Ben Liblit aae1c2230a Consistently use simple sorted order for dependencies
This isn't even sorting by library or subproject name.  It's just a
dumb textual sort of the contents of each line.
2018-04-17 15:02:35 -05:00
Ben Liblit 336f0c04ad Leave Gradle linter turned on by default, now that it's quieter 2018-04-17 15:02:35 -05:00
Ben Liblit 695cd2863c Properly distinguish main from test code, now that I know how 2018-04-17 15:02:35 -05:00
Ben Liblit a276932a10 Selectively disable some Gradle linter rules
Specifically, we're not really in a position now to deal with
duplicated classes among our dependencies.  Maybe we can try harder to
examine those in the future, but for now they are a distraction from
other issues that we can attack more readily.
2018-04-17 15:02:35 -05:00
Ben Liblit 143698bbe5 Split generic Java setup from OSGi substitution setup 2018-04-17 15:02:35 -05:00
Ben Liblit 74e39ce101 Automated Gradle-driven download of JLex test input 2018-04-17 15:02:35 -05:00
Ben Liblit 777509adbc Disable Javadoc linter for now
Some of the linter's checks produce failures (errors) when Gradle
builds the Javadoc documentation.  Fixing them isn't really a Gradle
issue, though, so I don't want to deal with them now.
2018-04-17 15:02:35 -05:00
Ben Liblit 0c24fde2ef Improve documentation for broad sections of top-level build script 2018-04-17 15:02:35 -05:00
Ben Liblit 4bb91b4bba More Gradle dependency clean-ups suggested by linter
Unfortunately the linter does not reach a fixpoint if you keep trying
to apply its suggestions.  If you include "compile
'org.eclipse.core:org.eclipse.core.runtime:3.10.0.v20140318-2214'" in
the dependencies for "com.ibm.wala.ide.jdt", then the linter tells you
that this dependency is unused and can be removed.  If you remove it,
then the linter tells you that it should be added.  Sigh.
2018-04-17 15:02:35 -05:00
Ben Liblit 9ac69fb0ef Fix a tricky cross-subproject Javadoc dependency
By default, each subproject's Javadoc task depends on the same
subproject's Java compilation task, and uses the same classpath.
Thus, any classes that some Java code uses will also be visible when
building the same Java code's documentation.

In this case, we need to see one of the "com.ibm.wala.core" classes in
order to build the "com.ibm.wala.util" documentation.  However, we
cannot have Java compilation of "com.ibm.wala.util" depend on Java
compilation of "com.ibm.wala.core", because that would create a
dependency cycle.  So we need to add this as a special dependency just
for the "com.ibm.wala.util" documentation task, and add the
appropriate classpath as well.

I'm quite proud of myself for figuring out how to do this properly.
2018-04-17 15:02:35 -05:00
Ben Liblit 781a448a9a In Travis-CI, test Maven and Gradle separately and concurrently
This should help identify cases where the Gradle build only works if
it runs before or after a Maven build.  It will also help us recognize
any Maven regressions accidentally introduced by our Gradle work.
2018-04-17 15:02:35 -05:00
Ben Liblit dcc7677b34 Add a Gradle linter to help me write clean build configurations
The linter does not run by default.  To activate it, use "./gradlew
autoLintGradle".
2018-04-17 15:02:35 -05:00
Ben Liblit b94390f2fe Additional explicit dependencies suggested by Gradle linter 2018-04-17 15:02:35 -05:00
Ben Liblit 54a2878b0f Automated Gradle-driven download of AJAXSLT test inputs
I'm not sure that I am doing this in the best way possible.  But it
seems to be working.  Refinements are welcome!
2018-04-17 15:02:35 -05:00
Ben Liblit 651a0d4d82 Add Gradle build script for a subproject that previously had none 2018-04-17 15:02:35 -05:00
Ben Liblit 25e2201ec6 Add Gradle build script for a subproject that previously had none 2018-04-17 15:02:35 -05:00
Ben Liblit 7af7bbf881 Add Gradle build script for a subproject that previously had none 2018-04-17 15:02:35 -05:00
Ben Liblit 603378cd0b Add Gradle build script for a subproject that previously had none 2018-04-17 15:02:35 -05:00
Ben Liblit b6e4939097 Add Gradle build script for a subproject that previously had none 2018-04-17 15:02:35 -05:00
Ben Liblit 22b59de491 Add a direct dependency that previously we picked up transitively 2018-04-17 15:02:35 -05:00
Ben Liblit 045b9f646c Run a Gradle build after the Maven build
Eventually I'll want to swap that order, so that we know that Gradle
builds work even without any help from Maven build setup logic.  For
now, though, I just want to test whether the Gradle build works at
all.
2018-04-17 15:02:35 -05:00
Ben Liblit 401fbaf89a Many improvements to Gradle build support, including within Eclipse 2018-04-17 15:02:35 -05:00
Sungho Lee e7154b9ac7 change hamcrest library version of core.tests 2018-04-17 15:00:03 -05:00
Sungho Lee 69f0a93fb6 Support the gradlew build 2018-04-17 15:00:03 -05:00
Sungho Lee 6dceb3d8ef Change build.gradle files for proper format and delete all tests 2018-04-17 15:00:03 -05:00
Sungho Lee 04923544f0 Gradle build scripts 2018-04-17 15:00:03 -05:00
Julian Dolby 3b3a97e8af
Merge pull request #293 from liblit/remove-cvs-ignore
WALA uses Git, so CVS ignore patterns are moot
2018-04-14 21:49:40 -04:00
Ben Liblit 4bb4a3104a WALA uses Git, so CVS ignore patterns are moot 2018-04-14 19:08:14 -05:00
Julian Dolby 883b7282f4
Merge pull request #287 from pierlauro/master
Protected visibility for JavaSourceLoaderImpl's internal methods and classes
2018-04-13 17:02:24 -04:00
Julian Dolby 726b3c35ce
Merge pull request #292 from liblit/fix-raw-types-warnings
Resolve the last two Eclipse warnings about using raw types
2018-04-13 17:01:52 -04:00
Ben Liblit 6546d5d6a4 Resolve the last two Eclipse warnings about using raw types
Fixes bug #244.
2018-04-13 12:53:33 -05:00
Julian Dolby 0052213542 build ML projects 2018-04-13 09:11:57 -04:00
Julian Dolby 436d3165f7 rename getNumberOfParameters to getNumberOfPositionalParameters since the Python front end now supports keyword parameters
support variable names in IR for synthetic summaries
2018-04-12 19:09:25 -04:00
Julian Dolby 41d254d547 more type parameters for analysis engine 2018-04-10 16:00:44 -04:00
Achim D. Brucker f6c663c238 Merge remote-tracking branch 'upstream/master' 2018-04-05 23:19:36 +01:00
Pierlauro Sciarelli 886ba11c1e Protected visibility for JavaSourceLoaderImpl's internal methods and classes 2018-03-08 15:52:20 +01:00
Julian Dolby e2c1f72a3e
Create LICENSE 2018-03-08 09:08:53 -05:00
Ben Liblit 0512241027 Use the proper JUnit mechanism for conditionally skipping tests
These are slow tests that we were already effectively turning into
no-ops when running on Travis CI.  By skipping them using the proper
JUnit mechanism, these tests will show up as ignored or skipped in
test outcome reports.  That's better than having them show up as
passing, when we really don't know whether they would have passed or
failed.
2018-03-05 11:22:49 -08:00
Julian Dolby 6cb72ad2b8 fixes to make PropagationGraph and friends easier to use in dataflow problems 2018-03-02 15:29:42 -05:00
Julian Dolby e1def2ffb5 more generalization for reuse 2018-02-17 22:08:09 +01:00
Julian Dolby be6bb3dc9a a little more work on summaries 2018-02-14 18:54:21 -05:00
Julian Dolby 6c1d0d9cb6 more work for reuse
make synthetic code better support non-Java languages
2018-02-14 09:00:07 -05:00
Ben Liblit 81a6e67b4b Remove "@param" Javadoc tags for parameters that no longer exist 2018-02-10 18:08:15 -08:00
Julian Dolby 7d76e20d2a try to find dx.jar 2018-02-05 15:43:49 -08:00
Julian Dolby aa414b3503 abandon hackish profiles 2018-02-05 15:26:08 -08: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 b7d9d037a6 more refactoring for reuse 2018-01-30 14:08:25 -05:00
Julian Dolby 0f3b6f5d7e disable debugging properly 2018-01-25 15:18:17 -05:00
Julian Dolby cd944a8f12 refactoring of CAst front end machinery to allow more reuse 2018-01-25 14:42:27 -05:00
Julian Dolby 8796653292 Merge branch 'master' of https://github.com/wala/WALA 2018-01-23 19:57:37 -05:00
Julian Dolby 9c29f59e21 merge 2018-01-23 19:57:34 -05:00
Julian Dolby 742b42efdf native config cleanup 2018-01-20 17:40:10 +00:00
Ben Liblit 372f0bd5d8 Fix several broken cross-references in Javadoc comments 2018-01-17 10:35:49 -08:00
Manu Sridharan 76faa4df2d
Fix bug with method lookup (#276)
The previous lookup logic would erroneously look in superclasses for a constructor with parameters.

Bug reported on [the mailing list](https://groups.google.com/forum/#!msg/wala-sourceforge-net/6m_VmDF-lZ0/erZIYQ68BwAJ;context-place=topic/wala-sourceforge-net/TjRzdDyljjY)
2017-12-23 16:38:26 -08:00
Julian Dolby a19507312a
Merge pull request #274 from ponder-lab/upstream_master2
Fix Atom.startsWith() failure case.
2017-12-20 22:45:18 +00:00
Julian Dolby d9cd362f8b
Merge pull request #275 from liblit/fix-javadoc-miscellaneous
Fix various Javadoc errors
2017-12-20 22:44:11 +00:00
Ben Liblit 0a770ce7ab "@todo" is not a valid Javadoc tag 2017-12-19 16:53:56 -06:00
Ben Liblit 73e6291a8a Fix bad split of "<a>" across multiple comment lines 2017-12-19 16:53:56 -06:00
Ben Liblit 4cf2dac911 Fix missing "#" when using "@link" to refer to same-class member 2017-12-19 16:53:56 -06:00
Ben Liblit 0d6d9f2b2e Remove useless "@return" tags with no descriptive text 2017-12-19 16:53:56 -06:00
Ben Liblit 85ca6424b1 "@link" does not allow generic type parameters in method signatures 2017-12-19 16:53:56 -06:00
Ben Liblit c50dd6302f "<\tt>" is not how you close an HTML "<tt>" tag 2017-12-19 16:53:56 -06:00
Ben Liblit 4ad5322ebf Add missing right curly brace at end of "{@link ...}" 2017-12-19 16:53:55 -06:00
Ben Liblit 9072560a22 HTML lists must not have free-floating text between list items 2017-12-19 16:53:55 -06:00
Ben Liblit a7f00ffce8 "@param" parameter name must match the name of some formal parameter 2017-12-19 16:53:55 -06:00
Ben Liblit ba71f45119 "@throws" should be followed by class name and space, not comma 2017-12-19 16:53:55 -06:00
Ben Liblit ca23fc5b91 "@brief" is not a valid Javadoc tag 2017-12-19 16:53:55 -06:00
Ben Liblit d8b041469f "@returns" is not a valid Javadoc tag, but "@return" is 2017-12-19 16:53:55 -06:00
Ben Liblit ce403cef2b "@throw" is not a valid Javadoc tag, but "@throws" is 2017-12-19 16:53:55 -06:00
Ben Liblit fa62aa03e6 "<verbatim>" is not a valid HTML tag; perhaps "<pre>" was intended? 2017-12-19 16:53:55 -06:00
Ben Liblit 6beaac98bd "<bf>" is not a valid HTML tag, but "<b>" is 2017-12-19 16:53:55 -06:00
Ben Liblit f60c164ec1 Escape "<" and ">" in Javadoc when not used as HTML tag syntax 2017-12-19 16:53:52 -06:00
Raffi Khatchadourian fc62c16d9b Fix https://github.com/wala/WALA/issues/273. 2017-12-19 16:58:48 -05:00
Julian Dolby d29e278291 more instrumentation fixes
remove junk from dominators
2017-12-08 11:19:41 +08:00
Julian Dolby 5a02cde690 more flexibility to not extract calls for invokedynamic. Potentially, this will break instrumented methods that have massive numbers of invokedynamics in them, but that seems unlikely to happen at least with Java use of invokedynamic so far. We can burn this bridge when we come to it. 2017-12-06 19:04:27 +08:00
Ben Liblit 0286c2b048 Use Iterator2Iterable helper to convert more loops to for-each 2017-12-04 14:04:39 -08:00
Ben Liblit bf6698edf5 Use more specific type than "Object" to avoid casting 2017-12-04 14:04:39 -08:00
Ben Liblit 66e2e76205 Prefer to cast Iterables instead of the things they can iterate over 2017-12-04 14:04:39 -08:00
Ben Liblit 544a71ae72 Remove type arguments that Java 1.7+ can infer for us 2017-12-04 14:04:39 -08:00
Ben Liblit b25e461bfe Convert a few more loops into modern for-each loops 2017-12-04 14:04:39 -08:00
Julian Dolby da4247f923 add HybriDroid to testing 2017-12-04 17:15:34 +08:00
Julian Dolby 0ea98643f3 revert lambdas thait cause trouble with WALA Mobile. It may be that the
issue is Swing, since I think that is not on Android.
2017-12-03 11:31:29 +08:00
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
Achim D. Brucker 108dea730b Merge remote-tracking branch 'upstream/master' 2017-11-14 05:31:19 +00: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
Achim D. Brucker 503266fa74 Merge remote-tracking branch 'upstream/master' 2017-10-31 08:31:26 +00: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
Julian Dolby b504165e64 clean up native init 2017-10-17 20:12:42 -04:00
Julian Dolby e23a1fc9a4 Merge pull request #227 from liblit/warning-fixes-plug-in-development-renamings
Rename `...-feature` to `..._feature` in subdirs and features
2017-10-10 11:42:00 -04:00
Achim D. Brucker cf914e9bd1 Merge remote-tracking branch 'upstream/master' 2017-10-05 21:04:12 +01:00
Julian Dolby b3fbbe0edb Merge branch 'master' of https://github.com/wala/WALA 2017-10-02 14:21:34 -04:00
Julian Dolby b49f6c31d3 merge 2017-10-02 14:21:28 -04:00
Julian Dolby ce0411d8a4 disable check that breaks TeaVM 2017-09-28 20:15:24 +00:00
Julian Dolby 2c5d6ed15f hack for TeaVM 2017-09-28 19:34:54 +00:00
Julian Dolby 5dc7ed76f5 Merge branch 'master' of https://github.com/wala/WALA 2017-09-28 19:03:46 +00:00
Achim D. Brucker da27479c9c Merge remote-tracking branch 'upstream/master' 2017-09-24 09:52:14 +01:00
Manu Sridharan d5936b2f7e Enable ErrorProne on wala.util project (#248)
* remove import
2017-09-19 05:52:53 -07:00
Ben Liblit 1fcdfbe2a3 Add localization properties file with some bundle string definitions
This fixes two Eclipse Plug-in Development warnings of the form "Key
'...' is not found in localization properties file:
OSGI-INF/l10n/bundle.properties".
2017-09-17 14:25:40 -07:00
Ben Liblit d70e52e323 Set required build property for project-specific compiler settings
This fixes two Eclipse Plug-in Development warnings of the form "The
'javacProjectSettings' build entry should be set when there are
project specific compiler settings".
2017-09-17 14:25:40 -07:00
Ben Liblit 182073ff4f Silently allow plug-ins to not export all of their packages
This removes three Eclipse Plug-in Development warnings of the form
"This plug-in does not export all of its packages"

I assume that omitting some exports is OK, because apparently nothing
else fails to build against these.  If an omitted export were needed
elsewhere, something would fail to build.
2017-09-17 14:25:40 -07:00
Achim D. Brucker 8d781d1ec1 Merge remote-tracking branch 'upstream/master' 2017-09-17 20:19:38 +01:00
Julian Dolby 3ee1f2d368 Merge branch 'master' of https://github.com/wala/WALA 2017-09-16 18:25:35 +00:00
Julian Dolby 36ab38c659 expanded Monitor2 2017-09-16 14:24:47 -04:00
Julian Dolby 3c898224ff Revert changes to native code for now
This reverts commit a39da55d97.
2017-09-16 14:23:00 -04:00
Julian Dolby e399d7b9f3 Merge branch 'master' of https://github.com/wala/WALA 2017-09-16 18:19:07 +00:00
Julian Dolby 5a04c422e3 merge 2017-09-16 18:19:04 +00:00
Julian Dolby a39da55d97 need shrike
update monitor test
2017-09-16 14:06:28 -04:00
Julian Dolby 385b135bf2 Merge branch 'master' of https://github.com/wala/WALA 2017-09-12 07:13:45 +09:00
Julian Dolby 3083e6c06d new test 2017-09-12 07:13:35 +09:00
Achim D. Brucker 5d28f92798 Fixed compilation error with Java 8. 2017-09-11 14:35:58 +01:00
Achim D. Brucker 9716d50146 Merged with remote-tracking branch 'upstream/master'. 2017-09-10 23:20:40 +01:00
Ben Liblit 65672f98ba Suppress Eclipse warnings that arise in JLex, which we don't control 2017-08-30 17:03:35 -07:00
Ben Liblit 01ea35ccb7 Rename "...-feature" to "..._feature" in subdirs and features
This change affects both top-level subdirectory names as well as
Eclipse plug-in feature names.  Perhaps it would have been possible to
change only the latter, but I don't like the idea of the two being
different.

These name changes fix three Eclipse plug-in warnings of the form:

	Illegal value '...-feature' for attribute 'id'.
	Legal token characters are "a-z", "A-Z", "0-9", "_".  Tokens
	must be separated by "."

I'll be the first to admit that I know nearly nothing about Eclipse
plug-in development.  If changing these plug-in feature IDs has
broader implications that the automated regression tests won't detect,
then I probably overlooked them too.  I would greatly appreciate
skeptical review of this change by someone who knows Eclipse plug-in
development well.

Note that personal Eclipse workspaces may need some manual adjustment
after this change.  The three "...-feature" Eclipse projects should be
removed from the workspace, and the three corresponding "..._feature"
Eclipse projects should be added.  If you do your git pull using
Eclipse's team features, perhaps it is smart enough to do this for
you?  I don't know, but it wouldn't surprise me if fixing things
manually were still needed even in that case.
2017-08-30 16:32:33 -05:00
Ben Liblit 15a30c1436 Tell M2Eclipse to run a few Maven plugins with no special handling
Specifically, this will run the "javadoc" goal of the
"maven-javadoc-plugin" and the "plugin-source" goal of the
"tycho-source-plugin" whenever Eclipse does a full build.  It will not
run these on incremental builds, though.  Maven plugins in general are
usually not designed with incremental execution in mind, so rerunning
them on every incremental build turns out to be too sluggish in
practice.

Previously, M2Eclipse would occasionally notice these two plugins,
realize it didn't know what to do with them, and produce Eclipse error
diagnostics that were difficult to resolve.  With this change we are
telling Eclipse's Maven builder to just run the plugins in the natural
way even though M2Eclipse has no special handling built-in for them.

Fixes #198, much to my relief.
2017-08-30 13:39:25 -07:00
Ben Liblit 95507651d2 Trivial indentation fix
I would not bother to fix indentation by itself, but it makes sense to
fix this indentation now in advance of some larger changes coming to
this file soon.
2017-08-30 13:39:25 -07:00
Manu Sridharan 4aedf7124e Update README.md
Add Travis graphic
2017-08-30 13:38:59 -07:00
Ben Liblit 5b6e6aefa0 Remove some unnecessary warning suppression annotations 2017-08-28 11:55:56 -07:00
Ben Liblit 559c577093 Treat diagnostics about unchecked type operations as errors 2017-08-28 11:55:56 -07:00
Ben Liblit f8e3172653 Be explicit about the type parameter in generic static method calls
In modern Java, we would not need to do this.  Java 1.8 can infer the
generic type, which would allow us to write simply
"Collections.emptySet()" instead of
"Collections.<TypeReference>"emptySet()".  Unfortunately, Android is
behind the times, so this specific project targets Java 1.5.  That
older Java definition does not do the inference we would want here, so
we have to be explicit instead.
2017-08-28 11:55:56 -07:00
Ben Liblit 1603ec314f Use Collections.emptySet() instead of Collections.EMPTY_SET
The former returns Set<T> for any T, whereas the latter merely returns
a raw Set.  Using the former instead of the latter fixes four Eclipse
warnings about using raw generics.
2017-08-28 11:55:56 -07:00
Julian Dolby 5b23010116 Merge branch 'master' of https://github.com/wala/WALA 2017-08-28 08:11:31 -04:00
Manu Sridharan b54eadf461 disable Maven nature for NodeJS project 2017-08-27 20:50:38 -07:00
Ben Liblit ecd1ff72fe Remove a default encoding setting that Eclipse considers unnecessary
Julian added this in a recent commit, but has told me that he does not
think it is necessary, and that I am free to remove it if it is
causing trouble.  Removing this does indeed fix one Eclipse error
diagnostic: "Default encoding (UTF-8) for library '.' should be
removed as the workspace does not specify an explicit encoding."
2017-08-27 20:15:54 -07:00
Manu Sridharan 14ec60add8 remove unneeded .classpath entry 2017-08-27 15:32:24 -07:00
Julian Dolby 5f370bcfd8 remove jcommander 2017-08-27 17:22:59 -04:00
Raffi Khatchadourian a49bcf5aa1 Add missing void type. 2017-08-27 11:07:22 -07:00
Ben Liblit 2d641251fb Enforce Eclipse resource leak diagnostics more strongly
In Eclipse projects that currently have no definite or potential
resource leaks, treat any such diagnostics as errors in the future.

In `com.ibm.wala.core`, enable warnings about definite or potential
resource leaks.  Previously these diagnostics were turned off entirely
in this project.  So we actually end up with more warnings now than we
had before, but they are all warnings we should eventually look into.
2017-08-27 11:03:14 -07:00
Ben Liblit eaf1c0af85 Plug a `JarFile` resource leak 2017-08-27 11:03:14 -07:00
Ben Liblit e63de76139 Plug a `JarFile` resource leak 2017-08-27 11:03:14 -07:00
Ben Liblit 3825c03b16 Plug a `JarInputStream` resource leak 2017-08-27 11:03:14 -07:00
Ben Liblit 4cb4273ff9 Plug a `JarInputStream` resource leak 2017-08-27 11:03:14 -07:00
Ben Liblit 6ebbb834b9 Plug an `InputStream` resource leak 2017-08-27 11:03:14 -07:00
Ben Liblit 9c79c7ef9b Plug an `InputStream` resource leak 2017-08-27 11:03:14 -07:00
Ben Liblit 4378fbbc12 Plug an `InputStream` resource leak 2017-08-27 11:03:14 -07:00
Ben Liblit 5751c949e8 Plug an `InputStream` resource leak 2017-08-27 11:03:14 -07:00
Ben Liblit dae5bc58bd Plug an `InputStream` resource leak 2017-08-27 11:03:14 -07:00
Ben Liblit e1010439d1 Plug an `InputStream` resource leak 2017-08-27 11:03:14 -07:00
Ben Liblit 8541d67a14 Plug a `BufferedInputStream` resource leak 2017-08-27 11:03:14 -07:00
Julian Dolby ee8e4b4c83 type hack 2017-08-25 12:06:09 -04:00
Julian Dolby b5b67f3d7c issues with mvncentral.xml 2017-08-25 12:00:39 -04:00
Julian Dolby 44348b80d7 add neglected file 2017-08-25 11:13:40 -04:00
Julian Dolby bd8bf7cb99 fixes for paths on travis 2017-08-25 11:08:54 -04:00
Julian Dolby 701cd1ac7d fix for paths on travis 2017-08-25 11:04:43 -04:00
Julian Dolby b6af5267f1 java 8 changes
minor fixes, such as making CheckForFrontEndErrors more accessible
minor hacks to make stuff compile with TeaVM
2017-08-25 10:58:00 -04:00
Julian Dolby 2d829a339e Merge branch 'master' of https://github.com/wala/WALA 2017-08-22 18:05:59 -04:00
Raffi Khatchadourian 68f30f949d Minor performance improvements to methods in TypeInference class (#230)
* Only get the variable once.

* Only get symbol table if it is needed.
2017-08-21 09:59:15 -07:00
Julian Dolby 6a17898b71 Merge branch 'master' of https://github.com/wala/WALA 2017-08-17 20:06:38 -04:00
Raffi Khatchadourian 72053efd26 Return Java 8 default methods from getAllMethods()
Fixes #219 
Fixes #220
2017-08-17 14:45:49 -07:00
Julian Dolby e599d58cd7 Merge branch 'master' of https://github.com/wala/WALA 2017-08-16 14:50:12 -04:00
Julian Dolby 3371e23de0 java 8 stuff 2017-08-16 14:50:01 -04:00
Ben Liblit b70d69d62f Treat many Eclipse plugin-related problems as errors
These are all problems that Eclipse can detect, but that it detects no
instances of right now.  Treating these as warnings instead of errors
should help prevent us from slipping backward in the future.
2017-08-16 11:36:46 -07:00
Ben Liblit 6f132281b3 Use the default output folder for `dat`
This fixes an Eclipse Plug-In Development warning that reads "Source
folder 'dat/' does not have the output folder in corresponding output
entry 'output..'."  It is not the default quick fix that Eclipse
suggests, and I am *definitely* not sure that this is the right way to
fix this problem.  (I have nearly zero knowledge of Eclipse plug-in
development.)

That being said, this change does make the warning go away, and `mvn
clean install` without `-DskipTests` still succeeds.
2017-08-16 11:36:46 -07:00
Ben Liblit 4da719edbc Exclude a directory containing only C code from the Java build path 2017-08-16 11:36:46 -07:00
Ben Liblit 48be35ddc2 Set `javacProjectSettings` where appropriate
In particular, per the corresponding Eclipse warning, "The
`javacProjectSettings` build entry should be set when there are
project specific compiler settings".
2017-08-16 11:36:46 -07:00
Ben Liblit 291c01b960 Silently ignore unresolved bundles
In particular, be quiet about being unable to resolve
"org.eclipse.jdt.launching.macosx", which was already marked as
`optional` anyway.  I assume that I'm missing this because I'm not
developing on MacOS, and that it would be present if I were.  Can
someone using MacOS confirm this?
2017-08-16 11:36:46 -07:00
Julian Dolby 4a33c527d2 Merge branch 'master' of https://github.com/wala/WALA 2017-08-15 18:01:41 -04:00
Ben Liblit d73b11fd8f Escalate switch-related diagnostics from warnings to errors
We have fixed all of these that Eclipse reports.  Treating them as
errors in the future should help us keep moving in the direction of
cleaner code.
2017-08-15 14:55:34 -07:00
Ben Liblit ea95940d0f Be explicit when case fall-through is intentional 2017-08-15 14:55:34 -07:00
Ben Liblit da5f925cab Be explicit when the proper default for a switch is to do nothing
Of course, doing nothing isn't always the right behavior.  Sometimes a
previously-unhandled value is truly unexpected and one should fail by
throwing an exception.  It may not always be clear whether an
exception or doing nothing is the right choice.  For some `switch`
statements affected by this commit, I initially guessed that throwing
an exception was the right default behavior, but was proven wrong when
doing so caused WALA regression test failures.  That's strong evidence
that the unmatched values were not really unexpected, but merely
should have been handled by doing nothing as before.
2017-08-15 14:55:34 -07:00
Ben Liblit ab791f8c41 Throw a loud exception if switch encounters unexpected enum value
Previously each of these `switch` statements would implicitly do
nothing if an unanticipated `enum` value came along.  My impression is
that each of these `switch` statements is supposed to be exhaustive,
such that an unexpected (unhandled) value should never appear.  If one
does, we should recognize it and complain loudly.

Of course, sometimes the right behavior for previously-unhandled
values is to do nothing.  It may not always be clear whether an
exception or doing nothing is the right choice.  For this commit,
WALA's regression tests still pass even with the possibility of
throwing an exception for unexpected values.  If we assume that the
test suite is thorough, that tells me that throwing an exception is
the right policy for each `switch` statement that I'm changing here.
2017-08-15 14:55:34 -07:00
Ben Liblit cbcfb40435 Don't be silent in case of weird enum value
This `switch` statement currently covers all possible values of the
`enum` it is testing.  However, if a new value were introduced in the
future, the `switch` would have been silent about it instead of
printing a debug message as is done in all of the other cases.  Better
to print *some* kind of debug in the default case too.
2017-08-15 14:55:34 -07:00
Ben Liblit ce335f495d Avoid unintended control fall-through in case of weird enum value
This `switch` statement currently covers all possible values of the
`enum` it is testing.  However, if a new value were introduced in the
future, the `switch` would have allowed control-flow to fall through
by default instead of throwing an exception as is done in all of the
other cases.  Better to throw *some* kind of exception in the default
case too.
2017-08-15 14:55:34 -07:00
Ben Liblit 7dc71151d1 Add missing `break`s to print just 1 debug message instead of 1-3 2017-08-15 14:55:34 -07: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
Ben Liblit 30966195c8 Prefer dynamic dispatch over switch statements on enum values
Eclipse was warning about the lack of a `default` case in the `switch`
statement.  None of the current `enum` values was actually missing
from the `switch`, but if the enum values list were extended in the
future, that would be an easy mistake to make.

Replacing the `switch` with dynamic dispatch to a method lets us
statically enforce the requirement that every enum value must
implement the behavior in some way.
2017-08-15 14:55:34 -07:00
Ben Liblit 37fe595fbd Factor out common logic for Dot output format names/suffixes
Instead of having two `switch` statements on the Dot format
enumeration, give each Dot enumeration value a way to identify its own
preferred file suffix and command-line format name.  This removes some
warnings about `switch` statements without default cases.  It also
creates strong static enforcement that any new Dot format *must* also
provide this information.
2017-08-15 14:55:34 -07:00
Julian Dolby a92b881c22 Merge branch 'master' of https://github.com/wala/WALA 2017-08-15 12:39:27 -04:00
Julian Dolby 6431cbeb60 java 8 2017-08-15 12:39:19 -04:00
Ben Liblit 11b636f764 Suppress some unchecked-cast warnings we cannot avoid
Type erasure makes me sad.
2017-08-15 09:16:59 -07:00
Ben Liblit ba84b5a403 Fix warning about unchecked cast to generic by being less specific
Casting to `Foo<Bar>` results in an unchecked-cast warning due to Java
generics type erasure.  However, sometimes we don't really need a
`Foo<Bar>`, but could simply use any `Foo<?>`.  Casting to the latter
creates no warning.
2017-08-15 09:16:59 -07:00
Ben Liblit 5bcc985069 Tidy up some code that performs unchecked casts to a generic type 2017-08-15 09:16:59 -07:00
Ben Liblit daea7095e2 Fix Eclipse warnings about unchecked casts to generics
This is the first time I can ever remember explicitly casting to
`Object`.  Such a cast might seem useless, and certainly it is
statically known to always succeed.  However, it is here for good
reason.  Without the cast, we end up making a `Pair<Object, ?>` but
what we really want is a `Pair<Object, Object>`.
2017-08-15 09:16:59 -07:00
Ben Liblit bb6be21e2d Fix remaining "unlikely argument type" warnings from Eclipse Oxygen
Each of these required careful consideration of what the original
developer *intended* as distinguished from what the developer's code
actually *does*.  I believe I got each one right, and WALA's
regression tests agree.  A second opinion by a core WALA developer
would be welcome, though.
2017-08-15 09:16:14 -07:00
Ben Liblit cb6d3b282a Fix Eclipse warnings about redundant null checks and assignments
Most of these are harmless, and are best fixed simply by removing the
redundant check or assignment.  The one in FlowType.compareBlocks,
however, revealed a real problem.  This code checks for nullness of
`a` *after* having called a method on `a`.  Assuming that `a` can
indeed be `null` here, the check must come first to avoid a
`NullPointerException`.

In several places, I saw code of this form:

   if (thing == null)
     assert thing != null : ... ;

I honestly don't understand the purpose of that `if` statement.  Why
not just have the `assert` statement there directly?  I removed the
seemingly irrelevant `if` statements in these cases, but if this is
some intentional pattern, please explain it to me.

In a few places where nullness is statically known but non-obvious,
add assert statements to point out what's going on to help future
developers.

Upgrade future such warnings to errors to keep us moving in a cleaner
direction.
2017-08-15 09:11:29 -07:00
Julian Dolby 8ebfd7615c add MemSAT 2017-08-12 20:02:18 -04:00
Julian Dolby 7e8e499f04 get actual art version 2017-08-09 17:33:41 -04:00
Julian Dolby ecdb599674 support for deodexing methods read from Dalvik, using support in dexlib2 2017-08-08 06:34:48 -04:00
Achim D. Brucker 29185f272c Merge with upstream. 2017-08-07 12:07:37 +01:00
Julian Dolby e7a152341c update dependencies 2017-08-06 20:03:37 -04:00
Julian Dolby 2e3836c487 Merge branch 'master' of https://github.com/wala/WALA 2017-08-06 23:33:45 +00:00
Julian Dolby 8282340ec3 merge 2017-08-06 23:33:40 +00:00
Julian Dolby 2fbe15fc91 fetch guava 22 2017-08-06 19:30:16 -04:00
Julian Dolby c5d5ce7fe2 missed files 2017-08-06 19:16:25 -04: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 15f54f0248 Merge branch 'master' of https://github.com/wala/WALA 2017-08-06 10:30:32 -04:00
Manu Sridharan e8bdf2f8f9 version 1.4.4-SNAPSHOT 2017-08-06 07:25:20 -07:00
Julian Dolby 69929b4985 Merge branch 'master' of https://github.com/wala/WALA 2017-08-06 08:06:02 -04:00
Julian Dolby 34dd8c1f04 merge 2017-08-06 08:05:59 -04:00
Manu Sridharan d901b13425 version 1.4.3 2017-08-05 20:52:32 -07:00
Julian Dolby b9b498bd17 Merge branch 'master' of https://github.com/wala/WALA 2017-08-05 21:10:28 -04:00
Julian Dolby eaba8d59b7 Merge branch 'master' of https://github.com/wala/WALA 2017-08-05 21:09:34 -04:00
Manu Sridharan 73063628de cache call targets in CHACallGraph (#213)
This is a simple optimization that helps performance a lot.
2017-08-05 14:07:27 -07:00
Ben Liblit 13d807708f Suppress an Eclipse warning about lacking XML grammar info
The single "No grammar constraints (DTD or XML Schema) referenced in
the document" warning arises in a generated file.  I doubt that we can
change the generation process to include grammar information.  Even if
we could, I don't mind omitting validation here assuming that we can
trust the generator tool to be correct.  Validation is much more
important for human-authored XML; for tool-authored XML, we can live
without it.
2017-08-05 13:30:54 -07:00
Ben Liblit d6ce679a72 Add static private serialVersionUID fields to Serializable classes
We already have plenty of examples of Serializable classes with this
field, and the vast majority of those fields have generated IDs rather
than "1L".  From this I infer that using proper serialVersionUID
fields is considered appropriate WALA coding style.
2017-08-05 13:30:35 -07:00
Ben Liblit f76b79b067 Don't complain about unqualified accesses to instance fields
I'm very picky about code style, but even I see no benefit in
requiring "this.field" instead of simply "field".
2017-08-05 13:30:04 -07:00
Ben Liblit 678e3e64a6 Fix all Eclipse warnings about unused local variables
Also report unused variables as errors in the future, not just
warnings.  We've fixed all of these as of right now, so let's keep it
clean in the future too.
2017-08-05 13:29:50 -07:00
Ben Liblit b1cd868e06 Remove an unused method relating to Android system entry points 2017-08-05 13:29:50 -07:00
Ben Liblit 321b28f149 Remove some unnecessary warning suppressions
One such annotation was unnecessary because the thing it was
suppressing no longer happens.  Any future unnecessary warning
suppressions of this kind will now be treated as errors.

The other annotations were unnecessary because the corresponding
warnings have been disabled entirely in the Eclipse projects'
configurations.  There seems to be no way to tell Eclipse to treat
these as anything other than "info" diagnostics in the future, so
that's how they will remain.
2017-08-05 13:29:50 -07:00
Julian Dolby ef94d85d2b quiet 2017-08-03 21:11:33 +00:00
Julian Dolby 202a53d090 reference javadoc 2017-08-03 20:43:22 +00:00
Julian Dolby 3db5ff4707 use e47 2017-08-02 22:20:09 +00:00
Achim D. Brucker 58bc42a75d Merge remote-tracking branch 'upstream/master' 2017-08-02 21:30:16 +01:00
Julian Dolby 2ba40c99fa Eclipse Oxygen 2017-08-02 19:59:54 +00:00
Julian Dolby 98f770035d merge 2017-08-02 12:28:46 -04:00
Julian Dolby 5b6397297f merge 2017-08-02 12:28:25 -04:00
Julian Dolby 1d144db6d5 Merge branch 'master' of https://github.com/wala/WALA 2017-08-02 12:27:22 -04:00
Julian Dolby 8a76b132cd try new way to make javadoc 2017-08-02 14:56:04 +00:00
Julian Dolby 4629f8b9cd see if maven 3.5.0 builds javascript on travis as it does on my laptop 2017-08-02 02:53:01 +00:00
Julian Dolby 3d2cdf76b7 kill debug logging 2017-08-02 02:13:55 +00:00
Julian Dolby 1971b09b6a mirror 2017-08-02 01:03:56 +00:00
Julian Dolby 340fb45b85 remove -q for diagnostics 2017-08-02 00:39:51 +00:00
Julian Dolby f094bb7bd0 more combinations 2017-08-02 00:25:27 +00:00
Julian Dolby 725c734b8b swap verify and install 2017-08-02 00:04:38 +00:00
Julian Dolby 93119c7ad4 try javadoc 2017-08-01 23:46:43 +00:00
Julian Dolby e41ff85bbb try javadoc 2017-08-01 23:43:26 +00:00
Julian Dolby df6618ee95 try javadoc 2017-08-01 23:09:35 +00:00
Achim D. Brucker 409ab78e36 Merge remote-tracking branch 'upstream/master' 2017-08-01 23:50:46 +01:00
Julian Dolby 10d88f3208 try javadoc 2017-08-01 22:41:21 +00:00
Julian Dolby 31a38e8a4c try javadoc 2017-08-01 22:33:39 +00:00
Julian Dolby 62ca182690 try javadoc 2017-08-01 22:19:37 +00:00
Julian Dolby ab183520da try javadoc 2017-08-01 22:16:32 +00:00
Julian Dolby 9569471d63 try javadoc 2017-08-01 22:15:29 +00:00
Julian Dolby 0e29403485 try javadoc 2017-08-01 22:12:31 +00:00
Julian Dolby 699bc5a308 try javadoc 2017-08-01 22:08:50 +00:00
Julian Dolby 50d0836701 try javadoc 2017-08-01 22:05:32 +00:00
Julian Dolby 9ea26ad22d try javadoc 2017-08-01 22:03:50 +00:00
Julian Dolby 4168547f35 try javadoc 2017-08-01 22:01:38 +00:00
Julian Dolby ec82f6b6e2 try javadoc 2017-08-01 21:57:57 +00:00
Julian Dolby 3dfc70d919 try javadoc 2017-08-01 21:56:21 +00:00
Julian Dolby a3113df645 try javadoc 2017-08-01 21:52:58 +00:00
Julian Dolby bc31c11003 try javadoc 2017-08-01 21:49:44 +00:00
Julian Dolby 63a82aee61 try javascript 2017-08-01 21:45:48 +00:00
Julian Dolby 944f620537 try javascript 2017-08-01 21:44:07 +00:00
Julian Dolby 2b55088213 merge 2017-08-01 10:19:52 -04:00
Ben Liblit f7dc0a06de Treat unused parameters as errors, not merely warnings
We've fixed or suppressed all such warnings, except in projects
containing test inputs.  Let's make sure no more appear in the future.
2017-07-31 15:29:00 -07: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 c65943add1 Enable Eclipse warnings about unused parameters in more projects 2017-07-31 15:29:00 -07:00
Achim D. Brucker ea1c98964c Merge remote-tracking branch 'upstream/master' 2017-07-31 21:22:47 +01:00
Julian Dolby 504102684d Merge branch 'master' of https://github.com/wala/WALA 2017-07-30 18:08:09 -04:00
Julian Dolby f5aaa67598 merge 2017-07-30 18:08:06 -04:00
Julian Dolby b5805b5459 move nio from static ctor to make android 7 happy 2017-07-29 01:52:55 +00:00
Julian Dolby 76435cfa92 prune dependencies 2017-07-29 01:17:52 +00:00
Julian Dolby 9dda017450 Merge branch 'master' of https://github.com/wala/WALA 2017-07-28 13:42:45 -04:00
Julian Dolby ea51030c45 merge 2017-07-28 13:42:29 -04: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 c1572ec3a5 Remove unnecessary warning-suppression annotations
These annotations used to suppress real Eclipse warnings.  However,
we've now turned those warnings off for the entire project.
2017-07-26 20:08:34 -07:00
Ben Liblit 455a4a2bd6 Disable or suppress various Eclipse warnings in test data
These are all things one might consider fixing in real application
data.  Java code used as test inputs, though, serves a different
purpose.  Weird code is generally acceptable or even intentional.
2017-07-26 20:08:34 -07:00
Julian Dolby 00ad57fede trigger WALA-Mobile too 2017-07-24 17:28:24 +00:00
Julian Dolby 27e906135f Merge branch 'master' of https://github.com/wala/WALA 2017-07-24 10:08:10 -04:00
Julian Dolby 13db92ee8c add source files to dalvik test jar 2017-07-24 10:06:52 -04:00
Julian Dolby 18ea72d1d7 try to trigger WALA Client 2017-07-24 10:05:46 -04:00
Julian Dolby 1e95dbcdd4 try to trigger WALA Client 2017-07-24 14:03:06 +00:00
Achim D. Brucker 48631092c3 Tuned warning level down. 2017-07-24 08:28:22 +01:00
Achim D. Brucker e754c037b1 Removed unused variable. 2017-07-24 08:27:35 +01:00
Achim D. Brucker 7cc2b5c8f5 Merge remote-tracking branch 'upstream/master' 2017-07-24 08:14:25 +01:00
Julian Dolby fb6f5df424 add missing files 2017-07-23 18:24:23 +00:00
Ben Liblit ec0d7354ef Disable Eclipse warnings about empty statements
Previously we had 5 such warnings.  That's not very many, but it
suggests that the WALA developers consider this to be an acceptable
coding style.  If that's so, then it's better to hide these warnings
rather than keep them around as a perpetual distraction.
2017-07-18 20:43:36 -07:00
Ben Liblit 10dff7fb1c Disable Eclipse warnings about assignments to parameters
Previously we had 227 such warnings.  That large number suggests that
the WALA developers consider this to be an acceptable coding style.
If that's so, then it's better to hide these warnings rather than keep
them around as a perpetual distraction.
2017-07-18 20:43:36 -07:00
Ben Liblit d5e6da89ae Suppress a benign warning about an unused parameter 2017-07-18 20:43:36 -07:00
Ben Liblit d3c4200bc3 Disable Eclipse warnings about name shadowing
Previously we had 242 such warnings.  That large number suggests that
the WALA developers consider this to be an acceptable coding style.
If that's so, then it's better to hide these warnings rather than keep
them around as a perpetual distraction.
2017-07-18 20:43:36 -07:00
Julian Dolby ecf05f6bd8 Merge pull request #203 from liblit/fix-native-build-Makefile-configuration-churn
Fix native build `Makefile.configuration` churn
2017-07-15 21:10:00 -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
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
Ben Liblit 2f44bbf518 Help Emacs recognize that these are (fragments of) makefiles 2017-07-14 21:46:46 -07:00
Ben Liblit fae3ff6789 Set Emacs indentation configuration to mimic existing code
This isn't fix per se, but adding this configuration info helps me
edit this file in Emacs without introducing unnecessary indentation
changes.
2017-07-14 21:46:29 -07:00
Ben Liblit a1ef133501 Fail early if any subcommand fails or if an udefined var is used
I like my shell scripts to be paranoid.
2017-07-14 21:45:51 -07:00
Ben Liblit 433cd78f65 Move logic from "cbuild.sh" into portable "Makefile.configuration"
In "com.ibm.wala.cast.test", the "cbuild.sh" script is gone entirely.
Instead, "pom.xml" directs Maven to run "make" directly.  We still
have a "Makefile.configuration" file in this project, but this file is
now independent of where WALA is being built and of where Java is
installed.

In "com.ibm.wala.cast", a small "cbuild.sh" remains, to do some
special processing involving Visual Studio variables under Windows.
When not building under Windows, "cbuild.sh" now simply runs "make".
It may well be possible to hoist the special Windows stuff up into
this subproject's "pom.xml", or to change that "pom.xml" to run
"cbuild.sh" only when on Windows, and to run "make" directly
otherwise.  I don't know "pom.xml" stuff very well, though.  We still
have a "Makefile.configuration" file in this project, but this file is
now independent of where WALA is being built and of where Java is
installed.

The changes I've made in both "Makefile.configuration" files use GNU
make extensions.  I assume that's safe because "Makefile.definitions"
already relies on GNU make.
2017-07-14 21:44:33 -07:00
Julian Dolby 0aadaa7aa0 small extensions to native code 2017-07-13 21:20:48 +00:00
Julian Dolby 004a81deba Merge branch 'master' of https://github.com/wala/WALA 2017-07-13 13:02:29 -04:00
Ben Liblit 0e6b00e29f Revert accidental, harmless, but unnecessary make config changes 2017-07-12 10:39:06 -07:00
Ben Liblit 9d6e362eaa Fix additional uses of raw types related to IVariable
These were not producing warnings in the Eclipse Oxygen GUI, and also
produced no warnings from Tycho when running Maven tests on my local
machine.  However, they did result in errors under Travis-CI.  I'm not
sure why this inconsistency exists, but hopefully we have now fixed
these raw-type uses in a way that makes everything happy.
2017-07-12 10:39:06 -07:00
Ben Liblit 1d27ca974b Upgrade raw-types-usage warnings to errors where possible
In general, these diagnostics are now errors in projects for which all
such warnings have been fixed.  There are three unfixed warnings in
two projects, so this diagnostic remains a warning (not an error) in
those projects.

There are also many places where rwa-types-usage warnings have been
locally suppressed using @SuppressWarnings annotations.  I haven't
systematically revisited those to see if any can be fixed properly.
So for those projects this diagnostic must also remain a warning (not
an error), since @SuppressWarnings does not work on things Eclipse is
configured to treat as errors.
2017-07-12 10:39:06 -07:00
Ben Liblit e316471d88 Fix nearly all Eclipse warnings about using raw types
Along the way, I also converted many "for (;;)" loops into modern
"for (:)" loops.  I didn't systematically look for all opportunities
to do this, though.  I merely made this change where I was already
converting raw Iterator uses into modern Iterator<...> uses.

Better use of generics also allowed many casts to become statically
redundant.  I have removed all such redundant casts.

Only three raw-types warnings remain after this batch of fixes.  All
three involve raw uses of CallGraphBuilder.  I've tried to fix these
too, but it quickly snowballs into a cascade of changes that may or
may not eventually reach a statically-type-save fixed point.  I may
give these last few problem areas another go in the future.  For now,
though, the hundreds of other fixes seem worth keeping even if there
are a few stragglers.

This commit may change some public APIs, but only by making weaker
type signatures stronger by replacing raw types with generic types.
For example, we may change something like "Set" into "Set<String>",
but we're not adding new arguments, changing any
underlying (post-generics-erasure) types, etc.
2017-07-12 10:39:06 -07:00
Ben Liblit cdce02573e Suppress warning about redundant type arguments in pre-1.7 code
Apparently this code is built using Java 1.6 under Tycho.  This leads
to complaints about the Java 1.7+ "<>" generic type inference feature,
if I try to use it.  Weirdly, the Eclipse GUI does not complain about
this, so apparently the Eclipse GUI is using Java 1.7 or later.  I do
not understand why Tycho and the Eclipse GUI are mismatched in this
way.
2017-07-12 10:39:06 -07:00
Ben Liblit f948b01e15 Suppress warnings about using raw types that we cannot fix
Some of the code in this project is machine-generated, so we cannot do
anything about raw-type warnings that arise.
2017-07-12 10:39:06 -07:00
Ben Liblit 65e6e5fbcf Suppress warnings about using raw types in test input
We shouldn't use raw types in real application code, but we often want
test inputs to do things that are simpler, or even not-quite-kosher.
2017-07-12 10:39:06 -07:00
Julian Dolby 289efc3bb8 Merge branch 'master' of https://github.com/wala/WALA 2017-07-12 08:08:34 -04:00
Julian Dolby a910795e05 merge 2017-07-09 05:58:20 -04:00
Ben Liblit 0bbe9970c6 Enable Eclipse Oxygen's new "unlikely argument types" diagnostics
There are two such diagnostics: one for collection methods and one for
equals().  See
<https://www.eclipse.org/eclipse/news/4.7/jdt.php#unlikely-argument-types>
for more information about these two new diagnostics.

For each of these diagnostics, I've set the severity level to
"warning" in projects that have some instances of the suspicious code,
or to "error" in projects that have no instances of the suspicious
code.
2017-07-08 13:22:00 -07:00
Ben Liblit 42c1c0a37e Ignore Eclipse warnings about missing hashCode() methods in tests
In regular application code, these warnings should be taken seriously
and fixed.  But for test code, it's better to keep things simple and
not add any methods that aren't strictly needed by the test.
2017-06-30 10:24:36 -07:00
Ben Liblit 29f53d11fe Add a hashCode() method to a class that already has equals()
Generally, overriding one means you should be overriding the other
too.

Also, configure Eclipse to treat any similar cases as errors, rather
than merely warnings.
2017-06-30 10:24:36 -07:00
Ben Liblit bb032c9869 Add @Override annotations wherever possible
In the `com.ibm.wala.util` project, configure Eclipse to treat any
future violations of this as errors, not merely warnings.

However, in `com.ibm.wala.cast.java.test.data`, configure Eclipse to
silently ignore missing @Override annotations.  The JLex code in this
project is machine-generated, and we don't have a way to get the
generator to produce @Override annotations.
2017-06-30 08:54:12 -07:00
Julian Dolby 773fa68a3f made native test run on a linux vm 2017-06-29 09:07:29 +00:00
Achim D. Brucker 0e89268f4d Merge remote-tracking branch 'upstream/master' 2017-06-29 08:41:57 +01:00
Julian Dolby 5f0a7180d0 merge 2017-06-28 18:37:03 -04:00
Julian Dolby facb4d7e35 merge 2017-06-28 18:28:19 -04:00
Julian Dolby f3a38f50d8 more linking 2017-06-28 17:56:04 -04:00
Julian Dolby 9789eb4216 remove import 2017-06-28 17:36:34 -04:00
Julian Dolby 6a6bf888e8 try some static linking 2017-06-28 17:30:55 -04:00
Julian Dolby c51321f4ba try to load libs on linux 2017-06-28 16:26:03 -04:00
Julian Dolby a8ba39fa99 kill native test for now 2017-06-28 15:59:22 -04:00
Julian Dolby 5374ce3169 more linking 2017-06-28 15:38:38 -04:00
Julian Dolby d8f6bf2a26 more linking hacks 2017-06-28 15:24:22 -04:00
Julian Dolby 8c8f352325 link object file 2017-06-28 15:06:47 -04:00
Julian Dolby 9b6e29dcfd try extern "C" 2017-06-28 14:50:01 -04:00
Julian Dolby 3722190ece try extern "C" 2017-06-28 14:48:05 -04:00
Julian Dolby c57a21d4ef linking 2017-06-28 13:53:59 -04:00
Julian Dolby cf4b27a065 linking 2017-06-28 13:44:17 -04:00
Julian Dolby c979c9700e header needed on linux 2017-06-28 13:37:26 -04:00
Julian Dolby e21257f3e3 more lib paths 2017-06-28 13:33:13 -04:00
Julian Dolby 8138497ee2 more lib paths 2017-06-28 13:30:46 -04:00
Julian Dolby 1cd8db5571 jvm lib in different place on linux 2017-06-28 13:20:58 -04:00
Julian Dolby 2c5fb1aa1b linux perhaps needs more headers 2017-06-28 13:12:26 -04:00
Julian Dolby 5c242e8e10 more .. fussiness on linux
someone does not like -std=c++11
2017-06-28 13:04:51 -04:00
Julian Dolby b1c1ba8a48 linux seems fussier than the mac about .. 2017-06-28 12:57:33 -04:00
Julian Dolby 589da154a1 get realpath 2017-06-28 12:52:30 -04:00
Julian Dolby 7c476eac3d native interface for WALA 2017-06-28 12:42:49 -04:00
Julian Dolby 7ea9bca169 Merge branch 'master' of https://github.com/wala/WALA 2017-06-26 15:05:29 -04:00
Ben Liblit d32b2a29ad Ignore Eclipse warnings about potentially-static test code
In general, test code may do all sorts of things that would be
considered poor style in production code.  I assume that these
potentially-static methods are declared non-static by design.
2017-06-26 11:16:09 -07:00
Ben Liblit b3df445a4a Ignore Eclipse warnings about non-externalized string literals
There seems to be no effort to internationalize WALA, so such warnings
are just noise that we have no plans to fix.
2017-06-26 11:16:09 -07:00
Ben Liblit 3187d09c1f Roll some diagnostics back to ignore instead of warning or error
These should mostly be things that we've already decided earlier that
we explicitly don't want to "fix" because they simply disagree with
the WALA project's coding style.
2017-06-26 11:16:09 -07:00
Ben Liblit fb9042d3a6 Activate more Eclipse diagnostics, and treat many warnings as errors
The additional diagnostics are ones that were previously being
ignored, but which we seem to have been ignoring by default rather
than as a conscious choice.

For diagnostics of which we currently have *zero* instances, treat
these as errors rather than merely warnings.  The intent is to
permanently lock out future regressions of things we've completely
fixed.  In the future, whenever we fix the last instance of a given
warning in a given Eclipse project, we should also promote that
diagnostic to an error to keep things clean into the future.
2017-06-26 11:16:09 -07:00
Ben Liblit 457a294889 Treat API restriction diagnostics as warnings, not errors
The Eclipse IDE shows no such diagnostics, so it would be nice to
treat them as errors if any appear in the future.  However, the batch
Tycho-based build ("mvn clean install -DskipTests") does find and
report numerous such violations.  This discrepancy is strange; Manu
and I currently don't know why it's happening.  We suspect some
Maven-related weirdness may be creating slightly different
environments in the Eclipse GUI versus the command-line-driven build.
2017-06-26 11:16:09 -07:00
Ben Liblit 0b712f46b3 Simpler strategy for telling Tycho to use existing project settings
See
<https://eclipse.org/tycho/sitedocs/tycho-compiler-plugin/compile-mojo.html#useProjectSettings>
for more documentation on this feature, which first arrived in Tycho
0.22.
2017-06-26 11:16:09 -07:00
Manu Sridharan fbf4ff731d speed up some CG tests by disabling reflection handling
We should add some proper unit tests if we really care about how
reflection is handled for these tests; they take way too long to run
2017-06-26 10:57:31 -07:00
Julian Dolby 6c217a7ee4 Merge branch 'master' of https://github.com/wala/WALA 2017-06-24 18:13:22 -04:00
Julian Dolby f900eab5e2 fix classpath bug 2017-06-24 18:11:43 -04:00
Julian Dolby d774fdeb36 allow access from Scala wrappers 2017-06-24 18:51:27 +02:00
Julian Dolby 5e0703a4de code for SOAP/IMDEA talk 2017-06-24 18:46:57 +02:00
Julian Dolby a31dd02ab2 native support 2017-06-24 18:45:54 +02:00
Achim D. Brucker e448cf5634 Merge remote-tracking branch 'upstream/master' 2017-06-23 22:22:36 +01:00
Manu Sridharan 469734f61e Various fixes to nodejs project config files
* Fix pom.xml to be like other projects
* Check for existence of nodejs download before re-downloading
* Fix Eclipse config files to be like other projects
2017-06-23 07:01:18 +02: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
Ben Liblit 16f673490d Fix all remaining Eclipse "Unnecessary Code" warnings
There were only three left, all fairly straightforward to fix.
2017-06-22 14:08:44 +02:00
Julian Dolby 2bca30af01 Merge branch 'master' of https://github.com/wala/WALA 2017-06-22 11:01:59 +02:00
Julian Dolby ea844f0f4c Merge pull request #187 from liblit/warning-fixes-plug-in-development-misc
Fix nearly all Eclipse “Plug-in Development” warnings
2017-06-22 11:01:49 +02: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
Julian Dolby 8114f833ec clean up SDG 2017-06-22 09:27:34 +02:00
Ben Liblit 83e82111fb Merge branch 'warning-fixes-plug-in-development-misc' of github.com:liblit/WALA into warning-fixes-plug-in-development-misc 2017-06-07 17:47:20 +02:00
Ben Liblit 69149ed472 Match classpath to JavaSE-1.7 execution environment
This fixes one Eclipse "The JRE container on the classpath is not a
perfect match to the 'JavaSE-1.7' execution environment" warning in
the "Plug-in Development" category.
2017-06-07 17:42:11 +02:00
Ben Liblit a940935056 Export all packages
This fixes eleven Eclipse "This plug-in does not export all of its
packages" warnings in the "Plug-in Development" category.
2017-06-07 17:42:11 +02:00
Ben Liblit 4effd108f0 Remove "Bundle-Activator" header that names a missing class
This fixes one Eclipse "The type '...' is not on the plug-in
classpath" warning in the "Plug-in Development" category.
2017-06-07 17:42:11 +02:00
Ben Liblit 140d75eacf Add missing output directories
This fixes five Eclipse "Source folder '...' does not have the output
folder in corresponding output entry 'output..'" warnings in the
"Plug-in Development" category.
2017-06-07 17:42:11 +02:00
Ben Liblit 76fcaa5322 Add dependency on subproject containing plugin's Main class
This fixes two Eclipse "Referenced class '...' in attribute 'class' is
not on the plug-in classpath" warnings in the "Plug-in Development"
category.
2017-06-07 17:42:11 +02:00
Ben Liblit 4aef1be29f Set minimum required execution environments
This fixes two Eclipse "No required execution environment has been
set" warnings in the "Plug-in Development" category.
2017-06-07 17:42:11 +02:00
Ben Liblit 9086f4c66c Remove unnecessary UTF-8 encoding overrides
Everything here seems to be ASCII.
2017-06-07 17:42:11 +02:00
Ben Liblit bfe5cabf42 Match case of property names to that expected in manifest
This fixes two Eclipse "Key '...' is not found in localization
properties file: plugin.properties" warnings in the "Plug-in
Development" category.
2017-06-07 17:42:11 +02:00
Ben Liblit 9c81cae9be Externalize bundle names and vendors
This fixes 33 Eclipse "The value for attribute '...' is not
externalized.  The value must begin with %" warnings in the "Plug-in
Development" category.
2017-06-07 17:42:11 +02:00
Ben Liblit 3b9cd9838a JUnit @Test methods must not be static 2017-06-07 08:29:23 -07:00
Ben Liblit 8cc4daf6a0 Access static fields directly via the classes that declare them
Previously some of these were accessing such fields through a subclass
of the declaring class.  That creates an unnecessary extra inter-class
dependency lower in the type hierarchy than necessary.

Also, suppress this warning in an automated test input where the
indirect static accesses are explicitly intentional.
2017-06-07 08:29:23 -07:00
Ben Liblit 38c11f0fa6 Don't warn about intentional indirect access to static methods
This test code is intentionally crafted to use instances to access
static methods.  Eclipse's recommendation to access those methods
directly is, therefore, counterproductive.
2017-06-07 08:29:23 -07:00
Ben Liblit 237b49a425 Declare two public methods of a final class static
These methods access only static members.  They are methods of a final
class, which means no subclass can ever override these methods and use
dynamic dispatch to choose the implementation at run time.  So
declaring these methods static is (statically) safe.
2017-06-07 08:29:23 -07:00
Ben Liblit aa39fc63d5 Declare a protected final method static
The method itself accesses only static members.  The fact that it is
final means no subclass can ever override this method and use dynamic
dispatch to choose the implementation at run time.  So declaring this
method static is (statically) safe.
2017-06-07 08:29:23 -07: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
Ben Liblit e1d2fa9850 Suppress Eclipse warnings about potentially-static methods
The "potentially" qualifier is here because these methods are visible
outside the WALA source tree.  These methods may seem OK to be static
based on the code we have here, but we have no way of knowing whether
third-party code expected to be able to subclass and override.  I'm
going to play it safe and assume that we want to allow that.

Note that we are still allowing Eclipse warnings about methods that
can *definitely* be declared static; a different configuration option
controls these.  For private methods, final methods, and methods in
final classes, if the code seems static-safe based on what we have
here, then that's good enough: we don't need to worry about
third-party overrides.
2017-06-07 08:29:23 -07:00
Caius Brindescu 404a17c9cc When converting JDT AST to IR, a do-while loop in a case statement will throw NPE (#186)
* Fixed bug for source analysis

Do while in case statement would throw an NPE. Now it doesn't

* Added test case

The test will fail with an NPE if the fix is not applied.
2017-06-07 08:27:23 -07:00
Achim D. Brucker 52e8c0ecea Merge remote-tracking branch 'upstream/master' 2017-05-27 10:11:10 +01:00
Ben Liblit d45b598fb8 Match classpath to JavaSE-1.7 execution environment
This fixes one Eclipse "The JRE container on the classpath is not a
perfect match to the 'JavaSE-1.7' execution environment" warning in
the "Plug-in Development" category.
2017-05-27 00:57:33 -05:00
Ben Liblit 87f1535de7 Export all packages
This fixes eleven Eclipse "This plug-in does not export all of its
packages" warnings in the "Plug-in Development" category.
2017-05-27 00:57:33 -05:00
Ben Liblit 439d5245d3 Remove "Bundle-Activator" header that names a missing class
This fixes one Eclipse "The type '...' is not on the plug-in
classpath" warning in the "Plug-in Development" category.
2017-05-27 00:57:33 -05:00
Ben Liblit c9990d3808 Add missing output directories
This fixes five Eclipse "Source folder '...' does not have the output
folder in corresponding output entry 'output..'" warnings in the
"Plug-in Development" category.
2017-05-27 00:57:33 -05:00
Ben Liblit e59da85c08 Add dependency on subproject containing plugin's Main class
This fixes two Eclipse "Referenced class '...' in attribute 'class' is
not on the plug-in classpath" warnings in the "Plug-in Development"
category.
2017-05-27 00:57:33 -05:00
Ben Liblit eb15ab6e21 Set minimum required execution environments
This fixes two Eclipse "No required execution environment has been
set" warnings in the "Plug-in Development" category.
2017-05-27 00:57:33 -05:00
Ben Liblit 874a7dcde9 Remove unnecessary UTF-8 encoding overrides
Everything here seems to be ASCII.
2017-05-27 00:57:33 -05:00
Ben Liblit 2be5b289be Match case of property names to that expected in manifest
This fixes two Eclipse "Key '...' is not found in localization
properties file: plugin.properties" warnings in the "Plug-in
Development" category.
2017-05-27 00:57:33 -05:00
Ben Liblit fc0204ae48 Externalize bundle names and vendors
This fixes 33 Eclipse "The value for attribute '...' is not
externalized.  The value must begin with %" warnings in the "Plug-in
Development" category.
2017-05-27 00:57:33 -05:00
Julian Dolby fc7c7ec5d1 merge 2017-05-26 19:01:59 -04: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 24fb1f6d10 Suppress unused-local-variable warnings in test inputs
Test code can do many things we'd consider bad style in real
application code, including defining local variables that are never
subsequently used.
2017-05-26 14:25:03 -07:00
Ben Liblit dee2412ab5 Remove several unused locals and clean up surrounding code
In all of these cases, the code used to initialize the unused local
seems nontrivial to me.  I think this can all be removed without
erasing any needed side effects, but the code might still become
useful to someone in the future.  So I'm not really removing the code
entirely, but merely commenting it out.
2017-05-26 14:25:03 -07:00
Ben Liblit 08b6d8dd68 Discard results of BufferedInputStream.read() calls
Previously we were saving these return values into local variables
that were never checked or used in any way.  So effectively we were
already discarding these results anyway, but in a manner that produced
Eclipse warnings about unused local variables.
2017-05-26 14:25:03 -07:00
Ben Liblit 966bc5b3e3 Remove AnalysisCache.getIR() calls whose results are unused
I'm grouping these together in a single commit in case these calls are
actually wanted for side effects.
2017-05-26 14:25:03 -07:00
Ben Liblit 2e503a17a2 Remove ClassHierarchy.resolveMethod() calls whose results are unused
I'm grouping these together in a single commit in case these calls are
actually wanted for side effects.
2017-05-26 14:25:03 -07:00
Ben Liblit 214e0caa86 Suppress Eclipse warnings about unused allocations
In each of these cases, the constructor directly or indirectly has
side effects that we want to keep, even if the object itself is not
retained and used by eht code that invokes `new`.
2017-05-26 14:25:03 -07:00
Ben Liblit 97bf43c0b9 Fix Eclipse warnings about unused method parameters 2017-05-26 14:25:03 -07:00
Achim D. Brucker e93be68788 Merge remote-tracking branch 'upstream/master' 2017-05-26 20:39:36 +01:00
Achim D. Brucker f31df03cd3 Fixed markdown. 2017-05-26 20:39:08 +01:00
Julian Dolby d4607979ed Merge branch 'master' of https://github.com/wala/WALA 2017-05-26 15:13:28 -04:00
Manu Sridharan 9585aaf0a2 make overriding method public 2017-05-24 14:43:00 -07:00
Manu Sridharan 11ff511d61 Add API for passing an IProgressMonitor into the slicer 2017-05-24 14:38:30 -07:00
Manu Sridharan 05eb665526 make DotUtil.dotOutput method public 2017-05-24 14:30:32 -07:00
Achim D. Brucker ff298d67bf Added instructions for merging upstream changes. 2017-05-17 21:44:01 +01:00
Achim D. Brucker bc4bc846ac Merge remote-tracking branch 'upstream/master' 2017-05-16 10:56:33 +01:00
Ben Liblit 1bebbeb8e9 Simplify management of virtual frame buffer X server (#181)
Using the `xvfb-run` script gives us automatic lifetime management for
the virtual X server: it will start before the `mvn` test script and
will terminate when that test script exits.  The `xvfb-run` script
also sets `$DISPLAY` properly in the `mvn` test script, so we no
longer need to manage that setting ourselves.
2017-05-15 09:02:52 -07:00
Ben Liblit 0ffd2bcee4 Add @Override annotations to all methods that do override (#180)
This fixes 49 Eclipse code style warnings.  I'm not sure why these
were overlooked in my previous sweep of missing-@Override warnings.
Ah well; got 'em this time around.
2017-05-15 07:15:00 -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 8747917c7b Merge branch 'master' of https://github.com/wala/WALA 2017-05-08 08:45:11 -04:00
Julian Dolby ba743ef19c Merge branch 'master' of https://github.com/wala/WALA 2017-05-08 08:45:02 -04:00
Ben Liblit ae7b365493 Suppress a few Eclipse code style warnings that are not WALA style (#177)
* 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".

* Turn off Eclipse warnings about undocumented empty blocks

The presence of 65 such warnings in two packages suggests that the de
facto WALA coding style does not mandate documenting empty blocks.
Better to avoid printing warnings that will be routinely ignored, so
that other important warnings are more likely to be noticed.

* Turn off Eclipse warnings about synthetic accessor methods

Synthetic accessor methods allow access to otherwise inaccessible
members of enclosing types.  The presence of 246 such warnings in
three packages suggests that the de facto WALA coding style does not
consider synthetic accessor methods to be problematic.  Better to
avoid printing warnings that will be routinely ignored, so that other
important warnings are more likely to be noticed.
2017-05-07 22:57:24 -07:00
Julian Dolby 0bd59c95b6 merge 2017-05-07 19:51:30 -04:00
Ben Liblit e753aba3cc Fix warnings about unset javacProjectSettings build entries (#176)
Specifically, these are all warnings of the form "The
'javacProjectSettings' build entry should be set when there are project
specific compiler settings".
2017-05-04 11:44:32 -07:00
Ben Liblit fbf9abfa3a Fix Eclipse type-safety warnings in overrides of `ModRef` visitor-making methods (#175)
* Add missing type parameters to overrides of ModRef.makeModVisitor

* Add missing type parameters to overrides of ModRef.makeRefVisitor

This also required slightly generalizing the generic type signature of
the ModRef.makeRefVisitor return type.  Instead of returning
"RefVisitor<T, ExtendedHeapModel>", we now return "RefVisitor<T, ?
extends ExtendedHeapModel>".  We need that extra flexibility because
at least one override of this method returns a RefVisitor whose second
generic type parameter is a subclass of ExtendedHeapModel.
2017-05-03 19:37:58 -07:00
Ben Liblit 9159ea7636 Remove unnecessary `klass` argument and propagate back to callers (#174) 2017-05-03 16:25:00 -07:00
Raffi Khatchadourian 97a6496c1f AnalysisCache -> IAnalysisCache, additional ignore, increased visibility, generic fixes (#172)
* Use IAnalysisCacheView instead of AnalysisCache. (#1)

It seems that some additional types need to be changed due to
d24519e974. This may not be inclusive,
however.

* Increase visibility of several methods and constructors.

Used for creating custom contexts and context selectors.

* Ignore the results directory.

* Some generic type fixes in ModRef.java.
2017-05-03 09:20:03 -07:00
Julian Dolby fe636f4b97 Merge branch 'master' of https://github.com/wala/WALA 2017-04-24 16:28:34 -04:00
Julian Dolby 0575f40168 merge 2017-04-24 16:28:31 -04:00
Manu Sridharan 589db13fa7 add application-only call graph 2017-04-20 11:26:23 -07:00
Manu Sridharan 8c65754b0e implement some methods in CHACallGraph 2017-04-20 11:26:23 -07:00
Manu Sridharan c9022b0743 update version to 1.4.3-SNAPSHOT 2017-04-19 09:19:09 -07:00
Manu Sridharan 44e433085e tag 1.4.2 release 2017-04-19 09:17:13 -07:00
Manu Sridharan 32bb5e617b Revert "remove almost-obsolete 1.4 source and target levels for building JLex"
This reverts commit 34601814e1.
2017-04-18 21:42:50 -07:00
Manu Sridharan c303d4547a Add <resource> tag so dat/ directory is included in jar 2017-04-18 21:22:28 -07:00
Manu Sridharan 34601814e1 remove almost-obsolete 1.4 source and target levels for building JLex 2017-04-18 20:42:38 -07:00
Manu Sridharan 88bd0c01cd more aggressive exclusions 2017-04-16 21:30:44 -07:00
Manu Sridharan 6bf0108964 actually add an assertion 2017-04-16 20:45:14 -07:00
Manu Sridharan ed4b0e45ee add test case for mailing list issue 2017-04-16 20:40:41 -07:00
Manu Sridharan 0c424e12b3 Fix #164 2017-04-16 18:23:56 -07:00
Julian Dolby b33e7bce43 Merge branch 'master' of https://github.com/wala/WALA 2017-04-14 10:13:16 -04:00
Julian Dolby af83d11a4e Merge branch 'master' of https://github.com/wala/WALA 2017-04-14 10:13:04 -04:00
Manu Sridharan 5ecbba95ff disable appveyor for now 2017-04-13 22:06:35 -07:00
Manu Sridharan 0c333ab1ce try disabling test on Appveyor 2017-04-13 21:16:22 -07:00
Manu Sridharan 8ed483bee3 add null guard 2017-04-13 20:57:35 -07:00
Manu Sridharan bcb7dc2595 fix up manifest 2017-04-13 20:32:23 -07:00
Manu Sridharan bec0387850 Attempt to fix weird Windows bug with TemporaryFile
Also remove the walaUtil.jar output, which no one uses
2017-04-13 20:19:31 -07:00
Manu Sridharan 52c7a4b649 remove explicit MacOS dependency 2017-04-13 18:51:33 -07:00
Manu Sridharan 4691e3a0bf try out appveyor 2017-04-13 18:44:06 -07:00
Manu Sridharan d7878b2bbd Merge pull request #163 from liblit/warning-fixes-plug-in-development
Disable Eclipse warnings about missing version constraints
2017-04-06 16:19:59 -07:00
Manu Sridharan c1b33fcab0 Merge pull request #162 from liblit/warning-fixes-type-safety-and-raw-types
Fix or disable Eclipse warnings about type safety and raw types
2017-04-06 16:19:11 -07:00
Manu Sridharan 7c5241c50b Merge pull request #161 from liblit/warning-fixes-unnecessary-code
Fix, suppress, or disable assorted Eclipse warnings about unnecessary code
2017-04-06 16:18:22 -07:00
Manu Sridharan dc0709084f Merge pull request #160 from liblit/warning-fixes-restricted-api
Suppress 14 Eclipse warnings about discouraged access to restricted APIs
2017-04-06 16:17:19 -07:00
Julian Dolby 11585f3d34 Merge branch 'master' of https://github.com/wala/WALA 2017-03-30 21:58:56 -04:00
Julian Dolby 6cb422f707 merge 2017-03-30 21:58:46 -04:00
Ben Liblit d35e8d0fa2 Disable Eclipse warnings about missing version constraints
Specifically, we're turning off Eclipse warnings about missing version
constraints on required bundles ("Require-Bundle"), exported
packages ("Export-Package"), and imported packages ("Import-Package").
We're not turning these off absolutely everywhere, though: only in
packages where one or more such warnings were actually being reported.
So if a given package was already providing all version constraints
for, say, package imports, then we've kept that warning on in that
package.

Honestly I don't entirely understand the practical implications of
these warnings.  However, there were 355 of them across many WALA
subprojects.  I take this as evidence that the WALA developers do not
consider these version constraints to be important.  Therefore, we may
as well stop warning about something we have no intention of fixing.

That being said, if we *do* want to fix some or all of these, I
welcome any advice on what those fixes should look like.  I am rather
ignorant about all things OSGi.
2017-03-28 20:37:41 -05:00
Ben Liblit 35aef3b383 Disable Eclipse unchecked-type-operation warnings in some test code
Often the easiest way to create a desired test scenario is to write
code that would make no sense in a complete, realistic application.
So we generally want to let test code do oddball things.
2017-03-28 20:01:31 -05:00
Ben Liblit bba887a810 Fix eclipse warnings about using raw versions of generic types
Along with these fixes, convert several for loops that used explicit
iterators into newer-style for-each loops that hide the iterators and
casts inside the syntactic sugar.  Nice!

However, I have not systematically tried to modernize *all* for loops
that could instead be for-each loops.  Someone could certainly do that
at some point.  In this commit, I only converted loops that I had to
touch anyway because they were using raw "Iterator" types.
2017-03-28 19:59:32 -05:00
Ben Liblit 91b9c9e28b Suppress/disable some Eclipse unnecessary-code warnings in test code
Often the easiest way to create a desired test scenario is to write
code that would make no sense in a complete, realistic application.
So we generally want to let test code do oddball things.
2017-03-28 19:25:08 -05:00
Ben Liblit 5f23949d9f Fix Eclipse warnings about unused type parameters 2017-03-28 18:22:30 -05:00
Ben Liblit 8dd3a78508 Fix Eclipse warnings about unnecessary casts 2017-03-28 18:20:39 -05:00
Ben Liblit b9c2890db6 Fix Eclipse warnings about unnecessary warning suppressions 2017-03-28 18:20:38 -05:00
Ben Liblit b197c231e0 Fix Eclipse warnings about declared but not-thrown exceptions 2017-03-28 18:20:36 -05:00
Ben Liblit 2bf662c342 Fix Eclipse warnings about redundant type arguments
These are all places where the compiler itself will infer the
arguments for us; we just need "<>" and inference will fill in the
rest.
2017-03-28 18:20:35 -05:00
Ben Liblit 2f7b52b01c Fix Eclipse warnings about unused imports 2017-03-28 18:20:33 -05:00
Ben Liblit c522344f67 Suppress 14 Eclipse warnings about discouraged access to restricted APIs
Based on what this code seems to be doing, there's really no
officially-sanctioned alternative to the APIs we're using here.
2017-03-28 17:25:53 -05:00
Manu Sridharan 7a160d4b06 Merge pull request #157 from liblit/warning-fixes-unnecessary-code-controversial
Fix 195 Eclipse warnings about unnecessary code ... controversially!
2017-03-28 14:09:04 -07:00
Julian Dolby 91ed8f6752 Merge branch 'master' of https://github.com/wala/WALA 2017-03-28 16:34:38 -04:00
Julian Dolby 59337d0d05 Merge branch 'master' of https://github.com/wala/WALA 2017-03-28 16:34:29 -04:00
Ben Liblit 65be11f222 Merge branch 'master' into warning-fixes-unnecessary-code-controversial 2017-03-25 22:12:03 -05:00
Ben Liblit 7bab9e7c08 Merge branch 'master' of github.com:wala/WALA 2017-03-25 22:09:33 -05:00
Ben Liblit 42c7866dfd Prune constructor and method signatures after removing unused fields
Removing an unused field sometimes means removing constructor code
that used to initialize that field.  Removing that initialization code
sometimes leaves whole constructor arguments unused.  Removing those
unused arguments can leave us with unused code to compute those
arguments in constructors' callers, and so on.  This commit tries to
clean all of this up, working backward from the unused fields that an
earlier commit already removed.  Hopefully I have avoided removing
upstream code that had other important side effects, but it wouldn't
hurt for a WALA expert to review this change carefully.
2017-03-25 17:40:22 -05:00
Ben Liblit b4e5d078dd Retain some unused methods
Manu requests that we keep these around even though they are currently
unused.  So we'll retain them, but also annotate them to suppress the
warning.
2017-03-25 17:11:34 -05:00
Ben Liblit 64dfd2d908 Turn off Eclipse warnings about unnecessary `else` clauses
If the true block of an `if` statement is guaranteed to exit early,
such as by a `return` or `throw`, then any code appearing in a
corresponding `else` clause could just as well have appeared after the
`if` statement entirely.  Eclipse can warn about this.

However, Manu prefers to let such code stay in the `else` clauses.
OK, sure: this is more a matter of personal taste than something truly
problematic.  Per Manu's request, then, we're turning off that Eclipse
warning in the subprojects in which it currently arises.
2017-03-25 16:37:09 -05:00
Ben Liblit 83a9201613 Revert "Fix 106 Eclipse warnings about unnecessary else clauses"
This reverts commit 04dafcf7f7.
2017-03-25 16:29:26 -05:00
Manu Sridharan ab7e638c29 version 1.4.2-SNAPSHOT 2017-03-25 13:54:21 -07:00
Manu Sridharan 2d0518963d Tag release 1.4.1 2017-03-25 13:24:39 -07:00
Manu Sridharan c1b2151e08 make Maven Central files for wala.dalvik and wala.scandroid (#158) 2017-03-25 13:20:34 -07:00
Ben Liblit c94d4210ab Merge branch 'warning-fixes-unnecessary-code-uncontroversial' 2017-03-24 10:33:01 -05:00
Manu Sridharan b82e808b32 Merge pull request #156 from liblit/warning-fixes-unnecessary-code-uncontroversial
Fix 265 Eclipse warnings about unnecessary code
2017-03-23 17:48:10 -07:00
Ben Liblit 1bb3d827c4 Turn off Eclipse warnings about unused caught-exception parameters
Manu requested that we use this approach instead of adding
`@SuppressWarnings("unused")` at each affected catch block.  That
seems reasonable to me, given the large number of such warnings and
the lack of likely harm from ignoring such caught exceptions.
2017-03-23 16:39:58 -05:00
Ben Liblit 16492c7b78 Revert "Suppress 157 Eclipse warnings about unused exception parameters"
This reverts commit fe9f7a793a.
2017-03-23 16:32:00 -05:00
Manu Sridharan 9dafd5050f Merge pull request #155 from liblit/warning-fixes-javadoc-true-fixes
Fix 161 Eclipse Javadoc warnings
2017-03-23 13:30:51 -07:00
Manu Sridharan 167244ed5e Merge pull request #154 from liblit/warning-fixes-javadoc-bankruptcy
Disable Eclipse checks for routinely-violated Javadoc rules
2017-03-23 11:04:59 -07:00
Ben Liblit 67013a0d77 Fix 21 Eclipse warnings about unnecessary warning suppressions 2017-03-23 12:28:14 -05:00
Ben Liblit e52d872e3e Fix 19 Eclipse warnings about unnecessary casts 2017-03-23 12:28:14 -05:00
Ben Liblit 0f36e92f7e Remove "@inheritDoc" for classes; it's not allowed there 2017-03-22 20:40:53 -05:00
Ben Liblit 266b58970b Remove "@inheritDoc" for non-overriding methods 2017-03-22 20:40:53 -05:00
Ben Liblit b012b21147 Remove "@return" for void-returning functions 2017-03-22 20:40:53 -05:00
Ben Liblit 3b88d7be39 Remove advice to look at a deprecated class 2017-03-22 20:40:52 -05:00
Ben Liblit 5ec33b4636 Remove advice to use an alternate method that doesn't actually exist 2017-03-22 20:40:52 -05:00
Ben Liblit b8264b884d Remove "@param" tags for which there is no corresponding parameter 2017-03-22 20:40:52 -05:00
Ben Liblit 780804e159 Fix "@param" tags whose name doesn't match the parameter name 2017-03-22 20:40:52 -05:00
Ben Liblit 7a198b0968 "@throws" with no other information is neither valid nor useful 2017-03-22 20:40:52 -05:00
Ben Liblit 17ee9c3f98 Fix assorted Javadoc typos, such as omitted "}" 2017-03-22 20:40:52 -05:00
Ben Liblit 323224504a Suppress several unfixable warnings about unresolved type references
Fixing these Javadoc comments would require adding packages to various
other packages' build paths.  In some of the cases suppressed,
changing build paths in that manner would create circular build
dependencies.  In other cases, it would simply add a Javadoc-motivated
dependency that does not exist for the real code, which seems
undesirable.  For a few cases, the reference seems to be to types in
code we don't even have here, such as code from "android" or
"org.mozilla" packages.
2017-03-22 20:40:52 -05:00
Ben Liblit 3b88836488 Fix broken type, field, and method references in Javadoc comments 2017-03-22 20:40:51 -05:00
Ben Liblit 98d5c02280 Don't warn about missing Javadoc tags
These changes turn off Eclipse warnings for Javadoc comments with
missing tags, such as "@throw" or "@param".

We don't turn this warning off in all projects.  Rather, we turn it
off only in projects that were producing at least one such warning.
In other words, if a project was already completely "clean" with
respect to this warning, then we leave this warning enabled for that
project.

Turning off these warnings is a partial declaration of Javadoc
bankruptcy.  In an ideal world, we would enable and fix all of these
warnings.  However, there are 327 of them.  Apparently the WALA team's
implicit coding style says that omitting Javadoc tags is OK.  If
there's no intent to systematically add these tags, then we may as
well turn off these warnings so that we can see other warnings that we
may want to fix.
2017-03-22 20:39:36 -05:00
Ben Liblit 49f08acb13 Don't warn about missing Javadoc comments
These changes turn off Eclipse warnings for documentable items without
Javadoc comments.  In some subprojects, we turn these off entirely.
In others, we leave these warnings on for public items but not for
items whose visibility is protected or below.

We don't turn this warning off in all projects.  Rather, we turn it
off only in projects that were producing at least one such warning.
In other words, if a project was already completely "clean" with
respect to this warning, then we leave this warning enabled for that
project.

Turning off these warnings is a partial declaration of Javadoc
bankruptcy.  In an ideal world, we would enable and fix all of these
warnings.  However, there are 1,366 of them.  Apparently the WALA
team's implicit coding style says that omitting Javadoc comments is
OK.  If there's no intent to systematically add documentation, then we
may as well turn off these warnings so that we can see other warnings
that we may want to fix.
2017-03-22 20:39:36 -05:00
Ben Liblit 0aad8739d9 Don't warn about Javadoc comments with non-visible references
These arise, for example, when Javadoc documentation on a public class
includes a @link to a private field.  I can see how this would be
problematic for closed-source Java code where private items are
invisible to outsiders.  However, given that WALA is open source,
nothing is truly non-visible.  If the WALA documentation authors
considered non-visible references useful when explaining things,
that's fine with me.

We don't turn this warning off in all projects.  Rather, we turn it
off only in projects that were producing at least one such warning.
In other words, if a project was already completely "clean" with
respect to this warning, then we leave this warning enabled for that
project.
2017-03-22 20:39:36 -05:00
Ben Liblit ea39ad647e Don't warn about Javadoc tags with missing descriptions
These changes turn off Eclipse warnings for Javadoc tags without
descriptions.  In some subprojects, we turn these off entirely.  In
others, leave on missing-descrption checks for "@return" tags only.

We don't turn this warning off in all projects.  Rather, we turn it
off only in projects that were producing at least one such warning.
In other words, if a project was already completely "clean" with
respect to this warning, then we leave this warning enabled for that
project.

Turning off these warnings is a partial declaration of Javadoc
bankruptcy.  In an ideal world, we would enable and fix all of these
warnings.  However, there are 576 of them.  Apparently the WALA team's
implicit coding style says that omitting descriptions is OK.  If
there's no intent to systematically add descriptions, then we may as
well turn off these warnings so that we can see other warnings that we
may want to fix.
2017-03-22 20:39:36 -05:00
Manu Sridharan f56ee9cd72 Merge pull request #153 from liblit/generalize-generic-types
Generalize a generic type parameter even more
2017-03-22 18:17:47 -07:00
Ben Liblit 9921fe37e6 Generalize a generic type parameter even more
As it turns out, I should have been using "? extends InstanceKey" rather
than "? super InstanceKey".  But really, we can just use "?" here since
HeapGraph itself constrains its own type parameter appropriately.
2017-03-22 16:15:41 -05:00
Manu Sridharan f7a3b98764 Merge pull request #152 from liblit/generalize-generic-types
Generalize a generic type
2017-03-22 13:32:23 -07:00
Ben Liblit ff5e79c2d3 Merge remote-tracking branch 'official/master' 2017-03-22 15:29:24 -05:00
Julian Dolby dff76e1a82 Merge branch 'master' of https://github.com/wala/WALA 2017-03-22 15:43:03 -04:00
Manu Sridharan dce9ede601 Merge pull request #148 from liblit/automatic-dx-jar-download
Automatically download “dx.jar” when building
2017-03-22 12:31:25 -07:00
Ben Liblit 2a33cb3649 Generalize an over-constrained generic parameter
This fixes WALA bug #151, which was first introduced in commit fde6534.
2017-03-22 14:16:54 -05:00
Ben Liblit ce2335c61f Merge branch 'master' of github.com:liblit/WALA 2017-03-22 12:00:46 -05:00
Manu Sridharan 9b692e714f switch version to 1.4.1-SNAPSHOT 2017-03-21 09:38:36 -07:00
Manu Sridharan bfe378e7f2 1.4.0 release 2017-03-21 08:59:08 -07:00
Ben Liblit e04816ec7a Fix 2 Eclipse warnings about unused generic type parameters
Note: this changes some public APIs.
2017-03-20 00:44:42 -05:00
Ben Liblit 94fcc3966f Fix 2 Eclipse warnings about useless instanceof checks
Effectively these two checks could only be false if the instance being
tested were null.  So we replace the instanceof checks with null
checks.  Sometimes that, in turn, makes other surrounding code
simpler.  In the case of ApplicationLoaderFilter.test, for example,
a whole conditional case ("o instanceof LocalPointerKey") becomes
statically impossible.  That seems a bit strange to me, but that's
what the code was effectively doing.
2017-03-20 00:44:41 -05:00
Ben Liblit 934f8f524f Fix 11 Eclipse warnings about fields whose values are never used 2017-03-20 00:44:40 -05:00
Ben Liblit aaf66705e1 Fix 65 Eclipse warnings about unused exception parameters
In the cases addressed here, the caught exception was being "handled"
by throwing some new exception.  Instead of discarding the old
exception, pass it to the new exception's constructor to indicate the
original cause of the newly-created exception.  This practice, called
"exception chaining", can often be useful in debugging.
2017-03-20 00:44:39 -05:00
Ben Liblit 059810c1ca Fix 9 Eclipse warnings about unused methods
Note: some of these methods are decidedly nontrivial.  Perhaps they
should not actually be removed?  If any should be kept around, please
identify them to me.  I'll revise this change to retain those methods
and simply annotate them as needed to suppress Eclipse's warning.
2017-03-20 00:44:36 -05:00
Ben Liblit 04dafcf7f7 Fix 106 Eclipse warnings about unnecessary else clauses
Specifically, these warnings are always of the form "Statement
unnecessarily nested within else clause. The corresponding then clause
does not complete normally".  I can see this being a matter of
personal taste, actually.  If the WALA maintainers decide that they
prefer to keep this code as it was before, that's OK with me: I'll
replace this group of code changes with a group of settings changes
that tell Eclipse to quietly ignore this "problem".
2017-03-20 00:44:33 -05:00
Ben Liblit fe9f7a793a Suppress 157 Eclipse warnings about unused exception parameters
In the cases addressed here, the caught exception is truly not needed
by the handling code.
2017-03-20 00:44:06 -05:00
Ben Liblit 16cb596947 Fix 10 Eclipse warnings about declared-but-never-thrown exceptions 2017-03-20 00:44:04 -05:00
Ben Liblit 4cd6e590a9 Fix 5 Eclipse warnings about local-but-unused constructors 2017-03-20 00:44:01 -05:00
Ben Liblit aa878f0b68 Fix 11 Eclipse warnings about redundant interfaces 2017-03-20 00:43:57 -05:00
Ben Liblit 6766f1e261 Fix 42 Eclipse warnings about unused imports 2017-03-20 00:43:48 -05:00
Ben Liblit 64f7751a00 Merge branch 'warning-fixes-potential-programming-problems' 2017-03-19 23:35:12 -05:00
Julian Dolby eca53cd0c2 Merge branch 'master' of https://github.com/wala/WALA 2017-03-19 08:18:25 -04:00
Manu Sridharan a3f4c10c20 Merge pull request #150 from liblit/warning-fixes-potential-programming-problems
Resolve all Eclipse “Potential Programming Problem” warnings
2017-03-18 15:00:53 -07:00
Manu Sridharan fcd003f328 Merge pull request #149 from liblit/warning-fixes-deprecation
Resolve all Eclipse warnings about deprecated APIs
2017-03-18 13:59:51 -07:00
Ben Liblit 421dcd4991 Change two "if" checks that can never be true into asserts
Eclipse warns that the "if" statements' true blocks are dead, and
indeed the conditions being tested here can never be true.  It's a
little subtle why that's so, though.  Changing them to "assert"
statements removes two warnings about deprecated code, while still
helping human readers understand what invariants must hold here.
2017-03-17 22:03:22 -05:00
Ben Liblit 1ddbad17a3 Remove an assert before an "if" that checks the same thing
The assert will throw AssertionError if it finds a bad argument,
unless the code is running without assertion checking enabled.  The
"if" will throw an IllegalArgumentException if it finds the same bad
argument, and that check is always enabled.  Better to be consistent
in what exception is used to report a bad argument.  Since the "if" is
always active, let's go with that and remove the redundant,
not-always-active assert.
2017-03-17 21:59:11 -05:00
Ben Liblit 53f99a359b Update expected exception when test assertions fail
We used to use junit.framework.Assert for test assertions, and that
class reports failures by throwing
junit.framework.AssertionFailedError.  However, junit.framework.Assert
is obsoleted by org.junit.Assert, and we've already replaced the
former with the latter.  org.junit.Assert reports failures by throwing
java.lang.AssertionError, so that's what we need to expect in our
testing infrastructure.
2017-03-17 21:52:47 -05:00
Ben Liblit 296657a394 Suppress 88 Eclipse warnings about dead code
All of these involve conditionals that check some static, final debug
flag or debug level.  The code will indeed be dead if WALA is built
with those debug facilities turned off.  But we still want the code
present in case someone needs to turn some aspect of debugging on for
a while.
2017-03-17 21:49:34 -05:00
Ben Liblit 6a81cf8df2 Fix 19 Eclipse warnings about unnecessary semicolons 2017-03-17 21:49:22 -05:00
Ben Liblit dfa8f15dac Suppress two deprecation warnings about an internal CGNode API
The supposedly deprecated function (CGNode.addTarget) really seems to
be intended for internal use, not deprecated per se.  We are an
internal user here, so presumably it's OK for us to be using this API
entry point.
2017-03-17 21:18:36 -05:00
Ben Liblit 6caecce3e7 Suppress a deprecation warning about requesting an old AST version
Near as I can tell, the request for a deprecated version here is
intentional.  The non-deprecated version (AST.JLS8) is the latest and
greatest, but as far as I can tell we really do want the older version
here.
2017-03-17 21:18:36 -05:00
Ben Liblit 7cbbeb1d81 Fix 92 deprecation warnings
All of these fixes involve replacing junit.framework.Assert with
org.junit.Assert for JUnit 4.x and later.
2017-03-17 21:18:26 -05:00
Ben Liblit 2a61306338 Download "dx.jar" from Maven, as we already do for "android.jar"
This should make it easier for newcomers to get WALA up and running
from sources.  One no longer needs to manually find "dx.jar" using
instructions given at
<http://wala.sourceforge.net/wiki/index.php/UserGuide:Getting_Started#Building_the_code>
or
<https://groups.google.com/forum/#!msg/wala-sourceforge-net/cBYsfEvYVG0/Ua52dyQQU-YJ>.
Those instructions were already out-of-date, anyway.

Given that an official release of "dx.jar" is available in Maven, it
would be nice to have Maven itself manage that dependency.
Unfortunately, it seems that WALA in general does not use Maven for
dependency management.  As far as I can tell, the Maven configuration
just calls out to Ant for doing builds, including having Ant download
other needed components.  If WALA ever moved to using Maven more
fully, downloading "dx.jar" could easily come along with that.
2017-03-16 19:51:11 -05:00
Ben Liblit ffa41a6120 Clone DroidBench in the desired place without pushhd/popd
IMHO this is a simpler way to achieve the desired result.
2017-03-16 19:51:08 -05:00
Ben Liblit 9c6e10cb1c Add trailing newlines, but remove other trailing white space 2017-03-16 19:51:02 -05:00
Julian Dolby 56db4bbe78 Merge branch 'master' of https://github.com/wala/WALA 2017-03-15 22:06:43 -04:00
Julian Dolby 6cdeedd5e9 changes for analysis cache view 2017-03-15 22:06:19 -04:00
Manu Sridharan 811ce5257c Merge pull request #145 from ponder-lab/IAnalysisCacheView
Additional refactorings for IAnalysisCacheView.
2017-03-15 13:18:12 -07:00
Manu Sridharan b144423ce4 Merge pull request #146 from liblit/warning-fixes-type-safety-and-raw-types
Fix Eclipse warnings about type safety and raw types
2017-03-15 13:08:26 -07:00
Ben Liblit ab5aa90114 Suppress an Eclipse warning about unsafe varargs
Nothing we can do about this statically, due to Java limitations about
non-reifiable types.
2017-03-15 11:24:45 -05:00
Ben Liblit e56686ddf5 Suppress a few Eclipse warnings about unchecked casts
These are all ones that we cannot really fix statically.
2017-03-15 11:24:45 -05:00
Ben Liblit c382934933 Fix an Eclipse warning about an unchecked cast 2017-03-15 11:24:40 -05:00
Ben Liblit fde65340d2 Fix 132 Eclipse warnings about using raw generic types 2017-03-15 11:08:20 -05:00
Raffi Khatchadourian 85e7f7e623 Merge branch 'master' into IAnalysisCacheView 2017-03-15 10:27:45 -04:00
Manu Sridharan 1ba27cd576 Merge pull request #143 from liblit/gitignore-nodejs-lib
Ignore a "lib" subdirectory that Maven creates
2017-03-14 20:11:44 -07:00
Raffi Khatchadourian d95b6e33f0 Merge remote-tracking branch 'origin/master' into IAnalysisCacheView 2017-03-14 17:24:19 -04:00
Julian Dolby 7e3066b6cd bug 144 2017-03-14 10:05:18 -04:00
Raffi Khatchadourian 8fd41c148f Use IAnalysisCacheView instead of AnalysisCache.
It seems that some additional types need to be changed due to
d24519e974. This may not be inclusive,
however.
2017-03-13 16:27:05 -04:00
Ben Liblit 7c1ec7d18a Ignore a "lib" subdirectory that Maven creates
This arises at some point during "mvn compile install".  I'm not sure
exactly when, but it's definitely automated, and therefore not
appropriate to track in git.
2017-03-13 14:01:13 -05:00
Julian Dolby bb0f38338e Merge branch 'warning-fixes-resource-management' of https://github.com/liblit/WALA 2017-03-13 10:44:38 -04:00
Julian Dolby 47f29192e6 Merge branch 'warning-fixes-generics-inference' of https://github.com/liblit/WALA 2017-03-13 10:42:52 -04:00
Ben Liblit 0165605c19 Simplify resource management using try-with-resource
This fixes the remaining 34 Eclipse "Resource '...' should be managed
by try-with-resource" warnings that were still left after the previous
commit.

Unlike the fixes in that previous commit, the changes here are *not*
plugging potential resource leaks.  However, in many cases that is
simply because the code before the close() call cannot currently throw
exceptions.  If exceptions became possible in the future, leaks could
result.  Using try-with-resource preemptively avoids that.
Furthermore, in code that was already dealing with exceptions, the
try-with-resource style is usually considerably simpler.
2017-03-12 21:38:43 -05:00
Ben Liblit b1678882b3 Plug numerous potential resource leaks
This fixes 33 out of 37 Eclipse "Potential resource leak: '...' may
not be closed" warnings.  It also fixes 3 out of 37 Eclipse "Resource
'...' should be managed by try-with-resource" warnings, although that
was not the main focus of this effort.

The remaining 4 warnings about potential resource leaks all involve a
leaked JarFile instance that is passed to a JarFileModule constructor
call.  JarFileModile never attempts to close its underlying JarFile;
this code is written as though JarFile cleanup were the caller's
responsibility.  However, the JarFile often cannot be closed by the
code that creates the JarFileModule either, since the JarFile needs to
remain open while the JarFileModule is in use, and some of these
JarFileModules stay around beyond the lifetime of the code that
created them.  Truly fixing this would essentially require making
JarFileModule implement Closeable, which in turn would probably
require that Module implement Closeable, which in turn would require
changes to lots of code that deals with Module instances to arrange
for them to be properly closed.  That's more invasive than I'm
prepared to take on right now.
2017-03-12 21:38:43 -05:00
Ben Liblit 7a3a23b2b4 When using Maven, compile using Java 1.7, not 1.6
We already switched to using Java 1.7 in the Eclipse settings.  This
applies the corresponding change to Maven-managed builds.
2017-03-12 21:38:43 -05:00
Julian Dolby d890045a60 Merge branch 'master' of https://github.com/wala/WALA 2017-03-12 19:46:01 -04:00
Julian Dolby 774db6978a nodejs support updated to latest WALA and now on Travis 2017-03-12 19:45:19 -04:00
Manu Sridharan 064fa9a503 Merge pull request #140 from liblit/remove-execute-bits-from-non-scripts
Remove execute bits from many non-executable (i.e., non-script) files
2017-03-12 10:27:08 -07:00
Ben Liblit 32ab3aaa9b When using Maven, compile using Java 1.7, not 1.6
We already switched to using Java 1.7 in the Eclipse settings.  This
applies the corresponding change to Maven-managed builds.
2017-03-11 22:19:43 -06: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
Julian Dolby a1dd19b8d0 Merge branch 'pull-request__android-bugfixes' of https://github.com/joana-team/WALA 2017-03-11 16:56:09 -05:00
Julian Dolby 605e7373ce Merge branch 'pull-request__exception-pruning-for-safe-array-creation' of https://github.com/joana-team/WALA 2017-03-11 16:38:03 -05:00
Julian Dolby ef1994e146 Merge branch 'master' of https://github.com/wala/WALA 2017-03-11 16:21:16 -05:00
Julian Dolby db65c16863 Merge branch 'pull-request__typeannotations' of https://github.com/joana-team/WALA 2017-03-11 16:19:50 -05:00
Julian Dolby 6a8696e6e1 Merge pull request #118 from joana-team/pull-request__dalvik_typeinference
Make a variant of TypeInference which supports dalvik bytecode
2017-03-11 16:12:50 -05:00
Julian Dolby 2a4d24dc6f Merge branch 'pull-request__nullpointer-bugfixes' of https://github.com/joana-team/WALA 2017-03-11 14:48:13 -05:00
Julian Dolby 5c6cf9724a Merge branch 'warning-fixes-java-versions' of https://github.com/liblit/WALA 2017-03-11 13:46:06 -05:00
Julian Dolby ffe355bc74 Merge branch 'warning-fixes-model-behavior-class' of https://github.com/liblit/WALA 2017-03-11 13:45:20 -05:00
Julian Dolby 70501da941 Revert "IFDS Null Analysis files"
This reverts commit df99517df0.
2017-03-11 13:25:19 -05:00
Julian Dolby f595eb357e add some abstraction to IR, using IRView 2017-03-11 13:22:45 -05:00
Julian Dolby a1f8894ba1 Merge branch 'master' of https://github.com/wala/WALA 2017-03-10 13:49:09 -05:00
Julian Dolby 0545060886 merge 2017-03-10 13:49:07 -05:00
Julian Dolby a2c388b83d Merge branch 'nodejs' of https://github.com/Pfarrer/WALA 2017-03-09 09:02:28 -05:00
Julian Dolby 016c3940e8 Merge branch 'pull-request__misc-bugfixes' of https://github.com/joana-team/WALA 2017-03-09 08:59:40 -05:00
Julian Dolby f5c36d7411 Merge branch 'master' of https://github.com/d2an3/WALA 2017-03-09 08:53:30 -05:00
Julian Dolby 0784a9da6a Merge pull request #124 from joana-team/slightly-more-informative-output
display which classes each handler catches when outputting IR
2017-03-09 08:51:06 -05:00
Julian Dolby 3be77aeb3b Merge pull request #139 from GrammaTech/intstackget
Add int size() and int get(int index) methods to IntStack.
2017-03-09 08:50:03 -05:00
Brian Alliet 9c854a4be6 Add int size() and int get(int index) methods to IntStack.
Accrue (http://people.seas.harvard.edu/~chong/accrue.html) uses IntStack
internally for various things and found these convenient.
2017-03-07 12:00:02 -05:00
Achim D. Brucker d32aff7e9a Merge remote-tracking branch 'upstream/master' 2017-02-26 15:05:40 +00:00
Julian Dolby 017a715cd5 build new code 2017-02-24 22:43:31 -05:00
Julian Dolby 7b393a7da2 fix for missing Java 8 feature 2017-02-24 22:29:14 -05:00
Julian Dolby 583cf37e59 type cleanups 2017-02-23 10:15:59 -05:00
Julian Dolby a8a3699ee1 type cleanups 2017-02-23 10:10:39 -05:00
Ben Liblit 5a5cccc062 Strip execute bits from many non-executable (i.e., non-script) files 2017-02-23 06:10:08 -06:00
Achim D. Brucker 3269312195 Merge remote-tracking branch 'upstream/master' 2017-02-13 23:02:04 +00:00
Andrei Dan df99517df0 IFDS Null Analysis files 2017-02-11 18:36:28 +01:00
Julian Dolby 96be295500 grr. commit -a does not find new files. 2017-02-02 20:46:34 -05:00
Julian Dolby b65517b958 forgot some files 2017-02-02 20:44:27 -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
Manu Sridharan 71b505cfc8 Merge pull request #134 from joana-team/pull-request__getridofhashcodecomparator
get rid of HashCodeComparator and all its usages
2017-01-26 08:17:08 -08:00
Martin Mohr 467bf8038d implement hashCode() and equals() for DexModuleEntry 2017-01-26 15:41:42 +01:00
Martin Mohr 64823846c0 get rid of HashCodeComparator and all its usages
This addresses both https://github.com/wala/WALA/issues/133 and
https://github.com/wala/WALA/issues/88
2017-01-26 14:16:48 +01: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 74cc8454e3 make more of WALA run on TeaVM 2017-01-17 13:14:56 -05:00
Julian Dolby 46dddcfb66 Bug fix for CAst translation. When translating if statements, the system has a case where code to detect dead blocks mistakenly triggers even though the needed CFG edge will be added later. The if processing code now tells the CFG that the block is not dead, which prevents it from being prematurely removed. 2017-01-16 21:57:12 -05:00
Julian Dolby 8d04766aa9 more changes for CHAs 2017-01-12 16:36:26 -05:00
Julian Dolby c9b1006305 changes for allowing seq. and conc. CHAs 2017-01-12 16:34:54 -05:00
Julian Dolby 602800524b Hacks to make WALA run on TeaVM, and hence be able to run in Web browsers. TeaVM has some warts, but overall it is a very nice mechanism to run Java code on the browser. I have examples of analysis actually running in Firefox, which enables supportive tools. So, for those changes that are not ideal, such as dropping the ConcurrentHashMap in ClassHierarchy, we should find a way to support both them and TeaVM, based on demand. 2017-01-12 12:25:37 -05:00
Julian Dolby 7a69f752d0 type cleanups 2017-01-11 08:04:37 -05:00
Achim D. Brucker da57da4762 Merge remote-tracking branch 'upstream/master' 2017-01-07 00:13:50 +00:00
Julian Dolby 137fed6e62 optionally dump CG 2017-01-05 14:10:11 -05:00
Julian Dolby 70dac5ca69 support for more languages 2017-01-05 14:09:52 -05:00
Julian Dolby 37989efb6a adapt to teavm changes 2017-01-03 21:06:21 -05:00
Julian Dolby 15c8d711db changes for working with TeaVM and compilation to JavaScript 2017-01-03 20:58:16 -05:00
Julian Dolby d85226fa93 nnotation 2017-01-03 20:55:46 -05:00
Julian Dolby 51e59ef0bd more support for more languages 2017-01-03 20:51:49 -05:00
Julian Dolby 12404a0ce6 Merge branch 'master' of https://github.com/wala/WALA 2017-01-03 18:59:24 -05:00
Manu Sridharan f12b1a3df9 Merge pull request #130 from joana-team/dexlib-fix
Dexlib fix
2017-01-03 10:38:10 -08:00
Martin Mohr fcb9c57e40 fix download location for dexlib 2017-01-03 18:17:34 +01:00
Martin Mohr e78e71fe71 fetch dexlib-1.3.4.jar from SCanDroid
This buys us some time to work on a proper solution, aka:
porting from dexlib to dexlib2
2017-01-03 18:09:23 +01:00
Manu Sridharan 63e3f82d38 Revert "fetch dexlib-1.3.4.jar from SCanDroid"
This reverts commit fc31fce698.
2017-01-02 16:12:53 -08:00
Martin Mohr fc31fce698 fetch dexlib-1.3.4.jar from SCanDroid
This buys us some time to work on a proper solution, aka:
porting from dexlib to dexlib2
2017-01-02 16:05:43 -08:00
Manu Sridharan f42ad7aea6 Fix #127
Check that we only loop over the parameters actually being passed at
the call site in the SDG construction.
2017-01-02 15:36:38 -08:00
Achim D. Brucker 973ba0a7ab Merge remote-tracking branch 'upstream/master' 2016-12-17 09:46:12 +00:00
Martin Mohr b9fb5e0481 display which classes each handler catches when outputting IR 2016-12-09 16:49:56 +01:00
Martin Mohr 4228bac5ff If we see a call to an unknown method, conservatively add edges to all catch handlers
This is an attempt to fix issue #123
2016-12-09 16:46:01 +01:00
Martin Mohr ee22e177c5 Dalvik-Frontend: add catch-all handler at the end and not at the beginning 2016-12-09 16:40:14 +01:00
Martin Hecker d5dee55918 correctly prune safe array creation for multi-dimensional array creation 2016-12-07 19:27:59 +01:00
Martin Mohr f7299b003b fix compilation problems caused by merge 2016-12-07 17:56:59 +01:00
Martin Hecker 4905695e4a more interprocedural NullPointerException test cases 2016-12-07 17:56:59 +01:00
Martin Hecker 64c4034dca fix: properly propagate NullPointerState along phi nodes in the NullPointerExceptionAnalysis 2016-12-07 17:56:59 +01:00
Martin Hecker 7293d18a89 another test case for the NullPointerException analysis 2016-12-07 17:56:59 +01:00
Martin Hecker c7f618eb6f add some tests both for intra and inter-procedural NullPointerException Analysis 2016-12-07 17:56:59 +01:00
Martin Hecker 4fca71c595 some more simple tests for intraprocedurel NullPointerException Analysis 2016-12-07 17:56:59 +01:00
Martin Hecker edf4f8ed6f Attempt to fix intraprocedural Nullpointer analysis by respecting phi nodes, and correctly initializing entry variables.
Since  SSAPhiInstructions are never visited by NullPointerTransferFunctionProvider.TransferFunctionSSAVisitor,
we now respect phi instructions present at a given block by providing additional NodeTransferFunctions, improving precision.

Formerly, meets would lead to incorrect results due to incorrect initialization of initial data flow facts.

These are now properly initialized, interpreting
  "State.BOTH" to mean: both "null" and "non-null" are possible values for the given variable, and
  "State.UNKNOWN" to be the absurd assertion.

The initial fact at the entry block assumes variables to be BOTH, other blocks are initialy assumed unreachable and hence their variables to be UNKNOWN.
2016-12-07 17:56:48 +01:00
Martin Mohr 6d0ba7d371 Make a variant of TypeInference which supports dalvik bytecode
Dalvik bytecode represents 'null' as 0 which may lead to problems
in phi instructions. This variant of TypeInference fixes these
problems by

- tracking whether an SSA value is constant zero and
- ignoring constant zeros in the transfer function of phi instructions
  when meeting with non-primitive types
2016-12-07 16:34:13 +01:00
Martin Mohr 9ada546c5d Activity.onStop is part of the loop 2016-12-07 16:11:19 +01:00
Martin Mohr 9a3e869dd1 use pi nodes in dalvik frontend 2016-12-07 16:11:19 +01:00
Martin Mohr 5624ad78fa really turn off short circuit optimization
The setting should comply with the comment. Plus,
turning it on seems to lead to some unsoundness because
exception points-to sets become empty but should not be
2016-12-07 16:11:19 +01:00
Martin Mohr fd2d4aefbf further fixes in dalvik front-end to avoid NullPointerExceptions and other errors 2016-12-07 16:11:19 +01:00
Martin Mohr 42ae088c05 turn exception throwing into debug logging message 2016-12-07 16:11:19 +01:00
Martin Mohr a8cb767c63 allow action names starting with "."
According to [1], such action names are allowed and implicitly to be
prepended with the package name of the application.

[1] http://developer.android.com/guide/topics/manifest/activity-element.html
2016-12-07 16:11:19 +01:00
Martin Mohr 7c657f5754 allow unqualified custom actions 2016-12-07 16:11:19 +01:00
Martin Mohr be635cf50d support for activity aliases 2016-12-07 16:11:19 +01:00
Martin Mohr 92f26a33c2 clarification 2016-12-07 16:11:19 +01:00
Martin Mohr 95031461f4 handle gracefully the case of intent-filter without action
According to [1], such intent-filters do not let any intent
pass but on the other hand do no harm

[1] http://developer.android.com/guide/topics/manifest/action-element.html
2016-12-07 16:11:19 +01:00
Martin Mohr a1fa8a2057 update intent information instead of crashing 2016-12-07 16:11:18 +01:00
Julian Dolby 891bf3f585 Merge branch 'master' of https://github.com/wala/WALA 2016-12-06 12:50:09 -05:00
Julian Dolby 8fd17b3463 merge 2016-12-06 12:50:04 -05:00
Martin Hecker 867a8ecf2b When creating TypeAnnotations with LocalVarTarget, somewhat deal with class files that lack a LocalVariableTable 2016-12-05 18:52:38 +01:00
Martin Hecker 5f617c19e3 Tests for the new JSR 308 type annotations implementation. 2016-12-05 18:52:38 +01:00
Martin Hecker de0f9c2a1f WALA: Provide acces to JSR 308 Annotations via new Class TypeAnnotation.
Access is provided via corresponding methods in FieldImpl, ShrikeCTMethod and ShrikeClass.
Since we do not currently have implementation of these methods for front-ends other than Shrike, these new methods are not yet made available in the corresponding interfaces.
2016-12-05 18:52:38 +01:00
Martin Hecker 92dc2929f2 Shrike: low level reading of JSR 308 Type Annotations from Java bytecode 2016-12-05 18:52:38 +01:00
Martin Hecker 8e773fcf88 in order to look up instruction-indices from a bytecode-indices, do a binary search on the existing pcMap array (as suggested by Julian Dolby).
also see https://sourceforge.net/p/wala/mailman/message/35518796/ and answers.
2016-12-05 18:52:37 +01:00
Martin Mohr dff20ac49c make JarStreamModule inherit the assumptions of JarInputStream's constructor 2016-12-05 18:50:21 +01:00
Martin Hecker 1b74b906fc Add some tests that are meant to check both for precision and soundness of the intraprocedural NullPointer analyses. 2016-12-05 18:24:39 +01:00
Martin Mohr c00d9ec7af avoid NPE while constructing debug message 2016-12-05 18:23:55 +01:00
Martin Mohr 3283de6c44 promote visibility of some handy but harmless methods 2016-12-05 18:23:55 +01:00
Martin Mohr d830780242 slight fix of type parameter handling in PDG 2016-12-05 18:22:38 +01:00
Martin Mohr c530fc3ae6 once again fix location of apache commons io lib 2016-12-05 18:21:17 +01:00
Juergen Graf 22b7db62f7 make output of dot util compatible with dot viewer eclipse plugin. prevent parser error. 2016-12-05 18:21:17 +01:00
Martin Mohr 4a7efc8c78 array creation is also safe if length comes from another array's length 2016-12-05 18:21:05 +01:00
Martin Mohr 13a7b5459e prune exceptions for array creations of constant, non-negative size 2016-12-05 18:21:05 +01:00
Martin Mohr f989290ca6 provide list of exceptions for array creation sites with non-negative size 2016-12-05 18:21:05 +01:00
Manu Sridharan 9ca450de48 Merge pull request #114 from liblit/error-fix-hamcrest-dependency
Add Hamcrest dependency
2016-12-01 08:56:15 -08:00
Ben Liblit 522c382a19 Use consistent Java versions, usually 1.7
Previously, the various Eclipse projects' Java configurations used
mixtures of 1.6, 1.7, and 1.8.  Many were internally inconsistent,
such as requiring 1.7 in "MANIFEST.MF" but 1.6 in the Eclipse JDT
build preferences.  The Travis-CI configuration tests against both 1.7
and 1.8, but does not test against 1.6.

Across all projects, the most common version was 1.7.  So I'm going to
assume that 1.7 is the intended build target.  This commit makes 1.7
the selected version nearly everywhere.

"com.ibm.wala.core.testdata" is the one exception.  This specific
project uses a few features only found in 1.8, such as lambda
expressions.  Previously, "com.ibm.wala.core.testdata" used 1.7 in
some aspects of its configuration but 1.8 in others.  Now it
consistently targets 1.8.  I wish this one project didn't need to be
inconsistent with the rest of WALA, but at least now it's consistent
with itself.

(Personally, I'd be happy to target 1.8 only.  But my impression
across all of these configuration files is that the WALA developers
still want to be compatible with 1.7.  If that is no longer a
requirement, let me know and I will adjust these changes accordingly
to target 1.8 only.)

This change eliminates 11 "There is no 'jre.compilation.profile' build
entry and the project has Java compliance preferences set" warnings
and 13 "The JRE container on the classpath is not a perfect match to
the 'JavaSE-1.7' execution environment" warnings.  However, it also
adds 450 "Redundant specification of type arguments <...>" warnings
and 17 "Resource '...' should be managed by try-with-resource"
warnings.  So this seems like a net step backward in my wish to reduce
WALA warnings.  However, those new warnings concern Java 1.7 language
features that we were not previously using to good effect in projects
that targeted 1.6.  If we all agree that we can now target 1.7
instead, then we can use these helpful features as the newly-added
warnings suggest.  So I call that a step in the right direction.
2016-11-29 21:29:30 -06:00
Manu Sridharan fc37430c13 Merge pull request #113 from liblit/warning-fixes-xml-validation
Eliminate all Eclipse XML validation warnings
2016-11-29 18:05:09 -08:00
Ben Liblit cc2dcb91a6 Add Hamcrest dependency
Some source files here definitely use Hamcrest, so listing it as a
dependency seems reasonable.  What I find confusing is the inconsistency
among my Eclipse installations.  On some of my various machines, Eclipse
reports an error if this dependency is not listed.  On others, Eclipse
finds the required jar and reports no error, even if this dependency is
not listed.  I don't know why the latter works, or why the inconsistency
exists at all.  Eclipse is a complex, subtle beast.  What I can say is
that this change fixes the error for my Eclipses that were reporting an
error, and does not introduce any new errors for my Eclipses that were
already happy before this change.
2016-11-29 15:12:54 -06:00
Ben Liblit 18b79bf0f9 Merge branch 'master' into warning-fixes-xml-validation 2016-11-29 10:08:00 -06:00
Manu Sridharan 1e5dcf46f7 Merge pull request #112 from liblit/warning-fixes-html-validation
Eliminate all Eclipse HTML validation warnings
2016-11-28 21:37:46 -08:00
Ben Liblit 391210bf2d Exclude Maven-generated Ant build scripts from XML validation
When Maven generates these "*/target/antrun/build-main.xml" Any build
scripts, it does not include any DTD or XML Schema declarations.
Eclipse's XML validator warns about the lack of grammar constraints.
The warning is sensible, but we are not in a position to do anything
about it.  Better, therefore, to suppress these warnings so that we
can more-clearly see warnings we *can* address.
2016-11-28 14:57:26 -06:00
Ben Liblit d83a05affc Add stub DOCTYPE declarations for Eclipse plug-in manifest files
We actually know the full grammar for these files: it is documented at
<http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fplugin_manifest.html>.
We ought to be able to extract that DTD into a file and give each
"plugin.xml" a "<!DOCTYPE plugin SYSTEM ...>" declaration referencing
it.  Unfortunately, that leads to a new warning: "External entity
resolution is not supported by PDE."  So a stub declaration is the
best we can do.  Fortunately, Eclipse's structured editor seems to
preserve these once we add them by hand.
2016-11-28 14:55:34 -06:00
Ben Liblit 48e158f87e Add stub DOCTYPE declarations for various hand-authored XML files
Some of these might have proper DTDs or XML Schema definitions
floating around somewhere that we could use.  Presumably many do not.
Rather than hand-craft such definitions myself, I'm just giving each a
minimal stub DOCTYPE declaration.  That's enough to satisfy Eclipse's
XML validator, which otherwise complains that these files lack grammar
constraints.
2016-11-28 14:55:34 -06:00
Ben Liblit 3b1547f0a7 Exclude Maven-generated (?) files from XML validation
I think the "target/p2artifacts.xml" and "target/p2content.xml" files
are generated by Maven.  They are well-formed XML but Eclipse's XML
validator legitimately warns that they lack grammar constraints.
Since we're not maintaining the tool that creates these files, we are
not in a position to do anything about that.  Therefore, we may as
well exclude these from validation entirely.  That way we can
more-clearly recognize warnings that we *can* do something about.
2016-11-28 14:55:25 -06:00
Ben Liblit c2d47ae99d Exclude Eclipse feature manifest files from XML validation
In theory, these files could be checked against the DTD given at
<http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Ffeature_manifest.html>.
In practice, Eclipse's structured editor for this file type discards
any "<!DOCTYPE ...>" declarations one might manually add.  So there's
no convenient way to tell Eclipse' XML validator what grammar to use.
Fortunately, that same structured editor makes it unlikely that anyone
will introduce invalid content.  So I don't mind excluding these files
from XML validation entirely.
2016-11-28 14:03:03 -06:00
Ben Liblit 18b02e2880 Exclude third-party XML files from validation
Eclipse's XML validator warns about missing grammar constraints in
several XML files that come from non-WALA projects.  We are not in a
position to do anything about these problems.
2016-11-28 13:33:07 -06:00
Ben Liblit 80e8ea3c4e Add stub DOCTYPE declarations for Ant build scripts
Ant "build.xml" files don't have a standard DTD or XML Schema; the
contents are simply too flexible for that.  But we can at least
give each a stub DOCTYPE declaration.  That's enough to satisfy
Eclipse's XML validator, which otherwise complains that these files
lack grammar constraints.
2016-11-28 12:50:56 -06:00
Ben Liblit 94f6933ff1 Exclude JUnit test result files from XML validation
As created by Tycho Surefire, these files are XML documents without
DTD or XML Schema declarations.  The XML validator warns about this
omission.  However, Surefire is not a WALA component.  We are not in a
suitable position to change it to include XML schema or DTD
declarations in the XML files it generates.  Better, then, to ignore
this benign problem so we can focus on warnings that we can act on
directly.
2016-11-28 12:42:30 -06:00
Ben Liblit ed0ddd780f Correct HTML embedded in Javadoc comments
Most of the invalid HTML arose from bare "<" and ">" characters.
These should be escaped as "&lt;" and "&gt;" when not intended to
introduce HTML tags.  When you have many such characters close
together, "{@literal ...}" is a nice, readable alternative that
automatically escapes its contents.  If the text in question is
intended to be a code fragment, then "{@code ...}"  is appropriate:
this is essentially equivalent to "<code>{@literal ...}</code>".

There were a few other HTML violations too, but none common enough to
be worth detailing here.
2016-11-28 11:14:41 -06:00
Ben Liblit e35b205bc2 Fix numerous unescaped "<" and ">" in Javadoc @author tags
The contents of @author go straight into HTML, just like most other
Javadoc material.  So if you want to have a "<foo@bar.com>" e-mail
address as part of the author information, the angle brackets must be
escaped.  Here I've opted to do that using "{@code <foo@bar.com>}",
which has some additional styling effects that seem appropriate for
e-mail addresses.  We could also have used "&lt;foo@bar.com&gt;" for
escaping without code styling.
2016-11-27 21:24:03 -06:00
Ben Liblit f33efbf991 Exclude some hand-written HTML test pages from validation
It's unclear whether the original authors of these pages intended them
to be valid or invalid.  Certainly there is merit in testing against
invalid HTML, since the vast majority of real-world HTML is indeed
invalid.  I'm going to assume that any errors in this collection of
test inputs are intentional, and therefore not worth reporting when
running Eclipse HTML validation.
2016-11-27 21:24:03 -06:00
Ben Liblit e5e51110c3 Exclude plugin-provided HTML pages from validation
Plugin documentation includes plenty of invalid HTML.  However, we
don't maintain these files, so we are not in a position to fix them.
Better, therefore, to suppress these warnings so that we can notice
and fix other problems over which we do have control.
2016-11-27 21:24:03 -06:00
Ben Liblit 5962e1c9ee Exclude some hand-written HTML test pages from validation
It's unclear whether the original authors of these pages intended them
to be valid or invalid.  Certainly there is merit in testing against
invalid HTML, since the vast majority of real-world HTML is indeed
invalid.  I'm going to assume that any errors in this collection of
test inputs are intentional, and therefore not worth reporting when
running Eclipse HTML validation.
2016-11-27 21:24:03 -06:00
Ben Liblit 2a5503b9aa Exclude Maven-generated HTML pages from validation
Eclipse validation warns about invalid HTML content in all
Maven-generated "target/site/dependency-convergence.html" files.  The
warnings are legitimate: these HTML files are indeed invalid.
However, we don't maintain the tool that generates these files, so we
are not in a position to fix them.  Better, therefore, to suppress
these warnings so that we can notice and fix other problems over which
we do have control.
2016-11-27 21:24:03 -06:00
Ben Liblit 7d7a9c7e85 Exclude intentionally-malformed HTML pages from validation
Some test files are intentionally invalid HTML.  There's no point in
having Eclipse remind us of this fact.
2016-11-27 17:59:24 -06:00
Ben Liblit 5381bd1735 Exclude third-party HTML pages from validation
The WALA team does not maintain these pages, and therefore is not in a
good position to address HTML validation warnings arising within them.
2016-11-27 16:48:15 -06:00
Manu Sridharan 13bdb905c9 Merge pull request #110 from liblit/warning-fixes-packaging
Fix various Eclipse warnings about packaging
2016-11-26 21:24:05 -08:00
Ben Liblit b3293ecc3e Enforce restrictions on the model behavior class statically
If a client violates these restrictions, I prefer that their code fail
at compile time instead of run time.  Changing a few key types from
`Class` to `Class<? extends AbstractAndroidModel>` gives us precisely
the static enforcement we need and lets us remove an
`AbstractAndroidModel.class.isAssignableFrom` run-time check.

However, this does change the public API of `AndroidEntryPointManager`
in two ways.  The `getModelBehavior` and `setModelBehavior` methods now
respectively accept and return `Class<?  extends AbstractAndroidModel>`
instead of `Class`.  Is tightening up a public API in this manner
considered OK?
2016-11-26 22:39:37 -06:00
Ben Liblit 20014e2cb2 "plugin" does not exist here, and therefore needs no localization
This fixes one Eclipse "no valid properties files exist in the
localization directory specified" warning.

Ordinarily I would also change this project's configuration to treat
this warning as an error in the future.  That's a good way to
discourage regressions.  Unfortunately in this particular case I
cannot find a setting that has the desired effect, even after hunting
around in Eclipse PDE sources.  It seemed that setting
"compilers.p.unknown-resource=0" in
"com.ibm.wala.util/.settings/org.eclipse.pde.prefs" should do the
trick, but it does not.  I don't know why.
2016-11-26 21:01:53 -06:00
Ben Liblit d4a0a5ddd4 Delist a JAR that is not actually present
This resolves one Eclipse "'...' build entry is missing" warning.

Also update the project configuration to treat this warning as an
error.  This should discourage commits that create new instances of
this sort of problem in the future.
2016-11-26 20:39:26 -06:00
Ben Liblit 8b7a163110 The "lib" subdirectory contains no Java sources
This resolves one "'...' is not a source folder" Eclipse warning.

Also update the project configuration to treat this warning as an
error.  This should discourage commits that create new instances of
this sort of problem in the future.
2016-11-26 20:39:26 -06:00
Ben Liblit 173209a7bb Eclipse wants "META-INF/" to be included in "bin.includes"
Other subdirectories' "build.properties" generally seem to include this
already, so who am I to argue?

This resolves one "An entry for META-INF/ is required in bin.includes"
Eclipse warning.

Also update the project configuration to treat this warning as an
error.  This should discourage commits that create new instances of
this sort of problem in the future.
2016-11-26 20:39:12 -06:00
Manu Sridharan 4080e49a5a Merge pull request #109 from liblit/warning-fixes-missing-non-null-by-default
Ignore missing non-null-by-default annotations in Eclipse
2016-11-26 17:56:10 -08:00
Ben Liblit dace7b709f Ignore missing non-null-by-default annotations in Eclipse
In general, the WALA code base is not really ready for nullness
checking.  It would be nice if we got there some day, but I'm not
planning to take that on now or any time soon.  Until then, it's not
useful to warn about missing @NonNullByDefault declarations on WALA
packages.

See also older commit 7b6811b.
2016-11-26 18:47:35 -06:00
Ben Liblit c74d5094c8 Merge remote-tracking branch 'official/master' 2016-11-25 14:54:10 -06:00
Julian Dolby ae57a7e947 further work on fix to cast nonsense 2016-11-24 11:40:36 +08:00
Julian Dolby 66d9e896c4 remove unsafe cast 2016-11-22 10:37:04 +08:00
Julian Dolby 166af27427 clean up types 2016-11-22 10:35:56 +08:00
Ben Liblit 9d9d4d2d78 Merge branch 'master' of github.com:wala/WALA 2016-10-27 10:50:35 -05:00
Brian Pfretzschner 9de3da19fb NodeJS Support, including Ant build script to download Nodejs Core Library files 2016-10-27 16:37:33 +02:00
Achim D. Brucker 317ae02155 Merge remote-tracking branch 'upstream/master' 2016-10-09 10:23:03 +01:00
Julian Dolby 8855f80c97 allow notion od edge labels to be overridden in the CDG 2016-09-26 19:42:19 -04: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
Achim D. Brucker 21c30f41c2 Removed Tycho configuration (Windows platform). 2016-09-25 04:52:45 +01:00
Achim D. Brucker 98d2ebbec4 Merged upstream, manually resolved conflict in com.ibm.wala.dalvik.test/build.xml (accepted pull request). 2016-09-21 22:14:28 +01:00
Manu Sridharan 9b5845034f Merge pull request #105 from mherzberg/copy-dx-jar
Added build script step to copy dx.jar from Android SDK.
2016-09-21 12:13:03 -07:00
Michael Herzberg 68707c1208 Added build script step to copy dx.jar from Android SDK. 2016-09-21 08:47:03 +01:00
Julian Dolby 83799f0fea dd edge labels when printing labeled graphs 2016-09-20 21:41:03 -04:00
Manu Sridharan 1a7c527dbe Remove unused conditionals 2016-09-20 14:04:03 -07:00
Manu Sridharan e21ee9f5cf Do a shallow clone of DroidBench
This should (very slightly) speed up build times.
2016-09-20 13:55:47 -07:00
Manu Sridharan e4101510a2 Add IExplodedBasicBlock.getOriginalNumber()
This method is useful when reasoning about SSAPiStatements, as their
successor block number refers to original basic blocks, not exploded
blocks.
2016-09-20 13:50:43 -07:00
Manu Sridharan 2c9eec0cff Update callback APIs to expose path edge structure 2016-09-20 13:50:42 -07:00
Manu Sridharan 57198a22f3 Remove trailing whitespace; no functional change 2016-09-20 13:50:42 -07:00
Manu Sridharan b761e3871b Add new callbacks for tracking exploded supergraph
A subclass of TabulationSolver can now override the methods
newNormalExplodedEdge(), newCallExplodedEdge(), and
newReturnExplodedEdge() to take some action whenever (logically)
some edge in the exploded supergraph is "discovered" during
tabulation.
2016-09-20 13:50:42 -07:00
Julian Dolby 3156f03145 more CPA work 2016-09-19 13:51:18 -04:00
Julian Dolby 2948ecf31d rationalize names to ECJ 2016-09-18 19:47:14 -04:00
Achim D. Brucker 37ed2d35e3 Merge remote-tracking branch 'upstream/master' 2016-09-18 02:36:30 +01:00
Julian Dolby c7971cb969 ajaxslt 0.8.1 2016-09-16 20:23:51 -04:00
Julian Dolby 2d150eae17 need to find new version of ajaxxslt; it is failing to download 2016-09-16 09:52:11 -04:00
Julian Dolby f5f2a9e778 need to find new version of ajaxxslt; it is failing to download 2016-09-16 09:01:53 -04:00
Julian Dolby 0475e2e712 need to find new version failing to download 2016-09-16 08:59:14 -04:00
Julian Dolby 93e165e64a CPA smoke tests 2016-09-16 08:14:33 -04:00
Julian Dolby d10a50fc32 CPA smoke test 2016-09-15 21:33:51 -04:00
Julian Dolby 8b2ab22335 support for full CPA, when desired. 2016-09-15 21:32:35 -04:00
Julian Dolby cfbef4fe47 clean up load additional file 2016-09-15 21:24:16 -04:00
Julian Dolby 7928e57435 clean up load additional file 2016-09-15 21:18:31 -04:00
Julian Dolby 5eb1c7bc1d HybriDroid support 2016-09-15 21:14:34 -04:00
Julian Dolby 1aa3d7fc59 fix bogus test of Date as property name 2016-09-15 21:08:05 -04:00
Michael Herzberg 0bcbe43596 Reverted visibility of private method. 2016-09-14 16:28:28 +01:00
Achim D. Brucker 57c59466ac Cleanup to minimize diff to upstream version. 2016-09-07 20:35:37 +01:00
Achim D. Brucker fd31148560 Merge remote-tracking branch 'upstream/master'. 2016-09-06 11:46:07 +01:00
Julian Dolby 30bc2858c4 fix for slicer issue in javascript 2016-08-23 20:59:08 -04:00
Achim D. Brucker 3608dcca5a Deleted whitespaces. 2016-08-21 11:45:28 +01:00
Achim D. Brucker 6d5da61f00 Removed m2e settings plugin configuration (to minimize difference with upstream WALA). 2016-08-21 11:42:06 +01:00
Achim D. Brucker 682a0adceb Merge remote-tracking branch 'upstream/master' 2016-08-20 10:22:35 +01: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
Achim D. Brucker abacd436a2 Merge remote-tracking branch 'upstream/master' 2016-08-13 23:22:55 +01:00
Manu Sridharan d0fdd2cdf0 Remove incorrect methods from ICFGSupergraph
These methods were constructing an IR based on some default
AnalysisOptions, which may not match the options used when constructing
the underlying CallGraph.  This mismatch can lead to bad bugs.
Instead of these methods, analyses should get IR directory from the
CGNodes via CGNode.getIR().

Ideally we would fix the methods and not change the interface, but
that would require knowing the right AnalysisOptions, which itself
would necessitate an interface change.
2016-08-11 11:24:50 -07:00
Achim D. Brucker 661634a4ab Use upstream implementation of getLastLine(). 2016-08-07 11:58:43 +01:00
Achim D. Brucker e8ea3615d1 Merged latest updates from upstream. 2016-08-06 21:02:35 +01:00
Julian Dolby 7d7dd17a47 minor fix to getting method annotations for dalvik 2016-07-28 16:11:16 -04:00
Julian Dolby 0b52e9389e Merge branch 'master' of https://github.com/wala/WALA 2016-07-25 21:41:11 -04:00
Julian Dolby 7b59f3141c fix analysis options in js engine 2016-07-25 18:34:40 -04:00
Manu Sridharan 315d836d18 Fix building jars with JDK 7 2016-07-22 14:46:35 -07:00
Manu Sridharan 373a4d8aa4 Update Maven Central files to allow building under Java 8 2016-07-22 12:32:51 -07:00
Manu Sridharan 5e51615222 Fix some generic type warnings 2016-07-21 16:57:38 -07:00
Manu Sridharan 63eb5ade55 Also add lib/ directory contents to Maven jar 2016-07-20 12:25:47 -07:00
Julian Dolby f5f75c7c66 find slf4j from maven 2016-07-05 20:01:04 -04:00
Julian Dolby 73747cbb86 fixes for work with ECJ 2016-07-05 19:37:36 -04:00
Ben Liblit 9db1494aa1 Merge branch 'master' of github.com:wala/WALA 2016-07-05 13:22:12 -05:00
Manu Sridharan 6daceaa0ed Merge pull request #103 from liblit/eclipse-neon-fixes
Build fixes for Eclipse Neon
2016-07-05 08:59:09 -07:00
Manu Sridharan 202ca8d02e Merge pull request #102 from liblit/null-analysis-errors-cleanup
Ignore potential null accesses in Eclipse
2016-07-05 08:58:42 -07:00
Ben Liblit c3cbfc1c69 Merge branch 'master' of github.com:wala/WALA 2016-07-04 19:18:36 -05:00
Ben Liblit 80c075b4e4 Merge remote branch 'origin/master' 2016-07-04 14:05:49 -05:00
Julian Dolby be6eec72a0 more temp file APIs 2016-07-01 10:51:30 -04:00
Julian Dolby e8dfe604a5 fix bug in pull 2016-06-29 22:08:33 -04:00
Ben Liblit 52b6c1b235 Merge branches 'null-analysis-errors-cleanup' and 'eclipse-neon-fixes' 2016-06-29 12:50:07 -05:00
Julian Dolby 22ce3d1144 Merge https://github.com/steohan/WALA 2016-06-29 13:03:50 -04:00
Ben Liblit c1aaec592c Accidental "warning" setting should be "ignore"
The original intent was to ignore this potential problem in all projects in which it occurs; this one escaped my attention.
2016-06-28 16:54:19 -05:00
Ben Liblit e7b328641e Add stub for ITypeBinding.isIntersectionType()
This interface method was added in Eclipse Neon, so we need to implement
it here to have a non-abstract class.  With this fix, WALA now builds
with no errors inside Eclipse Neon.  (There are still a few thousand
warnings, but that's nothing new.)
2016-06-27 18:47:02 -05:00
Achim D. Brucker dd3409e1ab Disabled (outdated and unused) polyglot project. 2016-06-27 20:35:23 +01:00
Ben Liblit 7b6811b2dd Ignore potential null accesses in Eclipse
Eclipse Mars Service Release 2 finds 45 potential null pointer accesses
across WALA's various Eclipse projects. Eclipse ignores these by
default, but any individual user may have changed their personal Eclipse
configuration to treat them as warnings or errors. Thus, some people
will find that the code builds while others find that it fails. Better
to explicitly use a known-good configuration.

In the long run someone should inspect these cases one-by-one and fix
them where appropriate. But that is probably better managed as part of a
larger effort to tidy up nulls in WALA. I'm not planning to take that on
now or any time soon, though, so this is a better setup for now.
2016-06-27 13:11:42 -05:00
Julian Dolby aeac2a6df0 check call has enough arguments 2016-06-22 13:05:02 -04:00
Julian Dolby 76286a330c make Android entrypoint locator work for source code 2016-06-10 21:21:08 -04:00
Manu Sridharan 21340b44cf Merge pull request #101 from sewe/master
SecurityExceptions when analyzing JARs with broken/expired signatures
2016-06-08 10:48:49 -07:00
Andreas Sewe e2e5bcf435 SecurityExceptions when analyzing JARs with broken/expired signatures
See <https://github.com/wala/WALA/issues/100>
2016-06-08 11:08:10 +02:00
Julian Dolby 065a3ff767 pruned call graph takes edges as well as nodes 2016-06-06 14:17:12 -04:00
Manu Sridharan a319b3e130 Switch back to using install for jars.
Just running 'verify' won't work since project dependencies are 
resolved via the local maven repository.
2016-05-25 16:30:59 +02:00
Manu Sridharan 327dd1752c Do 'verify' instead of 'install' in jar build
This way, we don't pollute the cache of .m2 every time the build runs.
2016-05-25 16:14:47 +02:00
Manu Sridharan bd9d6d6c62 Move building Maven Central jars to end 2016-05-25 15:34:22 +02:00
Manu Sridharan 71fda78c11 Tweak JDK setting in Travis config 2016-05-25 15:15:51 +02:00
Manu Sridharan c3472ef73b More output to debug maven jar script on Travis 2016-05-25 15:09:51 +02:00
Manu Sridharan 1cf922b927 Build Maven Central jars on Travis 2016-05-25 14:31:17 +02:00
Manu Sridharan 330692ad0e Include files from dat directory in jar 2016-05-25 11:51:50 +02:00
Manu Sridharan 8ac8b3d662 Change versions of Eclipse jars
This plays more nicely with Gradle
2016-05-25 11:51:25 +02:00
Manu Sridharan f73419c343 Script to build maven central jars 2016-05-25 08:12:59 +02:00
Manu Sridharan c549c246fc Small typo fix 2016-05-25 08:12:30 +02:00
Manu Sridharan f47e1a27b8 Add Maven Central build file 2016-05-24 11:59:59 +02:00
Manu Sridharan 8129d960b9 Create new com.ibm.wala.cast.java.ecj project.
The new project only depends on the minimal Eclipse plugins to make the
ECJ frontend work.  Hence, it should be amenable to creating a Maven
Central jar.
2016-05-24 11:39:00 +02:00
Manu Sridharan 94a4c5277f more EJC -> ECJ renaming 2016-05-24 11:17:11 +02:00
Manu Sridharan 29a306f4d0 Add launcher for ECJJavaIRTest 2016-05-24 10:54:51 +02:00
Manu Sridharan 57ff2a9dd5 Rename EJC* -> ECJ*, to match standard acronym 2016-05-24 10:51:58 +02:00
Manu Sridharan bd58bf4515 Remove cast.java dependence on org.eclipse.core 2016-05-18 21:18:52 -07:00
Manu Sridharan 217644ff84 Example driver for ECJ front end
This shows how with ECJ, the JDT source front end can be used from
the command-line (with no running Eclipse instance).
2016-05-18 21:10:59 -07:00
Manu Sridharan c26cddf65b Maven Central build file for wala.cast.java
Work in progress
2016-05-18 21:09:50 -07:00
Manu Sridharan c6e322e205 Remove Polyglot-based Java source front-end 2016-05-18 10:46:19 -07:00
Manu Sridharan 96d9f75660 Stop building Polyglot
Our script for pulling the Polyglot source from Google Code no longer
works.  We may remove Polyglot support itself pretty soon, as it
only supports old Java versions.
2016-05-12 10:01:57 -07:00
Manu Sridharan cd560b3b2b switch version to 1.3.10-SNAPSHOT 2016-05-10 22:53:28 +09:00
Manu Sridharan 158a5deeb0 Version 1.3.9 2016-05-10 21:59:26 +09:00
Manu Sridharan 88df462783 Update ignores 2016-04-03 12:44:32 -07:00
Manu Sridharan 6df8d1b32d Fix compilation in Eclipse Mars
Fixes #98
2016-04-03 12:43:57 -07:00
Julian Dolby e28b97b1ec fix null pointer exception handling tag 2016-03-28 12:56:36 -04:00
Julian Dolby e87b2e5d84 fixes for slicing of field-based CGs 2016-02-14 17:18:21 -05:00
Julian Dolby 970acf10db driver to dump APK IR 2016-02-11 13:49:09 -05:00
Julian Dolby 57a8c7d019 Merge branch 'master' of https://github.com/wala/WALA 2016-02-11 12:09:50 -05:00
Julian Dolby eb7748a745 fixes for slicing of graphs built with the field-based builder 2016-02-11 11:51:39 -05:00
steohan 715b1e86fe Merge pull request #1 from wala/master
Pull from Wala
2016-01-13 02:23:04 +01:00
Stephan Gocht 672876c595 Added Testcases for ExceptionAnalysis and ExceptionAnalysis2EdgeFilter. 2016-01-13 02:07:58 +01:00
Stephan Gocht 2869af24df Bugfixes, code and documentation improvements. 2016-01-13 02:07:11 +01:00
Stephan Gocht 0387bd1591 Removed Warning 2016-01-10 15:34:10 +01:00
Stephan Gocht b75d93cb1c Changed pi policy to only create pi nodes for integer variables. 2016-01-08 14:10:55 +01:00
Stephan Gocht 448c8c5f86 Missing Files for last commit. 2015-12-20 19:35:00 +01:00
Stephan Gocht c3b7f9ffb3 Documentation and Refactoring. 2015-12-20 19:34:40 +01:00
Stephan Gocht 467707701f Added InstructionByIindexMap, to make sureinstructions are identified by
iindex in hash and equals only.
2015-12-20 13:35:51 +01:00
Manu Sridharan a76486ef94 Depend on org.eclipse.e4.ui.workbench optionally
This makes IFDSExplorerExample work with more recent Eclipse versions.
2015-12-16 10:58:40 -08:00
Manu Sridharan 02c9929759 Use more call graph exclusions for Java 1.7 2015-12-16 10:56:49 -08:00
Manu Sridharan e95663e24a Be more robust to broken java_runtime_dir
If java_runtime_dir in wala.properties is invalid, fall back to the
boot class path instead of just failing.
2015-12-16 10:56:09 -08:00
Julian Dolby 46a483f320 language changes 2015-12-15 19:33:59 -05:00
Julian Dolby dc552316b9 language changes 2015-12-15 19:31:04 -05:00
Julian Dolby f02c77ba08 Allow patching call sites for older jvms. Warning: the new
patch-calls option does not work in Java 8, due to verifier changes.
2015-12-15 12:57:50 -05:00
Julian Dolby ad64e958dc changes for language work 2015-12-15 12:53:36 -05:00
Manu Sridharan 0eabfa2d05 Add slicer test
This test relates to a mailing list question from 
Gebrehiwet Biyane Welearegai:

https://groups.google.com/forum/#!topic/wala-sourceforge-net/lS7lyCHfAaw
2015-12-14 10:34:10 -08:00
Manu Sridharan 2f47ffa02b Clarify a comment 2015-12-11 15:50:25 -08:00
Julian Dolby 1936ccd94f changes for language work 2015-12-10 06:59:05 -05:00
Julian Dolby 9267003c5b changes for language and solver work 2015-12-09 17:28:45 -05:00
Julian Dolby ab22d9abb0 enable specialization of source extractor for Web pages 2015-11-30 21:28:40 -05:00
Stephan Gocht fd0d06df5d Added correct handling for this pointer in member methods. 2015-11-30 23:03:28 +01:00
Stephan Gocht bed18b792c Extended exceptionan anlysis with exception filter. 2015-11-30 23:02:40 +01:00
Stephan Gocht 77b1ed71c7 Generalized Type. 2015-11-26 11:03:26 +01:00
Stephan Gocht 79883b3def Completed implementation of basic functionality. 2015-11-25 17:05:51 +01:00
Stephan Gocht c5c4799b35 Added minimalistic implementation of an exceptio analyisis. (Not fully
functional yet.)
2015-11-20 21:19:41 +01:00
Stephan Gocht 3acd97ebfb Fixed assertion fault, in case of multidimensional arrays. 2015-11-15 21:05:39 +01:00
Julian Dolby 2b2543cfbb fixed bugs with switch bytecodes in Dalvik.
ignore exceptions in callgraph construction when they are ignored in
bytecode from Dalvik.
2015-11-13 19:25:23 -05:00
Julian Dolby d010e36923 fix for NOP instructions 2015-11-13 09:57:02 -05:00
Julian Dolby 031ff4e121 use usual test naming convention 2015-11-11 20:55:16 -05:00
Julian Dolby ab16d9bc04 fixes for weird cases with control flow in finally blocks.
code fixes and test that used to crash.
2015-11-11 12:03:08 -05:00
Julian Dolby 876e52c3f8 fixes for dalvik maven packaging 2015-11-06 18:36:03 -05:00
Julian Dolby 9c55f01d99 fixes to creation of jar file by maven 2015-11-06 18:26:01 -05:00
Stephan Gocht dfaa44d111 Added quicksort example, and made larger change as it wasn't as expected
first. This change should improve the results of the analysis.
2015-11-06 18:52:11 +01:00
Stephan Gocht 381cf2d2f1 Fixed a bug, which allowed only usage of phi notes with exactly 2 uses.
(There may be more than 2 uses in a phi note.)
2015-10-26 00:50:01 +01:00
Julian Dolby 849177fa5e changes for new language support 2015-10-25 16:13:07 -04:00
Stephan Gocht 7d7e236fd6 Added test for exception pruning (including example for usage). 2015-10-23 14:56:33 +02:00
Stephan Gocht 851f9b2ef3 Added comments. 2015-10-23 14:56:02 +02:00
Stephan Gocht 65fcc2d5da Fixed a bug causing crash. 2015-10-23 14:55:39 +02:00
Stephan Gocht ec4f5e506a Removed unnecessary generic. 2015-10-23 14:54:49 +02:00
Stephan Gocht 7238f6d1ed Fixed a bug, which was introduced in the previous commit. (Resulted in
infinite recursion.)
2015-10-23 09:48:20 +02:00
Stephan Gocht f8cae1b509 Added Tests and Testdata for array bounds analysis. 2015-10-19 23:20:36 +02:00
Stephan Gocht e85816a986 Fixed getPis method. 2015-10-19 23:15:40 +02:00
Stephan Gocht 4e073e9afe Added new PiPolicy to add pis for all variables used in a conditional
branch.
2015-10-19 23:15:21 +02:00
Achim D. Brucker 6508b75afb Merge branch 'master' of github.com:DASPA/WALA 2015-10-15 11:57:33 +02:00
Achim D. Brucker 5c3e8b6fa5 Configured m2e to ignore not supported lifecycle events. 2015-10-15 11:53:05 +02:00
Julian Dolby 556d8ff043 Eclipse Java Compiler standalone for WALA source front end 2015-10-14 13:41:23 -04:00
Julian Dolby 31e4028a94 adapt to wala changes 2015-10-14 13:36:48 -04:00
Julian Dolby 0265a1c2dc Eclipse Java Compiler as a standalone source code front end 2015-10-14 13:32:34 -04:00
Stephan Gocht 58dd111203 Added classes for exception pruning and adapter for null pointer and
array out of bounds analysis.
2015-10-12 19:52:29 +02:00
Stephan Gocht 9024f19bf6 Added an array out of bounds analysis. 2015-10-12 19:51:14 +02:00
Stephan Gocht f78ef5bcbb Added new class for simpler access to intraprocedural null pointer
analysis.
2015-10-12 19:39:06 +02:00
Manu Sridharan ce10710125 Avoid repeatedly initializing possibleEntryPoints
Added while investigating #88, but this does not fix the problem
2015-10-11 16:12:13 -07:00
Stephan Gocht b32f798ae1 Modified files from earlyer change [1], so no format changes are done.
[1] 52ea4af62c
2015-10-11 19:25:05 +02:00
Julian Dolby d73e07b4c9 fixes for Scala interface to Polyglot-based Java source 2015-10-09 19:05:04 -04:00
Manu Sridharan e46bb81081 Update version to 1.3.9-SNAPSHOT 2015-10-09 12:55:49 -07:00
Manu Sridharan ed5093d6db Properly update version to 1.3.8
Other changes were accidentally committed last time.
2015-10-09 11:06:03 -07:00
Manu Sridharan 077cabc4eb Revert "update version to 1.3.8"
This reverts commit 4aac703ee5.
2015-10-09 11:03:46 -07:00
Manu Sridharan 4aac703ee5 update version to 1.3.8 2015-10-09 10:45:57 -07:00
Michael Herzberg f9dabf04fc Allow overriding of getScriptFromUrl. 2015-10-06 22:44:45 +02:00
Michael Herzberg 8227286b38 Implemented method to retrieve line numbers. 2015-10-06 22:44:16 +02:00
Michael Herzberg 130ac94991 Copy dx.jar from ANDROID_SDK dir. 2015-10-05 23:49:00 +02:00
Michael Herzberg ae9e06a95b Merge remote-tracking branch 'upstream/master' 2015-10-05 22:31:49 +02:00
Julian Dolby 95fde98533 Merge branch 'master' of https://github.com/wala/WALA 2015-09-25 13:42:54 -04:00
Julian Dolby 6c4d0de3c5 clean up for Eclipse/Maven 2015-09-25 13:39:47 -04:00
Manu Sridharan ae2a428394 Fix Ant build file 2015-09-21 10:43:30 -07:00
Julian Dolby 45af0414b7 more attempts to placate annoying ibm jvm 2015-09-18 21:48:13 -04:00
Julian Dolby 3ad0c2009a restructure tests 2015-09-16 13:27:31 -04:00
Julian Dolby 5517371a9b adapt to IField changes 2015-09-16 13:25:53 -04:00
Julian Dolby 26b126203d fix imports; restructure annotations tests 2015-09-16 13:25:21 -04:00
Julian Dolby 13de4a3bd1 add support for generic signatures 2015-09-16 13:23:21 -04:00
Julian Dolby 10e626bbce allow overriding to add operators 2015-09-16 13:22:23 -04:00
Stephan Gocht 6df7c85714 Changed class and construction modifier to public. 2015-09-07 23:11:41 +02:00
Stephan Gocht 2dc6322356 Extracted private class and made it public. 2015-09-07 21:49:03 +02:00
Stephan Gocht 52ea4af62c Added Support for creating pi nodes for more than on variable. 2015-08-19 17:46:58 +02:00
Manu Sridharan b544f0fa61 update mvncentral.xml for Rhino 1.7.6 2015-08-14 15:28:57 -07:00
Julian Dolby 972466d41c switch to tycho 23.1 2015-08-14 13:55:28 -04:00
Julian Dolby 487f6cc150 move to Rhino 1.7.6 2015-08-14 12:27:13 -04:00
Julian Dolby 3ddaa9eaf7 restore EPL headers 2015-08-13 12:34:34 -04:00
Julian Dolby ef9eb441dd Merge branch 'mohrm-master' 2015-08-13 11:27:33 -04:00
Julian Dolby 045537274f merge 2015-08-13 11:26:48 -04:00
Julian Dolby 671bd98977 Java 8 suport enhancements, mostly to model lambdas compiled to
invokedynamic
2015-08-12 15:20:21 -04:00
Julian Dolby f760672215 tests for java 8 default methods 2015-08-09 14:13:38 -04:00
Julian Dolby b1538aece6 Merge branch 'master' of https://github.com/wala/WALA 2015-08-09 13:47:01 -04:00
Julian Dolby 8470091225 Java 8 default methods 2015-08-09 13:46:03 -04:00
Julian Dolby 3f5ce89cb6 finalizer test 2015-08-09 13:43:40 -04:00
Manu Sridharan d47e2cfbde use execution environment to specify JRE 2015-08-06 13:25:55 -07: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
Julian Dolby cb77169101 serialize dynamic callgraph in UTF-8 format, so as to handle Unicode
names in class files
2015-08-04 14:18:43 -04:00
Manu Sridharan 44699a619f Merge pull request #85 from msridhar/remove-eclipse-dep
Remove Eclipse dependence from cast.js(.rhino)
2015-07-31 07:26:25 -07:00
Julian Dolby 223fb8d439 try to be more precise about finalize methods 2015-07-31 09:20:46 -04:00
Manu Sridharan 4c3827bf49 more Maven-related changes 2015-07-30 20:39:26 -07:00
Manu Sridharan 753fc61fb3 remove Eclipse dependence from cast.js.rhino 2015-07-30 19:24:53 -07:00
Manu Sridharan 87d22be3fb Attempt to fix JSDT tests 2015-07-30 16:37:02 -07:00
Manu Sridharan b7ab80734f remove Eclipse dependendence from cast.js 2015-07-30 15:03:45 -07:00
Manu Sridharan 2a55d2e9e9 MVN central build file for com.ibm.wala.cast 2015-07-30 14:06:51 -07:00
Manu Sridharan 8ca3184429 Merge pull request #84 from msridhar/remove-eclipse-dep
Remove com.ibm.wala.cast's dependence on Eclipse
2015-07-30 11:01:13 -07:00
Manu Sridharan 7803787999 remove Bundle-Activator from MANIFEST.MF 2015-07-30 10:13:22 -07:00
Manu Sridharan 942a3d5343 Remove Eclipse dependence from com.ibm.wala.cast
Remove (presumably unused) AstPlugin classes
2015-07-30 10:07:03 -07:00
Manu Sridharan 93ff020285 Remove old package 2015-07-30 09:57:46 -07:00
Martin Mohr 5aae6234e8 give BasicNullaryStatements a toString() method
Before, fixed-point systems containing BasicNullaryStatements
caused crashes when trying to output them (because  toString()
 method of AbstractStatement assumes that there is Right-Hand-Side,
 but BasicNullaryStatements throw an UnsupportedOperationException
 when trying to get them).

Why shouldn't BasicNullaryStatements have a string representation?
2015-07-30 17:19:34 +02:00
Martin Mohr 9b8b323812 make configurable whether we apply an optimized version of hasExceptions() 2015-07-27 18:31:43 +02:00
Martin Mohr 65b9e97ae5 refine hasExceptions(): return true if there are *uncaught* exceptions 2015-07-27 14:17:18 +02:00
Julian Dolby a1159db2f4 switch to (one hopes) a more reliable javacup input file 2015-07-24 23:25:08 -04:00
Julian Dolby 519b98a0ea fixes to model of for ... in ... in JavaScript 2015-07-24 22:48:20 -04:00
Julian Dolby eb24a616f1 clean up 2015-07-24 22:45:25 -04:00
Julian Dolby 563b6ba6aa fixes for for ... in ... form in JavaScript 2015-07-24 22:44:10 -04:00
Julian Dolby 364fe7fa99 make dynamic and static analysis more consistent 2015-07-24 22:42:34 -04:00
Julian Dolby b721a3ceb0 updates to dynamic call graphs to better match static ones 2015-07-10 09:44:01 +02:00
Julian Dolby a6a060ed25 changes for handling of 'callbacks' in dynamic CGs 2015-06-28 17:06:21 -04:00
Martin Mohr 8d143dbf20 remove 'Custom Change' markers 2015-06-25 09:12:37 +02:00
Martin Mohr 0b92907149 Revert "cache for selectors"
This reverts commit 0af7f105ec.
2015-06-25 09:12:37 +02:00
Martin Mohr 620dd15d00 allow comments in exclusion files 2015-06-25 08:59:21 +02:00
Martin Mohr 53852ef2a3 fix dalvik eclipse project build path 2015-06-22 15:54:00 +02:00
Martin Mohr b727348af4 fix plugin build path for dalvik project 2015-06-22 14:20:57 +02:00
Martin Mohr 0d06d7caff com.ibm.wala.dalvik.test: get cup example file more reliably 2015-06-22 10:45:27 +02:00
Martin Mohr 0583450884 fix whitespace 2015-06-22 10:45:26 +02:00
Martin Mohr f4cef8db7a dalvik frontend: set target for SSAGotoInstructions 2015-06-22 10:45:26 +02:00
Juergen Graf bd96807d7c fix bug: npe on control dep computation when exceptions are ignored 2015-06-22 10:45:26 +02:00
Martin Mohr cecd2c950f support multiple intent actions and urls in manifest parser 2015-06-14 23:34:33 -07:00
Martin Mohr f2a4bba83f bugfix in debug output: only take item from worklist if it is not empty 2015-06-14 23:33:43 -07:00
Martin Mohr b66903c8de ignore lib folder of com.ibm.wala.cast project 2015-06-14 23:33:43 -07:00
Martin Mohr 8ac515a452 fix download location of apache commons io lib 2015-06-14 23:33:43 -07:00
Martin Mohr a56eeae51a kill deprecated method together with the last call of it 2015-06-14 23:33:43 -07:00
Martin Mohr 4bc25d3ddf also model outer loops as indefinite instead of infinite 2015-06-14 23:33:18 -07:00
Martin Mohr b378f8c458 custom change: include target in string representation of cond-branch 2015-06-14 23:31:35 -07:00
Martin Mohr 441cc6f279 bugfix in model: close inner loop using a *conditional* goto
This way, the rest of the outer loop (including the jump to the
beginning) is also reached in the control-flow which means that
the outer loop is modelled as a proper loop
2015-06-14 23:31:35 -07:00
Martin Mohr 29779f411a allow adding a conditional branch instruction 2015-06-14 23:31:35 -07:00
Martin Mohr ccb5b02abd do not add self-loops 2015-06-14 23:31:35 -07:00
Martin Mohr cfadf0104c substitute call to deprecated method 2015-06-14 23:31:35 -07:00
Martin Mohr a83ba08980 turn off debug output 2015-06-14 23:31:00 -07:00
Martin Mohr 80fd657675 transcribe non-overwritten reserved slots into "goto next" instructions 2015-06-14 23:31:00 -07:00
Martin Mohr b1c10b642f finish all sections only if a section was entered 2015-06-14 23:31:00 -07:00
Martin Mohr cfa005203a cover corner case of intent or intent's action being null 2015-06-14 23:31:00 -07:00
Martin Mohr 9c4c3507c4 cover corner case of method being null 2015-06-14 23:31:00 -07:00
Juergen Graf e1beb6aa90 add non-recursive dfs solution to compute backedges for large methods 2015-06-14 23:30:41 -07:00
Martin Mohr 3e4af27112 allow resetting the AndroidEntryPointManager - this is rudimentary support for running the android front-end *multiple times within the same VM* 2015-06-14 23:30:41 -07:00
Martin Mohr b5092637c8 improve recognition of intent action 2015-06-14 23:29:27 -07:00
Martin Mohr a5b6490951 fix getNextProgramCounter()
handle the case that the current program counter is free
2015-06-14 23:29:27 -07:00
Martin Mohr 8610ac29c7 allow to retrieve Android Model Class with different cha 2015-06-14 23:29:27 -07:00
Martin Mohr 1acbf4b9f7 preserve holes in instruction array when transcribing method summary
otherwise the iindex fields in the ssa instructions are inconsistent
with their index in the instruction array
2015-06-14 23:29:10 -07:00
Martin Mohr 7e3fb18fc0 BUGFIX: when reusing ssa value numbers, consider the case that an instruction may not have a def 2015-06-14 23:29:10 -07:00
Martin Mohr 1f105dc101 staticalize a method 2015-06-14 23:29:10 -07:00
Martin Mohr b03cd18ada handle case when exclusions are null 2015-06-14 23:29:10 -07:00
Martin Mohr 9e5be48138 only generate return statement if caller and callee are compatible 2015-06-14 23:27:57 -07:00
Martin Mohr 0af7f105ec cache for selectors 2015-06-14 23:27:57 -07:00
Martin Mohr 0af274a1f9 use class hierarchy for preflight-checking 2015-06-14 23:27:57 -07:00
Martin Mohr 86c65f0578 fix some issues of the IntentContextSelector 2015-06-14 23:27:57 -07:00
Martin Mohr 485b02a8e0 instantiate SpecializedInstanstiator only if given class is really special 2015-06-14 23:27:15 -07:00
Achim D. Brucker 06741a014e Updated README.md to reflect that this is a fork and not the main WALA repository. 2015-06-13 11:51:11 +02:00
Achim D. Brucker f879566711 Merge remote-tracking branch 'upstream/master' 2015-06-10 23:58:55 +02:00
Julian Dolby 93a522eecd abandon polyglot for now 2015-06-04 20:40:49 -04:00
Julian Dolby 1b2df793df try removing polyglot from cache 2015-06-04 20:12:01 -04:00
Julian Dolby 5feba2cc2e try removing polyglot from cache 2015-06-04 20:09:41 -04:00
Julian Dolby f269bbbcb5 try more memory 2015-06-04 19:04:43 -04:00
Julian Dolby a2379056d5 Merge branch 'master' of https://github.com/wala/WALA 2015-06-04 17:50:45 -04:00
Julian Dolby 90a98521a1 whitespace 2015-06-04 17:50:24 -04:00
Julian Dolby 31f9f1b0b5 more exclusions
allow 1.8 libs
2015-06-04 15:51:46 -04:00
Julian Dolby 58b7c7324c test for reading java 8 2015-06-04 13:53:25 -04:00
Julian Dolby b34fe4d21f Merge branch 'master' of https://github.com/wala/WALA
Conflicts:
	com.ibm.wala.ide.jsdt.tests/META-INF/MANIFEST.MF
2015-06-02 23:00:32 -04:00
Manu Sridharan 517c12b44a Merge branch 'master' of github.com:wala/WALA 2015-05-31 13:53:12 -07:00
Manu Sridharan 052023581d update version to 1.3.8-SNAPSHOT 2015-05-31 13:53:07 -07:00
Julian Dolby 517de26532 more attempts to make test run on maven 2015-05-30 11:26:28 -04:00
Julian Dolby 975bc8011c more attempts to make test run on maven 2015-05-30 11:25:16 -04:00
Manu Sridharan 23a4268a42 Merge pull request #70 from Sheak90/master
Fixed JUnit launcher of com.ibm.wala.cast.js.test
2015-05-29 23:16:28 -07:00
Achim D. Brucker 7bbb86292d Added profile to pom.xml to allow build on Windows to ignore optional required bundles such as org.eclipse.jdt.launching.macosx. 2015-05-30 00:02:30 +02:00
Manu Sridharan f2f65bfbc5 oops, version should be 1.3.7 2015-05-29 13:20:25 -07:00
Manu Sridharan 894f010ff9 version 1.3.8 2015-05-29 12:20:53 -07:00
Manu Sridharan e17c4a0617 script to change version numbers consistently across files 2015-05-29 12:19:18 -07:00
Manu Sridharan 6e145e3f26 remove other references to $HOME 2015-05-28 12:19:22 -07:00
Manu Sridharan 3e8e8ba427 try using TRAVIS_BUILD_DIR 2015-05-28 11:35:36 -07:00
Manu Sridharan a5d22bafe6 trigger travis build 2015-05-28 10:38:28 -07:00
Manu Sridharan 7ad8700064 update version numbers to 1.3.7-SNAPSHOT everywhere 2015-05-28 10:37:01 -07:00
Lukas Subel 71965a734e Fixed listEntry s.t. files used in tests are accessable 2015-05-27 12:39:52 +02:00
Julian Dolby f1e36c72cb disable test that breaks on Maven. Re-enable by hand for now to run it on Eclipse 2015-05-26 09:09:50 -04:00
Julian Dolby 48711a4e3e Merge branch 'master' of https://github.com/wala/WALA 2015-05-26 08:53:06 -04:00
Julian Dolby 63ec46f67d 1) changes for mobile
a) serializable added for use by Android services
  b) test classes refactored to allow Android variants to use JUnit 3
2) shrike instrumentation now uses java.lang.instrument
  a) refactoring
  b) online variants of call graph tracing
2015-05-25 19:00:51 -04:00
Manu Sridharan 56909ee153 bug fix: add unary and nullary statements to equations set 2015-05-18 19:23:29 -07:00
Manu Sridharan d2b30fd7f0 use Java 7 execution environment 2015-05-18 19:22:41 -07:00
Julian Dolby 125c8fa684 fix dexlib 2015-04-11 10:11:47 -04:00
Julian Dolby c330657fd4 fix dexlib 2015-04-11 10:05:03 -04:00
Julian Dolby 8cd400df6f fix dexlib 2015-04-11 10:01:41 -04:00
Julian Dolby fd98fec401 export dexlib again 2015-04-11 09:59:51 -04:00
Julian Dolby f92450a7d2 new source for dexlib 2015-04-11 09:46:52 -04:00
Julian Dolby 7b604da0b4 changes for mobile tests 2015-04-08 08:26:34 -04:00
Julian Dolby b7cf88e214 mobile tests changes 2015-04-07 19:34:27 -04:00
Julian Dolby 80df82caca hacks for A=ndroid lib tests 2015-04-06 19:19:45 -04:00
Julian Dolby c863d20448 hacks for A=ndroid lib tests 2015-04-06 19:19:19 -04:00
Julian Dolby 776b08aecd rename tests for maven 2015-04-06 18:04:02 -04:00
Julian Dolby d10c758cc3 hacks for jdt tests 2015-04-06 16:11:30 -04:00
Julian Dolby f2351b763a hacks for jdt tests 2015-04-06 15:39:02 -04:00
Julian Dolby 5311b19ba7 logging 2015-04-06 15:11:42 -04:00
Julian Dolby 95f1711280 hacks for jdt tests 2015-04-06 14:41:47 -04:00
Julian Dolby 699ef371bc hacks for jdt tests 2015-04-06 14:29:17 -04:00
Julian Dolby 28b4120690 hacks for jdt tests 2015-04-06 14:28:19 -04:00
Julian Dolby 348c34dd49 hacks for jdt tests 2015-04-06 14:20:04 -04:00
Julian Dolby 0855da7162 hacks for android stuff 2015-04-06 14:02:58 -04:00
Julian Dolby 6947b3e7d9 hacks for android stuff 2015-04-06 13:28:51 -04:00
Julian Dolby cc5f683333 hacks for android stuff 2015-04-06 13:00:14 -04:00
Julian Dolby 405f136694 back to 4.4 2015-04-06 12:18:32 -04:00
Julian Dolby fe4c527358 back to 4.4 2015-04-06 12:04:51 -04:00
Julian Dolby 7d2e5c0731 back to 4.4 2015-04-06 11:31:08 -04:00
Julian Dolby 69a31dab9a back to 4.4 2015-04-06 11:29:18 -04:00
Julian Dolby 63efc2a834 juno stuff 2015-04-06 10:40:06 -04:00
Julian Dolby c8087c8935 juno stuff 2015-04-06 10:27:16 -04:00
Julian Dolby 65edd0071a juno stuff 2015-04-06 10:22:09 -04:00
Julian Dolby eea6b2fc78 newer junit 2015-04-06 10:05:52 -04:00
Julian Dolby c2b62f2ddc newer junit 2015-04-06 10:00:44 -04:00
Julian Dolby 65b62d3f28 junit annoyances 2015-04-06 09:43:52 -04:00
Julian Dolby 7340b54103 new junit 2015-04-06 09:41:35 -04:00
Julian Dolby 0ed1d0cde0 newer junit 2015-04-06 09:37:37 -04:00
Julian Dolby 8128adb70f newer junit 2015-04-06 09:32:52 -04:00
Julian Dolby e633bcfa0f remove 4.4 dep 2015-04-06 08:53:25 -04:00
Julian Dolby ce2fcef132 relax versions 2015-04-06 08:22:46 -04:00
Julian Dolby 5f25042ed0 try e42 2015-04-06 08:21:18 -04:00
Julian Dolby 5f22b65ceb try to see error 2015-04-06 08:18:05 -04:00
Julian Dolby 46ff558ee7 try platform plugins 2015-04-06 08:03:17 -04:00
Julian Dolby fe8cc6966a try generic launching plugin 2015-04-06 07:51:25 -04:00
Julian Dolby d1f7f59dcd remove optional dependency that seems to give trouble 2015-04-06 07:33:22 -04:00
Julian Dolby 268cdf534f hybrid tests 2015-04-05 23:13:09 -04:00
Julian Dolby 5da3cd7df7 hybrid example 2015-04-05 23:02:20 -04:00
Julian Dolby f6a6398b02 remove old useless dx version 2015-04-05 21:55:32 -04:00
Julian Dolby 8b647b25f1 test cleanup 2015-04-05 21:46:31 -04:00
Julian Dolby 22ad339fd9 dalvik test infrastructure 2015-04-05 21:22:55 -04:00
Julian Dolby d85347f231 Merge branch 'master' of https://github.com/wala/WALA 2015-04-05 21:20:03 -04:00
Julian Dolby 0975441a43 changes for hybrid analysis 2015-04-05 21:19:56 -04:00
Manu Sridharan 2590de8608 Merge pull request #65 from collinw/master
Use Arrays.toString() instead of the default array toString() method.
2015-04-02 16:33:33 -07:00
Collin Winter 33d3139667 Use Arrays.toString() instead of the default array toString() method.
The former will include the contents of the array, while the latter
only includes the object's identity.

This will allow WALA to be compiled using Google's error-prone compiler
(https://github.com/google/error-prone).
2015-03-25 19:02:28 -07:00
juliandolby 2f30900523 Merge pull request #64 from msridhar/array_models
Fixes to Array.prototype models
2015-03-25 14:03:32 -04:00
Julian Dolby c5b538eade more metadata 2015-03-24 22:41:42 -04:00
Julian Dolby 7f48ca1de6 missed a change 2015-03-24 22:14:13 -04:00
Julian Dolby 43c37d6d0e fixes to regression tests:
now, for me, code works using e44 with maven
  dalvik tests refactored for mobile version with android dev tools
  IDE tests Eclipse metadata fixed to make e44 work for me
  new android entrypoint to fix failure in new droidbench tests
2015-03-24 21:51:35 -04:00
Manu Sridharan f6167c6f0c add models for reduceRight and filter 2015-03-17 16:47:12 -07:00
Manu Sridharan 42880c6516 handle sparse arrays 2015-03-17 16:31:31 -07:00
Manu Sridharan 21763cc8f2 bug fix 2015-03-17 16:31:15 -07:00
Manu Sridharan 1c07d3bba3 corrected model for Array.prototype.pop
WALA's previous model would always return undefined,
since mutating the Array length would delete the 
relevant value before it was accessed.
2015-03-11 14:10:58 -07:00
Manu Sridharan 41f4209334 Models for Array.prototype.some, every, and reduce 2015-03-10 16:17:39 -07:00
Julian Dolby 1ea7746533 class loader stuff 2015-03-04 21:43:06 -05:00
Julian Dolby 2266eb335a class loader stuff 2015-03-04 20:24:23 -05:00
Julian Dolby 162f76165c class loader stuff 2015-03-04 20:09:24 -05:00
Julian Dolby ac533bc44d class loader stuff 2015-03-04 20:02:49 -05:00
Julian Dolby dcc2f654f4 class loader stuff 2015-03-04 19:54:35 -05:00
Julian Dolby f1cdd0fed7 class loader stuff 2015-03-04 17:58:58 -05:00
Julian Dolby 91f373b098 class loader stuff 2015-03-04 16:43:52 -05:00
Julian Dolby d7941956c0 build the android hacked data jar 2015-03-04 14:36:56 -05:00
Julian Dolby de26484098 java annotations support for dalvik 2015-03-04 13:49:58 -05:00
Julian Dolby 3cd36c904b Merge branch 'master' of https://github.com/wala/WALA 2015-03-04 13:43:03 -05:00
Julian Dolby c9fe747a45 use latest dx.jar 2015-03-04 13:22:36 -05:00
Julian Dolby f3a4225429 use latest dx.jar 2015-03-04 13:19:21 -05:00
Julian Dolby 3e2af86646 android config 2015-03-04 13:13:37 -05:00
Julian Dolby 8dd7409e4d find dx.jar from the build tools 2015-03-04 13:11:28 -05:00
Julian Dolby 755d15a2bb find dx.jar from the build tools 2015-03-04 13:08:26 -05:00
Julian Dolby ef3f7ea8e8 find dx.jar from the build tools 2015-03-04 13:04:26 -05:00
Julian Dolby 9ef044eef7 find dx.jar from the build tools 2015-03-04 13:00:08 -05:00
Julian Dolby 88c8ee6a86 Merge branch 'master' of https://github.com/wala/WALA 2015-03-04 12:15:45 -05:00
Julian Dolby 1ad71f96be experiment: make Android build tools available 2015-03-04 12:10:55 -05:00
Julian Dolby fe02f7341b experiment: make Android tools available 2015-03-04 12:08:45 -05:00
Julian Dolby e5ee7fdfb5 break up droid bench 2015-02-28 21:56:48 -05:00
Julian Dolby 067e2675dc break up droid bench 2015-02-28 21:56:15 -05:00
Julian Dolby cc38735551 break up droid bench 2015-02-28 21:55:03 -05:00
Julian Dolby e46bcdbaf7 break up droid bench 2015-02-28 21:00:30 -05:00
Julian Dolby e8c6a73b3d break up droid bench 2015-02-28 20:59:17 -05:00
Julian Dolby b3ee85c649 break up droid bench 2015-02-28 20:51:38 -05:00
Julian Dolby 21a3f0436b break up droid bench 2015-02-28 20:45:17 -05:00
Julian Dolby ae6a3c72ba break up droid bench 2015-02-28 20:33:27 -05:00
Julian Dolby cf48e9402f break up droid bench 2015-02-28 20:24:08 -05:00
Julian Dolby 61ae42bf0a break up droid bench 2015-02-28 20:13:43 -05:00
Julian Dolby 51cc1b29a5 break up droid bench 2015-02-28 10:02:48 -05:00
Julian Dolby f40a44747d ignore for now; break up test to avoid time limit 2015-02-27 23:29:47 -05:00
Julian Dolby d3a36edcb7 try another path for travis 2015-02-27 23:04:19 -05:00
Julian Dolby 1816ee9744 try another path for travis 2015-02-27 23:03:56 -05:00
Julian Dolby 518783d200 path for travis 2015-02-27 22:44:59 -05:00
Julian Dolby 140ed24aae path for travis 2015-02-27 22:29:18 -05:00
Julian Dolby af2fd1bf7d fix yaml syntax 2015-02-27 22:13:22 -05:00
Julian Dolby c6e86b7d83 save DroidBench in cache 2015-02-27 21:52:58 -05:00
Julian Dolby f46fa39664 echo droid bench 2015-02-27 21:51:39 -05:00
Julian Dolby 5f3676e3c3 reduce printing 2015-02-27 21:42:07 -05:00
Julian Dolby 15a81a4aef maven issuesø 2015-02-27 21:34:49 -05:00
Julian Dolby 57ac9646c0 handler type 2015-02-27 21:19:43 -05:00
Julian Dolby 52deb04696 adapt to latest DroidBench 2015-02-27 21:08:37 -05:00
Julian Dolby 1f49ce4715 extensive exclusions for Android 2015-02-27 21:05:48 -05:00
Julian Dolby 6a8b2bb1f9 catch handler entry points 2015-02-27 21:04:45 -05:00
Julian Dolby 68fc0b94e5 ignore droidbench for now until latest version works 2015-02-26 22:49:36 -05:00
Julian Dolby 00afd2d63a substitute Android libs when needed 2015-02-26 22:12:02 -05:00
Julian Dolby a96750ca9a substitute Android libs when needed 2015-02-26 22:00:04 -05:00
Julian Dolby 22f4591113 new DroidBench apk finding 2015-02-26 19:41:33 -05:00
Julian Dolby f918575014 new DroidBench apk finding 2015-02-26 19:38:50 -05:00
Julian Dolby 485cce8826 new DroidBench location checks 2015-02-26 19:22:23 -05:00
Julian Dolby 7325c331ce new default for DroidBench location checks 2015-02-26 19:07:37 -05:00
Julian Dolby d858aa7cc1 new default for DroidBench location 2015-02-26 18:06:01 -05:00
Julian Dolby 618fb08708 fix 2015-02-26 18:00:23 -05:00
Julian Dolby 60656852e3 fix 2015-02-26 17:59:30 -05:00
Julian Dolby a9f3cb6df6 new default for DroidBench location 2015-02-26 17:57:10 -05:00
Julian Dolby a2acff0d15 new default for DroidBench location 2015-02-26 17:56:42 -05:00
Julian Dolby 7f3f8df893 new default for DroidBench location 2015-02-26 17:47:02 -05:00
Julian Dolby e9ed756eba new default for DroidBench location 2015-02-26 17:39:19 -05:00
Julian Dolby 4c3f10c30a (try to) fix no android libs 2015-02-26 16:29:49 -05:00
Julian Dolby da5ddee139 (try to) fix runtime path 2015-02-26 15:51:03 -05:00
Julian Dolby 8c12af20ab try old bytecode for dx 1.7 2015-02-26 15:22:22 -05:00
Julian Dolby c466467116 give up on tests for now 2015-02-26 15:14:13 -05:00
Julian Dolby 5d88acf0a5 report droid bench root 2015-02-26 14:45:08 -05:00
Julian Dolby 24ce8dc4de try tp find dx for test 2015-02-26 14:24:58 -05:00
Julian Dolby 4f1288a1e2 echo root 2015-02-26 13:33:36 -05:00
Julian Dolby 5d263e4f3c skip tests if no android libs 2015-02-26 13:28:09 -05:00
Julian Dolby 9f6d3623ca try to get droidbench 2015-02-26 13:07:56 -05:00
Julian Dolby 1b0ed09144 fetch needed test data 2015-02-26 12:40:19 -05:00
Julian Dolby 74bcab9f1e run ant 2015-02-26 12:12:27 -05:00
Julian Dolby e4ed9d1b4f file map 2015-02-26 11:50:41 -05:00
Julian Dolby c78cd7006b make sure lib dir exists 2015-02-26 11:39:54 -05:00
Julian Dolby b2c2a2d9e3 getch commons stuff from maven 2015-02-26 11:24:47 -05:00
Julian Dolby 6f78c58226 merge 2015-02-26 09:39:53 -05:00
Julian Dolby 5cc870dd77 fixes to Dalvik support, and work on running Dalvik tests on Travis 2015-02-26 09:34:03 -05:00
Manu Sridharan cef054a29a better cache directory for ocaml 2014-12-23 13:48:46 -08:00
Manu Sridharan 3864bf20ac cache ocaml download 2014-12-23 12:54:32 -08:00
Manu Sridharan 74cbc869ef try caching more stuff 2014-12-23 12:50:44 -08:00
Manu Sridharan 7c44097ee6 try enabling Maven caching for faster Travis builds 2014-12-23 11:51:17 -08:00
Manu Sridharan c447ae9640 Fix compile error in com.ibm.wala.dalvik.test and set up Travis builds 2014-12-23 11:46:09 -08:00
Julian Dolby 4676c4f4d4 bug fix for translation of do loops using a goto 2014-12-19 11:16:00 -05:00
Manu Sridharan 868120cec6 Merge branch 'master' of github.com:wala/WALA 2014-12-17 10:21:08 -08:00
Manu Sridharan d3ff50e14c add 'sudo: false' to enable faster Travis CI builds 2014-12-17 10:21:00 -08:00
Julian Dolby 096e2f796f 1) new support for function.prototype.apply in field-based CGs
2) fixes to Dalvik bytecode reader
3) fixes to Shrike writing Java 7 byte code
2014-12-11 21:48:23 -05:00
Julian Dolby 6aa3646849 Merge branch 'master' of https://github.com/wala/WALA 2014-12-02 20:36:49 -05:00
Manu Sridharan b2544f6f4f Merge branch 'master' of github.com:wala/WALA 2014-12-02 13:14:44 -08:00
Manu Sridharan 1a50959ed1 Restore README.md
We should make this more informative at some point.
2014-12-02 13:14:26 -08:00
Julian Dolby dc4b23f844 Merge branch 'master' of https://github.com/wala/WALA 2014-11-25 19:15:21 -05:00
Manu Sridharan 27780f8ab5 Merge pull request #63 from cos/filter-to-predicate
Filter to Predicate
2014-11-25 16:01:27 -08:00
Cosmin Radoi 64febed32d fix 2014-11-25 13:51:00 -06:00
Cosmin Radoi a09c9f6eeb fix: remove import 2014-11-25 13:43:37 -06:00
Cosmin Radoi 853b5fc37a replace Filter with Predicate 2014-11-25 13:23:47 -06:00
Julian Dolby 88c376b6de Merge branch 'master' of https://github.com/wala/WALA 2014-11-24 17:56:44 -05:00
Julian Dolby 2a8ac2e504 merge 2014-11-24 17:56:41 -05:00
Manu Sridharan b461107837 Fix compile error, and compile scandroid in Maven build 2014-11-24 14:37:46 -08:00
Julian Dolby e4b113d33f Merge branch 'master' of https://github.com/wala/WALA 2014-11-24 11:21:23 -05:00
Julian Dolby 1fd4cadc17 more work on field-based pointer analysis 2014-11-24 11:20:13 -05:00
Manu Sridharan 05899aa774 Merge pull request #62 from aaandrewww/upstream
Off by one error in toString, the last node is at index maxNumber-1.
2014-11-20 10:57:12 -08:00
Andrew Johnson 22b0643c97 Off by one error in toString, the last node is at index maxNumber-1. 2014-11-20 11:56:30 -05:00
Julian Dolby e14a5b4c08 try -noverify to silence travis ci errors 2014-11-18 23:21:58 -05:00
Julian Dolby 7d2bd5f6b4 more testing of field-based pointer analysis 2014-11-18 22:38:54 -05:00
Julian Dolby bf7dbe6359 misc fixes 2014-11-18 22:37:51 -05:00
Julian Dolby 4bc7d12191 more dalvik tests 2014-11-18 22:36:01 -05:00
Julian Dolby 97920a4ab9 fixes for reading core libraries from dex 2014-11-18 22:34:42 -05:00
Julian Dolby 1a4757cf10 add option to allow getMethodto be handled only for user code. a
scalability compromise.
2014-11-18 22:30:47 -05:00
Julian Dolby d9bf9906ca model prototypes in field-based pointer analysis 2014-11-18 22:27:25 -05:00
Manu Sridharan f5f992035a more build files for maven central jars 2014-11-13 21:16:11 -08:00
Manu Sridharan 4a67dacfd8 Merge pull request #59 from cos/ssa-equals-based-on-id
`SSAInstruction` equals based on its `iindex`
2014-11-11 20:02:13 -08:00
Julian Dolby 97c368f247 relax ant version for travis 2014-11-11 20:17:35 -05:00
Julian Dolby 71f16d4f1b try not using URLClassLoader 2014-11-11 20:03:09 -05:00
Cosmin Radoi e2dce7be00 SSAInstruction equals based on iindex 2014-11-10 19:40:45 -06:00
Cosmin Radoi a97df8ceec test revealing SSA cache problem 2014-11-10 11:59:06 -06:00
Julian Dolby 339de954ea add global to field-based pointer analysis 2014-11-04 21:33:22 -05:00
Julian Dolby afb113efb9 refactor code for reuse 2014-10-30 21:15:49 -04:00
Julian Dolby 68ad4dbba6 first cut at heap graph for field-based pointer analyais 2014-10-30 21:14:12 -04:00
Julian Dolby 4e9a38537c another test of field-based pointer analysis 2014-10-29 11:15:57 -04:00
Julian Dolby 6f1ab8d0b5 add global abstract object to set of all instance keys 2014-10-29 08:52:57 -04:00
Julian Dolby f4de822fbf fixes for field-based pointer analysis and callgraph construction 2014-10-28 16:09:32 -04:00
Manu Sridharan a762e17db5 build file to deploy jars to Maven Central 2014-10-27 16:19:17 -07:00
Julian Dolby 5137760580 fixes to field-based pointer analysis notion of all instance keys.
filter for only those actually present in the CG
2014-10-22 11:27:48 -04:00
Julian Dolby 981fc9a4a1 fix duplicate function name.
ø
2014-10-22 11:26:31 -04:00
Julian Dolby 8f0f64f5fa add missing file 2014-10-19 23:14:36 -04:00
Julian Dolby e95e4589c2 fix CI issues 2014-10-19 23:01:22 -04:00
Julian Dolby 1bb7610011 work toward pointer analysis based on the flowgraph from field-based
call graph builder
2014-10-19 22:44:03 -04:00
Julian Dolby 019425c0e2 try to revert code to fix error with Java7 stackmaps only manifesting on Travis, not on my laptop 2014-10-15 16:30:51 +09: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 d949561e39 target for luna 2014-10-10 17:58:42 -04:00
Julian Dolby eae42a6b0a new maven target for eclipse luna (4.4) 2014-10-10 17:57:40 -04:00
Julian Dolby ef2e2c5ade adapt to eclipse luna 2014-10-10 17:57:03 -04:00
Julian Dolby dea583108a Merge branch 'master' of https://github.com/wala/WALA 2014-10-10 17:49:47 -04:00
Julian Dolby 6bf7ec63b6 changes for eclipse luna 2014-10-10 17:49:42 -04:00
Julian Dolby e3dfc5afe5 fixes for ir generation 2014-10-10 17:48:37 -04:00
Julian Dolby 0e55cd2eec adapt to eclipse luna 2014-10-10 17:47:50 -04:00
Julian Dolby 63232e4a02 further work on geberating stack maps 2014-10-10 17:46:56 -04:00
Julian Dolby 4e52c00a4b re-enable assertion 2014-10-10 17:44:06 -04:00
Manu Sridharan 74d5225e16 update maven scripts to build com.ibm.wala.dalvik 2014-10-10 11:56:47 -07:00
Julian Dolby f4f6f06d93 remove use-split-verifier hack 2014-10-06 19:31:18 -04:00
Julian Dolby 14c9c96515 merge of java 7 changes.
fixes for Dalvik commit.
2014-10-06 17:41:58 -04:00
Julian Dolby 6c47da8091 Merge branch 'master' of https://github.com/wala/WALA
Conflicts:
	com.ibm.wala.core.tests/src/com/ibm/wala/core/tests/shrike/DynamicCallGraphTestBase.java
	com.ibm.wala.ide.jdt.test/launchers/JDTJava15IRTests.launch
2014-10-06 15:43:42 -04:00
Julian Dolby 36709b9d1a java 7 support, with much pain for stack maps :) 2014-10-06 15:34:16 -04:00
Julian Dolby df38dade70 revert java_cup version 2014-10-01 22:11:35 -04:00
Julian Dolby a1bc84356d scandriod merge 2014-10-01 21:32:36 -04:00
Julian Dolby 774be73672 Merge https://github.com/jgf/wala-mirror 2014-09-11 10:43:13 -04:00
Manu Sridharan c006dbcdd4 fix Shrike to depend on Java 7 2014-08-28 10:17:03 -07:00
Julian Dolby 9c43798c37 add missing file 2014-08-08 08:44:52 -04:00
Julian Dolby 0ea26e572c remove debugging file
Former-commit-id: a4284ca571047d1e5e02fa5d142680a59993fe54
2014-08-08 08:15:55 -04:00
Julian Dolby 26f5254e3e more support for Java 7:
analysis now understands and propagates MethodHandle objects
  fixes to Shrike InvokeDynamic instruction


Former-commit-id: fb826f124423bcbca08f729cee1794fbda711d16
2014-08-07 16:02:48 -04:00
Julian Dolby 53af910339 make return type more precise 2014-08-07 15:43:29 -04:00
Juergen Graf b8df435af2 fix type parameters of node decorator in dalvik frontend 2014-08-01 18:13:44 +02:00
Martin Mohr 32e776fa15 various fixes in natives_no_model.xml
* add type info in readBytes/writeBytes
* add summary for writeBytes with three parameters
2014-08-01 12:46:33 +02:00
Martin Mohr d762293ba1 support the addition of type information for element in aaload/aastore
fall back to java.lang.Object if no type is given
2014-08-01 12:46:33 +02:00
Juergen Graf a13c0df9bd cleanup in dalvik frontend related files 2014-08-01 12:32:22 +02:00
Juergen Graf c05415720e remove custom change markers for code that will be merged to main branch 2014-08-01 12:27:22 +02:00
Juergen Graf 7769c5b126 minor changes: remove debug code and sync with main branch 2014-08-01 12:27:21 +02: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 7ad38161b1 remove dependency from slf4j logger in wala.core project 2014-07-30 15:44:17 +02:00
Juergen Graf 8f6ec6bc54 cleanup 2014-07-30 15:05:15 +02:00
Juergen Graf 357ac26dee fix bugs with instruction index of javascript ssa instructions 2014-07-29 19:46:24 +02:00
Juergen Graf ccc2cf1506 small cleanup in wala.cast 2014-07-29 19:45:24 +02:00
Juergen Graf 60228a8c0d cleanup ssa instructions in wala.core 2014-07-29 19:43:58 +02:00
Juergen Graf 21b5b417b4 ignore more generated files 2014-07-29 19:41:23 +02:00
Juergen Graf 6f8aee80c6 Merge branch 'wala' into master 2014-07-28 17:09:02 +02:00
Julian Dolby 2cbd5e7985 make class abstract to stop it being run 2014-07-11 12:18:23 -04:00
Julian Dolby 3910608d60 JavaScript slicer support 2014-07-11 11:55:02 -04:00
Julian Dolby 02fdb60519 use cancel message 2014-07-11 11:33:11 -04:00
Juergen Graf 40d5906e48 more shortcuts in OrdinalSet.equals 2014-07-10 17:28:54 +02:00
Julian Dolby dd3124479e allow control flow in induced cfgs, and various related fixes 2014-07-08 14:44:06 -04:00
Julian Dolby d6ffcdc3bb more checking 2014-07-08 14:41:28 -04:00
Julian Dolby df0c94f718 string concat function 2014-07-08 14:39:38 -04:00
Martin Mohr d5e32d6636 model some native methods of class System 2014-07-07 20:58:21 +02:00
Manu Sridharan beb3948df9 adjust comments 2014-07-05 08:26:39 -07:00
Julian Dolby 5c0285c410 fixes to source variable name tracking, and new test to verify fix 2014-07-01 21:23:52 +02:00
Julian Dolby 861bf48c7f remove hard-coded refs to /tmp 2014-06-29 15:07:09 +02:00
Manu Sridharan f33b4d029d another Travis fix 2014-06-26 17:52:58 -07:00
Manu Sridharan b28ce864ae disable some long-running tests on Travis 2014-06-26 17:27:53 -07:00
Manu Sridharan fe9bdeb0d6 Merge pull request #51 from michaelheilmann/development
Add and enable GetMethod context, interpreter and selector and the associated test, make NodeDecorator generic.
2014-06-26 11:38:30 -07:00
Michael Heilmann ea40719069 Merge branch 'master' of https://github.com/wala/WALA into development 2014-06-26 17:52:47 +02:00
Michael Heilmann 0bb5e6998e Remove redundant casts and imports, improve doc comments 2014-06-26 17:51:26 +02:00
Julian Dolby 14f535e1d1 new tests 2014-06-26 11:12:44 -04:00
Julian Dolby bdea38f6bc remove some printing 2014-06-26 11:11:00 -04:00
Julian Dolby 88487d55da expose matcher to allow specialization 2014-06-26 11:07:31 -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 32f8672068 add actual call to code 2014-06-26 11:00:43 -04:00
Julian Dolby dbda8aab9e test for scoping issue 2014-06-26 11:00:18 -04:00
Julian Dolby 87c42b61d6 toString methods 2014-06-26 10:57:48 -04:00
Julian Dolby 4aefbecb8e fix for JavaScript crash 2014-06-26 10:57:08 -04:00
Manu Sridharan 8e33a70c91 Merge pull request #53 from aaandrewww/master
Fix bug in ClassHierarchy.getLeastCommonSuperClass and imprecision in type inference
2014-06-22 12:08:59 -07:00
Manu Sridharan 19918ba55d Merge pull request #55 from wondee/master
Fixed JavaDoc Warnings in AbstractIntStackMachine and SSABuilder
2014-06-21 06:50:07 -07:00
markus ec2d2e9c9c fixed JavaDoc warnings 2014-06-20 10:31:27 +02:00
markus 50c9c4a406 fixed JavaDoc warnings 2014-06-20 10:27:05 +02:00
sjfink a739a71c6a make Drainer class protected 2014-06-05 09:01:50 -04:00
Martin Mohr e6e6fc4159 bugfix (provided by E.Derr): left-shift literal of *HIGH_16 constants 2014-06-02 17:06:07 +02:00
Julian Dolby fc07a27806 for now, comment out test that seems to die with a timeout on Travis CI 2014-05-28 16:42:00 -04:00
Julian Dolby eaca036730 fix build info for maven 2014-05-28 15:11:09 -04:00
Julian Dolby 9444d24f4c put commons-io-2.4 in more places 2014-05-28 14:17:55 -04:00
Julian Dolby 7227f1fcb6 use commons io library 2014-05-28 14:01:31 -04:00
Julian Dolby 6538514b86 use commons io library 2014-05-28 13:52:40 -04:00
Julian Dolby c916e41c7a tweaks to models 2014-05-28 13:36:07 -04:00
Julian Dolby 4469e06514 handle more cases with constructors 2014-05-28 13:35:40 -04:00
Julian Dolby c179b02238 split constructor logic out of target selector, so that it can be reused
more flexibly in the field-based builders
2014-05-28 13:35:11 -04:00
Julian Dolby dcfa05d922 ignore generated variables in hack for window state 2014-05-28 13:34:25 -04:00
Julian Dolby 50373e122d 1) handle files with byte order marks
2) ignore code in comment blocks
2014-05-28 13:33:49 -04:00
Julian Dolby a5a80e7848 heurisitics to make readable names for anonymous functions 2014-05-28 13:32:55 -04:00
Julian Dolby 6765d84acb more tests for field-based call graphs 2014-05-28 13:32:24 -04:00
Julian Dolby af63719749 more testing for field-based callgraphs 2014-05-28 13:31:56 -04:00
Julian Dolby 41b32561dd tests to compare with field based 2014-05-28 13:31:29 -04:00
Julian Dolby 97f5c88b5e tests for field based 2014-05-28 13:31:05 -04:00
Julian Dolby ae595088a3 adapt to field-based api changes 2014-05-28 13:30:34 -04:00
Andrew Johnson be4e805dc4 Merge remote-tracking branch 'wala/master' 2014-05-22 00:40:20 -04:00
Andrew Johnson c3202533f7 Fixing bug in ClassHierarchy.getLeastCommonSuperclass
If C1 extends C2 extends C3 getLeastCommonSuperClass(C1,C2) would give C3 instead of C2
2014-05-21 23:28:11 -04:00
Juergen Graf 5a6f6c88e9 Merge branch 'wala' into master 2014-05-21 12:49:46 +02:00
Juergen Graf a35d03bed6 fix wala.core testcases 2014-05-20 22:32:20 +02: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
Manu Sridharan 931030ddde Merge pull request #52 from sblackshear/master
Check class of parent variable directly rather than using instanceof che...
2014-05-20 12:26:17 -07:00
Juergen Graf fad9e87654 cleanup - organize imports and remove unused code 2014-05-20 19:56:59 +02:00
Juergen Graf 9c41990d73 adapt android part to new pointer analysis interface 2014-05-20 19:56:31 +02:00
Juergen Graf ef4513d377 revert PointerAnalysis hack that makes containsAny() and contains() methods in OrdinalSet unusable 2014-05-20 19:52:01 +02:00
Sam Blackshear 0fba08e581 adding comment explaining why instanceof check was replaced 2014-05-20 11:50:40 -06: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
Sam Blackshear fd47590634 Check class of parent variable directly rather than using instanceof check. Needed to get correct behavior for subclasses of ClassHierarchyMethodTargetSelector 2014-05-20 09:30:54 -06:00
Michael Heilmann 080fc8253e Merge branch 'master' of https://github.com/wala/WALA into development 2014-05-20 13:18:52 +02:00
Michael Heilmann efdd337dee add and enable GetMethod context, interpreter and selector and associated unit tests 2014-05-20 13:12:06 +02:00
Michael Heilmann 45fe53a8bf make NodeDecorator generic 2014-05-20 13:12:03 +02:00
Michael Heilmann de1b61db5e using theirs 2014-05-20 13:12:01 +02:00
Julian Dolby a00b4ae47b bug fixes for source buffers when the source files is all on a single
line
2014-05-20 13:11:58 +02:00
Julian Dolby 7c0de83e74 move to Reader API to help with annoying /r/n issues is source mapping 2014-05-20 13:11:55 +02:00
Julian Dolby 9c1873d25a fix for annyoing \r\n newline issues in text from html files 2014-05-20 13:11:52 +02:00
Julian Dolby d92175e098 new helper method 2014-05-20 13:11:49 +02:00
Manu Sridharan dddd830d14 synchronize methods. Fixes #43 2014-05-20 13:11:47 +02:00
Michael Heilmann 68efae8b58 using theirs 2014-05-20 13:11:44 +02:00
Manu Sridharan 05488894a4 fix compile errors for com.ibm.wala.core 2014-05-20 13:11:41 +02:00
Julian Dolby 04e1fb9d72 require 1.7 SE 2014-05-20 13:11:38 +02:00
Julian Dolby 093c5c96de uuse PrinterWriter; make DOM model optional 2014-05-20 13:11:35 +02:00
Julian Dolby fe675ba51f bug fix for finding primitive objects 2014-05-20 13:11:33 +02:00
Julian Dolby e5303a7167 1.6 SE 2014-05-20 13:11:30 +02:00
Julian Dolby 9b7ceb2032 implemented some more featutres. 2014-05-20 13:11:27 +02:00
Julian Dolby 6673f18db1 static type for inverter of known numbered graph 2014-05-20 13:11:24 +02:00
Julian Dolby a5d88e7c59 fix. not sure why i do not see this failure when running the test on my laptop 2014-05-20 13:11:21 +02:00
Julian Dolby 3e55f0b370 new graph implementation for incremental graph extension 2014-05-20 13:11:19 +02:00
Julian Dolby 50c4ae2faa try new way to find classpath entries for travis ci 2014-05-20 13:11:16 +02:00
Julian Dolby 5b22c3dba4 avoid running on travis for now 2014-05-20 13:11:12 +02:00
Julian Dolby d0f099edb6 try to find jar file for travis tests 2014-05-20 13:11:07 +02:00
Julian Dolby eb8f94c61c try to find jar file for travis tests 2014-05-20 13:11:05 +02:00
Julian Dolby 27adad8a04 constant instructions for MethodHandles 2014-05-20 13:11:02 +02:00
Julian Dolby 732b50d7e5 allow access in subclasses 2014-05-20 13:11:00 +02:00
Julian Dolby a2f4f3b238 type in CAst var decls 2014-05-20 13:10:57 +02:00
Julian Dolby 8f376ffe71 rename dynamic cg test 2014-05-20 13:10:54 +02:00
Julian Dolby 572d3ba6a2 some minimal support for Java 7 constant pool entries 2014-05-20 13:10:51 +02:00
Julian Dolby 6511d6acc3 move java 7 dependent code to core, so util works with java 6 2014-05-20 13:10:49 +02:00
Julian Dolby 871ddbf2ce type-o 2014-05-20 13:10:46 +02:00
sjfink a22c550398 fix spelling errors 2014-05-20 13:10:44 +02:00
Julian Dolby b8154bf2d9 slight generalization of the temporary file support 2014-05-20 13:10:41 +02:00
Julian Dolby 8e1ab52381 add types left out of commit 2014-05-20 13:10:39 +02:00
Julian Dolby 654ffe921d add type left out of commit 2014-05-20 13:10:36 +02:00
Julian Dolby 5228cacd43 adapt to type changes 2014-05-20 13:10:33 +02:00
Julian Dolby 675db79ef2 magic tycho compile option (thanks to a post by Jan Rosczak on dev.eclipse.org) 2014-05-20 13:10:30 +02:00
Julian Dolby 01e945a085 compile 1.7 2014-05-20 13:10:27 +02:00
Julian Dolby 5c45dde3d8 new progress monitor functionality to handle memory limitation 2014-05-20 13:10:25 +02:00
Julian Dolby dbd9c60d4f type generalization 2014-05-20 13:10:22 +02:00
Julian Dolby 0cb23266c9 adaot to type generalization 2014-05-20 13:10:18 +02:00
Julian Dolby 78b94525bb final class 2014-05-20 13:10:12 +02:00
Julian Dolby ad28eabb27 use java functionality to handle urls 2014-05-20 13:10:09 +02:00
Julian Dolby 8a2434b138 flow graph handles some flow through the arguments array. also a fake
'pointer analysis' is constructed using the flow graph.
2014-05-20 13:10:06 +02:00
Julian Dolby b0bc00e276 type generalization for mutable mappings 2014-05-20 13:10:03 +02:00
Julian Dolby d962543b87 allow filtering to express subtypes 2014-05-20 13:10:01 +02:00
Julian Dolby e8487ff294 pointer analysis simulation for field-based CGs 2014-05-20 13:09:58 +02:00
Julian Dolby d4cd7c23f9 new timeout mechanism 2014-05-20 13:09:55 +02:00
Julian Dolby ea7bcebf92 new timeout mechanism 2014-05-20 13:09:53 +02:00
Julian Dolby b2c5c81b5f new timeout mechanism 2014-05-20 13:09:50 +02:00
Julian Dolby 62d6021d42 more tests 2014-05-20 13:09:47 +02:00
Julian Dolby 6bea5ef845 use new timeout mechanism 2014-05-20 13:09:40 +02:00
Julian Dolby d7fe1cc449 ignore debugger token 2014-05-20 13:09:37 +02:00
Julian Dolby 54e7b217bd trivial final modifier 2014-05-20 13:09:33 +02:00
Julian Dolby e6156e7abd find arguments array vns 2014-05-20 13:09:30 +02:00
Julian Dolby cab44f0cae propagate source names in prototype lookups 2014-05-20 13:09:27 +02:00
Julian Dolby 8921a8cb71 allow specialization of source name map generation 2014-05-20 13:09:24 +02:00
Julian Dolby e4d8380dc8 a couple of wrappers 2014-05-20 13:09:21 +02:00
Julian Dolby 51ea9dee0e test new mechanisms 2014-05-20 13:09:19 +02:00
Julian Dolby c20b59013e threading support 2014-05-20 13:09:16 +02:00
Julian Dolby 2750f8e67b 1) use less verbose instrumentation to reduce problems with methods
getting too big
2) handle issues with exceptional control flow not being followed
properly sometimes
2014-05-20 13:09:13 +02:00
Julian Dolby e788a94b06 fix missing parentheses in test to fix null pointer crash 2014-05-20 13:09:10 +02:00
Julian Dolby 837cb5aee5 1) compress dumped call graph edges
2) make instrumentor preserve the names of jar entries and classes as
they are input, rather than recomputing class names when writing the
output jar.  This usually makes no difference, but can preserve broken
structures when the input jar file has mismatches between class names
and its entry names.
2014-05-20 13:09:07 +02:00
Julian Dolby c4a04d7eec more detail in assertion 2014-05-20 13:09:04 +02:00
Julian Dolby a6315f8a62 more detail in assertion 2014-05-20 13:09:01 +02:00
Sam Blackshear 4b7852472d Update SSAConditionalBranchInstruction.java
Changing SSAConditionalInstruction.isObjectComparison(): previous definition returns true for comparisons of Primordial scope objects, but false for Application scope objects. The update version returns true in both cases
2014-05-20 13:08:59 +02:00
sjfink 6a835c908e use a more precise (covariant) return type for BitVectorIntSet.intersection 2014-05-20 13:08:56 +02:00
Michael Heilmann 63ed63e7fa add test for GetMethod context, interpreter and selector 2014-05-20 13:08:32 +02:00
Michael Heilmann f3dac38bc9 remove empty package 2014-05-20 12:49:58 +02:00
Michael Heilmann d1f6564d23 fix doc comments 2014-05-20 12:49:56 +02:00
Michael Heilmann 349a8f8355 move GetMethod context, interpreter and selector into appropriate package, fix copyright notice 2014-05-20 12:49:53 +02:00
Michael Heilmann 525c203a8b improve doc comments 2014-05-20 12:49:45 +02:00
Michael Heilmann 6c5ef65d5f commit GetMethod context, interpreter and selector 2014-05-20 12:49:23 +02:00
Andrew Johnson b29bc2dac0 Fix imprecision in type inference when merging a point array type and cone array type
In TypeInference when merging a PointType with a ConeType it is safe to return the cone type if
the underlying types are the same. Previously, if an array cone type and array point type were
merged this would result in a java.lang.Object even when the two arrays had the same base type.
Checking for equality first may also save a few cycles for reference types since the
isSubclass check is no longer performed for identical types.
2014-05-19 22:02:45 -04:00
Juergen Graf 8b1fe5678a original wala is at github:/wala/WALA fix old reference 2014-05-19 19:04:05 +02:00
Juergen Graf 42702aba15 export android model classes to other projects 2014-05-19 15:42:35 +02:00
Juergen Graf d95e318234 Merge android specific changes from Tobias Blaschke into main branch. 2014-05-19 13:37:15 +02:00
Juergen Graf cf9d623b40 change to compile in eclipse - move files from util to core due to dependencies 2014-05-19 13:24:47 +02:00
Manu Sridharan aeacbe9f3b Merge pull request #46 from msridhar/fix-45
Update AbstractNestedJarFileModule.java
2014-05-16 11:00:43 -07:00
Manu Sridharan fee72dfb66 Update AbstractNestedJarFileModule.java
Fixes #45
2014-05-16 10:30:05 -07:00
Martin Mohr c6cb700804 model for a native method SocketInputStream 2014-05-16 15:36:55 +02:00
Martin Mohr a6917e46ad Summary of FileOutputStream.writeBytes: simulate reading from array and writing to outside ('real world') 2014-05-16 15:19:21 +02:00
Martin Mohr 671bbcec01 Method Summaries: add support for reading array load instructions from XML 2014-05-16 15:19:21 +02:00
Martin Mohr 72a0b70e1c model for FileOutputStream.writeBytes 2014-05-16 15:19:21 +02:00
Martin Mohr 51b28a45b6 let FileInputStream.readBytes() modify the given array 2014-05-16 15:18:02 +02:00
Juergen Graf 7c80cd3c97 allow a default method state to be injected into the interprocedural exception analysis 2014-05-06 23:55:49 +02:00
Juergen Graf cc5162b95f remove some compiler warnings in nullpointer analysis 2014-05-06 23:55:49 +02:00
Juergen Graf 00a9b03389 always compute exception pruned cfg, not only when standard analysis was successful 2014-05-06 23:53:18 +02:00
Julian Dolby 91fe95c05d classpath file. i have no idea where it went 2014-04-30 10:13:10 -04:00
Julian Dolby 038a39dbf5 bug fixes for source buffers when the source files is all on a single
line
2014-04-29 11:21:58 -04:00
Julian Dolby 92bec0cc0b move to Reader API to help with annoying /r/n issues is source mapping 2014-04-29 11:21:01 -04:00
Julian Dolby 6bb598e6dc fix for annyoing \r\n newline issues in text from html files 2014-04-29 11:19:14 -04:00
Julian Dolby a7c44d4789 new helper method 2014-04-29 11:17:38 -04:00
Julian Dolby de5f123fbd Merge branch 'master' of https://github.com/wala/WALA 2014-04-29 09:21:33 -04:00
Julian Dolby 05cf4e4f66 Merge branch 'master' of https://github.com/wala/WALA
Conflicts:
	com.ibm.wala.core/.classpath
2014-04-29 09:21:18 -04:00
Manu Sridharan 600e5ad50f synchronize methods. Fixes #43 2014-04-24 12:35:34 -07:00
Julian Dolby ab5ee8b3a5 merge 2014-04-24 09:01:01 -04:00
Manu Sridharan a4c1774ee0 fix compile errors for com.ibm.wala.core 2014-04-11 12:54:59 -07:00
Tobias Blaschke 71060b7348 Document Android-Stuff (II) 2014-04-11 17:59:10 +02:00
Tobias Blaschke f83ee59d8d Add UnknownIntent to AndroidSettingFactory 2014-04-11 17:59:09 +02:00
Tobias Blaschke 92ee930865 Document Android stuff (I)
I'm going through all "my" classes and add documentation where missing.
2014-04-11 17:59:09 +02:00
Tobias Blaschke cc2ffec023 Additional check in ParameterAccessor
getThisAs tests for supertype now
2014-04-11 17:59:09 +02:00
Tobias Blaschke 5f51dac201 Additional structural Models for Android
Now there are four structural models:
* SequentialAndroidModel:   No loops
* SingleStartAndroidModel:  User Interaction on a single component
* LoopAndroidModel:         Stuff goes into background and comes back
* LoopKillAndroidModel:     Restart of components due to low memory
2014-04-11 17:59:09 +02:00
Tobias Blaschke 1857121a44 Add "Custom Change" where applicable
Added the lines
BEGIN Custom Change
END Custom Change
2014-04-11 17:58:33 +02:00
Tobias Blaschke 3751366295 Bail out more information on failed assertion 2014-04-11 17:56:48 +02:00
Tobias Blaschke dc2522f937 Add debugging info
Output the method and stackTrace for my new "most favourite" assertion
and continue.
2014-04-11 17:56:48 +02:00
Tobias Blaschke e1fd417627 Extend DefaultInstantiationBehavior 2014-04-11 17:56:47 +02:00
Tobias Blaschke 2818ad33ad Document settings
Add more documentation on the settings for generationg a Livecycle-model
2014-04-11 17:56:47 +02:00
Tobias Blaschke 851594cff5 Make Intents immutable when attached to Context
Oops.
Fixes in intent-Resolution
2014-04-11 17:56:47 +02:00
Tobias Blaschke 8e7d44f6dc Better checks no system-components are included.
Before Activitys defined in the API could be pulled into the
entriepoints.

TODO: How can these get "Application" as loader?
2014-04-11 17:56:47 +02:00
Tobias Blaschke aa3e2c6d2a connetcThrough: Handle when param exluded
When the type of a parameter is in the exlusions connectThrough will
step over it now
2014-04-11 17:56:47 +02:00
Tobias Blaschke 042b1d6a01 Add some checks and output more info
AndroidPreFlightChecks now warns about entrypoints having a parameter
of type Object.
2014-04-11 17:56:47 +02:00
Tobias Blaschke 34b5c7284a Allow changing the target of an Intent.
Code oftain sets the action of an Intent after it's constructor. Until
now a call to such a setter caused the Intent to become "unbound"
(conservative).

This approch allows setting the target once for each Intent - only on
the second call the Intent gets unbound.
This new variant could be dangerous: Setting the target in a branch of
execution may be invalid. This should be detected - no guarantees so!

Methods in question are:
* Intent.setAction
* Intent.setComponent
* Intent.setClass
* Intent.setClassName
2014-04-11 17:56:47 +02:00
Tobias Blaschke b27bd944dc IntentModel also calls Application and Provider EPs.
As the IntentModel should only be used on the start of an Analysis this
is the correct approach here.
2014-04-11 17:56:47 +02:00
Tobias Blaschke cbfca1df4e Call setIntent when starting a Component.
Before the Intent would only have been set by calling .attach (if
doBootSequence is enabled). Attach is only called when the modell is
filled with instructions.

This new variant calls setIntent when creating the wrapper for the model
(getMethodAs). This is much better!
2014-04-11 17:56:47 +02:00
Tobias Blaschke eb4e3e4b58 Use setExplicit in androids Intent-Constructor 2014-04-11 17:56:46 +02:00
Tobias Blaschke 5a8c676a76 Disable extraction of AndroidContext
The AndroidContext was not used anyways.
2014-04-11 17:56:46 +02:00
Tobias Blaschke abcd578a61 Use getters and setters for Intents, add explicit-attribute
These Changes are necessary to make the target of an Intent changeable.
Additionaly some preparing changes in the IntentMap
2014-04-11 17:56:46 +02:00
Tobias Blaschke 3533156542 More info on AndroidEntryPoints selected by heuristic 2014-04-11 17:56:46 +02:00
Tobias Blaschke bf0e1a6347 Extend handling of IntentContext
* Create IntentContext even if no info available.
  This is necessary to also track the start of unknown targets.

* Invalidate the target of an Inten upon a call to Intent.setAction
  or Intent.fillIn

Additionally tidied up the classes a bit.
2014-04-11 17:56:46 +02:00
Tobias Blaschke c4eb253721 Fixes in the UnknownTarget model.
Before the model went by the wrong Name, it failed if no app-internal
implementations of the targetType existed.

Also tidied up the code.
2014-04-11 17:56:46 +02:00
Tobias Blaschke bd8f793135 Add a model for SystemServices
The SystemServiceModel creates and returns a new Instance of the
requested Service (if known).

TODO: We should use a single "global" instance per service instead.
2014-04-11 17:56:46 +02:00
Tobias Blaschke 224077d344 Fix Phi-Problem in SpecializedInstantiator
Under some curcumstances there was a hick-up when Phi-ing together some
newly generated instances.
2014-04-11 17:56:46 +02:00
Tobias Blaschke eced01bcb0 Add debug info and toString methods 2014-04-11 17:54:03 +02:00
Tobias Blaschke 1dc721710f Fix handling of types not in cha
Before the TypeSafeInstructionFactory would throw. Now it ignores.
2014-04-11 17:53:14 +02:00
Tobias Blaschke 1121b59b3b Handling getSystemService.
Code to resolve a call to getSystemService to an actual Object based on
the String given to getSystemService.

Currently there's only TelephonyManager.
2014-04-11 17:53:14 +02:00
Tobias Blaschke f561f1213d Make flat components optional 2014-04-11 17:53:14 +02:00
Tobias Blaschke d7f0d07122 Create Conponent instances in clinit 2014-04-11 17:53:14 +02:00
Tobias Blaschke a9864a5dab Added specialized instantiators.
Creating an instance of e.g. Context would pull in all compontents
yielding a ununsable result.
2014-04-11 17:53:13 +02:00
Tobias Blaschke ece84ddf76 Fix field-handling for Intent-Wrappers
The IntentContextInterpreter always returned an empty set of fields
2014-04-11 17:53:13 +02:00
Tobias Blaschke 64749b91fe Decrease some log-levels
Output was a bit to verbose.
2014-04-11 17:53:13 +02:00
Tobias Blaschke b963cc72bb Flatten Android-Component instances
Throw instances of android components into AndroidModelClass and reuse
them. This resembles Android a bit more.
2014-04-11 17:53:13 +02:00
Tobias Blaschke 594447c18f Add AndroidModel.getMethodEncap
Using getMethodEncap a new set of REUSE-Parameters will be generated
using the new Instantiator. Then the model will be called.
2014-04-11 17:53:13 +02:00
Tobias Blaschke add83148a5 Add default Overrides for Intents
Added DEFAULT_INTENT_OVERRIDES to AndroidEntryPointManager. These have
to be added manually.

Added posibility to deliberatly ignore intents
2014-04-11 17:53:13 +02:00
Tobias Blaschke 7aed4b5095 Add IntentModel for starting the analysis at an Intent 2014-04-11 17:53:13 +02:00
Tobias Blaschke 00d711dd64 InducedCFG/GoTo: Handle basic block boundarys
Building the CFG with a SSAGotoInstuction was buggy: Oftain the wrong
jump-target was selected. This has bin fixed.

Additionally InducedCFG now automaticly breaks the basic-block at the
jump-target.

Jumping to Phi-Instructions however is still unsupported (as they are
not part of the cfg-instructions)
2014-04-11 17:53:13 +02:00
Tobias Blaschke 154634dfb4 Fix resolution of Intents
There was (and is) the posibility of an endless-loop when looking up the
targets of Intents. Added an evil hack to at least prevent the most
obvious one.
2014-04-11 17:53:13 +02:00
Tobias Blaschke 14a9382ac6 Enable components in v4 2014-04-11 17:53:12 +02:00
Tobias Blaschke c8b60ef9dd BUG: Invalid def/Use of IntentSender.<init>
The Analysis has problems with the IntentSender class: Invalid DefUse an
an Init-Call.
The Intent-Starters, that use IntentSender have been made optional.
However disabling them does not help.

Currently the only solution to this problem is adding IntentSender to
the exclusions.txt
2014-04-11 17:53:12 +02:00
Tobias Blaschke 51d25116d9 BUG: Endless Recursion based on RESUE-Settings
Setting the Instantiation-Behavior of Package:
Landroid/support/v4/view
To REUSE causes the following Endless-Recursion in JoDroid:

interproc: computing local killing defintions...       done
Building utility edges  Exception in thread "main" java.lang.StackOverflowError
        at java.util.HashMap.put(HashMap.java:389)
        at org.jgrapht.graph.AbstractBaseGraph.addEdge(Unknown Source)
        at edu.kit.joana.util.graph.AbstractJoanaGraph.addEdge(AbstractJoanaGraph.java:50)
        at edu.kit.joana.wala.core.DependenceGraph.addEdge(DependenceGraph.java:76)
        at edu.kit.joana.wala.core.joana.JoanaConverter$UtilityEdgeWalker.discover(JoanaConverter.java:344)
        at edu.kit.joana.wala.core.joana.JoanaConverter$UtilityEdgeWalker.discover(JoanaConverter.java:325)
        at edu.kit.joana.wala.core.graphs.GraphWalker.dfs(GraphWalker.java:55)
        at edu.kit.joana.wala.core.graphs.GraphWalker.dfs(GraphWalker.java:63)
        at edu.kit.joana.wala.core.graphs.GraphWalker.dfs(GraphWalker.java:63)
        at edu.kit.joana.wala.core.graphs.GraphWalker.dfs(GraphWalker.java:63)
        ...

As this package contains System-provided android-components it should however be marked REUSE in order to be able to read back values when these types are used.
2014-04-11 17:53:12 +02:00
Tobias Blaschke 329e55990e Lower log-level on stub-induced warnings
The Log-Level for types and unimplemented interfaces from the stubs used
to be WARN and ERROR. This was reduced to DEBUG.
2014-04-11 17:53:12 +02:00
Tobias Blaschke d5a98f9479 InducedCFG: Accept holes in the local Instruction array
The Instruction array in InducedCFG contains null-entries. Wheter that's
intentional or not, skipp over them.
2014-04-11 17:53:12 +02:00
Tobias Blaschke 326404ff53 Fix: Instantiator - Array of Interface caused endless recursion
When creating an instance of an array whose payload-type is an interface
the Instantiator would get stuck in an endless recursion.
2014-04-11 17:53:12 +02:00
Tobias Blaschke f261d2e9ab Dalvik: Mark files for deletion
Classes not needed any longer have been marked as @deprecated
2014-04-11 17:53:12 +02:00
Tobias Blaschke 80c022f525 AndroidContext: Explicitly hand through on Intent-Start (coarse)
PARTIALLY:
Android-Context is explicitly assigned when Intents are started.

Not all types of Context are handled correctly yet.
2014-04-11 17:53:12 +02:00
Tobias Blaschke 9c8e2e7c00 Provide additional checks before building Androids Livecycle.
AndroidPreFlightChecks provides some checkups on the settings before
bulding the Livecycle.
The checks have to be invoked explicitly and issue warnings in the log.
2014-04-11 17:53:12 +02:00
Tobias Blaschke 9c7a2eb975 Build coarse Android Environment
Governed by AndroidEntryPointManager.setDoBootSequence generate some
coarse Android-environment before starting the LiveCycle-Model.

Some action is taken to attach the Android-Context to Components - much
is still missing there though.
Thin context is mainly useful when starting Intents of an external App.
2014-04-11 17:53:11 +02:00
Tobias Blaschke 0543761699 Read AndroidManifest.xml
Reading in this file is needed for determining targets of Intents.
2014-04-11 17:53:11 +02:00
Tobias Blaschke 5ba668c8ae Android Intents: add special context
Whenever an Intent is encountered while building the CallGraph a
WALA-Context is generated for it. If a new Android-Component is started
and the Context is sufficient the start-function will call a new type of
model, the MicroModel.

The MicroModel resemples the livecycle of a single Android-Component.
2014-04-11 17:53:11 +02:00
Tobias Blaschke c33207d793 Android-Intents: context-free overrides
Whenever the start of an intent is encountered the start-function is
replaced by a call to UnknownTargetModel.

UnknownTargetModel will call a restricted android-model (i.e. one that calls only all
Activities). This restricted model is known as MiniModel.
It will also call ExternalModel which does nothing special.
2014-04-11 17:53:11 +02:00
Tobias Blaschke beb97a59e9 Add structure to Android Livecycle
The added structure is governed by an AbstractAndroidModel. When
"labels" are stepped over it may insert special handling code.
2014-04-11 17:53:11 +02:00
Tobias Blaschke 63616da3d2 Implement CB_HEURISTIC for locating EntryPoints
CB_HEURISTIC searches for all methods overwriting or implementing
methods of android that have not been covered by EP_HEURISTIC
2014-04-11 17:53:11 +02:00
Tobias Blaschke 2d9486b2a9 BUG: empty BB in InducedCFG.addExceptionalEdges
Current workaround is to ignore it
2014-04-11 17:53:11 +02:00
Tobias Blaschke 64a1eb0a60 Build basic Android-Livecycle (sequential)
Generate a synthetic AndroidModel in AndroidModelClass.
The model will contain Android EntryPoints in a sorted manner. However
no special handling (loops) are inserted yet.

Intents are not processed at all - thus have to be marked insecure.
2014-04-11 17:53:11 +02:00
Tobias Blaschke a05c823724 Add structures for parameters to Androids entrypoints
Parameters to Androids EntryPoint-Functions may be either marked CREATE
or REUSE. Added these markers and made them availabel through
AndroidEntryPointManager.
2014-04-11 17:53:11 +02:00
Tobias Blaschke b840b55600 AndroidModel: Add central config class
The class AndroidEntryPointManager will contain all configuration data
for building the Android Livecycle Model
2014-04-11 17:53:10 +02:00
Tobias Blaschke 1d527a607b Add hardcoded Android EntryPoints
Added a good bunch of specifications which functions to considder as
EntryPoints for Android Apps. These will be evaluated by
AndroidEntryPointLocator
2014-04-11 17:53:10 +02:00
Tobias Blaschke 1e9298f3d7 Locate Androids EntryPoints
Locating them will be based on a set of hardcoded specifications (next
commit) or by using heuristics.
2014-04-11 17:53:10 +02:00
Tobias Blaschke b8b1fca292 Constants for Android-Types
Added Android-Specific types as TypeName and TypeReference
2014-04-11 17:53:10 +02:00
Tobias Blaschke f8970f92b7 Enable variable-names in Synth. Methods
Using a SummarizedMethodWithNames instead of a normal one enables human
readable variable names in WALA-Synthetic methods. This should help
when debugging.
2014-04-11 17:53:10 +02:00
Tobias Blaschke ece98a0628 Tools to facilitate buildin Synth. Methods
Have a toolkit that aids in building WALA-synthetic methods by helping
to avoid common mistakes and managing SSA-Variables.

See bundled package-info.java for more detail
2014-04-11 17:53:10 +02:00
Tobias Blaschke 34faac169d Fixes on AndroidAnalysisScope
Depending on the method used generating an AnalysisScope failed for
Android-Apps. Especially depending on wheater data was used from a
jar-resource or depending on exclusions.txt
2014-04-11 17:51:59 +02:00
Tobias Blaschke 6c5f243ea5 Add GoTo-instruction for Synt. Methods (limited)
Implemented the GoTo istruction reachable through the
JavaInstructionFactory.

Caution:
- It has to be asshured manually that a basic block starts at the target
- One may not jump to a Phi-Instruction
2014-04-11 17:50:17 +02:00
Tobias Blaschke dcf5cd4a1c On progress monitoring
Small changes on progrss monitoring that enable having an actual
progress-meter instead of just having heart-beat information.
2014-04-11 17:50:17 +02:00
Tobias Blaschke 9ba0c06cf3 Add misc helper functions
Added small helper functions that may provide handy
2014-04-11 17:50:17 +02:00
Tobias Blaschke 964a0d86b9 Debug-Output only
No changes on the inner workings, only provided better Debug-Messages.
2014-04-11 17:50:17 +02:00
Julian Dolby 63a7570bcf require 1.7 SE 2014-04-11 10:00:39 -04:00
Julian Dolby 99512c5cd0 uuse PrinterWriter; make DOM model optional 2014-04-11 10:00:05 -04:00
Julian Dolby 26684af676 bug fix for finding primitive objects 2014-04-11 09:58:34 -04:00
Julian Dolby fe5ad51acd 1.6 SE 2014-04-11 09:28:36 -04:00
Julian Dolby 4e9748d4b9 implemented some more featutres. 2014-04-11 09:27:50 -04:00
Julian Dolby f8921c4389 static type for inverter of known numbered graph 2014-04-11 09:26:37 -04:00
Martin Mohr 54ec3410e7 don't add jdk libs to android analysis scope
CAUTION: Now you have to make sure that the provided android lib actually contains all standard
java classes (e.g. java.lang.Object); WALA will complain and crash if this is not the case
2014-03-31 11:20:17 +02:00
Martin Mohr a01d1a969f change default for logging 2014-03-31 11:20:00 +02:00
Julian Dolby 542f4055d9 fix. not sure why i do not see this failure when running the test on my laptop 2014-03-17 22:27:45 -04:00
Julian Dolby a3a3e7fbe7 new graph implementation for incremental graph extension 2014-03-17 22:09:58 -04:00
Julian Dolby b04a3f9b35 try new way to find classpath entries for travis ci 2014-03-17 10:09:48 -04:00
Julian Dolby 371695506d avoid running on travis for now 2014-03-16 22:29:54 -04:00
Julian Dolby b422fd500e try to find jar file for travis tests 2014-03-16 22:14:36 -04:00
Julian Dolby 95c13203de try to find jar file for travis tests 2014-03-16 22:01:02 -04:00
Julian Dolby 656d307e15 constant instructions for MethodHandles 2014-03-16 18:07:58 -04:00
Julian Dolby c0984fd3e5 allow access in subclasses 2014-03-16 18:06:47 -04:00
Julian Dolby 893f4b7308 type in CAst var decls 2014-03-16 18:05:49 -04:00
Julian Dolby bfd999e03b rename dynamic cg test 2014-03-16 18:04:21 -04:00
Julian Dolby 6b5a0825fb some minimal support for Java 7 constant pool entries 2014-03-16 17:30:17 -04:00
Juergen Graf 561472dfe5 new java versions in osx have different java.home - fix autodetection 2014-03-10 14:43:29 +01:00
Julian Dolby 7b62150502 Merge branch 'master' of https://github.com/wala/WALA 2014-03-06 14:37:38 -05:00
Julian Dolby 9a8f806939 type-o 2014-03-06 14:37:36 -05:00
Julian Dolby c012401ad1 fix type-o 2014-03-03 14:37:16 -05:00
Julian Dolby 3bc0ad9a2c move java 7 dependent code to core, so util works with java 6 2014-03-03 14:30:19 -05:00
sjfink 6549723da1 fix spelling errors 2014-03-03 11:07:02 -08:00
Martin Mohr db263ecefc additional 'pruning policy' to not prune anything; could be useful if one wants to temporarily switch off pruning without changing too much code 2014-02-25 16:59:08 +01:00
Martin Mohr 7f7684b57e remove IBM header from class contributed by JOANA project 2014-02-25 16:56:58 +01:00
Juergen Graf ce833aefe2 fix bug: count only really unresolved classes in ClassHierarchy 2014-02-17 15:01:18 +01:00
Julian Dolby 2307c2c1a7 slight generalization of the temporary file support 2014-02-14 20:35:54 -05:00
Julian Dolby 3b7b59406f add types left out of commit 2014-02-09 19:12:13 -05:00
Julian Dolby de043e0780 add type left out of commit 2014-02-09 19:10:55 -05:00
Julian Dolby 79acda26ed adapt to type changes 2014-02-09 19:00:31 -05:00
Julian Dolby 0d4f31ef5f magic tycho compile option (thanks to a post by Jan Rosczak on dev.eclipse.org) 2014-02-09 18:29:04 -05:00
Julian Dolby 68cd833503 compile 1.7 2014-02-09 17:49:00 -05:00
Julian Dolby b40cf4929b new progress monitor functionality to handle memory limitation 2014-02-08 22:53:02 -05:00
Julian Dolby 4c25c40789 type generalization 2014-02-08 22:52:19 -05:00
Julian Dolby 969a209f1e adaot to type generalization 2014-02-08 22:51:38 -05:00
Julian Dolby e04ac682f3 final class 2014-02-08 22:51:22 -05:00
Julian Dolby 0964104dde use java functionality to handle urls 2014-02-08 22:50:59 -05:00
Julian Dolby a1ca9203a6 flow graph handles some flow through the arguments array. also a fake
'pointer analysis' is constructed using the flow graph.
2014-02-08 22:50:32 -05:00
Julian Dolby 81edfcdd9e type generalization for mutable mappings 2014-02-08 21:42:16 -05:00
Julian Dolby 1ccbbbc433 allow filtering to express subtypes 2014-02-08 21:41:34 -05:00
Julian Dolby dd6748e159 pointer analysis simulation for field-based CGs 2014-02-08 21:40:32 -05:00
Julian Dolby b0710be5f4 new timeout mechanism 2014-02-08 21:39:55 -05:00
Julian Dolby 1aca56a575 new timeout mechanism 2014-02-08 21:39:36 -05:00
Julian Dolby aba40663d2 new timeout mechanism 2014-02-08 21:37:39 -05:00
Julian Dolby 36e0716639 more tests 2014-02-08 21:36:56 -05:00
Julian Dolby 8d2f8ce15c use new timeout mechanism 2014-02-08 21:36:45 -05:00
Julian Dolby 27dc4c0bb2 ignore debugger token 2014-02-08 21:35:53 -05:00
Julian Dolby e585e1d1c2 trivial final modifier 2014-02-08 21:35:30 -05:00
Julian Dolby 428d5a0005 find arguments array vns 2014-02-08 21:34:55 -05:00
Julian Dolby ec36f2f081 propagate source names in prototype lookups 2014-02-08 21:34:34 -05:00
Julian Dolby 2c9c0d802f allow specialization of source name map generation 2014-02-08 21:32:51 -05:00
Juergen Graf 6d0a6ee0e8 add return value keys for RTA pointer analysis 2014-02-04 04:02:30 +01:00
Julian Dolby 823cae8748 a couple of wrappers 2014-01-15 21:58:46 -05:00
Julian Dolby b5627bbe81 test new mechanisms 2014-01-07 22:36:23 -05:00
Julian Dolby 98e631e1e2 threading support 2014-01-07 22:27:48 -05:00
Julian Dolby 1914f016dd 1) use less verbose instrumentation to reduce problems with methods
getting too big
2) handle issues with exceptional control flow not being followed
properly sometimes
2014-01-07 17:35:44 -05:00
Julian Dolby 1e2cc4bd6a fix missing parentheses in test to fix null pointer crash 2014-01-07 17:34:35 -05:00
Julian Dolby 1259ab929f 1) compress dumped call graph edges
2) make instrumentor preserve the names of jar entries and classes as
they are input, rather than recomputing class names when writing the
output jar.  This usually makes no difference, but can preserve broken
structures when the input jar file has mismatches between class names
and its entry names.
2014-01-03 10:10:03 -05:00
Julian Dolby c7d0c452e9 more detail in assertion 2014-01-03 10:07:52 -05:00
Julian Dolby 5af42e4585 more detail in assertion 2014-01-03 10:07:11 -05:00
Manu Sridharan 014b1b52a3 Merge pull request #41 from sblackshear/patch-1
Update SSAConditionalBranchInstruction.java
2013-12-28 11:10:47 -08:00
Sam Blackshear 928555d425 Update SSAConditionalBranchInstruction.java
Changing SSAConditionalInstruction.isObjectComparison(): previous definition returns true for comparisons of Primordial scope objects, but false for Application scope objects. The update version returns true in both cases
2013-12-27 13:06:39 -05:00
sjfink e6fed7efa3 use a more precise (covariant) return type for BitVectorIntSet.intersection 2013-12-18 06:27:43 -08:00
Julian Dolby 51d4b0e462 make urlToFile and streamToFile more flexible 2013-12-13 19:27:22 -05:00
Julian Dolby f451a19b52 fix to put directory entries in generated instrumented jars 2013-12-09 21:41:05 -05:00
Julian Dolby b4cf06c9dc print less 2013-12-03 20:57:17 -05:00
Julian Dolby ba9aa51429 print less 2013-12-03 18:07:36 -05:00
ksrinivs 27fb9151f1 Merge branch 'master' of https://github.com/wala/WALA 2013-12-03 16:01:45 -05:00
ksrinivs bcc0d23c54 minor fixes 2013-12-03 16:01:28 -05:00
Julian Dolby 1b81d2ffcd less printing 2013-12-03 15:59:18 -05:00
Julian Dolby 62729613d7 less printing 2013-12-03 15:20:53 -05:00
Julian Dolby 1cc58c6e2f less printing 2013-12-03 13:09:35 -05:00
Julian Dolby cca1a98172 less printing 2013-12-03 13:08:29 -05:00
Julian Dolby ae7fb96027 formatting 2013-12-03 12:35:08 -05:00
Julian Dolby 02d1e269b6 use class loader to avoid annoying file issues 2013-12-03 12:10:25 -05:00
Julian Dolby 1660831ec2 trying another way to get a display 2013-12-03 11:39:00 -05:00
Julian Dolby 436584b51b øMerge branch 'master' of https://github.com/wala/WALA 2013-12-02 15:31:40 -05:00
Julian Dolby 30f2cc4dbe don't put junk in result map 2013-12-02 15:31:36 -05:00
ksrinivs 639c876fe5 partial coloring 2013-12-02 14:42:51 -05:00
ksrinivs 3d91075842 partial coloring 2013-12-02 14:37:28 -05:00
Julian Dolby c0b67ef188 use optional tasks again 2013-12-02 12:06:46 -05:00
Julian Dolby f408697759 try adding more dependencies. it all works on maven on my mac, but
somehow the travis ci install is having trouble finding eclipse
components.
2013-12-02 10:57:39 -05:00
Julian Dolby 6886791fc0 try to make maven on travis cl find the needed Eclipse projects 2013-12-02 10:26:19 -05:00
Julian Dolby 9d05722eed maven seems not to understand optional dependencies. so take them out.
this means that running maven on the mac will require putting this back
manually.  also running the JDT tests on the mac may require adding
these plugins by hand if the run config is minimizing the plugins being
used.
2013-12-02 09:49:02 -05:00
Julian Dolby 7e3c7f8512 make tests of integration with JSDT and JDT work on Maven 2013-12-02 09:35:47 -05:00
Manu Sridharan 3d1e6a0385 Merge pull request #40 from cos/fix-for-maven-util-build
fix for Maven build
2013-12-01 19:15:50 -08:00
Cosmin Radoi 7b356cac2b fix for Maven build 2013-12-01 20:09:47 -06:00
Manu Sridharan 3d2350dde6 rewrite getURLForFile to use FileProvider 2013-11-30 10:02:32 -08:00
Julian Dolby 9ee9206ff2 fixes to launcher args 2013-11-27 15:17:57 -05:00
Julian Dolby b057e35e2c for now, ignore tests impacted by library change 2013-11-26 19:26:52 -05:00
Julian Dolby 1565a70f72 update maven build stuff version 2013-11-26 18:58:38 -05:00
Julian Dolby 026f04cbfc get more error information from Rhino 2013-11-26 17:20:16 -05:00
Julian Dolby 7948f3b9ae merge 2013-11-26 16:25:43 -05:00
Julian Dolby e77e68c0f5 cleanup 2013-11-26 16:06:22 -05:00
ksrinivs c1a923d0ba allow partial coloring 2013-11-26 15:04:09 -05:00
Julian Dolby dedbc2d443 coloring now requires numbered graphs. a performance hack. 2013-11-21 14:27:27 -05:00
sjfink 8888d77f97 fix test in PlatformUtil.onMacOSX to use System.getProperty("os.name") 2013-11-18 06:19:39 -08:00
Julian Dolby bdc742f558 shrike cg tests 2013-11-14 21:48:04 -05: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
Julian Dolby eacfe38dbb print call edges directly 2013-11-06 09:50:57 -05:00
Julian Dolby 3bb1f12c18 do not write bogus local variable table entries that refer to slots
greater than the max local.  This causes the verifier to complain.  This
can happen when transforming a class that originally contains local
names for stack slots that are never used.  When the new code is
written, a correct max locals is calculated, and then these unused local
table entries trigger errors.
2013-11-06 09:34:00 -05:00
Martin Mohr dcfd813ced convert default pruning policy into public singleton 2013-10-28 16:52:42 +01:00
Martin Mohr 30d6a458c3 extend the call graph pruner to allow for other pruning policies than 'keep branch if you find application node on it' 2013-10-28 16:42:36 +01:00
Julian Dolby fd1c0d7d2c add filtering to instrumentor 2013-10-25 14:49:36 -04:00
Julian Dolby aa88663182 bare bones dynamic CG instrumentor 2013-10-25 13:34:42 -04:00
Julian Dolby 56236dec53 further work on analysis for JavaScript in Eclipse 2013-10-16 17:37:53 -04:00
Manu Sridharan cb17b24875 organize imports 2013-10-02 14:52:05 -07:00
Julian Dolby 88bc7f48de handle the 'Main-Class' manifest entry. be less aggressive with
reflection.
2013-10-01 14:00:04 -04:00
Julian Dolby cfb516a758 code to handle 'Class-Path' in jar files added to the scope. done for a
specific use, and so probably a little flaky.
2013-10-01 13:59:30 -04:00
Julian Dolby a8fdf96cde fix (i think) to edge computation caching 2013-09-26 13:15:32 -04:00
Julian Dolby 26c2be5ffb skip unknown call sites rather than crashing 2013-09-26 13:13:05 -04:00
Julian Dolby 05003d52c9 merge 2013-09-18 14:05:48 -04:00
Julian Dolby dd4d794517 merge 2013-09-18 14:00:04 -04:00
Julian Dolby 45e6803d30 white space change 2013-09-18 13:58:49 -04:00
Julian Dolby 42714d9bf3 fixes for getting original source code for included locations 2013-09-18 13:55:17 -04:00
Manu Sridharan 8984637b86 make classes public. Fixes #32 2013-09-16 10:32:29 -07:00
Manu Sridharan 898e1c3810 add modeling of window.onload invocation 2013-09-16 09:37:18 -07:00
Martin Mohr 0235ea847a bugfix: handle the case that there is a series of array-register moving instructions between a new-array and a fill-array-data 2013-08-30 17:19:54 +02:00
Julian Dolby 81aaa1bee0 make a translator error a kind of wala exception 2013-08-29 10:18:29 -04:00
Julian Dolby e9cdd57fed make some prototype function names more explicit 2013-08-29 10:18:05 -04:00
Julian Dolby aa101e6c25 do not throw error 2013-08-29 10:17:37 -04:00
Julian Dolby 4f13586cc9 clean up: kill dead code 2013-08-29 10:17:10 -04:00
Julian Dolby 0799bffc84 clean ups 2013-08-29 10:16:38 -04:00
Martin Mohr 3a454d01bd fallback ContextInterpreter to avoid CodeScanner if this would crash 2013-08-28 18:46:45 +02:00
Martin Mohr d8c7ce0c51 kill useless class 2013-08-27 11:32:24 +02:00
Martin Mohr 19e286a8c6 ignore logging settings for dalvik frontend 2013-08-26 19:37:09 +02:00
Martin Mohr cbb3f5db7b Bugfix: kill evil, cache-killing line 2013-08-21 16:55:42 +02:00
Martin Mohr 2812a6ed52 do not use the synthetic bit of the dalvik bytcode to implement IMethod.isSynthetic in DexIMethod (the shrike frontend also ignores the respective bit in java bytecode) - in WALA, 'synthetic' means 'does not originate from bytecode' and not 'the compiler generated this method' 2013-08-21 13:43:16 +02:00
Manu Sridharan 58e4c392f6 add ignore file 2013-08-08 10:23:51 -07:00
Julian Dolby a9331dca6f avoid using files since the automated tests get things out of jars 2013-08-07 16:44:21 -04:00
Manu Sridharan 512b3bbf48 remove large wl.zip file 2013-08-07 12:44:55 -07:00
Julian Dolby e9f7fd642d adapt to new engine infrastructure. updated test zip file. 2013-08-07 15:21:03 -04:00
Julian Dolby 528be3e973 remove now-unused functionality 2013-08-07 15:20:05 -04:00
Julian Dolby 24aeda3ef8 more flexible eclipse project paths and engines for javascript to
support adding different model JS files as prologues.
2013-08-07 15:19:27 -04:00
Julian Dolby 1dd180cf93 no longer add prologue files implicitly, since this code cannot always
find them now that we allow all kinds of prologues to be used
2013-08-07 15:17:48 -04:00
Julian Dolby e89d0acf16 reuse util support for building scopes 2013-08-07 15:17:02 -04:00
Julian Dolby 72fa4b7ff6 add prologue files explicitly, which is now needed 2013-08-07 15:16:13 -04:00
Julian Dolby 824cd3db24 utility to use Eclipse to find JS prologue files for analysis 2013-08-07 15:15:20 -04:00
Julian Dolby 33cc7da5a0 really hackish, prototype support for exclude paths 2013-08-07 15:13:13 -04:00
Julian Dolby 8ea24cdafc this test works now 2013-08-07 15:12:23 -04:00
Julian Dolby 0117b88698 reflect function statements into 'window' object. i have checked that
firefox does this.
2013-08-07 15:11:25 -04:00
Julian Dolby d528c16b0f refactoring to integrate field-based cg builders with Eclipse-based
JavaScript front end
2013-08-05 14:35:41 -04: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 de6b644e8c work on eclipse javascript project analysis 2013-07-24 11:18:54 -04:00
Julian Dolby b9cf32dadb merge with changes for Eclipse 2013-07-24 10:41:07 -04:00
Julian Dolby b60a457038 suppress some random Eclipse errors 2013-07-24 10:38:42 -04:00
Max Schaefer 7dd4dc7f2a Fixing project names in Ant build files. 2013-07-19 13:11:16 +08:00
Manu Sridharan 0595f0202c update manifests for compatibility with Eclipse Kepler 2013-07-16 11:33:40 -07:00
Manu Sridharan 4b8c1b4148 Merge pull request #31 from msridhar/lexical-cleanup
Further cleanup related to removing old lexical handling code
2013-07-10 10:29:00 -07:00
Manu Sridharan 550eca255b fix for NPE 2013-07-10 09:44:47 -07:00
Manu Sridharan c71652de34 add getNumberOfUses(), rename class 2013-07-10 09:44:47 -07:00
Manu Sridharan 757ae95ef0 add getNumberOfUses() 2013-07-10 09:44:47 -07:00
Manu Sridharan e1e67e6b9f remove unused import 2013-07-10 09:44:46 -07:00
Manu Sridharan 059d841c8c removing lexical reads and writes from invoke instructions; WIP 2013-07-10 09:44:46 -07:00
Manu Sridharan 3bd2f588d0 Merge pull request #30 from sewe/upstream
Publish source features on update site
2013-07-09 09:29:35 -07:00
Andreas Sewe 72e54e7abf Publish source features on update site 2013-07-09 15:34:03 +02:00
Manu Sridharan e11f8b3182 patch to improve mapping of classes to source files 2013-07-08 15:26:28 -07:00
Juergen Graf afaebe81a9 fix compile errors in dalvik frontend 2013-07-02 16:03:13 +02:00
Juergen Graf cdaaddf88b Merge branch 'wala' into master 2013-07-02 14:23:24 +02:00
Manu Sridharan b984760100 support for reading method parameter annotations from Java bytecodes 2013-06-28 11:44:47 -04:00
Manu Sridharan 31d3bf835e other build fixes 2013-06-25 16:00:15 -04:00
Manu Sridharan 8b09512edb fix .classpath error; should refer to rhino-1.7R3.jar 2013-06-25 15:50:24 -04:00
Julian Dolby 6597641ca0 new test 2013-06-25 13:30:01 -04:00
Julian Dolby 00c095ae28 turn off debugging output 2013-06-25 13:29:37 -04:00
Julian Dolby 55b64712fc merge conflict 2013-06-25 12:02:12 -04:00
Julian Dolby 080325b5f6 merge 2013-06-25 11:57:37 -04:00
Julian Dolby 3015d1c5f9 added container access to ModuleEntry 2013-06-25 11:53:58 -04:00
sjfink 587ef66356 publicize a method and add some comments 2013-06-24 08:34:16 -07:00
Manu Sridharan 6e2fadd316 remove @Override annotations from Java source tests.
Polyglot can't parse these annotations.
2013-06-10 15:04:56 -07:00
Manu Sridharan 05a9961108 add missing @Override annotations; no semantic change 2013-06-10 14:37:19 -07:00
Manu Sridharan 918f887d3a update copyright header 2013-06-10 14:24:03 -07:00
Manu Sridharan e41dc42276 javadoc 2013-06-10 14:22:12 -07:00
Manu Sridharan 547f0d276a more sample code 2013-06-10 14:22:12 -07:00
Manu Sridharan 6e562ac27e fix warnings 2013-06-10 14:22:12 -07:00
Manu Sridharan 68211df807 remove unused dump() method 2013-06-10 14:22:12 -07:00
Manu Sridharan 21d392e2bd example driver to print IR for all methods in a script 2013-06-10 14:22:11 -07:00
Manu Sridharan 9452bc563d add method to construct a class hierarchy for a set of JS files 2013-06-10 14:22:11 -07:00
Manu Sridharan 3a69d48038 javadoc 2013-06-10 14:22:11 -07:00
Julian Dolby 068d0f0908 merge 2013-06-10 09:08:34 -04:00
Julian Dolby 9e51a19d5d tests 2013-06-10 09:02:12 -04:00
Manu Sridharan 162a001ce6 remove more code for older lexical access scheme 2013-06-07 09:58:25 -07:00
Manu Sridharan f268ca91fd remove precise lexical config options; we want this to just be on 2013-06-07 09:48:00 -07:00
Manu Sridharan b2d108daad fix compile error 2013-06-06 20:03:39 -07:00
Manu Sridharan d2933d49b2 delete a little more code and javadoc 2013-06-06 20:02:42 -07:00
Manu Sridharan 321695617c delete more code 2013-06-06 20:02:42 -07:00
Manu Sridharan 472a98d7cf delete some code 2013-06-06 20:02:42 -07:00
Manu Sridharan d4b252ad51 kill NEW_LEXICAL flag 2013-06-06 20:02:41 -07:00
Max Schaefer d80624ff2b Merge branch 'make-correlation-tracking-an-option-in-HTMLCGBuilder' of https://github.com/wala/WALA into make-correlation-tracking-an-option-in-HTMLCGBuilder 2013-06-07 08:33:04 +08:00
Max Schaefer 79b12e332e Only introduce property name contexts for constant keys. 2013-06-07 08:29:24 +08:00
Max Schaefer 188a7c79a6 Need to use 1-CFA for ajaxslt test (alternatively turn off correlation
tracking).
2013-06-07 08:29:24 +08:00
Max Schaefer ef0cf8589d Forgot to set translator factory; fixed. 2013-06-07 08:29:24 +08:00
Max Schaefer 79caece0c1 Introducing convenience method for creating a loader factory without a preprocessor. 2013-06-07 08:29:24 +08:00
Max Schaefer 3adaaf50ee Correlation finder now handles both HTML files and raw JS files as
input, doesn't use WebPageLoaderFactory to create CAst anymore.
2013-06-07 08:29:24 +08:00
Max Schaefer 3d974b8313 Temporary commit; things are broken, but I need to switch back to master for a bit. 2013-06-07 08:29:24 +08:00
Max Schaefer 0f334e59e3 Only introduce property name contexts for constant keys. 2013-06-07 08:28:26 +08:00
Manu Sridharan 4908c22c94 re-enable other tests 2013-06-06 13:58:30 -07:00
Manu Sridharan 59981570a3 add junit 4 dependence 2013-06-06 13:51:37 -07:00
Manu Sridharan 591215ebd6 delete files on exit by default 2013-06-06 13:45:34 -07:00
Manu Sridharan e353938a93 fix up classpath 2013-06-06 13:44:39 -07:00
Manu Sridharan 52edbd4398 fix classpath 2013-06-06 13:31:17 -07:00
Manu Sridharan 6d1c0ad30c attempt to get maven build for nu_validator going 2013-06-06 13:16:07 -07:00
Manu Sridharan 78b60e7761 update to use htmlparser 1.4 2013-06-06 13:07:48 -07:00
Max Schaefer 9367ad57db Need to use 1-CFA for ajaxslt test (alternatively turn off correlation
tracking).
2013-06-06 17:48:31 +08:00
Max Schaefer 25c92bf3e2 Forgot to set translator factory; fixed. 2013-06-06 17:05:39 +08:00
Max Schaefer c4c1c2c027 Introducing convenience method for creating a loader factory without a preprocessor. 2013-06-06 16:32:55 +08:00
Max Schaefer f2e4fc572e Correlation finder now handles both HTML files and raw JS files as
input, doesn't use WebPageLoaderFactory to create CAst anymore.
2013-06-06 15:59:05 +08:00
Max Schaefer 0c67118fe2 Temporary commit; things are broken, but I need to switch back to master for a bit. 2013-06-06 14:30:52 +08:00
Manu Sridharan 68db1cc279 avoid recursive apply contexts 2013-06-03 16:47:02 -07:00
Manu Sridharan 98e83e5103 another test for Function.prototype.apply handling 2013-06-03 14:03:28 -07:00
Manu Sridharan 26896049a7 add crashing test case (currently ignored) 2013-06-03 10:44:06 -07:00
Max Schaefer fcd28ee419 More refactoring of ParameterNameContextSelector, which is now called
PropertyNameContextSelector.
2013-06-03 14:13:37 +08:00
Max Schaefer 3a0741571f Some cleanup in ForInContextSelector; now renamed to
ParameterNameContextSelector.
2013-06-03 12:18:29 +08:00
Manu Sridharan c0bae5cf86 use maven-dependency plugin to copy dependencies 2013-05-30 14:44:00 -07:00
Max Schaefer 61c48fe1bc Fixed failing test case for field-based call graph construction:
visitJavaScriptPropertyRead/Write need to be able to handle static
property writes (weren't those encoded differently before?).
2013-05-29 08:41:55 +08:00
Manu Sridharan 72e2a1b2f9 re-enable Java tests 2013-05-28 16:46:23 -07:00
Manu Sridharan cd2e3abe89 get JavaScript tests running under Maven 2013-05-28 16:39:33 -07:00
Manu Sridharan 07c711d5ab re-enable wala core tests 2013-05-28 15:41:09 -07:00
Manu Sridharan dee324b609 add comment 2013-05-28 15:32:24 -07:00
Manu Sridharan 89803bc90c use updated API for getting library jars 2013-05-28 15:31:30 -07:00
Manu Sridharan cc9c8e407b rename to fit Maven conventions 2013-05-28 15:31:06 -07:00
Manu Sridharan 9703d1a62e Merge branch 'master' into fix-maven-tests 2013-05-28 15:21:10 -07:00
Manu Sridharan ed05815698 rename test class 2013-05-28 11:52:29 -07:00
Manu Sridharan e447ae7eb6 Merge branch 'master' into fieldbased-cg 2013-05-28 11:48:30 -07:00
Manu Sridharan 5926048e88 add bin directory if it doesn't exist 2013-05-28 09:34:42 -07:00
Manu Sridharan 06361377e3 progress on getting polyglot tests to run under maven 2013-05-27 16:34:06 -07:00
Manu Sridharan c13dad9057 try redirecting excessive test output 2013-05-27 11:37:10 -07:00
Manu Sridharan 7a72cdb02f hopefully this will work on Travis 2013-05-27 11:19:53 -07:00
Manu Sridharan 38d0c3cc12 re-enable test 2013-05-27 11:07:32 -07:00
Manu Sridharan 5de33324fa another maven tweak 2013-05-27 11:06:21 -07:00
Manu Sridharan 119fd841af more manifest hacks. Also, temporary disable CG IO test 2013-05-27 10:35:55 -07:00
Manu Sridharan 89c04ead32 tweaks to test config 2013-05-27 10:11:18 -07:00
Manu Sridharan 0a7a3092b1 trying to get around classloading issues 2013-05-27 09:45:50 -07:00
Manu Sridharan 197fb8bc56 disable running tests for now; still debugging 2013-05-26 16:13:02 -07:00
Manu Sridharan 4f9dfafa62 more Travis tweaking 2013-05-26 15:54:29 -07:00
Manu Sridharan 422b9a1753 attempt to fix Travis build 2013-05-26 15:43:20 -07:00
Manu Sridharan cfc01b5ab6 fix up wala.core.testdata structure so things work from maven
We put all the jar files (the testdata jar, JLex, etc.) in the root
directory now, and set up the build.properties so that these jars get
copied into the final plugin jar, making the tests work properly from
maven.  We also still copy the jars into the bin/ directory, so the
Eclipse launchers still work.
2013-05-26 14:47:00 -07:00
Manu Sridharan 9bc5bcbb3c Disable certain tests when analyzed classes are in a jar file.
These tests create FileModules for certain class / source files,
and hence assume those files are sitting in the filesystem.  We
should come up with a better fix here.
2013-05-26 14:45:50 -07:00
Manu Sridharan b23756924e pass appropriate VM args when running tests 2013-05-26 14:45:24 -07:00
Manu Sridharan 98b6d63cdf add surefire plugin version 2013-05-26 14:40:14 -07:00
Manu Sridharan 878cfa615d changes to get tests passing on Java 7 2013-05-26 10:07:46 -07:00
Manu Sridharan 8f9e988cef enable running wala.core.tests in maven build 2013-05-25 16:14:04 -07:00
Manu Sridharan 7ca109967d read J2SE jars from bootclasspath if wala.properties cannot be loaded 2013-05-25 16:05:25 -07:00
Manu Sridharan e82556450b enable maven building of wala.core.testdata, and use project-specific compile settings 2013-05-24 21:23:57 -07:00
Manu Sridharan 43a75bb874 Merge pull request #24 from sewe/upstream
Fix thread-safety bug in BytecodeClass.computeMethodMap
2013-05-24 20:46:18 -07:00
Andreas Sewe dc03348bce Fix thread-safety bug in BytecodeClass.computeMethodMap
The map must not be modified after BytecodeClass.methodMap
has become non-null.
2013-05-24 10:25:01 +02:00
Manu Sridharan 7064233320 remove print 2013-05-22 16:41:27 -07:00
Manu Sridharan faff1a9125 add copyright headers 2013-05-22 16:21:33 -07:00
Manu Sridharan 54593a8f46 add code for field-based call graph 2013-05-22 16:04:25 -07:00
Manu Sridharan 3b1889121b add missing copyright headers 2013-05-22 15:39:19 -07:00
Manu Sridharan dd949bcbc4 config file for Travis CI 2013-05-17 19:47:53 -07:00
Manu Sridharan f6cdbd0e0a switch back to rhino-1.7R3.jar, to be compatible with maven 2013-05-17 17:58:37 -07:00
Julian Dolby dd6510da29 Merge branch 'master' of https://github.com/wala/WALA.git 2013-05-15 14:04:44 -04:00
Manu Sridharan c4ce3999cd fix possible NPE 2013-05-15 10:55:58 -07:00
Julian Dolby 310d0fff25 changes to ease use of WALA from an executable jar. also some very
basic support for GXL, a graph format used by some software engineering
tools.
2013-05-15 13:36:30 -04:00
Manu Sridharan 837528592a Merge branch 'master' of github.com:wala/WALA 2013-05-14 14:40:56 -07:00
Manu Sridharan c0e3cb9831 fix for handling of static methods in ContainerContextSelector 2013-05-14 14:17:26 -07:00
sjfink 9d18e9486c fix typo in print statement 2013-05-14 12:18:10 -07:00
Manu Sridharan 0b557ac685 temporary patch to keep build.xml file working 2013-05-13 13:46:11 -07:00
Manu Sridharan 16a0e02fa0 add utility methods for creating n-CFA call graph builders 2013-05-10 20:55:13 -07:00
Manu Sridharan 89e90cd44e rename computeMethodMap() to computeMethodMapIfNeeded() 2013-05-07 14:59:12 -07:00
Andreas Sewe bc2594237b Made BytecodeClass.computeMethodMap thread-safe 2013-05-07 14:56:06 -07:00
Andreas Sewe d0b5e8ddd2 Made TypeName.findOrCreate thread-safe 2013-05-07 14:54:14 -07:00
Manu Sridharan 30686135da Fix for bug with pi nodes reported by Andreas Sewe
We weren't handling the case where the val of the pi instruction
had an implicit points-to set.
2013-05-07 14:43:49 -07:00
Manu Sridharan eac23e97a9 enable reading scope files from jars 2013-05-02 11:43:49 -07:00
Manu Sridharan e6bef253ff Merge branch 'master' into maven 2013-05-02 10:58:55 -07:00
Manu Sridharan d149ca2c73 Revert fix for tests; we need to figure out the right fix here.
This reverts commit cab3c6c0c4.
2013-05-02 10:55:45 -07:00
Manu Sridharan fd6a02422e undo one change from previous commit 2013-04-30 12:17:05 -07:00
Manu Sridharan 8d5af4aece fix warnings 2013-04-30 12:10:06 -07:00
Manu Sridharan 897268c7f9 fix comment 2013-04-30 12:09:55 -07:00
Manu Sridharan 8a3f86bad7 Merge branch 'master' into java-local-vals-for-lex 2013-04-30 11:51:33 -07:00
Manu Sridharan 4fd82ac2ef use more reasonable default heap size 2013-04-30 09:35:19 -07:00
Manu Sridharan ed88385d82 remove unused launcher 2013-04-30 09:35:03 -07:00
Manu Sridharan a9719a948d change default target to jar 2013-04-30 09:31:35 -07:00
mbruch dca47e5641 Merge pull request #3 from msridhar/smallfixes
Build fixes.
2013-04-29 21:45:23 -07:00
Manu Sridharan dcc7cd206d bug fix: allow each language to determine when a CGNode represents the "definer" method for a lexical access 2013-04-29 20:34:40 -07:00
Manu Sridharan 5f18830c3f changes to adjust for lack of null instruction at index 0 2013-04-29 20:34:08 -07:00
Manu Sridharan 516d1522b9 indentation 2013-04-29 20:33:18 -07:00
Manu Sridharan 80c031d48b store results in file 2013-04-29 20:33:10 -07:00
Manu Sridharan 6c9cf10870 flipped useLocalValsForLexicalVars to false for Java; causes tests to break 2013-04-29 16:48:19 -07:00
Manu Sridharan dd09d46f79 Build fixes.
1. Fixed polyglot antrun build, at least to work on JDK 1.7 on Mac.
2. Made cast.js.rhino point to Rhino 1.7R3.
2013-04-29 16:08:59 -07:00
Manu Sridharan 1f254e9b74 formatting, fix warnings 2013-04-29 10:12:12 -07:00
Manu Sridharan 7f9bcf2b7f fix launchers to use execution environment 2013-04-29 09:39:28 -07:00
Marcel Bruch c6e88b6d80 fixed classpath, added jericho jar to classpath 2013-04-29 13:18:36 +02:00
Marcel Bruch 91e0639232 Merge branch 'master' of https://github.com/mbruch/WALA 2013-04-29 13:14:08 +02:00
Marcel Bruch 87c164e402 added js projects to tycho build 2013-04-29 13:13:23 +02:00
Marcel Bruch 901c23d32e [releng] added preliminary maven tycho build support 2013-04-29 13:13:23 +02:00
Cosmin Radoi edbdf989a9 right classloader for call graph tests 2013-04-29 13:13:23 +02:00
Cosmin Radoi c0a8d621e2 small fix to manifest 2013-04-29 13:13:23 +02:00
Marcel Bruch df7808368a excluded test plugin execution for demo purpose 2013-04-29 13:13:23 +02:00
Marcel Bruch 7c2d18cd58 [releng] added preliminary maven tycho build support 2013-04-29 13:13:22 +02:00
Marcel Bruch 4409b351db added js projects to tycho build 2013-04-29 11:00:40 +02:00
Marcel Bruch edad282c71 [releng] added preliminary maven tycho build support 2013-04-29 10:59:27 +02:00
Manu Sridharan cdeec43267 add extra dependencies for Eclipse Juno 2013-04-29 10:57:38 +02:00
Manu Sridharan c99155e795 add extra dependencies for Eclipse Juno 2013-04-27 09:54:07 -07:00
mbruch 3ebee73694 Merge pull request #1 from cos/to-maven
To maven
2013-04-24 22:07:11 -07:00
Cosmin Radoi 680e43efce right classloader for call graph tests 2013-04-24 22:10:15 -05:00
Cosmin Radoi e9f26548c7 small fix to manifest 2013-04-24 21:59:43 -05:00
Marcel Bruch 4596492463 excluded test plugin execution for demo purpose 2013-04-19 17:56:58 +02:00
Marcel Bruch f58c47e47d [releng] added preliminary maven tycho build support 2013-04-19 17:48:57 +02:00
Manu Sridharan f439646cb1 fix potential NPE in AbstractRootMethod.addAllocation() 2013-04-15 08:58:42 +02:00
Manu Sridharan 97cae29368 add parse_error.js to excluded paths to get rid of compile error 2013-04-12 10:24:12 -07:00
Manu Sridharan 67dd61e005 update build prefs to allow for referencing restricted libs 2013-04-11 11:57:14 -07:00
Julian Dolby b90583f4fd test file for dead code with exception handlers 2013-04-11 08:26:48 -04:00
Julian Dolby 1cc5e5ce9c fixes for bug with dead code and exception handlers 2013-04-10 21:16:12 -04:00
Manu Sridharan 00eb1d2bd2 Set all projects to build against Java 6; no semantic change. Fixes #20 2013-04-10 16:01:27 -07:00
Manu Sridharan 4f7ec12edd Expose temporary file created by source extractor. Fixes #19 2013-04-10 12:22:57 -07:00
Manu Sridharan 355bf4ad69 update ignores 2013-04-10 10:42:33 -07:00
Manu Sridharan 1079d68aea delete files 2013-04-10 10:33:28 -07:00
Manu Sridharan dae0b33233 Merge branch 'master'
Conflicts:
	com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/loader/JavaSourceLoaderImpl.java
	com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/test/TestSimpleCallGraphShapeRhino.java
	com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/test/TestSimplePageCallGraphShapeRhino.java
	com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/test/TestSimplePageCallGraphShapeRhinoJericho.java
	com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/vis/JsViewerDriver.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/loader/JavaScriptLoader.java
	com.ibm.wala.cast/source/java/com/ibm/wala/cast/tree/CAstEntity.java
2013-04-09 15:56:47 -07:00
Manu Sridharan 11c6619c7f Variety of changes to JS front end.
- crash fixes
- small enhancements to prologue and preamble
- tighter handling of timeouts during CG construction
2013-04-09 15:47:22 -07:00
Manu Sridharan 368daf9427 organize imports 2013-04-09 14:16:01 -07:00
Manu Sridharan a7195852b1 don't cache synthetic method IR / DU in ExplicitNodes 2013-04-09 10:01:19 -07:00
Manu Sridharan 80557c6e6d Merge pull request #16 from cos/warning-for-ssainstruction-identity
warning on SSAInstruction equals()
2013-04-08 15:15:54 -07:00
Cosmin Radoi d137143ecf warning on SSAInstruction equals() 2013-04-08 17:08:32 -05:00
Manu Sridharan 0204a7fead Merge pull request #15 from cos/cgnode-weakref-ir-defuse
use WeakReference so that CGNode.getIR() doesn't hit the cache too often
2013-04-08 14:27:50 -07:00
Manu Sridharan 9549da9954 read runtime-visible annotations for fields 2013-04-08 13:50:26 -07:00
Manu Sridharan fa14d7a73d Require that gen'd vector contains 0. fixes #8 2013-04-08 10:51:25 -07:00
Julian Dolby 2d3b78a60d Merge branch 'master' of https://github.com/wala/WALA.git 2013-04-03 12:13:10 -04:00
Julian Dolby 321e925660 work on CHA 2013-04-03 12:12:43 -04:00
Manu Sridharan 797add310e update ignroes 2013-03-30 18:09:04 -07:00
Manu Sridharan 1ae05fa366 patch up build.xml for project rename 2013-03-30 12:25:01 -07:00
Manu Sridharan f0d68d41bc more informative assertion 2013-03-30 12:21:20 -07:00
Manu Sridharan 2a9eced391 rename com.ibm.wala.cast.java.jdt.test to com.ibm.wala.ide.jdt.test
It looks like this change was made partially before, but maybe not
completed?  Anyway, this gets our JDT test launchers to work again.
2013-03-30 11:40:18 -07:00
Manu Sridharan 3718319e58 don't commit test_project.zip 2013-03-30 08:41:45 -07:00
Manu Sridharan 2f55ba8b5b Merge pull request #13 from vazexqi/ASTJavaTypeInference-PrimAndStringOp-bug
Add the test file to com.ibm.wala.cast.java.test.data/src for pull request #12
2013-03-30 08:40:00 -07:00
Nicholas Chen 76408b6d1a Add the source file to com.ibm.wala.cast.java.test.data
Previously, I only included the source file in the zip file but just
realized the zip file is auto-generated from the
com.ibm.wala.cast.java.test.data/src folder.
2013-03-30 09:52:28 -05:00
Manu Sridharan caace4e063 Merge pull request #12 from vazexqi/ASTJavaTypeInference-PrimAndStringOp-bug
PrimAndStringOp bug in AstJavaTypeInference
2013-03-29 15:50:03 -07:00
Nicholas Chen dc4712fd75 Initialize stringClass field lazily
This ensures that when we need to use stringClass, it can be constructed
directly from the cha field. Previously, it was only initialized after
the call to super(…) in the constructor. However, by then it is too late
because super(…) calls initialize() and solve() which need the
stringClass field.
2013-03-29 17:21:45 -05:00
Nicholas Chen eed055a69a Test case exemplifying Unexpected type: class com.ibm.wala.analysis.typeInference.JavaPrimitiveType
This is a simple test case that illustrates the issue with type inference
on a String + some primitive.

The code is

package javaonepointfive;

public class TypeInferencePrimAndStringOp {
  public static void main(String[] args) {
    int a = 2;
    String result = "a" + a;
  }
}
2013-03-29 17:21:06 -05:00
Martin Mohr c2909efdbe make logging of com.ibm.wala.dalvik configurable (to switch off, just edit new config file 'logback.xml') 2013-03-28 13:07:28 +01:00
Martin Mohr a80e63093e remove unused dependency of com.ibm.wala.dalvik on com.ibm.wala.cast.java 2013-03-26 15:52:22 +01:00
sjfink c9e1b2e587 fix a bug in BitVectorVariable.copyState() involving empty vectors 2013-03-18 08:40:25 -07:00
Juergen Graf f1ad91d3bd fix typo 2013-03-12 01:53:29 +01:00
Juergen Graf 4f400a9fb5 its about time for a readme, we are not the original wala repo 2013-03-12 01:51:32 +01:00
Juergen Graf 5a06c07ca7 remove warnings from com.ibm.wala.dalvik 2013-03-12 01:24:38 +01:00
Juergen Graf 6401269da1 fix some warnings and remove absolute path in build configuration for com.ibm.wala.dalvik 2013-03-12 01:05:15 +01:00
Juergen Graf 4e507786a3 remove warnings from com.ibm.wala.ide 2013-03-12 01:00:18 +01:00
Juergen Graf 397654729d remove warnings from com.ibm.wala.shrike 2013-03-12 00:57:31 +01:00
Juergen Graf b0ada30a31 remove warnings from com.ibm.wala.util 2013-03-12 00:55:26 +01:00
Juergen Graf 61d7a33928 remove warnings in com.ibm.wala.core 2013-03-12 00:50:17 +01:00
Juergen Graf 0d7c3c3b7f no warnings in com.ibm.wala.cast.java 2013-03-12 00:30:32 +01:00
Juergen Graf 9b1cf1ae07 no warnings in com.ibm.wala.cast 2013-03-12 00:29:01 +01:00
Juergen Graf 80920368ef incorporate changes from other branch
- remove extraneous printing
- fixes for parse errors in JS and HTML
- fixes for handling parse errors in JS and HTML
- update comments
- Change BitVectorRepository to use LinkedLists
- improve javadoc
- fix for for in contexts for NEVER case
- missing VectorKill println method
2013-03-12 00:21:26 +01:00
Juergen Graf 10c66e1cb9 make common super class optional - needed for X10 frontend 2013-03-08 15:52:51 +01:00
Juergen Graf aac2e2f862 work around for that optionally does not delete JavaSourceLoaderImpl.fTypeMap 2013-03-06 17:09:45 +01:00
Julian Dolby 7c3e13d09f remove extraneous printing 2013-03-03 19:43:45 -05:00
Julian Dolby 6bb51a6e58 fixes for parse errors in JS and HTML 2013-03-01 10:08:30 -05:00
Julian Dolby 87b856928c fixes for handling parse errors in JS and HTML 2013-03-01 10:07:20 -05:00
Cosmin Radoi 3b48685d1d use WeakReference so that CGNode.getIR() doesn't hit the cache too often 2013-02-19 15:30:06 -06:00
Manu Sridharan 9112408418 update comments 2013-02-14 09:35:55 -08:00
Manu Sridharan 7579f5644a Change BitVectorRepository to use LinkedLists
This removes a nasty source of non-determinism when using
MutableSharedBitVectorIntSets.
2013-02-13 16:17:23 -08:00
Manu Sridharan 1cf9a0008b improve javadoc 2013-02-12 17:15:04 -08:00
Julian Dolby ca3f89eac9 Merge branch 'master' of https://github.com/wala/WALA.git 2013-02-08 09:14:28 +01:00
Julian Dolby 189a251a93 fix for for in contexts for NEVER case 2013-02-08 08:54:24 +01:00
Martin Mohr 123c1b9d18 do not check for activities while loading classes... 2013-02-07 17:25:06 +01:00
Manu Sridharan 8e8e5fa8ba Merge branch 'minor' of https://github.com/cos/wala into cos-minor
Conflicts:
	com.ibm.wala.core/src/com/ibm/wala/dataflow/IFDS/VectorKillFlowFunction.java
2013-02-06 16:54:46 -08:00
Cosmin Radoi aa6487fafc missing VectorKill println method
modeled after the VectorGen method
2013-02-06 18:21:01 -06:00
Martin Mohr 095caeebff also add standard scope so that standard java classes are correctly resolved 2013-02-06 20:52:37 +01:00
Martin Mohr d0d2609bf3 cleanup in com.ibm.wala.dalvik project 2013-02-06 14:29:28 +01:00
Martin Mohr 77275aad73 fix compilation problems, remove dependency on wala test project, transform eclipse project dependencies into plugin dependencies 2014-04-09 02:43:32 +02:00
Juergen Graf d77cfc60fc incorporate changes from other branch
- Annotation support
- Properly fix path-with-spaces bug.
- fix bug involving paths with spaces
- add a simple driver for building a call graph via a scope file
- Properly return null as default constructor of an array.
- organize imports
- better handling of missing bytecodes
- javadoc
- test fix
- small Javadoc fix
- added date-property.js
- 1) added InstanceKey.getCreation sites and its implementations 2) fixes for issues with keys representing dynamic properties   i) all properties are converted to strings,
- publicize method makeClasspath().  deprecate quoteStringIfNeeded()
- organize imports
- javadoc
- renamed classes to make relationship to mod-ref analysis clearer
- add support for lexical writes
- Code to compute transitive lexical accesses of methods.
- extract some generally useful code from ModRef
- Generate proper InstanceFieldKeys for property accesses with Numbers.
- rewrite to make hardest test appear last
- fix test to properly check reachability
- add an array test that doesn't quite work
- add method to get a PointerKey for a global
- compare FieldValueDispatch objects based on CGNode as well
- Handle duplicate field names between subclass and superclass.
2013-02-06 12:34:25 +01:00
Martin Mohr 09f82ecec1 Copyright notice 2013-02-06 09:03:20 +01:00
Martin Mohr 55dadb2de1 visibility change to setUpAnalysisScope 2013-02-06 08:21:53 +01:00
Julian Dolby afccdd2189 Annotation support 2013-02-02 21:27:45 -05:00
Martin Mohr 0c6f0849cd make com.ibm.wala.dalvik a plugin project 2013-02-01 11:17:27 +01:00
Martin Mohr 114e911005 helper class for commit db5f4d0ad837a5ae529c6b74fdd80eb9bada4d87 2013-02-01 11:14:09 +01:00
Martin Mohr 8eb6567e94 add android lib, model and example app to make test run possible (only temporary) 2013-02-01 11:13:03 +01:00
Martin Mohr cc239d5803 add some variants of existing methods to be independent of scandroid specific stuff 2013-02-01 11:11:41 +01:00
Martin Mohr e82155e27b delete spurious classes 2013-02-01 11:10:38 +01:00
Martin Mohr 2e8d1a9adf remove spurious com.ibm.wala.ssa classes and package (from dalvik project) 2013-01-31 17:02:51 +01:00
Martin Mohr d2288201cf fix classpath of dalvik eclipse project 2013-01-31 17:01:59 +01:00
Martin Mohr 3e9751539c new project: WALA frontend for dalvik bytecode (based on SCanDroid) 2013-01-31 16:54:35 +01:00
Martin Mohr 8806b7c119 refine last commit 2013-01-31 16:48:04 +01:00
Martin Mohr b21fd9afb3 relax visibility of some methods in SSACFG (for dalvik frontend) 2013-01-31 16:41:27 +01:00
Manu Sridharan 590347f171 Properly fix path-with-spaces bug.
The previous fix happened to work, but it did the URL decoding
in the wrong place.
2013-01-30 21:05:23 -08:00
Manu Sridharan 182363bf88 fix bug involving paths with spaces 2013-01-30 17:29:41 -08:00
Manu Sridharan 72f85ba2a9 add a simple driver for building a call graph via a scope file 2013-01-25 10:41:11 -08:00
Manu Sridharan ec8a0f1294 Properly return null as default constructor of an array.
Patch from Christophe Foket on the mailing list.
2013-01-25 10:29:49 -08:00
Manu Sridharan 1d06b2f764 organize imports 2013-01-22 15:42:04 -08:00
Manu Sridharan ba228963bf better handling of missing bytecodes
In some cases, class files will have non-abstract methods with no
bytecodes (e.g., stubs for compilation purposes).  While such a class
file is invalid, we want to enable clients to handle such an error.
With these changes, Shrike will throw an InvalidClassFileException for
such cases, and WALA's IR construction code will throw a
WalaRuntimeException.
2013-01-21 15:27:13 -08:00
Manu Sridharan 6ed7b5a88e javadoc 2013-01-10 09:48:38 -08:00
Manu Sridharan 6465edbaee test fix 2013-01-09 14:30:56 -08:00
Manu Sridharan 29c73cea83 Merge branch 'lexical-access-info' 2013-01-09 14:27:14 -08:00
Manu Sridharan 202d5d525f small Javadoc fix 2013-01-09 14:25:41 -08:00
Julian Dolby 309fb33689 added date-property.js 2013-01-08 20:38:32 -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
sjfink 583ebd3ce4 publicize method makeClasspath(). deprecate quoteStringIfNeeded() 2013-01-04 13:30:44 -08:00
Manu Sridharan 730151956f organize imports 2013-01-04 12:00:26 -08:00
Manu Sridharan 7cf0baeee3 javadoc 2013-01-04 11:34:02 -08:00
Manu Sridharan bf6b6bd685 renamed classes to make relationship to mod-ref analysis clearer 2013-01-04 09:35:04 -08:00
Manu Sridharan 5aa3a16587 add support for lexical writes 2013-01-03 16:09:48 -08:00
Manu Sridharan 26e7eb50ba Code to compute transitive lexical accesses of methods.
The TransitiveLexicalAccesses class computes the lexical variables
read by a CGNode and its transitive callees.  Also, a basic test case.
2013-01-03 15:58:07 -08:00
Manu Sridharan 8ed998a249 extract some generally useful code from ModRef 2013-01-03 15:57:38 -08:00
Manu Sridharan 6084f4ff61 Generate proper InstanceFieldKeys for property accesses with Numbers.
Note that this change actually breaks a couple of our unit tests.  But,
it seems they were only passing by accident before anyway, and this change
at least leads to a more consistent handling of dynamic property accesses
with String vs. Number property names.
2012-12-18 10:11:59 -08:00
Manu Sridharan 6677587ff5 rewrite to make hardest test appear last 2012-12-18 10:11:43 -08:00
Juergen Graf 0d12f90232 add additional definition of natives.xml that has no references to com.ibm.wala.model classes 2012-12-18 14:11:55 +01:00
Manu Sridharan dd98150ed8 fix test to properly check reachability 2012-12-17 20:38:17 -08:00
Manu Sridharan 1bf2c64ba7 add an array test that doesn't quite work 2012-12-17 16:52:31 -08:00
Juergen Graf 41fdb087bb ignore nativespec if attribute is null 2012-12-15 03:59:24 +01:00
Manu Sridharan 5bcdb30014 add method to get a PointerKey for a global 2012-11-30 13:37:34 -05:00
Manu Sridharan 4a87d7b145 compare FieldValueDispatch objects based on CGNode as well 2012-11-30 11:04:48 -05:00
Manu Sridharan 77b81b4181 Handle duplicate field names between subclass and superclass.
Patch from Christophe Foket on the mailing list.
2012-11-30 09:18:00 -05:00
Juergen Graf 9fac9e9a30 Merge branch 'wala' into master 2012-11-30 04:46:24 +01:00
Juergen Graf 56780b5076 treat null as neutral element for intersection, as it is the default value for uninitialized variables 2012-11-30 03:16:17 +01:00
sjfink 10172606bb add project-specific settings to build with 1.6 compiler 2012-11-29 13:47:01 -08:00
Juergen Graf 9503100d8b fix bug in intersection framework - aborted too early 2012-11-29 17:46:38 +01:00
Manu Sridharan 160337ac85 Create new project com.ibm.wala.ide.jsdt.tests.
We want a separate project for these tests, so beginning users
aren't forced to install JSDT to run the older tests in
com.ibm.wala.ide.tests.
2012-11-28 12:09:55 -05:00
sjfink 846a047aba change handling of vm args to avoid problems with spaces 2012-11-27 22:19:57 -08:00
sjfink 4f06e75e8d fix a logging statement 2012-11-27 22:18:47 -08:00
sjfink d78e8fe25c delete debugging printf statement 2012-11-27 15:18:48 -08:00
sjfink 1448f506eb revamp JavaLauncher sequence to avoid problems with spaces on MacOS 2012-11-27 14:47:09 -08:00
sjfink f2a14ecb52 add a version of spawnProcess() that accepts an array of Strings. This version should be used for commands that involve spaces on MacOSX. 2012-11-27 14:15:23 -08:00
Manu Sridharan 070e3989cf fix missing detection of certain static initializer calls
Patch from Christophe Foket on the mailing list.
2012-11-27 14:04:00 -05:00
Manu Sridharan f0d75ede73 update ignores 2012-11-27 13:53:31 -05:00
Juergen Graf bb6d890976 explicit cast in InSetVariable - removes compiler error 2012-11-22 14:02:13 +01:00
Manu Sridharan fea7d4b35d Merge branch 'master' of riverdale.watson.ibm.com:jsanalysis 2012-11-21 11:39:54 -08:00
Manu Sridharan 821479d1a6 remove unnecessary casts 2012-11-21 11:39:25 -08:00
Max Schaefer d09fc511e2 Added a logging stopwatch for debugging. 2012-11-20 10:45:56 -05:00
Juergen Graf 6990401629 use java 1.6 for wala.util 2012-11-13 18:25:16 +01:00
Juergen Graf b82d5dba90 Merge branch 'wala' into master 2012-11-06 04:23:10 +01:00
Juergen Graf 8383eb440f make mutable cfg an actual control flow graph 2012-11-05 21:30:59 +01:00
Juergen Graf b6ce6673a8 add intersection bitvector operator 2012-11-05 21:30:25 +01:00
Manu Sridharan d5dc65268e don't let nanny thread for timeout prevent JVM exit 2012-10-26 14:29:24 -07:00
Max Schaefer 928c5337f0 Added utility method to filter a collection by element type. 2012-10-11 11:49:39 -04:00
Manu Sridharan 3ee6f9d229 Merge branch 'master' of github.com:wala/WALA 2012-10-08 13:34:04 -07:00
Manu Sridharan fae5d9f3dd weaken recursion check slightly 2012-10-08 13:33:45 -07:00
Manu Sridharan bcee68c412 bug fix in generated IR 2012-10-08 13:32:59 -07:00
dolby d8985fe60b Merge branch 'master' of https://github.com/wala/WALA.git 2012-10-03 10:53:39 -04:00
dolby f7a7d66b28 move loop unrolling code to wala from Miniatur/MemSAT 2012-10-03 10:53:04 -04:00
Manu Sridharan 695b9948a3 fix getNodes() to correctly return nodes corresponding to constructors 2012-10-02 12:27:31 -07:00
dolby fae5c86114 fixes for users of JDT interfaces, such as Miniatur/MemSAT 2012-10-01 13:11:10 -04:00
dolby d7b2b3cd30 Merge branch 'master' of https://github.com/wala/WALA.git 2012-10-01 12:10:35 -04:00
Manu Sridharan fadcbe538d Merge branch 'master' of riverdale.watson.ibm.com:jsanalysis 2012-09-28 15:52:00 -07:00
Manu Sridharan 2560d12826 fix equals() method to check offsets 2012-09-28 15:51:12 -07:00
dolby 7716e38ac4 Merge branch 'master' of https://github.com/wala/WALA.git 2012-09-24 15:44:26 -04:00
dolby a1589d833a refactoring of support for tests with Eclipse projects 2012-09-24 15:43:51 -04:00
Max Schaefer 69b93ca7a5 More principled way of checking whether a file belongs to the harness. 2012-09-24 14:01:47 -04:00
Manu Sridharan 27d9f65b63 add some Javadoc 2012-09-20 12:08:31 -04:00
Manu Sridharan 210d4c53ea improved Javadoc 2012-09-19 11:45:49 -04:00
Manu Sridharan a87d486b42 export another package 2012-09-19 11:45:31 -04:00
Manu Sridharan a3efc8bbc3 Merge branch 'master' of riverdale.watson.ibm.com:jsanalysis 2012-09-18 14:07:37 -04:00
Max Schaefer e130a5b963 Some refactoring of prologue.js and preamble.js to use more consistent
names.
2012-09-18 13:22:17 -04:00
Manu Sridharan e4c9c7ab91 add some javadoc 2012-09-12 11:36:54 -07:00
sjfink 0d971c3602 add bin/ to svn:ignore 2012-09-04 20:33:54 -07:00
Manu Sridharan 24eb803211 organize imports; no semantic change 2012-09-04 16:24:37 -07:00
Manu Sridharan 494af3c53f expose isRef() method 2012-09-04 16:10:21 -07:00
Manu Sridharan 60db861a5f complete conversion to Unix line endings 2012-09-04 16:05:49 -07:00
Manu Sridharan 56f3d847a5 more conversion to Unix line endings 2012-09-04 15:59:50 -07: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
Manu Sridharan fcab11e5b8 Remove dependence from com.ibm.wala.ide to com.ibm.wala.cast.
Removing this dependence allows our Getting Started instructions to still work.
It requires some minor code duplication, but otherwise we'd have to change a
bunch of documentation.
2012-09-04 10:38:40 -07:00
dolby 6201675d95 Merge branch 'master' of https://github.com/wala/WALA.git 2012-08-31 15:47:04 -04:00
dolby 4cc3a08b63 comment attempting to explain how 'dimensionality' works 2012-08-31 15:45:56 -04:00
Manu Sridharan e9b6d232c7 Merge branch 'master' of riverdale.watson.ibm.com:jsanalysis 2012-08-30 14:37:35 -07:00
dolby 5f0b0ea956 Two fixes for mapping source positions to IR
1: get the right position for methods from the JDT AST
2: more seriously, there was a nasty bug in how source positions got
mapped in unwound code: mappings were wrong for instructions that
were the result of duplicating code to replicate unwind handling in
exceptional and non-local exits.
2012-08-30 12:10:30 -04:00
Max Schaefer 2a13228e50 Fixed for-in loop body extractor after recent changes to CAst representation of for-in loops. 2012-08-30 10:55:19 -04:00
Max Schaefer a77d28c68d Merge remote-tracking branch 'github/master' 2012-08-30 10:31:51 -04:00
Manu Sridharan 931e2b8b4b remove Mozilla page tests 2012-08-29 14:41:02 -07:00
Manu Sridharan 39639b6bd4 update ignores 2012-08-29 14:36:03 -07:00
dolby 932c75be3c type-o 2012-08-29 17:27:01 -04:00
dolby fd593fb171 not sure why this is needed, but i get errors without it 2012-08-29 17:26:16 -04:00
dolby ff464402ec forgot this one 2012-08-29 17:24:04 -04:00
dolby 707d89019c forgot to add these 2012-08-29 17:21:43 -04:00
dolby 319eacc529 merge changes and changes for atomic sets work 2012-08-29 16:35:34 -04:00
Manu Sridharan 8f2ac704f4 remove assertion related to source positions 2012-08-29 10:34:50 -07:00
dolby 17ab92b8f2 assert that the first line number is always not -1 2012-08-28 21:49:04 -04:00
Manu Sridharan 5b8da4ad32 oops, really fix the merge conflict 2012-08-28 13:13:10 -07:00
Manu Sridharan 3e04aba5fb Merge branch 'master' of riverdale.watson.ibm.com:jsanalysis
Conflicts:
	com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/util/CallGraph2JSON.java
2012-08-28 13:12:01 -07:00
Manu Sridharan 7147e6c86e update rhino regression launcher for new project structure 2012-08-28 13:06:34 -07:00
Manu Sridharan 419d1d50cc Merge branch 'github_master' and remove Eclipse dependencies.
Specifically, rewrite ProgressMaster to not depend on Eclipse, and move
to com.ibm.wala.util.  Now, we can use timeout-based code in packages
without introducing an Eclipse dependency.
2012-08-28 12:39:52 -07:00
Manu Sridharan 06205fdb73 patch from mailing list to handle different constructor arguments for ClassLoaderImpl 2012-08-28 10:51:20 -07:00
Manu Sridharan 35c1489e5e Merge branch 'github_master' into internal_merge 2012-08-28 10:04:46 -07:00
Manu Sridharan 9f732622f0 don't require Eclipse 3.8 in version dependencies 2012-08-28 10:02:48 -07:00
Manu Sridharan 4c7575a1af Merge branch 'github_master' into internal_merge 2012-08-28 09:23:17 -07:00
dolby e946d1deb9 fixes for misuse of getDimensionality 2012-08-28 12:02:48 -04:00
dolby 6c374aa030 bcel has moved 2012-08-28 11:22:25 -04:00
dolby ffff4c244d fix for bug in reading xml summaries 2012-08-28 11:10:46 -04:00
dolby 0518b5242b more JS stuff 2012-08-22 12:15:46 -04:00
dolby 0a3acfde4a Merge branch 'master' of https://github.com/wala/WALA.git 2012-08-21 23:07:43 -04:00
Manu Sridharan bb2c45803c Merge branch 'github_master' into internal_merge 2012-08-21 16:57:27 -07:00
Manu Sridharan cf04da7613 handle a couple of corner cases. some (very) basic support for pointer / reference types 2012-08-21 16:56:50 -07:00
Manu Sridharan bab4777e4c some (very) basic support for pointer / reference types 2012-08-21 16:56:18 -07:00
Manu Sridharan 800203a71f improved documentation 2012-08-21 16:55:30 -07:00
Julian Dolby 4a850a9510 added the com.ibm.wala.ide.jdt project 2012-08-21 18:52:09 -04:00
sjfink 3b2c9afa42 attempted fix for possible Heisenbug caused by misuse of non-blocking I/O API. 2012-08-21 15:03:26 -07:00
dolby 3f47e6e4b2 Revert "fixes for java soiurce positions"
This reverts commit 59fc11b5f3.
2012-08-21 16:22:03 -04:00
dolby 53cad9e7ba more separation for JS eclipse stuff 2012-08-21 16:06:01 -04:00
dolby a54707f22e separate JSDT stuff 2012-08-21 15:53:16 -04:00
sjfink e37d67c7d2 change Launcher logging to level info() 2012-08-21 10:49:33 -07:00
dolby 72e8dc9098 reorganize stuff for using JavaScript stuff from Eclipse 2012-08-21 09:48:53 -04:00
Juergen Graf b8477d2144 incorporate changes from other branch
- basic compatibility with Java 7 (i.e., don't crash immediately)
- Added utility class for converting call graphs to JSON.
- add edgeExists CLI option to check if some edge exists in the call graph
2012-08-06 12:49:03 +02:00
Manu Sridharan 3317c1ccf6 basic compatibility with Java 7 (i.e., don't crash immediately) 2012-08-03 15:41:09 -07:00
Max Schaefer f091bb3aca Added utility class for converting call graphs to JSON. 2012-07-31 14:31:34 -04:00
Max Schaefer 4dc8bf18bc Merge branch 'master' of riverdale.watson.ibm.com:jsanalysis 2012-07-31 14:15:19 -04:00
Max Schaefer c9bdd48360 Added utility class for serialising call graphs to JSON. 2012-07-31 14:14:04 -04:00
Manu Sridharan 7aaba4bc5a Bug fix in dispatch logic + test
Due to constant parameters, we can't assume that constraints don't need
to be generated when we've already seen a target at a call site (since
the previous constraints may have only passed certain constant parameter
values, rather than all parameter values).  Add a check to handle these
cases correctly.
2012-07-30 12:40:48 -07:00
Manu Sridharan b940e9dc0a add edgeExists CLI option to check if some edge exists in the call graph 2012-07-26 15:26:59 -07:00
Manu Sridharan eb0524c634 tests were failing when run as part of the suite 2012-07-20 16:27:17 -07:00
Manu Sridharan 2299d8a13a improve caching of receiver values when handling dispatch 2012-07-17 12:11:55 -07:00
Juergen Graf 883b5f2437 detect catch all and remove exception flow to exit then 2012-07-17 20:05:51 +02:00
Juergen Graf 4ff1211dad equals for OrdinalSets 2012-07-17 17:44:03 +02:00
Juergen Graf 4648f0404a Merge branch 'wala' into master 2012-07-17 13:57:43 +02:00
Manu Sridharan 9847bf21f4 Merge remote-tracking branch 'origin/master' 2012-07-12 10:30:56 -07:00
Manu Sridharan 9a0e105e51 fix so that new lexical scheme can be enabled with Java frontends 2012-07-12 10:27:24 -07:00
Max Schaefer a3d8a0c757 Renamed two test methods. 2012-07-09 14:24:36 -04:00
Max Schaefer c5e31617e1 Some more tests. 2012-07-09 14:22:34 -04:00
Max Schaefer d40729c444 Small improvement to treatment of generated names in extraction tests. 2012-07-05 16:31:58 -04:00
Max Schaefer b4172d5920 Test for break statements that break out of a non-loop statement. This
is currently not handled correctly by the translation to CAst.
2012-07-05 15:51:04 -04:00
Max Schaefer 3fe9bedf95 Can now pass a JS file to HTMLCGBuilder, it will create a simple wrapper
HTML file.
2012-07-05 15:50:02 -04:00
Max Schaefer ff3416a89f Be more careful when determining source-level names for SSA variable to
avoid index-out-of-bounds accesses.
2012-07-05 11:20:25 -04:00
Max Schaefer 468f0a9864 Added a workaround for differences in generated names between actual and
expected output in some of the tests.
2012-07-05 09:56:53 -04:00
Max Schaefer fca3999e9a Fixed rewriting of non-constant switch cases. 2012-07-05 09:37:47 -04:00
Max Schaefer 5ba9b7b735 Merge branch 'master' of git@riverdale.watson.ibm.com:jsanalysis 2012-07-05 08:34:01 -04:00
Max Schaefer 9d1d198777 New test case for call graph construction. 2012-07-04 15:29:16 -04:00
Manu Sridharan f6e52c9b93 Merge remote-tracking branch 'riverdale/master' 2012-07-04 10:27:13 -07:00
Max Schaefer 7bdc127ce5 Workaround for invalid end positions in CAst. 2012-07-04 12:19:05 -04:00
dolby d0d1ff1a2b Merge branch 'master' of https://github.com/wala/WALA.git 2012-07-03 19:22:37 -04:00
dolby f7eb9bd174 apply changes for WALA git issue 3 2012-07-03 19:22:08 -04:00
Manu Sridharan 1a5f8954f2 fix NPE 2012-07-03 15:55:14 -07:00
Manu Sridharan 76ca05ccb8 comment out manual enabling of CG dumps; we really need a better solution here 2012-07-03 15:55:02 -07:00
Manu Sridharan ec2b83ff1b don't run the jquery test as part of the standard regression; we don't scale yet 2012-07-03 15:07:20 -07:00
dolby 81c16d8121 ignore junk 2012-07-02 13:59:50 -04:00
dolby 1965001200 adapt to changes in source position mapping 2012-07-02 13:38:59 -04:00
Julian Dolby d10557f537 Merge branch 'master' of https://github.com/wala/WALA 2012-07-02 13:35:57 -04:00
Julian Dolby 1c7177fc4a use default jre 2012-07-02 13:35:49 -04:00
dolby 4b3cba710d changes from upstream 2012-06-29 15:47:54 -04:00
dolby 59fc11b5f3 fixes for java soiurce positions 2012-06-29 15:45:42 -04:00
dolby e241e755b3 fix to launcher 2012-06-29 14:46:37 -04:00
Manu Sridharan 12a9aa6e24 fixing launchers 2012-06-28 10:31:55 -07:00
Manu Sridharan 7045a06e51 Remove com.ibm.wala.j2ee
The code has bitrotted with respect to trunk and is causing confusion.
2012-06-27 17:45:39 -07:00
Manu Sridharan 10aac25586 added documentation 2012-06-19 21:48:32 -07:00
Juergen Graf cb02231692 Read jar files from input stream as a fallback. Do not rely on existsing files. 2012-06-08 15:24:38 +02:00
Juergen Graf 69846ed275 ignore output of smali example tests 2012-05-21 11:26:15 +02:00
Juergen Graf 42c1016d96 remove duplicate class from wrong package 2012-05-21 11:25:26 +02:00
Juergen Graf 1bf5b73e74 static initializer order detection stuff from Martin Seidel 2012-05-18 15:58:47 +02:00
Juergen Graf 627fbc15c3 static initializer tests 2012-05-16 14:02:29 +02:00
Juergen Graf 10792bec73 Merge branch 'wala' into master 2012-05-16 14:02:20 +02:00
Manu Sridharan 0938354288 Fix for bug reported by Thomas Deuster on mailing list.
The issue was that it's possible for multiple invoke instructions with
different actual parameters to be associated with a single CallSiteReference.
In this case, the invariant parameters for each invoke instruction may differ.
2012-05-15 09:40:39 -06:00
Manu Sridharan bef88569dd Merge pull request #2 from dperelman/master
Making CallStringContext easier to work with
2012-05-14 18:16:43 -07:00
Daniel Perelman abeba01a16 Made CallString's .toString() more informative. 2012-05-14 17:58:29 -07:00
Daniel Perelman 49c00ca231 Made CallStringContextSelector correctly call base's getRelevantParameters(). 2012-05-14 17:57:28 -07:00
Daniel Perelman f049b24934 Added getters used in my code. 2012-05-14 17:55:40 -07:00
Manu Sridharan ca6701f4b5 add copyright notice 2012-05-14 14:38:35 -06:00
Manu Sridharan 3003b9e579 Merge branch 'zero-length-arrays' 2012-05-12 18:29:03 -06:00
dolby b6ee356641 tests for source mapping 2012-05-11 15:03:10 -04:00
Manu Sridharan c415f3e0fd Enhanced pointer analysis to reason that arrays known to be of zero length
cannot have any contents.
2012-05-09 15:35:54 -06:00
dolby b2034ed90f extensions to HTML file source position tracking 2012-05-08 14:03:43 -04:00
dolby b89fdf73f3 Merge branch 'master' of https://github.com/wala/WALA.git 2012-05-08 13:17:22 -04:00
dolby dfe06b8ff3 changes to Web source mapping to exploit rhino 1.7R3 source offsets 2012-05-08 13:17:01 -04:00
Manu Sridharan 28a351200d handle invocations of static methods in ReceiverTypeContextSelector (patch from Daniel Perelman) 2012-05-03 16:30:55 -06:00
Juergen Graf c71fa6674a Merge branch 'wala' into master 2012-04-19 14:39:05 +02:00
Juergen Graf 88ca1eafad interproc exception analysis: remove unneccessary special treatment of fakeRoot 2012-04-19 14:29:58 +02:00
Manu Sridharan e0ef5d4844 update ignores 2012-04-17 15:37:38 -04:00
Manu Sridharan 02ba68a349 update manifests for move of the CorePlugin class 2012-04-17 15:37:27 -04:00
Manu Sridharan bad82b77ed Merge branch 'master' into eclipse-dep 2012-04-17 15:15:10 -04:00
dolby 51a99cab66 enable assertions 2012-04-17 14:58:12 -04:00
dolby 803f664b15 automate building of test project for JDT wala tests 2012-04-17 12:51:43 -04:00
Manu Sridharan c116f16823 got code to compile again, and wala.core regression tests pass 2012-04-16 22:30:03 -04:00
Manu Sridharan e0d3df8ea7 Merge branch 'fileprovider-instance' into eclipse-dep 2012-04-16 14:57:42 -04:00
Manu Sridharan 2edb070437 changed FileProvider to have instance methods 2012-04-16 14:57:14 -04:00
Manu Sridharan 1b4e0828d6 remove Eclipse dependencies from wala.core MANIFEST.MF; still need to fix up code 2012-04-16 13:47:49 -04:00
Manu Sridharan 43848b6e58 Merge branch 'master' of github.com:wala/WALA 2012-04-11 21:27:35 -04:00
Manu Sridharan 977652da16 updated for move to GitHub 2012-04-06 11:01:47 -06:00
Juergen Graf 6a8e8fe018 remove no longer needed work-around for duplicate field names 2012-04-04 11:53:17 +02:00
Juergen Graf 1090e59717 Merge branch 'wala' into master 2012-04-04 11:27:23 +02:00
msridhar1 676a72bac2 fix for issue 3506051 from SourceForge tracker
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4555 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-04-03 22:48:10 +00:00
Juergen Graf 34674387e6 code cleanup of nullpointer analysis
- replace tabs with whitespace
- adjust documentation to refer to renamed stuff
2012-03-30 13:43:57 +02:00
Juergen Graf acde4add28 add toString method for interprocedural exception analysis result 2012-03-30 13:10:40 +02:00
Juergen Graf 2fdd730c60 add assertion for name clashes of field with same name but different type - as it may occur in obfuscated bytecode 2012-03-29 02:12:29 +02:00
Juergen Graf 0a5cc40347 added interface for convenient computation of interprocedural nullpointer analysis 2012-03-29 02:08:05 +02:00
Juergen Graf 5ab421aba2 added a small disclaimer to the interprocedural nullpointer analysis 2012-03-29 01:08:31 +02:00
Juergen Graf d35bde3fe9 add cancel exception to interproc nullpointer analysis 2012-03-29 00:57:09 +02:00
Juergen Graf 99a5958c7e nullpointer analysis code cleanup 2012-03-29 00:50:05 +02:00
Juergen Graf 9033474819 first version of interprocedural nullpointer analysis 2012-03-28 22:30:16 +02:00
Juergen Graf f7c56b0b34 fix typo in intrapro nullpointer analysis 2012-03-28 22:29:07 +02:00
Juergen Graf d94a3d5b64 work around multiple fields with single name 2012-03-19 14:58:41 +01:00
Juergen Graf 7477b1730b Merge branch 'wala' into master 2012-03-19 13:33:48 +01:00
Martin Mohr 51eefa355b find java runtime lib if property has not been set 2011-11-22 14:26:56 +01:00
Juergen Graf bf923dc2b5 progressmonitor can now be used to cancel operations 2011-11-22 14:26:30 +01:00
Juergen Graf 8494f98106 Merge branch 'wala' into master 2011-11-09 13:03:31 +01:00
Juergen Graf f7741c7771 subtasks in monitorutil 2011-10-27 15:15:15 +02:00
Juergen Graf 0f66936790 Merge branch 'wala' into master 2011-10-26 14:34:59 +02:00
Juergen Graf 9421f84c4c add extended sourcecode position info reader to wala project.
remove dependency to sourceinfo project.
2011-10-26 14:33:47 +02:00
Juergen Graf 44a3dae093 Merge branch 'wala' into master 2011-10-21 15:15:20 +02:00
Juergen Graf fa5a0aa452 mod ref field access analysis 2011-09-20 15:50:39 +02:00
Juergen Graf c240d41b4f Merge branch 'wala' into master 2011-08-16 22:16:32 +02:00
Juergen Graf 62820d2fba create default properties if no wala.properties file exists 2011-07-29 14:06:14 +02:00
Juergen Graf 26d65e9f9c added callgraph pruning to remove less relevant library methods 2011-07-28 12:08:59 +02:00
Juergen Graf 6877158843 load scope file from jar as fallback 2011-07-27 13:44:38 +02:00
Juergen Graf efb729e038 Merge branch 'wala' into master 2011-07-27 01:15:29 +02:00
Juergen Graf 496a98c4bd add possiblility to search existing types without creating new ones 2011-07-14 21:35:46 +02:00
Juergen Graf f5ac0c543f Merge branch 'wala' into master 2011-07-12 19:50:39 +00:00
Juergen Graf f8d6f5b917 Merge branch 'wala' into master 2011-05-27 12:25:53 +02:00
Juergen Graf 4bbfb9e0a4 add javascript example 2011-05-26 16:45:19 +02:00
Juergen Graf b84657d1a9 add some new classes from wala 2011-05-26 16:43:36 +02:00
Juergen Graf a76f93a28c Merge branch 'wala' into master 2011-04-13 13:02:15 +02:00
Juergen Graf ee3c56b9e9 instruction index in SSAInstruction for javascript 2011-04-13 12:56:36 +02:00
Juergen Graf 7c518d1867 added instruction index field to SSAInstruction (javascript not working atm) 2011-04-12 19:49:06 +02:00
Juergen Graf 8c04179fcc remove unused class of exception analysis 2011-04-12 17:02:39 +02:00
Juergen Graf 2d3052bede intraprocedural nullpointer exception analysis 2011-04-11 16:28:51 +02:00
Juergen Graf 5c43668553 Merge branch 'wala' into master 2011-04-11 16:40:48 +02:00
Juergen Graf bef3480898 fix for empty cfg entry node was incomplete... fix fixed ;) 2011-04-06 14:22:11 +02:00
Juergen Graf cbb9f421a9 advanced sythetic instructions for initial points-to/aliasing set up 2011-03-30 13:03:16 +02:00
Juergen Graf fe5d5cdcb2 custom caching to guarantee: method.getIR() == method,getIR() - also for contained IR statements 2011-03-30 13:03:16 +02:00
Juergen Graf 56cdf169b0 distinguish control deps from data deps in the pdg 2011-03-30 13:03:16 +02:00
Juergen Graf baf67a8dbb setter for native spec (.xml) file
added fallback: load xml from filesystem if loading from jar does not work
2011-03-30 13:03:16 +02:00
Juergen Graf 211e542ee5 entry and exit nodes in every cfg 2011-03-30 13:03:16 +02:00
Juergen Graf b9cd802759 setter for pointerkey factory
public phi nodes
2011-03-30 13:03:16 +02:00
Juergen Graf 442975b603 implement hasEdge for exploded cfg + fix entry nodes with instruction 2011-03-30 13:03:16 +02:00
Juergen Graf 1a67e8817c remember unresolved classes 2011-03-30 13:03:16 +02:00
Juergen Graf 47711fd310 read enhanced bytecode postions from class attributes 2011-03-30 13:03:16 +02:00
Juergen Graf d7ebb57ee6 add substasks to progressmonitor 2011-03-30 13:03:16 +02:00
Juergen Graf e2a0abc119 only run dot-exe if the property is set 2011-03-30 13:03:16 +02:00
Juergen Graf eb8edb4f2e ignore wala.properties file - it is system specific and must be created by the developer 2011-03-30 13:03:16 +02:00
Juergen Graf 8222680f61 ignore generated and temp files 2011-03-30 13:02:56 +02:00
2859 changed files with 293947 additions and 202804 deletions

6
.dir-locals.el Normal file
View File

@ -0,0 +1,6 @@
((groovy-mode
(c-file-style . "bsd")))
;; Local variables:
;; flycheck-disabled-checkers: (emacs-lisp emacs-lisp-checkdoc)
;; End:

59
.gitignore vendored
View File

@ -1,12 +1,51 @@
*.DS_Store
*.class
*.out
*.swp
*/bin/
com.ibm.wala.cast.js.rhino/lib/
com.ibm.wala.cast.js/lib/
com.ibm.wala.cast.java.polyglot/lib/
com.ibm.wala.cast.java.test.data/src/JLex/
.metadata/
*/bin/*
*/build/
*~
com.ibm.wala.cast.js.test/examples-src/ajaxslt/
com.ibm.wala.core.testdata/@dot/
com.ibm.wala.core.testdata/lib/
com.ibm.wala.core/dat/wala.properties
com.ibm.wala.cast.js.html.nu_validator/lib/
.classpath
.metadata/
.project
/*/.settings/org.eclipse.buildship.core.prefs
/.gradle/
/.settings/org.eclipse.buildship.core.prefs
/.vscode/settings.json
/build/
/com.ibm.wala.*/out/
/com.ibm.wala.cast.java.jdt.test/
/com.ibm.wala.cast.java.polyglot/lib/
/com.ibm.wala.cast.java.test.data/src/JLex/
/com.ibm.wala.cast.java.test/testdata/
/com.ibm.wala.cast.js.html.nu_validator/lib/
/com.ibm.wala.cast.js.nodejs/lib/
/com.ibm.wala.cast.js.rhino.test/*.dump
/com.ibm.wala.cast.js.rhino.test/*.html*
/com.ibm.wala.cast.js.rhino.test/2009_swine_flu_outbreak
/com.ibm.wala.cast.js.rhino.test/?game*
/com.ibm.wala.cast.js.rhino.test/BunnyHunt
/com.ibm.wala.cast.js.rhino.test/digg_attack
/com.ibm.wala.cast.js.rhino.test/game.php*
/com.ibm.wala.cast.js.rhino.test/xxxx
/com.ibm.wala.cast.js.rhino/lib/
/com.ibm.wala.cast.js.test.data/examples-src/ajaxslt/
/com.ibm.wala.cast.js.test/examples-src/ajaxslt/
/com.ibm.wala.cast.js/lib/
/com.ibm.wala.cast/lib/
/com.ibm.wala.core.testdata/*.jar
/com.ibm.wala.core.testdata/@dot/
/com.ibm.wala.core.testdata/lib/
/com.ibm.wala.core.tests/report
/com.ibm.wala.core/@dot
/com.ibm.wala.core/com.ibm.wala.core*.jar
/com.ibm.wala.core/dat/wala.properties
/com.ibm.wala.dalvik.test/data/sample.cup
/com.ibm.wala.dalvik.test/parser.java
/com.ibm.wala.dalvik.test/report
/com.ibm.wala.dalvik.test/sym.java
/com.ibm.wala.ide.jdt.test/testdata/
/edu.kit.wala.smali.test/out/
results
target/

6
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
*.iml
/libraries/*.xml
/modules.xml
/tasks.xml
/usage.statistics.xml
/workspace.xml

51
.idea/gradle.xml Normal file
View File

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/buildSrc" />
<option value="$PROJECT_DIR$/com.ibm.wala-repository" />
<option value="$PROJECT_DIR$/com.ibm.wala.cast" />
<option value="$PROJECT_DIR$/com.ibm.wala.cast.java" />
<option value="$PROJECT_DIR$/com.ibm.wala.cast.java.ecj" />
<option value="$PROJECT_DIR$/com.ibm.wala.cast.java.test" />
<option value="$PROJECT_DIR$/com.ibm.wala.cast.java.test.data" />
<option value="$PROJECT_DIR$/com.ibm.wala.cast.js" />
<option value="$PROJECT_DIR$/com.ibm.wala.cast.js.html.nu_validator" />
<option value="$PROJECT_DIR$/com.ibm.wala.cast.js.nodejs" />
<option value="$PROJECT_DIR$/com.ibm.wala.cast.js.nodejs.test" />
<option value="$PROJECT_DIR$/com.ibm.wala.cast.js.rhino" />
<option value="$PROJECT_DIR$/com.ibm.wala.cast.js.rhino.test" />
<option value="$PROJECT_DIR$/com.ibm.wala.cast.js.test" />
<option value="$PROJECT_DIR$/com.ibm.wala.cast.js.test.data" />
<option value="$PROJECT_DIR$/com.ibm.wala.cast.test" />
<option value="$PROJECT_DIR$/com.ibm.wala.core" />
<option value="$PROJECT_DIR$/com.ibm.wala.core.testdata" />
<option value="$PROJECT_DIR$/com.ibm.wala.core.tests" />
<option value="$PROJECT_DIR$/com.ibm.wala.dalvik" />
<option value="$PROJECT_DIR$/com.ibm.wala.dalvik.test" />
<option value="$PROJECT_DIR$/com.ibm.wala.ide" />
<option value="$PROJECT_DIR$/com.ibm.wala.ide.jdt" />
<option value="$PROJECT_DIR$/com.ibm.wala.ide.jdt.test" />
<option value="$PROJECT_DIR$/com.ibm.wala.ide.jsdt" />
<option value="$PROJECT_DIR$/com.ibm.wala.ide.jsdt.tests" />
<option value="$PROJECT_DIR$/com.ibm.wala.ide.tests" />
<option value="$PROJECT_DIR$/com.ibm.wala.ide_feature" />
<option value="$PROJECT_DIR$/com.ibm.wala.scandroid" />
<option value="$PROJECT_DIR$/com.ibm.wala.shrike" />
<option value="$PROJECT_DIR$/com.ibm.wala.tests.ide_feature" />
<option value="$PROJECT_DIR$/com.ibm.wala.tests_feature" />
<option value="$PROJECT_DIR$/com.ibm.wala.util" />
<option value="$PROJECT_DIR$/com.ibm.wala_feature" />
</set>
</option>
<option name="useAutoImport" value="true" />
</GradleProjectSettings>
</option>
</component>
</project>

7
.idea/misc.xml Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="Java 1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@ -0,0 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="After Opening Pristine Project" type="GradleRunConfiguration" factoryName="Gradle" singleton="true">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="prepareIntelliJIDEA" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<method />
</configuration>
</component>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

321
.travis.yml Normal file
View File

@ -0,0 +1,321 @@
sudo: false
android:
components:
- build-tools-26.0.2
addons:
apt:
packages:
- realpath
- xvfb
before_install:
- set -e
- source "travis/before-install-$BUILD_SYSTEM"
install: source "travis/install-$BUILD_SYSTEM"
script: source "travis/script-$BUILD_SYSTEM"
before_cache: source "travis/before-cache-$BUILD_SYSTEM"
cache:
directories:
- "$HOME/.goomph"
- "$HOME/.gradle/caches"
- "$HOME/.gradle/wrapper"
- "$HOME/.m2"
- "$HOME/apache-maven-3.5.0"
- "$TRAVIS_BUILD_DIR/com.ibm.wala.core.testdata/ocaml/ocamljava-2.0-alpha1/lib"
env:
global:
- secure: KcugjQYnBqeZ7XenZD5QY7jhekVPO0QpQyjDUteLytaokhyRK2g6eNvr/pPerN2uWUvsPwO18P9F+oOupge1cpPZf4cEY8RzLIromyUoRWd6JA0SKciUYdN2kSqnC4uZSJGXeGLoroyEEL4Q2sqimpkbIGxgxYtVniWgJULOyR4=
- secure: jacvGPYX4ugG/HgwJEEpWnllWsS/ipX+qRJ7qM5mbDYryeqsz0eiaxBxQ6IpDyj0v6O4DUi74lSQs/UxCWcUxvOn/5AweCZfoF1U8vt1xivanR4MbC2kr6rJ6ohICuJ4PHDS4IffncgaP3Y8cfExHq6+d0tbibYkjRIiMUGpSik=
matrix:
include:
- os: linux
env: BUILD_SYSTEM=gradle
language: java
jdk: oraclejdk8
- os: linux
env: BUILD_SYSTEM=maven
language: android
jdk: oraclejdk8
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle
language: java
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.java
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.java.ecj
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.java.test
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.java.test.data
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.html.nu_validator
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.nodejs
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.nodejs.test
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.rhino
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.rhino.test
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.test
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.test.data
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.test
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.core
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.core.testdata
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.core.tests
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.dalvik
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.dalvik.test
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.ide
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.ide.jdt
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.ide.jdt.test
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.ide.jsdt
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.ide.jsdt.tests
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.ide.tests
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.scandroid
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.shrike
language: java
jdk: oraclejdk8
if: type = cron
- os: linux
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.util
language: java
jdk: oraclejdk8
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.java
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.java.ecj
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.java.test
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.java.test.data
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.html.nu_validator
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.nodejs
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.nodejs.test
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.rhino
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.rhino.test
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.test
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.test.data
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.test
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.core
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.core.testdata
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.core.tests
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.dalvik
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.dalvik.test
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.ide
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.ide.jdt
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.ide.jdt.test
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.ide.jsdt
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.ide.jsdt.tests
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.ide.tests
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.scandroid
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.shrike
language: java
if: type = cron
- os: osx
osx_image: xcode8.3
env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.util
language: java
if: type = cron

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.buildship.core.launch.runconfiguration">
<listAttribute key="arguments"/>
<booleanAttribute key="build_scans_enabled" value="false"/>
<stringAttribute key="gradle_distribution" value="GRADLE_DISTRIBUTION(WRAPPER)"/>
<stringAttribute key="gradle_user_home" value=""/>
<listAttribute key="jvm_arguments"/>
<booleanAttribute key="offline_mode" value="false"/>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
</listAttribute>
<booleanAttribute key="override_workspace_settings" value="false"/>
<booleanAttribute key="show_console_view" value="true"/>
<booleanAttribute key="show_execution_view" value="true"/>
<listAttribute key="tasks">
<listEntry value="afterEclipseBuildshipImport"/>
</listAttribute>
<stringAttribute key="working_dir" value="${workspace_loc:/com.ibm.wala}"/>
</launchConfiguration>

277
LICENSE Normal file
View File

@ -0,0 +1,277 @@
Eclipse Public License - v 2.0
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION
OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
1. DEFINITIONS
"Contribution" means:
a) in the case of the initial Contributor, the initial content
Distributed under this Agreement, and
b) in the case of each subsequent Contributor:
i) changes to the Program, and
ii) additions to the Program;
where such changes and/or additions to the Program originate from
and are Distributed by that particular Contributor. A Contribution
"originates" from a Contributor if it was added to the Program by
such Contributor itself or anyone acting on such Contributor's behalf.
Contributions do not include changes or additions to the Program that
are not Modified Works.
"Contributor" means any person or entity that Distributes the Program.
"Licensed Patents" mean patent claims licensable by a Contributor which
are necessarily infringed by the use or sale of its Contribution alone
or when combined with the Program.
"Program" means the Contributions Distributed in accordance with this
Agreement.
"Recipient" means anyone who receives the Program under this Agreement
or any Secondary License (as applicable), including Contributors.
"Derivative Works" shall mean any work, whether in Source Code or other
form, that is based on (or derived from) the Program and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship.
"Modified Works" shall mean any work in Source Code or other form that
results from an addition to, deletion from, or modification of the
contents of the Program, including, for purposes of clarity any new file
in Source Code form that contains any contents of the Program. Modified
Works shall not include works that contain only declarations,
interfaces, types, classes, structures, or files of the Program solely
in each case in order to link to, bind by name, or subclass the Program
or Modified Works thereof.
"Distribute" means the acts of a) distributing or b) making available
in any manner that enables the transfer of a copy.
"Source Code" means the form of a Program preferred for making
modifications, including but not limited to software source code,
documentation source, and configuration files.
"Secondary License" means either the GNU General Public License,
Version 2.0, or any later versions of that license, including any
exceptions or additional permissions as identified by the initial
Contributor.
2. GRANT OF RIGHTS
a) Subject to the terms of this Agreement, each Contributor hereby
grants Recipient a non-exclusive, worldwide, royalty-free copyright
license to reproduce, prepare Derivative Works of, publicly display,
publicly perform, Distribute and sublicense the Contribution of such
Contributor, if any, and such Derivative Works.
b) Subject to the terms of this Agreement, each Contributor hereby
grants Recipient a non-exclusive, worldwide, royalty-free patent
license under Licensed Patents to make, use, sell, offer to sell,
import and otherwise transfer the Contribution of such Contributor,
if any, in Source Code or other form. This patent license shall
apply to the combination of the Contribution and the Program if, at
the time the Contribution is added by the Contributor, such addition
of the Contribution causes such combination to be covered by the
Licensed Patents. The patent license shall not apply to any other
combinations which include the Contribution. No hardware per se is
licensed hereunder.
c) Recipient understands that although each Contributor grants the
licenses to its Contributions set forth herein, no assurances are
provided by any Contributor that the Program does not infringe the
patent or other intellectual property rights of any other entity.
Each Contributor disclaims any liability to Recipient for claims
brought by any other entity based on infringement of intellectual
property rights or otherwise. As a condition to exercising the
rights and licenses granted hereunder, each Recipient hereby
assumes sole responsibility to secure any other intellectual
property rights needed, if any. For example, if a third party
patent license is required to allow Recipient to Distribute the
Program, it is Recipient's responsibility to acquire that license
before distributing the Program.
d) Each Contributor represents that to its knowledge it has
sufficient copyright rights in its Contribution, if any, to grant
the copyright license set forth in this Agreement.
e) Notwithstanding the terms of any Secondary License, no
Contributor makes additional grants to any Recipient (other than
those set forth in this Agreement) as a result of such Recipient's
receipt of the Program under the terms of a Secondary License
(if permitted under the terms of Section 3).
3. REQUIREMENTS
3.1 If a Contributor Distributes the Program in any form, then:
a) the Program must also be made available as Source Code, in
accordance with section 3.2, and the Contributor must accompany
the Program with a statement that the Source Code for the Program
is available under this Agreement, and informs Recipients how to
obtain it in a reasonable manner on or through a medium customarily
used for software exchange; and
b) the Contributor may Distribute the Program under a license
different than this Agreement, provided that such license:
i) effectively disclaims on behalf of all other Contributors all
warranties and conditions, express and implied, including
warranties or conditions of title and non-infringement, and
implied warranties or conditions of merchantability and fitness
for a particular purpose;
ii) effectively excludes on behalf of all other Contributors all
liability for damages, including direct, indirect, special,
incidental and consequential damages, such as lost profits;
iii) does not attempt to limit or alter the recipients' rights
in the Source Code under section 3.2; and
iv) requires any subsequent distribution of the Program by any
party to be under a license that satisfies the requirements
of this section 3.
3.2 When the Program is Distributed as Source Code:
a) it must be made available under this Agreement, or if the
Program (i) is combined with other material in a separate file or
files made available under a Secondary License, and (ii) the initial
Contributor attached to the Source Code the notice described in
Exhibit A of this Agreement, then the Program may be made available
under the terms of such Secondary Licenses, and
b) a copy of this Agreement must be included with each copy of
the Program.
3.3 Contributors may not remove or alter any copyright, patent,
trademark, attribution notices, disclaimers of warranty, or limitations
of liability ("notices") contained within the Program from any copy of
the Program which they Distribute, provided that Contributors may add
their own appropriate notices.
4. COMMERCIAL DISTRIBUTION
Commercial distributors of software may accept certain responsibilities
with respect to end users, business partners and the like. While this
license is intended to facilitate the commercial use of the Program,
the Contributor who includes the Program in a commercial product
offering should do so in a manner which does not create potential
liability for other Contributors. Therefore, if a Contributor includes
the Program in a commercial product offering, such Contributor
("Commercial Contributor") hereby agrees to defend and indemnify every
other Contributor ("Indemnified Contributor") against any losses,
damages and costs (collectively "Losses") arising from claims, lawsuits
and other legal actions brought by a third party against the Indemnified
Contributor to the extent caused by the acts or omissions of such
Commercial Contributor in connection with its distribution of the Program
in a commercial product offering. The obligations in this section do not
apply to any claims or Losses relating to any actual or alleged
intellectual property infringement. In order to qualify, an Indemnified
Contributor must: a) promptly notify the Commercial Contributor in
writing of such claim, and b) allow the Commercial Contributor to control,
and cooperate with the Commercial Contributor in, the defense and any
related settlement negotiations. The Indemnified Contributor may
participate in any such claim at its own expense.
For example, a Contributor might include the Program in a commercial
product offering, Product X. That Contributor is then a Commercial
Contributor. If that Commercial Contributor then makes performance
claims, or offers warranties related to Product X, those performance
claims and warranties are such Commercial Contributor's responsibility
alone. Under this section, the Commercial Contributor would have to
defend claims against the other Contributors related to those performance
claims and warranties, and if a court requires any other Contributor to
pay any damages as a result, the Commercial Contributor must pay
those damages.
5. NO WARRANTY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS"
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
PURPOSE. Each Recipient is solely responsible for determining the
appropriateness of using and distributing the Program and assumes all
risks associated with its exercise of rights under this Agreement,
including but not limited to the risks and costs of program errors,
compliance with applicable laws, damage to or loss of data, programs
or equipment, and unavailability or interruption of operations.
6. DISCLAIMER OF LIABILITY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
7. GENERAL
If any provision of this Agreement is invalid or unenforceable under
applicable law, it shall not affect the validity or enforceability of
the remainder of the terms of this Agreement, and without further
action by the parties hereto, such provision shall be reformed to the
minimum extent necessary to make such provision valid and enforceable.
If Recipient institutes patent litigation against any entity
(including a cross-claim or counterclaim in a lawsuit) alleging that the
Program itself (excluding combinations of the Program with other software
or hardware) infringes such Recipient's patent(s), then such Recipient's
rights granted under Section 2(b) shall terminate as of the date such
litigation is filed.
All Recipient's rights under this Agreement shall terminate if it
fails to comply with any of the material terms or conditions of this
Agreement and does not cure such failure in a reasonable period of
time after becoming aware of such noncompliance. If all Recipient's
rights under this Agreement terminate, Recipient agrees to cease use
and distribution of the Program as soon as reasonably practicable.
However, Recipient's obligations under this Agreement and any licenses
granted by Recipient relating to the Program shall continue and survive.
Everyone is permitted to copy and distribute copies of this Agreement,
but in order to avoid inconsistency the Agreement is copyrighted and
may only be modified in the following manner. The Agreement Steward
reserves the right to publish new versions (including revisions) of
this Agreement from time to time. No one other than the Agreement
Steward has the right to modify this Agreement. The Eclipse Foundation
is the initial Agreement Steward. The Eclipse Foundation may assign the
responsibility to serve as the Agreement Steward to a suitable separate
entity. Each new version of the Agreement will be given a distinguishing
version number. The Program (including Contributions) may always be
Distributed subject to the version of the Agreement under which it was
received. In addition, after a new version of the Agreement is published,
Contributor may elect to Distribute the Program (including its
Contributions) under the new version.
Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
receives no rights or licenses to the intellectual property of any
Contributor under this Agreement, whether expressly, by implication,
estoppel or otherwise. All rights in the Program not expressly granted
under this Agreement are reserved. Nothing in this Agreement is intended
to be enforceable by any entity that is not a Contributor or Recipient.
No third-party beneficiary rights are created under this Agreement.
Exhibit A - Form of Secondary Licenses Notice
"This Source Code may also be made available under the following
Secondary Licenses when the conditions for such availability set forth
in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
version(s), and exceptions or additional permissions here}."
Simply including a copy of this Agreement, including this Exhibit A
is not sufficient to license the Source Code under Secondary Licenses.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to
look for such a notice.
You may add additional accurate notices of copyright ownership.

340
README-Gradle.md Normal file
View File

@ -0,0 +1,340 @@
This document describes some WALA-specific aspects of our new Gradle
build system, plus a few general Gradle features that may be of
particular interest to WALA developers. However, it is not a Gradle
tutorial.
# Pros and Cons of Switching to Gradle
## Selected Gradle Advantages in Brief
- [more comprehensive management of external
dependencies](#comprehensive-external-dependencies)
- faster builds using [parallel task
execution](https://docs.gradle.org/current/userguide/multi_project_builds.html#sec:parallel_execution)
and [user-scoped
caching](https://docs.gradle.org/current/userguide/build_cache.html)
(both enabled by default)
- [trustworthy dependencies for incremental
builds](#trustworthy-dependencies-for-incremental-builds)
- [composite builds](#composite-builds) for easier integration of WALA
into larger projects
- [automated Travis CI testing on macOS](#travis-ci-macos)
## Known Shortcomings
The Gradle build system is not yet ready to replace Maven, due to a
few [known shortcomings](https://github.com/liblit/WALA/milestone/1).
Paramount among these is that [Gradle WALA builds do not yet package
up Eclipse plug-ins / features in the proper
manner](https://github.com/liblit/WALA/issues/6). I have [poked at
this a
bit](https://github.com/liblit/WALA/tree/gradle-artifact-publishing),
but I simply do not understand Eclipse and/or OSGi well enough to get
the job done. I welcome help from anyone with the right knowledge!
Either Gradle or Maven can be used to build WALA from the command
line. However, it was not possible to extend this dual-build-system
support to Eclipse. Working with WALA in Eclipse *requires* [doing
things the Gradle way](#eclipse). Fortunately, this is rather
seamless; I see no reason why an Eclipse-using WALA developer should
need to avoid this switch.
As noted [below](#classpath-and-project-as-generated-files), Eclipse
`.classpath` and `.project` files are now generated rather than being
repository-tracked source files. However, a few Maven-run tests
depend on having certain of these files present. One way to create
them is to [import WALA into
Eclipse](#importing-wala-projects-into-eclipse) before starting your
Maven tests. If you prefer a non-interactive approach, you can
instead run `./gradlew prepareMavenBuild` before starting your Maven
tests.
# Getting Started
## External Dependencies: Patience is a Virtue
Gradle downloads many packages and supporting Java libraries as
needed. Your first Gradle build may take a long time. On a fast
workstation with a University-grade network and no local caches, my
initial run of `./gradlew assemble processTestResources` took five
minutes. On a decent laptop with residential DSL and no local caches,
the same initial build took twenty minutes. Fortunately, user- and
project-level Gradle caches will make incremental rebuilds much
faster. Rerunning `./gradlew assemble processTestResources` with a
warm cache in an already-built tree takes under three seconds.
Maven is the same, really. You may already have most of what Maven
needs downloaded and cached locally, but your first Maven WALA build
was probably slow as well. Recent Travis CI runs have showed Gradle
and Maven builds completing in fifteen to twenty minutes, without
significant variation between the two build systems.
<a id="comprehensive-external-dependencies"/>The good news is that the
Gradle build knows about all of its external dependencies and will
download them as needed. This even includes some complex dependencies
that the Maven build does not automate. For example, the Gradle build
will automatically gather required Android SDK components: setting
`$ANDROID_HOME` is not needed. Gradle builds will also download
`/tmp/DroidBench` when needed to run tests; the Maven build system
required that each developer do this by hand.
## Eclipse
### One-Time Eclipse Configuration
To work with WALA inside Eclipse, first **install Eclipse Buildship**
using either [the Eclipse
Marketplace](http://www.vogella.com/tutorials/EclipseGradle/article.html#installation-via-the-marketplace)
or [the Eclipse update
manager](http://www.vogella.com/tutorials/EclipseGradle/article.html#installation-via-the-eclipse-update-manager).
Buildship integrates Eclipse with Gradle, much like how M2Eclipse
integrates Eclipse with Maven. Restart Eclipse after installing this
feature.
### Importing WALA Projects Into Eclipse
Once you are running a Buildship-enabled Eclipse, **[use the “Existing
Gradle Project” import
wizard](http://www.vogella.com/tutorials/EclipseGradle/article.html#import-an-existing-gradle-project)
to import WALA into Eclipse.** Select and import the topmost level of
your WALA source tree. On the “Import Options” page of the import
wizard, leave all settings at their defaults: the “Override workspace
settings” option should be off, and the grayed-out “Gradle
distribution” choice should be set to “Gradle wrapper”. You do not
need to select each of WALAs sub-projects; import only the top-level
WALA source tree, and the rest will follow.
After the lengthy import process completes, **use “Run → After
Importing WALA Into Eclipse” to perform some post-import cleanup and
configuration.** Immediately after importing, you may see some errors
in the Eclipse “Problems” view. These should all go away after
running the “After Importing WALA Into Eclipse” step.
Note: a pristine WALA source tree is *not* pre-configured as a group
of Eclipse projects. Using the standard Eclipse “Existing Projects
into Workspace” import wizard will not work correctly. You must [use
the “Existing Gradle Project” import
wizard](http://www.vogella.com/tutorials/EclipseGradle/article.html#import-an-existing-gradle-project)
instead.
### `.classpath` and `.project` as Generated Files
You will find no `.classpath` or `.project` files anywhere in [the
Gradle fork of WALAs git repository](https://github.com/liblit/WALA).
Importing using the “Existing Gradle Project” wizard creates these
Eclipse project configuration files automatically based on the
underlying Gradle configuration.
Therefore, when working with Eclipse + Gradle, you should **treat
`.classpath` and `.project` files as *generated* artifacts,** not as
files to edit directly or through the Eclipse project configuration
GUI. For example, avoid using the Java Build Path settings dialog to
make changes that are stored in a `.classpath` file: the modified
`.classpath` file is not git-tracked, so your changes will eventually
be lost or overwritten.
The right way to change the contents of any of a `.classpath` or
`.project` file is to change the Gradle configuration such that the
generated `.classpath` and `.project` files will have the desired
contents, likely by using [Gradles `eclipse`
plugin](https://docs.gradle.org/current/userguide/eclipse_plugin.html).
A few WALA sub-projects already use this: look for `eclipse.project`
in `*/build.gradle` for examples.
## IntelliJ IDEA
### Opening WALA in IntelliJ IDEA
WALA comes preconfigured as an openable IntelliJ IDEA project. Open
the top-level WALA directory as a project; it should have a
distinctive badge on its folder icon marking it as a directory
containing a recognized IntelliJ IDEA project. Do *not* open the
top-level WALA `build.gradle` in that directory as a project: this
will begin an “Import Project from Gradle” process that is *not* the
recommended way to bring WALA up in IntelliJ IDEA.
The first time you open the WALA project, IntelliJ IDEA will
synchronize its project model with the Gradle build configuration,
including downloading some large supporting libraries. After the
lengthy import process completes, **use “Run → Run… → After Opening
Pristine Project” to perform some post-import configuration.** This
also can take tens of minutes, but is only necessary in a clean,
never-previously-built tree. Immediately after importing, you may see
some Java compilation errors in the IntelliJ IDEA “Messages” view.
These should all go away after running the “After Opening Pristine
Project” step. [Be
patient](#external-dependencies-patience-is-a-virtue) during the
initial project open and also during the “After Opening Pristine
Project” step, especially if you have a slow network connection.
If you prefer a non-interactive approach, instead of using “After
Opening Pristine Project” you can run `./gradlew prepareIntelliJIDEA`
either before or after opening WALA in IntelliJ IDEA.
### Benign Warning About Non-Managed Maven Project
Each time you open the WALA project, IntelliJ IDEA may report
“Non-managed pom.xml file found” in its event log. This arises
because WALA supports both Gradle and Maven, but WALA in IntelliJ IDEA
needs only the Gradle configuration. You can safely ignore this
notification, permanently disable it using the offered “Disable
notification” link, or even disable the IntelliJ IDEA Maven plugin
entirely if you have no other need for it.
### Project Configuration as Derived Model
IntelliJ IDEA automatically derives its project models from the Gradle
build configuration, including all information about both internal and
external build dependencies. However, this synchronization only goes
in one direction: from Gradle to IntelliJ IDEA, not from IntelliJ IDEA
back into Gradle. If you manipulate the project structure using the
IntelliJ IDEAs user interface, your changes will likely be
overwritten the next time IntelliJ IDEA scans the Gradle build
configuration.
This particularly applies to settings found in the “Modules” and
“Libraries” sections of the “Project Structure” dialog. The right way
to change module and library settings is to change the Gradle
configuration such that the *derived* IntelliJ IDEA model is what you
want it to be.
## Gradle Command Line
You do not need to install Gradle separately. **WALA includes its own
copy of Gradle, available as the `gradlew` script in the top-level
WALA directory.** Use this script for all command-line Gradle actions.
For example, to compile all of WALAs main (non-test) code and gather
it into jar archives, run `./gradlew assemble`.
In general, most Gradle-generated artifacts will appear somewhere
under `*/build`. For example the jar archives created by the
`assemble` task can be found as `*/build/libs/*.jar`. Note, however,
that Eclipse-generated artifacts will still appear in the same places
as before, such as `*/bin` and `*/target`.
### Trustworthy Dependencies For Incremental Builds
Gradle has excellent understanding of task and file dependencies. You
can trust it to perform incremental rebuilds rather than always
rebuilding from scratch. If you are used to always running `mvn clean
compile` instead of `mvn compile`, or `mvn clean install` instead of
`mvn install`, I recommend that you drop `clean` as a reflexive extra
step and **trust Gradle to do incremental builds correctly.**
### Favorite Build Tasks
Some useful Gradle tasks include:
- `assemble`: build WALAs main (non-test) code
- `build`: build all WALA code and run all automated tests
- `javadoc`: build all Javadoc documentation
- `publishToMavenLocal`: install WALAs jar files under `~/.m2`
- `clean`: remove all Gradle-generated artifacts
### Tasks in Specific Sub-Projects
When you run `./gradlew` in the top-level WALA directory, any tasks
you list will be built in all sub-projects. For example, `./gradlew
assemble` builds all non-test WALA jars in all sub-projects. If you
want to build tasks only in specific sub-projects, you have two options:
1. Give the fully-qualified name of the sub-project task. For
example, to assemble only the Dalvik jar, you could run `./gradlew
:com.ibm.wala.dalvik:assemble`.
1. Run Gradle from within some sub-project directory. For example, to
assemble only the Dalvik jar, you could `cd com.ibm.wala.dalvik`
and then run `../gradlew assemble`. Note the proper relative path
to the top-level Gradle script: `../gradle` instead of `./gradlew`.
### Task Name Abbreviation
[Any build task can be
abbreviated](https://docs.gradle.org/current/userguide/command_line_interface.html#_task_name_abbreviation)
by shortening each camel-case-delimited word in its name. For
example, the `processTestResources` task can probably be abbreviated
as `procTeRes` or even `pTR`.
### Useful Command-Line Flags
Among Gradles command-line flags, I have found the following
particularly useful:
- [`--continue`](https://docs.gradle.org/current/userguide/command_line_interface.html#sec:continue_build_on_failure):
keep building non-dependent sub-tasks even after an initial failure.
Especially useful in conjunction with the `build` or `test` tasks to
see multiple test failures rather than giving up after the first
failure.
- [`-t`,
`--continuous`](https://docs.gradle.org/current/userguide/command_line_interface.html#_continuous_build):
keep Gradle process running and re-execute the given tasks whenever
input files change. Similar to Eclipses behavior of updating the
build whenever you change and save a file.
- [`--tests=...`](https://docs.gradle.org/current/userguide/java_plugin.html#test_filtering):
run only the selected tests. Use in conjunction with the `build` or
`test` tasks for faster turnaround if you are focusing on getting
just one or a few failing tests to pass.
- [`--scan`](https://scans.gradle.com/): upload a detailed report of
the build process to a Gradle-hosted server for further exploration
and analysis. The only security here is the obscurity of the
generated URL for the build report. If you are not concerned about
potentially making your build details public, then `--scan` is a
good way to gain insights into why Gradle did what it did, and how
long each piece took.
### Composite Builds
Gradles [composite
builds](https://docs.gradle.org/current/userguide/composite_builds.html)
allow a Gradle-managed project to recursively include other
Gradle-managed projects, with Gradle managing the entire build process
in a coherent, integrated manner. Thus, if you use Gradle to build
your WALA-based project, you can easily have it use WALA from your
own, private WALA tree instead of from `~/.m2` or the public Maven
repository.
This is especially useful if you frequently find yourself switching
between multiple different personal or experimental WALA builds. By
avoiding `~/.m2`, each WALA-based project can be its own composite
build, with its own WALA subtree, and no project interferes with any
other.
# Travis CI
I use a [Travis CI build
matrix](https://docs.travis-ci.com/user/customizing-the-build/#Build-Matrix)
to perform automated testing in three configurations:
1. Gradle build on Ubuntu 14 (Trusty Tahr)
1. Maven build on Ubuntu 14 (Trusty Tahr)
1. Gradle build on macOS 10.12 (Sierra)
Until we are ready to completely replace Maven with Gradle, it is
important that both keep working. Therefore, I use Travis CI to build
and test WALA on Ubuntu using both Gradle and Maven. Every new pull
request must be validated in both of these configurations before I
will accept it onto the `gradle-and-buildship` branch.
<a id="travis-ci-macos"/>The official WALA repository has no macOS CI
testing. However, [macOS is the main development platform for at
least one WALA
maintainer](https://github.com/liblit/WALA/issues/3#issuecomment-356823287),
so it is great to have Travis CI helping us keep that platform
working. I will not accept pull requests that introduce regressions
into Gradle macOS builds. However, I am not using Travis CI to test
Maven macOS builds. Initial attempts using [the official WALA master
sources](https://github.com/wala/WALA) failed. As it is my goal to
replace Maven entirely, investigating Maven+macOS failures further is
not a priority.
<!--
LocalWords: processTestResources pre classpath gradlew mvn
LocalWords: javadoc buildship issuecomment
-->

View File

@ -1,5 +1,82 @@
This is a mirror of the <a
href="http://wala.svn.sourceforge.net/viewvc/wala/">WALA SVN repository</a>. It
is maintained manually for now, but more official support may be added in the
future. For more details on WALA, see <a href="http://wala.sourceforge.net">the
WALA home page</a>.
# WALA for DASCA
This is a fork of WALA, tracking minor bug-fixes and enhancements required for
[DASCA](https://git.logicalhacking.com/DASCA/DASCA).
## Integrating Updates from Upstream
After cloning the repostistory, you need to manually configure the upstream URL
of the remote fork:
``` sh
git remote add upstream https://github.com/wala/WALA.git
```
The default steps for merging with upstream are:
``` sh
git fetch upstream
git checkout master
git merge upstream/master
```
## Building Artifacts
This fork uses the gradle setup of the WALA build system. Thus, for details, please
consult the instructions in the file [README-Gradle](README-Gradle.md). In general,
for rebuilding all WALA artifacts, use:
``` sh
./gradlew clean assemble
```
## Publishing Artifacts
### Configuration
For publishing artifacts, you need to configure the username and password required
for uploading to the remote artifacts repository, i.e., you need to add the following
properties to your `GRADLE_USER_HOME/gradle.properties` (default: `$HOME/.gradle/gradle.properties`)
file:
``` gradle
comLogicalhackingArtifactsUser=<USER>
comLogicalhackingArtifactsPassword=<PASSWORD>
```
### Preparation
Before publishing new artifacts to the artifacts repository, please update the version identifier in the file `build.gradle` by removing the `SNAPSHOT` postfix
and updating the `<WALAVERSION>` identifier.
``` gradle
version '<WALAVERSION>.[R|S].DASCA.<DASCAVERSION>'
```
with the version that should be published. Next, commit your changes and tag the
new version:
``` gradle
git commit -m "Preparing release of version <VERSION>." build.gradle
git tag -s "<VERSION>" -m "Tagging version <VERSION>."
```
Finally, mark the development version by appending `-SNAPSHOT`
``` gradle
version '<WALAVERSION>.[R|S].DASCA.<DASCAVERSION>-SNAPSHOT'
```
and commit your changes:
``` gradle
git commit -m "Marked development version" build.gradle
```
### Uploading Artifacts
Publishing artifacts is as easy as calling
``` sh
./gradlew publish
```

25
appveyor.yml.disabled Normal file
View File

@ -0,0 +1,25 @@
os: Visual Studio 2015
install:
- ps: |
Add-Type -AssemblyName System.IO.Compression.FileSystem
if (!(Test-Path -Path "C:\maven" )) {
(new-object System.Net.WebClient).DownloadFile(
'http://www.us.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip',
'C:\maven-bin.zip'
)
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\maven-bin.zip", "C:\maven")
}
- cmd: SET PATH=C:\maven\apache-maven-3.3.9\bin;%JAVA_HOME%\bin;%PATH%
- cmd: SET MAVEN_OPTS=-XX:MaxPermSize=2g -Xmx4g
- cmd: SET JAVA_OPTS=-XX:MaxPermSize=2g -Xmx4g
build_script:
- mvn clean verify -DskipTests=true -B -q
test_script:
- mvn clean verify -B -q
cache:
- C:\maven\
- C:\Users\appveyor\.m2

42
build-maven-jars.py Executable file
View File

@ -0,0 +1,42 @@
#!/usr/bin/env python
# script to build jars for maven central
import sys
import subprocess
import os
# action should be either 'install' (for local test)
# or 'deploy' (for deployment to maven central).
# if current version is SNAPSHOT, will only be deployed
# to sonatype's staging servers. otherwise, will be
# deployed to maven central
action = sys.argv[1]
# projects for which we should build jars, in order
# will be prefixed with 'com.ibm.wala.'
projects = [
"util",
"shrike",
"core",
"cast",
"cast.java",
"cast.java.ecj",
"cast.js",
"cast.js.rhino",
"dalvik",
"scandroid"
]
for proj in projects:
full_proj = "com.ibm.wala." + proj
print(full_proj)
os.chdir(full_proj)
mvnCmd = "mvn -f mvncentral.xml clean " + action
try:
subprocess.check_output(mvnCmd, shell=True)
except subprocess.CalledProcessError as e:
print("OUTPUT")
print(e.output)
raise
os.chdir("..")

196
build.gradle Normal file
View File

@ -0,0 +1,196 @@
////////////////////////////////////////////////////////////////////////
//
// plugin configuration must precede everything else
//
plugins {
id 'com.diffplug.gradle.p2.asmaven' version '3.10.0'
id 'com.github.hauner.jarTest' version '1.0.1' apply false
id 'de.undercouch.download'
id 'nebula.lint' version '8.3.1'
id 'nebula.source-jar' version '7.0.1' apply false
}
////////////////////////////////////////////////////////////////////////
//
// required Eclipse components
//
p2AsMaven {
group 'eclipse-deps', {
repoEclipse '4.7.2'
slicingOption 'latestVersionOnly', 'true'
iu 'org.eclipse.core.commands'
iu 'org.eclipse.core.contenttype'
iu 'org.eclipse.core.jobs'
iu 'org.eclipse.core.resources'
iu 'org.eclipse.core.runtime'
iu 'org.eclipse.equinox.app'
iu 'org.eclipse.equinox.common'
iu 'org.eclipse.equinox.preferences'
iu 'org.eclipse.jdt.core'
iu 'org.eclipse.jface'
iu 'org.eclipse.osgi'
iu 'org.eclipse.pde.core'
iu 'org.eclipse.swt'
iu 'org.eclipse.ui.ide'
iu 'org.eclipse.ui.workbench'
}
group 'wst-deps', {
repo 'http://download.eclipse.org/releases/oxygen'
slicingOption 'latestVersionOnly', 'true'
iu 'org.eclipse.wst.jsdt.core'
iu 'org.eclipse.wst.jsdt.ui'
}
}
////////////////////////////////////////////////////////////////////////
//
// common Java setup shared by multiple projects
//
group name
version '1.5.1.S.DASCA.1.0.0-SNAPSHOT'
subprojects { subproject ->
// skip generic Java setup for the few projects that have no Java code whatsoever
switch (subproject.name) {
case 'com.ibm.wala-repository':
case ~/.*_feature/:
return
}
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'nebula.source-jar'
version rootProject.version
repositories {
mavenCentral()
maven {
url "$rootProject.buildDir/p2asmaven/maven"
}
}
jar.manifest.from('META-INF/MANIFEST.MF')
publishing.publications {
mavenJava(MavenPublication) {
from components.java
}
}
publishing {
repositories {
maven {
url = "sftp://artifacts.logicalhacking.com:22/home/brucker/www/artifacts.logicalhacking.com/htdocs/maven3/"
credentials {
username comLogicalhackingArtifactsUser
password comLogicalhackingArtifactsPassword
}
}
}
}
task afterEclipseBuildshipImport(dependsOn: processTestResources)
task prepareIntelliJIDEA
test {
include '**/*Test.class'
include '**/*TestCase.class'
include '**/*Tests.class'
include '**/Test*.class'
exclude '**/*AndroidLibs*.class'
maxParallelForks = Integer.MAX_VALUE
}
}
task afterEclipseBuildshipImport(type: Exec) {
commandLine './revert-launchers.sh'
}
////////////////////////////////////////////////////////////////////////
//
// find platform-specific SWT implementations
//
def osgi_platform
switch (System.getProperty('os.name')) {
case ~/Mac OS X/:
osgi_platform = 'cocoa.macosx.x86_64'
break
case ~/Windows.*/:
osgi_platform = 'win32.win32.x86_64'
break
case ~/Linux/:
osgi_platform = 'gtk.linux.x86_64'
break
}
System.setProperty('osgi.platform', osgi_platform)
subprojects {
configurations.all {
resolutionStrategy {
// failOnVersionConflict()
dependencySubstitution {
substitute module('eclipse-deps:org.eclipse.swt.${osgi.platform}') with module("eclipse-deps:org.eclipse.swt.${System.getProperty('osgi.platform')}:3.+")
}
}
}
}
////////////////////////////////////////////////////////////////////////
//
// optional lint checking of Gradle scripts
//
allprojects {
apply plugin: 'nebula.lint'
gradleLint.alwaysRun = false
gradleLint {
rules = ['all-dependency']
excludedRules = [
'duplicate-dependency-class',
'transitive-duplicate-dependency-class',
'unused-dependency',
]
}
}
////////////////////////////////////////////////////////////////////////
//
// disable Javadoc linter until documentation is in better shape
//
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
////////////////////////////////////////////////////////////////////////
//
// Eclipse IDE integration
//
// workaround for <https://github.com/gradle/gradle/issues/4802>
allprojects {
apply plugin: 'eclipse'
eclipse.classpath.file.whenMerged {
entries.each {
if (it in org.gradle.plugins.ide.eclipse.model.AbstractClasspathEntry && it.entryAttributes['gradle_used_by_scope'] == 'test')
it.entryAttributes['test'] = true
}
}
}

1
buildSrc/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/.gradle/

7
buildSrc/build.gradle Normal file
View File

@ -0,0 +1,7 @@
repositories {
mavenCentral()
}
dependencies {
compile 'de.undercouch:gradle-download-task:3.4.3'
}

View File

@ -0,0 +1,31 @@
import org.gradle.api.tasks.*
////////////////////////////////////////////////////////////////////////
//
// create a Javadoc-style "package-list" file
//
@CacheableTask
class CreatePackageList extends org.gradle.api.DefaultTask {
@PathSensitive(PathSensitivity.RELATIVE)
@Input Object sourceSet
@OutputFile File packageList = new File("$temporaryDir/package-list")
@TaskAction
def create() {
sourceSet.sourceCollections.collect { collection ->
def sourceRoot = collection.tree.dir.toPath()
collection.collect { source ->
def javaSourceFilePath = source.toPath()
def parentPath = javaSourceFilePath.parent
def relativePath = sourceRoot.relativize(parentPath)
relativePath.toString().replace(File.separator, '.')
}
}.flatten().sort().unique().each {
packageList << "$it\n"
}
}
}

View File

@ -0,0 +1,53 @@
import org.gradle.api.tasks.*
////////////////////////////////////////////////////////////////////////
//
// download and use checksum to verify that we got what we expected
//
@CacheableTask
class VerifiedDownload extends org.gradle.api.DefaultTask {
// URL of resource to download
def @Input src
// expected checksum of resource as hex digits
def @Input checksum
// algorithm to use for computing checksum
def @Input algorithm = 'MD5'
// whether to use ETag for selective downloading
def @Input useETag = true
// local file into which resource should be saved
def @OutputFile dest
File getDest() {
return project.file(dest)
}
VerifiedDownload() {
outputs.upToDateWhen {
getDest().exists()
}
}
@TaskAction
downloadAndVerify() {
def destFile = getDest()
project.download {
src this.src
dest destFile
overwrite true
onlyIfModified true
useETag this.useETag
}
project.verifyChecksum {
src destFile
algorithm this.algorithm
checksum this.checksum
}
}
}

36
change-version.py Executable file
View File

@ -0,0 +1,36 @@
#!/usr/bin/env python
# specify versions as version number, optionally followed by
# '-SNAPSHOT' for a snapshot version
import sys
import subprocess
def runAndPrint(cmd):
print cmd
subprocess.check_output(cmd, shell=True)
oldVersion = sys.argv[1]
newVersion = sys.argv[2]
print oldVersion + " --> " + newVersion
oldVersion = oldVersion.replace(".", "\.")
newVersion = newVersion.replace(".", "\.")
runAndPrint("mvn clean -q")
runAndPrint("find -E ./ -regex \".*(pom|mvncentral)\.xml\" | xargs -n 1 perl -pi -e \'s/" + oldVersion + "/" + newVersion + "/g\'")
runAndPrint("perl -pi -e \'s/" + oldVersion + "/" + newVersion + "/g\' build.gradle")
oldIsSnapshot = oldVersion.endswith("SNAPSHOT")
newIsSnapShot = newVersion.endswith("SNAPSHOT")
bundleOld = oldVersion if not oldIsSnapshot else oldVersion.replace("-SNAPSHOT","\.qualifier")
bundleNew = newVersion if not newIsSnapShot else newVersion.replace("-SNAPSHOT","\.qualifier")
runAndPrint("find -E ./ -regex \".*(MANIFEST\.MF|feature\.xml)\" | xargs -n 1 perl -pi -e \'s/" + bundleOld + "/" + bundleNew + "/g\'")
print "done"

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.ibm.wala-feature</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.pde.FeatureBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.FeatureNature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,9 @@
DELEGATES_PREFERENCE=delegateValidatorList
USER_BUILD_PREFERENCE=enabledBuildValidatorList
USER_MANUAL_PREFERENCE=enabledManualValidatorList
USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.700.v201610061600
eclipse.preferences.version=1
override=true
suspend=false
vals/org.eclipse.wst.html.core.HTMLValidator/groups=0107include06111contentType136org.eclipse.wst.html.core.htmlsourceT07fileext04htmlF07fileext05xhtmlF07fileext03htmF07fileext04htplF07fileext03wmlF0107exclude0104file139target/site/dependency-convergence.htmlT03
vf.version=3

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature id="com.ibm.wala_feature">
<category name="main"/>
</feature>
<feature id="com.ibm.wala_feature.source">
<category name="main"/>
</feature>
<feature id="com.ibm.wala.ide_feature">
<category name="main"/>
</feature>
<feature id="com.ibm.wala.ide_feature.source">
<category name="main"/>
</feature>
<category-def name="main" label="Wala"/>
</site>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.ibm.wala</groupId>
<artifactId>WALA</artifactId>
<version>1.5.1-SNAPSHOT</version>
</parent>
<artifactId>com.ibm.wala-repository</artifactId>
<packaging>eclipse-repository</packaging>
</project>

View File

@ -0,0 +1,113 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=error
org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
org.eclipse.jdt.core.compiler.problem.deadCode=error
org.eclipse.jdt.core.compiler.problem.deprecation=ignore
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=error
org.eclipse.jdt.core.compiler.problem.emptyStatement=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=error
org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=no_tag
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=error
org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=error
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
org.eclipse.jdt.core.compiler.problem.nullReference=error
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=error
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=error
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=error
org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=error
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=error
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=error
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedImport=error
org.eclipse.jdt.core.compiler.problem.unusedLabel=error
org.eclipse.jdt.core.compiler.problem.unusedLocal=error
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=error
org.eclipse.jdt.core.compiler.problem.unusedParameter=error
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=error
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
org.eclipse.jdt.core.compiler.source=1.8

View File

@ -0,0 +1,32 @@
compilers.f.unresolved-features=0
compilers.f.unresolved-plugins=0
compilers.incompatible-environment=0
compilers.p.build=0
compilers.p.build.bin.includes=0
compilers.p.build.encodings=0
compilers.p.build.java.compiler=0
compilers.p.build.java.compliance=0
compilers.p.build.missing.output=0
compilers.p.build.output.library=0
compilers.p.build.source.library=0
compilers.p.build.src.includes=0
compilers.p.deprecated=0
compilers.p.discouraged-class=0
compilers.p.internal=0
compilers.p.missing-packages=0
compilers.p.missing-version-export-package=2
compilers.p.missing-version-import-package=0
compilers.p.missing-version-require-bundle=2
compilers.p.no-required-att=0
compilers.p.not-externalized-att=0
compilers.p.unknown-attribute=0
compilers.p.unknown-class=0
compilers.p.unknown-element=0
compilers.p.unknown-identifier=0
compilers.p.unknown-resource=0
compilers.p.unresolved-ex-points=0
compilers.p.unresolved-import=0
compilers.s.create-docs=false
compilers.s.doc-folder=doc
compilers.s.open-tags=0
eclipse.preferences.version=1

View File

@ -0,0 +1,10 @@
DELEGATES_PREFERENCE=delegateValidatorList
USER_BUILD_PREFERENCE=enabledBuildValidatorList
USER_MANUAL_PREFERENCE=enabledManualValidatorList
USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.700.v201610061600
eclipse.preferences.version=1
override=true
suspend=false
vals/org.eclipse.wst.html.core.HTMLValidator/groups=0107include06111contentType136org.eclipse.wst.html.core.htmlsourceT07fileext04htmlF07fileext05xhtmlF07fileext03htmF07fileext04htplF07fileext03wmlF0107exclude0104file139target/site/dependency-convergence.htmlT03
vals/org.eclipse.wst.xml.core.xml/groups=0107include05111contentType128org.eclipse.core.runtime.xmlT111contentType134org.eclipse.wst.xml.core.xmlsourceT111contentType134org.eclipse.wst.xml.core.xslsourceT111contentType134org.eclipse.jst.jsp.core.tldsourceT07fileext03xmlF0107exclude07113projectNature134org.eclipse.jst.j2ee.ejb.EJBNature113projectNature130org.eclipse.jst.j2ee.EARNature04file08.projectT0104file110.classpathT0104file110.settings/T0204file122target/p2artifacts.xmlT0304file120target/p2content.xmlT03
vf.version=3

View File

@ -0,0 +1,17 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: com.ibm.wala.cast.java.ecj
Bundle-Version: 1.5.1.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: com.ibm.wala.cast.java,
com.ibm.wala.core,
org.eclipse.core.runtime,
org.eclipse.jdt.core,
com.ibm.wala.cast,
com.ibm.wala.shrike
Export-Package: com.ibm.wala.cast.java.client,
com.ibm.wala.cast.java.ecj.util,
com.ibm.wala.cast.java.translator.jdt,
com.ibm.wala.cast.java.translator.jdt.ecj

View File

@ -0,0 +1,3 @@
#Properties file for com.ibm.wala.cast.java.ecj
Bundle-Name = WALA CAst Java ECJ frontend
Bundle-Vendor = IBM

View File

@ -0,0 +1,15 @@
sourceSets.main.java.srcDirs = ['src']
dependencies {
compile(
'eclipse-deps:org.eclipse.core.runtime:+',
'eclipse-deps:org.eclipse.equinox.common:+',
'eclipse-deps:org.eclipse.jdt.core:+',
'org.osgi:org.osgi.core:4.2.0',
project(':com.ibm.wala.cast'),
project(':com.ibm.wala.cast.java'),
project(':com.ibm.wala.core'),
project(':com.ibm.wala.shrike'),
project(':com.ibm.wala.util'),
)
}

View File

@ -0,0 +1,6 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
OSGI-INF/
javacProjectSettings = true

View File

@ -0,0 +1,173 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ibm.wala</groupId>
<artifactId>com.ibm.wala.cast.java.ecj</artifactId>
<version>1.5.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>WALA CAst Java ECJ</name>
<description>WALA Common AST Java ECJ front-end</description>
<url>http://wala.sourceforge.net</url>
<licenses>
<license>
<name>Eclipse Public License, Version 1.0</name>
<url>https://www.eclipse.org/legal/epl-v10.html</url>
</license>
</licenses>
<developers>
<developer>
<name>Manu Sridharan</name>
<email>m.sridharan@samsung.com</email>
<organization>Samsung Research America</organization>
<organizationUrl>http://www.sisa.samsung.com/</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:git@github.com:wala/WALA.git</connection>
<developerConnection>scm:git:git@github.com:example/example-application.git</developerConnection>
<url>git@github.com:example/example-application.git</url>
</scm>
<properties>
<src.dir>src</src.dir>
</properties>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>com.ibm.wala</groupId>
<artifactId>com.ibm.wala.util</artifactId>
<version>1.5.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.ibm.wala</groupId>
<artifactId>com.ibm.wala.cast</artifactId>
<version>1.5.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.ibm.wala</groupId>
<artifactId>com.ibm.wala.cast.java</artifactId>
<version>1.5.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.ibm.wala</groupId>
<artifactId>com.ibm.wala.core</artifactId>
<version>1.5.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.ibm.wala</groupId>
<artifactId>com.ibm.wala.shrike</artifactId>
<version>1.5.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.core</groupId>
<artifactId>org.eclipse.core.runtime</artifactId>
<version>3.7.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.core</artifactId>
<version>3.10.0</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
</repositories>
<profiles>
<profile>
<id>jdk18</id>
<activation>
<jdk>1.8</jdk>
</activation>
<properties>
<javadoc.options>-Xdoclint:none</javadoc.options>
</properties>
</profile>
</profiles>
<build>
<sourceDirectory>${src.dir}</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.3</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalparam>${javadoc.options}</additionalparam>
</configuration>
<version>2.9.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>WALA</artifactId>
<groupId>com.ibm.wala</groupId>
<version>1.5.1-SNAPSHOT</version>
</parent>
<artifactId>com.ibm.wala.cast.java.ecj</artifactId>
<packaging>eclipse-plugin</packaging>
</project>

View File

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright (c) 2013 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package com.ibm.wala.cast.java.client;
import com.ibm.wala.cast.java.translator.jdt.ecj.ECJClassLoaderFactory;
import com.ibm.wala.classLoader.ClassLoaderFactory;
import com.ibm.wala.ipa.callgraph.propagation.InstanceKey;
import com.ibm.wala.util.config.SetOfClasses;
public class ECJJavaSourceAnalysisEngine<I extends InstanceKey> extends JavaSourceAnalysisEngine<I> {
@Override
protected ClassLoaderFactory getClassLoaderFactory(SetOfClasses exclusions) {
return new ECJClassLoaderFactory(exclusions);
}
}

View File

@ -0,0 +1,82 @@
package com.ibm.wala.cast.java.ecj.util;
import java.io.File;
import java.io.IOException;
import java.util.Properties;
import java.util.jar.JarFile;
import com.ibm.wala.cast.ir.ssa.AstIRFactory;
import com.ibm.wala.cast.java.client.impl.ZeroOneContainerCFABuilderFactory;
import com.ibm.wala.cast.java.ipa.callgraph.JavaSourceAnalysisScope;
import com.ibm.wala.cast.java.translator.jdt.ecj.ECJClassLoaderFactory;
import com.ibm.wala.classLoader.SourceDirectoryTreeModule;
import com.ibm.wala.ipa.callgraph.AnalysisCacheImpl;
import com.ibm.wala.ipa.callgraph.AnalysisOptions;
import com.ibm.wala.ipa.callgraph.AnalysisScope;
import com.ibm.wala.ipa.callgraph.CallGraph;
import com.ibm.wala.ipa.callgraph.CallGraphBuilder;
import com.ibm.wala.ipa.callgraph.CallGraphBuilderCancelException;
import com.ibm.wala.ipa.callgraph.CallGraphStats;
import com.ibm.wala.ipa.callgraph.Entrypoint;
import com.ibm.wala.ipa.callgraph.IAnalysisCacheView;
import com.ibm.wala.ipa.callgraph.impl.Util;
import com.ibm.wala.ipa.cha.ClassHierarchyException;
import com.ibm.wala.ipa.cha.ClassHierarchyFactory;
import com.ibm.wala.ipa.cha.IClassHierarchy;
import com.ibm.wala.properties.WalaProperties;
import com.ibm.wala.types.ClassLoaderReference;
import com.ibm.wala.util.io.CommandLine;
import com.ibm.wala.util.warnings.Warnings;
/**
* Driver that constructs a call graph for an application specified as a directory of source code.
* Example of using the JDT front-end based on ECJ.
* Useful for getting some code to copy-paste.
*/
public class SourceDirCallGraph {
/**
* Usage: ScopeFileCallGraph -sourceDir file_path -mainClass class_name
*
* If given -mainClass, uses main() method of class_name as entrypoint. Class
* name should start with an 'L'.
*
* Example args: -sourceDir /tmp/srcTest -mainClass LFoo
*
*/
public static void main(String[] args) throws ClassHierarchyException, IllegalArgumentException, CallGraphBuilderCancelException, IOException {
long start = System.currentTimeMillis();
Properties p = CommandLine.parse(args);
String sourceDir = p.getProperty("sourceDir");
String mainClass = p.getProperty("mainClass");
AnalysisScope scope = new JavaSourceAnalysisScope();
// add standard libraries to scope
String[] stdlibs = WalaProperties.getJ2SEJarFiles();
for (String stdlib : stdlibs) {
scope.addToScope(ClassLoaderReference.Primordial, new JarFile(stdlib));
}
// add the source directory
scope.addToScope(JavaSourceAnalysisScope.SOURCE, new SourceDirectoryTreeModule(new File(sourceDir)));
// build the class hierarchy
IClassHierarchy cha = ClassHierarchyFactory.make(scope, new ECJClassLoaderFactory(scope.getExclusions()));
System.out.println(cha.getNumberOfClasses() + " classes");
System.out.println(Warnings.asString());
Warnings.clear();
AnalysisOptions options = new AnalysisOptions();
Iterable<Entrypoint> entrypoints = Util.makeMainEntrypoints(JavaSourceAnalysisScope.SOURCE, cha, new String[] { mainClass } );
options.setEntrypoints(entrypoints);
// you can dial down reflection handling if you like
// options.setReflectionOptions(ReflectionOptions.NONE);
IAnalysisCacheView cache = new AnalysisCacheImpl(AstIRFactory.makeDefaultFactory());
//CallGraphBuilder builder = new ZeroCFABuilderFactory().make(options, cache, cha, scope, false);
CallGraphBuilder<?> builder = new ZeroOneContainerCFABuilderFactory().make(options, cache, cha, scope);
System.out.println("building call graph...");
CallGraph cg = builder.makeCallGraph(options, null);
long end = System.currentTimeMillis();
System.out.println("done");
System.out.println("took " + (end-start) + "ms");
System.out.println(CallGraphStats.getStats(cg));
}
}

View File

@ -76,11 +76,13 @@ public class FakeExceptionTypeBinding implements ITypeBinding {
this.exceptionBinaryName = exceptionBinaryName;
}
@Override
public boolean isAssignmentCompatible(ITypeBinding variableType) {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
@Override
public boolean equals(Object o) {
if (o instanceof FakeExceptionTypeBinding)
return this == o;
@ -89,213 +91,266 @@ public class FakeExceptionTypeBinding implements ITypeBinding {
return false;
}
@Override
public int hashCode() {
return exceptionBinaryName.hashCode();
}
// --- rest not needed
@Override
public ITypeBinding createArrayType(int dimension) {
Assertions.UNREACHABLE("FakeExceptionTypeBinding createArrayType");
return null;
}
@Override
public String getBinaryName() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
@Override
public ITypeBinding getBound() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
@Override
public ITypeBinding getComponentType() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
@Override
public IVariableBinding[] getDeclaredFields() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
@Override
public IMethodBinding[] getDeclaredMethods() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
@Override
public int getDeclaredModifiers() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return 0;
}
@Override
public ITypeBinding[] getDeclaredTypes() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
@Override
public ITypeBinding getDeclaringClass() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
@Override
public IMethodBinding getDeclaringMethod() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
@Override
public int getDimensions() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return 0;
}
@Override
public ITypeBinding getElementType() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
@Override
public ITypeBinding getErasure() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
@Override
public ITypeBinding[] getInterfaces() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
@Override
public int getModifiers() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return 0;
}
@Override
public String getName() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
@Override
public IPackageBinding getPackage() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
@Override
public String getQualifiedName() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
@Override
public ITypeBinding getSuperclass() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
@Override
public ITypeBinding[] getTypeArguments() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
@Override
public ITypeBinding[] getTypeBounds() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
@Override
public ITypeBinding getTypeDeclaration() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
@Override
public ITypeBinding[] getTypeParameters() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
@Override
public ITypeBinding getWildcard() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
@Override
public boolean isAnnotation() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
@Override
public boolean isAnonymous() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
@Override
public boolean isArray() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
@Override
public boolean isCapture() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
@Override
public boolean isCastCompatible(ITypeBinding type) {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
@Override
public boolean isClass() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
@Override
public boolean isEnum() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
@Override
public boolean isFromSource() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
@Override
public boolean isGenericType() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
@Override
public boolean isInterface() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
// add @Override here once Eclipse Mars is no longer supported
public boolean isIntersectionType() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
@Override
public boolean isLocal() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
@Override
public boolean isMember() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
@Override
public boolean isNested() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
@Override
public boolean isNullType() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
@Override
public boolean isParameterizedType() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
@Override
public boolean isPrimitive() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
@Override
public boolean isRawType() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
@Override
public boolean isSubTypeCompatible(ITypeBinding type) {
String name = type.getBinaryName();
if (exceptionBinaryName.endsWith("Error;")) {
@ -313,73 +368,107 @@ public class FakeExceptionTypeBinding implements ITypeBinding {
return false;
}
@Override
public boolean isTopLevel() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
@Override
public boolean isTypeVariable() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
@Override
public boolean isUpperbound() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
@Override
public boolean isWildcardType() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
@Override
public IAnnotationBinding[] getAnnotations() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
@Override
public IJavaElement getJavaElement() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
@Override
public String getKey() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
@Override
public int getKind() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return 0;
}
@Override
public boolean isDeprecated() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
@Override
public boolean isEqualTo(IBinding binding) {
return this.equals(binding);
}
@Override
public boolean isRecovered() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
@Override
public boolean isSynthetic() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return false;
}
@Override
public ITypeBinding getGenericTypeOfWildcardType() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
@Override
public int getRank() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return 0;
}
// do not put @Override here, to avoid breaking compilation on Juno
@Override
public IMethodBinding getFunctionalInterfaceMethod() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
// do not put @Override here, to avoid breaking compilation on Juno
@Override
public IAnnotationBinding[] getTypeAnnotations() {
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
return null;
}
// do not put @Override here, to avoid breaking compilation on older Eclipse versions
public IBinding getDeclaringMember() {
// TODO Auto-generated method stub
return null;
}
}

View File

@ -61,7 +61,7 @@ import com.ibm.wala.util.debug.Assertions;
public class JDT2CAstUtils {
public static Collection<CAstQualifier> mapModifiersToQualifiers(int modifiers, boolean isInterface, boolean isAnnotation) {
Set<CAstQualifier> quals = new LinkedHashSet<CAstQualifier>();
Set<CAstQualifier> quals = new LinkedHashSet<>();
if (isInterface)
quals.add(CAstQualifier.INTERFACE);
@ -174,7 +174,6 @@ public class JDT2CAstUtils {
* Returns true if type is char, byte, short, int, or long. Return false otherwise (including boolean!)
*
* @param type
* @return
*/
public static boolean isLongOrLess(ITypeBinding type) {
String t = type.getBinaryName();
@ -186,11 +185,10 @@ public class JDT2CAstUtils {
* CAstSymbol.NULL_DEFAULT_VALUE.
*
* @param type
* @return
*/
public static Object defaultValueForType(ITypeBinding type) {
if (isLongOrLess(type))
return new Integer(0);
return Integer.valueOf(0);
else if (type.getBinaryName().equals("D") || type.getBinaryName().equals("F"))
return new Double(0.0);
else
@ -237,7 +235,6 @@ public class JDT2CAstUtils {
*
* @param returnType
* @param ast
* @return
*/
public static ITypeBinding getErasedType(ITypeBinding returnType, AST ast) {
if (returnType.isTypeVariable() || returnType.isCapture())
@ -299,7 +296,7 @@ public class JDT2CAstUtils {
}
public static Collection<IMethodBinding> getOverriddenMethod(IMethodBinding met) {
HashMap<ITypeBinding, IMethodBinding> overridden = new HashMap<ITypeBinding, IMethodBinding>();
HashMap<ITypeBinding, IMethodBinding> overridden = new HashMap<>();
if (met == null)
return null;
getMethodInClassOrSuperclass(met, met.getDeclaringClass(), true, overridden);

View File

@ -88,7 +88,7 @@ public class JDTIdentityMapper {
* This method canonicalizes the TypeReferences
*/
public TypeReference getTypeRef(ITypeBinding type) {
type = JDT2CAstUtils.getErasedType((ITypeBinding) type, fAst); // GENERICS: erasure...
type = JDT2CAstUtils.getErasedType(type, fAst); // GENERICS: erasure...
if (!fTypeMap.containsKey(type.getKey())) {
TypeName typeName = TypeName.string2TypeName(typeToTypeID(type));

View File

@ -51,7 +51,7 @@ import com.ibm.wala.cast.tree.CAstType;
import com.ibm.wala.cast.tree.impl.CAstTypeDictionaryImpl;
import com.ibm.wala.util.debug.Assertions;
public class JDTTypeDictionary extends CAstTypeDictionaryImpl {
public class JDTTypeDictionary extends CAstTypeDictionaryImpl<ITypeBinding> {
// TODO: better way of getting type "ObjecT" that doesn't require us to keep AST? although this is similar to
// polyglot.
@ -62,13 +62,13 @@ public class JDTTypeDictionary extends CAstTypeDictionaryImpl {
/**
*
* @param ast Needed to get root type "java.lang.Object"
* @param translator
*/
public JDTTypeDictionary(AST ast, JDTIdentityMapper identityMapper) {
fAst = ast;
fIdentityMapper = identityMapper;
}
@Override
public CAstType getCAstTypeFor(Object astType) {
ITypeBinding jdtType = JDT2CAstUtils.getErasedType((ITypeBinding) astType, fAst);
@ -88,7 +88,7 @@ public class JDTTypeDictionary extends CAstTypeDictionaryImpl {
type = new JdtJavaArrayType(jdtType);
} else
Assertions.UNREACHABLE("getCAstTypeFor() passed type that is not primitive, array, or class?");
super.map(astType, type); // put in cache
super.map((ITypeBinding)astType, type); // put in cache
}
return type;
}
@ -104,27 +104,30 @@ public class JDTTypeDictionary extends CAstTypeDictionaryImpl {
fEltCAstType = getCAstTypeFor(fEltJdtType);
}
@Override
public int getNumDimensions() {
return 1; // always 1 for Java
}
@Override
public CAstType getElementType() {
return fEltCAstType;
}
@Override
public String getName() {
return "[" + fEltCAstType.getName();
}
@SuppressWarnings("unchecked")
public Collection getSupertypes() {
@Override
public Collection<CAstType> getSupertypes() {
if (fEltJdtType.isPrimitive())
return Collections.singleton(getCAstTypeFor(fAst.resolveWellKnownType("java.lang.Object")));
// TODO: there is no '.isReference()' as in Polyglot: is this right? enum? I think if it's another array it will
// just ignore it
// TEST DOUBLE ARRAYS! and maybe ask someone?
assert fEltJdtType.isArray() || fEltJdtType.isClass() : "Non-primitive, non-reference array element type!";
Collection<CAstType> supers = new ArrayList<CAstType>();
Collection<CAstType> supers = new ArrayList<>();
for (ITypeBinding type : fEltJdtType.getInterfaces()) {
supers.add(getCAstTypeFor(type));
}
@ -139,6 +142,7 @@ public class JDTTypeDictionary extends CAstTypeDictionaryImpl {
private Collection<CAstType> fSuperTypes = null;
@Override
public String toString() {
return super.toString() + ":" + getName();
}
@ -148,12 +152,13 @@ public class JDTTypeDictionary extends CAstTypeDictionaryImpl {
fType = type;
}
@Override
public String getName() {
return fIdentityMapper.getTypeRef(fType).getName().toString();
}
@SuppressWarnings("unchecked")
public Collection getSupertypes() {
@Override
public Collection<CAstType> getSupertypes() {
if (fSuperTypes == null) {
buildSuperTypes();
}
@ -167,7 +172,7 @@ public class JDTTypeDictionary extends CAstTypeDictionaryImpl {
.getSuperclass();
int N = fType.getInterfaces().length + 1;
fSuperTypes = new ArrayList<CAstType>(N);
fSuperTypes = new ArrayList<>(N);
// Following assumes that noone can call getSupertypes() before we have
// created CAstType's for every type in the program being analyzed.
fSuperTypes.add(getCAstTypeFor(superType));
@ -175,10 +180,12 @@ public class JDTTypeDictionary extends CAstTypeDictionaryImpl {
fSuperTypes.add(getCAstTypeFor(t));
}
@Override
public Collection<CAstQualifier> getQualifiers() {
return JDT2CAstUtils.mapModifiersToQualifiers(fType.getModifiers(), fType.isInterface(), fType.isAnnotation());
}
@Override
public boolean isInterface() {
return fType.isInterface();
}

View File

@ -0,0 +1,39 @@
package com.ibm.wala.cast.java.translator.jdt.ecj;
import java.io.IOException;
import com.ibm.wala.cast.java.ipa.callgraph.JavaSourceAnalysisScope;
import com.ibm.wala.cast.java.loader.JavaSourceLoaderImpl;
import com.ibm.wala.classLoader.ClassLoaderFactoryImpl;
import com.ibm.wala.classLoader.ClassLoaderImpl;
import com.ibm.wala.classLoader.IClassLoader;
import com.ibm.wala.ipa.callgraph.AnalysisScope;
import com.ibm.wala.ipa.cha.IClassHierarchy;
import com.ibm.wala.types.ClassLoaderReference;
import com.ibm.wala.util.config.SetOfClasses;
public class ECJClassLoaderFactory extends ClassLoaderFactoryImpl {
public ECJClassLoaderFactory(SetOfClasses exclusions) {
super(exclusions);
}
// TODO remove code duplication with JDTClassLoaderFactory
@Override
protected IClassLoader makeNewClassLoader(ClassLoaderReference classLoaderReference, IClassHierarchy cha, IClassLoader parent,
AnalysisScope scope) throws IOException {
if (classLoaderReference.equals(JavaSourceAnalysisScope.SOURCE)) {
ClassLoaderImpl cl = makeSourceLoader(classLoaderReference, cha, parent);
cl.init(scope.getModules(classLoaderReference));
return cl;
} else {
return super.makeNewClassLoader(classLoaderReference, cha, parent, scope);
}
}
protected JavaSourceLoaderImpl makeSourceLoader(ClassLoaderReference classLoaderReference, IClassHierarchy cha, IClassLoader parent) {
return new ECJSourceLoaderImpl(classLoaderReference, parent, cha, false);
}
}

View File

@ -35,53 +35,28 @@
* IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
* UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/
package com.ibm.wala.cast.java.test.data;
package com.ibm.wala.cast.java.translator.jdt.ecj;
import org.eclipse.core.runtime.Plugin;
import org.osgi.framework.BundleContext;
import com.ibm.wala.cast.java.loader.JavaSourceLoaderImpl;
import com.ibm.wala.cast.java.translator.SourceModuleTranslator;
import com.ibm.wala.classLoader.IClassLoader;
import com.ibm.wala.ipa.cha.IClassHierarchy;
import com.ibm.wala.types.ClassLoaderReference;
/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends Plugin {
public class ECJSourceLoaderImpl extends JavaSourceLoaderImpl {
private final boolean dump;
// The plug-in ID
public static final String PLUGIN_ID = "com.ibm.wala.cast.java.test.data";
// The shared instance
private static Activator plugin;
/**
* The constructor
*/
public Activator() {
}
/*
* (non-Javadoc)
* @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
/*
* (non-Javadoc)
* @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}
/**
* Returns the shared instance
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}
public ECJSourceLoaderImpl(ClassLoaderReference loaderRef, IClassLoader parent, IClassHierarchy cha) {
this(loaderRef, parent, cha, false);
}
public ECJSourceLoaderImpl(ClassLoaderReference loaderRef, IClassLoader parent, IClassHierarchy cha, boolean dump) {
super(loaderRef, parent, cha);
this.dump = dump;
}
@Override
protected SourceModuleTranslator getTranslator() {
return new ECJSourceModuleTranslator(cha.getScope(), this, dump);
}
}

View File

@ -0,0 +1,210 @@
/*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html.
*
* This file is a derivative of code released by the University of
* California under the terms listed below.
*
* WALA JDT Frontend is Copyright (c) 2008 The Regents of the
* University of California (Regents). Provided that this notice and
* the following two paragraphs are included in any distribution of
* Refinement Analysis Tools or its derivative work, Regents agrees
* not to assert any of Regents' copyright rights in Refinement
* Analysis Tools against recipient for recipient's reproduction,
* preparation of derivative works, public display, public
* performance, distribution or sublicensing of Refinement Analysis
* Tools and derivative works, in source code and object code form.
* This agreement not to assert does not confer, by implication,
* estoppel, or otherwise any license or rights in any intellectual
* property of Regents, including, but not limited to, any patents
* of Regents or Regents' employees.
*
* IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
* INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE
* AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY
* WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING
* DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS
* IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
* UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/
package com.ibm.wala.cast.java.translator.jdt.ecj;
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Hashtable;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.compiler.IProblem;
import org.eclipse.jdt.core.dom.AST;
import org.eclipse.jdt.core.dom.ASTParser;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.dom.FileASTRequestor;
import com.ibm.wala.cast.java.translator.Java2IRTranslator;
import com.ibm.wala.cast.java.translator.SourceModuleTranslator;
import com.ibm.wala.cast.java.translator.jdt.JDTJava2CAstTranslator;
import com.ibm.wala.cast.tree.CAstSourcePositionMap.Position;
import com.ibm.wala.cast.tree.impl.RangePosition;
import com.ibm.wala.classLoader.DirectoryTreeModule;
import com.ibm.wala.classLoader.JarFileModule;
import com.ibm.wala.classLoader.JarStreamModule;
import com.ibm.wala.classLoader.Module;
import com.ibm.wala.classLoader.ModuleEntry;
import com.ibm.wala.classLoader.SourceFileModule;
import com.ibm.wala.ipa.callgraph.AnalysisScope;
import com.ibm.wala.types.ClassLoaderReference;
import com.ibm.wala.util.collections.HashMapFactory;
import com.ibm.wala.util.collections.Pair;
import com.ibm.wala.util.io.TemporaryFile;
/**
* A SourceModuleTranslator whose implementation of loadAllSources() uses the PolyglotFrontEnd pseudo-compiler to generate DOMO IR
* for the sources in the compile-time classpath.
*
* @author rfuhrer
*/
// remove me comment: Jdt little-case = not OK, upper case = OK
public class ECJSourceModuleTranslator implements SourceModuleTranslator {
private final class ECJAstToIR extends FileASTRequestor {
private final Map<String, ModuleEntry> sourceMap;
public ECJAstToIR(Map<String, ModuleEntry> sourceMap) {
this.sourceMap = sourceMap;
}
@Override
public void acceptAST(String source, CompilationUnit ast) {
JDTJava2CAstTranslator<Position> jdt2cast = makeCAstTranslator(ast, source);
final Java2IRTranslator java2ir = makeIRTranslator();
java2ir.translate(sourceMap.get(source), jdt2cast.translateToCAst());
if (! "true".equals(System.getProperty("wala.jdt.quiet"))) {
IProblem[] problems = ast.getProblems();
int length = problems.length;
if (length > 0) {
StringBuffer buffer = new StringBuffer();
for (int i = 0; i < length; i++) {
buffer.append(problems[i].getMessage());
buffer.append('\n');
}
if (length != 0)
System.err.println("Unexpected problems in " + source + "\n " + buffer.toString());
}
}
}
}
protected boolean dump;
protected ECJSourceLoaderImpl sourceLoader;
private final String[] sources;
private final String[] libs;
public ECJSourceModuleTranslator(AnalysisScope scope, ECJSourceLoaderImpl sourceLoader) {
this(scope, sourceLoader, false);
}
public ECJSourceModuleTranslator(AnalysisScope scope, ECJSourceLoaderImpl sourceLoader, boolean dump) {
this.sourceLoader = sourceLoader;
this.dump = dump;
Pair<String[], String[]> paths = computeClassPath(scope);
sources = paths.fst;
libs = paths.snd;
}
private static Pair<String[],String[]> computeClassPath(AnalysisScope scope) {
List<String> sources = new LinkedList<>();
List<String> libs = new LinkedList<>();
for (ClassLoaderReference cl : scope.getLoaders()) {
while (cl != null) {
List<Module> modules = scope.getModules(cl);
for (Module m : modules) {
if (m instanceof JarFileModule) {
JarFileModule jarFileModule = (JarFileModule) m;
libs.add(jarFileModule.getAbsolutePath());
} else if (m instanceof JarStreamModule) {
try {
File F = File.createTempFile("tmp", "jar");
F.deleteOnExit();
TemporaryFile.streamToFile(F, ((JarStreamModule)m));
libs.add(F.getAbsolutePath());
} catch (IOException e) {
assert false : e;
}
} else if (m instanceof DirectoryTreeModule) {
DirectoryTreeModule directoryTreeModule = (DirectoryTreeModule) m;
sources.add(directoryTreeModule.getPath());
} else {
//Assertions.UNREACHABLE("Module entry is neither jar file nor directory");
}
}
cl = cl.getParent();
}
}
return Pair.make(sources.toArray(new String[ sources.size() ]), libs.toArray(new String[ libs.size() ]));
}
/*
* Project -> AST code from org.eclipse.jdt.core.tests.performance
*/
@Override
public void loadAllSources(Set<ModuleEntry> modules) {
List<String> sources = new LinkedList<>();
Map<String, ModuleEntry> sourceMap = HashMapFactory.make();
for(ModuleEntry m : modules) {
if (m.isSourceFile()) {
SourceFileModule s = (SourceFileModule)m;
sourceMap.put(s.getAbsolutePath(), s);
sources.add(s.getAbsolutePath());
}
}
String[] sourceFiles = sources.toArray(new String[ sources.size() ]);
final ASTParser parser = ASTParser.newParser(AST.JLS8);
parser.setResolveBindings(true);
parser.setEnvironment(libs, this.sources, null, false);
Hashtable<String, String> options = JavaCore.getOptions();
options.put(JavaCore.COMPILER_SOURCE, "1.8");
parser.setCompilerOptions(options);
parser.createASTs(sourceFiles, null, new String[0], new ECJAstToIR(sourceMap), new NullProgressMonitor());
}
protected Java2IRTranslator makeIRTranslator() {
return new Java2IRTranslator(sourceLoader);
}
protected JDTJava2CAstTranslator<Position> makeCAstTranslator(CompilationUnit cu, String fullPath) {
return new JDTJava2CAstTranslator<Position>(sourceLoader, cu, fullPath, false, dump) {
@Override
public Position makePosition(int start, int end) {
try {
return new RangePosition(new URL("file://" + fullPath), this.cu.getLineNumber(start), start, end);
} catch (MalformedURLException e) {
throw new RuntimeException("bad file: " + fullPath, e);
}
}
};
}
}

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="source"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.ibm.wala.cast.java.jdt.test</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -1,22 +0,0 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: WALA CAst Java JDT Test Plug-in
Bundle-SymbolicName: com.ibm.wala.cast.java.jdt.test
Bundle-Version: 1.0.0
Bundle-Activator: com.ibm.wala.cast.java.jdt.test.Activator
Bundle-Vendor: IBM
Require-Bundle: com.ibm.wala.cast;bundle-version="1.0.0",
com.ibm.wala.cast.java;bundle-version="1.0.0",
com.ibm.wala.cast.java.test;bundle-version="1.0.0",
com.ibm.wala.cast.test;bundle-version="1.0.0",
com.ibm.wala.core;bundle-version="1.1.3",
com.ibm.wala.core.tests;bundle-version="1.1.3",
com.ibm.wala.cast.java.jdt;bundle-version="1.0.0",
org.eclipse.core.runtime,
com.ibm.wala.ide;bundle-version="1.1.3",
org.eclipse.core.resources;bundle-version="3.4.1",
com.ibm.wala.ide.tests;bundle-version="1.1.3",
org.eclipse.jdt.core;bundle-version="3.4.2",
org.junit4;bundle-version="4.3.1"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5

View File

@ -1,4 +0,0 @@
source.. = source/
output.. = bin/
bin.includes = META-INF/,\
.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,107 +0,0 @@
/*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html.
*
* This file is a derivative of code released by the University of
* California under the terms listed below.
*
* WALA JDT Frontend is Copyright (c) 2008 The Regents of the
* University of California (Regents). Provided that this notice and
* the following two paragraphs are included in any distribution of
* Refinement Analysis Tools or its derivative work, Regents agrees
* not to assert any of Regents' copyright rights in Refinement
* Analysis Tools against recipient for recipient's reproduction,
* preparation of derivative works, public display, public
* performance, distribution or sublicensing of Refinement Analysis
* Tools and derivative works, in source code and object code form.
* This agreement not to assert does not confer, by implication,
* estoppel, or otherwise any license or rights in any intellectual
* property of Regents, including, but not limited to, any patents
* of Regents or Regents' employees.
*
* IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
* INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE
* AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY
* WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING
* DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS
* IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
* UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/
package com.ibm.wala.cast.java.test;
import java.io.IOException;
import java.util.Collection;
import java.util.List;
import junit.framework.Assert;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import com.ibm.wala.cast.java.client.JDTJavaSourceAnalysisEngine;
import com.ibm.wala.cast.java.client.JavaSourceAnalysisEngine;
import com.ibm.wala.cast.java.ipa.callgraph.JavaSourceAnalysisScope;
import com.ibm.wala.cast.java.test.ide.IDEIRTestUtil;
import com.ibm.wala.core.tests.callGraph.CallGraphTestUtil;
import com.ibm.wala.core.tests.plugin.CoreTestsPlugin;
import com.ibm.wala.ide.tests.util.EclipseTestUtil;
import com.ibm.wala.ipa.callgraph.AnalysisScope;
import com.ibm.wala.ipa.callgraph.Entrypoint;
import com.ibm.wala.ipa.callgraph.impl.Util;
import com.ibm.wala.ipa.cha.IClassHierarchy;
import com.ibm.wala.util.io.FileProvider;
public class JDTJavaIRTests extends JavaIRTests {
public static final String PROJECT_NAME = "com.ibm.wala.cast.java.test.data";
public static final String PROJECT_ZIP = "test_project.zip";
public JDTJavaIRTests() {
super(PROJECT_NAME);
}
@Override
protected void populateScope(JavaSourceAnalysisEngine engine, Collection<String> sources, List<String> libs) throws IOException {
IDEIRTestUtil.populateScope(projectName, (JDTJavaSourceAnalysisEngine)engine, sources, libs);
}
@BeforeClass
public static void beforeClass() {
EclipseTestUtil.importZippedProject(TestPlugin.getDefault(), PROJECT_NAME, PROJECT_ZIP, new NullProgressMonitor());
System.err.println("finish importing project");
}
@AfterClass
public static void afterClass() {
EclipseTestUtil.destroyProject(PROJECT_NAME);
}
@Override
protected JavaSourceAnalysisEngine getAnalysisEngine(final String[] mainClassDescriptors) {
JavaSourceAnalysisEngine engine = new JDTJavaSourceAnalysisEngine(PROJECT_NAME) {
@Override
protected Iterable<Entrypoint> makeDefaultEntrypoints(AnalysisScope scope, IClassHierarchy cha) {
return Util.makeMainEntrypoints(JavaSourceAnalysisScope.SOURCE, cha, mainClassDescriptors);
}
};
try {
engine.setExclusionsFile(FileProvider
.getFileFromPlugin(CoreTestsPlugin.getDefault(), CallGraphTestUtil.REGRESSION_EXCLUSIONS).getAbsolutePath());
} catch (IOException e) {
Assert.assertFalse("Cannot find exclusions file", true);
}
return engine;
}
}

View File

@ -1,43 +0,0 @@
/******************************************************************************
* Copyright (c) 2002 - 2006 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*****************************************************************************/
/*
* Created on Oct 3, 2005
*/
package com.ibm.wala.cast.java.test.ide;
import java.io.File;
import java.io.IOException;
import java.util.Collection;
import java.util.List;
import java.util.jar.JarFile;
import com.ibm.wala.cast.java.client.JDTJavaSourceAnalysisEngine;
import com.ibm.wala.classLoader.JarFileModule;
public class IDEIRTestUtil {
public static void populateScope(String projectName, JDTJavaSourceAnalysisEngine engine, Collection<String> sources, List<String> libs) throws IOException {
boolean foundLib = false;
for (String lib : libs) {
File libFile = new File(lib);
if (libFile.exists()) {
foundLib = true;
engine.addSystemModule(new JarFileModule(new JarFile(libFile)));
}
}
assert foundLib : "couldn't find library file from " + libs;
for (String srcFilePath : sources) {
engine.addSourceModule(srcFilePath);
}
}
}

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="source"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.ibm.wala.cast.java.jdt</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

File diff suppressed because one or more lines are too long

View File

@ -1,20 +0,0 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Jdt Plug-in
Bundle-SymbolicName: com.ibm.wala.cast.java.jdt
Bundle-Version: 1.0.0
Bundle-Activator: com.ibm.wala.cast.java.jdt.Activator
Bundle-Vendor: IBM
Require-Bundle: com.ibm.wala.cast,
com.ibm.wala.cast.java,
com.ibm.wala.core,
org.eclipse.core.runtime,
org.eclipse.jdt.core,
org.eclipse.core.resources,
com.ibm.wala.shrike,
com.ibm.wala.ide
Bundle-ActivationPolicy: lazy
Export-Package: com.ibm.wala.cast.java.client,
com.ibm.wala.cast.java.jdt,
com.ibm.wala.cast.java.translator.jdt
Bundle-RequiredExecutionEnvironment: JavaSE-1.6

View File

@ -1,4 +0,0 @@
source.. = source/
output.. = bin/
bin.includes = META-INF/,\
.

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="source"/>
<classpathentry kind="lib" path="/com.ibm.wala.cast.java.polyglot/lib/polyglot.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.ibm.wala.cast.java.polyglot.test</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -1,4 +0,0 @@
#Mon Apr 13 15:21:17 EDT 2009
eclipse.preferences.version=1
formatter_profile=_WALA
formatter_settings_version=11

View File

@ -1,18 +0,0 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: WALA Cast Java Polyglot Test Plug-in
Bundle-SymbolicName: com.ibm.wala.cast.java.polyglot.test
Bundle-Version: 1.0.0
Bundle-Activator: com.ibm.wala.cast.java.polyglot.test.Activator
Bundle-Vendor: IBM
Require-Bundle: com.ibm.wala.cast;bundle-version="1.0.0",
com.ibm.wala.cast.java;bundle-version="1.0.0",
com.ibm.wala.cast.java.test;bundle-version="1.0.0",
com.ibm.wala.core;bundle-version="1.1.3",
com.ibm.wala.core.tests;bundle-version="1.1.3",
org.eclipse.core.runtime,
com.ibm.wala.cast.test;bundle-version="1.0.0",
com.ibm.wala.cast.java.polyglot;bundle-version="1.0.0",
org.junit4;bundle-version="4.3.1"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy

View File

@ -1,4 +0,0 @@
source.. = source/
output.. = bin/
bin.includes = META-INF/,\
.

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
<stringAttribute key="bad_container_name" value="/com.ibm.wala.cast.java.polyglottest/launchers"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/com.ibm.wala.cast.java.polyglot.test/source/com/ibm/wala/cast/java/test/PolyglotJLexTest.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<stringAttribute key="org.eclipse.debug.ui.ATTR_CAPTURE_IN_FILE" value="/tmp/jlexpolytest.out"/>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.ibm.wala.cast.java.test.PolyglotJLexTest"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.ibm.wala.cast.java.polyglot.test"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dcom.ibm.wala.tracefile=/tmp/jlexpolytrace.txt"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:com.ibm.wala.cast.java.test.data}"/>
</launchConfiguration>

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
<stringAttribute key="bad_container_name" value="/com.ibm.wala.cast.java.polyglottest/launchers"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/com.ibm.wala.cast.java.polyglot.test/source/com/ibm/wala/cast/java/test/PolyglotJavaIRTests.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/java 1.6"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.ibm.wala.cast.java.test.PolyglotJavaIRTests"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.ibm.wala.cast.java.polyglot.test"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea -Xmx512M"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:com.ibm.wala.cast.java.test.data}"/>
</launchConfiguration>

View File

@ -1,31 +0,0 @@
/*******************************************************************************
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package com.ibm.wala.cast.java.test;
import com.ibm.wala.cast.java.client.JavaSourceAnalysisEngine;
import com.ibm.wala.cast.java.ipa.callgraph.JavaSourceAnalysisScope;
import com.ibm.wala.cast.java.translator.polyglot.PolyglotJavaSourceAnalysisEngine;
import com.ibm.wala.core.tests.callGraph.CallGraphTestUtil;
import com.ibm.wala.ipa.callgraph.AnalysisScope;
import com.ibm.wala.ipa.callgraph.Entrypoint;
import com.ibm.wala.ipa.callgraph.impl.Util;
import com.ibm.wala.ipa.cha.IClassHierarchy;
public class PolyglotJLexTest extends JLexTest {
@Override
protected JavaSourceAnalysisEngine getAnalysisEngine(final String[] mainClassDescriptors) {
JavaSourceAnalysisEngine engine = new PolyglotJavaSourceAnalysisEngine() {
protected Iterable<Entrypoint> makeDefaultEntrypoints(AnalysisScope scope, IClassHierarchy cha) {
return Util.makeMainEntrypoints(JavaSourceAnalysisScope.SOURCE, cha, new String[] { "LJLex/Main" });
}
};
engine.setExclusionsFile(CallGraphTestUtil.REGRESSION_EXCLUSIONS);
return engine;
}
}

View File

@ -1,47 +0,0 @@
/*******************************************************************************
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package com.ibm.wala.cast.java.test;
import com.ibm.wala.cast.java.client.JavaSourceAnalysisEngine;
import com.ibm.wala.cast.java.examples.ast.SynchronizedBlockDuplicator;
import com.ibm.wala.cast.java.ipa.callgraph.JavaSourceAnalysisScope;
import com.ibm.wala.cast.java.translator.polyglot.IRTranslatorExtension;
import com.ibm.wala.cast.java.translator.polyglot.JavaIRTranslatorExtension;
import com.ibm.wala.cast.java.translator.polyglot.PolyglotJavaSourceAnalysisEngine;
import com.ibm.wala.cast.tree.CAst;
import com.ibm.wala.cast.tree.impl.CAstRewriter;
import com.ibm.wala.cast.tree.impl.CAstRewriterFactory;
import com.ibm.wala.core.tests.callGraph.CallGraphTestUtil;
import com.ibm.wala.ipa.callgraph.AnalysisScope;
import com.ibm.wala.ipa.callgraph.Entrypoint;
import com.ibm.wala.ipa.callgraph.impl.Util;
import com.ibm.wala.ipa.cha.IClassHierarchy;
public class PolyglotSyncDuplicatorTest extends SyncDuplicatorTest {
protected JavaSourceAnalysisEngine getAnalysisEngine(final String[] mainClassDescriptors) {
JavaSourceAnalysisEngine engine = new PolyglotJavaSourceAnalysisEngine() {
protected Iterable<Entrypoint> makeDefaultEntrypoints(AnalysisScope scope, IClassHierarchy cha) {
return Util.makeMainEntrypoints(JavaSourceAnalysisScope.SOURCE, cha, mainClassDescriptors);
}
public IRTranslatorExtension getTranslatorExtension() {
JavaIRTranslatorExtension ext = new JavaIRTranslatorExtension();
ext.setCAstRewriterFactory(new CAstRewriterFactory() {
public CAstRewriter createCAstRewriter(CAst ast) {
return new SynchronizedBlockDuplicator(ast, true, testMethod);
}
});
return ext;
}
};
engine.setExclusionsFile(CallGraphTestUtil.REGRESSION_EXCLUSIONS);
return engine;
}
}

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="source"/>
<classpathentry exported="true" kind="lib" path="lib/polyglot.jar"/>
<classpathentry exported="true" kind="lib" path="lib/java_cup.jar"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.ibm.wala.cast.java.polyglot</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -1,263 +0,0 @@
#Mon Apr 13 15:38:50 EDT 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
org.eclipse.jdt.core.formatter.blank_lines_before_field=1
org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
org.eclipse.jdt.core.formatter.blank_lines_before_method=1
org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
org.eclipse.jdt.core.formatter.blank_lines_before_package=0
org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
org.eclipse.jdt.core.formatter.comment.format_block_comments=true
org.eclipse.jdt.core.formatter.comment.format_header=false
org.eclipse.jdt.core.formatter.comment.format_html=true
org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
org.eclipse.jdt.core.formatter.comment.format_line_comments=true
org.eclipse.jdt.core.formatter.comment.format_source_code=true
org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
org.eclipse.jdt.core.formatter.comment.line_length=132
org.eclipse.jdt.core.formatter.compact_else_if=true
org.eclipse.jdt.core.formatter.continuation_indentation=2
org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_empty_lines=false
org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
org.eclipse.jdt.core.formatter.indentation.size=4
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
org.eclipse.jdt.core.formatter.lineSplit=132
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
org.eclipse.jdt.core.formatter.tabulation.char=space
org.eclipse.jdt.core.formatter.tabulation.size=2
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true

View File

@ -1,4 +0,0 @@
#Mon Apr 13 15:38:50 EDT 2009
eclipse.preferences.version=1
formatter_profile=_WALA
formatter_settings_version=11

View File

@ -1,35 +0,0 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: WALA CAst Java Polyglot Plug-in
Bundle-SymbolicName: com.ibm.wala.cast.java.polyglot
Bundle-Version: 1.0.0
Bundle-Activator: com.ibm.wala.cast.java.polyglot.Activator
Bundle-Vendor: IBM
Require-Bundle: com.ibm.wala.cast.java,
com.ibm.wala.cast,
com.ibm.wala.core,
org.eclipse.core.runtime,
com.ibm.wala.shrike,
org.eclipse.jdt.core,
org.eclipse.core.resources,
com.ibm.wala.ide
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Export-Package: com.ibm.wala.cast.java.client.polyglot,
com.ibm.wala.cast.java.polyglot;uses:="org.osgi.framework,org.eclipse.core.runtime",
com.ibm.wala.cast.java.translator.polyglot;
uses:="com.ibm.wala.types,
polyglot.types,
polyglot.util,
polyglot.ast,
com.ibm.wala.ipa.cha,
com.ibm.wala.cast.java.client,
com.ibm.wala.classLoader,
com.ibm.wala.cast.tree,
com.ibm.wala.cast.java.loader,
com.ibm.wala.ipa.callgraph.impl,
com.ibm.wala.ipa.callgraph,
polyglot.frontend.goals,
com.ibm.wala.cast.tree.impl,
com.ibm.wala.cast.java.translator,
com.ibm.wala.cast.java.types"

View File

@ -1,4 +0,0 @@
source.. = source/
output.. = bin/
bin.includes = META-INF/,\
.

View File

@ -1,64 +0,0 @@
/*******************************************************************************
* Copyright (c) 2002 - 2006 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package com.ibm.wala.cast.java.client.polyglot;
import java.io.File;
import java.io.IOException;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.IJavaProject;
import com.ibm.wala.cast.java.client.impl.ZeroCFABuilderFactory;
import com.ibm.wala.client.AbstractAnalysisEngine;
import com.ibm.wala.ide.util.EclipseProjectPath;
import com.ibm.wala.ipa.callgraph.AnalysisCache;
import com.ibm.wala.ipa.callgraph.AnalysisOptions;
import com.ibm.wala.ipa.callgraph.CallGraphBuilder;
import com.ibm.wala.ipa.cha.IClassHierarchy;
public class EclipseProjectAnalysisEngine extends AbstractAnalysisEngine {
protected final IPath workspaceRootPath;
protected final IJavaProject project;
protected final EclipseProjectPath ePath;
public EclipseProjectAnalysisEngine(IJavaProject project) throws IOException, CoreException {
super();
this.project = project;
this.workspaceRootPath = ResourcesPlugin.getWorkspace().getRoot().getLocation();
assert project != null;
assert workspaceRootPath != null;
this.ePath = createProjectPath(project);
// setCallGraphBuilderFactory(new ZeroCFABuilderFactory());
}
protected EclipseProjectPath createProjectPath(IJavaProject project) throws IOException, CoreException {
return EclipseProjectPath.make(project);
}
@Override
public void buildAnalysisScope() throws IOException {
super.scope = ePath.toAnalysisScope(new File(getExclusionsFile()));
}
public EclipseProjectPath getEclipseProjectPath() {
return ePath;
}
@Override
protected CallGraphBuilder getCallGraphBuilder(IClassHierarchy cha, AnalysisOptions options, AnalysisCache cache) {
return new ZeroCFABuilderFactory().make(options, cache, cha, scope, false);
}
}

View File

@ -1,161 +0,0 @@
/******************************************************************************
* Copyright (c) 2002 - 2006 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*****************************************************************************/
package com.ibm.wala.cast.java.client.polyglot;
import java.io.File;
import java.io.IOException;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.IJavaProject;
import com.ibm.wala.cast.ir.ssa.AstIRFactory;
import com.ibm.wala.cast.java.ipa.callgraph.JavaSourceAnalysisScope;
import com.ibm.wala.cast.java.translator.polyglot.IRTranslatorExtension;
import com.ibm.wala.cast.java.translator.polyglot.JavaIRTranslatorExtension;
import com.ibm.wala.cast.java.translator.polyglot.PolyglotClassLoaderFactory;
import com.ibm.wala.classLoader.BinaryDirectoryTreeModule;
import com.ibm.wala.classLoader.ClassLoaderFactory;
import com.ibm.wala.classLoader.Module;
import com.ibm.wala.classLoader.SourceDirectoryTreeModule;
import com.ibm.wala.core.plugin.CorePlugin;
import com.ibm.wala.ide.util.EclipseProjectPath;
import com.ibm.wala.ide.util.EclipseProjectPath.Loader;
import com.ibm.wala.ipa.callgraph.AnalysisCache;
import com.ibm.wala.ipa.callgraph.AnalysisOptions;
import com.ibm.wala.ipa.callgraph.AnalysisScope;
import com.ibm.wala.ipa.callgraph.Entrypoint;
import com.ibm.wala.ipa.callgraph.impl.SetOfClasses;
import com.ibm.wala.ipa.callgraph.impl.Util;
import com.ibm.wala.ipa.cha.ClassHierarchy;
import com.ibm.wala.ipa.cha.ClassHierarchyException;
import com.ibm.wala.ipa.cha.IClassHierarchy;
import com.ibm.wala.ssa.SSAOptions;
import com.ibm.wala.ssa.SymbolTable;
import com.ibm.wala.types.ClassLoaderReference;
import com.ibm.wala.util.config.FileOfClasses;
import com.ibm.wala.util.debug.Assertions;
import com.ibm.wala.util.io.FileProvider;
/**
* An {@link EclipseProjectAnalysisEngine} specialized for source code analysis with CAst
*/
public class EclipseProjectSourceAnalysisEngine extends EclipseProjectAnalysisEngine {
public static final String defaultFileExt = "java";
/**
* file extension for source files in this Eclipse project
*/
final String fileExt;
public EclipseProjectSourceAnalysisEngine(IJavaProject project) throws IOException, CoreException {
this(project, defaultFileExt);
}
public EclipseProjectSourceAnalysisEngine(IJavaProject project, String fileExt) throws IOException, CoreException {
super(project);
this.fileExt = fileExt;
try {
setExclusionsFile(FileProvider.getFileFromPlugin(CorePlugin.getDefault(), "J2SEClassHierarchyExclusions.txt")
.getAbsolutePath());
} catch (IOException e) {
Assertions.UNREACHABLE("Cannot find exclusions file");
}
}
@Override
public AnalysisCache makeDefaultCache() {
return new AnalysisCache(AstIRFactory.makeDefaultFactory());
}
protected AnalysisScope makeSourceAnalysisScope() {
return new JavaSourceAnalysisScope();
}
@Override
public void buildAnalysisScope() {
try {
scope = makeSourceAnalysisScope();
if (getExclusionsFile() != null) {
scope.setExclusions(FileOfClasses.createFileOfClasses(new File(getExclusionsFile())));
}
EclipseProjectPath epath = getEclipseProjectPath();
for (Module m : epath.getModules(Loader.PRIMORDIAL, true)) {
scope.addToScope(scope.getPrimordialLoader(), m);
}
ClassLoaderReference app = scope.getApplicationLoader();
ClassLoaderReference src = ((JavaSourceAnalysisScope) scope).getSourceLoader();
for (Module m : epath.getModules(Loader.APPLICATION, true)) {
if (m instanceof SourceDirectoryTreeModule) {
scope.addToScope(src, m);
} else {
scope.addToScope(app, m);
}
}
for (Module m : epath.getModules(Loader.EXTENSION, true)) {
if (!(m instanceof BinaryDirectoryTreeModule))
scope.addToScope(app, m);
}
/*
* ClassLoaderReference src = ((JavaSourceAnalysisScope)scope).getSourceLoader(); for (Module m :
* epath.getModules(Loader.APPLICATION, false)) { scope.addToScope(src, m); }
*/
} catch (IOException e) {
Assertions.UNREACHABLE(e.toString());
}
}
public IRTranslatorExtension getTranslatorExtension() {
return new JavaIRTranslatorExtension();
}
protected ClassLoaderFactory getClassLoaderFactory(SetOfClasses exclusions, IRTranslatorExtension extInfo) {
return new PolyglotClassLoaderFactory(exclusions, extInfo);
}
@Override
public IClassHierarchy buildClassHierarchy() {
IClassHierarchy cha = null;
ClassLoaderFactory factory = getClassLoaderFactory(scope.getExclusions(), getTranslatorExtension());
try {
cha = ClassHierarchy.make(getScope(), factory);
} catch (ClassHierarchyException e) {
System.err.println("Class Hierarchy construction failed");
System.err.println(e.toString());
e.printStackTrace();
}
return cha;
}
@Override
protected Iterable<Entrypoint> makeDefaultEntrypoints(AnalysisScope scope, IClassHierarchy cha) {
return Util.makeMainEntrypoints(JavaSourceAnalysisScope.SOURCE, cha);
}
@Override
public AnalysisOptions getDefaultOptions(Iterable<Entrypoint> entrypoints) {
AnalysisOptions options = new AnalysisOptions(getScope(), entrypoints);
SSAOptions ssaOptions = new SSAOptions();
ssaOptions.setDefaultValues(new SSAOptions.DefaultValues() {
public int getDefaultValue(SymbolTable symtab, int valueNumber) {
return symtab.getDefaultValue(valueNumber);
}
});
options.setSSAOptions(ssaOptions);
return options;
}
}

View File

@ -1,52 +0,0 @@
package com.ibm.wala.cast.java.polyglot;
import org.eclipse.core.runtime.Plugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends Plugin {
// The plug-in ID
public static final String PLUGIN_ID = "com.ibm.wala.cast.java.polyglot";
// The shared instance
private static Activator plugin;
/**
* The constructor
*/
public Activator() {
}
/*
* (non-Javadoc)
*
* @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}
/**
* Returns the shared instance
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}
}

View File

@ -1,204 +0,0 @@
/******************************************************************************
* Copyright (c) 2002 - 2006 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*****************************************************************************/
/*
* Created on Sep 1, 2005
*/
package com.ibm.wala.cast.java.translator.polyglot;
import polyglot.ast.ArrayAccess;
import polyglot.ast.ArrayAccessAssign;
import polyglot.ast.ArrayInit;
import polyglot.ast.ArrayTypeNode;
import polyglot.ast.Assert;
import polyglot.ast.Binary;
import polyglot.ast.Block;
import polyglot.ast.BooleanLit;
import polyglot.ast.Branch;
import polyglot.ast.Call;
import polyglot.ast.CanonicalTypeNode;
import polyglot.ast.Case;
import polyglot.ast.Cast;
import polyglot.ast.Catch;
import polyglot.ast.CharLit;
import polyglot.ast.ClassBody;
import polyglot.ast.ClassDecl;
import polyglot.ast.ClassLit;
import polyglot.ast.Conditional;
import polyglot.ast.ConstructorCall;
import polyglot.ast.ConstructorDecl;
import polyglot.ast.Do;
import polyglot.ast.Empty;
import polyglot.ast.Eval;
import polyglot.ast.Field;
import polyglot.ast.FieldAssign;
import polyglot.ast.FieldDecl;
import polyglot.ast.FloatLit;
import polyglot.ast.For;
import polyglot.ast.Formal;
import polyglot.ast.If;
import polyglot.ast.Import;
import polyglot.ast.Initializer;
import polyglot.ast.Instanceof;
import polyglot.ast.IntLit;
import polyglot.ast.Labeled;
import polyglot.ast.Local;
import polyglot.ast.LocalAssign;
import polyglot.ast.LocalClassDecl;
import polyglot.ast.LocalDecl;
import polyglot.ast.MethodDecl;
import polyglot.ast.New;
import polyglot.ast.NewArray;
import polyglot.ast.Node;
import polyglot.ast.NullLit;
import polyglot.ast.PackageNode;
import polyglot.ast.Return;
import polyglot.ast.Special;
import polyglot.ast.StringLit;
import polyglot.ast.Switch;
import polyglot.ast.SwitchBlock;
import polyglot.ast.Synchronized;
import polyglot.ast.Throw;
import polyglot.ast.Try;
import polyglot.ast.Unary;
import polyglot.ast.While;
import com.ibm.wala.cast.java.translator.polyglot.PolyglotJava2CAstTranslator.MethodContext;
import com.ibm.wala.cast.java.translator.polyglot.PolyglotJava2CAstTranslator.WalkContext;
import com.ibm.wala.cast.tree.CAstNode;
import com.ibm.wala.util.debug.Assertions;
/**
* Wrapper for the logic (nasty cascaded instanceof tests) necessary to visit a Polyglot AST and dispatch to the appropriate
* TranslatingVisitor methods for each AST node type.
*
* @author rfuhrer
*/
public class ASTTraverser {
protected ASTTraverser() {
}
public static CAstNode visit(Node n, TranslatingVisitor tv, WalkContext wc) {
if (n instanceof MethodDecl) {
return tv.visit((MethodDecl) n, (MethodContext) wc);
} else if (n instanceof ConstructorDecl) {
return tv.visit((ConstructorDecl) n, (MethodContext) wc);
} else if (n instanceof FieldDecl) {
return tv.visit((FieldDecl) n, (MethodContext) wc);
} else if (n instanceof Import) {
return tv.visit((Import) n, wc);
} else if (n instanceof PackageNode) {
return tv.visit((PackageNode) n, wc);
} else if (n instanceof CanonicalTypeNode) {
return tv.visit((CanonicalTypeNode) n, wc);
} else if (n instanceof ArrayTypeNode) {
return tv.visit((ArrayTypeNode) n, wc);
} else if (n instanceof ArrayInit) {
return tv.visit((ArrayInit) n, wc);
} else if (n instanceof ArrayAccessAssign) {
return tv.visit((ArrayAccessAssign) n, wc);
} else if (n instanceof FieldAssign) {
return tv.visit((FieldAssign) n, wc);
} else if (n instanceof LocalAssign) {
return tv.visit((LocalAssign) n, wc);
} else if (n instanceof Binary) {
return tv.visit((Binary) n, wc);
} else if (n instanceof Call) {
return tv.visit((Call) n, wc);
} else if (n instanceof ConstructorCall) {
return tv.visit((ConstructorCall) n, wc);
} else if (n instanceof Cast) {
return tv.visit((Cast) n, wc);
} else if (n instanceof Conditional) {
return tv.visit((Conditional) n, wc);
} else if (n instanceof Instanceof) {
return tv.visit((Instanceof) n, wc);
} else if (n instanceof BooleanLit) {
return tv.visit((BooleanLit) n, wc);
} else if (n instanceof ClassLit) {
return tv.visit((ClassLit) n, wc);
} else if (n instanceof FloatLit) {
return tv.visit((FloatLit) n, wc);
} else if (n instanceof NullLit) {
return tv.visit((NullLit) n, wc);
} else if (n instanceof CharLit) {
return tv.visit((CharLit) n, wc);
} else if (n instanceof IntLit) {
return tv.visit((IntLit) n, wc);
} else if (n instanceof StringLit) {
return tv.visit((StringLit) n, wc);
} else if (n instanceof New) {
return tv.visit((New) n, wc);
} else if (n instanceof NewArray) {
return tv.visit((NewArray) n, wc);
} else if (n instanceof Special) {
return tv.visit((Special) n, wc);
} else if (n instanceof Unary) {
return tv.visit((Unary) n, wc);
} else if (n instanceof ArrayAccess) {
return tv.visit((ArrayAccess) n, wc);
} else if (n instanceof Field) {
return tv.visit((Field) n, wc);
} else if (n instanceof Local) {
return tv.visit((Local) n, wc);
} else if (n instanceof ClassBody) {
return tv.visit((ClassBody) n, wc);
} else if (n instanceof ClassDecl) {
return tv.visit((ClassDecl) n, wc);
} else if (n instanceof Initializer) {
return tv.visit((Initializer) n, wc);
} else if (n instanceof Assert) {
return tv.visit((Assert) n, wc);
} else if (n instanceof Branch) {
return tv.visit((Branch) n, wc);
} else if (n instanceof SwitchBlock) { // must test for this one before Block
return tv.visit((SwitchBlock) n, wc);
} else if (n instanceof Block) { // must test for this one before Block
return tv.visit((Block) n, wc);
} else if (n instanceof Catch) {
return tv.visit((Catch) n, wc);
} else if (n instanceof If) {
return tv.visit((If) n, wc);
} else if (n instanceof Labeled) {
return tv.visit((Labeled) n, wc);
} else if (n instanceof LocalClassDecl) {
return tv.visit((LocalClassDecl) n, wc);
} else if (n instanceof Do) {
return tv.visit((Do) n, wc);
} else if (n instanceof For) {
return tv.visit((For) n, wc);
} else if (n instanceof While) {
return tv.visit((While) n, wc);
} else if (n instanceof Switch) {
return tv.visit((Switch) n, wc);
} else if (n instanceof Synchronized) {
return tv.visit((Synchronized) n, wc);
} else if (n instanceof Try) {
return tv.visit((Try) n, wc);
} else if (n instanceof Empty) {
return tv.visit((Empty) n, wc);
} else if (n instanceof Eval) {
return tv.visit((Eval) n, wc);
} else if (n instanceof LocalDecl) {
return tv.visit((LocalDecl) n, wc);
} else if (n instanceof Return) {
return tv.visit((Return) n, wc);
} else if (n instanceof Case) {
return tv.visit((Case) n, wc);
} else if (n instanceof Throw) {
return tv.visit((Throw) n, wc);
} else if (n instanceof Formal) {
return tv.visit((Formal) n, wc);
} else {
Assertions.UNREACHABLE("Unhandled node " + n + " of type " + n.getClass().getName() + " in ASTTraverser.visit().");
return null;
}
}
}

View File

@ -1,47 +0,0 @@
/******************************************************************************
* Copyright (c) 2002 - 2006 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*****************************************************************************/
package com.ibm.wala.cast.java.translator.polyglot;
import polyglot.ast.ArrayInit;
import polyglot.ast.Expr;
import polyglot.frontend.Job;
import polyglot.frontend.Scheduler;
import polyglot.frontend.VisitorGoal;
import polyglot.types.SemanticException;
import polyglot.types.Type;
import polyglot.visit.AscriptionVisitor;
/**
* Runs an AscriptionVisitor to make sure that empty array literals actually get a type.
* @author rfuhrer
*/
public class AscriptionGoal extends VisitorGoal {
/**
*
*/
private static final long serialVersionUID = 7416951196743862079L;
public AscriptionGoal(Job job) {
super(job,
new AscriptionVisitor(job, job.extensionInfo().typeSystem(), job.extensionInfo().nodeFactory()) {
public Expr ascribe(Expr e, Type toType) throws SemanticException {
if (e instanceof ArrayInit && e.type().isNull()) {
return e.type(toType);
}
return super.ascribe(e, toType);
}
}
);
Scheduler scheduler= job.extensionInfo().scheduler();
addPrereq(scheduler.TypeChecked(job));
}
}

View File

@ -1,72 +0,0 @@
/******************************************************************************
* Copyright (c) 2002 - 2006 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*****************************************************************************/
package com.ibm.wala.cast.java.translator.polyglot;
import polyglot.frontend.ExtensionInfo;
import polyglot.frontend.Job;
import polyglot.frontend.Scheduler;
import polyglot.frontend.SourceGoal_c;
import com.ibm.wala.cast.java.loader.JavaSourceLoaderImpl;
import com.ibm.wala.cast.java.translator.Java2IRTranslator;
/**
* A kind of EndGoal that indicates that WALA IR has been generated for the given compilation unit.
* @author rfuhrer
*/
public class IRGoal extends SourceGoal_c /* PORT1.7 removed 'implements EndGoal' */ {
/**
*
*/
private static final long serialVersionUID = -8023929848709826817L;
private JavaSourceLoaderImpl fSourceLoader;
protected Java2IRTranslator fTranslator;
public IRGoal(Job job, JavaSourceLoaderImpl sourceLoader) {
super(job);
fSourceLoader = sourceLoader;
Scheduler scheduler= job.extensionInfo().scheduler();
addPrereq(scheduler.TypeChecked(job));
// PORT1.7 - TypeChecked will suffice for what used to require ConstantsChecked.
// Need ConstantsChecked in order to make sure that case statements have non-zero labels.
// addPrereq(scheduler.ConstantsChecked(job));
// Need to add an AscriptionGoal as a prereq to make sure that empty array initializers get a type ascribed.
addPrereq(new AscriptionGoal(job));
}
@Override
public boolean runTask() {
ExtensionInfo extInfo= job.extensionInfo();
fTranslator= new Java2IRTranslator(
fSourceLoader,
((IRTranslatorExtension)extInfo).getCAstRewriterFactory());
ModuleSource src = (ModuleSource) job.source();
fTranslator.translate(
src.getModule(),
new PolyglotJava2CAstTranslator(
job.ast(),
fSourceLoader.getReference(),
extInfo.nodeFactory(),
extInfo.typeSystem(),
new PolyglotIdentityMapper(fSourceLoader.getReference()),
((IRTranslatorExtension)extInfo).getReplicateForDoLoops()).translateToCAst());
return true;
}
public String name() {
return "<WALA IR goal for " + job.source().path() + ">";
}
}

View File

@ -1,32 +0,0 @@
/******************************************************************************
* Copyright (c) 2002 - 2006 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*****************************************************************************/
/*
* Created on Oct 21, 2005
*/
package com.ibm.wala.cast.java.translator.polyglot;
import com.ibm.wala.cast.tree.impl.CAstRewriterFactory;
public interface IRTranslatorExtension {
void setSourceLoader(PolyglotSourceLoaderImpl jsli);
/**
* @return the identity mapper, for mapping AST nodes to WALA TypeReferences, MethodReferences and FieldReferences. Helps clients
* to correlate analysis results to AST nodes.
*/
PolyglotIdentityMapper getIdentityMapper();
/**
*/
CAstRewriterFactory<?,?> getCAstRewriterFactory();
boolean getReplicateForDoLoops();
}

View File

@ -1,75 +0,0 @@
/******************************************************************************
* Copyright (c) 2002 - 2006 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*****************************************************************************/
/*
* Created on Oct 6, 2005
*/
package com.ibm.wala.cast.java.translator.polyglot;
import java.util.List;
import polyglot.frontend.Goal;
import polyglot.frontend.JLExtensionInfo;
import polyglot.frontend.JLScheduler;
import polyglot.frontend.Job;
import polyglot.frontend.Scheduler;
import com.ibm.wala.cast.tree.impl.CAstRewriterFactory;
/**
* A Polyglot extension descriptor for a test harness extension that generates WALA IR for
* the sources and class files in the classpath.
* @author rfuhrer
*/
public class JavaIRTranslatorExtension extends JLExtensionInfo implements IRTranslatorExtension {
protected PolyglotSourceLoaderImpl fSourceLoader;
protected PolyglotIdentityMapper fMapper;
protected CAstRewriterFactory<?,?> rewriterFactory;
//PORT1.7 getCompileGoal() no longer exists; set the compile goal by manipulating the End goal for the job
@Override
protected Scheduler createScheduler() {
return new JLScheduler(this) {
@Override
public List<Goal> goals(Job job) {
List<Goal> goals= super.goals(job);
Goal endGoal = goals.get(goals.size()-1);
if (!(endGoal.name().equals("End"))) {
throw new IllegalStateException("Last goal is not an End goal?");
}
endGoal.addPrereq(new IRGoal(job, fSourceLoader));
return goals;
}
};
}
public void setSourceLoader(PolyglotSourceLoaderImpl sourceLoader) {
fSourceLoader= sourceLoader;
fMapper= new PolyglotIdentityMapper(sourceLoader.getReference());
}
public PolyglotIdentityMapper getIdentityMapper() {
return fMapper;
}
public void setCAstRewriterFactory(CAstRewriterFactory<?,?> factory) {
rewriterFactory = factory;
}
public CAstRewriterFactory<?,?> getCAstRewriterFactory() {
return rewriterFactory;
}
public boolean getReplicateForDoLoops() {
return false;
}
}

View File

@ -1,60 +0,0 @@
/******************************************************************************
* Copyright (c) 2002 - 2006 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*****************************************************************************/
/*
* Created on Oct 6, 2005
*/
package com.ibm.wala.cast.java.translator.polyglot;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import com.ibm.wala.classLoader.SourceModule;
import polyglot.frontend.FileSource;
import polyglot.frontend.Resource;
/**
* A Polyglot Source whose input comes from an InputStream.<br>
* Currently extends FileSource since that's all that the Polyglot Compiler class
* will accept.
* @author rfuhrer
*/
public class ModuleSource extends FileSource {
private final SourceModule module;
SourceModule getModule() {
return module;
}
public ModuleSource(final SourceModule module) throws IOException {
super(new Resource() {
public File file() {
return new File(module.getURL().getFile());
}
public InputStream getInputStream() throws IOException {
return module.getInputStream();
}
public String name() {
String fullPath = module.getURL().getFile();
int idx= fullPath.lastIndexOf(File.separatorChar);
return (idx > 0) ? fullPath.substring(idx+1) : fullPath;
}
@Override
public String toString() {
return module.getName();
}
}, true);
this.module = module;
}
}

View File

@ -1,57 +0,0 @@
/******************************************************************************
* Copyright (c) 2002 - 2006 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*****************************************************************************/
/*
* Created on Oct 7, 2005
*/
package com.ibm.wala.cast.java.translator.polyglot;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import com.ibm.wala.cast.java.ipa.callgraph.JavaSourceAnalysisScope;
import com.ibm.wala.classLoader.ClassLoaderFactoryImpl;
import com.ibm.wala.classLoader.ClassLoaderImpl;
import com.ibm.wala.classLoader.IClassLoader;
import com.ibm.wala.ipa.callgraph.AnalysisScope;
import com.ibm.wala.ipa.callgraph.impl.SetOfClasses;
import com.ibm.wala.ipa.cha.IClassHierarchy;
import com.ibm.wala.types.ClassLoaderReference;
public class PolyglotClassLoaderFactory extends ClassLoaderFactoryImpl {
/**
* A map from ClassLoaderReference to IRTranslatorExtension, so that source files in different languages are processed by the
* right kind of IRTranslatorExtension.
*/
final protected Map<ClassLoaderReference, IRTranslatorExtension> fExtensionMap = new HashMap<ClassLoaderReference, IRTranslatorExtension>();
public PolyglotClassLoaderFactory(SetOfClasses exclusions, IRTranslatorExtension javaExtInfo) {
super(exclusions);
fExtensionMap.put(JavaSourceAnalysisScope.SOURCE, javaExtInfo);
}
protected IRTranslatorExtension getExtensionFor(ClassLoaderReference clr) {
return fExtensionMap.get(clr);
}
protected IClassLoader makeNewClassLoader(ClassLoaderReference classLoaderReference, IClassHierarchy cha, IClassLoader parent,
AnalysisScope scope) throws IOException {
if (classLoaderReference.equals(JavaSourceAnalysisScope.SOURCE)) {
ClassLoaderImpl cl = new PolyglotSourceLoaderImpl(classLoaderReference, parent, getExclusions(), cha,
getExtensionFor(classLoaderReference));
cl.init(scope.getModules(classLoaderReference));
return cl;
} else {
return super.makeNewClassLoader(classLoaderReference, cha, parent, scope);
}
}
}

View File

@ -1,229 +0,0 @@
/**
*
*/
package com.ibm.wala.cast.java.translator.polyglot;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import polyglot.types.ArrayType;
import polyglot.types.ClassType;
import polyglot.types.CodeInstance;
import polyglot.types.ConstructorInstance;
import polyglot.types.FieldInstance;
import polyglot.types.InitializerInstance;
import polyglot.types.MemberDef;
import polyglot.types.MethodInstance;
import polyglot.types.PrimitiveType;
import polyglot.types.ProcedureInstance;
import polyglot.types.Type;
import com.ibm.wala.cast.java.translator.polyglot.PolyglotJava2CAstTranslator.IdentityMapper;
import com.ibm.wala.cast.java.types.JavaPrimitiveTypeMap;
import com.ibm.wala.types.ClassLoaderReference;
import com.ibm.wala.types.Descriptor;
import com.ibm.wala.types.FieldReference;
import com.ibm.wala.types.MethodReference;
import com.ibm.wala.types.Selector;
import com.ibm.wala.types.TypeName;
import com.ibm.wala.types.TypeReference;
import com.ibm.wala.util.collections.HashMapFactory;
import com.ibm.wala.util.debug.Assertions;
import com.ibm.wala.util.strings.Atom;
/**
* Class responsible for mapping Polyglot type system objects representing types,
* methods and fields to the corresponding WALA TypeReferences, MethodReferences
* and FieldReferences. Used during translation and by clients to help correlate
* WALA analysis results to the various AST nodes.
* @author rfuhrer
*/
public class PolyglotIdentityMapper implements IdentityMapper<Type, CodeInstance, FieldInstance> {
private final Map<Type, TypeReference> fTypeMap = HashMapFactory.make();
private final Map<FieldInstance, FieldReference> fFieldMap = HashMapFactory.make();
private final Map<CodeInstance, MethodReference> fMethodMap = HashMapFactory.make();
/**
* Map from Polyglot local ClassTypes to their enclosing methods. Used by localTypeToTypeID().<br>
* Needed since Polyglot doesn't provide this information. (It doesn't need to, since it
* doesn't need to generate unambiguous names for such entities -- it hands the source
* off to javac to generate bytecode. It probably also wouldn't want to, since that would
* create back-pointers from Type objects in the TypeSystem to AST's.)
*/
protected Map<ClassType, CodeInstance> fLocalTypeMap = new LinkedHashMap<ClassType, CodeInstance>();
protected final ClassLoaderReference fClassLoaderRef;
public PolyglotIdentityMapper(ClassLoaderReference clr) {
fClassLoaderRef= clr;
}
public FieldReference getFieldRef(FieldInstance field) {
if (!fFieldMap.containsKey(field)) {
FieldReference ref= referenceForField(field);
fFieldMap.put(field, ref);
return ref;
}
return fFieldMap.get(field);
}
public TypeReference getTypeRef(Type type) {
if (!fTypeMap.containsKey(type)) {
TypeReference ref= referenceForType(type);
fTypeMap.put(type, ref);
return ref;
}
return fTypeMap.get(type);
}
public MethodReference getMethodRef(CodeInstance method) {
if (!fMethodMap.containsKey(method)) {
MethodReference sel= referenceForMethod(method);
fMethodMap.put(method, sel);
return sel;
}
return fMethodMap.get(method);
}
public void mapLocalAnonTypeToMethod(ClassType anonLocalType, CodeInstance owningProc) {
fLocalTypeMap.put(anonLocalType, owningProc);
}
/**
* Create a FieldReference for the given Polyglot FieldInstance.<br>
* N.B.: This method <b>does not canonicalize</b> the FieldReferences,
* but rather creates a new one for each call.
* You more likely want to call getFieldRef(). This method is exposed
* so that multiple Polyglot instances can use the translation services
* without having FieldInstances collide (producing the dreaded "we are
* TypeSystem_c but type Foo is from TypeSystem_c" exception).
*/
public FieldReference referenceForField(FieldInstance field) {
Type targetType= field.container();
Type fieldType= field.type();
TypeReference targetTypeRef= TypeReference.findOrCreate(fClassLoaderRef, typeToTypeID(targetType));
TypeReference fieldTypeRef= TypeReference.findOrCreate(fClassLoaderRef, typeToTypeID(fieldType));
Atom fieldName= Atom.findOrCreateUnicodeAtom(field.name().toString());
FieldReference fieldRef= FieldReference.findOrCreate(targetTypeRef, fieldName, fieldTypeRef);
return fieldRef;
}
/**
* Create a TypeReference for the given Polyglot Type.<br>
* N.B.: This method <b>does not canonicalize</b> the TypeReferences,
* but rather creates a new one for each call.
* You more likely want to call getTypeRef(). This method is exposed
* so that multiple Polyglot instances can use the translation services
* without having Types collide (producing the dreaded "we are
* TypeSystem_c but type Foo is from TypeSystem_c" exception).
*/
public TypeReference referenceForType(Type type) {
TypeName typeName= TypeName.string2TypeName(typeToTypeID(type));
TypeReference typeRef= TypeReference.findOrCreate(fClassLoaderRef, typeName);
return typeRef;
}
private Selector selectorForMethod(CodeInstance procInstance) {
Atom name=
(procInstance instanceof ConstructorInstance) ?
MethodReference.initAtom :
(procInstance instanceof InitializerInstance) ?
MethodReference.clinitName :
Atom.findOrCreateUnicodeAtom(((MethodInstance) procInstance).name().toString());
TypeName[] argTypeNames = null;
if (! (procInstance instanceof InitializerInstance)) {
List formalTypes = ((ProcedureInstance)procInstance).formalTypes();
int numArgs = formalTypes.size();
// Descriptor prefers null to an empty array
if (numArgs > 0) {
argTypeNames = new TypeName[numArgs];
int i = 0;
for(Iterator iter = formalTypes.iterator(); iter.hasNext(); i++) {
Type argType= (Type) iter.next();
argTypeNames[i]= TypeName.string2TypeName(typeToTypeID(argType));
}
}
}
Type retType=
(procInstance instanceof MethodInstance) ? ((MethodInstance) procInstance).returnType() : procInstance.typeSystem().Void();
TypeName retTypeName= TypeName.string2TypeName(typeToTypeID(retType));
Descriptor desc= Descriptor.findOrCreate(argTypeNames, retTypeName);
return new Selector(name, desc);
}
/**
* Create a MethodReference for the given Polyglot MethodInstance.<br>
* N.B.: This method <b>does not canonicalize</b> the MethodReferences,
* but rather creates a new one for each call.
* You more likely want to call getMethodRef(). This method is exposed
* so that multiple Polyglot instances can use the translation services
* without having MethodInstances collide (producing the dreaded "we are
* TypeSystem_c but type Foo is from TypeSystem_c" exception).
*/
public MethodReference referenceForMethod(CodeInstance procInstance) {
// Handles both ConstructorInstance's and MethodInstance's
TypeName ownerType= TypeName.string2TypeName(typeToTypeID(((MemberDef) procInstance.def()).container().get()));
TypeReference ownerTypeRef= TypeReference.findOrCreate(fClassLoaderRef, ownerType);
MethodReference methodRef= MethodReference.findOrCreate(ownerTypeRef, selectorForMethod(procInstance));
return methodRef;
}
/**
* Translates the given Polyglot type to a name suitable for use in a WALA TypeReference
* (i.e. a bytecode-compliant type name).
*/
public String typeToTypeID(Type type) {
if (type.isPrimitive()) {
PrimitiveType ptype= (PrimitiveType) type;
return JavaPrimitiveTypeMap.getShortName(ptype.name().toString());
} else if (type.isArray()) {
ArrayType atype= (ArrayType) type;
return "[" + typeToTypeID(atype.base());
} else if (type.isNull()) {
Assertions.UNREACHABLE("typeToTypeID() encountered a null type!");
return null;
}
Assertions.productionAssertion(type.isClass(), "typeToTypeID() encountered the type " + type + " that is neither primitive, array, nor class!");
ClassType ctype= (ClassType) type;
return (ctype.isLocal() || ctype.isAnonymous()) ? anonLocalTypeToTypeID(ctype) : composeWALATypeDescriptor(ctype);
}
public String anonLocalTypeToTypeID(ClassType ctype) {
CodeInstance procInstance= (CodeInstance) fLocalTypeMap.get(ctype);
String outerTypeID= typeToTypeID(ctype.outer());
String shortName= (ctype.isAnonymous()) ? PolyglotJava2CAstTranslator.anonTypeName(ctype) : ctype.fullName().name().toString();
return outerTypeID + '/' + getMethodRef(procInstance).getSelector() + '/' + shortName;
}
public String composeWALATypeDescriptor(ClassType ctype) {
return "L" + composeWALATypeName(ctype);
}
public String composeWALATypeName(ClassType ctype) {
if (ctype.package_() != null) {
String packageName = ctype.package_().fullName().toString();
Assertions.productionAssertion(ctype.fullName().toString().startsWith(packageName));
return packageName.replace('.','/') + "/" + ctype.fullName().toString().substring( packageName.length()+1 ).replace('.','$');
} else {
return ctype.fullName().toString().replace('.', '$');
}
}
}

View File

@ -1,17 +0,0 @@
package com.ibm.wala.cast.java.translator.polyglot;
import com.ibm.wala.cast.java.client.JavaSourceAnalysisEngine;
import com.ibm.wala.classLoader.ClassLoaderFactory;
import com.ibm.wala.ipa.callgraph.impl.SetOfClasses;
public class PolyglotJavaSourceAnalysisEngine extends JavaSourceAnalysisEngine {
public IRTranslatorExtension getTranslatorExtension() {
return new JavaIRTranslatorExtension();
}
protected ClassLoaderFactory getClassLoaderFactory(SetOfClasses exclusions) {
return new PolyglotClassLoaderFactory(exclusions, getTranslatorExtension());
}
}

View File

@ -1,42 +0,0 @@
/******************************************************************************
* Copyright (c) 2002 - 2006 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*****************************************************************************/
/*
* Created on Oct 7, 2005
*/
package com.ibm.wala.cast.java.translator.polyglot;
import java.io.IOException;
import com.ibm.wala.cast.java.ipa.callgraph.JavaSourceAnalysisScope;
import com.ibm.wala.cast.java.loader.JavaSourceLoaderImpl;
import com.ibm.wala.cast.java.translator.SourceModuleTranslator;
import com.ibm.wala.classLoader.IClassLoader;
import com.ibm.wala.ipa.callgraph.impl.SetOfClasses;
import com.ibm.wala.ipa.cha.IClassHierarchy;
import com.ibm.wala.types.ClassLoaderReference;
public class PolyglotSourceLoaderImpl extends JavaSourceLoaderImpl {
protected final IRTranslatorExtension fExtInfo;
public PolyglotSourceLoaderImpl(ClassLoaderReference loaderRef, IClassLoader parent, SetOfClasses exclusions,
IClassHierarchy cha, IRTranslatorExtension extInfo) throws IOException {
super(loaderRef, parent, exclusions, cha);
this.fExtInfo = extInfo;
}
public IRTranslatorExtension getTranslatorExtension() {
return fExtInfo;
}
protected SourceModuleTranslator getTranslator() {
return new PolyglotSourceModuleTranslator(cha.getScope(), fExtInfo, this, JavaSourceAnalysisScope.SOURCE);
}
}

View File

@ -1,155 +0,0 @@
/******************************************************************************
* Copyright (c) 2002 - 2006 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*****************************************************************************/
package com.ibm.wala.cast.java.translator.polyglot;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import polyglot.frontend.Compiler;
import polyglot.frontend.ExtensionInfo;
import polyglot.frontend.Globals;
import polyglot.frontend.Source;
import polyglot.main.Options;
import polyglot.main.UsageError;
import polyglot.util.ErrorInfo;
import polyglot.util.Position;
import com.ibm.wala.cast.java.translator.SourceModuleTranslator;
import com.ibm.wala.classLoader.DirectoryTreeModule;
import com.ibm.wala.classLoader.FileModule;
import com.ibm.wala.classLoader.JarFileModule;
import com.ibm.wala.classLoader.Module;
import com.ibm.wala.classLoader.ModuleEntry;
import com.ibm.wala.classLoader.SourceFileModule;
import com.ibm.wala.ipa.callgraph.AnalysisScope;
import com.ibm.wala.types.ClassLoaderReference;
import com.ibm.wala.util.debug.Assertions;
/**
* A SourceModuleTranslator whose implementation of loadAllSources() uses a suitably
* configured Polyglot-based compiler to generate WALA IR for the sources in the
* compile-time classpath.
* @author rfuhrer
*/
public class PolyglotSourceModuleTranslator implements SourceModuleTranslator {
private final ExtensionInfo fExtInfo;
/**
* A client-supplied ClassLoaderReference to identify the innermost class loader
* to use when populating the classpath with loader Modules.
*/
private final ClassLoaderReference fSearchPathStart;
protected String fClassPath;
protected String fSourcePath;
public PolyglotSourceModuleTranslator(AnalysisScope scope, IRTranslatorExtension extInfo,
PolyglotSourceLoaderImpl sourceLoader, ClassLoaderReference searchPathStart) {
fSearchPathStart = searchPathStart;
fExtInfo= (ExtensionInfo) extInfo;
computeClassPath(scope);
computeSourcePath(scope);
extInfo.setSourceLoader(sourceLoader);
}
protected void computeClassPath(AnalysisScope scope) {
StringBuilder sb= new StringBuilder();
ClassLoaderReference cl= fSearchPathStart;
while (cl != null) {
addModulesForLoader(scope, cl, sb);
cl= cl.getParent();
}
fClassPath= sb.toString();
}
protected void addModulesForLoader(AnalysisScope scope, ClassLoaderReference cl, StringBuilder sb) {
for(Module m: scope.getModules(cl)) {
if (sb.length() > 0)
sb.append(File.pathSeparator);
if (m instanceof JarFileModule) {
JarFileModule jarFileModule= (JarFileModule) m;
sb.append(jarFileModule.getAbsolutePath());
} else if (m instanceof DirectoryTreeModule) {
DirectoryTreeModule directoryTreeModule= (DirectoryTreeModule) m;
sb.append(directoryTreeModule.getPath());
} else if (m instanceof FileModule) {
// do nothing
} else
Assertions.UNREACHABLE("Module entry is neither jar file nor directory");
}
}
protected void computeSourcePath(AnalysisScope scope) {
// Ordinarily, the source files to process are specified using absolute paths (see
// loadAllSources()), so the source path won't be needed. However, derived classes
// may choose to place entries on the source path to resolve source entities that
// were not explicitly specified. E.g., the X10 1.7 runtime jar contains source
// code, since class files don't contain all of the necessary type information.
// Given all of the above, the following value will either be correct or do no
// harm (even if the source path isn't used).
fSourcePath = ".";
}
public void loadAllSources(Set<ModuleEntry> modules) {
Options opts= fExtInfo.getOptions();
opts.assertions = true;
try {
opts.parseCommandLine(new String[] { "-noserial", "-cp", fClassPath, "-sourcepath", fSourcePath }, new HashSet<String>());
} catch (UsageError e) {
// Assertions.UNREACHABLE("Error parsing classpath spec???");
}
Compiler compiler= new Compiler(fExtInfo);
List<Source> streams= new ArrayList<Source>();
Globals.initialize(compiler);//PORT1.7 Must initialize before actually calling compiler
// N.B.: 'modules' is a flat set of source file ModuleEntry's.
for(Iterator<ModuleEntry> it= modules.iterator(); it.hasNext(); ) {
SourceFileModule entry= (SourceFileModule) it.next();
Assertions.productionAssertion(entry.isSourceFile());
if (skipSourceFile(entry)) {
continue;
}
try {
ModuleSource srcStream= new ModuleSource(entry);
streams.add(srcStream);
} catch (IOException e) {
compiler.errorQueue().enqueue(new ErrorInfo(ErrorInfo.IO_ERROR, "Unable to open source file '" + entry.getName() + "'", Position.COMPILER_GENERATED));
}
}
compiler.compile(streams);
// At this point, WALA now "knows" about all the source-originated stuff
}
/**
* @return true if the given source file module should not be processed,
* e.g. because it is generated on behalf of some upstream source.
*/
protected boolean skipSourceFile(SourceFileModule entry) {
return false;
}
}

View File

@ -1,105 +0,0 @@
/******************************************************************************
* Copyright (c) 2002 - 2006 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*****************************************************************************/
/*
* Created on Sep 28, 2005
*/
package com.ibm.wala.cast.java.translator.polyglot;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import polyglot.types.ArrayType;
import polyglot.types.ClassType;
import polyglot.types.ObjectType;
import polyglot.types.PrimitiveType;
import polyglot.types.Type;
import polyglot.types.TypeSystem;
import com.ibm.wala.cast.java.types.JavaPrimitiveTypeMap;
import com.ibm.wala.cast.tree.CAstType;
import com.ibm.wala.cast.tree.impl.CAstTypeDictionaryImpl;
import com.ibm.wala.util.debug.Assertions;
public class PolyglotTypeDictionary extends CAstTypeDictionaryImpl {
private final class PolyglotJavaArrayType implements CAstType.Array {
private final Type fEltPolyglotType;
private final CAstType fEltCAstType;
private PolyglotJavaArrayType(ArrayType arrayType) {
super();
fEltPolyglotType = arrayType.base();
fEltCAstType = getCAstTypeFor(fEltPolyglotType);
}
public int getNumDimensions() {
return 1; // always 1 for Java
}
public CAstType getElementType() {
return fEltCAstType;
}
public String getName() {
return "[" + fEltCAstType.getName();
}
public Collection<CAstType> getSupertypes() {
if (fEltPolyglotType.isPrimitive())
return Collections.singleton(getCAstTypeFor(fTypeSystem.Object()));
Assertions.productionAssertion(fEltPolyglotType.isReference(), "Non-primitive, non-reference array element type!");
ObjectType baseRefType = (ObjectType) fEltPolyglotType;
Collection<CAstType> supers = new ArrayList<CAstType>();
for (Iterator<Type> superIter = baseRefType.interfaces().iterator(); superIter.hasNext(); ) {
supers.add(getCAstTypeFor(superIter.next()));
}
if (baseRefType instanceof ClassType) {
ClassType baseClassType = (ClassType) baseRefType;
if (baseClassType.superClass() != null)
supers.add(getCAstTypeFor(baseRefType.superClass()));
}
return supers;
}
}
protected final TypeSystem fTypeSystem;
protected final PolyglotJava2CAstTranslator fTranslator;
public PolyglotTypeDictionary(TypeSystem typeSystem, PolyglotJava2CAstTranslator translator) {
fTypeSystem = typeSystem;
fTranslator = translator;
}
public CAstType getCAstTypeFor(Object astType) {
CAstType type = super.getCAstTypeFor(astType);
// Handle the case where we haven't seen an AST decl for some type before
// processing a reference. This can certainly happen with classes in byte-
// code libraries, for which we never see an AST decl.
// In this case, just create a new type and return that.
if (type == null) {
final Type polyglotType = (Type) astType;
if (polyglotType.isClass())
type = fTranslator.new PolyglotJavaType((ClassType) astType, this, fTypeSystem);
else if (polyglotType.isPrimitive()) {
type = JavaPrimitiveTypeMap.lookupType(((PrimitiveType) polyglotType).name().toString());
} else if (polyglotType.isArray()) {
type = new PolyglotJavaArrayType((ArrayType) polyglotType);
} else
Assertions.UNREACHABLE("getCAstTypeFor() passed type that is not primitive, array, or class?");
super.map(astType, type);
}
return type;
}
}

View File

@ -1,192 +0,0 @@
/******************************************************************************
* Copyright (c) 2002 - 2006 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*****************************************************************************/
/*
* Created on Sep 1, 2005
*/
package com.ibm.wala.cast.java.translator.polyglot;
import polyglot.ast.ArrayAccess;
import polyglot.ast.ArrayAccessAssign;
import polyglot.ast.ArrayInit;
import polyglot.ast.ArrayTypeNode;
import polyglot.ast.Assert;
import polyglot.ast.Binary;
import polyglot.ast.Block;
import polyglot.ast.BooleanLit;
import polyglot.ast.Branch;
import polyglot.ast.Call;
import polyglot.ast.CanonicalTypeNode;
import polyglot.ast.Case;
import polyglot.ast.Cast;
import polyglot.ast.Catch;
import polyglot.ast.CharLit;
import polyglot.ast.ClassBody;
import polyglot.ast.ClassDecl;
import polyglot.ast.ClassLit;
import polyglot.ast.Conditional;
import polyglot.ast.ConstructorCall;
import polyglot.ast.ConstructorDecl;
import polyglot.ast.Do;
import polyglot.ast.Empty;
import polyglot.ast.Eval;
import polyglot.ast.Field;
import polyglot.ast.FieldAssign;
import polyglot.ast.FieldDecl;
import polyglot.ast.FloatLit;
import polyglot.ast.For;
import polyglot.ast.Formal;
import polyglot.ast.If;
import polyglot.ast.Import;
import polyglot.ast.Initializer;
import polyglot.ast.Instanceof;
import polyglot.ast.IntLit;
import polyglot.ast.Labeled;
import polyglot.ast.Local;
import polyglot.ast.LocalAssign;
import polyglot.ast.LocalClassDecl;
import polyglot.ast.LocalDecl;
import polyglot.ast.MethodDecl;
import polyglot.ast.New;
import polyglot.ast.NewArray;
import polyglot.ast.NullLit;
import polyglot.ast.PackageNode;
import polyglot.ast.Return;
import polyglot.ast.Special;
import polyglot.ast.StringLit;
import polyglot.ast.Switch;
import polyglot.ast.SwitchBlock;
import polyglot.ast.Synchronized;
import polyglot.ast.Throw;
import polyglot.ast.Try;
import polyglot.ast.Unary;
import polyglot.ast.While;
import com.ibm.wala.cast.java.translator.polyglot.PolyglotJava2CAstTranslator.MethodContext;
import com.ibm.wala.cast.java.translator.polyglot.PolyglotJava2CAstTranslator.WalkContext;
import com.ibm.wala.cast.tree.CAstNode;
/**
* An alternative visitor API for Polyglot, whose API is somewhat brain-damaged...
*
* @author rfuhrer
*/
public interface TranslatingVisitor {
CAstNode visit(MethodDecl m, MethodContext context);
CAstNode visit(ConstructorDecl cd, MethodContext cc);
CAstNode visit(FieldDecl f, MethodContext mc); // yes, a MethodContext; we process FieldDecl's only to add their initializers to
// each constructor
CAstNode visit(Import i, WalkContext wc);
CAstNode visit(PackageNode p, WalkContext wc);
CAstNode visit(CanonicalTypeNode ctn, WalkContext wc);
CAstNode visit(ArrayTypeNode ctn, WalkContext wc);
CAstNode visit(ArrayInit ai, WalkContext wc);
CAstNode visit(ArrayAccessAssign aaa, WalkContext wc);
CAstNode visit(FieldAssign fa, WalkContext wc);
CAstNode visit(LocalAssign la, WalkContext wc);
CAstNode visit(Binary b, WalkContext wc);
CAstNode visit(Call c, WalkContext wc);
CAstNode visit(ConstructorCall cc, WalkContext wc);
CAstNode visit(Cast c, WalkContext wc);
CAstNode visit(Conditional c, WalkContext wc);
CAstNode visit(Instanceof io, WalkContext wc);
CAstNode visit(BooleanLit bl, WalkContext wc);
CAstNode visit(ClassLit cl, WalkContext wc);
CAstNode visit(FloatLit fl, WalkContext wc);
CAstNode visit(NullLit nl, WalkContext wc);
CAstNode visit(CharLit cl, WalkContext wc);
CAstNode visit(IntLit il, WalkContext wc);
CAstNode visit(StringLit sl, WalkContext wc);
CAstNode visit(New n, WalkContext wc);
CAstNode visit(NewArray na, WalkContext wc);
CAstNode visit(Special s, WalkContext wc);
CAstNode visit(Unary u, WalkContext wc);
CAstNode visit(ArrayAccess aa, WalkContext wc);
CAstNode visit(Field f, WalkContext wc);
CAstNode visit(Local l, WalkContext wc);
CAstNode visit(ClassBody cb, WalkContext wc); // should never see this when producing CAstNodes
CAstNode visit(ClassDecl cd, WalkContext wc); // should never see this when producing CAstNodes
CAstNode visit(Initializer i, WalkContext wc); // should never see this when producing CAstNodes
CAstNode visit(Assert a, WalkContext wc);
CAstNode visit(Branch b, WalkContext wc);
CAstNode visit(Block b, WalkContext wc);
CAstNode visit(SwitchBlock sb, WalkContext wc);
CAstNode visit(Catch c, WalkContext wc);
CAstNode visit(If i, WalkContext wc);
CAstNode visit(Labeled l, WalkContext wc);
CAstNode visit(LocalClassDecl lcd, WalkContext wc);
CAstNode visit(Do d, WalkContext wc);
CAstNode visit(For f, WalkContext wc);
CAstNode visit(While w, WalkContext wc);
CAstNode visit(Switch s, WalkContext wc);
CAstNode visit(Synchronized s, WalkContext wc);
CAstNode visit(Try t, WalkContext wc);
CAstNode visit(Empty e, WalkContext wc);
CAstNode visit(Eval e, WalkContext wc);
CAstNode visit(LocalDecl ld, WalkContext wc);
CAstNode visit(Return r, WalkContext wc);
CAstNode visit(Case c, WalkContext wc);
CAstNode visit(Throw t, WalkContext wc);
CAstNode visit(Formal f, WalkContext wc); // may not see these (might be handled by parent)
}

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.ibm.wala.cast.java.test.data</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/java.test.data JLex download.launch</value>
</dictionary>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>

View File

@ -1,7 +1,395 @@
#Thu Dec 11 09:45:37 EST 2008
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.problem.APILeak=error
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=ignore
org.eclipse.jdt.core.compiler.problem.deadCode=ignore
org.eclipse.jdt.core.compiler.problem.deprecation=error
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=error
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=ignore
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
org.eclipse.jdt.core.compiler.problem.nullReference=ignore
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=error
org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=ignore
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.terminalDeprecation=error
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=error
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=error
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedImport=error
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=error
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=ignore
org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
org.eclipse.jdt.core.formatter.blank_lines_before_field=0
org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
org.eclipse.jdt.core.formatter.blank_lines_before_method=1
org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
org.eclipse.jdt.core.formatter.blank_lines_before_package=0
org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
org.eclipse.jdt.core.formatter.comment.format_block_comments=true
org.eclipse.jdt.core.formatter.comment.format_header=false
org.eclipse.jdt.core.formatter.comment.format_html=true
org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
org.eclipse.jdt.core.formatter.comment.format_line_comments=true
org.eclipse.jdt.core.formatter.comment.format_source_code=true
org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
org.eclipse.jdt.core.formatter.comment.line_length=80
org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
org.eclipse.jdt.core.formatter.compact_else_if=true
org.eclipse.jdt.core.formatter.continuation_indentation=2
org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_empty_lines=false
org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
org.eclipse.jdt.core.formatter.indentation.size=2
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.join_lines_in_comments=true
org.eclipse.jdt.core.formatter.join_wrapped_lines=true
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
org.eclipse.jdt.core.formatter.lineSplit=132
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
org.eclipse.jdt.core.formatter.tabulation.char=space
org.eclipse.jdt.core.formatter.tabulation.size=2
org.eclipse.jdt.core.formatter.use_on_off_tags=false
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true

View File

@ -0,0 +1,32 @@
compilers.f.unresolved-features=1
compilers.f.unresolved-plugins=1
compilers.incompatible-environment=1
compilers.p.build=1
compilers.p.build.bin.includes=1
compilers.p.build.encodings=1
compilers.p.build.java.compiler=0
compilers.p.build.java.compliance=1
compilers.p.build.missing.output=1
compilers.p.build.output.library=1
compilers.p.build.source.library=1
compilers.p.build.src.includes=1
compilers.p.deprecated=1
compilers.p.discouraged-class=1
compilers.p.internal=1
compilers.p.missing-packages=2
compilers.p.missing-version-export-package=1
compilers.p.missing-version-import-package=1
compilers.p.missing-version-require-bundle=1
compilers.p.no-required-att=0
compilers.p.not-externalized-att=1
compilers.p.unknown-attribute=1
compilers.p.unknown-class=1
compilers.p.unknown-element=1
compilers.p.unknown-identifier=1
compilers.p.unknown-resource=1
compilers.p.unresolved-ex-points=0
compilers.p.unresolved-import=0
compilers.s.create-docs=false
compilers.s.doc-folder=doc
compilers.s.open-tags=1
eclipse.preferences.version=1

View File

@ -0,0 +1,10 @@
DELEGATES_PREFERENCE=delegateValidatorList
USER_BUILD_PREFERENCE=enabledBuildValidatorList
USER_MANUAL_PREFERENCE=enabledManualValidatorList
USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.700.v201610061600
eclipse.preferences.version=1
override=true
suspend=false
vals/org.eclipse.wst.html.core.HTMLValidator/groups=0107include06111contentType136org.eclipse.wst.html.core.htmlsourceT07fileext04htmlF07fileext05xhtmlF07fileext03htmF07fileext04htplF07fileext03wmlF0107exclude0104file139target/site/dependency-convergence.htmlT03
vals/org.eclipse.wst.xml.core.xml/groups=0107include05111contentType128org.eclipse.core.runtime.xmlT111contentType134org.eclipse.wst.xml.core.xmlsourceT111contentType134org.eclipse.wst.xml.core.xslsourceT111contentType134org.eclipse.jst.jsp.core.tldsourceT07fileext03xmlF0107exclude08113projectNature134org.eclipse.jst.j2ee.ejb.EJBNature113projectNature130org.eclipse.jst.j2ee.EARNature04file08.projectT0104file110.classpathT0104file110.settings/T0204file122target/p2artifacts.xmlT0304file120target/p2content.xmlT0304file128target/antrun/build-main.xmlT03
vf.version=3

View File

@ -1,6 +1,6 @@
java\/awt\/.*
javax\/swing\/.*
sun\/awt\/.*
sun\/swing\/.*
com\/sun\/.*
sun\/.*
java\/awt\/.*
javax\/swing\/.*
sun\/awt\/.*
sun\/swing\/.*
com\/sun\/.*
sun\/.*

Binary file not shown.

View File

@ -1,10 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Data Plug-in
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: com.ibm.wala.cast.java.test.data
Bundle-Version: 1.0.0
Bundle-Activator: com.ibm.wala.cast.java.test.data.Activator
Bundle-Vendor: IBM
Require-Bundle: org.eclipse.core.runtime
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.5.1.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-RequiredExecutionEnvironment: JavaSE-1.8

View File

@ -0,0 +1,3 @@
#Properties file for com.ibm.wala.cast.java.test.data
Bundle-Vendor = IBM
Bundle-Name = Data Plug-in

View File

@ -0,0 +1,35 @@
plugins {
id 'eclipse'
}
sourceSets.test.java.srcDirs = ['src']
////////////////////////////////////////////////////////////////////////
//
// download JLex
//
task downloadJLex(type: VerifiedDownload) {
src 'http://www.cs.princeton.edu/~appel/modern/java/JLex/current/Main.java'
checksum 'fe0cff5db3e2f0f5d67a153cf6c783af'
dest 'src/JLex/Main.java'
}
task cleanDownloadJLex(type: Delete) {
delete downloadJLex.dest.parent
}
compileTestJava.dependsOn downloadJLex
clean.dependsOn cleanDownloadJLex
////////////////////////////////////////////////////////////////////////
//
// create Eclipse metadata for use by Maven when running
// com.ibm.wala.cast.java.test.JDTJavaIRTests and
// com.ibm.wala.cast.java.test.JDTJava15IRTests tests
//
task prepareMavenBuild(dependsOn: [eclipseClasspath, eclipseProject]) {
}

View File

@ -1,4 +1,7 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
.,\
OSGI-INF/l10n/bundle.properties,\
OSGI-INF/
javacProjectSettings = true

View File

@ -1,70 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="com.ibm.wala.cast.java.test.data" default="getSources" basedir=".">
<property name="basews" value="${ws}"/>
<property name="baseos" value="${os}"/>
<property name="basearch" value="${arch}"/>
<property name="basenl" value="${nl}"/>
<!-- Compiler settings. -->
<property name="javacFailOnError" value="true"/>
<property name="javacDebugInfo" value="on"/>
<property name="javacVerbose" value="false"/>
<property name="logExtension" value=".log"/>
<property name="compilerArg" value=""/>
<property name="javacSource" value="1.5"/>
<property name="javacTarget" value="1.5"/>
<!-- This property has been updated to correspond to the paths used by the latest Java update
on Mac OS X 10.6 (Java version 1.6.0_22). If you are not using this version of Mac OS X or Java,
try changing the value of the property to "${java.home}/../../../Classes" -->
<condition property="dir_bootclasspath" value="${java.home}/../Classes">
<os family="mac"/>
</condition>
<property name="dir_bootclasspath" value="${java.home}/lib"/>
<path id="path_bootclasspath">
<fileset dir="${dir_bootclasspath}">
<include name="*.jar"/>
</fileset>
</path>
<property name="bootclasspath" refid="path_bootclasspath"/>
<property name="bundleJavacSource" value="${javacSource}"/>
<property name="bundleJavacTarget" value="${javacTarget}"/>
<property name="bundleBootClasspath" value="${bootclasspath}"/>
<target name="JLexPresent" depends="init">
<available file="${plugin.destination}/src/JLex/Main.java" property="jlex.present"/>
</target>
<target name="fetchJLex" depends="JLexPresent" unless="jlex.present">
<delete dir="${temp.folder}"/>
<mkdir dir="${temp.folder}/JLex"/>
<get src="http://www.cs.princeton.edu/~appel/modern/java/JLex/current/Main.java" dest="${temp.folder}/JLex/Main.java"/>
<delete dir="${plugin.destination}/src/JLex"/>
<mkdir dir="${plugin.destination}/src/JLex"/>
<copy file="${temp.folder}/JLex/Main.java" tofile="${plugin.destination}/src/JLex/Main.java"/>
<delete dir="${temp.folder}"/>
</target>
<target name="getSources" depends="fetchJLex" />
<target name="init" depends="properties">
<condition property="pluginTemp" value="${buildTempFolder}/plugins">
<isset property="buildTempFolder"/>
</condition>
<property name="pluginTemp" value="${basedir}"/>
<condition property="build.result.folder" value="${pluginTemp}/com.ibm.wala.core.testdata">
<isset property="buildTempFolder"/>
</condition>
<property name="build.result.folder" value="${basedir}"/>
<property name="temp.folder" value="${basedir}/temp.folder"/>
<property name="plugin.destination" value="${basedir}"/>
</target>
<target name="properties" if="eclipse.running">
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
</target>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE project>
<project name="com.ibm.wala.cast.java.test.data" default="jar" basedir=".">
<property name="basews" value="${ws}"/>
<property name="baseos" value="${os}"/>
<property name="basearch" value="${arch}"/>
<property name="basenl" value="${nl}"/>
<!-- Compiler settings. -->
<property name="javacFailOnError" value="true"/>
<property name="javacDebugInfo" value="on"/>
<property name="javacVerbose" value="false"/>
<property name="logExtension" value=".log"/>
<property name="compilerArg" value=""/>
<property name="javacSource" value="1.8"/>
<property name="javacTarget" value="1.8"/>
<!-- This property has been updated to correspond to the paths used by the latest Java update
on Mac OS X 10.6 (Java version 1.6.0_22). If you are not using this version of Mac OS X or Java,
try changing the value of the property to "${java.home}/../../../Classes" -->
<condition property="dir_bootclasspath" value="${java.home}/../Classes">
<and>
<os family="mac"/>
<equals arg1="${ant.java.version}" arg2="1.6" />
</and>
</condition>
<property name="dir_bootclasspath" value="${java.home}/lib"/>
<path id="path_bootclasspath">
<fileset dir="${dir_bootclasspath}">
<include name="*.jar"/>
</fileset>
</path>
<property name="bootclasspath" refid="path_bootclasspath"/>
<property name="bundleJavacSource" value="${javacSource}"/>
<property name="bundleJavacTarget" value="${javacTarget}"/>
<property name="bundleBootClasspath" value="${bootclasspath}"/>
<target name="JLexPresent" depends="init">
<available file="${plugin.destination}/src/JLex/Main.java" property="jlex.present"/>
</target>
<target name="fetchJLex" depends="JLexPresent" unless="jlex.present">
<delete dir="${temp.folder}"/>
<mkdir dir="${temp.folder}/JLex"/>
<get src="http://www.cs.princeton.edu/~appel/modern/java/JLex/current/Main.java" dest="${temp.folder}/JLex/Main.java"/>
<delete dir="${plugin.destination}/src/JLex"/>
<mkdir dir="${plugin.destination}/src/JLex"/>
<copy file="${temp.folder}/JLex/Main.java" tofile="${plugin.destination}/src/JLex/Main.java"/>
<delete dir="${temp.folder}"/>
</target>
<target name="getSources" depends="fetchJLex" />
<target name="testdatadir" depends="init,testdata.exists" unless="testdatadir.present">
<mkdir dir="${basedir}/../com.ibm.wala.ide.jdt.test/testdata"/>
</target>
<target name="testdata.exists" depends="init">
<available file="${basedir}/../com.ibm.wala.ide.jdt.test/testdata"
type="dir"
property="testdatadir.present"/>
</target>
<target name="bin.exists" depends="">
<available file="${basedir}/bin"
type="dir"
property="bin.present"/>
</target>
<target name="bindir" depends="init,bin.exists" unless="bin.present">
<mkdir dir="${basedir}/bin"/>
</target>
<target name="compile" depends="getSources,bindir">
<javac srcdir="${basedir}/src"
destdir="${basedir}/bin"
excludes="**/Activator.java"/>
</target>
<target name="jar" depends="compile,testdatadir">
<jar destfile="${basedir}/../com.ibm.wala.ide.jdt.test/testdata/test_project.zip" manifest="${basedir}/META-INF/MANIFEST.MF" basedir="${basedir}"/>
</target>
<target name="init" depends="properties">
<condition property="pluginTemp" value="${buildTempFolder}/plugins">
<isset property="buildTempFolder"/>
</condition>
<property name="pluginTemp" value="${basedir}"/>
<condition property="build.result.folder" value="${pluginTemp}/com.ibm.wala.core.testdata">
<isset property="buildTempFolder"/>
</condition>
<property name="build.result.folder" value="${basedir}"/>
<property name="temp.folder" value="${basedir}/temp.folder"/>
<property name="plugin.destination" value="${basedir}"/>
</target>
<target name="properties" if="eclipse.running">
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
</target>
</project>

Some files were not shown because too many files have changed in this diff Show More