首页 > 最新文献

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

英文 中文
Synthesizing data structure transformations from input-output examples 从输入-输出示例中合成数据结构转换
John K. Feser, Swarat Chaudhuri, Işıl Dillig
We present a method for example-guided synthesis of functional programs over recursive data structures. Given a set of input-output examples, our method synthesizes a program in a functional language with higher-order combinators like map and fold. The synthesized program is guaranteed to be the simplest program in the language to fit the examples. Our approach combines three technical ideas: inductive generalization, deduction, and enumerative search. First, we generalize the input-output examples into hypotheses about the structure of the target program. For each hypothesis, we use deduction to infer new input/output examples for the missing subexpressions. This leads to a new subproblem where the goal is to synthesize expressions within each hypothesis. Since not every hypothesis can be realized into a program that fits the examples, we use a combination of best-first enumeration and deduction to search for a hypothesis that meets our needs. We have implemented our method in a tool called λ2, and we evaluate this tool on a large set of synthesis problems involving lists, trees, and nested data structures. The experiments demonstrate the scalability and broad scope of λ2. A highlight is the synthesis of a program believed to be the world's earliest functional pearl.
我们提出了一种递归数据结构上函数程序的实例指导合成方法。给定一组输入输出示例,我们的方法在函数式语言中使用map和fold等高阶组合子来合成程序。合成程序保证是该语言中最简单的程序。我们的方法结合了三种技术思想:归纳概括、演绎和枚举搜索。首先,我们将输入输出示例推广到关于目标程序结构的假设中。对于每个假设,我们使用演绎来推断缺失子表达式的新输入/输出示例。这导致了一个新的子问题,其目标是在每个假设中合成表达式。由于不是每个假设都可以实现成适合示例的程序,因此我们使用最佳优先枚举和演绎的组合来搜索满足我们需要的假设。我们已经在一个名为λ2的工具中实现了我们的方法,并且我们在涉及列表、树和嵌套数据结构的大量综合问题上评估了这个工具。实验证明了λ2的可扩展性和广泛的适用范围。一个亮点是一个程序的合成,被认为是世界上最早的功能性珍珠。
{"title":"Synthesizing data structure transformations from input-output examples","authors":"John K. Feser, Swarat Chaudhuri, Işıl Dillig","doi":"10.1145/2737924.2737977","DOIUrl":"https://doi.org/10.1145/2737924.2737977","url":null,"abstract":"We present a method for example-guided synthesis of functional programs over recursive data structures. Given a set of input-output examples, our method synthesizes a program in a functional language with higher-order combinators like map and fold. The synthesized program is guaranteed to be the simplest program in the language to fit the examples. Our approach combines three technical ideas: inductive generalization, deduction, and enumerative search. First, we generalize the input-output examples into hypotheses about the structure of the target program. For each hypothesis, we use deduction to infer new input/output examples for the missing subexpressions. This leads to a new subproblem where the goal is to synthesize expressions within each hypothesis. Since not every hypothesis can be realized into a program that fits the examples, we use a combination of best-first enumeration and deduction to search for a hypothesis that meets our needs. We have implemented our method in a tool called λ2, and we evaluate this tool on a large set of synthesis problems involving lists, trees, and nested data structures. The experiments demonstrate the scalability and broad scope of λ2. A highlight is the synthesis of a program believed to be the world's earliest functional pearl.","PeriodicalId":104101,"journal":{"name":"Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation","volume":"110 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2015-06-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"133782345","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}
引用次数: 303
Declarative programming over eventually consistent data stores 在最终一致的数据存储上进行声明式编程
K. Sivaramakrishnan, Gowtham Kaki, S. Jagannathan
User-facing online services utilize geo-distributed data stores to minimize latency and tolerate partial failures, with the intention of providing a fast, always-on experience. However, geo-distribution does not come for free; application developers have to contend with weak consistency behaviors, and the lack of abstractions to composably construct high-level replicated data types, necessitating the need for complex application logic and invariably exposing inconsistencies to the user. Some commercial distributed data stores and several academic proposals provide a lattice of consistency levels, with stronger consistency guarantees incurring increased latency and throughput costs. However, correctly assigning the right consistency level for an operation requires subtle reasoning and is often an error-prone task. In this paper, we present QUELEA, a declarative programming model for eventually consistent data stores (ECDS), equipped with a contract language, capable of specifying fine-grained application - level consistency properties. A contract enforcement system analyses contracts, and automatically generates the appropriate consistency protocol for the method protected by the contract. We describe an implementation of QUELEA on top of an off-the-shelf ECDS that provides support for coordination-free transactions. Several benchmarks including two large web applications, illustrate the effectiveness of our approach.
面向用户的在线服务利用地理分布式数据存储来最小化延迟和容忍部分故障,目的是提供快速、始终在线的体验。然而,地理分布并不是免费的;应用程序开发人员必须应对弱一致性行为,以及缺乏可组合构造高级复制数据类型的抽象,这就需要复杂的应用程序逻辑,并且不可避免地向用户暴露不一致性。一些商业分布式数据存储和一些学术建议提供了一致性级别的格,具有更强的一致性保证,从而增加了延迟和吞吐量成本。然而,正确地为操作分配正确的一致性级别需要微妙的推理,并且通常是一项容易出错的任务。在本文中,我们提出了QUELEA,一个用于最终一致数据存储(ECDS)的声明性编程模型,配备了契约语言,能够指定细粒度的应用级一致性属性。合同执行系统分析合同,并自动为受合同保护的方法生成适当的一致性协议。我们描述了在现成的ECDS之上的QUELEA实现,该ECDS提供了对无协调事务的支持。包括两个大型web应用程序在内的几个基准测试说明了我们的方法的有效性。
{"title":"Declarative programming over eventually consistent data stores","authors":"K. Sivaramakrishnan, Gowtham Kaki, S. Jagannathan","doi":"10.1145/2737924.2737981","DOIUrl":"https://doi.org/10.1145/2737924.2737981","url":null,"abstract":"User-facing online services utilize geo-distributed data stores to minimize latency and tolerate partial failures, with the intention of providing a fast, always-on experience. However, geo-distribution does not come for free; application developers have to contend with weak consistency behaviors, and the lack of abstractions to composably construct high-level replicated data types, necessitating the need for complex application logic and invariably exposing inconsistencies to the user. Some commercial distributed data stores and several academic proposals provide a lattice of consistency levels, with stronger consistency guarantees incurring increased latency and throughput costs. However, correctly assigning the right consistency level for an operation requires subtle reasoning and is often an error-prone task. In this paper, we present QUELEA, a declarative programming model for eventually consistent data stores (ECDS), equipped with a contract language, capable of specifying fine-grained application - level consistency properties. A contract enforcement system analyses contracts, and automatically generates the appropriate consistency protocol for the method protected by the contract. We describe an implementation of QUELEA on top of an off-the-shelf ECDS that provides support for coordination-free transactions. Several benchmarks including two large web applications, illustrate the effectiveness of our approach.","PeriodicalId":104101,"journal":{"name":"Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation","volume":"35 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2015-06-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"123757728","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}
引用次数: 95
A formal C memory model supporting integer-pointer casts 支持整型指针强制转换的正式C内存模型
Jeehoon Kang, C. Hur, William Mansky, D. Garbuzov, S. Zdancewic, Viktor Vafeiadis
The ISO C standard does not specify the semantics of many valid programs that use non-portable idioms such as integer-pointer casts. Recent efforts at formal definitions and verified implementation of the C language inherit this feature. By adopting high-level abstract memory models, they validate common optimizations. On the other hand, this prevents reasoning about much low-level code relying on the behavior of common implementations, where formal verification has many applications. We present the first formal memory model that allows many common optimizations and fully supports operations on the representation of pointers. All arithmetic operations are well-defined for pointers that have been cast to integers. Crucially, our model is also simple to understand and program with. All our results are fully formalized in Coq.
ISO C标准没有指定许多使用不可移植习惯用法(如整型指针强制转换)的有效程序的语义。最近对C语言的正式定义和验证实现的努力继承了这一特性。通过采用高级抽象内存模型,它们验证了常见的优化。另一方面,这防止了对依赖于公共实现行为的低级代码的推理,而正式验证有许多应用程序。我们提出了第一个正式的内存模型,它允许许多常见的优化,并完全支持指针表示上的操作。对于已转换为整数的指针,所有算术运算都是定义良好的。至关重要的是,我们的模型也很容易理解和编程。我们所有的结果都在Coq中完全形式化了。
{"title":"A formal C memory model supporting integer-pointer casts","authors":"Jeehoon Kang, C. Hur, William Mansky, D. Garbuzov, S. Zdancewic, Viktor Vafeiadis","doi":"10.1145/2737924.2738005","DOIUrl":"https://doi.org/10.1145/2737924.2738005","url":null,"abstract":"The ISO C standard does not specify the semantics of many valid programs that use non-portable idioms such as integer-pointer casts. Recent efforts at formal definitions and verified implementation of the C language inherit this feature. By adopting high-level abstract memory models, they validate common optimizations. On the other hand, this prevents reasoning about much low-level code relying on the behavior of common implementations, where formal verification has many applications. We present the first formal memory model that allows many common optimizations and fully supports operations on the representation of pointers. All arithmetic operations are well-defined for pointers that have been cast to integers. Crucially, our model is also simple to understand and program with. All our results are fully formalized in Coq.","PeriodicalId":104101,"journal":{"name":"Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation","volume":"303 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2015-06-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"131926325","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}
引用次数: 50
Helium: lifting high-performance stencil kernels from stripped x86 binaries to halide DSL code Helium:将高性能模板内核从剥离的x86二进制文件提升到卤化DSL代码
Charith Mendis, Jeffrey Bosboom, Kevin Wu, S. Kamil, Jonathan Ragan-Kelley, Sylvain Paris, Qin Zhao, Saman P. Amarasinghe
Highly optimized programs are prone to bit rot, where performance quickly becomes suboptimal in the face of new hardware and compiler techniques. In this paper we show how to automatically lift performance-critical stencil kernels from a stripped x86 binary and generate the corresponding code in the high-level domain-specific language Halide. Using Halide’s state-of-the-art optimizations targeting current hardware, we show that new optimized versions of these kernels can replace the originals to rejuvenate the application for newer hardware. The original optimized code for kernels in stripped binaries is nearly impossible to analyze statically. Instead, we rely on dynamic traces to regenerate the kernels. We perform buffer structure reconstruction to identify input, intermediate and output buffer shapes. We abstract from a forest of concrete dependency trees which contain absolute memory addresses to symbolic trees suitable for high-level code generation. This is done by canonicalizing trees, clustering them based on structure, inferring higher-dimensional buffer accesses and finally by solving a set of linear equations based on buffer accesses to lift them up to simple, high-level expressions. Helium can handle highly optimized, complex stencil kernels with input-dependent conditionals. We lift seven kernels from Adobe Photoshop giving a 75% performance improvement, four kernels from IrfanView, leading to 4.97× performance, and one stencil from the miniGMG multigrid benchmark netting a 4.25× improvement in performance. We manually rejuvenated Photoshop by replacing eleven of Photoshop’s filters with our lifted implementations, giving 1.12× speedup without affecting the user experience.
高度优化的程序容易出现位rot,在面对新的硬件和编译器技术时,性能很快就会变成次优。在本文中,我们将展示如何从剥离的x86二进制文件中自动提升性能关键型模板内核,并在高级领域特定语言Halide中生成相应的代码。使用Halide针对当前硬件的最先进的优化,我们展示了这些内核的新优化版本可以取代原始版本,从而为新硬件恢复应用程序的活力。原始的经过优化的二进制内核代码几乎不可能进行静态分析。相反,我们依靠动态跟踪来重新生成核。我们执行缓冲区结构重建来识别输入、中间和输出缓冲区形状。我们从包含绝对内存地址的具体依赖树林中抽象到适合高级代码生成的符号树。这是通过规范化树,基于结构聚类它们,推断高维缓冲区访问,最后通过解决一组基于缓冲区访问的线性方程来将它们提升到简单的高级表达式来实现的。Helium可以处理高度优化的、复杂的具有输入依赖条件的模板内核。我们从Adobe Photoshop中提取了7个内核,使性能提高了75%,从IrfanView中提取了4个内核,使性能提高了4.97倍,从miniGMG multigrid基准中提取了一个模板,使性能提高了4.25倍。我们手动更新了Photoshop,用我们提升的实现替换了11个Photoshop的滤镜,在不影响用户体验的情况下提供了1.12倍的加速。
{"title":"Helium: lifting high-performance stencil kernels from stripped x86 binaries to halide DSL code","authors":"Charith Mendis, Jeffrey Bosboom, Kevin Wu, S. Kamil, Jonathan Ragan-Kelley, Sylvain Paris, Qin Zhao, Saman P. Amarasinghe","doi":"10.1145/2737924.2737974","DOIUrl":"https://doi.org/10.1145/2737924.2737974","url":null,"abstract":"Highly optimized programs are prone to bit rot, where performance quickly becomes suboptimal in the face of new hardware and compiler techniques. In this paper we show how to automatically lift performance-critical stencil kernels from a stripped x86 binary and generate the corresponding code in the high-level domain-specific language Halide. Using Halide’s state-of-the-art optimizations targeting current hardware, we show that new optimized versions of these kernels can replace the originals to rejuvenate the application for newer hardware. The original optimized code for kernels in stripped binaries is nearly impossible to analyze statically. Instead, we rely on dynamic traces to regenerate the kernels. We perform buffer structure reconstruction to identify input, intermediate and output buffer shapes. We abstract from a forest of concrete dependency trees which contain absolute memory addresses to symbolic trees suitable for high-level code generation. This is done by canonicalizing trees, clustering them based on structure, inferring higher-dimensional buffer accesses and finally by solving a set of linear equations based on buffer accesses to lift them up to simple, high-level expressions. Helium can handle highly optimized, complex stencil kernels with input-dependent conditionals. We lift seven kernels from Adobe Photoshop giving a 75% performance improvement, four kernels from IrfanView, leading to 4.97× performance, and one stencil from the miniGMG multigrid benchmark netting a 4.25× improvement in performance. We manually rejuvenated Photoshop by replacing eleven of Photoshop’s filters with our lifted implementations, giving 1.12× speedup without affecting the user experience.","PeriodicalId":104101,"journal":{"name":"Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation","volume":"1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2015-06-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"129813483","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}
引用次数: 32
Mechanized verification of fine-grained concurrent programs 细粒度并发程序的机械化验证
Ilya Sergey, Aleksandar Nanevski, A. Banerjee
Efficient concurrent programs and data structures rarely employ coarse-grained synchronization mechanisms (i.e., locks); instead, they implement custom synchronization patterns via fine-grained primitives, such as compare-and-swap. Due to sophisticated interference scenarios between threads, reasoning about such programs is challenging and error-prone, and can benefit from mechanization. In this paper, we present the first completely formalized framework for mechanized verification of full functional correctness of fine-grained concurrent programs. Our tool is based on the recently proposed program logic FCSL. It is implemented as an embedded DSL in the dependently-typed language of the Coq proof assistant, and is powerful enough to reason about programming features such as higher-order functions and local thread spawning. By incorporating a uniform concurrency model, based on state-transition systems and partial commutative monoids, FCSL makes it possible to build proofs about concurrent libraries in a thread-local, compositional way, thus facilitating scalability and reuse: libraries are verified just once, and their specifications are used ubiquitously in client-side reasoning. We illustrate the proof layout in FCSL by example, outline its infrastructure, and report on our experience of using FCSL to verify a number of concurrent algorithms and data structures.
高效的并发程序和数据结构很少使用粗粒度的同步机制(即锁);相反,它们通过细粒度的原语(如比较与交换)实现自定义同步模式。由于线程之间复杂的干扰场景,对此类程序的推理具有挑战性且容易出错,并且可以从机械化中获益。在本文中,我们提出了第一个用于机械化验证细粒度并发程序的全功能正确性的完全形式化框架。我们的工具是基于最近提出的程序逻辑FCSL。它是用Coq证明助手的依赖类型语言作为嵌入式DSL实现的,并且足够强大,可以推断诸如高阶函数和本地线程生成之类的编程特性。通过结合统一的并发模型,基于状态转换系统和部分可交换模群,FCSL可以以线程本地的组合方式构建关于并发库的证明,从而促进可伸缩性和重用:库只验证一次,并且它们的规范在客户端推理中无处不在地使用。我们通过示例说明了FCSL中的证明布局,概述了其基础结构,并报告了我们使用FCSL验证许多并发算法和数据结构的经验。
{"title":"Mechanized verification of fine-grained concurrent programs","authors":"Ilya Sergey, Aleksandar Nanevski, A. Banerjee","doi":"10.1145/2737924.2737964","DOIUrl":"https://doi.org/10.1145/2737924.2737964","url":null,"abstract":"Efficient concurrent programs and data structures rarely employ coarse-grained synchronization mechanisms (i.e., locks); instead, they implement custom synchronization patterns via fine-grained primitives, such as compare-and-swap. Due to sophisticated interference scenarios between threads, reasoning about such programs is challenging and error-prone, and can benefit from mechanization. In this paper, we present the first completely formalized framework for mechanized verification of full functional correctness of fine-grained concurrent programs. Our tool is based on the recently proposed program logic FCSL. It is implemented as an embedded DSL in the dependently-typed language of the Coq proof assistant, and is powerful enough to reason about programming features such as higher-order functions and local thread spawning. By incorporating a uniform concurrency model, based on state-transition systems and partial commutative monoids, FCSL makes it possible to build proofs about concurrent libraries in a thread-local, compositional way, thus facilitating scalability and reuse: libraries are verified just once, and their specifications are used ubiquitously in client-side reasoning. We illustrate the proof layout in FCSL by example, outline its infrastructure, and report on our experience of using FCSL to verify a number of concurrent algorithms and data structures.","PeriodicalId":104101,"journal":{"name":"Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation","volume":"25 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2015-06-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"125454379","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}
引用次数: 115
Concurrency debugging with differential schedule projections 使用不同计划投影的并发调试
Nuno Machado, Brandon Lucia, L. Rodrigues
We present Symbiosis: a concurrency debugging technique based on novel differential schedule projections (DSPs). A DSP shows the small set of memory operations and data-flows responsible for a failure, as well as a reordering of those elements that avoids the failure. To build a DSP, Symbiosis first generates a full, failing, multithreaded schedule via thread path profiling and symbolic constraint solving. Symbiosis selectively reorders events in the failing schedule to produce a non-failing, alternate schedule. A DSP reports the ordering and data-flow differences between the failing and non-failing schedules. Our evaluation on buggy real-world software and benchmarks shows that, in practical time, Symbiosis generates DSPs that both isolate the small fraction of event orders and data-flows responsible for the failure, and show which event reorderings prevent failing. In our experiments, DSPs contain 81% fewer events and 96% less data-flows than the full failure-inducing schedules. Moreover, by allowing developers to focus on only a few events, DSPs reduce the amount of time required to find a valid fix.
我们提出了Symbiosis:一种基于新型差分调度投影(dsp)的并发调试技术。DSP显示导致故障的一小部分内存操作和数据流,以及避免故障的那些元素的重新排序。为了构建一个DSP, Symbiosis首先通过线程路径分析和符号约束求解生成一个完整的、失败的多线程调度。共生有选择地重新排序失败调度中的事件,以产生非失败的备用调度。DSP报告失败和非失败调度之间的顺序和数据流差异。我们对有缺陷的实际软件和基准测试的评估表明,在实际时间中,Symbiosis生成的dsp既隔离了导致故障的一小部分事件顺序和数据流,又显示了哪些事件重新排序可以防止故障。在我们的实验中,与完整的故障诱导调度相比,dsp包含的事件减少81%,数据流减少96%。此外,通过允许开发人员只关注几个事件,dsp减少了寻找有效修复所需的时间。
{"title":"Concurrency debugging with differential schedule projections","authors":"Nuno Machado, Brandon Lucia, L. Rodrigues","doi":"10.1145/2737924.2737973","DOIUrl":"https://doi.org/10.1145/2737924.2737973","url":null,"abstract":"We present Symbiosis: a concurrency debugging technique based on novel differential schedule projections (DSPs). A DSP shows the small set of memory operations and data-flows responsible for a failure, as well as a reordering of those elements that avoids the failure. To build a DSP, Symbiosis first generates a full, failing, multithreaded schedule via thread path profiling and symbolic constraint solving. Symbiosis selectively reorders events in the failing schedule to produce a non-failing, alternate schedule. A DSP reports the ordering and data-flow differences between the failing and non-failing schedules. Our evaluation on buggy real-world software and benchmarks shows that, in practical time, Symbiosis generates DSPs that both isolate the small fraction of event orders and data-flows responsible for the failure, and show which event reorderings prevent failing. In our experiments, DSPs contain 81% fewer events and 96% less data-flows than the full failure-inducing schedules. Moreover, by allowing developers to focus on only a few events, DSPs reduce the amount of time required to find a valid fix.","PeriodicalId":104101,"journal":{"name":"Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation","volume":"34 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2015-06-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"127769184","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}
引用次数: 10
Zero-overhead metaprogramming: reflection and metaobject protocols fast and without compromises 零开销元编程:反射和元对象协议快速且不妥协
Stefan Marr, Chris Seaton, Stéphane Ducasse
Runtime metaprogramming enables many useful applications and is often a convenient solution to solve problems in a generic way, which makes it widely used in frameworks, middleware, and domain-specific languages. However, powerful metaobject protocols are rarely supported and even common concepts such as reflective method invocation or dynamic proxies are not optimized. Solutions proposed in literature either restrict the metaprogramming capabilities or require application or library developers to apply performance improving techniques. For overhead-free runtime metaprogramming, we demonstrate that dispatch chains, a generalized form of polymorphic inline caches common to self-optimizing interpreters, are a simple optimization at the language-implementation level. Our evaluation with self-optimizing interpreters shows that unrestricted metaobject protocols can be realized for the first time without runtime overhead, and that this optimization is applicable for just-in-time compilation of interpreters based on meta-tracing as well as partial evaluation. In this context, we also demonstrate that optimizing common reflective operations can lead to significant performance improvements for existing applications.
运行时元编程支持许多有用的应用程序,并且通常是一种以通用方式解决问题的方便解决方案,这使得它广泛用于框架、中间件和特定于领域的语言中。然而,功能强大的元对象协议很少得到支持,甚至像反射方法调用或动态代理这样的常见概念也没有得到优化。文献中提出的解决方案要么限制元编程能力,要么要求应用程序或库开发人员应用性能改进技术。对于无开销的运行时元编程,我们证明了调度链(自优化解释器常见的一种通用形式的多态内联缓存)是语言实现级别的简单优化。我们对自优化解释器的评估表明,可以首次在没有运行时开销的情况下实现不受限制的元对象协议,并且这种优化适用于基于元跟踪和部分求值的解释器的即时编译。在此上下文中,我们还演示了优化常见反射操作可以显著提高现有应用程序的性能。
{"title":"Zero-overhead metaprogramming: reflection and metaobject protocols fast and without compromises","authors":"Stefan Marr, Chris Seaton, Stéphane Ducasse","doi":"10.1145/2737924.2737963","DOIUrl":"https://doi.org/10.1145/2737924.2737963","url":null,"abstract":"Runtime metaprogramming enables many useful applications and is often a convenient solution to solve problems in a generic way, which makes it widely used in frameworks, middleware, and domain-specific languages. However, powerful metaobject protocols are rarely supported and even common concepts such as reflective method invocation or dynamic proxies are not optimized. Solutions proposed in literature either restrict the metaprogramming capabilities or require application or library developers to apply performance improving techniques. For overhead-free runtime metaprogramming, we demonstrate that dispatch chains, a generalized form of polymorphic inline caches common to self-optimizing interpreters, are a simple optimization at the language-implementation level. Our evaluation with self-optimizing interpreters shows that unrestricted metaobject protocols can be realized for the first time without runtime overhead, and that this optimization is applicable for just-in-time compilation of interpreters based on meta-tracing as well as partial evaluation. In this context, we also demonstrate that optimizing common reflective operations can lead to significant performance improvements for existing applications.","PeriodicalId":104101,"journal":{"name":"Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation","volume":"8 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2015-06-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"127924215","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}
引用次数: 38
Preventing glitches and short circuits in high-level self-timed chip specifications 在高级自定时芯片规格中防止故障和短路
S. Longfield, Brittany Nkounkou, R. Manohar, R. Tate
Self-timed chip designs are commonly specified in a high-level message-passing language called CHP. This language is closely related to Hoare's CSP except it admits erroneous behavior due to the necessary limitations of efficient hardware implementations. For example, two processes sending on the same channel at the same time causes glitches and short circuits in the physical chip implementation. If a CHP program maintains certain invariants, such as only one process is sending on any given channel at a time, it can guarantee an error-free execution that behaves much like a CSP program would. In this paper, we present an inferable effect system for ensuring that these invariants hold, drawing from model-checking methodologies while exploiting language-usage patterns and domain-specific specializations to achieve efficiency. This analysis is sound, and is even complete for the common subset of CHP programs without data-sensitive synchronization. We have implemented the analysis and demonstrated that it scales to validate even microprocessors.
自定时芯片设计通常在称为CHP的高级消息传递语言中指定。这种语言与Hoare的CSP密切相关,但它承认由于有效硬件实现的必要限制而导致的错误行为。例如,在同一信道上同时发送的两个进程会导致物理芯片实现中的故障和短路。如果CHP程序保持一定的不变性,比如一次只有一个进程在任何给定的通道上发送,那么它可以保证无错误的执行,就像CSP程序一样。在本文中,我们提出了一个可推断的效果系统,以确保这些不变量成立,利用模型检查方法,同时利用语言使用模式和特定领域的专门化来实现效率。这种分析是合理的,甚至对于没有数据敏感同步的CHP程序的公共子集也是完整的。我们已经实现了分析,并证明它可以扩展到验证微处理器。
{"title":"Preventing glitches and short circuits in high-level self-timed chip specifications","authors":"S. Longfield, Brittany Nkounkou, R. Manohar, R. Tate","doi":"10.1145/2737924.2737967","DOIUrl":"https://doi.org/10.1145/2737924.2737967","url":null,"abstract":"Self-timed chip designs are commonly specified in a high-level message-passing language called CHP. This language is closely related to Hoare's CSP except it admits erroneous behavior due to the necessary limitations of efficient hardware implementations. For example, two processes sending on the same channel at the same time causes glitches and short circuits in the physical chip implementation. If a CHP program maintains certain invariants, such as only one process is sending on any given channel at a time, it can guarantee an error-free execution that behaves much like a CSP program would. In this paper, we present an inferable effect system for ensuring that these invariants hold, drawing from model-checking methodologies while exploiting language-usage patterns and domain-specific specializations to achieve efficiency. This analysis is sound, and is even complete for the common subset of CHP programs without data-sensitive synchronization. We have implemented the analysis and demonstrated that it scales to validate even microprocessors.","PeriodicalId":104101,"journal":{"name":"Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation","volume":"1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2015-06-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"129440318","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}
引用次数: 1
Relatively complete counterexamples for higher-order programs 相对完整的高阶程序反例
Phuc C. Nguyen, David Van Horn
In this paper, we study the problem of generating inputs to a higher-order program causing it to error. We first approach the problem in the setting of PCF, a typed, core functional language and contribute the first relatively complete method for constructing counterexamples for PCF programs. The method is relatively complete with respect to a first-order solver over the base types of PCF. In practice, this means an SMT solver can be used for the effective, automated generation of higher-order counterexamples for a large class of programs. We achieve this result by employing a novel form of symbolic execution for higher-order programs. The remarkable aspect of this symbolic execution is that even though symbolic higher-order inputs and values are considered, the path condition remains a first-order formula. Our handling of symbolic function application enables the reconstruction of higher-order counterexamples from this first-order formula. After establishing our main theoretical results, we sketch how to apply the approach to untyped, higher-order, stateful languages with first-class contracts and show how counterexample generation can be used to detect contract violations in this setting. To validate our approach, we implement a tool generating counterexamples for erroneous modules written in Racket.
在本文中,我们研究了产生输入到一个高阶程序,使其产生错误的问题。我们首先在PCF(一种类型的核心函数式语言)的背景下研究这个问题,并提供了第一个相对完整的方法来构造PCF程序的反例。该方法相对于PCF基型的一阶解算器是比较完备的。在实践中,这意味着SMT求解器可以用于有效、自动地生成大量程序的高阶反例。我们通过为高阶程序采用一种新颖的符号执行形式来实现这一结果。这种符号执行的显著之处在于,即使考虑了符号高阶输入和值,路径条件仍然是一阶公式。我们对符号函数应用的处理使得从这个一阶公式中重建高阶反例成为可能。在建立了我们的主要理论结果之后,我们概述了如何将该方法应用于具有一级契约的无类型、高阶、有状态语言,并展示了如何使用反例生成来检测这种设置中的契约违反。为了验证我们的方法,我们实现了一个工具,为用Racket编写的错误模块生成反例。
{"title":"Relatively complete counterexamples for higher-order programs","authors":"Phuc C. Nguyen, David Van Horn","doi":"10.1145/2737924.2737971","DOIUrl":"https://doi.org/10.1145/2737924.2737971","url":null,"abstract":"In this paper, we study the problem of generating inputs to a higher-order program causing it to error. We first approach the problem in the setting of PCF, a typed, core functional language and contribute the first relatively complete method for constructing counterexamples for PCF programs. The method is relatively complete with respect to a first-order solver over the base types of PCF. In practice, this means an SMT solver can be used for the effective, automated generation of higher-order counterexamples for a large class of programs. We achieve this result by employing a novel form of symbolic execution for higher-order programs. The remarkable aspect of this symbolic execution is that even though symbolic higher-order inputs and values are considered, the path condition remains a first-order formula. Our handling of symbolic function application enables the reconstruction of higher-order counterexamples from this first-order formula. After establishing our main theoretical results, we sketch how to apply the approach to untyped, higher-order, stateful languages with first-class contracts and show how counterexample generation can be used to detect contract violations in this setting. To validate our approach, we implement a tool generating counterexamples for erroneous modules written in Racket.","PeriodicalId":104101,"journal":{"name":"Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation","volume":"15 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2014-11-14","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"115267766","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}
引用次数: 36
Efficient synthesis of network updates 高效综合网络更新
Jedidiah McClurg, Nate Foster, Pavol Cerný
Software-defined networking (SDN) is revolutionizing the networking industry, but current SDN programming platforms do not provide automated mechanisms for updating global configurations on the fly. Implementing updates by hand is challenging for SDN programmers because networks are distributed systems with hundreds or thousands of interacting nodes. Even if initial and final configurations are correct, naively updating individual nodes can lead to incorrect transient behaviors, including loops, black holes, and access control violations. This paper presents an approach for automatically synthesizing updates that are guaranteed to preserve specified properties. We formalize network updates as a distributed programming problem and develop a synthesis algorithm based on counterexample-guided search and incremental model checking. We describe a prototype implementation, and present results from experiments on real-world topologies and properties demonstrating that our tool scales to updates involving over one-thousand nodes.
软件定义网络(SDN)正在彻底改变网络行业,但是当前的SDN编程平台并没有提供动态更新全局配置的自动化机制。对于SDN程序员来说,手动实现更新是一项挑战,因为网络是具有数百或数千个交互节点的分布式系统。即使初始和最终配置是正确的,天真地更新单个节点也可能导致不正确的瞬态行为,包括循环、黑洞和访问控制违规。本文提出了一种自动合成保证保留指定属性的更新的方法。我们将网络更新形式化为一个分布式规划问题,并开发了一个基于反例引导搜索和增量模型检查的综合算法。我们描述了一个原型实现,并展示了对现实世界拓扑和属性的实验结果,证明我们的工具可以扩展到涉及1000多个节点的更新。
{"title":"Efficient synthesis of network updates","authors":"Jedidiah McClurg, Nate Foster, Pavol Cerný","doi":"10.1145/2737924.2737980","DOIUrl":"https://doi.org/10.1145/2737924.2737980","url":null,"abstract":"Software-defined networking (SDN) is revolutionizing the networking industry, but current SDN programming platforms do not provide automated mechanisms for updating global configurations on the fly. Implementing updates by hand is challenging for SDN programmers because networks are distributed systems with hundreds or thousands of interacting nodes. Even if initial and final configurations are correct, naively updating individual nodes can lead to incorrect transient behaviors, including loops, black holes, and access control violations. This paper presents an approach for automatically synthesizing updates that are guaranteed to preserve specified properties. We formalize network updates as a distributed programming problem and develop a synthesis algorithm based on counterexample-guided search and incremental model checking. We describe a prototype implementation, and present results from experiments on real-world topologies and properties demonstrating that our tool scales to updates involving over one-thousand nodes.","PeriodicalId":104101,"journal":{"name":"Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation","volume":"52 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2014-03-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"115309379","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}
引用次数: 114
期刊
Proceedings of the 36th 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