Type annotations improve the maintainability and reliability of Python programs, but many real-world projects remain under-annotated because manual annotation is time-consuming and error-prone. Recent neural and LLM-based type inference systems can recover missing annotations, yet they often trade accuracy for efficiency. Existing approaches often fail to exploit project-wide type evidence, or do so inefficiently through unnecessary model calls and noisy prompts. We present SALT, an LLM-based type inference system guided by static analysis. SALT integrates static analysis with LLM inference to resolve types statically, prioritize LLM queries, and construct concise type-aware context. To demonstrate the effectiveness of SALT, we evaluated it on 12 real-world Python projects. SALT achieves the best accuracy among the evaluated systems and reduces estimated LLM cost by up to 78.5% compared with a strong coding-assistant baseline. It also shows similar cost savings with the frontier model GPT-5.5, demonstrating that SALT remains effective with strong LLMs.


翻译:暂无翻译

0
下载
关闭预览

相关内容

【干货书】Python3编程高级指南,494页pdf
专知会员服务
92+阅读 · 2022年5月18日
【干货书】数值Python计算,Numerical Python,709页pdf
专知会员服务
116+阅读 · 2021年5月30日
专知会员服务
92+阅读 · 2021年4月12日
【2020新书】Python专业实践,250页pdf,Practices of the Python Pro
Python计算导论,560页pdf,Introduction to Computing Using Python
专知会员服务
77+阅读 · 2020年5月5日
简明扼要!Python教程手册,206页pdf
专知会员服务
49+阅读 · 2020年3月24日
【新书】Python编程基础,669页pdf
专知会员服务
199+阅读 · 2019年10月10日
利用动态深度学习预测金融时间序列基于Python
量化投资与机器学习
18+阅读 · 2018年10月30日
荐书丨Python数据分析从入门到精通
程序人生
19+阅读 · 2018年3月31日
这几本Python新书特别赞
图灵教育
21+阅读 · 2018年3月1日
Python 书单:从入门到……
Linux中国
41+阅读 · 2017年8月6日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
《美空军2026条令文件:对海压制作战》
专知会员服务
22+阅读 · 11月9日
人工智能与战争的未来
专知会员服务
9+阅读 · 11月8日
《Agent Mosaic:识别智能体LLM系统中的机密泄露》
专知会员服务
10+阅读 · 11月8日
人工智能在军事教育中的应用:若干视角与经验
专知会员服务
11+阅读 · 11月6日
“星链”减速与不断适应的乌克兰
专知会员服务
9+阅读 · 11月6日
美国中期选举之后:帕兰提尔面临不确定性?
专知会员服务
6+阅读 · 11月6日
相关VIP内容
【干货书】Python3编程高级指南,494页pdf
专知会员服务
92+阅读 · 2022年5月18日
【干货书】数值Python计算,Numerical Python,709页pdf
专知会员服务
116+阅读 · 2021年5月30日
专知会员服务
92+阅读 · 2021年4月12日
【2020新书】Python专业实践,250页pdf,Practices of the Python Pro
Python计算导论,560页pdf,Introduction to Computing Using Python
专知会员服务
77+阅读 · 2020年5月5日
简明扼要!Python教程手册,206页pdf
专知会员服务
49+阅读 · 2020年3月24日
【新书】Python编程基础,669页pdf
专知会员服务
199+阅读 · 2019年10月10日
相关基金
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员