GithubHelp home page GithubHelp logo

plast-lab / doop-mirror Goto Github PK

View Code? Open in Web Editor NEW
131.0 11.0 20.0 104.92 MB

Mirror of Doop: https://bitbucket.org/yanniss/doop

License: Other

Python 4.17% Shell 1.55% Groovy 31.13% Java 61.25% Ruby 0.14% Batchfile 0.01% ANTLR 0.33% Perl 1.43%
doop datalog pointer-analysis java

doop-mirror's People

Contributors

anantoni avatar anddann avatar cvrac avatar dbueno avatar gbalats avatar gfour avatar gkastrinis avatar iliastsa avatar jimouris avatar jonathansantilli avatar kferles avatar ktrianta avatar leonidastri avatar lzoghbi avatar nevillegrech avatar nikofil avatar saikos avatar sifislag avatar silverbullettt avatar sinistersnare avatar tanghaoth90 avatar yanniss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

doop-mirror's Issues

Seek Guidance on Using DOOP as a library

Dear all,

I want to use DOOP as a library and obtain the call graph DOOP generates by using DOOP's API. Could you kindly provide any insights, documentation, or tutorials that could aid me in obtaining the call graph generated by its API?

I have tried the sub-project https://github.com/plast-lab/doop-mirror/tree/master/docs/doop-as-lib, but I wasn't able to build it successfully due to the following error.

`* What went wrong:
Execution failed for task ‘:startScripts’.

Could not resolve all files for configuration ‘:runtimeClasspath’.
Could not find com.github.eaftan:hprof-parser:3668fd734f79c2b949f0703654dfda812c800707.
Searched in the following locations:
- file:/Users/miaomiao/.m2/repository/com/github/eaftan/hprof-parser/3668fd734f79c2b949f0703654dfda812c800707/hprof-parser-3668fd734f79c2b949f0703654dfda812c800707.pom
- https://repo.maven.apache.org/maven2/com/github/eaftan/hprof-parser/3668fd734f79c2b949f0703654dfda812c800707/hprof-parser-3668fd734f79c2b949f0703654dfda812c800707.pom
- http://centauri.di.uoa.gr:8081/artifactory/plast-deps/com/github/eaftan/hprof-parser/3668fd734f79c2b949f0703654dfda812c800707/hprof-parser-3668fd734f79c2b949f0703654dfda812c800707.pom
- http://centauri.di.uoa.gr:8081/artifactory/plast-public/com/github/eaftan/hprof-parser/3668fd734f79c2b949f0703654dfda812c800707/hprof-parser-3668fd734f79c2b949f0703654dfda812c800707.pom
Required by:
project : > org.clyze:doop:4.24.10 > org.clyze:HeapDL:1.1.13`

Could someone take a look and provide any guidance on how to address these errors? I truly appreciate any help you can provide!

https://clyze.jfrog.io seems to be offline

when i build doop i got such messages:

Could not determine the dependencies of task ':generators:fact-generator-common:shadowJar'.
> Could not resolve all dependencies for configuration ':generators:fact-generator-common:compileClasspath'.
   > Could not resolve org.clyze:clue-common:3.25.3.
     Required by:
         project :generators:fact-generator-common
      > Could not resolve org.clyze:clue-common:3.25.3.
         > Could not parse POM https://clyze.jfrog.io/artifactory/default-maven-local/org/clyze/clue-common/3.25.3/clue-common-3.25.3.pom
            > Already seen doctype.
   > Could not resolve org.clyze:metadata-model:2.4.1.
     Required by:
         project :generators:fact-generator-common
      > Could not resolve org.clyze:metadata-model:2.4.1.
         > Could not parse POM https://clyze.jfrog.io/artifactory/default-maven-local/org/clyze/metadata-model/2.4.1/metadata-model-2.4.1.pom
            > Already seen doctype.
   > Could not resolve org.clyze:native-scanner:0.6.6.
     Required by:
         project :generators:fact-generator-common
      > Could not resolve org.clyze:native-scanner:0.6.6.
         > Could not parse POM https://clyze.jfrog.io/artifactory/default-maven-local/org/clyze/native-scanner/0.6.6/native-scanner-0.6.6.pom
            > Already seen doctype.

https://clyze.jfrog.io seems to be offline

Failed to enable soot optimization in soot-fact-generator

Hi, I want to enable soot soot optimization for dead code elimination, so I insert some code into org.clyze.doop.soot.Main.produceFacts(), But after running, it is found that the generated fact has not been optimized, and dead code still exists

image

here is my test case

public class A {

    public static String source() {
        return new String();
    }

    public static void sink(String var) {
        ; 
    }
 

    public static void main(String[] args) throws Exception {    
        String str = source();
        String bar;
        int x = 123;
        if (x==456){
            bar = str;
        }else{
            bar = "XXX";
        }
        sink(bar);
    }
}

if I directly run soot with cmd soot -f S -pp -cp . A -optimize, the shimple which soot generated is optimized:

public class A extends java.lang.Object
{

   ...

    public static void main(java.lang.String[]) throws java.lang.Exception
    {
        java.lang.String[] r0;
        java.lang.String r1, r1_1, r1_2;

        r0 := @parameter0: java.lang.String[];

        goto label1;

        r1 = staticinvoke <A: java.lang.String source()>();

        goto label2;

     label1:
        r1_1 = "XXX";

     label2:
        r1_2 = "XXX";

        staticinvoke <A: void sink(java.lang.String)>("XXX");

        return;
    }
}

I don't why those pack setting don't work in doop

Gradle Build failed

After all the setup, I run the command ./doop -h.
This is the error I run into:

FAILURE: Build failed with an exception.

  • Where:
    Build file '/home/shubham/Desktop/M.TechProject/Doop/yanniss-doop-e9752879fba1/build.gradle' line: 17

  • What went wrong:
    Error resolving plugin [id: 'net.researchgate.release', version: '2.6.0']

Could not resolve all dependencies for configuration 'detachedConfiguration1'.
Could not determine artifacts for net.researchgate.release:net.researchgate.release.gradle.plugin:2.6.0
> Could not get resource 'https://plugins.gradle.org/m2/net/researchgate/release/net.researchgate.release.gradle.plugin/2.6.0/net.researchgate.release.gradle.plugin-2.6.0.jar'.
> Could not HEAD 'https://plugins.gradle.org/m2/net/researchgate/release/net.researchgate.release.gradle.plugin/2.6.0/net.researchgate.release.gradle.plugin-2.6.0.jar'.
> Remote host closed connection during handshake

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.7/userguide/command_line_interface.html#sec:command_line_warnings

Anyone who can help me understand the error better?

App-only.dl may have issues with isOpaqueMethod handling

Original code:

// First make all methods be opaque if not app!
isOpaqueMethod(?signature) :-
  isMethod(?signature),
  !ApplicationMethod(?signature).

Test java code:

    public void calledByEntry() {
	    // virtualinvoke l1#_54.<Test$A: int hashCode()>();
        A o = new A();
        o.hashCode();
        System.out.println("called by entry method");
    }

    public void calledByEntry() {
	    // Class A extends O
	    // virtualinvoke l1#_54.<java.lang.Object: int hashCode()>();
        O o = new A();
        o.hashCode();
        System.out.println("called by entry method");
    }

For the second method calledByEntry, .<java.lang.Object: int hashCode()> may be marked as isOpaqueMethod, which will affect the logics of VirtualMethodInvocation_Base and configuration.ContextRequest. To avoid this problem, the following code is a personally considered fix.

.decl isMethodSuperOfApplicationMethod(?signature: Method)

// Avoid this issue:
// [Negations with relatively grounded variables · Issue #730 · souffle-lang/souffle (github.com)]
// (https://github.com/souffle-lang/souffle/issues/730)
isMethodSuperOfApplicationMethod(?signature) :-
  basic.MethodOverridesOther(?methodSub, ?signature),
  ApplicationMethod(?methodSub).

// Fixed code:
// ?signature maybe is the methodSuper of ApplicationMethod(?methodSub)
isOpaqueMethod(?signature) :-
  isMethod(?signature), 
  !isMethodSuperOfApplicationMethod(?signature),
  !ApplicationMethod(?signature).

Repaired result: Repaired result

Failed to build

FAILURE: Build failed with an exception.

What went wrong:
Could not determine the dependencies of task ':generators:fact-generator-common:shadowJar'.
Could not resolve all dependencies for configuration ':generators:fact-generator-common:compileClasspath'.
Could not resolve org.clyze:clue-common:3.25.3.
Required by:
project :generators:fact-generator-common
Could not resolve org.clyze:clue-common:3.25.3.
Could not get resource 'https://clyze.jfrog.io/artifactory/default-maven-local/org/clyze/clue-common/3.25.3/clue-common-3.25.3.pom'.
Could not HEAD 'https://landing.jfrog.com/reactivate-server/clyze'. Received status code 409 from server: Conflict
Could not resolve org.clyze:metadata-model:2.4.1.
Required by:
project :generators:fact-generator-common
Could not resolve org.clyze:metadata-model:2.4.1.
Could not get resource 'https://clyze.jfrog.io/artifactory/default-maven-local/org/clyze/metadata-model/2.4.1/metadata-model-2.4.1.pom'.
Could not HEAD 'https://landing.jfrog.com/reactivate-server/clyze'. Received status code 409 from server: Conflict
Could not resolve org.clyze:native-scanner:0.6.6.
Required by:
project :generators:fact-generator-common
Could not resolve org.clyze:native-scanner:0.6.6.
Could not get resource 'https://clyze.jfrog.io/artifactory/default-maven-local/org/clyze/native-scanner/0.6.6/native-scanner-0.6.6.pom'.
Could not HEAD 'https://landing.jfrog.com/reactivate-server/clyze'. Received status code 409 from server: Conflict

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

soot.method.retrieveActiveBody error

when solve some method , the retrieveActiveBody may throw an error

Caused by: java.lang.RuntimeException: Failed to convert <oracle.jdbc.proxy.ClassGenerator: void generate(org.objectweb.asm.ClassWriter)>

Is there some fix to ignore some method retrieveActiveBody error

image

Detected non-deterministic results under various configurations

Hi, I have recently been using Doop for an empirical study to detect non-deterministic behaviors in static analyzers. The experiments resulted in discovering some nondeterministic analysis results across multiple runs under various configurations of Doop.

The details of the experimental setup are as below:

  • The experiments were conducted on the micro-benchmark CATS and a real-world benchmark DaCapo-2006.

  • The experiments were conducted under 50 sample configurations which were generated using a 2-way covering array from the configuration space.

  • The timeout set for Doop running on each CATS program was 60 minutes. For running on each DaCapo-2006 program, the timeout was set to 2 hours.

  • We ran Doop on each program-configuration combination 5 times and compared the results across 5 runs for detecting non-deterministic behaviors.

  • All experiments were conducted in docker containers. The hardware environment is a server with 376GB of RAM and 2 Intel Xeon Gold 5218 16-core [email protected] running Ubuntu 18.04.

In the end, the experiments detected non-deterministic results on 6 programs. None of the programs were from CATS, and all 6 programs were from the DaCapo-2006. These results were detected when the configuration sets its analysis option to context-insensitive.

The attached data is the detected nondeterministic results from CATS and DaCapo-2006 and configuration files
(note1: the configurations are hash-coded in the detected results, but the actual configuration options and values that each hash code stands for can be found in the attached configuration files.)

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.