Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

different # of nodes in an SDG when using reflection options #91

Open
quizzo opened this issue Oct 22, 2015 · 7 comments
Open

different # of nodes in an SDG when using reflection options #91

quizzo opened this issue Oct 22, 2015 · 7 comments

Comments

@quizzo
Copy link

quizzo commented Oct 22, 2015

Per Manu's request:

For the following reflection options I got the following stats:
APPLICATION_GET_METHOD, FULL, NO_FLOW_TO_CASTS,
NO_FLOW_TO_CASTS_APPLICATION_GET_METHOD, NO_FLOW_TO_CASTS_NO_METHOD_INVOKE,
NO_METHOD_INVOKE, ONE_FLOW_TO_CASTS_APPLICATION_GET_METHOD ,
ONE_FLOW_TO_CASTS_NO_METHOD_INVOKE

Call graph stats:
Nodes: 234
Edges: 400
Methods: 228
Bytecode Bytes: 10690
SDG # of nodes: 14398

For these two other reflection options I got a bit different stats:
NO_STRING_CONSTANTS ,NONE
Call graph stats:
Nodes: 228
Edges: 394
Methods: 228
Bytecode Bytes: 10690
SDG # of nodes 15758

I am attaching the two SDG text files to my post on the WALA group in the following link (https://groups.google.com/forum/#!topic/wala-sourceforge-net/AFSX5FeAAaU)

I am running this on the following toy app (http://www.cs.waikato.ac.nz/~robi/comp209-03b/examples16/LZ77T.java)

@msridhar
Copy link
Member

@quizzo which JDK library version are you analyzing?

@quizzo
Copy link
Author

quizzo commented Oct 22, 2015

java version "1.7.0_25"

@quizzo
Copy link
Author

quizzo commented Oct 22, 2015

please let me know if you need my code for the Options/ cha/ etc.

@msridhar
Copy link
Member

Is this a serious blocker issue for anyone? I will try to look soon, but it will take some time to investigate.

@quizzo
Copy link
Author

quizzo commented Dec 10, 2015

Not a blocker, but would like to know.

On Thu, Dec 10, 2015 at 3:08 PM, Manu Sridharan [email protected]
wrote:

Is this a serious blocker issue for anyone? I will try to look soon, but
it will take some time to investigate.


Reply to this email directly or view it on GitHub
#91 (comment).

@msridhar
Copy link
Member

@quizzo please post your driver code for constructing the slice; that would be helpful.

@quizzo
Copy link
Author

quizzo commented Dec 14, 2015

@msridhar I am using the simple slicer example (with minor changes). Attached is the code

    `AnalysisScope scope = AnalysisScopeReader.makeJavaBinaryAnalysisScope(pathToFile, exclusion_file); // the basic exclusion file that wala has as an example
        e = Util.makeMainEntrypoints(scope, cha);
    AnalysisOptions options = new AnalysisOptions(scope, e);
    options.setReflectionOptions(ReflectionOptions.NONE);
    CallGraphBuilder cgb = Util.makeZeroOneCFABuilder(options, new AnalysisCache(), cha, scope);
    cg = cgb.makeCallGraph(options, null);
    PointerAnalysis<InstanceKey> pointer = cgb.getPointerAnalysis();
    SDG sdg = new SDG(cg, pointer, ModRef.make(), DataDependenceOptions.NO_BASE_PTRS,
            ControlDependenceOptions.FULL);
        System.out.println("Size of SDG: " + sdg.getNumberOfNodes());`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants