arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2308.02018cs.PL
收藏

渐进敏感性类型化

Gradual Sensitivity Typing

Damian Arquez, Matías Toro, Éric Tanter

AI总结:

本文提出并形式化了渐进敏感性类型化语言 GSoul,通过支持未知敏感性和区间有界不精确性,使程序可从无静态敏感性信息平滑演进到动静混合检查,并证明其满足渐进保证与度量保持性。

摘要:

对函数关于其输入的敏感性进行推理在差分隐私等多个领域具有重要应用。为了检查和强制敏感性,已经发展出多种方法,其中尤为突出的是敏感性类型系统。在这些系统中,敏感性可以被视为一种效应,其含义与 Gifford 和 Lucassen 最初提出的类型与效应系统中的效应概念一致。由于类型与效应系统可能使某些有用的编程模式变得繁琐或过于保守,因此将渐进类型化的优势引入这些学科以降低其采用门槛具有重要价值。在本文中,我们提出、形式化并原型实现了渐进敏感性类型化。GSoul 语言同时支持不受限制的未知敏感性和以区间形式表示的有界不精确性。渐进敏感性类型化允许程序员从没有任何静态敏感性信息的类型化程序平滑演进到具有静态与动态敏感性检查混合的强化程序。特别地,我们展示了渐进敏感性支持递归函数,对于这类函数,完全静态检查会过于保守,而渐进敏感性能够无缝启用精确的运行时敏感性检查。GSoul 同时满足渐进保证和敏感性类型健全性,即度量保持性。我们证明,在一般情况下,渐进度量保持性对终止不敏感,并且可以通过将规范强化为有界不精确性来实现对终止敏感的渐进度量保持性。我们实现了一个原型,为渐进敏感性类型化提供了交互式测试平台。这项工作为渐进化其他依赖函数敏感性的类型化领域(如差分隐私)以及其他基于定量类型的推理技术打开了大门。

英文摘要:

Reasoning about the sensitivity of functions with respect to their inputs has interesting applications in various areas, such as differential privacy. In order to check and enforce sensitivity, several approaches have been developed, notably sensitivity type systems. In these systems, sensitivity can be seen as an effect in the sense of type-and-effects systems as originally proposed by Gifford and Lucassen. Because type-and-effect systems can make certain useful programming patterns tedious or overly conservative, there is value in bringing the benefits of gradual typing to these disciplines in order to ease their adoption. In this work, we motivate, formalize, and prototype gradual sensitivity typing. The language GSoul supports both the unrestricted unknown sensitivity and bounded imprecision in the form of intervals. Gradual sensitivity typing allows programmers to smoothly evolve typed programs without any static sensitivity information towards hardened programs with a mix of static and dynamic sensitivity checking. In particular, we show that gradual sensitivity supports recursive functions for which fully static checking would be overly conservative, seamlessly enabling exact runtime sensitivity checks. GSoul satisfies both the gradual guarantees and sensitivity type soundness, known as metric preservation. We establish that, in general, gradual metric preservation is termination insensitive, and that one can achieve termination-sensitive gradual metric preservation by hardening specifications to bounded imprecision. We implement a prototype that provides an interactive test bed for gradual sensitivity typing. This work opens the door to gradualizing other typing disciplines that rely on function sensitivity such as differential privacy, as well as other quantitative type-based reasoning techniques.

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

↑