antgroup / antgroup/YASA-Engine
Bug Report: Call graph construction incomplete - missing intra-file function call edges
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 323
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
问题描述
YASA 不同版本的调用图构建存在不同部分缺失的问题:
- 0.2.33 (新版本): 调用链的前半部分完整,后半部分缺失
- 0.2.1 (老版本): 调用链的前半部分缺失,后半部分完整
两个版本合并后才能得到完整的调用链。
环境信息
- YASA 版本: 0.2.33 (最新) 和 0.2.1 (老版本)
- 分析语言: Python
- 目标项目: https://github.com/psf/requests
复现步骤
./yasa-engine-linux-x64 --dumpAllCG --sourcePath requests/src --analyzer PythonAnalyzer --uastSDKPath ./uast4py-linux-amd64 --report ./report
版本对比结果
| 版本 | get → request 边 |
request → Session.request 边 |
urllib3.util.parse_url 边 |
说明 |
|---|---|---|---|---|
| 0.2.33 | ✅ 存在 | ✅ 存在 | ❌ 缺失 | 前半部分完整 |
| 0.2.1 | ❌ 缺失 | ❌ 缺失 | ✅ 存在 | 后半部分完整 |
详细分析
0.2.33 (新版本) callgraph.json
节点数: 674
边数: 757
✅ 前半部分完整:
get(api.py) → request(api.py) ← 存在!
request(api.py) → Session.request ← 存在!
Session.request → Session.prepare_request ← 存在!
...
❌ 后半部分缺失:
→ urllib3.util.parse_url ← 不存在!
0.2.1 (老版本) callgraph1.json
节点数: 1889
边数: 2125
❌ 前半部分缺失:
get(api.py) → request(api.py) ← 不存在!
✅ 后半部分完整:
... → PreparedRequest.prepare_url → urllib3.util.parse_url ← 存在!
合并后 (callgraph_merged.json)
节点数: 1921
边数: 2772
✅ 完整调用链 (合并两个版本后):
get(api.py) → request(api.py) ← 来自新版本
→ Session.request ← 新版本
→ Session.prepare_request ← 老版本
→ PreparedRequest.prepare ← 老版本
→ PreparedRequest.prepare_url ← 老版本
→ urllib3.util.parse_url ← 老版本
预期行为
最新版本应该能构建完整的调用链:
requests.get(api.py)
→ request(api.py)
→ Session.request(sessions.py)
→ Session.prepare_request(sessions.py)
→ PreparedRequest.prepare(models.py)
→ PreparedRequest.prepare_url(models.py)
→ urllib3.util.parse_url
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the reported yasa-engine-linux-x64 command with requests/src and PythonAnalyzer, then compare the generated callgraph.json with the older callgraph1.json. Trace how PythonAnalyzer represents the listed intra-file and cross-module calls, especially the path from requests.get to urllib3.util.parse_url. Done means the current version produces the complete chain without merging outputs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100