弱内存测试有多难?
How Hard is Weak-Memory Testing?
AI总结:
本文证明弱内存模型下的一致性测试即使在有界设置中也是NP完全的,揭示了其固有困难性,并展示了与SC等可在多项式时间内解决的模型的计算分离。
摘要:
弱内存模型是并发在硬件、编程语言和分布式系统中的标准形式化规范。一个基本的计算问题是一致性测试:并发程序的观察执行是否与底层系统的规范一致?这个问题在顺序一致性(SC)和弱内存下已被广泛研究,并证明当输入的某些方面(如线程数/内存位置数)无界时是NP完全的。这种无界性留下了一个自然的问题:是否存在高效的参数化算法用于测试?本文的主要贡献是对许多流行的弱内存模型下的一致性测试的一个深度困难结果:即使在有界设置中,问题仍然是NP完全的,其中候选执行包含有界的线程数、内存位置数和值。这种困难性遍及C11的多个释放-获取变体、其Relaxed片段的一个流行变体、流行的因果一致性模型以及POWER架构。据我们所知,这是第一个完全暴露弱内存测试困难性并证明该问题在标准输入参数下不存在参数化的结果。它还产生了这些模型与SC、x86-TSO、PSO和Relaxed的计算分离,对于这些模型,有界一致性测试要么已知(对于SC),要么在此处证明(对于其余模型)在多项式时间内。
英文摘要:
Weak-memory models are standard formal specifications of concurrency across hardware, programming languages, and distributed systems. A fundamental computational problem is consistency testing: is the observed execution of a concurrent program in alignment with the specification of the underlying system? The problem has been studied extensively across Sequential Consistency (SC) and weak memory, and proven to be NP-complete when some aspect of the input (e.g., number of threads/memory locations) is unbounded. This unboundedness has left a natural question open: are there efficient parameterized algorithms for testing? The main contribution of this paper is a deep hardness result for consistency testing under many popular weak-memory models: the problem remains NP-complete even in its bounded setting, where candidate executions contain a bounded number of threads, memory locations, and values. This hardness spreads across several Release-Acquire variants of C11, a popular variant of its Relaxed fragment, popular Causal Consistency models, and the POWER architecture. To our knowledge, this is the first result that fully exposes the hardness of weak-memory testing and proves that the problem admits no parameterization under standard input parameters. It also yields a computational separation of these models from SC, x86-TSO, PSO, and Relaxed, for which bounded consistency testing is either known (for SC), or shown here (for the rest), to be in polynomial time.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。