Back to search

Nanyang Technological University

Architecture-driven software comprehension across source code and binaries

Abstract

dc:description.abstract

Program comprehension is a fundamental challenge in software engineering that underlies effective software development, maintenance, evolution, and security analysis. Developers and analysts need to understand software systems at multiple levels of abstraction, from individual functions to high-level architectural structures, to perform tasks such as debugging, feature implementation, system maintenance, and vulnerability assessment. However, as software systems continuously grow in size and complexity, understanding them manually becomes increasingly difficult, time-consuming, and error-prone. To address this concern, researchers have spent considerable efforts in multiple directions. One major direction is understanding the high-level module structure of software systems through Software Architecture Recovery (SAR). SAR techniques automatically extract architectural information from software implementations to facilitate the understanding of large software systems. However, existing approaches suffer from several limitations that restrict their effectiveness for program comprehension. First, the accuracy of the recovered modules is limited. Second, they provide only a modular view of the system, without the semantic understanding of these modules. Another major direction focuses on automated code summarization techniques. These techniques aim to automatically generate summaries from code implementations to facilitate understanding. However, existing works primarily focus on function-level code summarization, making it difficult to support the high-level understanding of a repository. Beyond systems with available source code, binary understanding suffers from similar limitations. The growing size of binaries requires high-level understanding, but existing work only focuses on the function level, leaving analysts to examine thousands of functions individually without structural context. To address these concerns, this thesis proposes a comprehensive approach that integrates structural recovery with semantic understanding using Large Language Models (LLMs) to enhance program comprehension across different software representations. We present four contributions that progressively build from basic structural recovery to comprehensive semantic-enhanced understanding, extending from source code analysis to challenging binary analysis scenarios. First, we propose SARIF, an information-fusion-based architecture recovery technique that addresses the limitations of existing structural approaches. SARIF combines three types of comprehensive information including dependencies, code text, and folder structure, applying fine-grained analysis and adaptive fusion based on information quality and relevance. Through evaluation on nine software systems with ground truth architectures, SARIF achieves 36.1% higher accuracy than the best existing techniques on average, demonstrating the effectiveness of comprehensive information fusion for structural understanding. Second, we conduct the first systematic study on LLM-based higher-level code summarization to enable semantic understanding of software modules. While existing automatic code summarization research primarily focuses on method-level units, we investigate summarization of file-level and module-level code units that are crucial for architectural comprehension. We explore three summarization strategies and establish that full code summarization works best for file-level units while hierarchical summarization is most effective for module-level units. Additionally, we demonstrate that LLMs can effectively serve as evaluators for higher-level code summary quality, providing foundations for automated assessment in this domain. Third, we propose SemRef, a semantic-enhanced refinement framework that addresses a fundamental limitation of existing Software Architecture Recovery: recovered modules provide only structural groupings without semantic understanding, leaving developers unable to comprehend what these modules actually represent or verify their correctness. SemRef tackles this challenge by integrating dependency analysis with LLM-based semantic verification to automatically refine architecture recovery results. Through evaluation using ten state-of-the-art SAR tools across nine projects, SemRef improves accuracy by 17.72% to 43.35% across different metrics as measured by normalized gain. Beyond accuracy improvements, SemRef provides structured module hierarchies and hierarchical module summaries that significantly enhance the comprehensibility of recovered architectures. Fourth, we extend these comprehensive program comprehension capabilities to binary analysis through BinStruct, which addresses the challenging domain where source-level information is unavailable. BinStruct recovers both file and module structures from stripped binary programs by combining static analysis techniques with LLM-based semantic understanding. The framework first identifies file structures using data reference patterns and function calls, then recovers module structures through consensus-based clustering of structural dependencies and semantic similarities. Evaluation on 121 real-world stripped binaries demonstrates that BinStruct outperforms existing binary recovery tools in both file and module recovery accuracy, while case studies on malware analysis and attack surface detection show practical value in security applications. Through systematic evaluation across different domains and software representations, we demonstrate that integrating structural analysis with semantic understanding significantly enhances program comprehension capabilities. The four contributions form a coherent progression from basic structural recovery to comprehensive semantic-enhanced understanding, culminating in applications to challenging binary analysis scenarios. The techniques developed in this thesis aim to provide practical solutions for software maintenance and security analysis.

Degree

thesis:*
College dc:contributor.school
College of Computing and Data Science
Grantor dc:publisher
Nanyang Technological University
Year dc:date.issued
2025

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Zhang, Yiran
Advisor dc:contributor.supervisor
  • Liu Yang

Subjects

dc:subject × 1

Rights

dc:rights
Statement dc:rights
  • This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).
Language dc:language.iso
en

Identifiers

dc:identifier.*

Chain of custody

source
Harvested from
Nanyang Technological University
Base URL
dr.ntu.edu.sg/oai/request
Last updated
2026-11-27
Source record
OAI-PMH GetRecord
citation

Zhang, Yiran. Architecture-driven software comprehension across source code and binaries. Nanyang Technological University, 2025. https://doi.org/10.32657/10356/210592