victorjmarin / sourcedg Goto Github PK
View Code? Open in Web Editor NEWSystem Dependence Graph generation from Java source code
System Dependence Graph generation from Java source code
@victorjmarin @crrivero CAN YOU PLEASE ASSIST ME IT IS VERY IMPORTANT FOR MY PROJECT
Would it be possible to add a license to this project? I would really like to use your code in one of my projects. Here is how to do it: https://stackoverflow.com/a/31666878
Hi, great work!
I'm trying to extract all data sharing dependence between nodes in the PDG. With data sharing I mean that if I have two statements S1 and S2, if they both appear in the same execution path thus they share some data, for example:
If I have this code
public void main() {
String str = read();
boolean valid = isValid(str);
if (valid) {
foo(str);
} else {
bar(str);
}
}
the function read
is linked to: isValid
, foo
and bar
because data dependence (i.e. I found and Edge of type Data in the PDG), but I need to track also that the function isValid
is linked to foo
and bar
because data sharing. Indeed the result of isValid
choose which function call.
Can you help me with that?
Thank you
Hello, I am currently doing program analysis work on Java function level. How can I use sourcedg to generate a function level dependency graph? Thank you.
Hii,
I am trying to generate Program Dependence Graph using sourcedg. When I tried executing the file Test.java I got the exception "Exception in thread "main" com.github.javaparser.ParseProblemException: (line 1,col 10) Parse error. Found "int", expected one of ";" "@" "class" "enum" "interface" "module" "open""
Below is the code for which I am trying to generate the PDG
`public static int srch()
{
int c, first, last, middle, n, search, array[];
first = 0;
last = n - 1;
middle = (first + last)/2;
while( first <= last )
{
if ( array[middle] < search )
first = middle + 1;
else if ( array[middle] == search )
{
return middle+1;
}
else
last = middle - 1;
middle = (first + last)/2;
}
if ( first > last )
return 0;
}
`
And the stack trace is:
Exception in thread "main" com.github.javaparser.ParseProblemException: (line 1,col 10) Parse error. Found "int", expected one of ";" "@" "class" "enum" "interface" "module" "open"
Problem stacktrace :
com.github.javaparser.GeneratedJavaParser.generateParseException(GeneratedJavaParser.java:10271)
com.github.javaparser.GeneratedJavaParser.jj_consume_token(GeneratedJavaParser.java:10130)
com.github.javaparser.GeneratedJavaParser.CompilationUnit(GeneratedJavaParser.java:179)
com.github.javaparser.JavaParser.parse(JavaParser.java:126)
com.github.javaparser.JavaParser.simplifiedParse(JavaParser.java:325)
com.github.javaparser.JavaParser.parse(JavaParser.java:159)
com.github.javaparser.JavaParser.parse(JavaParser.java:172)
edu.rit.goal.sourcedg.builder.PDGBuilder.build(PDGBuilder.java:48)
edu.rit.goal.sourcedg.Test.main(Test.java:19)
at com.github.javaparser.JavaParser.simplifiedParse(JavaParser.java:329)
at com.github.javaparser.JavaParser.parse(JavaParser.java:159)
at com.github.javaparser.JavaParser.parse(JavaParser.java:172)
at edu.rit.goal.sourcedg.builder.PDGBuilder.build(PDGBuilder.java:48)
at edu.rit.goal.sourcedg.Test.main(Test.java:19)
Process finished with exit code 1
hello,i would like to learn this project,but i can only find one implementation.
How to use sourcedg to perform dependency graph analysis on a jar file or all java files (source code) in a folder
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.