Commit Graph

2176 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
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 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 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 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 99c2493e37 Revert "Build WALA using Gradle instead of Maven" (#298) 2018-04-18 12:15:56 -04: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 6546d5d6a4 Resolve the last two Eclipse warnings about using raw types
Fixes bug #244.
2018-04-13 12:53:33 -05: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
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 c8cdaf8616 further refactoring to enable more reuse
eliminate all non-jva 8 compilation
2018-02-05 15:18:37 -08: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
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
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
Ben Liblit 0286c2b048 Use Iterator2Iterable helper to convert more loops to for-each 2017-12-04 14:04:39 -08:00