Giter VIP home page Giter VIP logo

progex's Introduction

PROGEX (Program Graph Extractor)

PROGEX is a cross-platform tool for extracting well-known graphical program representations (such as CFGs, PDGs, ASTs, etc.) from software source code. PROGEX is written in Java, based on the ANTLR parser generator.

PROGEX reads program source code files as input, and is able to generate various graphical program representations and export them into well-known file formats for graphs; such as DOT, GML and JSON.

The structure of this repository is a Maven project. If you are interested in contributing to this project, you can easily get up and running using your favorite Java IDE and Maven.

This is an internal project by members of our lab from Amirkabir University of Technology, as a sub-project of the PhD thesis of Seyed Mohammad Ghaffarian.

Why We Developed PROGEX?

There are key aspects about PROGEX which makes it different and relevant in the presence of other well-known program analysis frameworks (such as SOOT, Chord, Spoon, etc.):

  • PROGEX is designed to operate at the source code level (or more precisely, at Abstract Syntax Tree (AST) level); not any other intermediate code or machine code level. To the best of our knowledge, all the above-mentioned frameworks operate at byte-code level. To explain the benefits of analysis at this level, we provide the following quote:

    Control-flow and data-flow analyses are key elements in many static analyses, and useful for a variety of purposes, e.g. code optimization, refactoring, enforcing coding conventions, bug detection, and metrics. Often, such analyses are carried out on a normalized intermediate code representation, rather than on the abstract syntax tree (AST). This simplifies the computations by not having to deal with the full source language. However, doing these analyses directly at the AST level can be beneficial, since the high-level abstractions are not compiled away during the translation to intermediate code. This is particularly important for tools that are integrated in interactive development environments, such as refactoring tools and tools supporting bug detection and coding convention violations.

    -- Extensible Intraprocedural Flow Analysis at the Abstract Syntax Tree Level

  • PROGEX is not a general-purpose program analysis, transformation, or rewriting framework. In contrast, it is only focused on the task of extracting well-known graphical program representations, and the ability to export them in well-known formats for further analysis by external programs. While all the above-mentioned frameworks are able to extract well-known graphical program representations, they are only internally usable, and none provide convenient mechanisms for exporting these graphs and making them available to external programs.

  • While the current state of PROGEX only supports the Java programming language, there is no limitation to support other programming languages. Any programming language that can be parsed using the ANTLR parser generator, can be supported by PROGEX. This virtually means all programming languages can be supported!

After doing many searches online, we were unable to find any suitable tool with the above-mentioned properties. Since such a tool was a requirement for our research projects, hence we developed PROGEX.

Usage Guide

USAGE:

   java -jar PROGEX.jar [-OPTIONS...] /path/to/program/src


OPTIONS:

   -help      Print this help message
   -outdir    Specify path of output directory
   -format    Specify output format; either 'DOT', 'GML' or 'JSON'
   -lang      Specify language of program source codes

   -ast       Perform AST (Abstract Syntax Tree) analysis
   -cfg       Perfomt CFG (Control Flow Graph) analysis
   -icfg      Perform ICFG (Interprocedural CFG) analysis
   -info      Analyze and extract detailed information about program source code
   -pdg       Perform PDG (Program Dependence Graph) analysis

   -debug     Enable more detailed logs (only for debugging)
   -timetags  Enable time-tags and labels for logs (only for debugging)


DEFAULTS:

   - If not specified, the default output directory is the current working directory.
   - If not specified, the default output format is DOT.
   - If not specified, the default language is Java.
   - There is no default value for analysis type.
   - There is no default value for input directory path.


EXAMPLES:

   java -jar PROGEX.jar -cfg -lang java -format dot  /home/user/project/src

      This example will extract the CFG of all Java source files in the given path and 
      will export all extracted graphs as DOT files in the current working directory.

   java -jar PROGEX.jar -outdir D:\outputs -format json -pdg  C:\Project\src

      This example will extract the PDGs of all Java source files in the given path and 
      will export all extracted graphs as JSON files in the given output directory.


NOTES:

   - The important pre-assumption for analyzing any source code is that the 
     program is valid according to the grammar of that language. Analyzing 
     invalid programs has undefined results; most probably the program will 
     crash!

   - Analyzing large programs requires high volumes of system memory, so 
     it is necessary to increase the maximum available memory for PROGEX.

     In the example below, the -Xmx option of the JVM is used to provide PROGEX 
     with 5 giga-bytes of system memory; which is required for the PDG analysis 
     of very large programs (i.e. about one million LoC). Needless to say, this 
     is possible on a computer with at least 8 giga-bytes of RAM:

        java -Xmx5G -jar PROGEX.jar -pdg ...

Installation and Requirements

PROGEX is a fully portable tool and requires no installation. Just download the latest stable release from our releases page.

Installing a Java Runtime Environment (JRE, version 8 or newer) is the only requirement for running PROGEX. To acquire the latest JRE version for your platform, visit java.com

Visualizing Output Graphs

One use of the exported graphs is to visually analyze the resulting graphs for program comprehension, and other analysis purposes. For this purpose there are several options:

1. xdot

PROGEX can export the extracted graphs into DOT format. This format can be visualized using the xdot program. To install xdot on Ubuntu, use the following command:

sudo apt install xdot

And visualize the resulting graph as below:

xdot graph.dot

An alternative way is to create an image file. This can be done as follows:

dot -Tpng -o graph.png graph.dot

2. PROGVIZ

While xdot is a fine program and fulfills many basic requirements, it has some limitations. PROGVIZ is a related project by the developers of PROGEX, which aims to overcome some of xdot's limitations and provide an improved modern graph visualization tool for program analysis applications. This tool is still under active development and supports all output formats of PROGEX. For more information, refer to its dedicated GitHub repository:

https://github.com/ghaffarian/progviz/

Developer's Guide

If you wish to build PROGEX from the source and start developing your own changes:

Required Tools

  • Git (version 2.x)
  • Apache Maven (version 3.x)
  • Java Development Kit (JDK) version 8.0 or newer

Steps (Linux terminal commands)

  1. git clone https://github.com/ghaffarian/nanologger.git
  2. cd nanologger && mvn clean install && cd ..
  3. git clone https://github.com/ghaffarian/graphs.git
  4. cd graphs && mvn clean install && cd ..
  5. git clone https://github.com/ghaffarian/progex.git
  6. cd progex && mvn clean install

progex's People

Contributors

breandan avatar ghaffarian avatar h-homaei 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

Watchers

 avatar  avatar  avatar  avatar

progex's Issues

NullPointerException @ JavaICFGBuilder.java:1079

When running PROGEX's ICFG analysis on its own source code, the following exception is thrown:

Exception in thread "main" java.lang.NullPointerException                                                                                                                                                         
        at progex.java.JavaICFGBuilder$ICFGVisitor.classInstantiate(JavaICFGBuilder.java:1079)                                                                                                                    
        at progex.java.JavaICFGBuilder$ICFGVisitor.findClassbyName(JavaICFGBuilder.java:993)                                                                                                                      
        at progex.java.JavaICFGBuilder$ICFGVisitor.findVariableType(JavaICFGBuilder.java:969)                                                                                                                     
        at progex.java.JavaICFGBuilder$ICFGVisitor.visitExprPrimary(JavaICFGBuilder.java:627) 
...

More precisely, the exception is raised while analysing line 32 of progex.java.JavaClass.java, which is:

    fields = new ArrayList<>();

The source of the issue is at line 1079 of JavaICFGGuilder.java inside the classInstantiate(...) method declaration, which is:

    String[] genericParam = params.split(",");

At this point a NullPointerException is raised, because params is null. This is most probably due to not handling the case where the generic type parameter is empty (e.g. new ArrayList<>();).

Error when generating ICFG

Before all, thank you for your excellent work ,it is very helpful for me.
But when I use command line for generating ICFG, some errors was reported as below:

java.io.FileNotFoundException: lib\src.zip 
java.io.FileNotFoundException: lib\src.zip 
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at ghaffarian.progex.java.JavaClassExtractor.extractJavaLangInfo(JavaClassExtractor.java:52)
        at ghaffarian.progex.java.JavaICFGBuilder.buildForAll(JavaICFGBuilder.java:72)
        at ghaffarian.progex.java.JavaICFGBuilder.buildForAll(JavaICFGBuilder.java:46)
        at ghaffarian.progex.graphs.cfg.ICFGBuilder.buildForAll(ICFGBuilder.java:24)
        at ghaffarian.progex.Execution.execute(Execution.java:219)
        at ghaffarian.progex.Main.main(Main.java:36)

So how to deal with it?
Thank you in advance for your help.
Lin

mvn compilation problem

Hello,

Does the "mvn install" works well to build the source code ?
Personaly, I have problem with th none-logger and graphs dependencies ...

IllegalArgumentException: no such vertex in graph: 0: ELSE

While processing progex.java.JavaDDGBuilder.java from PROGEX's own source code, the following exception is thrown during control-dependency analysis (JavaCDGBuilder), after processing line 620: debug("METHOD DEF INFO NOT FOUND!"); of the JavaDDGBuilder.java file:

Exception in thread "main" java.lang.IllegalArgumentException: no such vertex in graph: 0: ELSE
	at org.jgrapht.graph.AbstractGraph.assertVertexExist(AbstractGraph.java:132)
	at org.jgrapht.graph.AbstractBaseGraph.addEdge(AbstractBaseGraph.java:178)
	at progex.java.JavaCDGBuilder$ControlDependencyVisitor.checkBuildFollowRegion(JavaCDGBuilder.java:670)
	at progex.java.JavaCDGBuilder$ControlDependencyVisitor.addNodeEdge(JavaCDGBuilder.java:642)
	at progex.java.JavaCDGBuilder$ControlDependencyVisitor.visitStatementExpression(JavaCDGBuilder.java:175)
	at progex.java.JavaCDGBuilder$ControlDependencyVisitor.visitStatementExpression(JavaCDGBuilder.java:51)
...

The issue is most likely related to the else if (...) statement at line 585; which may not be processed correctly by JavaCDGBuilder.

The input Java file is attached below:
JavaDDGBuilder.java.txt

ICFG crashes!

ICFG crashes with a NullPointerException given the following test case:
Test3.txt

Note that other analyses (such as CFG and PDG) run successfully on the same test case.

Here is the stack trace:

Exception in thread "main" java.lang.NullPointerException
	at progex.java.JavaICFGBuilder$ICFGVisitor.findMethodbyName(JavaICFGBuilder.java:858)
	at progex.java.JavaICFGBuilder$ICFGVisitor.visitExprPrimary(JavaICFGBuilder.java:587)
	at progex.java.JavaICFGBuilder$ICFGVisitor.visitExprPrimary(JavaICFGBuilder.java:144)
	at progex.java.parser.JavaParser$ExprPrimaryContext.accept(JavaParser.java:7443)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
	at progex.java.JavaICFGBuilder$ICFGVisitor.visitExprDotID(JavaICFGBuilder.java:600)
	at progex.java.JavaICFGBuilder$ICFGVisitor.visitExprDotID(JavaICFGBuilder.java:144)
	at progex.java.parser.JavaParser$ExprDotIDContext.accept(JavaParser.java:7617)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
	at progex.java.JavaICFGBuilder$ICFGVisitor.visitExprMethodInvocation(JavaICFGBuilder.java:693)
	at progex.java.JavaICFGBuilder$ICFGVisitor.visitExprMethodInvocation(JavaICFGBuilder.java:144)
	at progex.java.parser.JavaParser$ExprMethodInvocationContext.accept(JavaParser.java:7257)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
	at progex.java.parser.JavaBaseVisitor.visitVariableInitializer(JavaBaseVisitor.java:265)
	at progex.java.parser.JavaParser$VariableInitializerContext.accept(JavaParser.java:2948)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
	at progex.java.parser.JavaBaseVisitor.visitVariableDeclarator(JavaBaseVisitor.java:251)
	at progex.java.parser.JavaParser$VariableDeclaratorContext.accept(JavaParser.java:2829)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
	at progex.java.parser.JavaBaseVisitor.visitVariableDeclarators(JavaBaseVisitor.java:244)
	at progex.java.parser.JavaParser$VariableDeclaratorsContext.accept(JavaParser.java:2765)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
	at progex.java.JavaICFGBuilder$ICFGVisitor.visitLocalVariableDeclaration(JavaICFGBuilder.java:468)
	at progex.java.JavaICFGBuilder$ICFGVisitor.visitLocalVariableDeclaration(JavaICFGBuilder.java:144)
	at progex.java.parser.JavaParser$LocalVariableDeclarationContext.accept(JavaParser.java:5322)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
	at progex.java.parser.JavaBaseVisitor.visitLocalVariableDeclarationStatement(JavaBaseVisitor.java:496)
	at progex.java.parser.JavaParser$LocalVariableDeclarationStatementContext.accept(JavaParser.java:5267)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
	at progex.java.parser.JavaBaseVisitor.visitBlockStatement(JavaBaseVisitor.java:489)
	at progex.java.parser.JavaParser$BlockStatementContext.accept(JavaParser.java:5203)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
	at progex.java.JavaICFGBuilder$ICFGVisitor.visitBlock(JavaICFGBuilder.java:251)
	at progex.java.JavaICFGBuilder$ICFGVisitor.visitBlock(JavaICFGBuilder.java:144)
	at progex.java.parser.JavaParser$BlockContext.accept(JavaParser.java:5136)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
	at progex.java.JavaICFGBuilder$ICFGVisitor.visitTryStatement(JavaICFGBuilder.java:413)
	at progex.java.JavaICFGBuilder$ICFGVisitor.visitTryStatement(JavaICFGBuilder.java:144)
	at progex.java.parser.JavaParser$TryStatementContext.accept(JavaParser.java:5438)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
	at progex.java.parser.JavaBaseVisitor.visitBlockStatement(JavaBaseVisitor.java:489)
	at progex.java.parser.JavaParser$BlockStatementContext.accept(JavaParser.java:5203)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
	at progex.java.JavaICFGBuilder$ICFGVisitor.visitBlock(JavaICFGBuilder.java:251)
	at progex.java.JavaICFGBuilder$ICFGVisitor.visitBlock(JavaICFGBuilder.java:144)
	at progex.java.parser.JavaParser$BlockContext.accept(JavaParser.java:5136)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
	at progex.java.parser.JavaBaseVisitor.visitMethodBody(JavaBaseVisitor.java:356)
	at progex.java.parser.JavaParser$MethodBodyContext.accept(JavaParser.java:3924)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
	at progex.java.JavaICFGBuilder$ICFGVisitor.visitMethodDeclaration(JavaICFGBuilder.java:505)
	at progex.java.JavaICFGBuilder$ICFGVisitor.visitMethodDeclaration(JavaICFGBuilder.java:144)
	at progex.java.parser.JavaParser$MethodDeclarationContext.accept(JavaParser.java:1913)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
	at progex.java.parser.JavaBaseVisitor.visitMemberDeclaration(JavaBaseVisitor.java:160)
	at progex.java.parser.JavaParser$MemberDeclarationContext.accept(JavaParser.java:1797)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
	at progex.java.parser.JavaBaseVisitor.visitClassBodyDeclaration(JavaBaseVisitor.java:153)
	at progex.java.parser.JavaParser$ClassBodyDeclarationContext.accept(JavaParser.java:1681)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
	at progex.java.parser.JavaBaseVisitor.visitClassBody(JavaBaseVisitor.java:139)
	at progex.java.parser.JavaParser$ClassBodyContext.accept(JavaParser.java:1547)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
	at progex.java.JavaICFGBuilder$ICFGVisitor.visitClassDeclaration(JavaICFGBuilder.java:231)
	at progex.java.JavaICFGBuilder$ICFGVisitor.visitClassDeclaration(JavaICFGBuilder.java:144)
	at progex.java.parser.JavaParser$ClassDeclarationContext.accept(JavaParser.java:811)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
	at progex.java.parser.JavaBaseVisitor.visitTypeDeclaration(JavaBaseVisitor.java:41)
	at progex.java.parser.JavaParser$TypeDeclarationContext.accept(JavaParser.java:452)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
	at progex.java.parser.JavaBaseVisitor.visitCompilationUnit(JavaBaseVisitor.java:20)
	at progex.java.parser.JavaParser$CompilationUnitContext.accept(JavaParser.java:214)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
	at progex.java.JavaICFGBuilder.buildForAll(JavaICFGBuilder.java:82)
	at progex.java.JavaICFGBuilder.buildForAll(JavaICFGBuilder.java:46)
	at progex.graphs.cfg.ICFGBuilder.buildForAll(ICFGBuilder.java:24)
	at progex.Execution.execute(Execution.java:211)
	at progex.Main.main(Main.java:32)

FileNotFoundException lib\src.zip

The directory which is being scanned by progex does not have a reference to "src.zip" so I'm not sure how to chase the bug from a user perspective. Attached is a progex.log file showing the bug occurring. Aside from -info, it also happens with -cfg and -icfg. This code is great work! Thank you for posting it!
progex.log

FileNotFoundException: lib/src.zip

Hello,

When I try to execute ICFG I have this problem:

java.io.FileNotFoundException: lib/src.zip (Aucun fichier ou dossier de ce type)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:225)
at java.util.zip.ZipFile.(ZipFile.java:155)
at java.util.zip.ZipFile.(ZipFile.java:126)
at ghaffarian.progex.java.JavaClassExtractor.extractJavaLangInfo(JavaClassExtractor.java:52)
at ghaffarian.progex.java.JavaICFGBuilder.buildForAll(JavaICFGBuilder.java:72)
at ghaffarian.progex.java.JavaICFGBuilder.buildForAll(JavaICFGBuilder.java:46)
at ghaffarian.progex.graphs.cfg.ICFGBuilder.buildForAll(ICFGBuilder.java:24)
at ghaffarian.progex.Execution.execute(Execution.java:226)
at ghaffarian.progex.Main.main(Main.java:36)

What does that mean ?

I use this command line:
java -jar "/home/progex-3.2.0/progex.jar" -outdir /home/progex-3.2.0/output/synapse_1.0 -icfg -lang java -format dot /home/progex-3.2.0/projets_source/synapse_1.0

Issue in Export JSON

I export a json not a dot, and it generates a json file successfully.
However, when I try to read the json file using below codes, it shows an error JSONDecodeError: Expecting value

with open("Test1-CFG.json", 'r') as f:
          data = json.load(f)

I try to fix it. When I remove each comma in the list of nodes and edges, I can read the json file correctly.

From

  "nodes": [
    {
      "id": "n1",
      "line": "4",
      "code": "void main(String[] args)"
    },
    {
      "id": "n10",
      "line": "14",
      "code": "System.out.println(\"End\")"
    },
  ],
 "edges": [
    {
      "id": "e1",
      "source": "n1",
      "target": "n2",
      "label": ""
    },
    {
      "id": "e2",
      "source": "n2",
      "target": "n3",

to

  "nodes": [
    {
      "id": "n1",
      "line": "4",
      "code": "void main(String[] args)"
    },
    {
      "id": "n10",
      "line": "14",
      "code": "System.out.println(\"End\")"
    }
  ],
 "edges": [
    {
      "id": "e1",
      "source": "n1",
      "target": "n2",
      "label": ""
    },
    {
      "id": "e2",
      "source": "n2",
      "target": "n3",

Can you fix this in the code?
I think it is maybe in nodes and edges

If it is a last node or a last edge, it does not have to write ,(comma)

Error while creating ICFG

The code in the file JavaClassExtractor looks for path "\lib\src.zip" which is not available.

Interprocedural Control-Flow Analysis

java.nio.file.NoSuchFileException: lib\src.zip
java.nio.file.NoSuchFileException: lib\src.zip
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:53)
at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:38)
at java.base/sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:198)
at java.base/java.nio.file.Files.readAttributes(Files.java:1842)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1160)
at java.base/java.util.zip.ZipFile$CleanableResource.(ZipFile.java:719)
at java.base/java.util.zip.ZipFile.(ZipFile.java:239)
at java.base/java.util.zip.ZipFile.(ZipFile.java:169)
at java.base/java.util.zip.ZipFile.(ZipFile.java:140)
at ghaffarian.progex.java.JavaClassExtractor.extractJavaLangInfo(JavaClassExtractor.java:52)
at ghaffarian.progex.java.JavaICFGBuilder.buildForAll(JavaICFGBuilder.java:72)
at ghaffarian.progex.java.JavaICFGBuilder.buildForAll(JavaICFGBuilder.java:46)
at ghaffarian.progex.graphs.cfg.ICFGBuilder.buildForAll(ICFGBuilder.java:24)
at ghaffarian.progex.Execution.execute(Execution.java:219)
at ghaffarian.progex.Main.main(Main.java:36)

Process finished with exit code 0

support for Java 8 lambda expressions

Hi ghaffarian,
thx for your briliiant tool progex, but it seems not supoort parsing for lambda expression and method reference yet.
is there any plan for adding support for these new features?

Adding Support for More Languages

Hi,

I wonder what other input languages are supported by this tool, apart from java, and how one may call them when using the application.

Regards
Hooman

Error when generating ICFG

Hi, I am getting the following error while generating ICFG.
I tried the methods in other issues and still failed. How can I fix this problem?
image

Error when generating AST of large files

Hi,

When I try to generate AST for large files, PROGEX give me the following error:

Exception in thread "main" java.lang.NullPointerException
at java.base/java.lang.StringBuilder.(StringBuilder.java:124)
I have increased the memory. But still getting the error.

Thanks.

Export to JSON Doesn't Properly Handle New-Line Characters

Hi, I find another error when export json.
for instance,

     {
      "id": 6,
      "line": 14,
      "label": "if (base.substring(i, i + remove.length()).toLowerCase().equals(
            remove.toLowerCase()))"
    },

and

{
      "id": 4,
      "line": 10,
      "label": "if (str.length() >= 2 &&
        (str.charAt(0) == 'g' && str.charAt(1) != 'g' ||
        str.charAt(str.length()-1) == 'g' && 
        str.charAt(str.length()-2) != 'g'))"
    },

All conditions in same IF STATEMENT are successfully in same node, however, it is not recognized as one string. Therefore, when I try to read that json, it is failed with JSONDecodeError. Can you fix it?

Linking AST, CFG, and PDG

Hello,

Before all, congratulations for your source code and your presentation, it is very very clean and structured. I executed and generated the DOT files. That's excellent !!
I saw that it's possible to generate separately files AST / CFG / PDG... but how to make a merge of the 3? It's possible for me to complete your source code in this goal ? I would like to reproduce a single global graph merged like the Code property Graph defined in this document http://user.informatik.uni-goettingen.de/~krieck/docs/2014-ieeesp.pdf

Thank you in advance for your help

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.