Commit Graph

2385 Commits

Author SHA1 Message Date
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 b2503628a4 1) a bit more source mappimg information
2) fixes to how Contexts are combined
2018-10-13 08:42:08 -04: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
Sungho Lee 2640b97b5d Fix comparison method for ConstantKey 2018-08-28 09:47:09 +09: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
Julian Dolby c5cdb9e32a clean up MethodHandle support 2018-08-03 15:52:24 -04:00
Julian Dolby 7e6cfe84f6 more support for method handles, particularly for ones created with
reflection.
2018-08-02 19:35:32 -04:00
Julian Dolby 0ad11fefc3 work on Wala with Yannis' group 2018-07-22 16:19:32 -04: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 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
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 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
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
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
Julian Dolby 8005b665b9 flexibility in how to model constants 2018-04-30 19:09:59 -04:00
Julian Dolby 27a8fff714 ast-based constant folding 2018-04-28 12:05:49 +02: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 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 98324cd148 Simplify how we refer to existing tasks 2018-04-18 11:29:26 -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 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 1432e18c37 Clean up some simple syntactic redundancy in dependency declarations 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 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 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 530d74929f Many improvements to Gradle build support, including within Eclipse 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
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 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 365d17bf32 Simplify how we refer to existing tasks 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 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 db348b4ddd Clean up some simple syntactic redundancy in dependency declarations 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 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 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 401fbaf89a Many improvements to Gradle build support, including within Eclipse 2018-04-17 15:02:35 -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