首页 > 最新文献

Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages最新文献

英文 中文
Context-sensitive data-dependence analysis via linear conjunctive language reachability 基于线性合取语言可达性的上下文敏感数据依赖性分析
Qirun Zhang, Z. Su
Many program analysis problems can be formulated as graph reachability problems. In the literature, context-free language (CFL) reachability has been the most popular formulation and can be computed in subcubic time. The context-sensitive data-dependence analysis is a fundamental abstraction that can express a broad range of program analysis problems. It essentially describes an interleaved matched-parenthesis language reachability problem. The language is not context-free, and the problem is well-known to be undecidable. In practice, many program analyses adopt CFL-reachability to exactly model the matched parentheses for either context-sensitivity or structure-transmitted data-dependence, but not both. Thus, the CFL-reachability formulation for context-sensitive data-dependence analysis is inherently an approximation. To support more precise and scalable analyses, this paper introduces linear conjunctive language (LCL) reachability, a new, expressive class of graph reachability. LCL not only contains the interleaved matched-parenthesis language, but is also closed under all set-theoretic operations. Given a graph with n nodes and m edges, we propose an O(mn) time approximation algorithm for solving all-pairs LCL-reachability, which is asymptotically better than known CFL-reachability algorithms. Our formulation and algorithm offer a new perspective on attacking the aforementioned undecidable problem - the LCL-reachability formulation is exact, while the LCL-reachability algorithm yields a sound approximation. We have applied the LCL-reachability framework to two existing client analyses. The experimental results show that the LCL-reachability framework is both more precise and scalable than the traditional CFL-reachability framework. This paper opens up the opportunity to exploit LCL-reachability in program analysis.
许多程序分析问题可以表述为图可达性问题。在文献中,上下文无关语言(CFL)可达性是最流行的表述,可以在次立方时间内计算。上下文敏感的数据依赖分析是一种基本的抽象,它可以表达广泛的程序分析问题。它本质上描述了交错匹配括号语言的可达性问题。这种语言不是与上下文无关的,众所周知,这个问题是无法确定的。在实践中,许多程序分析采用cfl可达性来精确地为上下文敏感性或结构传输数据依赖性匹配圆括号建模,但不是两者兼而有之。因此,上下文敏感的数据依赖性分析的cfl可达性公式本质上是一个近似值。为了支持更精确和可扩展的分析,本文引入了线性连接语言(LCL)可达性,这是一种新的、表达性强的图可达性。LCL不仅包含交错匹配括号语言,而且在所有集合论操作下都是封闭的。给定一个有n个节点和m条边的图,我们提出了一个O(mn)时间近似算法来求解全对lcl -可达性,该算法渐近地优于已知的cfl -可达性算法。我们的公式和算法为解决上述不可确定问题提供了一个新的视角——lcl -可达性公式是精确的,而lcl -可达性算法产生了一个良好的近似。我们已经将lcl可达性框架应用于两个现有的客户端分析。实验结果表明,与传统的节能灯可达性框架相比,lcl -可达性框架具有更高的精度和可扩展性。本文为在程序分析中利用lcl可达性提供了机会。
{"title":"Context-sensitive data-dependence analysis via linear conjunctive language reachability","authors":"Qirun Zhang, Z. Su","doi":"10.1145/3009837.3009848","DOIUrl":"https://doi.org/10.1145/3009837.3009848","url":null,"abstract":"Many program analysis problems can be formulated as graph reachability problems. In the literature, context-free language (CFL) reachability has been the most popular formulation and can be computed in subcubic time. The context-sensitive data-dependence analysis is a fundamental abstraction that can express a broad range of program analysis problems. It essentially describes an interleaved matched-parenthesis language reachability problem. The language is not context-free, and the problem is well-known to be undecidable. In practice, many program analyses adopt CFL-reachability to exactly model the matched parentheses for either context-sensitivity or structure-transmitted data-dependence, but not both. Thus, the CFL-reachability formulation for context-sensitive data-dependence analysis is inherently an approximation. To support more precise and scalable analyses, this paper introduces linear conjunctive language (LCL) reachability, a new, expressive class of graph reachability. LCL not only contains the interleaved matched-parenthesis language, but is also closed under all set-theoretic operations. Given a graph with n nodes and m edges, we propose an O(mn) time approximation algorithm for solving all-pairs LCL-reachability, which is asymptotically better than known CFL-reachability algorithms. Our formulation and algorithm offer a new perspective on attacking the aforementioned undecidable problem - the LCL-reachability formulation is exact, while the LCL-reachability algorithm yields a sound approximation. We have applied the LCL-reachability framework to two existing client analyses. The experimental results show that the LCL-reachability framework is both more precise and scalable than the traditional CFL-reachability framework. This paper opens up the opportunity to exploit LCL-reachability in program analysis.","PeriodicalId":20657,"journal":{"name":"Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages","volume":"56 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2017-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"82534921","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 49
Contextual isomorphisms 上下文同构
P. Levy
What is the right notion of "isomorphism" between types, in a simple type theory? The traditional answer is: a pair of terms that are inverse up to a specified congruence. We firstly argue that, in the presence of effects, this answer is too liberal and needs to be restricted, using Führmann's notion of thunkability in the case of value types (as in call-by-value), or using Munch-Maccagnoni's notion of linearity in the case of computation types (as in call-by-name). Yet that leaves us with different notions of isomorphism for different kinds of type. This situation is resolved by means of a new notion of "contextual" isomorphism (or morphism), analogous at the level of types to contextual equivalence of terms. A contextual morphism is a way of replacing one type with the other wherever it may occur in a judgement, in a way that is preserved by the action of any term with holes. For types of pure λ-calculus, we show that a contextual morphism corresponds to a traditional isomorphism. For value types, a contextual morphism corresponds to a thunkable isomorphism, and for computation types, to a linear isomorphism.
在简单的类型理论中,类型之间的“同构”的正确概念是什么?传统的答案是:一对逆的项直到一个指定的同余。我们首先认为,在存在效应的情况下,这个答案过于自由,需要加以限制,在值类型的情况下使用赫曼的可思性概念(如按值调用),或在计算类型的情况下使用Munch-Maccagnoni的线性概念(如按名称调用)。然而这给我们留下了不同类型的同构概念。这种情况可以通过“上下文”同构(或形态)的新概念来解决,它在类型级别类似于术语的上下文等价。上下文态射是在判断中可能出现的任何地方用另一种类型替换一种类型的一种方式,这种方式通过任何有洞的术语的作用来保存。对于纯λ-演算的类型,我们证明了上下文态射对应于传统同构。对于值类型,上下文态射对应于可分同构,对于计算类型,对应于线性同构。
{"title":"Contextual isomorphisms","authors":"P. Levy","doi":"10.1145/3009837.3009898","DOIUrl":"https://doi.org/10.1145/3009837.3009898","url":null,"abstract":"What is the right notion of \"isomorphism\" between types, in a simple type theory? The traditional answer is: a pair of terms that are inverse up to a specified congruence. We firstly argue that, in the presence of effects, this answer is too liberal and needs to be restricted, using Führmann's notion of thunkability in the case of value types (as in call-by-value), or using Munch-Maccagnoni's notion of linearity in the case of computation types (as in call-by-name). Yet that leaves us with different notions of isomorphism for different kinds of type. This situation is resolved by means of a new notion of \"contextual\" isomorphism (or morphism), analogous at the level of types to contextual equivalence of terms. A contextual morphism is a way of replacing one type with the other wherever it may occur in a judgement, in a way that is preserved by the action of any term with holes. For types of pure λ-calculus, we show that a contextual morphism corresponds to a traditional isomorphism. For value types, a contextual morphism corresponds to a thunkable isomorphism, and for computation types, to a linear isomorphism.","PeriodicalId":20657,"journal":{"name":"Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages","volume":"73 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2017-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"78751512","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 9
Type systems as macros 将系统类型设置为宏
Stephen Chang, Alex Knauth, B. Greenman
We present Turnstile, a metalanguage for creating typed embedded languages. To implement the type system, programmers write type checking rules resembling traditional judgment syntax. To implement the semantics, they incorporate elaborations into these rules. Turnstile critically depends on the idea of linguistic reuse. It exploits a macro system in a novel way to simultaneously type check and rewrite a surface program into a target language. Reusing a macro system also yields modular implementations whose rules may be mixed and matched to create other languages. Combined with typical compiler and runtime reuse, Turnstile produces performant typed embedded languages with little effort.
我们提出了Turnstile,一个用于创建类型化嵌入式语言的元语言。为了实现类型系统,程序员编写类似于传统判断语法的类型检查规则。为了实现语义,他们将详细说明合并到这些规则中。Turnstile在很大程度上依赖于语言重用的理念。它以一种新颖的方式利用宏系统同时进行类型检查并将表面程序重写为目标语言。重用宏系统还会产生模块化实现,这些实现的规则可以混合和匹配以创建其他语言。结合典型的编译器和运行时重用,Turnstile可以轻松地生成高性能类型的嵌入式语言。
{"title":"Type systems as macros","authors":"Stephen Chang, Alex Knauth, B. Greenman","doi":"10.1145/3009837.3009886","DOIUrl":"https://doi.org/10.1145/3009837.3009886","url":null,"abstract":"We present Turnstile, a metalanguage for creating typed embedded languages. To implement the type system, programmers write type checking rules resembling traditional judgment syntax. To implement the semantics, they incorporate elaborations into these rules. Turnstile critically depends on the idea of linguistic reuse. It exploits a macro system in a novel way to simultaneously type check and rewrite a surface program into a target language. Reusing a macro system also yields modular implementations whose rules may be mixed and matched to create other languages. Combined with typical compiler and runtime reuse, Turnstile produces performant typed embedded languages with little effort.","PeriodicalId":20657,"journal":{"name":"Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages","volume":"48 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2017-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"73627477","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 22
Serializability for eventual consistency: criterion, analysis, and applications 最终一致性的可序列化性:标准、分析和应用
Lucas Brutschy, Dimitar Dimitrov, Peter Müller, Martin T. Vechev
Developing and reasoning about systems using eventually consistent data stores is a difficult challenge due to the presence of unexpected behaviors that do not occur under sequential consistency. A fundamental problem in this setting is to identify a correctness criterion that precisely captures intended application behaviors yet is generic enough to be applicable to a wide range of applications. In this paper, we present such a criterion. More precisely, we generalize conflict serializability to the setting of eventual consistency. Our generalization is based on a novel dependency model that incorporates two powerful algebraic properties: commutativity and absorption. These properties enable precise reasoning about programs that employ high-level replicated data types, common in modern systems. To apply our criterion in practice, we also developed a dynamic analysis algorithm and a tool that checks whether a given program execution is serializable. We performed a thorough experimental evaluation on two real-world use cases: debugging cloud-backed mobile applications and implementing clients of a popular eventually consistent key-value store. Our experimental results indicate that our criterion reveals harmful synchronization problems in applications, is more effective at finding them than prior approaches, and can be used for the development of practical, eventually consistent applications.
开发和推理使用最终一致的数据存储的系统是一项艰巨的挑战,因为存在在顺序一致性下不会发生的意外行为。这种设置中的一个基本问题是确定一个正确性标准,该标准既要精确地捕获预期的应用程序行为,又要足够通用,可以适用于广泛的应用程序。在本文中,我们提出了这样一个判据。更准确地说,我们将冲突序列化性推广到最终一致性的设置。我们的推广基于一种新的依赖模型,该模型结合了两个强大的代数性质:交换性和吸收性。这些属性允许对使用高级复制数据类型的程序进行精确推理,这在现代系统中很常见。为了在实践中应用我们的标准,我们还开发了一个动态分析算法和一个工具,用于检查给定的程序执行是否可序列化。我们对两个实际用例进行了彻底的实验评估:调试云支持的移动应用程序和实现流行的最终一致键值存储的客户端。我们的实验结果表明,我们的标准揭示了应用程序中有害的同步问题,比以前的方法更有效地发现它们,并且可以用于开发实际的,最终一致的应用程序。
{"title":"Serializability for eventual consistency: criterion, analysis, and applications","authors":"Lucas Brutschy, Dimitar Dimitrov, Peter Müller, Martin T. Vechev","doi":"10.1145/3009837.3009895","DOIUrl":"https://doi.org/10.1145/3009837.3009895","url":null,"abstract":"Developing and reasoning about systems using eventually consistent data stores is a difficult challenge due to the presence of unexpected behaviors that do not occur under sequential consistency. A fundamental problem in this setting is to identify a correctness criterion that precisely captures intended application behaviors yet is generic enough to be applicable to a wide range of applications. In this paper, we present such a criterion. More precisely, we generalize conflict serializability to the setting of eventual consistency. Our generalization is based on a novel dependency model that incorporates two powerful algebraic properties: commutativity and absorption. These properties enable precise reasoning about programs that employ high-level replicated data types, common in modern systems. To apply our criterion in practice, we also developed a dynamic analysis algorithm and a tool that checks whether a given program execution is serializable. We performed a thorough experimental evaluation on two real-world use cases: debugging cloud-backed mobile applications and implementing clients of a popular eventually consistent key-value store. Our experimental results indicate that our criterion reveals harmful synchronization problems in applications, is more effective at finding them than prior approaches, and can be used for the development of practical, eventually consistent applications.","PeriodicalId":20657,"journal":{"name":"Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages","volume":"38 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2017-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"78111919","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 46
Interactive proofs in higher-order concurrent separation logic 高阶并发分离逻辑中的交互证明
R. Krebbers, Amin Timany, L. Birkedal
When using a proof assistant to reason in an embedded logic -- like separation logic -- one cannot benefit from the proof contexts and basic tactics of the proof assistant. This results in proofs that are at a too low level of abstraction because they are cluttered with bookkeeping code related to manipulating the object logic. In this paper, we introduce a so-called proof mode that extends the Coq proof assistant with (spatial and non-spatial) named proof contexts for the object logic. We show that thanks to these contexts we can implement high-level tactics for introduction and elimination of the connectives of the object logic, and thereby make reasoning in the embedded logic as seamless as reasoning in the meta logic of the proof assistant. We apply our method to Iris: a state of the art higher-order impredicative concurrent separation logic. We show that our method is very general, and is not just limited to program verification. We demonstrate its generality by formalizing correctness proofs of fine-grained concurrent algorithms, derived constructs of the Iris logic, and a unary and binary logical relation for a language with concurrency, higher-order store, polymorphism, and recursive types. This is the first formalization of a binary logical relation for such an expressive language. We also show how to use the logical relation to prove contextual refinement of fine-grained concurrent algorithms.
当使用证明助手在嵌入式逻辑(如分离逻辑)中进行推理时,人们无法从证明助手的证明上下文和基本策略中受益。这导致证明的抽象层次过低,因为它们与与操作对象逻辑相关的簿记代码混淆在一起。在本文中,我们引入了一种所谓的证明模式,它扩展了Coq证明助手,为对象逻辑提供了(空间和非空间)命名证明上下文。我们表明,由于这些上下文,我们可以实现高级策略来引入和消除对象逻辑的连接词,从而使嵌入式逻辑中的推理与证明助手的元逻辑中的推理一样无缝。我们将我们的方法应用于Iris:一种先进的高阶预测性并发分离逻辑。我们表明,我们的方法是非常普遍的,而不仅仅局限于程序验证。我们通过形式化细粒度并发算法的正确性证明、Iris逻辑的派生构造以及具有并发性、高阶存储、多态性和递归类型的语言的一元和二元逻辑关系来证明其通用性。这是这种表达性语言的二进制逻辑关系的第一个形式化。我们还展示了如何使用逻辑关系来证明细粒度并发算法的上下文细化。
{"title":"Interactive proofs in higher-order concurrent separation logic","authors":"R. Krebbers, Amin Timany, L. Birkedal","doi":"10.1145/3009837.3009855","DOIUrl":"https://doi.org/10.1145/3009837.3009855","url":null,"abstract":"When using a proof assistant to reason in an embedded logic -- like separation logic -- one cannot benefit from the proof contexts and basic tactics of the proof assistant. This results in proofs that are at a too low level of abstraction because they are cluttered with bookkeeping code related to manipulating the object logic. In this paper, we introduce a so-called proof mode that extends the Coq proof assistant with (spatial and non-spatial) named proof contexts for the object logic. We show that thanks to these contexts we can implement high-level tactics for introduction and elimination of the connectives of the object logic, and thereby make reasoning in the embedded logic as seamless as reasoning in the meta logic of the proof assistant. We apply our method to Iris: a state of the art higher-order impredicative concurrent separation logic. We show that our method is very general, and is not just limited to program verification. We demonstrate its generality by formalizing correctness proofs of fine-grained concurrent algorithms, derived constructs of the Iris logic, and a unary and binary logical relation for a language with concurrency, higher-order store, polymorphism, and recursive types. This is the first formalization of a binary logical relation for such an expressive language. We also show how to use the logical relation to prove contextual refinement of fine-grained concurrent algorithms.","PeriodicalId":20657,"journal":{"name":"Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages","volume":"42 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2017-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"77940978","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 131
Contract-based resource verification for higher-order functions with memoization 具有记忆的高阶函数的基于契约的资源验证
Ravichandhran Madhavan, Sumith Kulal, Viktor Kunčak
We present a new approach for specifying and verifying resource utilization of higher-order functional programs that use lazy evaluation and memoization. In our approach, users can specify the desired resource bound as templates with numerical holes e.g. as steps ≤ ? * size(l) + ? in the contracts of functions. They can also express invariants necessary for establishing the bounds that may depend on the state of memoization. Our approach operates in two phases: first generating an instrumented first-order program that accurately models the higher-order control flow and the effects of memoization on resources using sets, algebraic datatypes and mutual recursion, and then verifying the contracts of the first-order program by producing verification conditions of the form ∃ ∀ using an extended assume/guarantee reasoning. We use our approach to verify precise bounds on resources such as evaluation steps and number of heap-allocated objects on 17 challenging data structures and algorithms. Our benchmarks, comprising of 5K lines of functional Scala code, include lazy mergesort, Okasaki's real-time queue and deque data structures that rely on aliasing of references to first-class functions; lazy data structures based on numerical representations such as the conqueue data structure of Scala's data-parallel library, cyclic streams, as well as dynamic programming algorithms such as knapsack and Viterbi. Our evaluations show that when averaged over all benchmarks the actual runtime resource consumption is 80% of the value inferred by our tool when estimating the number of evaluation steps, and is 88% for the number of heap-allocated objects.
我们提出了一种新的方法来指定和验证使用惰性求值和记忆的高阶函数程序的资源利用率。在我们的方法中,用户可以将所需的资源绑定指定为带有数字孔的模板,例如步骤≤?* size(l) + ?在函数的契约中。它们还可以表示建立依赖于记忆状态的边界所必需的不变量。我们的方法分为两个阶段:首先生成一个仪器化的一阶程序,该程序使用集合、代数数据类型和相互递归来准确地模拟高阶控制流和记忆对资源的影响,然后使用扩展的假设/保证推理,通过生成∃∀形式的验证条件来验证一阶程序的契约。我们使用我们的方法来验证资源的精确边界,例如在17个具有挑战性的数据结构和算法上的评估步骤和堆分配对象的数量。我们的基准测试由5K行Scala函数代码组成,包括延迟归并排序、Okasaki的实时队列和deque数据结构,这些数据结构依赖于对第一类函数的引用的别名;基于数值表示的惰性数据结构,如Scala数据并行库的征服数据结构,循环流,以及动态规划算法,如backpack和Viterbi。我们的评估表明,当对所有基准测试进行平均时,实际运行时资源消耗是我们的工具在估计评估步骤数量时推断的值的80%,对于堆分配对象的数量是88%。
{"title":"Contract-based resource verification for higher-order functions with memoization","authors":"Ravichandhran Madhavan, Sumith Kulal, Viktor Kunčak","doi":"10.1145/3009837.3009874","DOIUrl":"https://doi.org/10.1145/3009837.3009874","url":null,"abstract":"We present a new approach for specifying and verifying resource utilization of higher-order functional programs that use lazy evaluation and memoization. In our approach, users can specify the desired resource bound as templates with numerical holes e.g. as steps ≤ ? * size(l) + ? in the contracts of functions. They can also express invariants necessary for establishing the bounds that may depend on the state of memoization. Our approach operates in two phases: first generating an instrumented first-order program that accurately models the higher-order control flow and the effects of memoization on resources using sets, algebraic datatypes and mutual recursion, and then verifying the contracts of the first-order program by producing verification conditions of the form ∃ ∀ using an extended assume/guarantee reasoning. We use our approach to verify precise bounds on resources such as evaluation steps and number of heap-allocated objects on 17 challenging data structures and algorithms. Our benchmarks, comprising of 5K lines of functional Scala code, include lazy mergesort, Okasaki's real-time queue and deque data structures that rely on aliasing of references to first-class functions; lazy data structures based on numerical representations such as the conqueue data structure of Scala's data-parallel library, cyclic streams, as well as dynamic programming algorithms such as knapsack and Viterbi. Our evaluations show that when averaged over all benchmarks the actual runtime resource consumption is 80% of the value inferred by our tool when estimating the number of evaluation steps, and is 88% for the number of heap-allocated objects.","PeriodicalId":20657,"journal":{"name":"Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages","volume":"33 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2017-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"82029036","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 25
Type soundness proofs with definitional interpreters 使用定义解释器键入可靠性证明
Nada Amin, Tiark Rompf
While type soundness proofs are taught in every graduate PL class, the gap between realistic languages and what is accessible to formal proofs is large. In the case of Scala, it has been shown that its formal model, the Dependent Object Types (DOT) calculus, cannot simultaneously support key metatheoretic properties such as environment narrowing and subtyping transitivity, which are usually required for a type soundness proof. Moreover, Scala and many other realistic languages lack a general substitution property. The first contribution of this paper is to demonstrate how type soundness proofs for advanced, polymorphic, type systems can be carried out with an operational semantics based on high-level, definitional interpreters, implemented in Coq. We present the first mechanized soundness proofs in this style for System F and several extensions, including mutable references. Our proofs use only straightforward induction, which is significant, as the combination of big-step semantics, mutable references, and polymorphism is commonly believed to require coinductive proof techniques. The second main contribution of this paper is to show how DOT-like calculi emerge from straightforward generalizations of the operational aspects of F, exposing a rich design space of calculi with path-dependent types inbetween System F and DOT, which we dub the System D Square. By working directly on the target language, definitional interpreters can focus the design space and expose the invariants that actually matter at runtime. Looking at such runtime invariants is an exciting new avenue for type system design.
虽然在每个研究生PL课上都教授类型稳健性证明,但现实语言与正式证明之间的差距很大。在Scala的例子中,已经证明它的形式化模型,依赖对象类型(DOT)演算,不能同时支持关键的元理论属性,如环境缩小和子类型传递性,这些通常是类型稳健性证明所必需的。此外,Scala和许多其他现实语言缺乏通用的替换属性。本文的第一个贡献是演示如何使用基于Coq实现的高级定义解释器的操作语义来执行高级多态类型系统的类型可靠性证明。我们以这种方式为System F和几个扩展(包括可变引用)提供了第一个机械化的可靠性证明。我们的证明只使用了直接的归纳,这是很重要的,因为大步语义、可变引用和多态性的组合通常被认为需要共归纳证明技术。本文的第二个主要贡献是展示了类点演算是如何从F的操作方面的直接推广中出现的,揭示了系统F和DOT之间具有路径依赖类型的演算的丰富设计空间,我们称之为系统D广场。通过直接处理目标语言,定义解释器可以关注设计空间,并公开在运行时真正重要的不变量。研究这样的运行时不变量是类型系统设计的一个令人兴奋的新途径。
{"title":"Type soundness proofs with definitional interpreters","authors":"Nada Amin, Tiark Rompf","doi":"10.1145/3009837.3009866","DOIUrl":"https://doi.org/10.1145/3009837.3009866","url":null,"abstract":"While type soundness proofs are taught in every graduate PL class, the gap between realistic languages and what is accessible to formal proofs is large. In the case of Scala, it has been shown that its formal model, the Dependent Object Types (DOT) calculus, cannot simultaneously support key metatheoretic properties such as environment narrowing and subtyping transitivity, which are usually required for a type soundness proof. Moreover, Scala and many other realistic languages lack a general substitution property. The first contribution of this paper is to demonstrate how type soundness proofs for advanced, polymorphic, type systems can be carried out with an operational semantics based on high-level, definitional interpreters, implemented in Coq. We present the first mechanized soundness proofs in this style for System F and several extensions, including mutable references. Our proofs use only straightforward induction, which is significant, as the combination of big-step semantics, mutable references, and polymorphism is commonly believed to require coinductive proof techniques. The second main contribution of this paper is to show how DOT-like calculi emerge from straightforward generalizations of the operational aspects of F, exposing a rich design space of calculi with path-dependent types inbetween System F and DOT, which we dub the System D Square. By working directly on the target language, definitional interpreters can focus the design space and expose the invariants that actually matter at runtime. Looking at such runtime invariants is an exciting new avenue for type system design.","PeriodicalId":20657,"journal":{"name":"Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages","volume":"41 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2017-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"88478979","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 66
Genesis: synthesizing forwarding tables in multi-tenant networks Genesis:在多租户网络中合成转发表
Kausik Subramanian, Loris D'antoni, Aditya Akella
Operators in multi-tenant cloud datacenters require support for diverse and complex end-to-end policies, such as, reachability, middlebox traversals, isolation, traffic engineering, and network resource management. We present Genesis, a datacenter network management system which allows policies to be specified in a declarative manner without explicitly programming the network data plane. Genesis tackles the problem of enforcing policies by synthesizing switch forwarding tables. It uses the formal foundations of constraint solving in combination with fast off-the-shelf SMT solvers. To improve synthesis performance, Genesis incorporates a novel search strategy that uses regular expressions to specify properties that leverage the structure of datacenter networks, and a divide-and-conquer synthesis procedure which exploits the structure of policy relationships. We have prototyped Genesis, and conducted experiments with a variety of workloads on real-world topologies to demonstrate its performance.
多租户云数据中心的运营商需要支持多种复杂的端到端策略,如可达性、中间盒遍历、隔离、流量工程、网络资源管理等。我们介绍了Genesis,一个数据中心网络管理系统,它允许以声明性方式指定策略,而无需显式地对网络数据平面进行编程。Genesis通过综合交换机转发表来解决执行策略的问题。它将约束求解的正式基础与快速的现成SMT求解器结合使用。为了提高综合性能,Genesis结合了一种新的搜索策略,该策略使用正则表达式来指定利用数据中心网络结构的属性,以及一个分而治之的综合过程,该过程利用策略关系的结构。我们制作了Genesis的原型,并在实际拓扑上进行了各种工作负载的实验,以证明其性能。
{"title":"Genesis: synthesizing forwarding tables in multi-tenant networks","authors":"Kausik Subramanian, Loris D'antoni, Aditya Akella","doi":"10.1145/3009837.3009845","DOIUrl":"https://doi.org/10.1145/3009837.3009845","url":null,"abstract":"Operators in multi-tenant cloud datacenters require support for diverse and complex end-to-end policies, such as, reachability, middlebox traversals, isolation, traffic engineering, and network resource management. We present Genesis, a datacenter network management system which allows policies to be specified in a declarative manner without explicitly programming the network data plane. Genesis tackles the problem of enforcing policies by synthesizing switch forwarding tables. It uses the formal foundations of constraint solving in combination with fast off-the-shelf SMT solvers. To improve synthesis performance, Genesis incorporates a novel search strategy that uses regular expressions to specify properties that leverage the structure of datacenter networks, and a divide-and-conquer synthesis procedure which exploits the structure of policy relationships. We have prototyped Genesis, and conducted experiments with a variety of workloads on real-world topologies to demonstrate its performance.","PeriodicalId":20657,"journal":{"name":"Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages","volume":"30 21 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2017-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"87076890","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 54
Parallel functional arrays 并行函数数组
Ananya Kumar, G. Blelloch, R. Harper
The goal of this paper is to develop a form of functional arrays (sequences) that are as efficient as imperative arrays, can be used in parallel, and have well defined cost-semantics. The key idea is to consider sequences with functional value semantics but non-functional cost semantics. Because the value semantics is functional, "updating" a sequence returns a new sequence. We allow operations on "older" sequences (called interior sequences) to be more expensive than operations on the "most recent" sequences (called leaf sequences). We embed sequences in a language supporting fork-join parallelism. Due to the parallelism, operations can be interleaved non-deterministically, and, in conjunction with the different cost for interior and leaf sequences, this can lead to non-deterministic costs for a program. Consequently the costs of programs can be difficult to analyze. The main result is the derivation of a deterministic cost dynamics which makes analyzing the costs easier. The theorems are not specific to sequences and can be applied to other data types with different costs for operating on interior and leaf versions. We present a wait-free concurrent implementation of sequences that requires constant work for accessing and updating leaf sequences, and logarithmic work for accessing and linear work for updating interior sequences. We sketch a proof of correctness for the sequence implementation. The key advantages of the present approach compared to current approaches is that our implementation requires no changes to existing programming languages, supports nested parallelism, and has well defined cost semantics. At the same time, it allows for functional implementations of algorithms such as depth-first search with the same asymptotic complexity as imperative implementations.
本文的目标是开发一种函数数组(序列)的形式,它与命令式数组一样高效,可以并行使用,并且具有良好定义的成本语义。关键思想是考虑具有功能值语义而非功能成本语义的序列。因为值语义是函数式的,所以“更新”一个序列会返回一个新序列。我们允许对“旧”序列(称为内部序列)的操作比对“最近”序列(称为叶序列)的操作更昂贵。我们将序列嵌入到一种支持fork-join并行的语言中。由于并行性,操作可以不确定地交错进行,再加上内部序列和叶序列的成本不同,这可能导致程序的成本不确定。因此,项目的成本很难分析。主要结果是一个确定性成本动力学的推导,使成本分析更容易。这些定理并不特定于序列,可以应用于其他数据类型,在内部版本和叶版本上操作的代价不同。我们提出了一种序列的无等待并发实现,它需要恒定的工作来访问和更新叶序列,并且需要对数工作来访问和线性工作来更新内部序列。我们对序列实现的正确性进行了初步证明。与当前方法相比,当前方法的主要优点是我们的实现不需要更改现有的编程语言,支持嵌套并行,并且具有良好定义的成本语义。同时,它允许算法的功能实现,如深度优先搜索,具有与命令式实现相同的渐近复杂性。
{"title":"Parallel functional arrays","authors":"Ananya Kumar, G. Blelloch, R. Harper","doi":"10.1145/3009837.3009869","DOIUrl":"https://doi.org/10.1145/3009837.3009869","url":null,"abstract":"The goal of this paper is to develop a form of functional arrays (sequences) that are as efficient as imperative arrays, can be used in parallel, and have well defined cost-semantics. The key idea is to consider sequences with functional value semantics but non-functional cost semantics. Because the value semantics is functional, \"updating\" a sequence returns a new sequence. We allow operations on \"older\" sequences (called interior sequences) to be more expensive than operations on the \"most recent\" sequences (called leaf sequences). We embed sequences in a language supporting fork-join parallelism. Due to the parallelism, operations can be interleaved non-deterministically, and, in conjunction with the different cost for interior and leaf sequences, this can lead to non-deterministic costs for a program. Consequently the costs of programs can be difficult to analyze. The main result is the derivation of a deterministic cost dynamics which makes analyzing the costs easier. The theorems are not specific to sequences and can be applied to other data types with different costs for operating on interior and leaf versions. We present a wait-free concurrent implementation of sequences that requires constant work for accessing and updating leaf sequences, and logarithmic work for accessing and linear work for updating interior sequences. We sketch a proof of correctness for the sequence implementation. The key advantages of the present approach compared to current approaches is that our implementation requires no changes to existing programming languages, supports nested parallelism, and has well defined cost semantics. At the same time, it allows for functional implementations of algorithms such as depth-first search with the same asymptotic complexity as imperative implementations.","PeriodicalId":20657,"journal":{"name":"Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages","volume":"51 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2017-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"90580709","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 4
A semantic account of metric preservation 度量保持的语义解释
Arthur Azevedo de Amorim, Marco Gaboardi, Justin Hsu, Shin-ya Katsumata, Ikram Cherigui
Program sensitivity measures how robust a program is to small changes in its input, and is a fundamental notion in domains ranging from differential privacy to cyber-physical systems. A natural way to formalize program sensitivity is in terms of metrics on the input and output spaces, requiring that an r-sensitive function map inputs that are at distance d to outputs that are at distance at most r · d. Program sensitivity is thus an analogue of Lipschitz continuity for programs. Reed and Pierce introduced Fuzz, a functional language with a linear type system that can express program sensitivity. They show soundness operationally, in the form of a metric preservation property. Inspired by their work, we study program sensitivity and metric preservation from a denotational point of view. In particular, we introduce metric CPOs, a novel semantic structure for reasoning about computation on metric spaces, by endowing CPOs with a compatible notion of distance. This structure is useful for reasoning about metric properties of programs, and specifically about program sensitivity. We demonstrate metric CPOs by giving a model for the deterministic fragment of Fuzz.
程序敏感性衡量程序对其输入的微小变化的鲁棒性,是从差分隐私到网络物理系统等领域的基本概念。形式化程序灵敏度的一种自然方法是根据输入和输出空间的度量,要求r敏感函数将距离为d的输入映射到距离最多为r·d的输出。因此,程序灵敏度是程序的Lipschitz连续性的模拟。Reed和Pierce介绍了Fuzz,这是一种函数式语言,具有线性类型系统,可以表达程序的灵敏度。它们以度量保存属性的形式在操作上显示出可靠性。受他们工作的启发,我们从外延的角度研究程序敏感性和度量保存。特别地,我们通过赋予度量cpo一个兼容的距离概念,引入了度量cpo——一种新的用于度量空间计算推理的语义结构。这种结构对于程序的度量性质,特别是程序的灵敏度的推理是有用的。我们通过给出模糊的确定性片段的模型来证明度量CPOs。
{"title":"A semantic account of metric preservation","authors":"Arthur Azevedo de Amorim, Marco Gaboardi, Justin Hsu, Shin-ya Katsumata, Ikram Cherigui","doi":"10.1145/3009837.3009890","DOIUrl":"https://doi.org/10.1145/3009837.3009890","url":null,"abstract":"Program sensitivity measures how robust a program is to small changes in its input, and is a fundamental notion in domains ranging from differential privacy to cyber-physical systems. A natural way to formalize program sensitivity is in terms of metrics on the input and output spaces, requiring that an r-sensitive function map inputs that are at distance d to outputs that are at distance at most r · d. Program sensitivity is thus an analogue of Lipschitz continuity for programs. Reed and Pierce introduced Fuzz, a functional language with a linear type system that can express program sensitivity. They show soundness operationally, in the form of a metric preservation property. Inspired by their work, we study program sensitivity and metric preservation from a denotational point of view. In particular, we introduce metric CPOs, a novel semantic structure for reasoning about computation on metric spaces, by endowing CPOs with a compatible notion of distance. This structure is useful for reasoning about metric properties of programs, and specifically about program sensitivity. We demonstrate metric CPOs by giving a model for the deterministic fragment of Fuzz.","PeriodicalId":20657,"journal":{"name":"Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages","volume":"19 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2017-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"72963169","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 46
期刊
Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages
全部 Acc. Chem. Res. ACS Applied Bio Materials ACS Appl. Electron. Mater. ACS Appl. Energy Mater. ACS Appl. Mater. Interfaces ACS Appl. Nano Mater. ACS Appl. Polym. Mater. ACS BIOMATER-SCI ENG ACS Catal. ACS Cent. Sci. ACS Chem. Biol. ACS Chemical Health & Safety ACS Chem. Neurosci. ACS Comb. Sci. ACS Earth Space Chem. ACS Energy Lett. ACS Infect. Dis. ACS Macro Lett. ACS Mater. Lett. ACS Med. Chem. Lett. ACS Nano ACS Omega ACS Photonics ACS Sens. ACS Sustainable Chem. Eng. ACS Synth. Biol. Anal. Chem. BIOCHEMISTRY-US Bioconjugate Chem. BIOMACROMOLECULES Chem. Res. Toxicol. Chem. Rev. Chem. Mater. CRYST GROWTH DES ENERG FUEL Environ. Sci. Technol. Environ. Sci. Technol. Lett. Eur. J. Inorg. Chem. IND ENG CHEM RES Inorg. Chem. J. Agric. Food. Chem. J. Chem. Eng. Data J. Chem. Educ. J. Chem. Inf. Model. J. Chem. Theory Comput. J. Med. Chem. J. Nat. Prod. J PROTEOME RES J. Am. Chem. Soc. LANGMUIR MACROMOLECULES Mol. Pharmaceutics Nano Lett. Org. Lett. ORG PROCESS RES DEV ORGANOMETALLICS J. Org. Chem. J. Phys. Chem. J. Phys. Chem. A J. Phys. Chem. B J. Phys. Chem. C J. Phys. Chem. Lett. Analyst Anal. Methods Biomater. Sci. Catal. Sci. Technol. Chem. Commun. Chem. Soc. Rev. CHEM EDUC RES PRACT CRYSTENGCOMM Dalton Trans. Energy Environ. Sci. ENVIRON SCI-NANO ENVIRON SCI-PROC IMP ENVIRON SCI-WAT RES Faraday Discuss. Food Funct. Green Chem. Inorg. Chem. Front. Integr. Biol. J. Anal. At. Spectrom. J. Mater. Chem. A J. Mater. Chem. B J. Mater. Chem. C Lab Chip Mater. Chem. Front. Mater. Horiz. MEDCHEMCOMM Metallomics Mol. Biosyst. Mol. Syst. Des. Eng. Nanoscale Nanoscale Horiz. Nat. Prod. Rep. New J. Chem. Org. Biomol. Chem. Org. Chem. Front. PHOTOCH PHOTOBIO SCI PCCP Polym. Chem.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1