Closed LeeSureman closed 2 years ago
Hello did you try and run the analysis first and then generate top modules as outlined in the steps?
Hello did you try and run the analysis first and then generate top modules as outlined in the steps?
sorry, I run the steps you provide, but fails in 'From the scripts dir, run: sh inspect_modules_for_docstrings.sh
Ok sure - do let us know and we will try and help.
Thank you for quick response!
I think I misread your question - I'm assuming that you cannot re-use classes.map we have provided already? That has the normalized names for most commonly used Python classes.
actually, I'm not sure whether the class.map is the result of mapping in your paper, such as "numpy.zeros.transpose -> numpy.ndarray.transpose"? it seems the mapping in class.map is about mapping of class instead of function
maybe I misunderstood the class.map. I thought it is the mapping result of function calls.
My main purpose is to figure out how you map function calls, like torch.zeros.max -> torch.Tensor.max, or str.strip.strip.split.append -> list.append? it seems how to get these mappings is not introduced in your paper. (If I miss it, I will apologize...) So I want to look into your code for understanding how you achieve it
Ok what you are asking for is a normalized function call after type inference. Type inference is challenging in dynamic languages like Python as you may already know. We tried to use this graph to infer it but that is not part of this work. We have a separate piece of work on it (paper + code). If you are really interested in that we would need to spend some time packaging that all up. Do you want to work on that problem with us?
Sorry for latency response. Yes, but I do not know the name of what I need. Now I need the behaviour like ctrl+left click in pycharm, when put the cursor on one function call or class, then pycharm will give the called things or called candidates when the called thing is not certain. I misunderstood your knowledge graph as a simple call/called graph. Since pycharm/vscode can do this thing, I think maybe there is an existing tool that can do this thing? I find some static analysis tool like Pylint, but it seems Pyling does not straightly support the function I need... If the pylint can do this thing, it can be enough for me, for me, I do not need a very very high accuracy. I do not want this small thing bother you for packaging your work all. And I'm not sure the type inference paper+code you mention is the function I mention...
Hello, I saw and read your paper "A Toolkit for Generating Code Knowledge Graphs" and think it is very nice and inspectful. And I try to run your code for extracting graph on my own code and experiment. Since your class.map corresponds to some libraries, I would like ask how I can get the class.map file of my own environment ?