首页 > 最新文献

arXiv - CS - Programming Languages最新文献

英文 中文
Guard Analysis and Safe Erasure Gradual Typing: a Type System for Elixir 守护分析和安全擦除 渐进式类型:Elixir 的类型系统
Pub Date : 2024-08-26 DOI: arxiv-2408.14345
Giuseppe Castagna, Guillaume Duboc
We define several techniques to extend gradual typing with semanticsubtyping, specifically targeting dynamic languages. Focusing on the Elixirprogramming language, we provide the theoretical foundations for its typesystem. Our approach demonstrates how to achieve type soundness for gradualtyping in existing dynamic languages without modifying their compilation, whilestill maintaining high precision. This is accomplished through the staticdetection of "strong functions", which leverage runtime checks inserted by theprogrammer or performed by the virtual machine, and through a fine-grained typeanalysis of pattern-matching expressions with guards.
我们定义了几种用语义分型扩展渐进式类型的技术,特别针对动态语言。我们以 Elixir 编程语言为重点,为其类型系统提供了理论基础。我们的方法展示了如何在不修改编译的情况下,在现有动态语言中实现渐进类型的类型健全性,同时保持高精度。这是通过对 "强函数 "的静态检测来实现的,"强函数 "可以利用程序员插入的或虚拟机执行的运行时检查,还可以通过对带有保护的模式匹配表达式进行细粒度类型分析来实现。
{"title":"Guard Analysis and Safe Erasure Gradual Typing: a Type System for Elixir","authors":"Giuseppe Castagna, Guillaume Duboc","doi":"arxiv-2408.14345","DOIUrl":"https://doi.org/arxiv-2408.14345","url":null,"abstract":"We define several techniques to extend gradual typing with semantic\u0000subtyping, specifically targeting dynamic languages. Focusing on the Elixir\u0000programming language, we provide the theoretical foundations for its type\u0000system. Our approach demonstrates how to achieve type soundness for gradual\u0000typing in existing dynamic languages without modifying their compilation, while\u0000still maintaining high precision. This is accomplished through the static\u0000detection of \"strong functions\", which leverage runtime checks inserted by the\u0000programmer or performed by the virtual machine, and through a fine-grained type\u0000analysis of pattern-matching expressions with guards.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"17 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-26","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179558","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
Concurrent Data Structures Made Easy (Extended Version) 并发数据结构轻松学(扩展版)
Pub Date : 2024-08-25 DOI: arxiv-2408.13779
Callista Le, Kiran Gopinathan, Koon Wen Lee, Seth Gilbert, Ilya Sergey
Design of an efficient thread-safe concurrent data structure is a balancingact between its implementation complexity and performance. Lock-basedconcurrent data structures, which are relatively easy to derive from theirsequential counterparts and to prove thread-safe, suffer from poor throughputunder even light multi-threaded workload. At the same time, lock-freeconcurrent structures allow for high throughput, but are notoriously difficultto get right and require careful reasoning to formally establish theircorrectness. We explore a solution to this conundrum based on batch parallelism, anapproach for designing concurrent data structures via a simple insight:efficiently processing a batch of a priori known operations in parallel iseasier than optimising performance for a stream of arbitrary asynchronousrequests. Alas, batch-parallel structures have not seen wide practical adoptiondue to (i) the inconvenience of having to structure multi-threaded programs toexplicitly group operations and (ii) the lack of a systematic methodology toimplement batch-parallel structures as simply as lock-based ones. We present OBatcher-an OCaml library that streamlines the design,implementation, and usage of batch-parallel structures. It solves the firstchallenge (how to use) by suggesting a new lightweight implicit batching designthat is built on top of generic asynchronous programming mechanisms. The secondchallenge (how to implement) is addressed by identifying a family of strategiesfor converting common sequential structures into efficient batch-parallel ones.We showcase OBatcher with a diverse set of benchmarks. Our evaluation of allthe implementations on large asynchronous workloads shows that (a) theyconsistently outperform the corresponding coarse-grained lock-basedimplementations and that (b) their throughput scales reasonably with the numberof processors.
设计一种高效的线程安全并发数据结构,需要在实现复杂性和性能之间取得平衡。基于锁的并发数据结构相对容易从其顺序对应结构中推导出来,也容易证明线程安全,但在轻度多线程工作负载下吞吐量很低。与此同时,无锁并发结构允许高吞吐量,但众所周知很难正确处理,需要仔细推理才能正式确定其正确性。我们探索了一种基于批处理并行性的解决方案,这是一种设计并发数据结构的方法,其原理很简单:高效地并行处理一批先验已知的操作,比优化任意异步请求流的性能更容易。遗憾的是,批处理并行结构尚未得到广泛的实际应用,原因在于:(i) 多线程程序的结构不便明确地对操作进行分组;(ii) 缺乏系统的方法来像基于锁的结构那样简单地实现批处理并行结构。我们提出了 OBatcher--一个可以简化批处理并行结构的设计、实现和使用的 OCaml 库。它在通用异步编程机制的基础上提出了一种新的轻量级隐式批处理设计,从而解决了第一个挑战(如何使用)。第二个挑战(如何实现)是通过确定一系列将常见顺序结构转换为高效批处理并行结构的策略来解决的。我们在大型异步工作负载上对所有实现进行了评估,结果表明:(a) 它们的性能始终优于相应的基于粗粒度锁的实现;(b) 它们的吞吐量随处理器数量的增加而合理扩展。
{"title":"Concurrent Data Structures Made Easy (Extended Version)","authors":"Callista Le, Kiran Gopinathan, Koon Wen Lee, Seth Gilbert, Ilya Sergey","doi":"arxiv-2408.13779","DOIUrl":"https://doi.org/arxiv-2408.13779","url":null,"abstract":"Design of an efficient thread-safe concurrent data structure is a balancing\u0000act between its implementation complexity and performance. Lock-based\u0000concurrent data structures, which are relatively easy to derive from their\u0000sequential counterparts and to prove thread-safe, suffer from poor throughput\u0000under even light multi-threaded workload. At the same time, lock-free\u0000concurrent structures allow for high throughput, but are notoriously difficult\u0000to get right and require careful reasoning to formally establish their\u0000correctness. We explore a solution to this conundrum based on batch parallelism, an\u0000approach for designing concurrent data structures via a simple insight:\u0000efficiently processing a batch of a priori known operations in parallel is\u0000easier than optimising performance for a stream of arbitrary asynchronous\u0000requests. Alas, batch-parallel structures have not seen wide practical adoption\u0000due to (i) the inconvenience of having to structure multi-threaded programs to\u0000explicitly group operations and (ii) the lack of a systematic methodology to\u0000implement batch-parallel structures as simply as lock-based ones. We present OBatcher-an OCaml library that streamlines the design,\u0000implementation, and usage of batch-parallel structures. It solves the first\u0000challenge (how to use) by suggesting a new lightweight implicit batching design\u0000that is built on top of generic asynchronous programming mechanisms. The second\u0000challenge (how to implement) is addressed by identifying a family of strategies\u0000for converting common sequential structures into efficient batch-parallel ones.\u0000We showcase OBatcher with a diverse set of benchmarks. Our evaluation of all\u0000the implementations on large asynchronous workloads shows that (a) they\u0000consistently outperform the corresponding coarse-grained lock-based\u0000implementations and that (b) their throughput scales reasonably with the number\u0000of processors.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"58 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179569","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
DOCE: Finding the Sweet Spot for Execution-Based Code Generation DOCE:寻找基于执行的代码生成的最佳点
Pub Date : 2024-08-25 DOI: arxiv-2408.13745
Haau-Sing Li, Patrick Fernandes, Iryna Gurevych, André F. T. Martins
Recently, a diverse set of decoding and reranking procedures have been showneffective for LLM-based code generation. However, a comprehensive frameworkthat links and experimentally compares these methods is missing. We addressthis by proposing Decoding Objectives for Code Execution, a comprehensiveframework that includes candidate generation, $n$-best reranking, minimum Bayesrisk (MBR) decoding, and self-debugging as the core components. We then studythe contributions of these components through execution-based evaluationmetrics. Our findings highlight the importance of execution-based methods andthe difference gap between execution-based and execution-free methods.Furthermore, we assess the impact of filtering based on trial unit tests, asimple and effective strategy that has been often overlooked in prior works. Wealso propose self-debugging on multiple candidates, obtaining state-of-the-artperformance on reranking for code generation. We expect our framework toprovide a solid guideline for future research on code generation.
最近,有多种解码和重排程序被证明对基于 LLM 的代码生成有效。然而,目前还缺少一个将这些方法联系起来并进行实验比较的综合框架。为了解决这个问题,我们提出了 "代码执行的解码目标"(Decoding Objectives for Code Execution),这是一个综合框架,包括候选生成、$n$最优重排、最小贝叶斯风险(MBR)解码和自调试等核心组件。然后,我们通过基于执行的评估指标来研究这些组件的贡献。我们的研究结果强调了基于执行的方法的重要性,以及基于执行的方法与免执行方法之间的差距。此外,我们还评估了基于试验单元测试的过滤的影响,这种简单有效的策略在之前的研究中经常被忽视。我们还提出了对多个候选代码进行自调试的方法,在代码生成的重新排序方面取得了最先进的性能。我们希望我们的框架能为未来的代码生成研究提供坚实的指导。
{"title":"DOCE: Finding the Sweet Spot for Execution-Based Code Generation","authors":"Haau-Sing Li, Patrick Fernandes, Iryna Gurevych, André F. T. Martins","doi":"arxiv-2408.13745","DOIUrl":"https://doi.org/arxiv-2408.13745","url":null,"abstract":"Recently, a diverse set of decoding and reranking procedures have been shown\u0000effective for LLM-based code generation. However, a comprehensive framework\u0000that links and experimentally compares these methods is missing. We address\u0000this by proposing Decoding Objectives for Code Execution, a comprehensive\u0000framework that includes candidate generation, $n$-best reranking, minimum Bayes\u0000risk (MBR) decoding, and self-debugging as the core components. We then study\u0000the contributions of these components through execution-based evaluation\u0000metrics. Our findings highlight the importance of execution-based methods and\u0000the difference gap between execution-based and execution-free methods.\u0000Furthermore, we assess the impact of filtering based on trial unit tests, a\u0000simple and effective strategy that has been often overlooked in prior works. We\u0000also propose self-debugging on multiple candidates, obtaining state-of-the-art\u0000performance on reranking for code generation. We expect our framework to\u0000provide a solid guideline for future research on code generation.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"60 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142223616","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
Which Part of the Heap is Useful? Improving Heap Liveness Analysis 堆的哪一部分有用?改进堆有效性分析
Pub Date : 2024-08-23 DOI: arxiv-2408.12947
Vini Kanvar, Uday P. Khedker
With the growing sizes of data structures allocated in heap, understandingthe actual use of heap memory is critically important for minimizing cachemisses and reclaiming unused memory. A static analysis aimed at this isdifficult because the heap locations are unnamed. Using allocation sites toname them creates very few distinctions making it difficult to identifyallocated heap locations that are not used. Heap liveness analysis using accessgraphs solves this problem by (a) using a storeless model of heap memory bynaming the locations with access paths, and (b) representing the unbounded setsof access paths (which are regular languages) as finite automata. We improve the scalability and efficiency of heap liveness analysis, andreduce the amount of computed heap liveness information by using deterministicautomata and by minimizing the inclusion of aliased access paths in thelanguage. Practically, our field-, flow-, context-sensitive liveness analysison SPEC CPU2006 benchmarks scales to 36 kLoC (existing analysis scales to 10.5kLoC) and improves efficiency even up to 99%. For some of the benchmarks, ourtechnique shows multifold reduction in the computed liveness information,ranging from 2 to 100 times (in terms of the number of live access paths),without compromising on soundness.
随着堆中分配的数据结构越来越大,了解堆内存的实际使用情况对于最大限度地减少冲突和回收未使用的内存至关重要。由于堆位置是未命名的,因此很难进行这方面的静态分析。使用分配位置来命名它们几乎没有什么区别,因此很难识别未被使用的已分配堆位置。使用访问图的堆有效性分析通过以下方法解决了这一问题:(a) 使用堆内存的无存储模型,用访问路径命名位置;(b) 将无界访问路径集(正则表达式语言)表示为有限自动机。我们提高了堆有效性分析的可扩展性和效率,并通过使用确定性自动机和尽量减少在语言中包含别名访问路径,减少了堆有效性信息的计算量。实际上,我们对 SPEC CPU2006 基准进行的字段、流、上下文敏感的有效性分析可扩展到 36 kLoC(现有分析可扩展到 10.5kLoC),效率甚至提高了 99%。在某些基准测试中,我们的技术显示计算出的有效性信息减少了数倍,从 2 到 100 倍不等(以实时访问路径的数量计算),同时不影响健全性。
{"title":"Which Part of the Heap is Useful? Improving Heap Liveness Analysis","authors":"Vini Kanvar, Uday P. Khedker","doi":"arxiv-2408.12947","DOIUrl":"https://doi.org/arxiv-2408.12947","url":null,"abstract":"With the growing sizes of data structures allocated in heap, understanding\u0000the actual use of heap memory is critically important for minimizing cache\u0000misses and reclaiming unused memory. A static analysis aimed at this is\u0000difficult because the heap locations are unnamed. Using allocation sites to\u0000name them creates very few distinctions making it difficult to identify\u0000allocated heap locations that are not used. Heap liveness analysis using access\u0000graphs solves this problem by (a) using a storeless model of heap memory by\u0000naming the locations with access paths, and (b) representing the unbounded sets\u0000of access paths (which are regular languages) as finite automata. We improve the scalability and efficiency of heap liveness analysis, and\u0000reduce the amount of computed heap liveness information by using deterministic\u0000automata and by minimizing the inclusion of aliased access paths in the\u0000language. Practically, our field-, flow-, context-sensitive liveness analysis\u0000on SPEC CPU2006 benchmarks scales to 36 kLoC (existing analysis scales to 10.5\u0000kLoC) and improves efficiency even up to 99%. For some of the benchmarks, our\u0000technique shows multifold reduction in the computed liveness information,\u0000ranging from 2 to 100 times (in terms of the number of live access paths),\u0000without compromising on soundness.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"146 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179570","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
LOUD: Synthesizing Strongest and Weakest Specifications 大声:合成最强和最弱的规格
Pub Date : 2024-08-22 DOI: arxiv-2408.12539
Kanghee Park, Xuanyu Peng, Loris D'Antoni
Specifications allow us to formally state and understand what programs areintended to do. To help one extract useful properties from code, Park et al.recently proposed a framework that given (i) a quantifier-free query posedabout a set of function definitions, and (ii) a domain-specific language L inwhich each extracted property is to be expressed (we call properties in thelanguage L-properties), synthesizes a set of L-properties such that each of theproperty is a strongest L-consequence for the query: the property is anover-approximation of query and there is no other L-property thatover-approximates query and is strictly more precise than each property. The framework by Park et al. has two key limitations. First, it only supportsquantifier-free query formulas and thus cannot synthesize specifications forqueries involving nondeterminism, concurrency, etc. Second, it can only computeL-consequences, i.e., over-approximations of the program behavior. This paper addresses these two limitations and presents a framework, Loud,for synthesizing strongest L-consequences and weakest L-implicants (i.e.,under-approximations of the query) for function definitions that can involveexistential quantifiers. We implemented a solver, Aspire, for problems expressed in Loud which can beused to describe and identify sources of bugs in both deterministic andnondeterministic programs, extract properties from concurrent programs, andsynthesize winning strategies in two-player games.
规范允许我们正式陈述和理解程序的意图。为了帮助人们从代码中提取有用的属性,Park 等人最近提出了一个框架。最近提出了一个框架,该框架给定(i)一个关于一组函数定义的无量纲查询,以及(ii)一种特定领域语言 L,在这种语言中,每个提取的属性都要用它来表达(我们称这种语言中的属性为 L-属性),然后合成一组 L-属性,使得每个属性都是查询的最强 L 后果:该属性是查询的过度逼近,并且没有其他 L-属性能够过度逼近查询,而且严格来说比每个属性都更精确。Park 等人的框架有两个主要局限。首先,它只支持无量子化查询公式,因此不能合成涉及非确定性、并发性等的查询规范。其次,它只能计算 L 后果,即程序行为的过度近似。本文针对这两个局限性,提出了一个框架 Loud,用于为可能涉及存在量词的函数定义合成最强 L 后果和最弱 L 因子(即查询的欠近似)。我们为用 Loud 表达的问题实现了一个求解器 Aspire,它可用于描述和识别确定性和非确定性程序中的错误源,从并发程序中提取属性,以及合成双人游戏中的获胜策略。
{"title":"LOUD: Synthesizing Strongest and Weakest Specifications","authors":"Kanghee Park, Xuanyu Peng, Loris D'Antoni","doi":"arxiv-2408.12539","DOIUrl":"https://doi.org/arxiv-2408.12539","url":null,"abstract":"Specifications allow us to formally state and understand what programs are\u0000intended to do. To help one extract useful properties from code, Park et al.\u0000recently proposed a framework that given (i) a quantifier-free query posed\u0000about a set of function definitions, and (ii) a domain-specific language L in\u0000which each extracted property is to be expressed (we call properties in the\u0000language L-properties), synthesizes a set of L-properties such that each of the\u0000property is a strongest L-consequence for the query: the property is an\u0000over-approximation of query and there is no other L-property that\u0000over-approximates query and is strictly more precise than each property. The framework by Park et al. has two key limitations. First, it only supports\u0000quantifier-free query formulas and thus cannot synthesize specifications for\u0000queries involving nondeterminism, concurrency, etc. Second, it can only compute\u0000L-consequences, i.e., over-approximations of the program behavior. This paper addresses these two limitations and presents a framework, Loud,\u0000for synthesizing strongest L-consequences and weakest L-implicants (i.e.,\u0000under-approximations of the query) for function definitions that can involve\u0000existential quantifiers. We implemented a solver, Aspire, for problems expressed in Loud which can be\u0000used to describe and identify sources of bugs in both deterministic and\u0000nondeterministic programs, extract properties from concurrent programs, and\u0000synthesize winning strategies in two-player games.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"113 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142223617","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
LLM4VV: Exploring LLM-as-a-Judge for Validation and Verification Testsuites LLM4VV:探索用于验证和核查测试套件的 LLM 即法官
Pub Date : 2024-08-21 DOI: arxiv-2408.11729
Zachariah Sollenberger, Jay Patel, Christian Munley, Aaron Jarmusch, Sunita Chandrasekaran
Large Language Models (LLM) are evolving and have significantlyrevolutionized the landscape of software development. If used well, they cansignificantly accelerate the software development cycle. At the same time, thecommunity is very cautious of the models being trained on biased or sensitivedata, which can lead to biased outputs along with the inadvertent release ofconfidential information. Additionally, the carbon footprints and theun-explainability of these black box models continue to raise questions aboutthe usability of LLMs. With the abundance of opportunities LLMs have to offer, this paper exploresthe idea of judging tests used to evaluate compiler implementations ofdirective-based programming models as well as probe into the black box of LLMs.Based on our results, utilizing an agent-based prompting approach and settingup a validation pipeline structure drastically increased the quality ofDeepSeek Coder, the LLM chosen for the evaluation purposes.
大型语言模型(LLM)不断发展,极大地改变了软件开发的格局。如果使用得当,它们可以显著加快软件开发周期。与此同时,业界也非常担心模型在有偏见或敏感数据的基础上进行训练,这可能会导致有偏见的输出以及无意中泄露机密信息。此外,这些黑盒子模型的碳足迹和无法解释性继续引发人们对 LLM 可用性的质疑。基于我们的研究结果,利用基于代理的提示方法和建立验证流水线结构大大提高了用于评估的 LLM--DeepSeek Coder 的质量。
{"title":"LLM4VV: Exploring LLM-as-a-Judge for Validation and Verification Testsuites","authors":"Zachariah Sollenberger, Jay Patel, Christian Munley, Aaron Jarmusch, Sunita Chandrasekaran","doi":"arxiv-2408.11729","DOIUrl":"https://doi.org/arxiv-2408.11729","url":null,"abstract":"Large Language Models (LLM) are evolving and have significantly\u0000revolutionized the landscape of software development. If used well, they can\u0000significantly accelerate the software development cycle. At the same time, the\u0000community is very cautious of the models being trained on biased or sensitive\u0000data, which can lead to biased outputs along with the inadvertent release of\u0000confidential information. Additionally, the carbon footprints and the\u0000un-explainability of these black box models continue to raise questions about\u0000the usability of LLMs. With the abundance of opportunities LLMs have to offer, this paper explores\u0000the idea of judging tests used to evaluate compiler implementations of\u0000directive-based programming models as well as probe into the black box of LLMs.\u0000Based on our results, utilizing an agent-based prompting approach and setting\u0000up a validation pipeline structure drastically increased the quality of\u0000DeepSeek Coder, the LLM chosen for the evaluation purposes.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"10 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179571","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
Inference Plans for Hybrid Particle Filtering 混合粒子滤波的推理计划
Pub Date : 2024-08-21 DOI: arxiv-2408.11283
Ellie Y. Cheng, Eric Atkinson, Guillaume Baudart, Louis Mandel, Michael Carbin
Advanced probabilistic programming languages (PPLs) use hybrid inferencesystems to combine symbolic exact inference and Monte Carlo methods to improveinference performance. These systems use heuristics to partition randomvariables within the program into variables that are encoded symbolically andvariables that are encoded with sampled values, and the heuristics are notnecessarily aligned with the performance evaluation metrics used by thedeveloper. In this work, we present inference plans, a programming interfacethat enables developers to control the partitioning of random variables duringhybrid particle filtering. We further present Siren, a new PPL that enablesdevelopers to use annotations to specify inference plans the inference systemmust implement. To assist developers with statically reasoning about whether aninference plan can be implemented, we present an abstract-interpretation-basedstatic analysis for Siren for determining inference plan satisfiability. Weprove the analysis is sound with respect to Siren's semantics. Our evaluationapplies inference plans to three different hybrid particle filtering algorithmson a suite of benchmarks and shows that the control provided by inference plansenables speed ups of 1.76x on average and up to 206x to reach target accuracy,compared to the inference plans implemented by default heuristics; the resultsalso show that inference plans improve accuracy by 1.83x on average and up to595x with less or equal runtime, compared to the default inference plans. Wefurther show that the static analysis is precise in practice, identifying allsatisfiable inference plans in 27 out of the 33 benchmark-algorithmcombinations.
高级概率编程语言(PPL)使用混合推理系统,将符号精确推理与蒙特卡罗方法相结合,以提高推理性能。这些系统使用启发式方法将程序中的随机变量分为符号编码变量和采样值编码变量,而启发式方法并不一定与开发人员使用的性能评估指标相一致。在这项工作中,我们提出了推理计划,这是一种编程接口,能让开发人员在混合粒子滤波过程中控制随机变量的分割。我们进一步介绍了 Siren,它是一种新的 PPL,能让开发者使用注释来指定推理系统必须实现的推理计划。为了帮助开发人员静态推理推理计划是否可以实现,我们为 Siren 提出了一种基于抽象解释的静态分析方法,用于确定推理计划的可满足性。我们证明该分析在 Siren 的语义方面是合理的。我们的评估在一套基准测试中将推理计划应用于三种不同的混合粒子过滤算法,结果表明,与默认启发式实现的推理计划相比,推理计划提供的控制使达到目标精度的速度平均提高了 1.76 倍,最高提高了 206 倍;结果还表明,与默认推理计划相比,推理计划的精度平均提高了 1.83 倍,最高提高了 595 倍,而运行时间更短或相等。我们进一步证明了静态分析在实践中的精确性,在 33 个基准算法组合中,有 27 个能识别出所有可满足的推理计划。
{"title":"Inference Plans for Hybrid Particle Filtering","authors":"Ellie Y. Cheng, Eric Atkinson, Guillaume Baudart, Louis Mandel, Michael Carbin","doi":"arxiv-2408.11283","DOIUrl":"https://doi.org/arxiv-2408.11283","url":null,"abstract":"Advanced probabilistic programming languages (PPLs) use hybrid inference\u0000systems to combine symbolic exact inference and Monte Carlo methods to improve\u0000inference performance. These systems use heuristics to partition random\u0000variables within the program into variables that are encoded symbolically and\u0000variables that are encoded with sampled values, and the heuristics are not\u0000necessarily aligned with the performance evaluation metrics used by the\u0000developer. In this work, we present inference plans, a programming interface\u0000that enables developers to control the partitioning of random variables during\u0000hybrid particle filtering. We further present Siren, a new PPL that enables\u0000developers to use annotations to specify inference plans the inference system\u0000must implement. To assist developers with statically reasoning about whether an\u0000inference plan can be implemented, we present an abstract-interpretation-based\u0000static analysis for Siren for determining inference plan satisfiability. We\u0000prove the analysis is sound with respect to Siren's semantics. Our evaluation\u0000applies inference plans to three different hybrid particle filtering algorithms\u0000on a suite of benchmarks and shows that the control provided by inference plans\u0000enables speed ups of 1.76x on average and up to 206x to reach target accuracy,\u0000compared to the inference plans implemented by default heuristics; the results\u0000also show that inference plans improve accuracy by 1.83x on average and up to\u0000595x with less or equal runtime, compared to the default inference plans. We\u0000further show that the static analysis is precise in practice, identifying all\u0000satisfiable inference plans in 27 out of the 33 benchmark-algorithm\u0000combinations.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"54 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179572","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
A type system for data flow and alias analysis in ReScript 用于 ReScript 数据流和别名分析的类型系统
Pub Date : 2024-08-21 DOI: arxiv-2408.11954
Nicky Ask Lund, Hans Hüttel
ReScript introduces a strongly typed language that targets JavaScript, as analternative to gradually typed languages, such as TypeScript. In this paper, wepresent a type system for data-flow analysis for a subset of the ReScriptlanguage, more specific for a lambda-calculus with mutability and patternmatching. The type system is a local analysis that collects information aboutwhat variables are used and alias information.
ReScript 引入了一种针对 JavaScript 的强类型语言,作为 TypeScript 等渐进类型语言的替代。在本文中,我们为 ReScript 语言的一个子集,更具体地说,为具有可变性和模式匹配功能的 lambda 计算,提出了一种用于数据流分析的类型系统。该类型系统是一种本地分析,它收集了关于使用了哪些变量的信息以及别名信息。
{"title":"A type system for data flow and alias analysis in ReScript","authors":"Nicky Ask Lund, Hans Hüttel","doi":"arxiv-2408.11954","DOIUrl":"https://doi.org/arxiv-2408.11954","url":null,"abstract":"ReScript introduces a strongly typed language that targets JavaScript, as an\u0000alternative to gradually typed languages, such as TypeScript. In this paper, we\u0000present a type system for data-flow analysis for a subset of the ReScript\u0000language, more specific for a lambda-calculus with mutability and pattern\u0000matching. The type system is a local analysis that collects information about\u0000what variables are used and alias information.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"9 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142223622","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
CI/CD Efforts for Validation, Verification and Benchmarking OpenMP Implementations 验证、核查和基准测试 OpenMP 实现的 CI/CD 工作
Pub Date : 2024-08-21 DOI: arxiv-2408.11777
Aaron Jarmusch, Felipe Cabarcas, Swaroop Pophale, Andrew Kallai, Johannes Doerfert, Luke Peyralans, Seyong Lee, Joel Denny, Sunita Chandrasekaran
Software developers must adapt to keep up with the changing capabilities ofplatforms so that they can utilize the power of High- Performance Computers(HPC), including exascale systems. OpenMP, a directive-based parallelprogramming model, allows developers to include directives to existing C, C++,or Fortran code to allow node level parallelism without compromisingperformance. This paper describes our CI/CD efforts to provide easy evaluationof the support of OpenMP across different compilers using existing testsuitesand benchmark suites on HPC platforms. Our main contributions include (1) theset of a Continuous Integration (CI) and Continuous Development (CD) workflowthat captures bugs and provides faster feedback to compiler developers, (2) anevaluation of OpenMP (offloading) implementations supported by AMD, HPE, GNU,LLVM, and Intel, and (3) evaluation of the quality of compilers acrossdifferent heterogeneous HPC platforms. With the comprehensive testing throughthe CI/CD workflow, we aim to provide a comprehensive understanding of thecurrent state of OpenMP (offloading) support in different compilers andheterogeneous platforms consisting of CPUs and GPUs from NVIDIA, AMD, andIntel.
软件开发人员必须适应不断变化的平台功能,以便利用高性能计算机(HPC)(包括超大规模系统)的强大功能。OpenMP 是一种基于指令的并行编程模型,它允许开发人员在现有的 C、C++ 或 Fortran 代码中加入指令,从而在不影响性能的情况下实现节点级并行。本文介绍了我们在 CI/CD 方面所做的努力,即利用高性能计算平台上现有的测试套件和基准套件,轻松评估不同编译器对 OpenMP 的支持情况。我们的主要贡献包括:(1) 建立了持续集成(CI)和持续开发(CD)工作流程,该流程可捕获错误并为编译器开发人员提供更快的反馈;(2) 评估了 AMD、HPE、GNU、LLVM 和 Intel 所支持的 OpenMP(卸载)实现;(3) 评估了不同异构 HPC 平台上编译器的质量。通过 CI/CD 工作流程的全面测试,我们旨在全面了解不同编译器和由英伟达、AMD 和英特尔 CPU 和 GPU 组成的异构平台对 OpenMP(卸载)支持的现状。
{"title":"CI/CD Efforts for Validation, Verification and Benchmarking OpenMP Implementations","authors":"Aaron Jarmusch, Felipe Cabarcas, Swaroop Pophale, Andrew Kallai, Johannes Doerfert, Luke Peyralans, Seyong Lee, Joel Denny, Sunita Chandrasekaran","doi":"arxiv-2408.11777","DOIUrl":"https://doi.org/arxiv-2408.11777","url":null,"abstract":"Software developers must adapt to keep up with the changing capabilities of\u0000platforms so that they can utilize the power of High- Performance Computers\u0000(HPC), including exascale systems. OpenMP, a directive-based parallel\u0000programming model, allows developers to include directives to existing C, C++,\u0000or Fortran code to allow node level parallelism without compromising\u0000performance. This paper describes our CI/CD efforts to provide easy evaluation\u0000of the support of OpenMP across different compilers using existing testsuites\u0000and benchmark suites on HPC platforms. Our main contributions include (1) the\u0000set of a Continuous Integration (CI) and Continuous Development (CD) workflow\u0000that captures bugs and provides faster feedback to compiler developers, (2) an\u0000evaluation of OpenMP (offloading) implementations supported by AMD, HPE, GNU,\u0000LLVM, and Intel, and (3) evaluation of the quality of compilers across\u0000different heterogeneous HPC platforms. With the comprehensive testing through\u0000the CI/CD workflow, we aim to provide a comprehensive understanding of the\u0000current state of OpenMP (offloading) support in different compilers and\u0000heterogeneous platforms consisting of CPUs and GPUs from NVIDIA, AMD, and\u0000Intel.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"9 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179574","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
Cage: Hardware-Accelerated Safe WebAssembly Cage:硬件加速的安全 WebAssembly
Pub Date : 2024-08-21 DOI: arxiv-2408.11456
Martin Fink, Dimitrios Stavrakakis, Dennis Sprokholt, Soham Chakraborty, Jan-Erik Ekberg, Pramod Bhatotia
WebAssembly (WASM) is an immensely versatile and increasingly popularcompilation target. It executes applications written in several languages(e.g., C/C++) with near-native performance in various domains (e.g., mobile,edge, cloud). Despite WASM's sandboxing feature, which isolates applicationsfrom other instances and the host platform, WASM does not inherently provideany memory safety guarantees for applications written in low-level, unsafelanguages. To this end, we propose Cage, a hardware-accelerated toolchain for WASM thatsupports unmodified applications compiled to WASM and utilizes diverse Armhardware features aiming to enrich the memory safety properties of WASM.Precisely, Cage leverages Arm's Memory Tagging Extension (MTE) to (i)~providespatial and temporal memory safety for heap and stack allocations and(ii)~improve the performance of WASM's sandboxing mechanism. Cage furtheremploys Arm's Pointer Authentication (PAC) to prevent leaked pointers frombeing reused by other WASM instances, thus enhancing WASM's securityproperties. We implement our system based on 64-bit WASM. We provide a WASM compiler andruntime with support for Arm's MTE and PAC. On top of that, Cage's LLVM-basedcompiler toolchain transforms unmodified applications to provide spatial andtemporal memory safety for stack and heap allocations and prevent functionpointer reuse. Our evaluation on real hardware shows that Cage incurs minimalruntime ($<5.8,%$) and memory ($<3.7,%$) overheads and can improve theperformance of WASM's sandboxing mechanism, achieving a speedup of over$5.1,%$, while offering efficient memory safety guarantees.
WebAssembly (WASM) 是一种用途广泛、日益流行的编译目标。它可以在各种领域(如移动、边缘、云)以接近原生的性能执行以多种语言(如 C/C++)编写的应用程序。尽管 WASM 具有沙箱功能,可将应用程序与其他实例和主机平台隔离,但 WASM 本身并不能为使用低级、不安全语言编写的应用程序提供任何内存安全保证。准确地说,Cage 利用 Arm 的内存标记扩展 (MTE) (i)~ 为堆和栈分配提供空间和时间内存安全,(ii)~ 提高 WASM 沙箱机制的性能。Cage 还采用了 Arm 的指针验证(PAC)技术,防止泄漏的指针被其他 WASM 实例重用,从而增强了 WASM 的安全性能。我们的系统基于 64 位 WASM 实现。我们提供了支持 Arm 的 MTE 和 PAC 的 WASM 编译器和运行时。在此基础上,Cage 基于 LLVM 的编译器工具链对未修改的应用程序进行转换,为堆栈和堆分配提供空间和时间内存安全性,并防止函数指针重复使用。我们在真实硬件上进行的评估表明,Cage产生的运行时间(小于5.8美元)和内存(小于3.7美元)开销极小,而且可以提高WASM沙箱机制的性能,实现了超过5.1美元的提速,同时提供了高效的内存安全保证。
{"title":"Cage: Hardware-Accelerated Safe WebAssembly","authors":"Martin Fink, Dimitrios Stavrakakis, Dennis Sprokholt, Soham Chakraborty, Jan-Erik Ekberg, Pramod Bhatotia","doi":"arxiv-2408.11456","DOIUrl":"https://doi.org/arxiv-2408.11456","url":null,"abstract":"WebAssembly (WASM) is an immensely versatile and increasingly popular\u0000compilation target. It executes applications written in several languages\u0000(e.g., C/C++) with near-native performance in various domains (e.g., mobile,\u0000edge, cloud). Despite WASM's sandboxing feature, which isolates applications\u0000from other instances and the host platform, WASM does not inherently provide\u0000any memory safety guarantees for applications written in low-level, unsafe\u0000languages. To this end, we propose Cage, a hardware-accelerated toolchain for WASM that\u0000supports unmodified applications compiled to WASM and utilizes diverse Arm\u0000hardware features aiming to enrich the memory safety properties of WASM.\u0000Precisely, Cage leverages Arm's Memory Tagging Extension (MTE) to (i)~provide\u0000spatial and temporal memory safety for heap and stack allocations and\u0000(ii)~improve the performance of WASM's sandboxing mechanism. Cage further\u0000employs Arm's Pointer Authentication (PAC) to prevent leaked pointers from\u0000being reused by other WASM instances, thus enhancing WASM's security\u0000properties. We implement our system based on 64-bit WASM. We provide a WASM compiler and\u0000runtime with support for Arm's MTE and PAC. On top of that, Cage's LLVM-based\u0000compiler toolchain transforms unmodified applications to provide spatial and\u0000temporal memory safety for stack and heap allocations and prevent function\u0000pointer reuse. Our evaluation on real hardware shows that Cage incurs minimal\u0000runtime ($<5.8,%$) and memory ($<3.7,%$) overheads and can improve the\u0000performance of WASM's sandboxing mechanism, achieving a speedup of over\u0000$5.1,%$, while offering efficient memory safety guarantees.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"9 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142227633","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