Dargent: A Silver Bullet for Verified Data Layout Refinement

Author:

Chen Zilin1ORCID,Lafont Ambroise2ORCID,O'Connor Liam3ORCID,Keller Gabriele4ORCID,McLaughlin Craig1ORCID,Jackson Vincent5ORCID,Rizkallah Christine5ORCID

Affiliation:

1. UNSW, Australia

2. University of Cambridge, UK

3. University of Edinburgh, UK

4. Utrecht University, Netherlands

5. University of Melbourne, Australia

Abstract

Systems programmers need fine-grained control over the memory layout of data structures, both to produce performant code and to comply with well-defined interfaces imposed by existing code, standardised protocols or hardware. Code that manipulates these low-level representations in memory is hard to get right. Traditionally, this problem is addressed by the implementation of tedious marshalling code to convert between compiler-selected data representations and the desired compact data formats. Such marshalling code is error-prone and can lead to a significant runtime overhead due to excessive copying. While there are many languages and systems that address the correctness issue, by automating the generation and, in some cases, the verification of the marshalling code, the performance overhead introduced by the marshalling code remains. In particular for systems code, this overhead can be prohibitive. In this work, we address both the correctness and the performance problems. We present a data layout description language and data refinement framework, called Dargent, which allows programmers to declaratively specify how algebraic data types are laid out in memory. Our solution is applied to the Cogent language, but the general ideas behind our solution are applicable to other settings. The Dargent framework generates C code that manipulates data directly with the desired memory layout, while retaining the formal proof that this generated C code is correct with respect to the functional semantics. This added expressivity removes the need for implementing and verifying marshalling code, which eliminates copying, smoothens interoperability with surrounding systems, and increases the trustworthiness of the overall system.

Publisher

Association for Computing Machinery (ACM)

Subject

Safety, Risk, Reliability and Quality,Software

Reference37 articles.

1. Cogent

2. DataScript- A Specification and Scripting Language for Binary Data

3. Julian Bangert and Nickolai Zeldovich . 2014 . Nail: A Practical Tool for Parsing and Generating Data Formats. In 11th USENIX Symposium on Operating Systems Design and Implementation (OSDI 14) . USENIX Association, Broomfield, CO. 615–628. isbn:978-1-93 1971-16-4 https://www.usenix.org/conference/osdi14/technical-sessions/presentation/bangert Julian Bangert and Nickolai Zeldovich. 2014. Nail: A Practical Tool for Parsing and Generating Data Formats. In 11th USENIX Symposium on Operating Systems Design and Implementation (OSDI 14). USENIX Association, Broomfield, CO. 615–628. isbn:978-1-931971-16-4 https://www.usenix.org/conference/osdi14/technical-sessions/presentation/bangert

4. Conventional and uniqueness typing in graph rewrite systems

Cited by 3 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Garbage Collection for Mostly Serialized Heaps;Proceedings of the 2024 ACM SIGPLAN International Symposium on Memory Management;2024-06-20

2. Unboxed Data Constructors: Or, How cpp Decides a Halting Problem;Proceedings of the ACM on Programming Languages;2024-01-05

3. Bit-Stealing Made Legal: Compilation for Custom Memory Representations of Algebraic Data Types;Proceedings of the ACM on Programming Languages;2023-08-30

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3