首页 > 最新文献

ACM Transactions on Programming Languages and Systems最新文献

英文 中文
Capturing Types 捕捉类型
2区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING Pub Date : 2023-09-13 DOI: 10.1145/3618003
Aleksander Boruch-Gruszecki, Martin Odersky, Edward Lee, Ondřej Lhoták, Jonathan Brachthäuser
Type systems usually characterize the shape of values but not their free variables. However, many desirable safety properties could be guaranteed if one knew the free variables captured by values. We describe (textsf {CC}_{lt :Box }~ ) , a calculus where such captured variables are succinctly represented in types, and show it can be used to safely implement effects and effect polymorphism via scoped capabilities. We discuss how the decision to track captured variables guides key aspects of the calculus, and show that (textsf {CC}_{lt :Box }~ ) admits simple and intuitive types for common data structures and their typical usage patterns. We demonstrate how these ideas can be used to guide the implementation of capture checking in a practical programming language.
类型系统通常描述值的形状,而不是它们的自由变量。然而,如果知道由值捕获的自由变量,则可以保证许多理想的安全属性。我们描述了(textsf {CC}_{lt :Box }~ ),这是一种演算,其中捕获的变量被简洁地表示为类型,并展示了它可以通过作用域功能安全地实现效果和效果多态性。我们将讨论跟踪捕获变量的决策如何指导演算的关键方面,并说明(textsf {CC}_{lt :Box }~ )允许常见数据结构的简单直观类型及其典型使用模式。我们将演示如何使用这些思想在实用的编程语言中指导捕获检查的实现。
{"title":"Capturing Types","authors":"Aleksander Boruch-Gruszecki, Martin Odersky, Edward Lee, Ondřej Lhoták, Jonathan Brachthäuser","doi":"10.1145/3618003","DOIUrl":"https://doi.org/10.1145/3618003","url":null,"abstract":"Type systems usually characterize the shape of values but not their free variables. However, many desirable safety properties could be guaranteed if one knew the free variables captured by values. We describe (textsf {CC}_{lt :Box }~ ) , a calculus where such captured variables are succinctly represented in types, and show it can be used to safely implement effects and effect polymorphism via scoped capabilities. We discuss how the decision to track captured variables guides key aspects of the calculus, and show that (textsf {CC}_{lt :Box }~ ) admits simple and intuitive types for common data structures and their typical usage patterns. We demonstrate how these ideas can be used to guide the implementation of capture checking in a practical programming language.","PeriodicalId":50939,"journal":{"name":"ACM Transactions on Programming Languages and Systems","volume":"155 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-09-13","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"135739957","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
Exploiting Partially Context-Sensitive Profiles to Improve Performance of Hot Code 利用部分上下文敏感的配置文件来提高热代码的性能
2区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING Pub Date : 2023-09-13 DOI: 10.1145/3612937
Maja Vukasovic, Aleksandar Prokopec
Availability of profiling information is a major advantage of just-in-time (JIT) compilation. Profiles guide the compilation order and optimizations, thus substantially improving program performance. Ahead-of-time (AOT) compilation can also utilize profiles, obtained during separate profiling runs of the programs. Profiles can be context-sensitive, i.e., each profile entry is associated with a call-stack. To ease profile collection and reduce overheads, many systems collect partially context-sensitive profiles, which record only a call-stack suffix. Despite prior related work, partially context-sensitive profiles have the potential to further improve compiler optimizations. In this paper, we describe a novel technique that exploits partially context-sensitive profiles to determine which portions of code are hot, and compile them with additional compilation budget. This technique is applicable to most AOT compilers that can access partially context-sensitive profiles, and its goal is to improve program performance without significantly increasing code size. The technique relies on a new hot-code-detection algorithm to reconstruct hot regions based on the partial profiles. The compilation ordering and the inlining of the compiler are modified to exploit the information about the hot code. We formally describe the proposed algorithm and its heuristics, and then describe our implementation inside GraalVM Native Image, a state-of-the-art AOT compiler for Java. Evaluation of the proposed technique on 16 benchmarks from DaCapo, Scalabench and Renaissance suites shows a performance improvement between (22% ) and (40% ) on 4 benchmarks, and between (2.5% ) and (10% ) on 5 benchmarks. Code-size increase ranges from (0.8-9% ) , where 10 benchmarks exhibit an increase of less than (2.5% ) .
分析信息的可用性是即时(JIT)编译的一个主要优点。概要文件指导编译顺序和优化,从而大大提高程序性能。提前(AOT)编译也可以利用在程序的单独分析运行期间获得的配置文件。概要文件可以是上下文敏感的,也就是说,每个概要文件条目都与一个调用堆栈相关联。为了简化概要文件收集并减少开销,许多系统收集部分上下文敏感的概要文件,这些概要文件只记录调用堆栈后缀。尽管之前有过相关的工作,但部分上下文敏感的配置文件仍有进一步改进编译器优化的潜力。在本文中,我们描述了一种新技术,它利用部分上下文敏感的配置文件来确定代码的哪些部分是热的,并使用额外的编译预算来编译它们。该技术适用于大多数可以访问部分上下文敏感配置文件的AOT编译器,其目标是在不显著增加代码大小的情况下提高程序性能。该技术依赖于一种新的热码检测算法来重建基于局部轮廓的热区域。修改了编译器的编译顺序和内联,以利用热代码的信息。我们正式描述了提出的算法及其启发式,然后描述了我们在GraalVM Native Image(一种最先进的Java AOT编译器)中的实现。在来自DaCapo、scalabbench和Renaissance套件的16个基准测试上对所提出的技术进行评估,结果显示(22% )和(40% )之间有4个基准测试的性能提高,(2.5% )和(10% )之间有5个基准测试的性能提高。代码大小的增长范围从(0.8-9% )开始,其中10个基准测试显示的增长幅度小于(2.5% )。
{"title":"Exploiting Partially Context-Sensitive Profiles to Improve Performance of Hot Code","authors":"Maja Vukasovic, Aleksandar Prokopec","doi":"10.1145/3612937","DOIUrl":"https://doi.org/10.1145/3612937","url":null,"abstract":"Availability of profiling information is a major advantage of just-in-time (JIT) compilation. Profiles guide the compilation order and optimizations, thus substantially improving program performance. Ahead-of-time (AOT) compilation can also utilize profiles, obtained during separate profiling runs of the programs. Profiles can be context-sensitive, i.e., each profile entry is associated with a call-stack. To ease profile collection and reduce overheads, many systems collect partially context-sensitive profiles, which record only a call-stack suffix. Despite prior related work, partially context-sensitive profiles have the potential to further improve compiler optimizations. In this paper, we describe a novel technique that exploits partially context-sensitive profiles to determine which portions of code are hot, and compile them with additional compilation budget. This technique is applicable to most AOT compilers that can access partially context-sensitive profiles, and its goal is to improve program performance without significantly increasing code size. The technique relies on a new hot-code-detection algorithm to reconstruct hot regions based on the partial profiles. The compilation ordering and the inlining of the compiler are modified to exploit the information about the hot code. We formally describe the proposed algorithm and its heuristics, and then describe our implementation inside GraalVM Native Image, a state-of-the-art AOT compiler for Java. Evaluation of the proposed technique on 16 benchmarks from DaCapo, Scalabench and Renaissance suites shows a performance improvement between (22% ) and (40% ) on 4 benchmarks, and between (2.5% ) and (10% ) on 5 benchmarks. Code-size increase ranges from (0.8-9% ) , where 10 benchmarks exhibit an increase of less than (2.5% ) .","PeriodicalId":50939,"journal":{"name":"ACM Transactions on Programming Languages and Systems","volume":"20 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-09-13","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"135736414","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
A Model Checker for Operator Precedence Languages 运算符优先语言的模型检查器
IF 1.3 2区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING Pub Date : 2023-08-02 DOI: 10.1145/3608443
M. Chiari, D. Mandrioli, Francesco Pontiggia, Matteo Pradella
The problem of extending model checking from finite state machines to procedural programs has fostered much research toward the definition of temporal logics for reasoning on context-free structures. The most notable of such results are temporal logics on Nested Words, such as CaRet and NWTL. Recently, Precedence Oriented Temporal Logic (POTL) has been introduced to specify and prove properties of programs coded trough an Operator Precedence Language (OPL). POTL is complete w.r.t. the FO restriction of the MSO logic previously defined as a logic fully equivalent to OPL. POTL increases NWTL’s expressive power in a perfectly parallel way as OPLs are more powerful that nested words. In this paper we produce a model checker, named POMC, for OPL programs to prove properties expressed in POTL. To the best of our knowledge POMC is the first implemented and openly available model checker for proving tree-structured properties of recursive procedural programs. We also report on the experimental evaluation we performed on POMC on a nontrivial benchmark.
将模型检查从有限状态机扩展到程序程序的问题促进了对上下文无关结构上推理的时间逻辑定义的大量研究。这些结果中最值得注意的是嵌套词上的时间逻辑,如插入符号和NWTL。近年来,人们引入了面向优先级的时间逻辑(POTL)来指定和证明通过运算符优先语言(OPL)编码的程序的性质。POTL完全取代了之前定义为与OPL完全等价的逻辑的MSO逻辑的FO限制。POTL以一种完美的并行方式增加了NWTL的表达能力,因为opl比嵌套词更强大。在本文中,我们为OPL程序制作了一个模型检查器,命名为POMC,用于证明用POTL表示的属性。据我们所知,POMC是第一个实现和公开可用的模型检查器,用于证明递归过程程序的树结构属性。我们还报告了我们在一个重要基准上对POMC进行的实验评估。
{"title":"A Model Checker for Operator Precedence Languages","authors":"M. Chiari, D. Mandrioli, Francesco Pontiggia, Matteo Pradella","doi":"10.1145/3608443","DOIUrl":"https://doi.org/10.1145/3608443","url":null,"abstract":"The problem of extending model checking from finite state machines to procedural programs has fostered much research toward the definition of temporal logics for reasoning on context-free structures. The most notable of such results are temporal logics on Nested Words, such as CaRet and NWTL. Recently, Precedence Oriented Temporal Logic (POTL) has been introduced to specify and prove properties of programs coded trough an Operator Precedence Language (OPL). POTL is complete w.r.t. the FO restriction of the MSO logic previously defined as a logic fully equivalent to OPL. POTL increases NWTL’s expressive power in a perfectly parallel way as OPLs are more powerful that nested words. In this paper we produce a model checker, named POMC, for OPL programs to prove properties expressed in POTL. To the best of our knowledge POMC is the first implemented and openly available model checker for proving tree-structured properties of recursive procedural programs. We also report on the experimental evaluation we performed on POMC on a nontrivial benchmark.","PeriodicalId":50939,"journal":{"name":"ACM Transactions on Programming Languages and Systems","volume":"1 1","pages":""},"PeriodicalIF":1.3,"publicationDate":"2023-08-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"46192084","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
Optimizing Homomorphic Evaluation Circuits by Program Synthesis and Time-bounded Exhaustive Search 用程序综合和有界穷举搜索优化同态求值电路
IF 1.3 2区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING Pub Date : 2023-08-02 DOI: 10.1145/3591622
Dongkwon Lee, Woosuk Lee, Hakjoo Oh, K. Yi
We present a new and general method for optimizing homomorphic evaluation circuits. Although fully homomorphic encryption (FHE) holds the promise of enabling safe and secure third party computation, building FHE applications has been challenging due to their high computational costs. Domain-specific optimizations require a great deal of expertise on the underlying FHE schemes and FHE compilers that aim to lower the hurdle, generate outcomes that are typically sub-optimal, as they rely on manually-developed optimization rules. In this article, based on the prior work of FHE compilers, we propose a method for automatically learning and using optimization rules for FHE circuits. Our method focuses on reducing the maximum multiplicative depth, the decisive performance bottleneck, of FHE circuits by combining program synthesis, term rewriting, and equality saturation. It first uses program synthesis to learn equivalences of small circuits as rewrite rules from a set of training circuits. Then, we perform term rewriting on the input circuit to obtain a new circuit that has lower multiplicative depth. Our rewriting method uses the equational matching with generalized version of the learned rules, and its soundness property is formally proven. Our optimizations also try to explore every possible alternative order of applying rewrite rules by time-bounded exhaustive search technique called equality saturation. Experimental results show that our method generates circuits that can be homomorphically evaluated 1.08×–3.17× faster (with the geometric mean of 1.56×) than the state-of-the-art method. Our method is also orthogonal to existing domain-specific optimizations.
提出了一种新的通用的优化同态求值电路的方法。尽管完全同态加密(FHE)有望实现安全可靠的第三方计算,但由于其高计算成本,构建FHE应用程序一直具有挑战性。特定领域的优化需要大量关于底层FHE方案和FHE编译器的专业知识,这些方案旨在降低障碍,生成通常不是最优的结果,因为它们依赖于手动开发的优化规则。本文在FHE编译器已有工作的基础上,提出了一种FHE电路自动学习和使用优化规则的方法。我们的方法侧重于通过结合程序合成、项重写和等式饱和来降低FHE电路的最大乘法深度,这是决定性的性能瓶颈。它首先使用程序合成从一组训练电路中学习等效的小电路作为重写规则。然后,我们对输入电路进行项重写,以获得具有更低乘法深度的新电路。我们的重写方法使用了与学习规则的广义版本的等式匹配,并正式证明了它的稳健性。我们的优化还尝试探索应用重写规则的每一个可能的替代顺序,通过有时间限制的穷尽搜索技术称为相等饱和。实验结果表明,我们的方法生成的电路可以同态评估1.08×-3.17×比最先进的方法更快(几何平均值为1.56×)。我们的方法也与现有的特定领域优化是正交的。
{"title":"Optimizing Homomorphic Evaluation Circuits by Program Synthesis and Time-bounded Exhaustive Search","authors":"Dongkwon Lee, Woosuk Lee, Hakjoo Oh, K. Yi","doi":"10.1145/3591622","DOIUrl":"https://doi.org/10.1145/3591622","url":null,"abstract":"We present a new and general method for optimizing homomorphic evaluation circuits. Although fully homomorphic encryption (FHE) holds the promise of enabling safe and secure third party computation, building FHE applications has been challenging due to their high computational costs. Domain-specific optimizations require a great deal of expertise on the underlying FHE schemes and FHE compilers that aim to lower the hurdle, generate outcomes that are typically sub-optimal, as they rely on manually-developed optimization rules. In this article, based on the prior work of FHE compilers, we propose a method for automatically learning and using optimization rules for FHE circuits. Our method focuses on reducing the maximum multiplicative depth, the decisive performance bottleneck, of FHE circuits by combining program synthesis, term rewriting, and equality saturation. It first uses program synthesis to learn equivalences of small circuits as rewrite rules from a set of training circuits. Then, we perform term rewriting on the input circuit to obtain a new circuit that has lower multiplicative depth. Our rewriting method uses the equational matching with generalized version of the learned rules, and its soundness property is formally proven. Our optimizations also try to explore every possible alternative order of applying rewrite rules by time-bounded exhaustive search technique called equality saturation. Experimental results show that our method generates circuits that can be homomorphically evaluated 1.08×–3.17× faster (with the geometric mean of 1.56×) than the state-of-the-art method. Our method is also orthogonal to existing domain-specific optimizations.","PeriodicalId":50939,"journal":{"name":"ACM Transactions on Programming Languages and Systems","volume":" ","pages":"1 - 37"},"PeriodicalIF":1.3,"publicationDate":"2023-08-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"44448403","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
SSProve: A Foundational Framework for Modular Cryptographic Proofs in Coq SSProve: Coq中模块化密码证明的基本框架
IF 1.3 2区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING Pub Date : 2023-07-20 DOI: https://dl.acm.org/doi/10.1145/3594735
Philipp G. Haselwarter, Exequiel Rivas, Antoine Van Muylder, Théo Winterhalter, Carmine Abate, Nikolaj Sidorenco, Cătălin Hriţcu, Kenji Maillard, Bas Spitters

State-separating proofs (SSP) is a recent methodology for structuring game-based cryptographic proofs in a modular way, by using algebraic laws to exploit the modular structure of composed protocols. While promising, this methodology was previously not fully formalized and came with little tool support. We address this by introducing SSProve, the first general verification framework for machine-checked state-separating proofs. SSProve combines high-level modular proofs about composed protocols, as proposed in SSP, with a probabilistic relational program logic for formalizing the lower-level details, which together enable constructing machine-checked cryptographic proofs in the Coq proof assistant. Moreover, SSProve is itself fully formalized in Coq, including the algebraic laws of SSP, the soundness of the program logic, and the connection between these two verification styles.

To illustrate SSProve, we use it to mechanize the simple security proofs of ElGamal and pseudo-random-function–based encryption. We also validate the SSProve approach by conducting two more substantial case studies: First, we mechanize an SSP security proof of the key encapsulation mechanism–data encryption mechanism (KEM-DEM) public key encryption scheme, which led to the discovery of an error in the original paper proof that has since been fixed. Second, we use SSProve to formally prove security of the sigma-protocol zero-knowledge construction, and we moreover construct a commitment scheme from a sigma-protocol to compare with a similar development in CryptHOL. We instantiate the security proof for sigma-protocols to give concrete security bounds for Schnorr’s sigma-protocol.

状态分离证明(SSP)是一种最新的方法,通过使用代数定律来利用组合协议的模块化结构,以模块化的方式构建基于游戏的密码证明。虽然很有希望,但这种方法以前并没有完全形式化,并且只有很少的工具支持。我们通过引入SSProve来解决这个问题,SSProve是第一个用于机器检查的状态分离证明的通用验证框架。SSProve结合了SSP中提出的关于组合协议的高级模块化证明,以及用于形式化低级细节的概率关系程序逻辑,它们一起能够在Coq证明助手中构造机器检查的加密证明。此外,SSProve本身在Coq中是完全形式化的,包括SSP的代数定律、程序逻辑的健全性以及这两种验证风格之间的联系。为了说明SSProve,我们使用它来机械化ElGamal和基于伪随机函数的加密的简单安全证明。我们还通过进行两个更实质性的案例研究来验证SSProve方法:首先,我们机械化了密钥封装机制-数据加密机制(kemm - dem)公钥加密方案的SSP安全证明,这导致在原始论文证明中发现了一个错误,该错误已被修复。其次,我们使用SSProve对sigma协议零知识构造的安全性进行了形式化证明,并从sigma协议构造了一个承诺方案,与CryptHOL中的类似发展进行了比较。我们实例化了σ -协议的安全性证明,给出了Schnorr σ -协议的具体安全界。
{"title":"SSProve: A Foundational Framework for Modular Cryptographic Proofs in Coq","authors":"Philipp G. Haselwarter, Exequiel Rivas, Antoine Van Muylder, Théo Winterhalter, Carmine Abate, Nikolaj Sidorenco, Cătălin Hriţcu, Kenji Maillard, Bas Spitters","doi":"https://dl.acm.org/doi/10.1145/3594735","DOIUrl":"https://doi.org/https://dl.acm.org/doi/10.1145/3594735","url":null,"abstract":"<p>State-separating proofs (SSP) is a recent methodology for structuring game-based cryptographic proofs in a modular way, by using algebraic laws to exploit the modular structure of composed protocols. While promising, this methodology was previously not fully formalized and came with little tool support. We address this by introducing SSProve, the first general verification framework for machine-checked state-separating proofs. SSProve combines high-level modular proofs about composed protocols, as proposed in SSP, with a probabilistic relational program logic for formalizing the lower-level details, which together enable constructing machine-checked cryptographic proofs in the Coq proof assistant. Moreover, SSProve is itself fully formalized in Coq, including the algebraic laws of SSP, the soundness of the program logic, and the connection between these two verification styles.</p><p>To illustrate SSProve, we use it to mechanize the simple security proofs of ElGamal and pseudo-random-function–based encryption. We also validate the SSProve approach by conducting two more substantial case studies: First, we mechanize an SSP security proof of the key encapsulation mechanism–data encryption mechanism (KEM-DEM) public key encryption scheme, which led to the discovery of an error in the original paper proof that has since been fixed. Second, we use SSProve to formally prove security of the sigma-protocol zero-knowledge construction, and we moreover construct a commitment scheme from a sigma-protocol to compare with a similar development in CryptHOL. We instantiate the security proof for sigma-protocols to give concrete security bounds for Schnorr’s sigma-protocol.</p>","PeriodicalId":50939,"journal":{"name":"ACM Transactions on Programming Languages and Systems","volume":"263 9","pages":""},"PeriodicalIF":1.3,"publicationDate":"2023-07-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"138508356","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
Multiple Input Parsing and Lexical Analysis 多输入解析和词法分析
IF 1.3 2区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING Pub Date : 2023-07-19 DOI: https://dl.acm.org/doi/10.1145/3594734
Elizabeth Scott, Adrian Johnstone, Robert Walsh

This article introduces two new approaches in the areas of lexical analysis and context-free parsing. We present an extension, MGLL, of generalised parsing which allows multiple input strings to be parsed together efficiently, and we present an enhanced approach to lexical analysis which exploits this multiple parsing capability. The work provides new power to formal language specification and disambiguation, and brings new techniques into the historically well-studied areas of lexical and syntax analysis. It encompasses character-level parsing at one extreme and the classical LEX/YACC style division at the other, allowing the advantages of both approaches.

本文介绍了词法分析和上下文无关解析领域的两种新方法。我们提出了广义解析的扩展MGLL,它允许多个输入字符串有效地一起解析,并且我们提出了一种增强的词法分析方法,它利用了这种多重解析能力。这项工作为形式语言规范和消除歧义提供了新的力量,并将新技术引入了历史上研究得很好的词汇和语法分析领域。它一方面包含字符级解析,另一方面包含经典的LEX/YACC风格划分,从而实现了两种方法的优点。
{"title":"Multiple Input Parsing and Lexical Analysis","authors":"Elizabeth Scott, Adrian Johnstone, Robert Walsh","doi":"https://dl.acm.org/doi/10.1145/3594734","DOIUrl":"https://doi.org/https://dl.acm.org/doi/10.1145/3594734","url":null,"abstract":"<p>This article introduces two new approaches in the areas of lexical analysis and context-free parsing. We present an extension, MGLL, of generalised parsing which allows multiple input strings to be parsed together efficiently, and we present an enhanced approach to lexical analysis which exploits this multiple parsing capability. The work provides new power to formal language specification and disambiguation, and brings new techniques into the historically well-studied areas of lexical and syntax analysis. It encompasses character-level parsing at one extreme and the classical LEX/YACC style division at the other, allowing the advantages of both approaches.</p>","PeriodicalId":50939,"journal":{"name":"ACM Transactions on Programming Languages and Systems","volume":"260 11","pages":""},"PeriodicalIF":1.3,"publicationDate":"2023-07-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"138508378","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
Prisma: A Tierless Language for Enforcing Contract-Client Protocols in Decentralized Applications Prisma:一种用于在分散应用程序中执行合约-客户端协议的无层语言
IF 1.3 2区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING Pub Date : 2023-07-18 DOI: https://dl.acm.org/doi/10.1145/3604629
David Richter, David Kretzler, Pascal Weisenburger, Guido Salvaneschi, Sebastian Faust, Mira Mezini

Decentralized applications (dApps) consist of smart contracts that run on blockchains and clients that model collaborating parties. dApps are used to model financial and legal business functionality. Today, contracts and clients are written as separate programs – in different programming languages – communicating via send and receive operations. This makes distributed program flow awkward to express and reason about, increasing the potential for mismatches in the client-contract interface, which can be exploited by malicious clients, potentially leading to huge financial losses.

In this paper, we present Prisma, a language for tierless decentralized applications, where the contract and its clients are defined in one unit and pairs of send and receive actions that “belong together” are encapsulated into a single direct-style operation, which is executed differently by sending and receiving parties. This enables expressing distributed program flow via standard control flow and renders mismatching communication impossible. We prove formally that our compiler preserves program behavior in presence of an attacker controlling the client code. We systematically compare Prisma with mainstream and advanced programming models for dApps and provide empirical evidence for its expressiveness and performance.

去中心化应用程序(dApps)由运行在区块链上的智能合约和为协作方建模的客户端组成。dapp用于模拟金融和法律业务功能。今天,合同和客户端被写成独立的程序——用不同的编程语言——通过发送和接收操作进行通信。这使得分布式程序流难以表达和推理,增加了客户-契约接口中不匹配的可能性,这可能被恶意客户端利用,可能导致巨大的经济损失。在本文中,我们介绍了Prisma,一种用于无层分散应用程序的语言,其中合约及其客户端被定义在一个单元中,“属于一起”的发送和接收操作对被封装到单个直接风格的操作中,该操作由发送方和接收方以不同的方式执行。这使得通过标准控制流表达分布式程序流成为可能,并使不匹配的通信成为不可能。我们正式证明,在攻击者控制客户端代码的情况下,我们的编译器可以保留程序行为。我们系统地比较了Prisma与主流和先进的dapp编程模型,并为其表现力和性能提供了经验证据。
{"title":"Prisma: A Tierless Language for Enforcing Contract-Client Protocols in Decentralized Applications","authors":"David Richter, David Kretzler, Pascal Weisenburger, Guido Salvaneschi, Sebastian Faust, Mira Mezini","doi":"https://dl.acm.org/doi/10.1145/3604629","DOIUrl":"https://doi.org/https://dl.acm.org/doi/10.1145/3604629","url":null,"abstract":"<p>Decentralized applications (dApps) consist of smart contracts that run on blockchains and clients that model collaborating parties. dApps are used to model financial and legal business functionality. Today, contracts and clients are written as separate programs – in different programming languages – communicating via send and receive operations. This makes distributed program flow awkward to express and reason about, increasing the potential for mismatches in the client-contract interface, which can be exploited by malicious clients, potentially leading to huge financial losses. </p><p>In this paper, we present <sans-serif>Prisma</sans-serif>, a language for tierless decentralized applications, where the contract and its clients are defined in one unit and pairs of send and receive actions that “belong together” are encapsulated into a single direct-style operation, which is executed differently by sending and receiving parties. This enables expressing distributed program flow via standard control flow and renders mismatching communication impossible. We prove formally that our compiler preserves program behavior in presence of an attacker controlling the client code. We systematically compare <sans-serif>Prisma</sans-serif> with mainstream and advanced programming models for dApps and provide empirical evidence for its expressiveness and performance.</p>","PeriodicalId":50939,"journal":{"name":"ACM Transactions on Programming Languages and Systems","volume":"265 10","pages":""},"PeriodicalIF":1.3,"publicationDate":"2023-07-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"138508337","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
A Verified Optimizer for Quantum Circuits 量子电路的验证优化器
IF 1.3 2区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING Pub Date : 2023-07-12 DOI: https://dl.acm.org/doi/10.1145/3604630
Kesha Hietala, Robert Rand, Liyi Li, Shih-Han Hung, Xiaodi Wu, Michael Hicks

We present voqc, the first verified optimizer for quantum circuits, written using the Coq proof assistant. Quantum circuits are expressed as programs in a simple, low-level language called sqir, a small quantum intermediate representation, which is deeply embedded in Coq. Optimizations and other transformations are expressed as Coq functions, which are proved correct with respect to a semantics of sqir programs. sqir programs denote complex-valued matrices, as is standard in quantum computation, but we treat matrices symbolically in order to reason about programs that use an arbitrary number of quantum bits. sqir’s careful design and our provided automation make it possible to write and verify a broad range of optimizations in voqc, including full-circuit transformations from cutting-edge optimizers.

我们提出了voqc,第一个经过验证的量子电路优化器,使用Coq证明助手编写。量子电路是用一种简单的低级语言sqir来表示的,sqir是一种小的量子中间表示,它深深嵌入在Coq中。优化和其他转换表示为Coq函数,这些函数在sqir程序的语义方面被证明是正确的。Sqir程序表示复值矩阵,这在量子计算中是标准的,但是为了对使用任意数量量子比特的程序进行推理,我们用符号来处理矩阵。Sqir的精心设计和我们提供的自动化使得在voqc中编写和验证广泛的优化成为可能,包括来自尖端优化器的全电路转换。
{"title":"A Verified Optimizer for Quantum Circuits","authors":"Kesha Hietala, Robert Rand, Liyi Li, Shih-Han Hung, Xiaodi Wu, Michael Hicks","doi":"https://dl.acm.org/doi/10.1145/3604630","DOIUrl":"https://doi.org/https://dl.acm.org/doi/10.1145/3604630","url":null,"abstract":"<p>We present <span>voqc</span>, the first <i>verified optimizer for quantum circuits</i>, written using the Coq proof assistant. Quantum circuits are expressed as programs in a simple, low-level language called s<span>qir</span>, a <i>small quantum intermediate representation</i>, which is deeply embedded in Coq. Optimizations and other transformations are expressed as Coq functions, which are proved correct with respect to a semantics of s<span>qir</span> programs. s<span>qir</span> programs denote complex-valued matrices, as is standard in quantum computation, but we treat matrices symbolically in order to reason about programs that use an arbitrary number of quantum bits. s<span>qir</span>’s careful design and our provided automation make it possible to write and verify a broad range of optimizations in <span>voqc</span>, including full-circuit transformations from cutting-edge optimizers.</p>","PeriodicalId":50939,"journal":{"name":"ACM Transactions on Programming Languages and Systems","volume":"263 4","pages":""},"PeriodicalIF":1.3,"publicationDate":"2023-07-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"138508358","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
A Verified Optimizer for Quantum Circuits 量子电路的验证优化器
IF 1.3 2区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING Pub Date : 2023-07-12 DOI: 10.1145/3604630
K. Hietala, Robert Rand, Liyi Li, S. Hung, Xiaodi Wu, Michael Hicks
We present voqc, the first verified optimizer for quantum circuits, written using the Coq proof assistant. Quantum circuits are expressed as programs in a simple, low-level language called sqir, a small quantum intermediate representation, which is deeply embedded in Coq. Optimizations and other transformations are expressed as Coq functions, which are proved correct with respect to a semantics of sqir programs. sqir programs denote complex-valued matrices, as is standard in quantum computation, but we treat matrices symbolically to reason about programs that use an arbitrary number of quantum bits. sqir’s careful design and our provided automation make it possible to write and verify a broad range of optimizations in voqc, including full-circuit transformations from cutting-edge optimizers.
我们提出了voqc,第一个经过验证的量子电路优化器,使用Coq证明助手编写。量子电路是用一种简单的低级语言sqir来表示的,sqir是一种小的量子中间表示,它深深嵌入在Coq中。优化和其他转换表示为Coq函数,这些函数在sqir程序的语义方面被证明是正确的。Sqir程序表示复值矩阵,这在量子计算中是标准的,但是我们用符号来处理矩阵来推理使用任意数量量子比特的程序。Sqir的精心设计和我们提供的自动化使得在voqc中编写和验证广泛的优化成为可能,包括来自尖端优化器的全电路转换。
{"title":"A Verified Optimizer for Quantum Circuits","authors":"K. Hietala, Robert Rand, Liyi Li, S. Hung, Xiaodi Wu, Michael Hicks","doi":"10.1145/3604630","DOIUrl":"https://doi.org/10.1145/3604630","url":null,"abstract":"We present voqc, the first verified optimizer for quantum circuits, written using the Coq proof assistant. Quantum circuits are expressed as programs in a simple, low-level language called sqir, a small quantum intermediate representation, which is deeply embedded in Coq. Optimizations and other transformations are expressed as Coq functions, which are proved correct with respect to a semantics of sqir programs. sqir programs denote complex-valued matrices, as is standard in quantum computation, but we treat matrices symbolically to reason about programs that use an arbitrary number of quantum bits. sqir’s careful design and our provided automation make it possible to write and verify a broad range of optimizations in voqc, including full-circuit transformations from cutting-edge optimizers.","PeriodicalId":50939,"journal":{"name":"ACM Transactions on Programming Languages and Systems","volume":"45 1","pages":"1 - 35"},"PeriodicalIF":1.3,"publicationDate":"2023-07-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"42444999","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
Synchronous Deterministic Parallel Programming for Multi-Cores with ForeC 基于ForeC的多核同步确定性并行编程
IF 1.3 2区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING Pub Date : 2023-06-26 DOI: https://dl.acm.org/doi/10.1145/3591594
Eugene Yip, Alain Girault, Partha S. Roop, Morteza Biglari-Abhari

Embedded real-time systems are tightly integrated with their physical environment. Their correctness depends both on the outputs and timeliness of their computations. The increasing use of multi-core processors in such systems is pushing embedded programmers to be parallel programming experts. However, parallel programming is challenging because of the skills, experiences, and knowledge needed to avoid common parallel programming traps and pitfalls. This article proposes the ForeC synchronous multi-threaded programming language for the deterministic, parallel, and reactive programming of embedded multi-cores. The synchronous semantics of ForeC is designed to greatly simplify the understanding and debugging of parallel programs. ForeC ensures that ForeC programs can be compiled efficiently for parallel execution and be amenable to static timing analysis. ForeC’s main innovation is its shared variable semantics that provides thread isolation and deterministic thread communication. All ForeC programs are correct by construction and deadlock free because no non-deterministic constructs are needed. We have benchmarked our ForeC compiler with several medium-sized programs (e.g., a 2.274-line ForeC program with up to 26 threads and distributed on up to 10 cores, which was based on a 2.155-line non-multi-threaded C program). These benchmark programs show that ForeC can achieve better parallel performance than Esterel, a widely used imperative synchronous language for concurrent safety-critical systems, and is competitive in performance to OpenMP, a popular desktop solution for parallel programming (which implements classical multi-threading, hence is intrinsically non-deterministic). We also demonstrate that the worst-case execution time of ForeC programs can be estimated to a high degree of precision.

嵌入式实时系统与其物理环境紧密集成。它们的正确性既取决于计算的输出,也取决于计算的及时性。在这种系统中越来越多地使用多核处理器,促使嵌入式程序员成为并行编程专家。然而,并行编程是具有挑战性的,因为需要技能、经验和知识来避免常见的并行编程陷阱和缺陷。本文提出了ForeC同步多线程编程语言,用于嵌入式多核的确定性、并行和响应式编程。ForeC的同步语义旨在大大简化并行程序的理解和调试。ForeC保证了ForeC程序可以有效地编译并行执行,并适应静态时序分析。ForeC的主要创新是它的共享变量语义,它提供线程隔离和确定性线程通信。所有ForeC程序的构造都是正确的,并且没有死锁,因为不需要非确定性构造。我们用几个中等规模的程序对我们的ForeC编译器进行了基准测试(例如,一个2.274行的ForeC程序,有多达26个线程,分布在多达10个内核上,它基于一个2.155行的非多线程C程序)。这些基准程序表明,ForeC可以实现比Esterel更好的并行性能,Esterel是一种广泛用于并发安全关键系统的命令式同步语言,并且在性能上与OpenMP竞争,OpenMP是一种流行的并行编程桌面解决方案(它实现了经典的多线程,因此本质上是不确定的)。我们还证明了ForeC程序的最坏情况执行时间可以估计到很高的精度。
{"title":"Synchronous Deterministic Parallel Programming for Multi-Cores with ForeC","authors":"Eugene Yip, Alain Girault, Partha S. Roop, Morteza Biglari-Abhari","doi":"https://dl.acm.org/doi/10.1145/3591594","DOIUrl":"https://doi.org/https://dl.acm.org/doi/10.1145/3591594","url":null,"abstract":"<p>Embedded real-time systems are tightly integrated with their physical environment. Their correctness depends both on the outputs and timeliness of their computations. The increasing use of multi-core processors in such systems is pushing embedded programmers to be parallel programming experts. However, parallel programming is challenging because of the skills, experiences, and knowledge needed to avoid common parallel programming traps and pitfalls. This article proposes the ForeC synchronous multi-threaded programming language for the deterministic, parallel, and reactive programming of embedded multi-cores. The synchronous semantics of ForeC is designed to greatly simplify the understanding and debugging of parallel programs. ForeC ensures that ForeC programs can be compiled efficiently for parallel execution and be amenable to static timing analysis. ForeC’s main innovation is its shared variable semantics that provides thread isolation and deterministic thread communication. All ForeC programs are correct by construction and deadlock free because no non-deterministic constructs are needed. We have benchmarked our ForeC compiler with several medium-sized programs (e.g., a 2.274-line ForeC program with up to 26 threads and distributed on up to 10 cores, which was based on a 2.155-line non-multi-threaded C program). These benchmark programs show that ForeC can achieve better parallel performance than Esterel, a widely used imperative synchronous language for concurrent safety-critical systems, and is competitive in performance to OpenMP, a popular desktop solution for parallel programming (which implements classical multi-threading, hence is intrinsically non-deterministic). We also demonstrate that the worst-case execution time of ForeC programs can be estimated to a high degree of precision.</p>","PeriodicalId":50939,"journal":{"name":"ACM Transactions on Programming Languages and Systems","volume":"265 4","pages":""},"PeriodicalIF":1.3,"publicationDate":"2023-06-26","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"138508340","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
期刊
ACM Transactions on Programming Languages and Systems
全部 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