arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1207.3208cs.LO
收藏

Monad Transformers的形式化验证

Formal Verification of Monad Transformers

Brian Huffman

摘要:

我们提出的技术推理构造类(如单子类)修复多态操作和断言多态公理。我们不需要一个具有第一类类型构造函数、第一类多态性或类型量化的逻辑;相反,我们依赖于通用域中类型系统的域理论模型来提供这些特性。这些想法在伊莎贝尔定理证明器的Tycon库中实现,该库建立在域理论的HOLCF库上。Tycon库提供了各种公理类型构造函数类,包括函子和单子。它还提供了实例化这些类和定义更多子类的自动化。我们使用Tycon库来形式化三个Haskell monad Transformers:error transformer Transformer、writer transformer Transformer和recovery transformer Transformer。错误和作家Transformers并不普遍保持单子法律,但是,我们建立数据类型不变量为每个,表明它们是有效的单子时,被视为抽象的数据集。

英文摘要:

We present techniques for reasoning about constructor classes that (like the monad class) fix polymorphic operations and assert polymorphic axioms. We do not require a logic with first-class type constructors, first-class polymorphism, or type quantification; instead, we rely on a domain-theoretic model of the type system in a universal domain to provide these features. These ideas are implemented in the Tycon library for the Isabelle theorem prover, which builds on the HOLCF library of domain theory. The Tycon library provides various axiomatic type constructor classes, including functors and monads. It also provides automation for instantiating those classes, and for defining further subclasses. We use the Tycon library to formalize three Haskell monad transformers: the error transformer, the writer transformer, and the resumption transformer. The error and writer transformers do not universally preserve the monad laws; however, we establish datatype invariants for each, showing that they are valid monads when viewed as abstract datatypes.

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

↑