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

Only ASTs for graph embedding? #4

Open
kbarbora opened this issue Jul 22, 2020 · 4 comments
Open

Only ASTs for graph embedding? #4

kbarbora opened this issue Jul 22, 2020 · 4 comments

Comments

@kbarbora
Copy link

Im trying to recreate devign and I came across your repo. Thank you so much.
I see that on the project (under development) you mention that you only using the ASTs instead as the paper implements the joint graph (in paper 3.1, Graph Generation section).
Do you achieve the graph generation according to the paper or you ignore all the relations introduce by the paper and use only ASTs?

@epicosy
Copy link
Owner

epicosy commented Jul 23, 2020

Thank you for your interest Kevin. I didn't finish implementing all the relations, I had to move on with other parts of my thesis. You can try to do it by processing the rest of Joern's CPG into some objects that represent the graphs, and then extend the GraphEmbeddings with it. Follow Pytorch Geometric's documentation on Data Handling of Graphs, to figure out how to represent the adjacency matrix for all the graphs. Was it helpful?

@kbarbora
Copy link
Author

yes, thank you for your feedback.

@QiuJYWX
Copy link

QiuJYWX commented Jul 27, 2020

Hi @kbarbora @epicosy

When I ran python main.py -c, I came across the issue:
Traceback (most recent call last):
File "main.py", line 157, in
main()
File "main.py", line 146, in main
create_task()
File "main.py", line 61, in create_task
graphs = prepare.json_process(PATHS.cpg, json_file)
File "/home/qjy/Desktop/devign/src/prepare/cpg_generator.py", line 79, in json_process
container = [graph_indexing(graph) for graph in cpg_json["functions"] if graph["file"] != "N/A"]
File "/home/qjy/Desktop/devign/src/prepare/cpg_generator.py", line 79, in
container = [graph_indexing(graph) for graph in cpg_json["functions"] if graph["file"] != "N/A"]
KeyError: 'file'

Anyone one can provide me some advice?

@1112z-c
Copy link

1112z-c commented Dec 13, 2021

@QiuJYWX I have met the same problem, has it been solved?Thanks

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

4 participants