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

在序列化数据上实现无缝、正确且通用的编程

Seamless, Correct, and Generic Programming over Serialised Data

Guillaume Allais

AI总结:

本文提出利用Idris中的QTT定义序列化数据类型宇宙,提供处理缓冲区数据的通用程序,并通过构造IO函数证明其完全功能正确性。

摘要:

在类型化函数式语言中,通常只有在数据被反序列化为以节点为结构和子项为指针的图所表示的内存树之后,才能以类型安全的方式对其进行操作。我们展示了如何使用在Idris中实现的QTT来定义序列化数据类型的小型宇宙,并提供允许用户处理连续存储在缓冲区中的值的通用程序。我们的方法允许实现者通过构造处理缓冲区中存储数据的IO函数,来证明其完全功能正确性。

英文摘要:

In typed functional languages, one can typically only manipulate data in a type-safe manner if it first has been deserialised into an in-memory tree represented as a graph of nodes-as-structs and subterms-as-pointers. We demonstrate how we can use QTT as implemented in \idris{} to define a small universe of serialised datatypes, and provide generic programs allowing users to process values stored contiguously in buffers. Our approach allows implementors to prove the full functional correctness by construction of the IO functions processing the data stored in the buffer.

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

↑