首页 > 最新文献

arXiv - CS - Programming Languages最新文献

英文 中文
Catamorphic Abstractions for Constrained Horn Clause Satisfiability 受限角句子可满足性的拟态抽象
Pub Date : 2024-08-13 DOI: arxiv-2408.06988
Emanuele De AngelisIASI-CNR, Rome, Italy, Fabio FioravantiDEc, University 'G. d'Annunzio', Chieti-Pescara, Italy, Alberto PettorossiDICII, University of Rome 'Tor Vergata', Italy, Maurizio ProiettiIASI-CNR, Rome, Italy
Catamorphisms are functions that are recursively defined on list and treesand, in general, on Algebraic Data Types (ADTs), and are often used to computesuitable abstractions of programs that manipulate ADTs. Examples ofcatamorphisms include functions that compute size of lists, orderedness oflists, and height of trees. It is well known that program properties specifiedthrough catamorphisms can be proved by showing the satisfiability of suitablesets of Constrained Horn Clauses (CHCs). We address the problem of checking thesatisfiability of those sets of CHCs, and we propose a method for transformingsets of CHCs into equisatisfiable sets where catamorphisms are no longerpresent. As a consequence, clauses with catamorphisms can be handled withoutextending the satisfiability algorithms used by existing CHC solvers. Throughan experimental evaluation on a non-trivial benchmark consisting of many listand tree processing algorithms expressed as sets of CHCs, we show that ourtechnique is indeed effective and significantly enhances the performance ofstate-of-the-art CHC solvers.
类变形是对列表和树以及一般的代数数据类型(ADT)进行递归定义的函数,通常用于计算操作 ADT 的程序的合适抽象。变形的例子包括计算列表大小、列表有序性和树高度的函数。众所周知,通过变形指定的程序属性可以通过证明约束角子句(CHC)的合适集合的可满足性来证明。我们解决了检查这些 CHCs 集的可满足性的问题,并提出了一种方法,用于将 CHCs 集转化为不再存在 catamorphism 的等可满足集。因此,我们可以在不改变现有 CHC 求解器所使用的可满足性算法的情况下,处理具有猫态性的子句。通过在一个由许多以 CHC 集表示的列表和树处理算法组成的非难基准上进行实验评估,我们证明了我们的技术确实有效,并显著提高了最先进的 CHC 求解器的性能。
{"title":"Catamorphic Abstractions for Constrained Horn Clause Satisfiability","authors":"Emanuele De AngelisIASI-CNR, Rome, Italy, Fabio FioravantiDEc, University 'G. d'Annunzio', Chieti-Pescara, Italy, Alberto PettorossiDICII, University of Rome 'Tor Vergata', Italy, Maurizio ProiettiIASI-CNR, Rome, Italy","doi":"arxiv-2408.06988","DOIUrl":"https://doi.org/arxiv-2408.06988","url":null,"abstract":"Catamorphisms are functions that are recursively defined on list and trees\u0000and, in general, on Algebraic Data Types (ADTs), and are often used to compute\u0000suitable abstractions of programs that manipulate ADTs. Examples of\u0000catamorphisms include functions that compute size of lists, orderedness of\u0000lists, and height of trees. It is well known that program properties specified\u0000through catamorphisms can be proved by showing the satisfiability of suitable\u0000sets of Constrained Horn Clauses (CHCs). We address the problem of checking the\u0000satisfiability of those sets of CHCs, and we propose a method for transforming\u0000sets of CHCs into equisatisfiable sets where catamorphisms are no longer\u0000present. As a consequence, clauses with catamorphisms can be handled without\u0000extending the satisfiability algorithms used by existing CHC solvers. Through\u0000an experimental evaluation on a non-trivial benchmark consisting of many list\u0000and tree processing algorithms expressed as sets of CHCs, we show that our\u0000technique is indeed effective and significantly enhances the performance of\u0000state-of-the-art CHC solvers.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"4 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-13","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179582","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}
引用次数: 0
Theorem-Carrying-Transaction: Runtime Certification to Ensure Safety for Smart Contract Transactions 定理携带交易:确保智能合约交易安全的运行时认证
Pub Date : 2024-08-12 DOI: arxiv-2408.06478
Nikolaj S. BjørnerMicrosoft Research, Ashley J. ChenNew York University Shanghai, Shuo ChenMicrosoft Research, Yang ChenMicrosoft Research, Zhongxin GuoMicrosoft Research, Tzu-Han HsuMichigan State University, Peng LiuPennsylvania State University, Nanqing LuoPennsylvania State University
Security bugs and trapdoors in smart contracts have been impacting theEthereum community since its inception. Conceptually, the 1.45-millionEthereum's contracts form a single "gigantic program" whose behaviors aredetermined by the complex reference-topology between the contracts. Can theEthereum community be assured that this gigantic program conforms to itsdesign-level safety properties, despite unforeseeable code-level intricacies?Static code verification is inadequate due to the program's gigantic scale andhigh polymorphism. In this paper, we present a viable technological roadmap forthe community toward this ambitious goal. Our technology, calledTheorem-Carrying-Transaction (TCT), combines the benefits of concrete executionand symbolic proofs. Under the TCT protocol, every transaction carries atheorem that proves its adherence to the specified properties in the invokedcontracts, and the runtime system checks the theorem before executing thetransaction. Once a property is specified in a contract, it can be treatedconfidently as an unconditional guarantee made by the contract. As casestudies, we demonstrate that TCT secures token contracts without foreseeingcode-level intricacies like integer overflow and reentrancy. TCT is alsosuccessfully applied to a Uniswap codebase, showcasing a complex decentralizedfinance (DeFi) scenario. Our prototype incurs a negligible runtime overhead,two orders of magnitude lower than a state-of-the-art approach.
自以太坊社区成立以来,智能合约中的安全漏洞和陷阱一直在影响着它。从概念上讲,以太坊的 145 万个合约组成了一个单一的 "巨型程序",其行为由合约之间复杂的参考拓扑结构决定。尽管存在不可预见的代码级错综复杂性,但以太坊社区能否确保这个巨型程序符合其设计级安全属性?在本文中,我们为业界提出了实现这一宏伟目标的可行技术路线图。我们的技术被称为定理携带事务(TCT),它结合了具体执行和符号证明的优点。在 TCT 协议下,每个事务都会携带一个定理,证明其符合所调用合约中的指定属性,运行时系统会在执行事务之前检查该定理。一旦在合同中指定了属性,就可以将其视为合同的无条件保证。通过案例研究,我们证明了 TCT 无需预见代码级的复杂性(如整数溢出和重入)就能保证令牌合约的安全。我们还将 TCT 成功应用于 Uniswap 代码库,展示了复杂的去中心化金融(DeFi)场景。我们的原型产生的运行时开销可以忽略不计,比最先进的方法低两个数量级。
{"title":"Theorem-Carrying-Transaction: Runtime Certification to Ensure Safety for Smart Contract Transactions","authors":"Nikolaj S. BjørnerMicrosoft Research, Ashley J. ChenNew York University Shanghai, Shuo ChenMicrosoft Research, Yang ChenMicrosoft Research, Zhongxin GuoMicrosoft Research, Tzu-Han HsuMichigan State University, Peng LiuPennsylvania State University, Nanqing LuoPennsylvania State University","doi":"arxiv-2408.06478","DOIUrl":"https://doi.org/arxiv-2408.06478","url":null,"abstract":"Security bugs and trapdoors in smart contracts have been impacting the\u0000Ethereum community since its inception. Conceptually, the 1.45-million\u0000Ethereum's contracts form a single \"gigantic program\" whose behaviors are\u0000determined by the complex reference-topology between the contracts. Can the\u0000Ethereum community be assured that this gigantic program conforms to its\u0000design-level safety properties, despite unforeseeable code-level intricacies?\u0000Static code verification is inadequate due to the program's gigantic scale and\u0000high polymorphism. In this paper, we present a viable technological roadmap for\u0000the community toward this ambitious goal. Our technology, called\u0000Theorem-Carrying-Transaction (TCT), combines the benefits of concrete execution\u0000and symbolic proofs. Under the TCT protocol, every transaction carries a\u0000theorem that proves its adherence to the specified properties in the invoked\u0000contracts, and the runtime system checks the theorem before executing the\u0000transaction. Once a property is specified in a contract, it can be treated\u0000confidently as an unconditional guarantee made by the contract. As case\u0000studies, we demonstrate that TCT secures token contracts without foreseeing\u0000code-level intricacies like integer overflow and reentrancy. TCT is also\u0000successfully applied to a Uniswap codebase, showcasing a complex decentralized\u0000finance (DeFi) scenario. Our prototype incurs a negligible runtime overhead,\u0000two orders of magnitude lower than a state-of-the-art approach.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"3 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179580","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}
引用次数: 0
Syntax-Guided Automated Program Repair for Hyperproperties 语法引导的超属性自动程序修复
Pub Date : 2024-08-12 DOI: arxiv-2408.06035
Raven Beutner, Tzu-Han Hsu, Borzoo Bonakdarpour, Bernd Finkbeiner
We study the problem of automatically repairing infinite-state softwareprograms w.r.t. temporal hyperproperties. As a first step, we present a repairapproach for the temporal logic HyperLTL based on symbolic execution,constraint generation, and syntax-guided synthesis of repair expression(SyGuS). To improve the repair quality, we introduce the notation of atransparent repair that aims to find a patch that is as close as possible tothe original program. As a practical realization, we develop an iterativerepair approach. Here, we search for a sequence of repairs that are closer andcloser to the original program's behavior. We implement our method in aprototype and report on encouraging experimental results using off-the-shelfSyGuS solvers.
我们研究了根据时态超属性自动修复无限态软件程序的问题。首先,我们提出了一种基于符号执行、约束生成和语法引导的修复表达式合成(SyGuS)的时态逻辑 HyperLTL 的修复方法。为了提高修复质量,我们引入了透明修复的概念,目的是找到一个尽可能接近原始程序的补丁。在实际应用中,我们开发了一种迭代修复方法。在这里,我们寻找一连串越来越接近原始程序行为的修补程序。我们在一个原型中实现了我们的方法,并报告了使用现成SyGuS求解器取得的令人鼓舞的实验结果。
{"title":"Syntax-Guided Automated Program Repair for Hyperproperties","authors":"Raven Beutner, Tzu-Han Hsu, Borzoo Bonakdarpour, Bernd Finkbeiner","doi":"arxiv-2408.06035","DOIUrl":"https://doi.org/arxiv-2408.06035","url":null,"abstract":"We study the problem of automatically repairing infinite-state software\u0000programs w.r.t. temporal hyperproperties. As a first step, we present a repair\u0000approach for the temporal logic HyperLTL based on symbolic execution,\u0000constraint generation, and syntax-guided synthesis of repair expression\u0000(SyGuS). To improve the repair quality, we introduce the notation of a\u0000transparent repair that aims to find a patch that is as close as possible to\u0000the original program. As a practical realization, we develop an iterative\u0000repair approach. Here, we search for a sequence of repairs that are closer and\u0000closer to the original program's behavior. We implement our method in a\u0000prototype and report on encouraging experimental results using off-the-shelf\u0000SyGuS solvers.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"48 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179581","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}
引用次数: 0
Modelling Probabilistic FPC in Guarded Type Theory 在守护类型理论中模拟概率 FPC
Pub Date : 2024-08-08 DOI: arxiv-2408.04455
Philipp Jan Andries Stassen, Rasmus Ejlers Møgelberg, Maaike Zwart, Alejandro Aguirre, Lars Birkedal
Constructive type theory combines logic and programming in one language. Thisis useful both for reasoning about programs written in type theory, as well asfor reasoning about other programming languages inside type theory. It iswell-known that it is challenging to extend these applications to languageswith recursion and computational effects such as probabilistic choice, becausethese features are not easily represented in constructive type theory. We showhow to define and reason about a programming language with probabilistic choiceand recursive types, in guarded type theory. We use higher inductive types torepresent finite distributions and guarded recursion to model recursion. Wedefine both operational and denotational semantics, as well as a relationbetween the two. The relation can be used to prove adequacy, but we also showhow to use it to reason about programs up to contextual equivalence. To thebest of our knowledge, this is the first model of a programming language withprobabilistic choice and recursive types in a constructive type theory.
构造型理论将逻辑和编程结合在一种语言中。这既有助于推理用类型理论编写的程序,也有助于推理类型理论中的其他编程语言。众所周知,将这些应用扩展到具有递归和计算效应(如概率选择)的语言是一项挑战,因为这些特征在构造类型论中不易表示。我们展示了如何在防护类型理论中定义和推理具有概率选择和递归类型的编程语言。我们用高级归纳类型来表示有限分布,用保护递归来模拟递归。我们定义了操作语义和指称语义,以及两者之间的关系。这种关系可以用来证明充分性,但我们也展示了如何用它来推理程序,直至上下文等价。据我们所知,这是第一个在构造型理论中使用概率选择和递归类型的编程语言模型。
{"title":"Modelling Probabilistic FPC in Guarded Type Theory","authors":"Philipp Jan Andries Stassen, Rasmus Ejlers Møgelberg, Maaike Zwart, Alejandro Aguirre, Lars Birkedal","doi":"arxiv-2408.04455","DOIUrl":"https://doi.org/arxiv-2408.04455","url":null,"abstract":"Constructive type theory combines logic and programming in one language. This\u0000is useful both for reasoning about programs written in type theory, as well as\u0000for reasoning about other programming languages inside type theory. It is\u0000well-known that it is challenging to extend these applications to languages\u0000with recursion and computational effects such as probabilistic choice, because\u0000these features are not easily represented in constructive type theory. We show\u0000how to define and reason about a programming language with probabilistic choice\u0000and recursive types, in guarded type theory. We use higher inductive types to\u0000represent finite distributions and guarded recursion to model recursion. We\u0000define both operational and denotational semantics, as well as a relation\u0000between the two. The relation can be used to prove adequacy, but we also show\u0000how to use it to reason about programs up to contextual equivalence. To the\u0000best of our knowledge, this is the first model of a programming language with\u0000probabilistic choice and recursive types in a constructive type theory.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"23 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"141941288","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}
引用次数: 0
Combining Neural Architecture Search and Automatic Code Optimization: A Survey 神经架构搜索与自动代码优化的结合:调查
Pub Date : 2024-08-07 DOI: arxiv-2408.04116
Inas Bachiri, Hadjer Benmeziane, Smail Niar, Riyadh Baghdadi, Hamza Ouarnoughi, Abdelkrime Aries
Deep Learning models have experienced exponential growth in complexity andresource demands in recent years. Accelerating these models for efficientexecution on resource-constrained devices has become more crucial than ever.Two notable techniques employed to achieve this goal are Hardware-aware NeuralArchitecture Search (HW-NAS) and Automatic Code Optimization (ACO). HW-NASautomatically designs accurate yet hardware-friendly neural networks, while ACOinvolves searching for the best compiler optimizations to apply on neuralnetworks for efficient mapping and inference on the target hardware. Thissurvey explores recent works that combine these two techniques within a singleframework. We present the fundamental principles of both domains anddemonstrate their sub-optimality when performed independently. We theninvestigate their integration into a joint optimization process that we callHardware Aware-Neural Architecture and Compiler Optimizations co-Search(NACOS).
近年来,深度学习模型的复杂性和资源需求呈指数级增长。为实现这一目标,我们采用了两种著名的技术:硬件感知神经架构搜索(HW-NAS)和自动代码优化(ACO)。HW-NAS 自动设计精确且硬件友好的神经网络,而 ACO 则涉及搜索最佳编译器优化,以应用于神经网络,从而在目标硬件上实现高效映射和推理。本研究探讨了将这两种技术结合到单一框架中的最新研究成果。我们介绍了这两个领域的基本原理,并展示了它们在独立运行时的次优化性。然后,我们研究了将这两种技术整合到一个联合优化过程中的方法,我们称之为 "硬件感知-神经架构和编译器优化联合搜索(NACOS)"。
{"title":"Combining Neural Architecture Search and Automatic Code Optimization: A Survey","authors":"Inas Bachiri, Hadjer Benmeziane, Smail Niar, Riyadh Baghdadi, Hamza Ouarnoughi, Abdelkrime Aries","doi":"arxiv-2408.04116","DOIUrl":"https://doi.org/arxiv-2408.04116","url":null,"abstract":"Deep Learning models have experienced exponential growth in complexity and\u0000resource demands in recent years. Accelerating these models for efficient\u0000execution on resource-constrained devices has become more crucial than ever.\u0000Two notable techniques employed to achieve this goal are Hardware-aware Neural\u0000Architecture Search (HW-NAS) and Automatic Code Optimization (ACO). HW-NAS\u0000automatically designs accurate yet hardware-friendly neural networks, while ACO\u0000involves searching for the best compiler optimizations to apply on neural\u0000networks for efficient mapping and inference on the target hardware. This\u0000survey explores recent works that combine these two techniques within a single\u0000framework. We present the fundamental principles of both domains and\u0000demonstrate their sub-optimality when performed independently. We then\u0000investigate their integration into a joint optimization process that we call\u0000Hardware Aware-Neural Architecture and Compiler Optimizations co-Search\u0000(NACOS).","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"11 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"141941289","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}
引用次数: 0
Synthesizing Abstract Transformers for Reduced-Product Domains 为还原产品领域合成抽象变压器
Pub Date : 2024-08-07 DOI: arxiv-2408.04040
Pankaj Kumar Kalita, Thomas Reps, Subhajit Roy
Recently, we showed how to apply program-synthesis techniques to createabstract transformers in a user-provided domain-specific language (DSL) L(i.e., ''L-transformers"). However, we found that the algorithm of Kalita etal. does not succeed when applied to reduced-product domains: the need tosynthesize transformers for all of the domains simultaneously blows up thesearch space. Because reduced-product domains are an important device for improving theprecision of abstract interpretation, in this paper, we propose an algorithm tosynthesize reduced L-transformers $langle f_1^{sharp R}, f_2^{sharp R},...,f_n^{sharp R}rangle$ for a product domain $A_1 times A_2 times ldotstimes A_n$ , using multiple DSLs: $mathcal{L} = langle mathcal{L}_1 ,mathcal{L}_2, ... , mathcal{L}_n rangle$. Synthesis of reduced-producttransformers is quite challenging: first, the synthesis task has to tackle anincreased ''feature set" because each component transformer now has access tothe abstract inputs from all component domains in the product. Second, toensure that the product transformer is maximally precise, the synthesis taskneeds to arrange for the component transformers to cooperate with each other. We implemented our algorithm in a tool, Amurth2, and used it to synthesizeabstract transformers for two product domains -- SAFE and JSAI -- availablewithin the SAFEstr framework for JavaScript program analysis. For four of thesix operations supported by SAFEstr, Amurth2 synthesizes more precise abstracttransformers than the manually written ones available in SAFEstr.
最近,我们展示了如何应用程序合成技术,在用户提供的特定领域语言(DSL)L 中创建抽象变换器(即 "L-变换器")。然而,我们发现,Kalita 等人的算法在应用于减积域时并不成功:因为需要同时合成所有域的变换器,这就压缩了arch 空间。因为还原积域是提高抽象解释精确度的重要工具,所以在本文中,我们提出了一种算法,使用多个 DSL 为积域 $A_1 times A_2 times ldotstimes A_n$ 合成还原 L 变换器 $langle f_1^{sharp R}, f_2^{sharp R},...,f_n^{sharp R}rangle$ :$mathcal{L} = langle mathcal{L}_1 ,mathcal{L}_2, ..., mathcal{L}_n rangle$。简化产品变换器的合成具有相当大的挑战性:首先,合成任务必须处理增加的 "特征集",因为每个组件变换器现在都可以访问产品中所有组件域的抽象输入。其次,为了确保产品变换器达到最高精度,合成任务需要安排组件变换器相互合作。我们在 Amurth2 工具中实现了我们的算法,并用它合成了两个产品域(SAFE 和 JSAI)的抽象变换器,这两个产品域可在用于 JavaScript 程序分析的 SAFEstr 框架中找到。对于SAFEstr支持的六种操作中的四种,Amurth2合成的抽象变换器比SAFEstr中手动编写的更为精确。
{"title":"Synthesizing Abstract Transformers for Reduced-Product Domains","authors":"Pankaj Kumar Kalita, Thomas Reps, Subhajit Roy","doi":"arxiv-2408.04040","DOIUrl":"https://doi.org/arxiv-2408.04040","url":null,"abstract":"Recently, we showed how to apply program-synthesis techniques to create\u0000abstract transformers in a user-provided domain-specific language (DSL) L\u0000(i.e., ''L-transformers\"). However, we found that the algorithm of Kalita et\u0000al. does not succeed when applied to reduced-product domains: the need to\u0000synthesize transformers for all of the domains simultaneously blows up the\u0000search space. Because reduced-product domains are an important device for improving the\u0000precision of abstract interpretation, in this paper, we propose an algorithm to\u0000synthesize reduced L-transformers $langle f_1^{sharp R}, f_2^{sharp R},...,\u0000f_n^{sharp R}rangle$ for a product domain $A_1 times A_2 times ldots\u0000times A_n$ , using multiple DSLs: $mathcal{L} = langle mathcal{L}_1 ,\u0000mathcal{L}_2, ... , mathcal{L}_n rangle$. Synthesis of reduced-product\u0000transformers is quite challenging: first, the synthesis task has to tackle an\u0000increased ''feature set\" because each component transformer now has access to\u0000the abstract inputs from all component domains in the product. Second, to\u0000ensure that the product transformer is maximally precise, the synthesis task\u0000needs to arrange for the component transformers to cooperate with each other. We implemented our algorithm in a tool, Amurth2, and used it to synthesize\u0000abstract transformers for two product domains -- SAFE and JSAI -- available\u0000within the SAFEstr framework for JavaScript program analysis. For four of the\u0000six operations supported by SAFEstr, Amurth2 synthesizes more precise abstract\u0000transformers than the manually written ones available in SAFEstr.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"59 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"141941293","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}
引用次数: 0
PolyHorn: A Polynomial Horn Clause Solver PolyHorn:多项式角条款求解器
Pub Date : 2024-08-07 DOI: arxiv-2408.03796
Krishnendu Chatterjee, Amir Kafshdar Goharshady, Ehsan Kafshdar Goharshady, Mehrdad Karrabi, Milad Saadat, Đorđe Žikelić
Polynomial Horn clauses with existentially and universally quantifiedvariables arise in many problems of verification and program analysis. Wepresent PolyHorn which is a tool for solving polynomial Horn clauses in whichvariables on both sides of the implication are real valued. Our tool provides aunified framework for polynomial Horn clause solving problems that arise inseveral papers in the literature. Our experimental evaluation over a wide rangeof benchmarks show the applicability of the tool as well as its benefits asopposed to simply using existing SMT solvers to solve such constraints.
在许多验证和程序分析问题中,都会出现存在和普遍量化变量的多项式 Horn 子句。我们提出的 PolyHorn 是一种解决多项式 Horn 子句的工具,其中蕴涵的两边变量都是实值。我们的工具为文献中出现的多项式 Horn 子句求解问题提供了一个统一的框架。我们在大量基准上进行的实验评估表明了该工具的适用性,以及与简单使用现有 SMT 求解器求解此类约束相比的优势。
{"title":"PolyHorn: A Polynomial Horn Clause Solver","authors":"Krishnendu Chatterjee, Amir Kafshdar Goharshady, Ehsan Kafshdar Goharshady, Mehrdad Karrabi, Milad Saadat, Đorđe Žikelić","doi":"arxiv-2408.03796","DOIUrl":"https://doi.org/arxiv-2408.03796","url":null,"abstract":"Polynomial Horn clauses with existentially and universally quantified\u0000variables arise in many problems of verification and program analysis. We\u0000present PolyHorn which is a tool for solving polynomial Horn clauses in which\u0000variables on both sides of the implication are real valued. Our tool provides a\u0000unified framework for polynomial Horn clause solving problems that arise in\u0000several papers in the literature. Our experimental evaluation over a wide range\u0000of benchmarks show the applicability of the tool as well as its benefits as\u0000opposed to simply using existing SMT solvers to solve such constraints.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"51 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"141941290","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}
引用次数: 0
LLM-Aided Compilation for Tensor Accelerators 张量加速器的 LLM 辅助编译
Pub Date : 2024-08-06 DOI: arxiv-2408.03408
Charles Hong, Sahil Bhatia, Altan Haan, Shengjun Kris Dong, Dima Nikiforov, Alvin Cheung, Yakun Sophia Shao
Hardware accelerators, in particular accelerators for tensor processing, havemany potential application domains. However, they currently lack the softwareinfrastructure to support the majority of domains outside of deep learning.Furthermore, a compiler that can easily be updated to reflect changes at bothapplication and hardware levels would enable more agile development and designspace exploration of accelerators, allowing hardware designers to realizecloser-to-optimal performance. In this work, we discuss how large languagemodels (LLMs) could be leveraged to build such a compiler. Specifically, wedemonstrate the ability of GPT-4 to achieve high pass rates in translating codeto the Gemmini accelerator, and prototype a technique for decomposingtranslation into smaller, more LLM-friendly steps. Additionally, we propose a2-phase workflow for utilizing LLMs to generate hardware-optimized code.
硬件加速器,特别是用于张量处理的加速器,有许多潜在的应用领域。此外,一个可以轻松更新以反映应用和硬件层面变化的编译器,将使加速器的开发和设计空间探索更加灵活,从而让硬件设计人员实现更接近最优的性能。在这项工作中,我们讨论了如何利用大型语言模型(LLM)来构建这样的编译器。具体来说,我们演示了 GPT-4 在将代码翻译到 Gemmini 加速器时实现高通过率的能力,并展示了一种将翻译分解为更小、对 LLM 更友好的步骤的技术原型。此外,我们还提出了利用 LLM 生成硬件优化代码的两阶段工作流程。
{"title":"LLM-Aided Compilation for Tensor Accelerators","authors":"Charles Hong, Sahil Bhatia, Altan Haan, Shengjun Kris Dong, Dima Nikiforov, Alvin Cheung, Yakun Sophia Shao","doi":"arxiv-2408.03408","DOIUrl":"https://doi.org/arxiv-2408.03408","url":null,"abstract":"Hardware accelerators, in particular accelerators for tensor processing, have\u0000many potential application domains. However, they currently lack the software\u0000infrastructure to support the majority of domains outside of deep learning.\u0000Furthermore, a compiler that can easily be updated to reflect changes at both\u0000application and hardware levels would enable more agile development and design\u0000space exploration of accelerators, allowing hardware designers to realize\u0000closer-to-optimal performance. In this work, we discuss how large language\u0000models (LLMs) could be leveraged to build such a compiler. Specifically, we\u0000demonstrate the ability of GPT-4 to achieve high pass rates in translating code\u0000to the Gemmini accelerator, and prototype a technique for decomposing\u0000translation into smaller, more LLM-friendly steps. Additionally, we propose a\u00002-phase workflow for utilizing LLMs to generate hardware-optimized code.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"23 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"141941292","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}
引用次数: 0
typedKanren: Statically Typed Relational Programming with Exhaustive Matching in Haskell typedKanren:用 Haskell 中的穷举匹配进行静态类型关系编程
Pub Date : 2024-08-06 DOI: arxiv-2408.03170
Nikolai Kudasov, Artem Starikov
We present a statically typed embedding of relational programming(specifically a dialect of miniKanren with disequality constraints) in Haskell.Apart from handling types, our dialect extends standard relational combinatorrepertoire with a variation of relational matching that supports staticexhaustiveness checks. To hide the boilerplate definitions and supportcomfortable logic programming with user-defined data types we use genericprogramming via GHC.Generics as well as metaprogramming via Template Haskell.We demonstrate our dialect on several examples and compare its performanceagainst some other known implementations of miniKanren.
除了处理类型之外,我们的方言还通过支持静态穷举检查的关系匹配变体扩展了标准关系组合库。为了隐藏模板定义并支持用户自定义数据类型的舒适逻辑编程,我们通过 GHC.Generics 使用了泛型编程,并通过 Template Haskell 使用了元编程。
{"title":"typedKanren: Statically Typed Relational Programming with Exhaustive Matching in Haskell","authors":"Nikolai Kudasov, Artem Starikov","doi":"arxiv-2408.03170","DOIUrl":"https://doi.org/arxiv-2408.03170","url":null,"abstract":"We present a statically typed embedding of relational programming\u0000(specifically a dialect of miniKanren with disequality constraints) in Haskell.\u0000Apart from handling types, our dialect extends standard relational combinator\u0000repertoire with a variation of relational matching that supports static\u0000exhaustiveness checks. To hide the boilerplate definitions and support\u0000comfortable logic programming with user-defined data types we use generic\u0000programming via GHC.Generics as well as metaprogramming via Template Haskell.\u0000We demonstrate our dialect on several examples and compare its performance\u0000against some other known implementations of miniKanren.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"23 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"141941251","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}
引用次数: 0
Inferring Accumulative Effects of Higher Order Programs 推断高阶程序的累积效应
Pub Date : 2024-08-05 DOI: arxiv-2408.02791
Mihai Nicola, Chaitanya Agarwal, Eric Koskinen, Thomas Wies
Many temporal safety properties of higher-order programs go beyond simpleevent sequencing and require an automaton register (or "accumulator") toexpress, such as input-dependency, event summation, resource usage, ensuringequal event magnitude, computation cost, etc. Some steps have been made towardsverifying more basic temporal event sequences via reductions to fairtermination [Murase et al. 2016] or some input-dependent properties throughdeductive proof systems [Nanjo et al. 2018]. However, there are currently noautomated techniques to verify the more general class of register-automatonsafety properties of higher-order programs. We introduce an abstract interpretation-based analysis to compute dependent,register-automata effects of recursive, higher-order programs. We captureproperties of a program's effects in terms of automata that summarizes thehistory of observed effects using an accumulator register. The key novelty is anew abstract domain for context-dependent effects, capable of abstractingrelations between the program environment, the automaton control state, and theaccumulator value. The upshot is a dataflow type and effect system thatcomputes context-sensitive effect summaries. We demonstrate our work via aprototype implementation that computes dependent effect summaries (andvalidates assertions) for OCaml-like recursive higher order programs. As abasis of comparison, we describe reductions to assertion checking foreffect-free programs, and demonstrate that our approach outperforms prior toolsDrift and RCaml/PCSat. Overall, across a set of 21 new benchmarks, RCaml/PCSatcould not verify any, Drift verified 9 benchmarks, and evDrift verified 19;evDrift also had a 30.5x over Drift on those benchmarks that both tools couldsolve.
高阶程序的许多时态安全特性超出了简单的事件排序,需要自动机寄存器(或 "累加器")来表达,如输入依赖性、事件求和、资源使用、确保事件量级相等、计算成本等。在通过还原到公平终结(fairtermination)[Murase 等人,2016 年] 或通过演绎证明系统(Nanjo 等人,2018 年] 来验证更基本的时序事件序列方面,人们已经迈出了一些步伐。然而,目前还没有自动化技术来验证高阶程序更一般的寄存器自动安全属性。我们引入了一种基于抽象解释的分析方法,来计算递归高阶程序的依赖性寄存器自动效应。我们用自动机捕捉程序的效应属性,自动机总结了使用累加器寄存器观察到的效应历史。关键的新颖之处在于为上下文相关效应提供了一个新的抽象域,能够抽象出程序环境、自动机控制状态和累加器值之间的关系。其结果是建立了一个数据流类型和效应系统,该系统可以计算与上下文相关的效应摘要。我们通过一个原型实现来演示我们的工作,它可以计算类似于 OCaml 的递归高阶程序的依赖效应摘要(并验证断言)。作为比较,我们描述了无效应程序断言检查的简化方法,并证明我们的方法优于先前的工具Drift和RCaml/PCSat。总体而言,在一组 21 个新基准中,RCaml/PCSat 无法验证任何基准,Drift 验证了 9 个基准,而 evDrift 验证了 19 个;在两个工具都能解决的基准上,evDrift 比 Drift 高出 30.5 倍。
{"title":"Inferring Accumulative Effects of Higher Order Programs","authors":"Mihai Nicola, Chaitanya Agarwal, Eric Koskinen, Thomas Wies","doi":"arxiv-2408.02791","DOIUrl":"https://doi.org/arxiv-2408.02791","url":null,"abstract":"Many temporal safety properties of higher-order programs go beyond simple\u0000event sequencing and require an automaton register (or \"accumulator\") to\u0000express, such as input-dependency, event summation, resource usage, ensuring\u0000equal event magnitude, computation cost, etc. Some steps have been made towards\u0000verifying more basic temporal event sequences via reductions to fair\u0000termination [Murase et al. 2016] or some input-dependent properties through\u0000deductive proof systems [Nanjo et al. 2018]. However, there are currently no\u0000automated techniques to verify the more general class of register-automaton\u0000safety properties of higher-order programs. We introduce an abstract interpretation-based analysis to compute dependent,\u0000register-automata effects of recursive, higher-order programs. We capture\u0000properties of a program's effects in terms of automata that summarizes the\u0000history of observed effects using an accumulator register. The key novelty is a\u0000new abstract domain for context-dependent effects, capable of abstracting\u0000relations between the program environment, the automaton control state, and the\u0000accumulator value. The upshot is a dataflow type and effect system that\u0000computes context-sensitive effect summaries. We demonstrate our work via a\u0000prototype implementation that computes dependent effect summaries (and\u0000validates assertions) for OCaml-like recursive higher order programs. As a\u0000basis of comparison, we describe reductions to assertion checking for\u0000effect-free programs, and demonstrate that our approach outperforms prior tools\u0000Drift and RCaml/PCSat. Overall, across a set of 21 new benchmarks, RCaml/PCSat\u0000could not verify any, Drift verified 9 benchmarks, and evDrift verified 19;\u0000evDrift also had a 30.5x over Drift on those benchmarks that both tools could\u0000solve.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"99 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-05","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"141941153","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}
引用次数: 0
期刊
arXiv - CS - Programming Languages
全部 Acc. Chem. Res. ACS Applied Bio Materials ACS Appl. Electron. Mater. ACS Appl. Energy Mater. ACS Appl. Mater. Interfaces ACS Appl. Nano Mater. ACS Appl. Polym. Mater. ACS BIOMATER-SCI ENG ACS Catal. ACS Cent. Sci. ACS Chem. Biol. ACS Chemical Health & Safety ACS Chem. Neurosci. ACS Comb. Sci. ACS Earth Space Chem. ACS Energy Lett. ACS Infect. Dis. ACS Macro Lett. ACS Mater. Lett. ACS Med. Chem. Lett. ACS Nano ACS Omega ACS Photonics ACS Sens. ACS Sustainable Chem. Eng. ACS Synth. Biol. Anal. Chem. BIOCHEMISTRY-US Bioconjugate Chem. BIOMACROMOLECULES Chem. Res. Toxicol. Chem. Rev. Chem. Mater. CRYST GROWTH DES ENERG FUEL Environ. Sci. Technol. Environ. Sci. Technol. Lett. Eur. J. Inorg. Chem. IND ENG CHEM RES Inorg. Chem. J. Agric. Food. Chem. J. Chem. Eng. Data J. Chem. Educ. J. Chem. Inf. Model. J. Chem. Theory Comput. J. Med. Chem. J. Nat. Prod. J PROTEOME RES J. Am. Chem. Soc. LANGMUIR MACROMOLECULES Mol. Pharmaceutics Nano Lett. Org. Lett. ORG PROCESS RES DEV ORGANOMETALLICS J. Org. Chem. J. Phys. Chem. J. Phys. Chem. A J. Phys. Chem. B J. Phys. Chem. C J. Phys. Chem. Lett. Analyst Anal. Methods Biomater. Sci. Catal. Sci. Technol. Chem. Commun. Chem. Soc. Rev. CHEM EDUC RES PRACT CRYSTENGCOMM Dalton Trans. Energy Environ. Sci. ENVIRON SCI-NANO ENVIRON SCI-PROC IMP ENVIRON SCI-WAT RES Faraday Discuss. Food Funct. Green Chem. Inorg. Chem. Front. Integr. Biol. J. Anal. At. Spectrom. J. Mater. Chem. A J. Mater. Chem. B J. Mater. Chem. C Lab Chip Mater. Chem. Front. Mater. Horiz. MEDCHEMCOMM Metallomics Mol. Biosyst. Mol. Syst. Des. Eng. Nanoscale Nanoscale Horiz. Nat. Prod. Rep. New J. Chem. Org. Biomol. Chem. Org. Chem. Front. PHOTOCH PHOTOBIO SCI PCCP Polym. Chem.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1