# 偏序归约

偏序归约（POR）是一种模型检验技术，它利用并发迁移之间的独立性，缩减显式状态验证器必须探索的状态空间，使并发与分布式系统能够针对时序逻辑性质进行验证，而无需枚举每一种交错。在交错语义下，并发系统的状态空间等于其各线程状态数的乘积，这是状态爆炸问题的主要驱动因素；POR将仅在独立动作顺序上不同的运行分组，并为每组只探索一个代表运行。<sup>[1](https://moves.rwth-aachen.de/wp-content/uploads/WS1920/MC/mc2019_handout_lec17.pdf)</sup><sup> • </sup><sup>[2](https://www.cs.cmu.edu/~emc/15-820A/reading/partial-order.pdf)</sup>

| 关键事实 | 细节 |
|---|---|
| 所解决的问题 | 交错语义使状态空间等于各线程状态数的乘积<sup>[1](https://moves.rwth-aachen.de/wp-content/uploads/WS1920/MC/mc2019_handout_lec17.pdf)</sup> |
| 被归约的对象 | 所探索的图对每条马祖尔凯维奇迹至少保留一个交错；最优POR恰好保留一个<sup>[3](https://www.lix.polytechnique.fr/~cenea/papers/vmcai23.pdf)</sup> |
| 独立性 | 若两个迁移在对方执行后仍保持使能，且两种执行顺序到达同一状态，则二者独立<sup>[2](https://www.cs.cmu.edu/~emc/15-820A/reading/partial-order.pdf)</sup> |
| 保证 | 满足充足集条件的归约图与完整图停顿迹等价，从而保持不含next算子的LTL<sup>[1](https://moves.rwth-aachen.de/wp-content/uploads/WS1920/MC/mc2019_handout_lec17.pdf)</sup> |
| 实际归约效果 | 取决于进程耦合程度；与状态空间缓存结合后，大型协议模型的内存需求下降超过100倍<sup>[4](https://spinroot.com/spin/Workshops/ws95/godefroid.pdf)</sup> |
| 主要变体 | 顽固集、睡眠集、持久集、充足集、源集<sup>[5](https://users.soe.ucsc.edu/%7Ecormac/papers/popl05.pdf)</sup> |
| 现代最优方法 | TruSt以线性内存对每个等价类恰好探索一个交错<sup>[6](https://pure.mpg.de/rest/items/item_3362445_2/component/file_3362446/content)</sup> |

## 工作原理

形式基础是迁移上的独立性关系。若两个迁移α和β满足使能性（若二者均使能，则其中一个执行后另一个仍使能）和交换性（以任一顺序执行它们都到达同一状态），则它们在某个状态上独立。<sup>[2](https://www.cs.cmu.edu/~emc/15-820A/reading/partial-order.pdf)</sup> 仅在交换相邻独立动作上不同的动作序列彼此等价；这些等价类就是马祖尔凯维奇迹，POR对每条迹至少探索一个交错。<sup>[7](https://orbi.uliege.be/bitstream/2268/163844/1/GW93-final%20draft.pdf)</sup><sup> • </sup><sup>[3](https://www.lix.polytechnique.fr/~cenea/papers/vmcai23.pdf)</sup> 一条迹的等价类中的所有序列都导致相同的死锁，因此一个代表就能检测出全部死锁。<sup>[7](https://orbi.uliege.be/bitstream/2268/163844/1/GW93-final%20draft.pdf)</sup>

正确性论证是停顿等价（当插入或删除不可见步骤时路径不可区分）。在不含next-time算子的时序逻辑（LTL\X、CTL\X）中可表达的性质无法区分停顿等价路径。<sup>[8](https://users.ece.utexas.edu/~garg/dist/ASE05.pdf)</sup> 对于一个有限、动作确定且无终止状态的迁移系统，若每个充足集都满足归约条件，则归约系统与原系统停顿迹等价，因此归约系统满足的任何LTL\X公式在完整系统中也成立。<sup>[1](https://moves.rwth-aachen.de/wp-content/uploads/WS1920/MC/mc2019_handout_lec17.pdf)</sup>

## 实现方式

归约修改深度优先搜索，直接构造归约图，在每个状态选择使能迁移的子集ample(s)；先构造完整图会违背初衷。<sup>[9](https://www.cs.cmu.edu/~emc/15817-f08/lectures/partialorder.pdf)</sup> 该选择必须满足条件 \( C_{0} \) 至 \( C_{3} \)（等价地 \( A_{1} \) 至 \( A_{4} \)）：当状态未被完全展开时非空；依赖条件，即任何依赖于ample(s)的迁移都不能在ample(s)中的迁移之前执行；停顿或不可见条件，即每个被选迁移都不可见，意即它不改变性质所观察的命题变量；以及闭合环条件，即沿归约图中某个环使能的迁移必须在该环的某个状态中被选中，否则它会被永远推迟，活性检查就会失效。<sup>[2](https://www.cs.cmu.edu/~emc/15-820A/reading/partial-order.pdf)</sup><sup> • </sup><sup>[9](https://www.cs.cmu.edu/~emc/15817-f08/lectures/partialorder.pdf)</sup><sup> • </sup><sup>[1](https://moves.rwth-aachen.de/wp-content/uploads/WS1920/MC/mc2019_handout_lec17.pdf)</sup>

一种实用启发式将ample(s)计算为单个进程的使能迁移，通过依赖关系和程序计数器检查依赖条件，并在可能违反时丢弃候选。<sup>[9](https://www.cs.cmu.edu/~emc/15817-f08/lectures/partialorder.pdf)</sup> 保持分支时序逻辑需要额外条件 \( C_{4} \)，即充足集包含单个确定性迁移，这要严格得多。<sup>[10](https://webperso.info.ucl.ac.be/~pecheur/publi/FWD_ImProviso.pdf)</sup>

## 起源

语义基础是安东尼·W·马祖尔凯维奇（Antoni W. Mazurkiewicz）的迹理论（1986），其动作序列等价类构成所有POR变体的基础。<sup>[7](https://orbi.uliege.be/bitstream/2268/163844/1/GW93-final%20draft.pdf)</sup> 帕特里斯·戈德弗鲁瓦（Patrice Godefroid）在1991年DIMACS论文中报告了一种验证方法，用马祖尔凯维奇迹而非交错来描述系统行为，并用“迹自动机”对每个偏序只生成一个线性化<sup>[11](https://doi.org/10.1090/dimacs/003/21)</sup>；同一方法出现在CAV 1990会议录中。<sup>[12](https://link.springer.com/chapter/10.1007/BFb0023731)</sup> 安蒂·瓦尔马里（Antti Valmari）的顽固集方法出现在其1991年论文《对状态爆炸的顽固攻击》中，收入DIMACS系列。<sup>[13](https://doi.org/10.1090/dimacs/003/04)</sup> 帕特里斯·戈德弗鲁瓦与皮埃尔·沃尔珀（Pierre Wolper）的睡眠集论文随后发表于1993年《系统设计中的形式化方法》<sup>[14](https://doi.org/10.1007/bf01383879)</sup>，作者称其简化接近于将瓦尔马里的顽固集方法改造用于Petri网死锁检测。<sup>[7](https://orbi.uliege.be/bitstream/2268/163844/1/GW93-final%20draft.pdf)</sup> 面向软件的动态偏序归约由科马克·弗拉纳根（Cormac Flanagan）与戈德弗鲁瓦于2005年在ACM SIGPLAN Notices上报告<sup>[15](https://doi.org/10.1145/1047659.1040315)</sup>，首个可证明最优的DPOR算法由帕罗什·阿卜杜拉（Parosh Abdulla）及其同事于2014年提出，也发表于ACM SIGPLAN Notices。<sup>[16](https://doi.org/10.1145/2578855.2535845)</sup>

## 变体

两种核心技术是持久集/顽固集，它们为每个状态计算可证明充分的使能迁移子集，以及睡眠集，它们利用当前使能迁移之间的依赖关系加上搜索历史；二者互补，可同时使用。<sup>[5](https://users.soe.ucsc.edu/%7Ecormac/papers/popl05.pdf)</sup> 睡眠集是第一种保证每个等价类执行一次的技术，但单独使用时只能剪枝迁移，不能消除状态。<sup>[3](https://www.lix.polytechnique.fr/~cenea/papers/vmcai23.pdf)</sup> 持久集为一类此类算法提供了抽象刻画，并且与独立提出的忠实分解概念以及充足集非常相似<sup>[17](https://patricegodefroid.github.io/public_psfiles/ieee-tse96.pdf)</sup>；充足集是满足LTL模型检验所需额外条件的持久集。<sup>[5](https://users.soe.ucsc.edu/%7Ecormac/papers/popl05.pdf)</sup> 为动态POR引入的源集可证明是最小的且单调（任何超集也是源集），这些性质不为顽固集、持久集或充足集所共有；每个持久集都是源集，但有些程序允许严格更小的源集。<sup>[3](https://www.lix.polytechnique.fr/~cenea/papers/vmcai23.pdf)</sup> 对于概率系统，由条件 \( D_{0} \)、\( D_{1} \) 和 \( D_{2} \) 定义的弱顽固集已与马尔可夫决策过程模型检验结合，归约后的LTS恰好包含原系统的死锁。<sup>[18](https://prismmodelchecker.org/papers/qest11por.pdf)</sup> TruSt（POPL 2022）以线性内存实现了探索最优的DPOR，已在Coq中形式化，并适用于顺序一致性以及包括TSO、PSO和RC11在内的弱内存模型。<sup>[6](https://pure.mpg.de/rest/items/item_3362445_2/component/file_3362446/content)</sup> Spore（PLDI 2024）是首个将对称归约与DPOR健全、完备且最优地结合的无状态模型检验器，在验证时间上取得指数级缩减。<sup>[19](https://doi.org/10.1145/3656449)</sup> 结合静态与动态计算的有状态源集算法（S-POR及其变体，VMCAI 2023）在实践中优于最优源集算法，后者的计算开销抵消了其收益。<sup>[3](https://www.lix.polytechnique.fr/~cenea/papers/vmcai23.pdf)</sup>

## 应用

POR已在广泛使用的显式状态模型检验器中实现。面向SPIN的列日大学偏序包（ULg Partial-Order Package，1992年至1994年的版本）与AT&T贝尔实验室（AT&T Bell Laboratories）的杰拉德·J·霍尔兹曼（Gerard J. Holzmann）合作，实现了带持久集、睡眠集和附加条件的选择性搜索<sup>[4](https://spinroot.com/spin/Workshops/ws95/godefroid.pdf)</sup>；SPIN内置的POR基于充足集。<sup>[20](https://link.springer.com/chapter/10.1007/978-3-030-25543-5_27)</sup> LTSmin工具集实现了语言无关、基于守卫的顽固集理论推广。<sup>[21](https://spinroot.com/spin/symposia/ws13/spin2013_submission_9.pdf)</sup> 一个工业VFSM验证器将根据静态和运行时分析计算出的持久集与每个已访问状态只存一位的位状态哈希结合<sup>[17](https://patricegodefroid.github.io/public_psfiles/ieee-tse96.pdf)</sup>，最优DPOR算法已在面向Erlang程序的无状态模型检验器中实现。<sup>[16](https://doi.org/10.1145/2578855.2535845)</sup>

实现的归约效果在很大程度上取决于系统和性质。进程耦合非常紧时，POR不产生归约，等同于穷举搜索；耦合松散时，效果可能非常显著。<sup>[4](https://spinroot.com/spin/Workshops/ws95/godefroid.pdf)</sup> 在弗拉纳根和戈德弗鲁瓦的基准中，当最多11个线程访问不同内存位置且无哈希表冲突时，动态POR将探索状态空间缩减为单条路径，而静态POR则遭遇状态爆炸。<sup>[5](https://users.soe.ucsc.edu/%7Ecormac/papers/popl05.pdf)</sup> 在Petri网或Promela等低级形式化，以及CSP或mCRL2等进程代数中，POR将状态空间缩减几个数量级，但应用于B和TLA+等高级形式化时结果令人失望：在一项对1894个B机器的研究中，1121个无死锁机器中只有191个（17%）显示出任何归约，平均为原大小的54%。<sup>[22](https://stups.hhu-hosting.de/downloads/pdf/koerner22-por-analysis.pdf)</sup>

## 局限与替代方案

POR只保持不含next算子的LTL；条件 \( C_{0} \) 至 \( C_{3} \) 保证LTL\X性质，但不保证完整LTL，因为归约由停顿等价来论证。<sup>[9](https://www.cs.cmu.edu/~emc/15817-f08/lectures/partialorder.pdf)</sup><sup> • </sup><sup>[23](https://lvl.info.ucl.ac.be/uploads/Publications/CombiningPartialOrderReductionAndSymbolicModelCheckingToVerifyLTLProperties/JVM_CP_NFM_2011_REGULAR.pdf)</sup> 工业VFSM算法保证归约空间包含所有死锁，但可能漏掉其他错误，例如意外输入和活锁。<sup>[17](https://patricegodefroid.github.io/public_psfiles/ieee-tse96.pdf)</sup> 2019年一项研究发现，将即时模型检验与充足集POR结合的标准算法不健全；修复方法是将性质自动机转换为停顿不变范式，对此修正后的算法是健全的，且性能略好。<sup>[20](https://link.springer.com/chapter/10.1007/978-3-030-25543-5_27)</sup>

基于符号BDD的模型检验是最接近的替代方案：在基本形式下，它在交错驱动爆炸的异步模型上表现不佳，这就是为什么在那些场景中更倾向于使用带POR的显式状态检验器如Spin，而两种方法也已被结合用于基于BDD的不变式检查和LTL\X验证。<sup>[23](https://lvl.info.ucl.ac.be/uploads/Publications/CombiningPartialOrderReductionAndSymbolicModelCheckingToVerifyLTLProperties/JVM_CP_NFM_2011_REGULAR.pdf)</sup><sup> • </sup><sup>[24](https://dl.acm.org/doi/10.1023/A:1008767206905)</sup> 除非 \( P = NP \)，否则不可能存在多项式接近最优的有状态POR算法，即使对于只有await指令的无环程序也是如此。<sup>[25](https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.CONCUR.2025.22)</sup>

## References

1. [Model Checking Lecture #17: Partial-Order Reduction (based on Baier & Katoen, Chapter 8)](https://moves.rwth-aachen.de/wp-content/uploads/WS1920/MC/mc2019_handout_lec17.pdf)
2. [State Space Reduction using Partial Order Techniques (survey by Doron Peled)](https://www.cs.cmu.edu/~emc/15-820A/reading/partial-order.pdf)
3. [A Pragmatic Approach to Stateful Partial Order Reduction (VMCAI 2023)](https://www.lix.polytechnique.fr/~cenea/papers/vmcai23.pdf)
4. [The ULg Partial-Order Package for SPIN](https://spinroot.com/spin/Workshops/ws95/godefroid.pdf)
5. [Dynamic Partial-Order Reduction for Model Checking Software (Flanagan & Godefroid, POPL '05)](https://users.soe.ucsc.edu/%7Ecormac/papers/popl05.pdf)
6. [Truly Stateless, Optimal Dynamic Partial Order Reduction (TruSt, POPL 2022)](https://pure.mpg.de/rest/items/item_3362445_2/component/file_3362446/content)
7. [Using Partial Orders for the Efficient Verification of Deadlock Freedom and Safety Properties (Godefroid & Wolper, 1993)](https://orbi.uliege.be/bitstream/2268/163844/1/GW93-final%20draft.pdf)
8. [Exploiting Predicate Structure For Efficient Reachability (Garg et al., ASE 2005)](https://users.ece.utexas.edu/~garg/dist/ASE05.pdf)
9. [Model Checking with the Partial Order Reduction (CMU lecture, Clarke/Grumberg-Peled style)](https://www.cs.cmu.edu/~emc/15817-f08/lectures/partialorder.pdf)
10. [Efficient Symbolic Model Checking for Process Algebras (FWD-ImProviso)](https://webperso.info.ucl.ac.be/~pecheur/publi/FWD_ImProviso.pdf)
11. [P. Godefroid (1991). Using partial orders to improve automatic verification methods. DIMACS series in discrete mathematics and theoretical computer science.](https://doi.org/10.1090/dimacs/003/21)
12. [Using partial orders to improve automatic verification methods (Godefroid, CAV 1990)](https://link.springer.com/chapter/10.1007/BFb0023731)
13. [A. Valmari (1991). A stubborn attack on state explosion. DIMACS series in discrete mathematics and theoretical computer science.](https://doi.org/10.1090/dimacs/003/04)
14. [Patrice Godefroid, Pierre Wolper (1993). Using partial orders for the efficient verification of deadlock freedom and safety properties. Formal Methods in System Design.](https://doi.org/10.1007/bf01383879)
15. [Cormac Flanagan, Patrice Godefroid (2005). Dynamic partial-order reduction for model checking software. ACM SIGPLAN Notices.](https://doi.org/10.1145/1047659.1040315)
16. [Parosh Abdulla and colleagues (2014). Optimal dynamic partial order reduction. ACM SIGPLAN Notices.](https://doi.org/10.1145/2578855.2535845)
17. [Using Partial-Order Methods in the Formal Validation of Industrial Concurrent Programs (IEEE TSE 1996)](https://patricegodefroid.github.io/public_psfiles/ieee-tse96.pdf)
18. [Partial order reduction for model checking Markov decision processes under unconditional fairness (QEST 2011, PRISM)](https://prismmodelchecker.org/papers/qest11por.pdf)
19. [Michalis Kokologiannakis, Iason Marmanis, Viktor Vafeiadis (2024). SPORE: Combining Symmetry and Partial Order Reduction. Proceedings of the ACM on Programming Languages.](https://doi.org/10.1145/3656449)
20. [What's Wrong with On-the-Fly Partial Order Reduction (SPIN 2019, Springer)](https://link.springer.com/chapter/10.1007/978-3-030-25543-5_27)
21. [Guard-based partial-order reduction (LTSmin, SPIN 2013)](https://spinroot.com/spin/symposia/ws13/spin2013_submission_9.pdf)
22. [POR analysis for B machines in ProB (Körner and Leuschel)](https://stups.hhu-hosting.de/downloads/pdf/koerner22-por-analysis.pdf)
23. [Combining Partial Order Reduction and Symbolic Model Checking to Verify LTL Properties (NFM 2011)](https://lvl.info.ucl.ac.be/uploads/Publications/CombiningPartialOrderReductionAndSymbolicModelCheckingToVerifyLTLProperties/JVM_CP_NFM_2011_REGULAR.pdf)
24. [Partial-Order Reduction in Symbolic State-Space Exploration (Alur, Brayton, Henzinger, Qadeer, Rajamani, Formal Methods in System Design, 2001)](https://dl.acm.org/doi/10.1023/A:1008767206905)
25. [Partial-Order Reduction Is Hard (CONCUR 2025, LIPIcs)](https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.CONCUR.2025.22)

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

Topic: 物质世界与数学 › 数学与统计学 › 逻辑与离散数学 › General discrete mathematics and discrete structures

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/partial-order-reduction

English original: https://www.edgepedia.org/partial-order-reduction
