arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1610.07118cs.PL
收藏

在Haskell中验证并行字符串匹配

Verified Parallel String Matching in Haskell

Niki Vazou, Jeff Polakow

摘要:

在本文中,我们证明了使用Haskell作为定理证明器并行化字符串匹配器的正确性。我们使用精化类型来指定正确性属性,Haskell术语来表达证明,Liquid Haskell来检查证明的正确性。首先,我们指定并证明了一类幺半群态射可以通过平行幺半群拼接来并行化。然后,我们将字符串匹配编码为态射,以获得可证明正确的并行转换。我们的1839LoC原型证明表明,Liquid Haskell可以在现实的Haskell实现中用作完全表达的定理证明器。

英文摘要:

In this paper, we prove correctness of parallelizing a string matcher using Haskell as a theorem prover. We use refinement types to specify correctness properties, Haskell terms to express proofs and Liquid Haskell to check correctness of proofs. First, we specify and prove that a class of monoid morphisms can be parallelized via parallel monoid concatenation. Then, we encode string matching as a morphism to get a provably correct parallel transformation. Our 1839LoC prototype proof shows that Liquid Haskell can be used as a fully expressive theorem prover on realistic Haskell implementations.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑