codefuse-ai / CodeFuse-Query

Query-Based Code Analysis Engine
Apache License 2.0
200 stars 22 forks source link

有方法到入口的调用链路的查询范例么? #39

Closed fangyuanrui closed 6 months ago

fangyuanrui commented 8 months ago

有方法到入口的调用链路的查询范例么? 看了解析的数据结构有点懵

fangyuanrui commented 8 months ago

还有控制流程图的获取范例有吗

zhouang777 commented 6 months ago

有的,我们整理下示例。

ValKmjolnir commented 6 months ago

调用链路可以参考这个脚本 CallChain.gdl

pub fn specified_callable_signature(name: string) -> bool {
    // give specified callables' signatures here
    [
        {"com.alipay.demo.Main.test:void()"},
        {"xxx"},
        {"xxx"}
    ]
}

在上面这个方法里填上你需要搜索的接口签名,这个地方我给了一个样例签名。

zhouang777 commented 6 months ago

CFG 问题在另一个issue中追踪 https://github.com/codefuse-ai/CodeFuse-Query/issues/48