# 领域分析

领域分析是指在某一领域内开发软件系统时所使用的信息被识别、捕获并组织起来的过程，其目的是使这些信息在构建新产品时能够被复用。<sup>[1](http://gorschek.com/wp-content/uploads/2019/11/final_paper.pdf)</sup> 它跨越多个相似系统对问题领域进行分析，以识别共性与可变特征，<sup>[2](https://www.sei.cmu.edu/history-of-innovation/establishing-a-basis-for-software-reuse/)</sup> 并产出领域产品，用以表示某一领域中应用的共同功能与架构，在功能层面和架构层面支持复用。<sup>[3](https://people.computing.clemson.edu/~johnmc/courses/cpsc371/ADA235785.pdf)</sup> 其中最著名的表述是面向特征的领域分析（FODA）。<sup>[3](https://people.computing.clemson.edu/~johnmc/courses/cpsc371/ADA235785.pdf)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义 | 识别、捕获并组织某一领域中的信息，使其可被复用来为新产品的创建提供资产<sup>[1](http://gorschek.com/wp-content/uploads/2019/11/final_paper.pdf)</sup> |
| 经典方法 | FODA（Kang、Cohen、Hess、Novak 与 Peterson，SEI，1990年11月），包含三个阶段：语境分析、领域建模、架构建模<sup>[3](https://people.computing.clemson.edu/~johnmc/courses/cpsc371/ADA235785.pdf)</sup> |
| 核心机制 | 通过聚合与泛化捕获共性；通过带参数化的精化捕获差异<sup>[3](https://people.computing.clemson.edu/~johnmc/courses/cpsc371/ADA235785.pdf)</sup> |
| 主要制品 | 特征模型、实体-关系模型、功能模型、领域词典<sup>[4](https://www.sei.cmu.edu/library/file_redirect/1992_005_001_15974.pdf)</sup> |
| 特征类型 | 强制特征、可选特征与备选特征，并具有“互斥”与“依赖”关系<sup>[5](https://publica.fraunhofer.de/bitstreams/33b971d2-f6b5-4f37-9d24-60a25aa8af63/download)</sup> |
| 经济盈亏平衡 | 若复用成本为开发成本的20%，而为复用编写代码的成本为正常成本的1.5倍，则产品线在约1.88个产品时达到盈亏平衡<sup>[6](http://jeffreypoulin.info/Papers/IJAST97/ijast97.html)</sup> |
| 证据质量 | 领域分析解决方案的行业应用主张中，约80%为无支撑的陈述<sup>[1](http://gorschek.com/wp-content/uploads/2019/11/final_paper.pdf)</sup> |

## 运作方式

其机制是共性与可变性分析。FODA 运用聚合与泛化原语，将领域中各应用的共性作为抽象捕获下来，而应用之间的差异则在精化中捕获；领域产品并非最终产品，而是通过应用来扩展和演化的。<sup>[3](https://people.computing.clemson.edu/~johnmc/courses/cpsc371/ADA235785.pdf)</sup> 该方法强调识别用户通常期望领域中应用具备的特征，并依据能力、运行环境、领域技术与实现技术等方面的共性与差异，对领域产品进行参数化。<sup>[3](https://people.computing.clemson.edu/~johnmc/courses/cpsc371/ADA235785.pdf)</sup>

Arango 与 Prieto-Díaz 给出了领域存在的先决条件：领域中各对象之间存在全面的关系；存在一个对其问题的解决方案感兴趣的群体；人们认识到软件解决方案是合适的；以及存在一个用于解决这些问题的知识库。<sup>[7](https://sites.cc.gatech.edu/reverse/repository/annals.pdf)</sup>

其典型制品是特征模型、实体-关系模型、功能模型与领域词典。在 SEI 的陆军运输控制研究中，特征模型是最终用户与开发者之间的主要沟通手段，而领域词典则被认为是最有用的产品之一，因为它缓解了沟通不畅的问题。<sup>[4](https://www.sei.cmu.edu/library/file_redirect/1992_005_001_15974.pdf)</sup> FODA 特征图是树形结构，其根表示一个基本概念，叶表示单个特征；圆圈表示可选特征，双线表示备选特征，且 FODA 并未规定具体的记法。<sup>[5](https://publica.fraunhofer.de/bitstreams/33b971d2-f6b5-4f37-9d24-60a25aa8af63/download)</sup>

## 实施方法

FODA 规定了三个阶段：语境分析，即界定领域的范围或边界；领域建模，即描述领域内由软件所处理的问题；以及架构建模，即创建实现解决方案的软件架构。<sup>[3](https://people.computing.clemson.edu/~johnmc/courses/cpsc371/ADA235785.pdf)</sup> 在运输控制应用中，领域建模包括实体-关系建模、特征分析与功能分析。<sup>[4](https://www.sei.cmu.edu/library/file_redirect/1992_005_001_15974.pdf)</sup> 借助特征模型，设计者设计出一种支持共性特征的通用架构，并针对可选特征与备选特征进行参数化。<sup>[4](https://www.sei.cmu.edu/library/file_redirect/1992_005_001_15974.pdf)</sup>

一种现代特征建模协议 FM-PRO 将工作组织为四个阶段：预建模、领域分析与范围界定、建模，以及维护与演化；其特征既通过自下而上的方式从产品文档中识别，也通过自上而下访谈专家的方式来识别。<sup>[8](https://se.rub.de/wp-content/uploads/2024/11/FMPro-v2.pdf)</sup> 一种形式化方法的替代方案将领域分析定义为对领域描述单元的研究，以发现不一致、不期望的不完整以及合适的抽象，并认为恰当的分析需要可形式化的描述单元。<sup>[9](http://www.imm.dtu.dk/~dibj/2007/lipari/lipari-paper.pdf)</sup>

## 起源

James M. Neighbors 于1984年在《IEEE Transactions on Software Engineering》上描述了从可复用组件构建软件的 Draco 方法；Draco 除了关注编程语言代码的复用外，还关注分析与设计信息的复用，并按问题领域或领域来组织可复用组件。<sup>[10](https://doi.org/10.1109/tse.1984.5010280)</sup> Neighbors 关于 Draco 的书章指出，当已有的 Draco 领域能够描述新系统的对象与操作时，分析者便拥有了新规约的框架，他称之为最强大的复用形式。<sup>[11](https://homepages.cwi.nl/~storm/teaching/reader/Neighbors89.pdf)</sup> FODA 报告本身列出了先前的工作，包括 Raytheon 公司 Lanergan 于1979年的工作，以及 Prieto-Diaz 的《Domain Analysis for Reusability》（1987年）。<sup>[3](https://people.computing.clemson.edu/~johnmc/courses/cpsc371/ADA235785.pdf)</sup>

关于谁创造了这一术语，已发表的记述各有不同：一部参考著作的章节称，Prieto-Diaz 为其分面分析-综合方法引入了该术语，该方法由 Ranganathan 的分面分类法发展而来；《领域分析：导论》发表于《ACM SIGSOFT Software Engineering Notes》。<sup>[12](https://www.inlibra.com/document/download/pdf/uuid/4a424b42-3520-3c7f-9355-3241ff086e17)</sup><sup> • </sup><sup>[13](https://dl.acm.org/doi/10.1145/122538.122544)</sup> FODA 可行性研究（Kang 及其同事，CMU/SEI-90-TR-21）于1990年11月发布，<sup>[14](https://doi.org/10.21236/ada235785)</sup> 在 SEI，它后来演变为产品线分析，将共性与可变性分析从特征扩展到质量属性。<sup>[2](https://www.sei.cmu.edu/history-of-innovation/establishing-a-basis-for-software-reuse/)</sup>

## 变体

现有大多数特征建模方法源自 FODA，而决策建模方法则源自 Synthesis 方法；主要区别在于，特征建模同时支持共性建模与可变性建模，而决策建模仅专注于可变性。<sup>[15](https://gsd.uwaterloo.ca/sites/default/files/vamos12-FM-DM.pdf)</sup> 面向特征的复用方法（FORM）发表于《IEEE Software》，侧重于以产品特征来建模产品线的共性与差异，并利用其结果来开发架构与组件；FORM 被描述为 FODA 过程的具体化，而 FeatuRSEB 则融合了 RSEB 与 FODA 方法，不过在这些方法中，特征与架构之间的联系仍然薄弱。<sup>[16](https://dl.acm.org/doi/10.1109/MS.2002.1020288)</sup><sup> • </sup><sup>[17](https://www.inf.uni-hamburg.de/en/inst/ab/swk/research/publications/pdf/2004-farm_node.pdf)</sup> DSSA 计划的领域分析产出两项工作产品，即领域定义与领域规约，其目标是确定范围与经济可行性，并建立领域知识库。<sup>[18](https://www.domain-specific.com/RSPgb/LV_danal.htm)</sup>

## 应用

有文献记载的应用包括陆军运输控制领域。<sup>[4](https://www.sei.cmu.edu/library/file_redirect/1992_005_001_15974.pdf)</sup>

在经济学方面，Poulin 的模型使用复用相对成本（RCR）与为复用编写代码的相对成本（RCWR）；当 RCR = 0.2、RCWR = 1.5 时，盈亏平衡点为 \( n_{0} = 1.88 \) 个产品，因此拥有一个以上相关应用的产品线会产生正回报。<sup>[6](http://jeffreypoulin.info/Papers/IJAST97/ijast97.html)</sup> 未能为复用做出规划会将复用水平限制在应用的最多20%，而领域与产品线研究则揭示，同一领域内各应用之间的公共代码可高达约85%。<sup>[6](http://jeffreypoulin.info/Papers/IJAST97/ijast97.html)</sup>

一项对1994—2005年行业研究的系统综述发现了十一项观察性研究；在五项研究中，系统性软件复用与更低的问题（缺陷）密度显著相关，在三项研究中则与更少的纠正工作量相关。<sup>[19](https://dl.acm.org/doi/10.1007/s10664-007-9040-x)</sup> 后来一项对30项行业研究的综述发现，质量改善与生产力提升各自在30项研究中的20项中得到考察，其中软件产品线是最常用的复用方法，占所报告方法的47%。<sup>[20](https://www.sciencedirect.com/science/article/pii/S0950584924000569)</sup> 这些数字针对的是一般的复用与产品线；文献中基本上没有可归因于领域分析本身的定量结果。<sup>[1](http://gorschek.com/wp-content/uploads/2019/11/final_paper.pdf)</sup>

## 局限与替代方案

如果领域分析开展不当，最终形成的产品线范围要么过宽、要么过窄，那么复用、降低成本与提高质量的主要收益便无法实现。<sup>[1](http://gorschek.com/wp-content/uploads/2019/11/final_paper.pdf)</sup> DSSA 指南明确指出了前期成本风险：如果预计某一领域分析增量的成本将超出预算，则缓解措施是缩小当前范围，或寻求更改领域目标，或增加预算。<sup>[18](https://www.domain-specific.com/RSPgb/LV_danal.htm)</sup> 一项对截至2007年所提出的领域分析解决方案的系统综述发现，由于缺乏定性与定量的实证验证，很难评估其对行业采用的可用性与有用性，且约80%的行业应用主张只是没有支持证据的陈述。<sup>[1](http://gorschek.com/wp-content/uploads/2019/11/final_paper.pdf)</sup> FODA 在过程族工程方面的主要局限在于，它只涉及领域工程中的领域分析与建模任务，而不涉及应用工程或可变性实例化。<sup>[5](https://publica.fraunhofer.de/bitstreams/33b971d2-f6b5-4f37-9d24-60a25aa8af63/download)</sup> 图书馆与信息科学中的领域分析被认为不同于软件工程中的领域驱动设计。<sup>[12](https://www.inlibra.com/document/download/pdf/uuid/4a424b42-3520-3c7f-9355-3241ff086e17)</sup>

## References

1. [A systematic review of domain analysis solutions in software product lines (presented until 2007)](http://gorschek.com/wp-content/uploads/2019/11/final_paper.pdf)
2. [Establishing a Basis for Software Reuse (SEI)](https://www.sei.cmu.edu/history-of-innovation/establishing-a-basis-for-software-reuse/)
3. [Feature-Oriented Domain Analysis (FODA) Feasibility Study (Kang et al., CMU/SEI-90-TR-21, DTIC copy ADA235785)](https://people.computing.clemson.edu/~johnmc/courses/cpsc371/ADA235785.pdf)
4. [Domain Analysis: Movement Control Domain (SEI report applying FODA)](https://www.sei.cmu.edu/library/file_redirect/1992_005_001_15974.pdf)
5. [Product Line Engineering for Process Families (Fraunhofer IESE, description of the FODA method)](https://publica.fraunhofer.de/bitstreams/33b971d2-f6b5-4f37-9d24-60a25aa8af63/download)
6. [The Economics of Product Line Development (Poulin)](http://jeffreypoulin.info/Papers/IJAST97/ijast97.html)
7. [Domain-based program understanding (Frakes/colleagues context paper)](https://sites.cc.gatech.edu/reverse/repository/annals.pdf)
8. [FM-PRO Feature Modeling Process, Technical Documentation](https://se.rub.de/wp-content/uploads/2024/11/FMPro-v2.pdf)
9. [Domain Engineering lecture notes (Lipari paper, Bjørner)](http://www.imm.dtu.dk/~dibj/2007/lipari/lipari-paper.pdf)
10. [James M. Neighbors (1984). The Draco Approach to Constructing Software from Reusable Components. IEEE Transactions on Software Engineering.](https://doi.org/10.1109/tse.1984.5010280)
11. [Draco: A Method for Engineering Reusable Software Systems (Neighbors book chapter)](https://homepages.cwi.nl/~storm/teaching/reader/Neighbors89.pdf)
12. [Domain analysis in knowledge organization (Hjørland)](https://www.inlibra.com/document/download/pdf/uuid/4a424b42-3520-3c7f-9355-3241ff086e17)
13. [Coming to terms with software reuse terminology: a model-based approach](https://dl.acm.org/doi/10.1145/122538.122544)
14. [Kyo C. Kang and colleagues (1990). Feature-Oriented Domain Analysis (FODA) Feasibility Study. .](https://doi.org/10.21236/ada235785)
15. [Cool Features and Tough Decisions: A Comparison of Variability Modeling Approaches (Czarnecki et al., VaMoS 2012)](https://gsd.uwaterloo.ca/sites/default/files/vamos12-FM-DM.pdf)
16. [Feature-Oriented Project Line Engineering (Kang, Lee, Donohoe), IEEE Software 2002](https://dl.acm.org/doi/10.1109/MS.2002.1020288)
17. [FArM: feature-architecture mapping paper (Riebisch et al.)](https://www.inf.uni-hamburg.de/en/inst/ab/swk/research/publications/pdf/2004-farm_node.pdf)
18. [Domain-Specific Software Architecture (DSSA) program: Domain Analysis activity guide (DE.2)](https://www.domain-specific.com/RSPgb/LV_danal.htm)
19. [Quality, productivity and economic benefits of software reuse: a review of industrial studies (Empirical Software Engineering, Vol 12, No 5)](https://dl.acm.org/doi/10.1007/s10664-007-9040-x)
20. [Understanding and evaluating software reuse costs and benefits from industrial cases, A systematic literature review](https://www.sciencedirect.com/science/article/pii/S0950584924000569)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Software engineering and development process › Development methodologies and project management

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/domain-analysis

English original: https://www.edgepedia.org/domain-analysis
