一句话:提出以城市隐喻构建扩展现实可视化,按类原型生成建筑,辅助程序理解与源码操作。
理解大型代码库要求开发者在多个抽象层次上构建心智模型。软件可视化可将抽象程序结构转化为可感知形式,而城市等熟悉隐喻能缩小程序构造与心智模型间的差距。本文研究如何整合语言无关的表达性隐喻、直接操作与扩展现实,构建沉浸式、可探索的虚拟城市环境,帮助开发者探索、理解和重构复杂软件系统。作者扩展城市隐喻,将类和包表示为建筑和街区,用建筑细节编码结构与行为属性;并基于度量、类内与类间关系启发式划分类原型,为工具类、数据类、常量定义类和适配器类分别设计工厂、仓库、档案馆和周边结构。目标是形成统一、交互式、沉浸式的程序理解视觉语言。
Comprehending a codebase requires developers to construct mental models spanning multiple levels of abstraction, from architectural overviews to individual components. These components differ across paradigms (e.g., classes in object-oriented systems, functions in functional programming). Software visualization supports this process by translating abstract software structures into perceptually meaningful forms that align with human cognitive processes. When grounded in familiar metaphors, such as cities or landscapes, visualization can further narrow the gap between abstract program constructs and developers’ mental models. How can language-agnostic expressive metaphors, direct manipulation, and extended-reality be integrated to create immersive, explorable virtual-city environments that help developers explore, understand, and refactor complex, large software systems? Our research advances this idea by extending the city metaphor to represent classes and packages as buildings and districts, where architectural details encode structural and behavioral properties. We classify classes into Class Archetypes using heuristics based on metrics, intra-class, and inter-class relationships. We then develop a specific building for each archetype: Utility classes become factories, data classes become depots, constant definers become archives, and adapter classes appear as surrounding structures. Building on this foundation, we aim to develop a unified, interactive, and immersive visual language for program comprehension.