Skip to main navigation Skip to search Skip to main content

Achieving High-Level Software Component Summarization via Hierarchical Chain-of-Thought Prompting and Static Code Analysis

Research output: Chapter in Book/Report/Conference proceedingConference contributionAcademicpeer-review

247 Downloads (Pure)

Abstract

Comprehension of software systems is key to their successful maintenance and evolution. This comprehension comes at different levels of abstraction: At the low level, one must focus on comprehending functions; while at the high level, one must abstract and comprehend the system's requirements. Diverse Automated Source Code Summarization (ASCS) techniques have been proposed to comprehend systems at the lower level. However, techniques for abstracting higher-level explanations fall short. Research on related fields, such as software architecture recovery, has tried to address system comprehension at the higher level by attempting to detect abstractions of design decisions from source code. Nevertheless, this is an on-going effort and many steps in the process are still unsolved. In this paper, we lever-age the emergent abilities of Large Language Models (LLMs) together with the achievements in the ASCS and static code analysis fields to design an approach that produces component-level summaries of software systems. Particularly, we address the unreliability of LLMs in performing reasoning by applying a chain-of-thought prompting strategy, which allows us to emulate inductive reasoning. We follow a bottom-up approach, where we start by comprehending lower-level software abstractions (e.g., functions), and then we compose these findings-in a cascading style-to comprehend higher-level ones (e.g., classes, components). We demonstrate the feasibility of our approach by applying it to the open-source Java project JHotDraw version 5.1. We believe our approach offers a stepping stone in developing robust automated software summarization approaches that can be applied generally across domains and types of software system.
Original languageEnglish
Title of host publication2023 IEEE International Conference on Data and Software Engineering, ICoDSE 2023
PublisherInstitute of Electrical and Electronics Engineers
Pages7-12
Number of pages6
ISBN (Electronic)979-8-3503-8138-2
DOIs
Publication statusPublished - 27 Oct 2023
Event2023 IEEE International Conference on Data and Software Engineering, ICoDSE 2023 - Toba, Indonesia
Duration: 7 Sept 20238 Sept 2023

Conference

Conference2023 IEEE International Conference on Data and Software Engineering, ICoDSE 2023
Abbreviated titleICoDSE 2023
Country/TerritoryIndonesia
CityToba
Period7/09/238/09/23

Keywords

  • automated source code summarization
  • chain-of-thought prompting
  • comprehension of software systems
  • large language models
  • static analysis

Fingerprint

Dive into the research topics of 'Achieving High-Level Software Component Summarization via Hierarchical Chain-of-Thought Prompting and Static Code Analysis'. Together they form a unique fingerprint.

Cite this