首页 > 最新文献

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

英文 中文
Fast polyhedra abstract domain 快速多面体抽象域
Gagandeep Singh, Markus Püschel, Martin T. Vechev
Numerical abstract domains are an important ingredient of modern static analyzers used for verifying critical program properties (e.g., absence of buffer overflow or memory safety). Among the many numerical domains introduced over the years, Polyhedra is the most expressive one, but also the most expensive: it has worst-case exponential space and time complexity. As a consequence, static analysis with the Polyhedra domain is thought to be impractical when applied to large scale, real world programs. In this paper, we present a new approach and a complete implementation for speeding up Polyhedra domain analysis. Our approach does not lose precision, and for many practical cases, is orders of magnitude faster than state-of-the-art solutions. The key insight underlying our work is that polyhedra arising during analysis can usually be kept decomposed, thus considerably reducing the overall complexity. We first present the theory underlying our approach, which identifies the interaction between partitions of variables and domain operators. Based on the theory we develop new algorithms for these operators that work with decomposed polyhedra. We implemented these algorithms using the same interface as existing libraries, thus enabling static analyzers to use our implementation with little effort. In our evaluation, we analyze large benchmarks from the popular software verification competition, including Linux device drivers with over 50K lines of code. Our experimental results demonstrate massive gains in both space and time: we show end-to-end speedups of two to five orders of magnitude compared to state-of-the-art Polyhedra implementations as well as significant memory gains, on all larger benchmarks. In fact, in many cases our analysis terminates in seconds where prior code runs out of memory or times out after 4 hours. We believe this work is an important step in making the Polyhedra abstract domain both feasible and practically usable for handling large, real-world programs.
数值抽象域是现代静态分析器的重要组成部分,用于验证关键程序属性(例如,是否存在缓冲区溢出或内存安全性)。在多年来引入的许多数值领域中,多面体是最具表现力的,但也是最昂贵的:它具有最坏情况指数空间和时间复杂度。因此,多面体域的静态分析被认为在应用于大规模的实际程序时是不切实际的。本文提出了一种加速多面体域分析的新方法和完整实现。我们的方法不会失去精度,并且在许多实际情况下,比最先进的解决方案快几个数量级。我们工作的关键见解是,在分析过程中产生的多面体通常可以保持分解,从而大大降低了整体的复杂性。我们首先提出了我们方法的理论基础,它确定了变量分区和域操作符之间的相互作用。在此基础上,针对分解多面体的这些算子,提出了新的算法。我们使用与现有库相同的接口实现这些算法,从而使静态分析器可以轻松地使用我们的实现。在我们的评估中,我们分析了来自流行的软件验证竞赛的大型基准测试,包括超过50K行代码的Linux设备驱动程序。我们的实验结果显示了在空间和时间上的巨大收益:在所有更大的基准测试中,与最先进的Polyhedra实现相比,我们显示了端到端速度的2到5个数量级以及显着的内存收益。事实上,在许多情况下,我们的分析在几秒钟内就会终止,因为之前的代码耗尽了内存,或者在4小时后超时。我们相信这项工作是使多面体抽象域在处理大型现实世界程序时既可行又实际可用的重要一步。
{"title":"Fast polyhedra abstract domain","authors":"Gagandeep Singh, Markus Püschel, Martin T. Vechev","doi":"10.1145/3009837.3009885","DOIUrl":"https://doi.org/10.1145/3009837.3009885","url":null,"abstract":"Numerical abstract domains are an important ingredient of modern static analyzers used for verifying critical program properties (e.g., absence of buffer overflow or memory safety). Among the many numerical domains introduced over the years, Polyhedra is the most expressive one, but also the most expensive: it has worst-case exponential space and time complexity. As a consequence, static analysis with the Polyhedra domain is thought to be impractical when applied to large scale, real world programs. In this paper, we present a new approach and a complete implementation for speeding up Polyhedra domain analysis. Our approach does not lose precision, and for many practical cases, is orders of magnitude faster than state-of-the-art solutions. The key insight underlying our work is that polyhedra arising during analysis can usually be kept decomposed, thus considerably reducing the overall complexity. We first present the theory underlying our approach, which identifies the interaction between partitions of variables and domain operators. Based on the theory we develop new algorithms for these operators that work with decomposed polyhedra. We implemented these algorithms using the same interface as existing libraries, thus enabling static analyzers to use our implementation with little effort. In our evaluation, we analyze large benchmarks from the popular software verification competition, including Linux device drivers with over 50K lines of code. Our experimental results demonstrate massive gains in both space and time: we show end-to-end speedups of two to five orders of magnitude compared to state-of-the-art Polyhedra implementations as well as significant memory gains, on all larger benchmarks. In fact, in many cases our analysis terminates in seconds where prior code runs out of memory or times out after 4 hours. We believe this work is an important step in making the Polyhedra abstract domain both feasible and practically usable for handling large, real-world programs.","PeriodicalId":20657,"journal":{"name":"Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0,"publicationDate":"2017-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"81398703","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}
引用次数: 90
Monadic second-order logic on finite sequences 有限序列上的一元二阶逻辑
Loris D'antoni, Margus Veanes
We extend the weak monadic second-order logic of one successor on finite strings (M2L-STR) to symbolic alphabets by allowing character predicates to range over decidable quantifier free theories instead of finite alphabets. We call this logic, which is able to describe sequences over complex and potentially infinite domains, symbolic M2L-STR (S-M2L-STR). We then present a decision procedure for S-M2L-STR based on a reduction to symbolic finite automata, a decidable extension of finite automata that allows transitions to carry predicates and can therefore model symbolic alphabets. The reduction constructs a symbolic automaton over an alphabet consisting of pairs of symbols where the first element of the pair is a symbol in the original formula’s alphabet, while the second element is a bit-vector. To handle this modified alphabet we show that the Cartesian product of two decidable Boolean algebras (e.g., the formula’s one and the bit-vector’s one) also forms a decidable Boolean algebras. To make the decision procedure practical, we propose two efficient representations of the Cartesian product of two Boolean algebras, one based on algebraic decision diagrams and one on a variant of Shannon expansions. Finally, we implement our decision procedure and evaluate it on more than 10,000 formulas. Despite the generality, our implementation has comparable performance with the state-of-the-art M2L-STR solvers.
我们将有限字符串(M2L-STR)上一个后继的弱一元二阶逻辑扩展到符号字母,允许字符谓词在可决定的量词自由理论上而不是在有限字母上范围。我们称这种能够描述复杂和潜在无限域上序列的逻辑为符号M2L-STR (S-M2L-STR)。然后,我们提出了一个基于符号有限自动机的S-M2L-STR决策过程,这是有限自动机的可决定扩展,允许转换携带谓词,因此可以对符号字母建模。约简在由符号对组成的字母表上构造一个符号自动机,其中符号对的第一个元素是原始公式字母表中的符号,而第二个元素是位向量。为了处理这个修改后的字母,我们证明了两个可决布尔代数(例如,公式1和位向量1)的笛卡尔积也形成了一个可决布尔代数。为了使决策过程切实可行,我们提出了两个布尔代数的笛卡尔积的两种有效表示,一种基于代数决策图,另一种基于Shannon展开的变体。最后,我们实现了我们的决策程序,并对超过10,000个公式进行了评估。尽管具有通用性,但我们的实现具有与最先进的M2L-STR求解器相当的性能。
{"title":"Monadic second-order logic on finite sequences","authors":"Loris D'antoni, Margus Veanes","doi":"10.1145/3009837.3009844","DOIUrl":"https://doi.org/10.1145/3009837.3009844","url":null,"abstract":"We extend the weak monadic second-order logic of one successor on finite strings (M2L-STR) to symbolic alphabets by allowing character predicates to range over decidable quantifier free theories instead of finite alphabets. We call this logic, which is able to describe sequences over complex and potentially infinite domains, symbolic M2L-STR (S-M2L-STR). We then present a decision procedure for S-M2L-STR based on a reduction to symbolic finite automata, a decidable extension of finite automata that allows transitions to carry predicates and can therefore model symbolic alphabets. The reduction constructs a symbolic automaton over an alphabet consisting of pairs of symbols where the first element of the pair is a symbol in the original formula’s alphabet, while the second element is a bit-vector. To handle this modified alphabet we show that the Cartesian product of two decidable Boolean algebras (e.g., the formula’s one and the bit-vector’s one) also forms a decidable Boolean algebras. To make the decision procedure practical, we propose two efficient representations of the Cartesian product of two Boolean algebras, one based on algebraic decision diagrams and one on a variant of Shannon expansions. Finally, we implement our decision procedure and evaluate it on more than 10,000 formulas. Despite the generality, our implementation has comparable performance with the state-of-the-art M2L-STR solvers.","PeriodicalId":20657,"journal":{"name":"Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0,"publicationDate":"2017-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"88979189","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
Semantic-directed clumping of disjunctive abstract states 析取抽象状态的语义导向聚类
Huisong Li, F. Berenger, B. E. Chang, Xavier Rival
To infer complex structural invariants, shape analyses rely on expressive families of logical properties. Many such analyses manipulate abstract memory states that consist of separating conjunctions of basic predicates describing atomic blocks or summaries. Moreover, they use finite disjunctions of abstract memory states in order to account for dissimilar shapes. Disjunctions should be kept small for the sake of scalability, though precision often requires to keep additional case splits. In this context, deciding when and how to merge case splits and to replace them with summaries is critical both for the precision and for the efficiency. Existing techniques use sets of syntactic rules, which are tedious to design and prone to failure. In this paper, we design a semantic criterion to clump abstract states based on their silhouette which applies not only to the conservative union of disjuncts, but also to the weakening of separating conjunction of memory predicates into inductive summaries. Our approach allows to define union and widening operators that aim at preserving the case splits that are required for the analysis to succeed. We implement this approach in the MemCAD analyzer, and evaluate it on real-world C codes from existing libraries, including programs dealing with doubly linked lists, red-black trees and AVL-trees.
为了推断复杂的结构不变量,形状分析依赖于逻辑属性的表达族。许多这样的分析操作抽象内存状态,这些状态由描述原子块或摘要的基本谓词的分离连词组成。此外,他们使用抽象记忆状态的有限析取来解释不同的形状。出于可伸缩性的考虑,析取应该保持较小,尽管精确通常需要保持额外的case拆分。在这种情况下,决定何时以及如何合并案例分割并将其替换为摘要对于准确性和效率都至关重要。现有的技术使用一组语法规则,设计起来很繁琐,而且容易失败。本文设计了一种基于轮廓的抽象状态聚类的语义准则,该准则不仅适用于离合词的保守并集,而且适用于将记忆谓词的连接分离为归纳总结的弱化。我们的方法允许定义联合运算符和扩展运算符,目的是保留分析成功所需的案例分割。我们在MemCAD分析器中实现了这种方法,并在现有库中的实际C代码上进行了评估,包括处理双链表、红黑树和avl树的程序。
{"title":"Semantic-directed clumping of disjunctive abstract states","authors":"Huisong Li, F. Berenger, B. E. Chang, Xavier Rival","doi":"10.1145/3009837.3009881","DOIUrl":"https://doi.org/10.1145/3009837.3009881","url":null,"abstract":"To infer complex structural invariants, shape analyses rely on expressive families of logical properties. Many such analyses manipulate abstract memory states that consist of separating conjunctions of basic predicates describing atomic blocks or summaries. Moreover, they use finite disjunctions of abstract memory states in order to account for dissimilar shapes. Disjunctions should be kept small for the sake of scalability, though precision often requires to keep additional case splits. In this context, deciding when and how to merge case splits and to replace them with summaries is critical both for the precision and for the efficiency. Existing techniques use sets of syntactic rules, which are tedious to design and prone to failure. In this paper, we design a semantic criterion to clump abstract states based on their silhouette which applies not only to the conservative union of disjuncts, but also to the weakening of separating conjunction of memory predicates into inductive summaries. Our approach allows to define union and widening operators that aim at preserving the case splits that are required for the analysis to succeed. We implement this approach in the MemCAD analyzer, and evaluate it on real-world C codes from existing libraries, including programs dealing with doubly linked lists, red-black trees and AVL-trees.","PeriodicalId":20657,"journal":{"name":"Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0,"publicationDate":"2017-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"78422964","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}
引用次数: 20
Intersection type calculi of bounded dimension 有界维的交型演算
Andrej Dudenhefner, J. Rehof
A notion of dimension in intersection typed λ-calculi is presented. The dimension of a typed λ-term is given by the minimal norm of an elaboration (a proof theoretic decoration) necessary for typing the term at its type, and, intuitively, measures intersection introduction as a resource. Bounded-dimensional intersection type calculi are shown to enjoy subject reduction, since terms can be elaborated in non-increasing norm under β-reduction. We prove that a multiset interpretation (corresponding to a non-idempotent and non-linear interpretation of intersection) of dimensionality corresponds to the number of simultaneous constraints required during search for inhabitants. As a consequence, the inhabitation problem is decidable in bounded multiset dimension, and it is proven to be EXPSPACE-complete. This result is a substantial generalization of inhabitation for the rank 2-fragment, yielding a calculus with decidable inhabitation which is independent of rank. Our results give rise to a new criterion (dimensional bound) for subclasses of intersection type calculi with a decidable inhabitation problem, which is orthogonal to previously known criteria, and which should have immediate applications in synthesis. Additionally, we give examples of dimensional analysis of fragments of the intersection type system, including conservativity over simple types, rank 2-types, and normal form typings, and we provide some observations towards dimensional analysis of other systems. It is suggested (for future work) that our notion of dimension may have semantic interpretations in terms of of reduction complexity.
给出了交型λ-微积分中维数的概念。类型化λ项的维数是由在其类型上类型化该项所需的精化(证明理论修饰)的最小范数给出的,并且直观地度量作为资源的交集引入。有界维相交型微积分具有主题约简性,因为在β-约简下,项可以在非递增范数中进行细化。我们证明了维度的多集解释(对应于交集的非幂等非线性解释)对应于搜索居民时所需的同时约束的数量。结果表明,该问题在有界多集维上是可决定的,并证明了该问题是expspace完全的。这个结果是对秩2片段的居住的一个实质性推广,得到了一个与秩无关的可决定居住的微积分。我们的结果给出了具有可定居住问题的交型微积分子类的一个新的判据(量纲界),该判据与先前已知的判据是正交的,应该在综合中有直接的应用。此外,我们给出了相交类型系统片段的量纲分析示例,包括简单类型、2级类型和范式类型的保守性,并对其他系统的量纲分析提供了一些观察结果。建议(对于未来的工作),我们的维的概念可能有语义的解释在减少复杂性方面。
{"title":"Intersection type calculi of bounded dimension","authors":"Andrej Dudenhefner, J. Rehof","doi":"10.1145/3009837.3009862","DOIUrl":"https://doi.org/10.1145/3009837.3009862","url":null,"abstract":"A notion of dimension in intersection typed λ-calculi is presented. The dimension of a typed λ-term is given by the minimal norm of an elaboration (a proof theoretic decoration) necessary for typing the term at its type, and, intuitively, measures intersection introduction as a resource. Bounded-dimensional intersection type calculi are shown to enjoy subject reduction, since terms can be elaborated in non-increasing norm under β-reduction. We prove that a multiset interpretation (corresponding to a non-idempotent and non-linear interpretation of intersection) of dimensionality corresponds to the number of simultaneous constraints required during search for inhabitants. As a consequence, the inhabitation problem is decidable in bounded multiset dimension, and it is proven to be EXPSPACE-complete. This result is a substantial generalization of inhabitation for the rank 2-fragment, yielding a calculus with decidable inhabitation which is independent of rank. Our results give rise to a new criterion (dimensional bound) for subclasses of intersection type calculi with a decidable inhabitation problem, which is orthogonal to previously known criteria, and which should have immediate applications in synthesis. Additionally, we give examples of dimensional analysis of fragments of the intersection type system, including conservativity over simple types, rank 2-types, and normal form typings, and we provide some observations towards dimensional analysis of other systems. It is suggested (for future work) that our notion of dimension may have semantic interpretations in terms of of reduction complexity.","PeriodicalId":20657,"journal":{"name":"Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0,"publicationDate":"2017-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"75841963","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
Gradual refinement types 逐渐细化类型
Nico Lehmann, É. Tanter
Refinement types are an effective language-based verification technique. However, as any expressive typing discipline, its strength is its weakness, imposing sometimes undesired rigidity. Guided by abstract interpretation, we extend the gradual typing agenda and develop the notion of gradual refinement types, allowing smooth evolution and interoperability between simple types and logically-refined types. In doing so, we address two challenges unexplored in the gradual typing literature: dealing with imprecise logical information, and with dependent function types. The first challenge leads to a crucial notion of locality for refinement formulas, and the second yields novel operators related to type- and term-level substitution, identifying new opportunity for runtime errors in gradual dependently-typed languages. The gradual language we present is type safe, type sound, and satisfies the refined criteria for gradually-typed languages of Siek et al. We also explain how to extend our approach to richer refinement logics, anticipating key challenges to consider.
细化类型是一种有效的基于语言的验证技术。然而,就像任何具有表现力的打字规则一样,它的优点也有缺点,有时会带来不必要的刚性。在抽象解释的指导下,我们扩展了渐进式类型议程,并发展了渐进式细化类型的概念,允许简单类型和逻辑细化类型之间的平滑演变和互操作性。在此过程中,我们解决了渐进式类型文献中未探索的两个挑战:处理不精确的逻辑信息,以及处理相关函数类型。第一个挑战引出了精化公式局部性的关键概念,第二个挑战产生了与类型级和术语级替换相关的新操作符,为逐渐依赖类型的语言中的运行时错误提供了新的机会。我们提出的渐进式语言是类型安全的、类型健全的,并且满足Siek等人对渐进式语言的细化标准。我们还解释了如何将我们的方法扩展到更丰富的细化逻辑,预测需要考虑的关键挑战。
{"title":"Gradual refinement types","authors":"Nico Lehmann, É. Tanter","doi":"10.1145/3009837.3009856","DOIUrl":"https://doi.org/10.1145/3009837.3009856","url":null,"abstract":"Refinement types are an effective language-based verification technique. However, as any expressive typing discipline, its strength is its weakness, imposing sometimes undesired rigidity. Guided by abstract interpretation, we extend the gradual typing agenda and develop the notion of gradual refinement types, allowing smooth evolution and interoperability between simple types and logically-refined types. In doing so, we address two challenges unexplored in the gradual typing literature: dealing with imprecise logical information, and with dependent function types. The first challenge leads to a crucial notion of locality for refinement formulas, and the second yields novel operators related to type- and term-level substitution, identifying new opportunity for runtime errors in gradual dependently-typed languages. The gradual language we present is type safe, type sound, and satisfies the refined criteria for gradually-typed languages of Siek et al. We also explain how to extend our approach to richer refinement logics, anticipating key challenges to consider.","PeriodicalId":20657,"journal":{"name":"Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0,"publicationDate":"2017-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"72927844","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
Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages 第44届ACM SIGPLAN编程语言原理研讨会论文集
Giuseppe Castagna, A. Gordon
Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages (POPL 2017)
第44届ACM SIGPLAN编程语言原理研讨会论文集(POPL 2017)
{"title":"Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages","authors":"Giuseppe Castagna, A. Gordon","doi":"10.1145/3009837","DOIUrl":"https://doi.org/10.1145/3009837","url":null,"abstract":"Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages (POPL 2017)","PeriodicalId":20657,"journal":{"name":"Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0,"publicationDate":"2017-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"83188270","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}
引用次数: 14
QWIRE: a core language for quantum circuits QWIRE:量子电路的核心语言
Jennifer Paykin, Robert Rand, S. Zdancewic
This paper introduces QWIRE (``choir''), a language for defining quantum circuits and an interface for manipulating them inside of an arbitrary classical host language. QWIRE is minimal---it contains only a few primitives---and sound with respect to the physical properties entailed by quantum mechanics. At the same time, QWIRE is expressive and highly modular due to its relationship with the host language, mirroring the QRAM model of computation that places a quantum computer (controlled by circuits) alongside a classical computer (controlled by the host language). We present QWIRE along with its type system and operational semantics, which we prove is safe and strongly normalizing whenever the host language is. We give circuits a denotational semantics in terms of density matrices. Throughout, we investigate examples that demonstrate the expressive power of QWIRE, including extensions to the host language that (1) expose a general analysis framework for circuits, and (2) provide dependent types.
本文介绍了QWIRE (' choir'),一种用于定义量子电路的语言和在任意经典宿主语言中操纵量子电路的接口。QWIRE是最小的——它只包含几个原语——并且相对于量子力学所包含的物理特性是合理的。同时,由于与主语言的关系,QWIRE具有表现力和高度模块化,反映了QRAM计算模型,将量子计算机(由电路控制)与经典计算机(由主语言控制)放在一起。我们介绍了QWIRE及其类型系统和操作语义,我们证明了它是安全的,并且无论宿主语言是什么,它都是强规范化的。我们用密度矩阵给出了电路的指称语义。在整个过程中,我们研究了展示QWIRE表达能力的示例,包括对宿主语言的扩展(1)公开电路的一般分析框架,以及(2)提供依赖类型。
{"title":"QWIRE: a core language for quantum circuits","authors":"Jennifer Paykin, Robert Rand, S. Zdancewic","doi":"10.1145/3009837.3009894","DOIUrl":"https://doi.org/10.1145/3009837.3009894","url":null,"abstract":"This paper introduces QWIRE (``choir''), a language for defining quantum circuits and an interface for manipulating them inside of an arbitrary classical host language. QWIRE is minimal---it contains only a few primitives---and sound with respect to the physical properties entailed by quantum mechanics. At the same time, QWIRE is expressive and highly modular due to its relationship with the host language, mirroring the QRAM model of computation that places a quantum computer (controlled by circuits) alongside a classical computer (controlled by the host language). We present QWIRE along with its type system and operational semantics, which we prove is safe and strongly normalizing whenever the host language is. We give circuits a denotational semantics in terms of density matrices. Throughout, we investigate examples that demonstrate the expressive power of QWIRE, including extensions to the host language that (1) expose a general analysis framework for circuits, and (2) provide dependent types.","PeriodicalId":20657,"journal":{"name":"Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0,"publicationDate":"2017-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"89965650","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}
引用次数: 148
Exact Bayesian inference by symbolic disintegration 符号分解的精确贝叶斯推理
Chung-chieh Shan, N. Ramsey
Bayesian inference, of posterior knowledge from prior knowledge and observed evidence, is typically defined by Bayes's rule, which says the posterior multiplied by the probability of an observation equals a joint probability. But the observation of a continuous quantity usually has probability zero, in which case Bayes's rule says only that the unknown times zero is zero. To infer a posterior distribution from a zero-probability observation, the statistical notion of disintegration tells us to specify the observation as an expression rather than a predicate, but does not tell us how to compute the posterior. We present the first method of computing a disintegration from a probabilistic program and an expression of a quantity to be observed, even when the observation has probability zero. Because the method produces an exact posterior term and preserves a semantics in which monadic terms denote measures, it composes with other inference methods in a modular way-without sacrificing accuracy or performance.
贝叶斯推理,即从先验知识和观察到的证据中推断后验知识,通常由贝叶斯规则定义,即后验乘以观察到的概率等于联合概率。但是观察到的连续量的概率通常为零,在这种情况下,贝叶斯规则只说未知乘以零等于零。为了从零概率观测推断后验分布,分解的统计概念告诉我们将观测指定为表达式而不是谓词,但没有告诉我们如何计算后验。我们提出了从一个概率程序计算分解的第一种方法和待观测量的表达式,即使观测的概率为零。由于该方法产生一个精确的后置项,并保留一元项表示度量的语义,因此它以模块化的方式与其他推理方法组合在一起,而不会牺牲准确性或性能。
{"title":"Exact Bayesian inference by symbolic disintegration","authors":"Chung-chieh Shan, N. Ramsey","doi":"10.1145/3009837.3009852","DOIUrl":"https://doi.org/10.1145/3009837.3009852","url":null,"abstract":"Bayesian inference, of posterior knowledge from prior knowledge and observed evidence, is typically defined by Bayes's rule, which says the posterior multiplied by the probability of an observation equals a joint probability. But the observation of a continuous quantity usually has probability zero, in which case Bayes's rule says only that the unknown times zero is zero. To infer a posterior distribution from a zero-probability observation, the statistical notion of disintegration tells us to specify the observation as an expression rather than a predicate, but does not tell us how to compute the posterior. We present the first method of computing a disintegration from a probabilistic program and an expression of a quantity to be observed, even when the observation has probability zero. Because the method produces an exact posterior term and preserves a semantics in which monadic terms denote measures, it composes with other inference methods in a modular way-without sacrificing accuracy or performance.","PeriodicalId":20657,"journal":{"name":"Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0,"publicationDate":"2017-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"91106571","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}
引用次数: 40
The influence of dependent types (keynote) 从属类型的影响(主题)
Stephanie Weirich
What has dependent type theory done for Haskell? In this talk, I will discuss the influence of dependent types on the design of programming languages and on the practice of functional programmers. Over the past ten years, the Glasgow Haskell compiler has adopted several type system features inspired by dependent type theory. However, this process has not been a direct translation; working in the context of an existing language has lead us to new designs in the semantics of dependent types. I will take a close look at what we have achieved in GHC and discuss what we have learned from this experiment: what works now, what doesn't work yet, and what has surprised us along the way.
依赖类型理论为Haskell做了什么?在这次演讲中,我将讨论依赖类型对编程语言设计和函数式程序员实践的影响。在过去的十年中,Glasgow Haskell编译器采用了一些受依赖类型理论启发的类型系统特性。然而,这个过程并不是直接的翻译;在现有语言的上下文中工作使我们在依赖类型的语义上有了新的设计。我将仔细研究我们在GHC中取得的成就,并讨论我们从这个实验中学到的东西:现在什么有效,什么还不起作用,以及在此过程中什么让我们感到惊讶。
{"title":"The influence of dependent types (keynote)","authors":"Stephanie Weirich","doi":"10.1145/3093333.3009923","DOIUrl":"https://doi.org/10.1145/3093333.3009923","url":null,"abstract":"What has dependent type theory done for Haskell? In this talk, I will discuss the influence of dependent types on the design of programming languages and on the practice of functional programmers. Over the past ten years, the Glasgow Haskell compiler has adopted several type system features inspired by dependent type theory. However, this process has not been a direct translation; working in the context of an existing language has lead us to new designs in the semantics of dependent types. I will take a close look at what we have achieved in GHC and discuss what we have learned from this experiment: what works now, what doesn't work yet, and what has surprised us along the way.","PeriodicalId":20657,"journal":{"name":"Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0,"publicationDate":"2017-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"78965488","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}
引用次数: 6
Automatically generating the dynamic semantics of gradually typed languages 自动生成渐进类型语言的动态语义
M. Cimini, Jeremy G. Siek
Many language designers have adopted gradual typing. However, there remains open questions regarding how to gradualize languages. Cimini and Siek (2016) created a methodology and algorithm to automatically generate the type system of a gradually typed language from a fully static version of the language. In this paper, we address the next challenge of how to automatically generate the dynamic semantics of gradually typed languages. Such languages typically use an intermediate language with explicit casts. Our first result is a methodology for generating the syntax, type system, and dynamic semantics of the intermediate language with casts. Next, we present an algorithm that formalizes and automates the methodology, given a language definition as input. We show that our approach is general enough to automatically gradualize several languages, including features such as polymorphism, recursive types and exceptions. We prove that our algorithm produces languages that satisfy the key correctness criteria of gradual typing. Finally, we implement the algorithm, generating complete specifications of gradually typed languages in lambda-Prolog, including executable interpreters.
许多语言设计者采用了渐进式类型。然而,如何使语言渐进式发展仍然是一个悬而未决的问题。Cimini和Siek(2016)创造了一种方法和算法,从语言的完全静态版本自动生成逐渐类型化语言的类型系统。在本文中,我们解决了如何自动生成渐进式类型语言的动态语义的下一个挑战。这类语言通常使用具有显式强制转换的中间语言。我们的第一个结果是一种通过强制转换生成中间语言的语法、类型系统和动态语义的方法。接下来,我们给出了一种算法,该算法将语言定义作为输入,使该方法形式化并自动化。我们表明,我们的方法足够通用,可以自动地逐步实现多种语言,包括多态性、递归类型和异常等特性。我们证明了我们的算法产生的语言满足渐进式类型的关键正确性标准。最后,我们实现了该算法,在lambda-Prolog中生成了渐进式类型语言的完整规范,包括可执行解释器。
{"title":"Automatically generating the dynamic semantics of gradually typed languages","authors":"M. Cimini, Jeremy G. Siek","doi":"10.1145/3009837.3009863","DOIUrl":"https://doi.org/10.1145/3009837.3009863","url":null,"abstract":"Many language designers have adopted gradual typing. However, there remains open questions regarding how to gradualize languages. Cimini and Siek (2016) created a methodology and algorithm to automatically generate the type system of a gradually typed language from a fully static version of the language. In this paper, we address the next challenge of how to automatically generate the dynamic semantics of gradually typed languages. Such languages typically use an intermediate language with explicit casts. Our first result is a methodology for generating the syntax, type system, and dynamic semantics of the intermediate language with casts. Next, we present an algorithm that formalizes and automates the methodology, given a language definition as input. We show that our approach is general enough to automatically gradualize several languages, including features such as polymorphism, recursive types and exceptions. We prove that our algorithm produces languages that satisfy the key correctness criteria of gradual typing. Finally, we implement the algorithm, generating complete specifications of gradually typed languages in lambda-Prolog, including executable interpreters.","PeriodicalId":20657,"journal":{"name":"Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0,"publicationDate":"2017-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"88603325","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}
引用次数: 28
期刊
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