I'd like to be able to generate Code Property Graphs (CPG) from a Java codebase. I am new to Rascal MPL but from what I understand this is a good use case for it. Not been able to find any material around this specifically, would appreciate some guidance on this.
Also, I'd like to export the graph and run queries on the graph using something like Neo4J or TinkerPop
I'd like to be able to generate Code Property Graphs (CPG) from a Java codebase. I am new to Rascal MPL but from what I understand this is a good use case for it. Not been able to find any material around this specifically, would appreciate some guidance on this.
Also, I'd like to export the graph and run queries on the graph using something like Neo4J or TinkerPop
Share Improve this question edited Feb 7 at 8:59 Jurgen Vinju 6,6961 gold badge18 silver badges28 bronze badges asked Feb 6 at 9:21 bruce_waynebruce_wayne 634 bronze badges1 Answer
Reset to default 0In rascal this is called m3, for java you can read about it here: https://www.rascal-mpl.org/docs/Library/lang/java/m3/Core/
Since rascal has powerfull pattern matching and relational algebra, you can most likely write your queries in rascal itself, no need for external tools.
See some examples here:
- https://www.rascal-mpl.org/docs/WhyRascal/UseCases/CodeAsData
- https://www.rascal-mpl.org/docs/Recipes/Common/
- https://www.rascal-mpl.org/docs/Recipes/Metrics/MeasuringJava/