Giter VIP home page Giter VIP logo

wala's People

Contributors

aakgna avatar aavarghese avatar alisamaas avatar codetrails avatar cos avatar dependabot-preview[bot] avatar dependabot[bot] avatar dperelman avatar enochii avatar genli9 avatar gitter-badger avatar jerryxu158 avatar jgf avatar juliandolby avatar karimhamdanali avatar khatchad avatar ksrinivs64 avatar liblit avatar lujiefsi avatar madhunimmo avatar mhecker avatar michaelheilmann avatar milnet2 avatar mohrm avatar msridhar avatar reddr avatar sblackshear avatar sifislag avatar sjfink avatar stephangocht avatar

Watchers

 avatar  avatar  avatar  avatar

wala's Issues

Compute “-Wl,-rpath …” paths rather than repeating them

The absolute path to each shared library that is a build target is computed by Gradle itself. Each prebuilt (system-installed) shared library gives this information when setting sharedLibraryLinkFile:

sharedLibraryLinkFile = file("$currentJavaHome/jre/lib/amd64/server/libjvm.so")

The dirnames of these paths also appear as part of -Wl,-rpath flags wherever we link these shared libraries:

// TODO: compute path on following line from 'cast' library properties somehow
linker.args '-Wl,-rpath', "${project(':com.ibm.wala.cast').buildDir}/libs/cast/shared"
// TODO: compute path on following line from 'jdk' library properties somehow
linker.args '-Wl,-rpath', "${currentJvm.javaHome}/jre/lib/amd64/server"

// TODO: compute path on following line from 'cast' library properties somehow
linker.args '-Wl,-rpath', "${project(':com.ibm.wala.cast').buildDir}/libs/cast/shared"
// TODO: compute path on following line from 'jdk' library properties somehow
linker.args '-Wl,-rpath', "${currentJvm.javaHome}/jre/lib/amd64/server"

// TODO: compute path on following line from 'jdk' library properties somehow
linker.args '-Wl,-rpath', "$currentJavaHome/jre/lib/amd64/server"

It would be cleaner to derive -Wl,-rpath paths from sharedLibraryLinkFile paths instead of repeating them. I have asked how to do this in the Gradle discussion forum, but have not yet received any replies.

Port Gradle build configuration to macOS

The build.gradle scripts are mostly platform-independent, but not entirely. To build and test WALA on MacOS, we at least need to fill in the path to the Java dynamic library:

case 'osx/x86-64':
// TODO: determine JVM library name and location on MacOS
// sharedLibraryLinkFile = '???'

Other fixes might be needed too; we won’t know until we try it and see what breaks.

That being said, is WALA itself even supported on MacOS? If not, then this whole issue is moot and may as well be relabeled wontfix.

Port Gradle build configuration to Windows

The build.gradle scripts are mostly platform-independent, but not entirely. To build and test WALA on Windows, we at least need to fill in the path to the Java dynamic library:

case 'windows/x86-64':
// TODO: determine JVM library name and location on Windows
// sharedLibraryLinkFile = '???'

Other fixes might be needed too; we won’t know until we try it and see what breaks.

That being said, is WALA itself even supported on Windows? If not, then this whole issue is moot and may as well be relabeled wontfix.

Replicate Maven’s Eclipse plug-in packaging

The Maven build system does something involving Eclipse plug-in packaging. I honestly do not understand any of this in the slightest. It seems to involve .p2 directories, */build.properties files, */META-INF/MANIFEST.MF files, */OSGI-INF/l10n/bundle.properties files, and I can only guess what else. I am completely lost here. Whatever sort of over-engineered Eclipse packaging Maven is doing, Gradle will need to do the same before the latter can replace the former. Halp! 😱

Any WALA maintainer who knows how this all fits together is strongly urged to lend a hand. I am happy to work with you: perhaps we can take this issue down by combining what I have learned about Gradle with what you know about Eclipse.

Fix Javadoc warnings

Using ./gradlew javadoc to build Javadoc documentation leads to more than two dozen warnings:

com.ibm.wala.util/src/com/ibm/wala/util/collections/Util.java:163: warning - Tag @link: reference not found: java.lang.reflect reflection
com.ibm.wala.util/src/com/ibm/wala/util/collections/Util.java:181: warning - Tag @link: reference not found: java.lang.reflect reflection
com.ibm.wala.core/src/com/ibm/wala/util/ssa/TypeSafeInstructionFactory.java:112: warning - Tag @see: can't find InvokeInstruction(int, int, int[], int, CallSiteReference, BootstrapMethod) in com.ibm.wala.classLoader.JavaLanguage.JavaInstructionFactory
com.ibm.wala.core/src/com/ibm/wala/util/ssa/TypeSafeInstructionFactory.java:224: warning - Tag @see: can't find InvokeInstruction(int, int[], int, CallSiteReference, BootstrapMethod) in com.ibm.wala.classLoader.JavaLanguage.JavaInstructionFactory
com.ibm.wala.core/src/com/ibm/wala/ipa/callgraph/propagation/SSAPropagationCallGraphBuilder.java:193: warning - Tag @see: can't find addConstraintsFromNode(com.ibm.wala.ipa.callgraph.CGNode) in com.ibm.wala.ipa.callgraph.propagation.PropagationCallGraphBuilder
com.ibm.wala.core/src/com/ibm/wala/ipa/summaries/VolatileMethodSummary.java:86: warning - Tag @link: can't find getStatementsAfter(int) in com.ibm.wala.ipa.summaries.VolatileMethodSummary
com.ibm.wala.core/src/com/ibm/wala/ipa/summaries/VolatileMethodSummary.java:86: warning - Tag @see: reference not found: com.ibm.wala.dalvik.ssa.AndroidModelInstructionFectory
com.ibm.wala.core/src/com/ibm/wala/ipa/summaries/VolatileMethodSummary.java:86: warning - Tag @see: reference not found: com.ibm.wala.dalvik.ipa.callgraph.impl.DexFakeRootMethod
com.ibm.wala.core/src/com/ibm/wala/ipa/summaries/VolatileMethodSummary.java:445: warning - Tag @link: can't find isUsed(ProgramCounter) in com.ibm.wala.ipa.summaries.VolatileMethodSummary
com.ibm.wala.core/src/com/ibm/wala/ipa/summaries/VolatileMethodSummary.java:237: warning - Tag @link: can't find isFree(boolean) in com.ibm.wala.ipa.summaries.VolatileMethodSummary
com.ibm.wala.core/src/com/ibm/wala/ipa/summaries/VolatileMethodSummary.java:237: warning - Tag @link: can't find isFree(boolean) in com.ibm.wala.ipa.summaries.VolatileMethodSummary
com.ibm.wala.core/src/com/ibm/wala/ipa/summaries/VolatileMethodSummary.java:259: warning - Tag @link: can't find addStatement(SSAInstructionWithPC) in com.ibm.wala.ipa.summaries.VolatileMethodSummary
com.ibm.wala.core/src/com/ibm/wala/ipa/summaries/VolatileMethodSummary.java:583: warning - Tag @link: can't find getFactory() in com.ibm.wala.ipa.summaries.VolatileMethodSummary
com.ibm.wala.core/src/com/ibm/wala/ipa/summaries/VolatileMethodSummary.java:607: warning - Tag @link: can't find getStatic() in com.ibm.wala.ipa.summaries.VolatileMethodSummary
com.ibm.wala.core/src/com/ibm/wala/ipa/summaries/VolatileMethodSummary.java:349: warning - Tag @link: can't find overwritetatement(SSAInstruction) in com.ibm.wala.ipa.summaries.VolatileMethodSummary
com.ibm.wala.core/src/com/ibm/wala/ssa/SSAPhiInstruction.java:153: warning - Tag @see: can't find getValueString(SymbolTable, ValueDecorator, int) in com.ibm.wala.ssa.SSAInstruction
com.ibm.wala.cast/source/java/com/ibm/wala/cast/ipa/callgraph/GlobalObjectKey.java:29: warning - Tag @see: reference not found: JSSSAPropagationCallGraphBuilder
com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/ipa/callgraph/JSSSAPropagationCallGraphBuilder.java:111: warning - Tag @link: reference not found: org.mozilla.javascript.RhinoToAstTranslator
com.ibm.wala.dalvik/src/com/ibm/wala/dalvik/ipa/callgraph/androidModel/stubs/Overrides.java:79: warning - Tag @see: reference not found: com.ibm.wala.dalvik.ipa.callgraph.propagation.cfa
com.ibm.wala.dalvik/src/com/ibm/wala/dalvik/ipa/callgraph/impl/AndroidEntryPoint.java:219: warning - Tag @link: can't find after(IExecutionOrder) in com.ibm.wala.dalvik.ipa.callgraph.impl.AndroidEntryPoint.ExecutionOrder
com.ibm.wala.dalvik/src/com/ibm/wala/dalvik/ipa/callgraph/impl/AndroidEntryPoint.java:219: warning - Tag @link: can't find between(IExecutionOrder, IExecutionOrder) in com.ibm.wala.dalvik.ipa.callgraph.impl.AndroidEntryPoint.ExecutionOrder
com.ibm.wala.dalvik/src/com/ibm/wala/dalvik/ipa/callgraph/impl/AndroidEntryPoint.java:364: warning - Tag @link: can't find after(IExecutionOrder) in com.ibm.wala.dalvik.ipa.callgraph.impl.AndroidEntryPoint.ExecutionOrder
com.ibm.wala.dalvik/src/com/ibm/wala/dalvik/ipa/callgraph/impl/AndroidEntryPoint.java:311: warning - Tag @link: can't find between(IExecutionOrder, IExecutionOrder) in com.ibm.wala.dalvik.ipa.callgraph.impl.AndroidEntryPoint.ExecutionOrder
com.ibm.wala.dalvik/src/com/ibm/wala/dalvik/ipa/callgraph/impl/AndroidEntryPoint.java:277: warning - Tag @link: can't find between(IExecutionOrder[], IExecutionOrder[]) in com.ibm.wala.dalvik.ipa.callgraph.impl.AndroidEntryPoint.ExecutionOrder
com.ibm.wala.dalvik/src/com/ibm/wala/dalvik/ipa/callgraph/androidModel/structure/AbstractAndroidModel.java:170: warning - Tag @link: can't find enter(ExecutionOrder, int) in com.ibm.wala.dalvik.ipa.callgraph.androidModel.structure.AbstractAndroidModel
com.ibm.wala.dalvik/src/com/ibm/wala/dalvik/ipa/callgraph/androidModel/stubs/package-info.java:56: warning - Tag @see: reference not found: com.ibm.wala.dalvik.ipa.callgraph.propagation.cfa

Some of these should go away once wala#277 is merged, so it is probably not worth working on this until that merge happens. Once the merge is done, any remaining Javadoc build warnings should be investigated and either repaired or suppressed.

Fix regression test failures

Use ./gradelw test to run WALA’s automated regression tests. Several test suite subprojects pass completely. However, at least the following fail:

  • com.ibm.wala.cast.js.rhino.test
  • com.ibm.wala.cast.js.test
  • com.ibm.wala.core.tests
    • DynamicCallGraphTest
    • GetTargetsTest
    • PruneArrayOutOfBoundExceptionEdge
  • com.ibm.wala.dalvik.test
    • DynamicDalvikComparisonTestForAndroidLibs
  • com.ibm.wala.ide.jdt.test
    • ECJJavaIRTest
    • ECJSyncDuplicatorTest
    • JDTJava15IRTests
    • JDTJavaIRTests
  • com.ibm.wala.ide.jsdt.tests
    • JSProjectScopeTest

I believe that many of these failures are due to resource path / class loader problems. WALA tests commonly need to find other files within the WALA source tree, and use Java class loader facilities to do that. In order for that process to work, Gradle needs to copy the appropriate files into the appropriate run-time resource directories, Gradle needs to set run-time class paths to include those directories, and the test code itself needs to use class loaders that use those class paths.

For the test suites that pass, I have already successfully gotten the class loaders to find the right resources. For the test suites that fail, I am apparently not yet doing this correctly. Some of the testing infrastructure uses class loaders in complex ways, so here I will probably need help from more-experienced WALA maintainers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.