Comments (5)
Hi! Take a look at https://github.com/ShiftLeftSecurity/joern and follow the instructions there to get access to a code property graph for C/C++ programs. It contains a control flow graph and all statements are decomposed into their expressions to yield an AST-like structure.
from codepropertygraph.
Hi! Take a look at https://github.com/ShiftLeftSecurity/joern and follow the instructions there to get access to a code property graph for C/C++ programs. It contains a control flow graph and all statements are decomposed into their expressions to yield an AST-like structure.
thanks for the reply, but I have checked the documentation, it seems there is no interface about outputting ast or cfg on this https://ocular.shiftleft.io/api/io/shiftleft/queryprimitives/index.html. The documentation only provides some high level functions such as cfg.methods. If I want to get the raw ast or cfg graph with Joern, what can I do?
from codepropertygraph.
@fabsx00 do you have an instruction to generate the java cpg?
from codepropertygraph.
@shangqing-liu the methods for traversing the CFG are called cfgPrev
and cfgNext
, and they follow incoming and outcoming CFG edges respectively. I think it might make sense if you tell us more about what you want to achieve. Do you want to have a CFG in some standard format like json? Do you want to plot the CFG?
from codepropertygraph.
@jinho10 currently, an open-source input module only exists for C/C++ but not for Java. Ocular at https://ocular.shiftleft.io/ has a commercial Java language frontend.
from codepropertygraph.
Related Issues (20)
- Warnings and crash when using the new C frontend with joern-scan on VLC HOT 9
- Possibly unwanted #ifdef behaviour when running joern-scan with new C frontend HOT 4
- cpgqls python client closes connection before queries finish HOT 1
- Some header files not found with new beta C/C++ frontend HOT 2
- New C frontend: `METHOD` stubs for external methods not present HOT 1
- New C/C++ frontend: missing TYPE nodes for lambdas/template-types
- [ newc ] Type is missing for locals
- newc: signature
- [ newc ] Missing method stub HOT 4
- [newc] Base class in separate namespace not correctly identified
- Missing size of char array in CPG
- Question regarding `NodeRef`s HOT 2
- Does this tool support generating cpg from java code? HOT 2
- Errors during createAndApply of ParallelCpgPass not escalated HOT 9
- Wrong result for `\\` in the label in the dot file HOT 2
- Some operators have the wrong name (typo) HOT 1
- by using this joern library , i want CPG in ideal format as given in research papers in which CFG and AST nodes must not connected HOT 1
- Can code contain inheritance relationships between classes?
- `sbt package` failing on M1 macOS
- Introduce `POSSIBLE_TYPES` property
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codepropertygraph.