Giter Site home page Giter Site logo

Comments (5)

ashwinprasadme avatar ashwinprasadme commented on May 24, 2024 2

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.

ashwinprasadme avatar ashwinprasadme commented on May 24, 2024

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.

vitsalis avatar vitsalis commented on May 24, 2024

How do you solve the above issue in the extension?

from pycg.

ashwinprasadme avatar ashwinprasadme commented on May 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.