Comments (5)
I propose making flow-sensitive analysis configurable and incorporating it accordingly. Initially, I can introduce incremental changes on my branch, and we can review each step along the way.
from pycg.
I have made flow-sensitivity improvements in my extension of PyCG for the HeaderGen project. I would like to incorporate these changes into the main PyCG implementation moving forward. However, I believe it would be beneficial to discuss the design decisions and make it even more robust. I'm open to having a discussion with @vitsalis and @gdrosos to explore these ideas further.
from pycg.
How do you solve the above issue in the extension?
from pycg.
I have incorporated Def-use chains generated by Beniget to reason about variable definitions and their uses.
call graph generated by HeaderGen looks like this:
{
"main": [
"main.func2:17"
],
"main.nested_func:1": [],
"main.nested_func2:5": [],
"main.param_func:9": [
"main.nested_func2:5"
],
"main.func:13": [],
"main.func2:17": [
"main.param_func:9"
]
}
The difference in the assignment graph looks like this for var_a
, var_b
, var_c
:
PyCG
"main.var_b": [
"main.var_c",
"main.func"
],
"main.var_c": [
"main.func2"
],
"main.var_a": [
"main.var_b"
]
HeaderGen
"main.var_b:21": [
"main.func:13"
],
"main.var_c:22": [
"main.func2:17"
],
"main.var_b:24": [
"main.var_c:22"
],
"main.var_a:25": [
"main.var_b:24"
]
from pycg.
Related Issues (20)
- `pycg` uses a lot of memory to create a Call Graph for specific packages HOT 1
- Can't add edge to a non existing node HOT 1
- Help interpreting the outputs HOT 1
- PermissionError : Permission denied HOT 1
- Macro-benchmark HOT 1
- Broken link HOT 1
- What tool have you used to generate the figures from JSON/FASTEN? HOT 1
- Can it be used to generate static backward slice? HOT 1
- what is the meaning of NEXT_MEHOD and ITER_METHOD? HOT 1
- list definition creation causes an infinite loop in the post processor HOT 1
- make test occur a error HOT 1
- PyCG fails when parsing files whose names are used in init file declarations HOT 1
- how to analyse cg of __init__.py HOT 2
- Possible to have option to exclude builtin functions? HOT 1
- Not being able to run PyCG from source due to circular import(?) HOT 2
- analysis does not follow explicit super()-calls HOT 2
- Add class def in addition to MRO HOT 1
- Relative/partial module path of class due to relative import HOT 8
- Does pycg work in colab? HOT 1
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 pycg.