经验证的无损压缩可逆程控
Verified Reversible Programming for Verified Lossless Compression
摘要:
无损压缩实现通常包含两个程序,编码器和解码器,它们需要彼此相反。我们观察到,一类重要的基于非对称数字系统(ANS)的压缩方法在编码器和解码器之间具有共享结构--解码器程序是编码器程序的“反向”--允许两者同时指定由单个可逆函数。为了利用这一点,我们实现了一个嵌入在Agda中的小型可逆语言,我们称之为“Flipper”(可在https://github.com/j-towns/flipper获得)。Agda支持程序属性的形式化验证,并且我们的可逆语言的编译器(作为Agda宏实现)不仅产生一个编码器/解码器对函数,而且还证明它们彼此是逆的。因此,语言的用户可以“免费”获得形式化验证。我们在本文中给出了Flipper的一个小示例用例,并计划很快发布一个完整的压缩实现。
英文摘要:
Lossless compression implementations typically contain two programs, an encoder and a decoder, which are required to be inverse to one another. We observe that a significant class of compression methods, based on asymmetric numeral systems (ANS), have shared structure between the encoder and decoder -- the decoder program is the 'reverse' of the encoder program -- allowing both to be simultaneously specified by a single, reversible function. To exploit this, we have implemented a small reversible language, embedded in Agda, which we call 'Flipper' (available at https://github.com/j-towns/flipper). Agda supports formal verification of program properties, and the compiler for our reversible language (which is implemented as an Agda macro), produces not just an encoder/decoder pair of functions but also a proof that they are inverse to one another. Thus users of the language get formal verification 'for free'. We give a small example use-case of Flipper in this paper, and plan to publish a full compression implementation soon.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。