首页 > 最新文献

Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation最新文献

英文 中文
Securing smart contract with runtime validation 通过运行时验证保护智能合约
Ao Li, Jemin Andrew Choi, Fan Long
We present Solythesis, a source to source Solidity compiler which takes a smart contract code and a user specified invariant as the input and produces an instrumented contract that rejects all transactions that violate the invariant. The design of Solythesis is driven by our observation that the consensus protocol and the storage layer are the primary and the secondary performance bottlenecks of Ethereum, respectively. Solythesis operates with our novel delta update and delta check techniques to minimize the overhead caused by the instrumented storage access statements. Our experimental results validate our hypothesis that the overhead of runtime validation, which is often too expensive for other domains, is in fact negligible for smart contracts. The CPU overhead of Solythesis is only 0.1% on average for our 23 benchmark contracts.
我们介绍了Solythesis,这是一个源到源的Solidity编译器,它以智能合约代码和用户指定的不变量作为输入,并产生一个工具化的合约,拒绝所有违反不变量的交易。我们观察到共识协议和存储层分别是以太坊的主要和次要性能瓶颈,因此设计了Solythesis。Solythesis使用我们新颖的增量更新和增量检查技术来最小化由仪表化存储访问语句引起的开销。我们的实验结果验证了我们的假设,即运行时验证的开销对于其他领域来说通常过于昂贵,实际上对于智能合约来说可以忽略不计。在我们的23个基准合约中,Solythesis的CPU开销平均仅为0.1%。
{"title":"Securing smart contract with runtime validation","authors":"Ao Li, Jemin Andrew Choi, Fan Long","doi":"10.1145/3385412.3385982","DOIUrl":"https://doi.org/10.1145/3385412.3385982","url":null,"abstract":"We present Solythesis, a source to source Solidity compiler which takes a smart contract code and a user specified invariant as the input and produces an instrumented contract that rejects all transactions that violate the invariant. The design of Solythesis is driven by our observation that the consensus protocol and the storage layer are the primary and the secondary performance bottlenecks of Ethereum, respectively. Solythesis operates with our novel delta update and delta check techniques to minimize the overhead caused by the instrumented storage access statements. Our experimental results validate our hypothesis that the overhead of runtime validation, which is often too expensive for other domains, is in fact negligible for smart contracts. The CPU overhead of Solythesis is only 0.1% on average for our 23 benchmark contracts.","PeriodicalId":20580,"journal":{"name":"Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation","volume":"60 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2020-06-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"83591917","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}
引用次数: 43
Towards an API for the real numbers 面向实数的API
H. Boehm
The real numbers are pervasive, both in daily life, and in mathematics. Students spend much time studying their properties. Yet computers and programming languages generally provide only an approximation geared towards performance, at the expense of many of the nice properties we were taught in high school. Although this is entirely appropriate for many applications, particularly those that are sensitive to arithmetic performance in the usual sense, we argue that there are others where it is a poor choice. If arithmetic computations and result are directly exposed to human users who are not floating point experts, floating point approximations tend to be viewed as bugs. For applications such as calculators, spreadsheets, and various verification tasks, the cost of precision sacrifices is high, and the performance benefit is often not critical. We argue that previous attempts to provide accurate and understandable results for such applications using the recursive reals were great steps in the right direction, but they do not suffice. Comparing recursive reals diverges if they are equal. In many cases, comparison of numbers, including equal ones, is both important, particularly in simple cases, and intractable in the general case. We propose an API for a real number type that explicitly provides decidable equality in the easy common cases, in which it is often unnatural not to. We describe a surprisingly compact and simple implementation in detail. The approach relies heavily on classical number theory results. We demonstrate the utility of such a facility in two applications: testing floating point functions, and to implement arithmetic in Google's Android calculator application.
无论是在日常生活中,还是在数学中,实数都无处不在。学生花很多时间研究他们的属性。然而,计算机和编程语言通常只提供了一种近似的性能,而牺牲了我们在高中学到的许多优秀特性。尽管这对于许多应用程序来说是完全合适的,特别是那些通常意义上对算术性能敏感的应用程序,但我们认为在其他应用程序中,这是一个糟糕的选择。如果算术计算和结果直接暴露给不是浮点专家的人类用户,则浮点近似值往往被视为错误。对于诸如计算器、电子表格和各种验证任务之类的应用程序,牺牲精度的成本很高,而性能收益通常并不重要。我们认为,以前使用递归实数为此类应用提供准确且可理解的结果的尝试是朝着正确方向迈出的重要一步,但这还不够。比较递归实数是发散的,如果它们相等。在许多情况下,数字的比较,包括相等的数字,是重要的,特别是在简单的情况下,和棘手的一般情况下。我们提出了一个实数类型的API,它在简单的常见情况下显式地提供可判定的相等性,在这种情况下,不这样做通常是不自然的。我们详细描述了一个惊人的紧凑和简单的实现。这种方法很大程度上依赖于经典数论的结果。我们在两个应用程序中演示了这种工具的实用性:测试浮点函数,以及在b谷歌的Android计算器应用程序中实现算术。
{"title":"Towards an API for the real numbers","authors":"H. Boehm","doi":"10.1145/3385412.3386037","DOIUrl":"https://doi.org/10.1145/3385412.3386037","url":null,"abstract":"The real numbers are pervasive, both in daily life, and in mathematics. Students spend much time studying their properties. Yet computers and programming languages generally provide only an approximation geared towards performance, at the expense of many of the nice properties we were taught in high school. Although this is entirely appropriate for many applications, particularly those that are sensitive to arithmetic performance in the usual sense, we argue that there are others where it is a poor choice. If arithmetic computations and result are directly exposed to human users who are not floating point experts, floating point approximations tend to be viewed as bugs. For applications such as calculators, spreadsheets, and various verification tasks, the cost of precision sacrifices is high, and the performance benefit is often not critical. We argue that previous attempts to provide accurate and understandable results for such applications using the recursive reals were great steps in the right direction, but they do not suffice. Comparing recursive reals diverges if they are equal. In many cases, comparison of numbers, including equal ones, is both important, particularly in simple cases, and intractable in the general case. We propose an API for a real number type that explicitly provides decidable equality in the easy common cases, in which it is often unnatural not to. We describe a surprisingly compact and simple implementation in detail. The approach relies heavily on classical number theory results. We demonstrate the utility of such a facility in two applications: testing floating point functions, and to implement arithmetic in Google's Android calculator application.","PeriodicalId":20580,"journal":{"name":"Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation","volume":"109 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2020-06-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"79261607","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}
引用次数: 11
λPSI: exact inference for higher-order probabilistic programs λPSI:高阶概率程序的精确推理
Timon Gehr, Samuel Steffen, Martin T. Vechev
We present λPSI, the first probabilistic programming language and system that supports higher-order exact inference for probabilistic programs with first-class functions, nested inference and discrete, continuous and mixed random variables. λPSI’s solver is based on symbolic reasoning and computes the exact distribution represented by a program. We show that λPSI is practically effective—it automatically computes exact distributions for a number of interesting applications, from rational agents to information theory, many of which could so far only be handled approximately.
我们提出了λPSI,这是第一个支持高阶精确推理的概率程序的概率编程语言和系统,具有一级函数,嵌套推理和离散,连续和混合随机变量。λPSI求解器基于符号推理,计算由程序表示的精确分布。我们证明λPSI实际上是有效的——它自动计算许多有趣应用的精确分布,从理性代理到信息论,其中许多应用到目前为止只能近似处理。
{"title":"λPSI: exact inference for higher-order probabilistic programs","authors":"Timon Gehr, Samuel Steffen, Martin T. Vechev","doi":"10.1145/3385412.3386006","DOIUrl":"https://doi.org/10.1145/3385412.3386006","url":null,"abstract":"We present λPSI, the first probabilistic programming language and system that supports higher-order exact inference for probabilistic programs with first-class functions, nested inference and discrete, continuous and mixed random variables. λPSI’s solver is based on symbolic reasoning and computes the exact distribution represented by a program. We show that λPSI is practically effective—it automatically computes exact distributions for a number of interesting applications, from rational agents to information theory, many of which could so far only be handled approximately.","PeriodicalId":20580,"journal":{"name":"Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation","volume":"6 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2020-06-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"81028007","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}
引用次数: 24
Semantic code search via equational reasoning 通过等式推理进行语义代码搜索
Varot Premtoon, James Koppel, Armando Solar-Lezama
We present a new approach to semantic code search based on equational reasoning, and the Yogo tool implementing this approach. Our approach works by considering not only the dataflow graph of a function, but also the dataflow graphs of all equivalent functions reachable via a set of rewrite rules. In doing so, it can recognize an operation even if it uses alternate APIs, is in a different but mathematically-equivalent form, is split apart with temporary variables, or is interleaved with other code. Furthermore, it can recognize when code is an instance of some higher-level concept such as iterating through a file. Because of this, from a single query, Yogo can find equivalent code in multiple languages. Our evaluation further shows the utility of Yogo beyond code search: encoding a buggy pattern as a Yogo query, we found a bug in Oracle’s Graal compiler which had been missed by a hand-written static analyzer designed for that exact kind of bug. Yogo is built on the Cubix multi-language infrastructure, and currently supports Java and Python.
我们提出了一种基于等式推理的语义代码搜索的新方法,以及实现这种方法的Yogo工具。我们的方法不仅考虑函数的数据流图,而且考虑通过一组重写规则可到达的所有等效函数的数据流图。通过这样做,它可以识别操作,即使它使用替代api,以不同但数学等效的形式,用临时变量分开,或与其他代码交叉。此外,它还可以识别代码何时是某个高级概念的实例,例如遍历文件。正因为如此,从单个查询中,Yogo可以找到多种语言的等效代码。我们的评估进一步显示了Yogo在代码搜索之外的效用:将有bug的模式编码为Yogo查询,我们在Oracle的Graal编译器中发现了一个bug,而这个bug是专门为这种bug设计的手写静态分析器所遗漏的。Yogo建立在Cubix多语言基础设施之上,目前支持Java和Python。
{"title":"Semantic code search via equational reasoning","authors":"Varot Premtoon, James Koppel, Armando Solar-Lezama","doi":"10.1145/3385412.3386001","DOIUrl":"https://doi.org/10.1145/3385412.3386001","url":null,"abstract":"We present a new approach to semantic code search based on equational reasoning, and the Yogo tool implementing this approach. Our approach works by considering not only the dataflow graph of a function, but also the dataflow graphs of all equivalent functions reachable via a set of rewrite rules. In doing so, it can recognize an operation even if it uses alternate APIs, is in a different but mathematically-equivalent form, is split apart with temporary variables, or is interleaved with other code. Furthermore, it can recognize when code is an instance of some higher-level concept such as iterating through a file. Because of this, from a single query, Yogo can find equivalent code in multiple languages. Our evaluation further shows the utility of Yogo beyond code search: encoding a buggy pattern as a Yogo query, we found a bug in Oracle’s Graal compiler which had been missed by a hand-written static analyzer designed for that exact kind of bug. Yogo is built on the Cubix multi-language infrastructure, and currently supports Java and Python.","PeriodicalId":20580,"journal":{"name":"Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation","volume":"33 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2020-06-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"81950361","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}
引用次数: 39
CARAT: a case for virtual memory through compiler- and runtime-based address translation CARAT:通过基于编译器和运行时的地址转换实现虚拟内存的一种情况
Brian Suchy, Simone Campanoni, Nikos Hardavellas, P. Dinda
Virtual memory is a critical abstraction in modern computer systems. Its common model, paging, is currently seeing considerable innovation, yet its implementations continue to be co-designs between power-hungry/latency-adding hardware (e.g., TLBs, pagewalk caches, pagewalkers, etc) and software (the OS kernel). We make a case for a new model for virtual memory, compiler- and runtime-based address translation (CARAT), which instead is a co-design between the compiler and the OS kernel. CARAT can operate without any hardware support, although it could also be retrofitted into a traditional paging model, and could leverage simpler hardware support. CARAT uses compile-time transformations and optimizations combined with tightly-coupled runtime/kernel interaction to generate programs that run efficiently in a physical address space, but nonetheless allow the kernel to maintain protection and dynamically manage physical memory similar to what is possible using traditional virtual memory. We argue for the feasibility of CARAT through an empirical study of application characteristics and kernel behavior, as well as through the design, implementation, and performance evaluation of a CARAT prototype. Because our prototype works at the IR level (in particular, via LLVM bitcode), it can be applied to most C and C++ programs with minimal or no restrictions.
虚拟内存是现代计算机系统中一个重要的抽象概念。它的通用模型分页,目前正在进行相当大的创新,但它的实现仍然是在耗电/延迟增加的硬件(例如,tlb、页游动缓存、页游动等)和软件(操作系统内核)之间共同设计的。我们为虚拟内存、基于编译器和运行时的地址转换(CARAT)提出了一个新模型,它是编译器和操作系统内核之间的协同设计。CARAT可以在没有任何硬件支持的情况下运行,尽管它也可以改装成传统的分页模型,并且可以利用更简单的硬件支持。CARAT使用编译时转换和优化,结合紧耦合的运行时/内核交互,生成在物理地址空间中有效运行的程序,但仍然允许内核维护保护并动态管理物理内存,这与使用传统虚拟内存类似。我们通过应用程序特征和内核行为的实证研究,以及通过CARAT原型的设计、实现和性能评估来论证CARAT的可行性。因为我们的原型工作在IR级别(特别是通过LLVM位码),所以它可以应用于大多数C和c++程序,几乎没有限制。
{"title":"CARAT: a case for virtual memory through compiler- and runtime-based address translation","authors":"Brian Suchy, Simone Campanoni, Nikos Hardavellas, P. Dinda","doi":"10.1145/3385412.3385987","DOIUrl":"https://doi.org/10.1145/3385412.3385987","url":null,"abstract":"Virtual memory is a critical abstraction in modern computer systems. Its common model, paging, is currently seeing considerable innovation, yet its implementations continue to be co-designs between power-hungry/latency-adding hardware (e.g., TLBs, pagewalk caches, pagewalkers, etc) and software (the OS kernel). We make a case for a new model for virtual memory, compiler- and runtime-based address translation (CARAT), which instead is a co-design between the compiler and the OS kernel. CARAT can operate without any hardware support, although it could also be retrofitted into a traditional paging model, and could leverage simpler hardware support. CARAT uses compile-time transformations and optimizations combined with tightly-coupled runtime/kernel interaction to generate programs that run efficiently in a physical address space, but nonetheless allow the kernel to maintain protection and dynamically manage physical memory similar to what is possible using traditional virtual memory. We argue for the feasibility of CARAT through an empirical study of application characteristics and kernel behavior, as well as through the design, implementation, and performance evaluation of a CARAT prototype. Because our prototype works at the IR level (in particular, via LLVM bitcode), it can be applied to most C and C++ programs with minimal or no restrictions.","PeriodicalId":20580,"journal":{"name":"Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation","volume":"33 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2020-06-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"81005032","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}
引用次数: 11
A marriage of pointer- and epoch-based reclamation 这是指针式和时代性改造的结合
Jeehoon Kang, Jaehwang Jung
All pointer-based nonblocking concurrent data structures should deal with the problem of safe memory reclamation: before reclaiming a memory block, a thread should ensure no other threads hold a local pointer to the block that may later be dereferenced. Various safe memory reclamation schemes have been proposed in the literature, but none of them satisfy the following desired properties at the same time: (i) robust: a non-cooperative thread does not prevent the other threads from reclaiming an unbounded number of blocks; (ii) fast: it does not incur significant time overhead; (iii) compact: it does not incur significant space overhead; (iv) self-contained: it neither relies on special hardware/OS supports nor intrusively affects execution environments; and (v) widely applicable: it supports many data structures. We introduce PEBR, which we believe is the first scheme that satisfies all the properties above. PEBR is inspired by Snowflake’s hybrid design of pointer- and epoch-based reclamation schemes (PBR and EBR, resp.) that is mostly robust, fast, and compact but neither self-contained nor widely applicable. To achieve self-containedness, we design algorithms using only the standard C/C++ concurrency features and process-wide memory fence. To achieve wide applicability, we characterize PEBR’s requirement for safe reclamation that is satisfied by a variety of data structures, including Harris’s and Harris-Herlihy-Shavit’s lists that are not supported by PBR. We experimentally evaluate whether PEBR is fast and robust using microbenchmarks, for which PEBR performs comparably to the state-of-the-art schemes.
所有基于指针的非阻塞并发数据结构都应该处理安全内存回收的问题:在回收内存块之前,线程应该确保没有其他线程持有指向该块的本地指针,该指针可能会在以后被解引用。文献中已经提出了各种安全的内存回收方案,但它们都不能同时满足以下期望的特性:(i)鲁棒性:非合作线程不会阻止其他线程回收无限数量的块;(ii)快速:不会产生重大的时间开销;(iii)紧凑:不会造成很大的空间开销;(iv)自包含:它既不依赖于特殊的硬件/操作系统支持,也不会侵入性地影响执行环境;(v)广泛适用:它支持许多数据结构。我们引入PEBR,我们认为它是第一个满足上述所有性质的方案。PEBR的灵感来自于Snowflake基于指针和时代的回收方案(PBR和EBR)的混合设计,这些方案大多是健壮、快速和紧凑的,但既不独立,也不广泛适用。为了实现自包含性,我们只使用标准的C/ c++并发特性和进程范围的内存围栏来设计算法。为了实现广泛的适用性,我们描述了PEBR对安全回收的需求,这种需求可以通过各种数据结构来满足,包括不受PBR支持的Harris和Harris- herlihy - shavit列表。我们通过实验评估PEBR是否具有快速和鲁棒性,使用微基准测试,PEBR的性能与最先进的方案相当。
{"title":"A marriage of pointer- and epoch-based reclamation","authors":"Jeehoon Kang, Jaehwang Jung","doi":"10.1145/3385412.3385978","DOIUrl":"https://doi.org/10.1145/3385412.3385978","url":null,"abstract":"All pointer-based nonblocking concurrent data structures should deal with the problem of safe memory reclamation: before reclaiming a memory block, a thread should ensure no other threads hold a local pointer to the block that may later be dereferenced. Various safe memory reclamation schemes have been proposed in the literature, but none of them satisfy the following desired properties at the same time: (i) robust: a non-cooperative thread does not prevent the other threads from reclaiming an unbounded number of blocks; (ii) fast: it does not incur significant time overhead; (iii) compact: it does not incur significant space overhead; (iv) self-contained: it neither relies on special hardware/OS supports nor intrusively affects execution environments; and (v) widely applicable: it supports many data structures. We introduce PEBR, which we believe is the first scheme that satisfies all the properties above. PEBR is inspired by Snowflake’s hybrid design of pointer- and epoch-based reclamation schemes (PBR and EBR, resp.) that is mostly robust, fast, and compact but neither self-contained nor widely applicable. To achieve self-containedness, we design algorithms using only the standard C/C++ concurrency features and process-wide memory fence. To achieve wide applicability, we characterize PEBR’s requirement for safe reclamation that is satisfied by a variety of data structures, including Harris’s and Harris-Herlihy-Shavit’s lists that are not supported by PBR. We experimentally evaluate whether PEBR is fast and robust using microbenchmarks, for which PEBR performs comparably to the state-of-the-art schemes.","PeriodicalId":20580,"journal":{"name":"Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation","volume":"68 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2020-06-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"75229442","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}
引用次数: 12
NV: an intermediate language for verification of network control planes 用于验证网络控制平面的中间语言
Nick Giannarakis, Devon Loehr, Ryan Beckett, D. Walker
Network misconfiguration has caused a raft of high-profile outages over the past decade, spurring researchers to develop a variety of network analysis and verification tools. Unfortunately, developing and maintaining such tools is an enormous challenge due to the complexity of network configuration languages. Inspired by work on intermediate languages for verification such as Boogie and Why3, we develop NV, an intermediate language for verification of network control planes. NV carefully walks the line between expressiveness and tractability, making it possible to build models for a practical subset of real protocols and their configurations, and also facilitate rapid development of tools that outperform state-of-the-art simulators (seconds vs minutes) and verifiers (often 10x faster). Furthermore, we show that it is possible to develop novel analyses just by writing new NV programs. In particular, we implement a new fault-tolerance analysis that scales to far larger networks than existing tools.
在过去的十年中,网络配置错误导致了大量引人注目的中断,这促使研究人员开发了各种网络分析和验证工具。不幸的是,由于网络配置语言的复杂性,开发和维护这样的工具是一个巨大的挑战。受Boogie和Why3等用于验证的中间语言的启发,我们开发了NV,一种用于验证网络控制平面的中间语言。NV小心地在表达性和可追踪性之间游走,使得为真实协议及其配置的实际子集构建模型成为可能,并且还促进了快速开发优于最先进的模拟器(秒vs分钟)和验证器(通常快10倍)的工具。此外,我们表明,仅通过编写新的NV程序就可以开发新的分析。特别是,我们实现了一种新的容错分析,它可以扩展到比现有工具大得多的网络。
{"title":"NV: an intermediate language for verification of network control planes","authors":"Nick Giannarakis, Devon Loehr, Ryan Beckett, D. Walker","doi":"10.1145/3385412.3386019","DOIUrl":"https://doi.org/10.1145/3385412.3386019","url":null,"abstract":"Network misconfiguration has caused a raft of high-profile outages over the past decade, spurring researchers to develop a variety of network analysis and verification tools. Unfortunately, developing and maintaining such tools is an enormous challenge due to the complexity of network configuration languages. Inspired by work on intermediate languages for verification such as Boogie and Why3, we develop NV, an intermediate language for verification of network control planes. NV carefully walks the line between expressiveness and tractability, making it possible to build models for a practical subset of real protocols and their configurations, and also facilitate rapid development of tools that outperform state-of-the-art simulators (seconds vs minutes) and verifiers (often 10x faster). Furthermore, we show that it is possible to develop novel analyses just by writing new NV programs. In particular, we implement a new fault-tolerance analysis that scales to far larger networks than existing tools.","PeriodicalId":20580,"journal":{"name":"Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation","volume":"25 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2020-06-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"74756099","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}
引用次数: 19
Effective function merging in the SSA form SSA形式的有效函数合并
Rodrigo C. O. Rocha, Pavlos Petoumenos, Zheng Wang, M. Cole, Hugh Leather
Function merging is an important optimization for reducing code size. This technique eliminates redundant code across functions by merging them into a single function. While initially limited to identical or trivially similar functions, the most recent approach can identify all merging opportunities in arbitrary pairs of functions. However, this approach has a serious limitation which prevents it from reaching its full potential. Because it cannot handle phi-nodes, the state-of-the-art applies register demotion to eliminate them before applying its core algorithm. While a superficially minor workaround, this has a three-fold negative effect: by artificially lengthening the instruction sequences to be aligned, it hinders the identification of mergeable instruction; it prevents a vast number of functions from being profitably merged; it increases compilation overheads, both in terms of compile-time and memory usage. We present SalSSA, a novel approach that fully supports the SSA form, removing any need for register demotion. By doing so, we notably increase the number of profitably merged functions. We implement SalSSA in LLVM and apply it to the SPEC 2006 and 2017 suites. Experimental results show that our approach delivers on average, 7.9% to 9.7% reduction on the final size of the compiled code. This translates to around 2x more code size reduction over the state-of-the-art. Moreover, as a result of aligning shorter sequences of instructions and reducing the number of wasteful merge operations, our new approach incurs an average compile-time overhead of only 5%, 3x less than the state-of-the-art, while also reducing memory usage by over 2x.
函数合并是减少代码大小的重要优化。这种技术通过将函数合并到单个函数中,消除了函数之间的冗余代码。虽然最初仅限于相同或非常相似的函数,但最新的方法可以识别任意函数对中的所有合并机会。然而,这种方法有一个严重的限制,使它无法充分发挥其潜力。由于无法处理phi节点,最先进的技术在应用其核心算法之前使用寄存器降级来消除它们。虽然表面上是一个次要的解决方案,但这有三方面的负面影响:通过人为地延长要对齐的指令序列,它阻碍了可合并指令的识别;它阻止了大量的职能被有利可图地合并;它增加了编译开销,包括编译时间和内存使用。我们提出了SalSSA,一种完全支持SSA表单的新方法,消除了对注册降级的任何需要。通过这样做,我们显著地增加了有利可图的合并功能的数量。我们在LLVM中实现了SalSSA,并将其应用于SPEC 2006和2017套件。实验结果表明,我们的方法在编译代码的最终大小上平均减少了7.9%到9.7%。这意味着与最先进的技术相比,代码大小减少了大约2倍。此外,由于对齐较短的指令序列和减少浪费的合并操作的数量,我们的新方法平均编译时开销仅为5%,比最先进的方法少3倍,同时还减少了2倍以上的内存使用。
{"title":"Effective function merging in the SSA form","authors":"Rodrigo C. O. Rocha, Pavlos Petoumenos, Zheng Wang, M. Cole, Hugh Leather","doi":"10.1145/3385412.3386030","DOIUrl":"https://doi.org/10.1145/3385412.3386030","url":null,"abstract":"Function merging is an important optimization for reducing code size. This technique eliminates redundant code across functions by merging them into a single function. While initially limited to identical or trivially similar functions, the most recent approach can identify all merging opportunities in arbitrary pairs of functions. However, this approach has a serious limitation which prevents it from reaching its full potential. Because it cannot handle phi-nodes, the state-of-the-art applies register demotion to eliminate them before applying its core algorithm. While a superficially minor workaround, this has a three-fold negative effect: by artificially lengthening the instruction sequences to be aligned, it hinders the identification of mergeable instruction; it prevents a vast number of functions from being profitably merged; it increases compilation overheads, both in terms of compile-time and memory usage. We present SalSSA, a novel approach that fully supports the SSA form, removing any need for register demotion. By doing so, we notably increase the number of profitably merged functions. We implement SalSSA in LLVM and apply it to the SPEC 2006 and 2017 suites. Experimental results show that our approach delivers on average, 7.9% to 9.7% reduction on the final size of the compiled code. This translates to around 2x more code size reduction over the state-of-the-art. Moreover, as a result of aligning shorter sequences of instructions and reducing the number of wasteful merge operations, our new approach incurs an average compile-time overhead of only 5%, 3x less than the state-of-the-art, while also reducing memory usage by over 2x.","PeriodicalId":20580,"journal":{"name":"Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation","volume":"157 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2020-06-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"85027001","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
SCAF: a speculation-aware collaborative dependence analysis framework SCAF:一个推测感知的协作依赖分析框架
Sotiris Apostolakis, Ziyang Xu, Zujun Tan, Greg Chan, Simone Campanoni, David I. August
Program analysis determines the potential dataflow and control flow relationships among instructions so that compiler optimizations can respect these relationships to transform code correctly. Since many of these relationships rarely or never occur, speculative optimizations assert they do not exist while optimizing the code. To preserve correctness, speculative optimizations add validation checks to activate recovery code when these assertions prove untrue. This approach results in many missed opportunities because program analysis and thus other optimizations remain unaware of the full impact of these dynamically-enforced speculative assertions. To address this problem, this paper presents SCAF, a Speculation-aware Collaborative dependence Analysis Framework. SCAF learns of available speculative assertions via profiling, computes their full impact on memory dependence analysis, and makes this resulting information available for all code optimizations. SCAF is modular (adding new analysis modules is easy) and collaborative (modules cooperate to produce a result more precise than the confluence of all individual results). Relative to the best prior speculation-aware dependence analysis technique, by computing the full impact of speculation on memory dependence analysis, SCAF dramatically reduces the need for expensive-to-validate memory speculation in the hot loops of all 16 evaluated C/C++ SPEC benchmarks.
程序分析确定指令之间潜在的数据流和控制流关系,以便编译器优化能够尊重这些关系以正确转换代码。由于其中许多关系很少或从未发生,因此推测性优化在优化代码时断言它们不存在。为了保持正确性,推测性优化添加了验证检查,以便在这些断言被证明不正确时激活恢复代码。这种方法导致许多错失的机会,因为程序分析和其他优化仍然没有意识到这些动态强制推测断言的全部影响。为了解决这个问题,本文提出了SCAF,一个推测感知的协作依赖分析框架。SCAF通过分析了解可用的推测断言,计算它们对内存依赖性分析的全部影响,并使这些结果信息可用于所有代码优化。SCAF是模块化的(添加新的分析模块很容易)和协作的(模块合作产生的结果比所有单个结果的汇合更精确)。相对于最好的预先推测依赖性分析技术,通过计算推测对内存依赖性分析的全部影响,SCAF显著减少了在所有16个评估的C/ c++ SPEC基准的热循环中验证昂贵的内存推测的需要。
{"title":"SCAF: a speculation-aware collaborative dependence analysis framework","authors":"Sotiris Apostolakis, Ziyang Xu, Zujun Tan, Greg Chan, Simone Campanoni, David I. August","doi":"10.1145/3385412.3386028","DOIUrl":"https://doi.org/10.1145/3385412.3386028","url":null,"abstract":"Program analysis determines the potential dataflow and control flow relationships among instructions so that compiler optimizations can respect these relationships to transform code correctly. Since many of these relationships rarely or never occur, speculative optimizations assert they do not exist while optimizing the code. To preserve correctness, speculative optimizations add validation checks to activate recovery code when these assertions prove untrue. This approach results in many missed opportunities because program analysis and thus other optimizations remain unaware of the full impact of these dynamically-enforced speculative assertions. To address this problem, this paper presents SCAF, a Speculation-aware Collaborative dependence Analysis Framework. SCAF learns of available speculative assertions via profiling, computes their full impact on memory dependence analysis, and makes this resulting information available for all code optimizations. SCAF is modular (adding new analysis modules is easy) and collaborative (modules cooperate to produce a result more precise than the confluence of all individual results). Relative to the best prior speculation-aware dependence analysis technique, by computing the full impact of speculation on memory dependence analysis, SCAF dramatically reduces the need for expensive-to-validate memory speculation in the hot loops of all 16 evaluated C/C++ SPEC benchmarks.","PeriodicalId":20580,"journal":{"name":"Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation","volume":"19 1 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2020-06-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"89929235","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}
引用次数: 8
Validating SMT solvers via semantic fusion 通过语义融合验证SMT求解器
Dominik Winterer, Chengyu Zhang, Z. Su
We introduce Semantic Fusion, a general, effective methodology for validating Satisfiability Modulo Theory (SMT) solvers. Our key idea is to fuse two existing equisatisfiable (i.e., both satisfiable or unsatisfiable) formulas into a new formula that combines the structures of its ancestors in a novel manner and preserves the satisfiability by construction. This fused formula is then used for validating SMT solvers. We realized Semantic Fusion as YinYang, a practical SMT solver testing tool. During four months of extensive testing, YinYang has found 45 confirmed, unique bugs in the default arithmetic and string solvers of Z3 and CVC4, the two state-of-the-art SMT solvers. Among these, 41 have already been fixed by the developers. The majority (29/45) of these bugs expose critical soundness issues. Our bug reports and testing effort have been well-appreciated by SMT solver developers.
我们介绍语义融合,一个通用的,有效的方法来验证可满足模理论(SMT)求解。我们的关键思想是将两个现有的可满足的(即可满足的或不可满足的)公式融合成一个新的公式,以一种新颖的方式结合其祖先的结构,并通过构造保持可满足性。然后使用此融合公式验证SMT求解器。我们将语义融合作为一款实用的SMT求解器测试工具YinYang实现。在四个月的广泛测试中,银阳在Z3和CVC4这两个最先进的SMT求解器的默认算法和字符串求解器中发现了45个已确认的独特bug。其中41个已经被开发者修复。这些bug中的大多数(29/45)暴露了关键的可靠性问题。我们的错误报告和测试工作得到了SMT求解器开发人员的赞赏。
{"title":"Validating SMT solvers via semantic fusion","authors":"Dominik Winterer, Chengyu Zhang, Z. Su","doi":"10.1145/3385412.3385985","DOIUrl":"https://doi.org/10.1145/3385412.3385985","url":null,"abstract":"We introduce Semantic Fusion, a general, effective methodology for validating Satisfiability Modulo Theory (SMT) solvers. Our key idea is to fuse two existing equisatisfiable (i.e., both satisfiable or unsatisfiable) formulas into a new formula that combines the structures of its ancestors in a novel manner and preserves the satisfiability by construction. This fused formula is then used for validating SMT solvers. We realized Semantic Fusion as YinYang, a practical SMT solver testing tool. During four months of extensive testing, YinYang has found 45 confirmed, unique bugs in the default arithmetic and string solvers of Z3 and CVC4, the two state-of-the-art SMT solvers. Among these, 41 have already been fixed by the developers. The majority (29/45) of these bugs expose critical soundness issues. Our bug reports and testing effort have been well-appreciated by SMT solver developers.","PeriodicalId":20580,"journal":{"name":"Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation","volume":"46 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2020-06-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"81368936","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}
引用次数: 52
期刊
Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation
全部 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