An Empirical Study of Large Language Models for Type and Call Graph Analysis in Python and JavaScript
Ashwin Prasad Shivarpatna Venkatesh, Rose Sunil, Samkutty Sabu, Amir M. Mir, Sofia Reis, Eric Bodden

TL;DR
This study empirically evaluates large language models for static analysis in Python and JavaScript, revealing their strengths in type inference but limitations in call-graph generation compared to traditional tools.
Contribution
It introduces new benchmarking suites and demonstrates the contrasting performance of LLMs in type inference and call-graph analysis tasks.
Findings
LLMs outperform traditional tools in Python type inference.
Traditional static analysis tools outperform LLMs in call-graph generation.
LLMs still struggle with completeness and soundness in call-graph analysis.
Abstract
Large Language Models (LLMs) are increasingly being explored for their potential in software engineering, particularly in static analysis tasks. In this study, we investigate the potential of current LLMs to enhance call-graph analysis and type inference for Python and JavaScript programs. We empirically evaluated 24 LLMs, including OpenAI's GPT series and open-source models like LLaMA and Mistral, using existing and newly developed benchmarks. Specifically, we enhanced TypeEvalPy, a micro-benchmarking framework for type inference in Python, with auto-generation capabilities, expanding its scope from 860 to 77,268 type annotations for Python. Additionally, we introduced SWARM-CG and SWARM-JS, comprehensive benchmarking suites for evaluating call-graph construction tools across multiple programming languages. Our findings reveal a contrasting performance of LLMs in static analysis…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsWeb Data Mining and Analysis · Topic Modeling · Natural Language Processing Techniques
