首页 > 最新文献

arXiv - CS - Programming Languages最新文献

英文 中文
Proving Cutoff Bounds for Safety Properties in First-Order Logic 证明一阶逻辑中安全属性的截止界限
Pub Date : 2024-08-20 DOI: arxiv-2408.10685
Raz Lotan, Eden Frenkel, Sharon Shoham
First-order logic has been established as an important tool for modeling andverifying intricate systems such as distributed protocols and concurrentsystems. These systems are parametric in the number of nodes in the network orthe number of threads, which is finite in any system instance, but unbounded.One disadvantage of first-order logic is that it cannot distinguish betweenfinite and infinite structures, leading to spurious counterexamples. Tomitigate this, we offer a verification approach that captures only finitesystem instances. Our approach is an adaptation of the cutoff method to systemsmodeled in first-order logic. The idea is to show that any safety violation ina system instance of size larger than some bound can be simulated by a safetyviolation in a system of a smaller size. The simulation provides an inductiveargument for correctness in finite instances, reducing the problem to showingsafety of instances with bounded size. To this end, we develop a framework to(i) encode such simulation relations in first-order logic and to (ii) validatethe simulation relation by a set of verification conditions given to an SMTsolver. We apply our approach to verify safety of a set of examples, some ofwhich cannot be proven by a first-order inductive invariant.
一阶逻辑已成为对分布式协议和并发系统等复杂系统进行建模和验证的重要工具。这些系统的参数是网络中的节点数或线程数,任何系统实例中的节点数或线程数都是有限的,而线程数则是无界的。一阶逻辑的一个缺点是它无法区分有限结构和无限结构,从而导致虚假反例。为了解决这个问题,我们提出了一种只捕捉有限系统实例的验证方法。我们的方法是对一阶逻辑建模系统的截断法进行改编。我们的想法是证明,任何规模大于某个界限的系统实例的安全违规行为,都可以通过规模较小的系统中的安全违规行为来模拟。这种模拟为有限实例的正确性提供了归纳论证,从而将问题简化为证明大小有界的实例的安全性。为此,我们开发了一个框架:(i) 用一阶逻辑编码这种模拟关系;(ii) 通过给定给 SMT 求解器的一组验证条件来验证模拟关系。我们应用我们的方法来验证一组示例的安全性,其中有些示例无法用一阶归纳不变式来证明。
{"title":"Proving Cutoff Bounds for Safety Properties in First-Order Logic","authors":"Raz Lotan, Eden Frenkel, Sharon Shoham","doi":"arxiv-2408.10685","DOIUrl":"https://doi.org/arxiv-2408.10685","url":null,"abstract":"First-order logic has been established as an important tool for modeling and\u0000verifying intricate systems such as distributed protocols and concurrent\u0000systems. These systems are parametric in the number of nodes in the network or\u0000the number of threads, which is finite in any system instance, but unbounded.\u0000One disadvantage of first-order logic is that it cannot distinguish between\u0000finite and infinite structures, leading to spurious counterexamples. To\u0000mitigate this, we offer a verification approach that captures only finite\u0000system instances. Our approach is an adaptation of the cutoff method to systems\u0000modeled in first-order logic. The idea is to show that any safety violation in\u0000a system instance of size larger than some bound can be simulated by a safety\u0000violation in a system of a smaller size. The simulation provides an inductive\u0000argument for correctness in finite instances, reducing the problem to showing\u0000safety of instances with bounded size. To this end, we develop a framework to\u0000(i) encode such simulation relations in first-order logic and to (ii) validate\u0000the simulation relation by a set of verification conditions given to an SMT\u0000solver. We apply our approach to verify safety of a set of examples, some of\u0000which cannot be proven by a first-order inductive invariant.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"184 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142223618","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
The Stable Model Semantics for Higher-Order Logic Programming 高阶逻辑编程的稳定模型语义学
Pub Date : 2024-08-20 DOI: arxiv-2408.10563
Bart Bogaerts, Angelos Charalambidis, Giannos Chatziagapis, Babis Kostopoulos, Samuele Pollaci, Panos Rondogiannis
We propose a stable model semantics for higher-order logic programs. Oursemantics is developed using Approximation Fixpoint Theory (AFT), a powerfulformalism that has successfully been used to give meaning to diversenon-monotonic formalisms. The proposed semantics generalizes the classicaltwo-valued stable model semantics of (Gelfond and Lifschitz 1988) as-well-asthe three-valued one of (Przymusinski 1990), retaining their desirableproperties. Due to the use of AFT, we also get for free alternative semanticsfor higher-order logic programs, namely supported model, Kripke-Kleene, andwell-founded. Additionally, we define a broad class of stratified higher-orderlogic programs and demonstrate that they have a unique two-valued higher-orderstable model which coincides with the well-founded semantics of such programs.We provide a number of examples in different application domains, whichdemonstrate that higher-order logic programming under the stable modelsemantics is a powerful and versatile formalism, which can potentially form thebasis of novel ASP systems.
我们提出了一种适用于高阶逻辑程序的稳定模型语义。我们的语义是利用近似定点理论(AFT)发展起来的,AFT 是一种强大的形式主义,已被成功地用于赋予各种非单调形式主义以意义。所提出的语义概括了(Gelfond 和 Lifschitz,1988 年)的经典两值稳定模型语义以及(Przymusinski,1990 年)的三值稳定模型语义,保留了它们的理想特性。由于使用了 AFT,我们还免费获得了高阶逻辑程序的替代语义,即支持模型、克里普克-克莱因和有根据。此外,我们还定义了一大类分层高阶逻辑程序,并证明它们有一个独特的两值高阶稳定模型,该模型与此类程序的有根据语义相吻合。我们提供了不同应用领域中的大量实例,证明稳定模型语义下的高阶逻辑编程是一种强大而多用途的形式主义,有可能成为新型 ASP 系统的基础。
{"title":"The Stable Model Semantics for Higher-Order Logic Programming","authors":"Bart Bogaerts, Angelos Charalambidis, Giannos Chatziagapis, Babis Kostopoulos, Samuele Pollaci, Panos Rondogiannis","doi":"arxiv-2408.10563","DOIUrl":"https://doi.org/arxiv-2408.10563","url":null,"abstract":"We propose a stable model semantics for higher-order logic programs. Our\u0000semantics is developed using Approximation Fixpoint Theory (AFT), a powerful\u0000formalism that has successfully been used to give meaning to diverse\u0000non-monotonic formalisms. The proposed semantics generalizes the classical\u0000two-valued stable model semantics of (Gelfond and Lifschitz 1988) as-well-as\u0000the three-valued one of (Przymusinski 1990), retaining their desirable\u0000properties. Due to the use of AFT, we also get for free alternative semantics\u0000for higher-order logic programs, namely supported model, Kripke-Kleene, and\u0000well-founded. Additionally, we define a broad class of stratified higher-order\u0000logic programs and demonstrate that they have a unique two-valued higher-order\u0000stable model which coincides with the well-founded semantics of such programs.\u0000We provide a number of examples in different application domains, which\u0000demonstrate that higher-order logic programming under the stable model\u0000semantics is a powerful and versatile formalism, which can potentially form the\u0000basis of novel ASP systems.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"8 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142223619","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
Extending the Quantitative Pattern-Matching Paradigm 扩展定量模式匹配范式
Pub Date : 2024-08-20 DOI: arxiv-2408.11007
Sandra Alves, Delia Kesner, Miguel Ramos
We show how (well-established) type systems based on non-idempotentintersection types can be extended to characterize termination properties offunctional programming languages with pattern matching features. To model suchprogramming languages, we use a (weak and closed) $lambda$-calculusintegrating a pattern matching mechanism on algebraic data types (ADTs).Remarkably, we also show that this language not only encodes Plotkin's CBV andCBN $lambda$-calculus as well as other subsuming frameworks, such as thebang-calculus, but can also be used to interpret the semantics of effectfullanguages with exceptions. After a thorough study of the untyped language, weintroduce a type system based on intersection types, and we show through purelylogical methods that the set of terminating terms of the language correspondsexactly to that of well-typed terms. Moreover, by considering non-idempotentintersection types, this characterization turns out to be quantitative, i.e.the size of the type derivation of a term t gives an upper bound for the numberof evaluation steps from t to its normal form.
我们展示了如何将基于非幂交集类型的(成熟的)类型系统扩展到表征具有模式匹配特征的函数式编程语言的终止属性。值得注意的是,我们还展示了这种语言不仅编码了普洛特金的CBV和CBN $lambda$-calculus 以及其他子包含框架,比如砰算,而且还可以用来解释具有异常的效果语言的语义。在对无类型语言进行深入研究之后,我们引入了基于交集类型的类型系统,并通过纯逻辑方法证明了该语言的终止项集与类型良好的终止项集完全对应。此外,通过考虑非幂等交集类型,我们发现这种表征是定量的,即术语 t 的类型推导的大小给出了从 t 到其正常形式的求值步骤数的上限。
{"title":"Extending the Quantitative Pattern-Matching Paradigm","authors":"Sandra Alves, Delia Kesner, Miguel Ramos","doi":"arxiv-2408.11007","DOIUrl":"https://doi.org/arxiv-2408.11007","url":null,"abstract":"We show how (well-established) type systems based on non-idempotent\u0000intersection types can be extended to characterize termination properties of\u0000functional programming languages with pattern matching features. To model such\u0000programming languages, we use a (weak and closed) $lambda$-calculus\u0000integrating a pattern matching mechanism on algebraic data types (ADTs).\u0000Remarkably, we also show that this language not only encodes Plotkin's CBV and\u0000CBN $lambda$-calculus as well as other subsuming frameworks, such as the\u0000bang-calculus, but can also be used to interpret the semantics of effectful\u0000languages with exceptions. After a thorough study of the untyped language, we\u0000introduce a type system based on intersection types, and we show through purely\u0000logical methods that the set of terminating terms of the language corresponds\u0000exactly to that of well-typed terms. Moreover, by considering non-idempotent\u0000intersection types, this characterization turns out to be quantitative, i.e.\u0000the size of the type derivation of a term t gives an upper bound for the number\u0000of evaluation steps from t to its normal form.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"20 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179573","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
ProgramAlly: Creating Custom Visual Access Programs via Multi-Modal End-User Programming ProgramAlly:通过多模式终端用户编程创建自定义 Visual Access 程序
Pub Date : 2024-08-20 DOI: arxiv-2408.10499
Jaylin Herskovitz, Andi Xu, Rahaf Alharbi, Anhong Guo
Existing visual assistive technologies are built for simple and common usecases, and have few avenues for blind people to customize theirfunctionalities. Drawing from prior work on DIY assistive technology, thispaper investigates end-user programming as a means for users to create andcustomize visual access programs to meet their unique needs. We introduceProgramAlly, a system for creating custom filters for visual information, e.g.,'find NUMBER on BUS', leveraging three end-user programming approaches: blockprogramming, natural language, and programming by example. To implementProgramAlly, we designed a representation of visual filtering tasks based onscenarios encountered by blind people, and integrated a set of on-device andcloud models for generating and running these programs. In user studies with 12blind adults, we found that participants preferred different programmingmodalities depending on the task, and envisioned using visual access programsto address unique accessibility challenges that are otherwise difficult withexisting applications. Through ProgramAlly, we present an exploration of howblind end-users can create visual access programs to customize and controltheir experiences.
现有的视觉辅助技术都是针对简单和常见的使用情况而设计的,盲人很少有机会对其功能进行定制。本文借鉴了先前有关 DIY 辅助技术的研究成果,研究了终端用户编程,以此作为用户创建和定制视觉访问程序以满足其独特需求的一种手段。我们介绍了ProgramAlly,这是一个为视觉信息创建自定义过滤器的系统,例如 "查找BUS上的NUMBER",它利用了三种终端用户编程方法:块编程、自然语言和示例编程。为了实现ProgramAlly,我们根据盲人遇到的情景设计了视觉过滤任务的表示方法,并集成了一套用于生成和运行这些程序的设备和云模型。在对 12 名成年盲人进行的用户研究中,我们发现参与者根据任务的不同偏好不同的编程模式,并设想使用视觉访问程序来解决现有应用程序难以解决的独特的无障碍挑战。通过 ProgramAlly,我们探索了盲人终端用户如何创建可视化访问程序来定制和控制他们的体验。
{"title":"ProgramAlly: Creating Custom Visual Access Programs via Multi-Modal End-User Programming","authors":"Jaylin Herskovitz, Andi Xu, Rahaf Alharbi, Anhong Guo","doi":"arxiv-2408.10499","DOIUrl":"https://doi.org/arxiv-2408.10499","url":null,"abstract":"Existing visual assistive technologies are built for simple and common use\u0000cases, and have few avenues for blind people to customize their\u0000functionalities. Drawing from prior work on DIY assistive technology, this\u0000paper investigates end-user programming as a means for users to create and\u0000customize visual access programs to meet their unique needs. We introduce\u0000ProgramAlly, a system for creating custom filters for visual information, e.g.,\u0000'find NUMBER on BUS', leveraging three end-user programming approaches: block\u0000programming, natural language, and programming by example. To implement\u0000ProgramAlly, we designed a representation of visual filtering tasks based on\u0000scenarios encountered by blind people, and integrated a set of on-device and\u0000cloud models for generating and running these programs. In user studies with 12\u0000blind adults, we found that participants preferred different programming\u0000modalities depending on the task, and envisioned using visual access programs\u0000to address unique accessibility challenges that are otherwise difficult with\u0000existing applications. Through ProgramAlly, we present an exploration of how\u0000blind end-users can create visual access programs to customize and control\u0000their experiences.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"42 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142223620","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
Abstract Environment Trimming 抽象环境修剪
Pub Date : 2024-08-19 DOI: arxiv-2408.09848
Daniel Jurjo-Rivas, Jose F. Morales, Pedro López-García, Manuel V. Hermenegildo
Variable sharing is a fundamental property in the static analysis of logicprograms, since it is instrumental for ensuring correctness and increasingprecision while inferring many useful program properties. Such propertiesinclude modes, determinacy, non-failure, cost, etc. This has motivatedsignificant work on developing abstract domains to improve the precision andperformance of sharing analyses. Much of this work has centered around thefamily of set-sharing domains, because of the high precision they offer.However, this comes at a price: their scalability to a wide set of realisticprograms remains challenging and this hinders their wider adoption. In thiswork, rather than defining new sharing abstract domains, we focus instead ondeveloping techniques which can be incorporated in the analyzers to addressaspects that are known to affect the efficiency of these domains, such as thenumber of variables, without affecting precision. These techniques are inspiredin others used in the context of compiler optimizations, such as expressionreassociation and variable trimming. We present several such techniques andprovide an extensive experimental evaluation of over 1100 program modules takenfrom both production code and classical benchmarks. This includes theSpectector cache analyzer, the s(CASP) system, the libraries of the Ciaosystem, the LPdoc documenter, the PLAI analyzer itself, etc. The experimentalresults are quite encouraging: we have obtained significant speed-ups, and,more importantly, the number of modules that require a timeout was cut in half.As a result, many more programs can be analyzed precisely in reasonable times.
变量共享是逻辑程序静态分析中的一个基本属性,因为它有助于确保正确性和提高精确度,同时推断出许多有用的程序属性。这些属性包括模式、确定性、非失败、代价等。这促使人们致力于开发抽象域,以提高共享分析的精度和性能。然而,这也是有代价的:它们对大量现实程序的可扩展性仍然具有挑战性,这阻碍了它们的广泛应用。在这项工作中,我们没有定义新的共享抽象域,而是专注于开发可纳入分析器的技术,以解决已知会影响这些域效率的问题,如变量数量,同时不影响精度。这些技术的灵感来自编译器优化中使用的其他技术,如表达式关联和变量修剪。我们介绍了几种此类技术,并对来自生产代码和经典基准的 1100 多个程序模块进行了广泛的实验评估。其中包括Spectector缓存分析器、s(CASP)系统、Cia生态系统库、LPdoc文档器、PLAI分析器本身等。实验结果相当令人鼓舞:我们获得了显著的提速,更重要的是,需要超时的模块数量减少了一半。
{"title":"Abstract Environment Trimming","authors":"Daniel Jurjo-Rivas, Jose F. Morales, Pedro López-García, Manuel V. Hermenegildo","doi":"arxiv-2408.09848","DOIUrl":"https://doi.org/arxiv-2408.09848","url":null,"abstract":"Variable sharing is a fundamental property in the static analysis of logic\u0000programs, since it is instrumental for ensuring correctness and increasing\u0000precision while inferring many useful program properties. Such properties\u0000include modes, determinacy, non-failure, cost, etc. This has motivated\u0000significant work on developing abstract domains to improve the precision and\u0000performance of sharing analyses. Much of this work has centered around the\u0000family of set-sharing domains, because of the high precision they offer.\u0000However, this comes at a price: their scalability to a wide set of realistic\u0000programs remains challenging and this hinders their wider adoption. In this\u0000work, rather than defining new sharing abstract domains, we focus instead on\u0000developing techniques which can be incorporated in the analyzers to address\u0000aspects that are known to affect the efficiency of these domains, such as the\u0000number of variables, without affecting precision. These techniques are inspired\u0000in others used in the context of compiler optimizations, such as expression\u0000reassociation and variable trimming. We present several such techniques and\u0000provide an extensive experimental evaluation of over 1100 program modules taken\u0000from both production code and classical benchmarks. This includes the\u0000Spectector cache analyzer, the s(CASP) system, the libraries of the Ciao\u0000system, the LPdoc documenter, the PLAI analyzer itself, etc. The experimental\u0000results are quite encouraging: we have obtained significant speed-ups, and,\u0000more importantly, the number of modules that require a timeout was cut in half.\u0000As a result, many more programs can be analyzed precisely in reasonable times.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"139 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179575","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
Modernizing SMT-Based Type Error Localization 基于 SMT 的类型错误定位现代化
Pub Date : 2024-08-16 DOI: arxiv-2408.09034
Max Kopinsky, Brigitte Pientka, Xujie Si
Traditional implementations of strongly-typed functional programminglanguages often miss the root cause of type errors. As a consequence, typeerror messages are often misleading and confusing - particularly for studentslearning such a language. We describe Tyro, a type error localization toolwhich determines the optimal source of an error for ill-typed programsfollowing fundamental ideas by Pavlinovic et al. : we first translate typingconstraints into SMT (Satisfiability Modulo Theories) using an intermediaterepresentation which is more readable than the actual SMT encoding; during thisphase we apply a new encoding for polymorphic types. Second, we translate ourintermediate representation into an actual SMT encoding and take advantage ofrecent advancements in off-the-shelf SMT solvers to effectively find optimalerror sources for ill-typed programs. Our design maintains the separation ofheuristic and search also present in prior and similar work. In addition, ourarchitecture design increases modularity, re-usability, and trust in theoverall architecture using an intermediate representation to facilitate thesafe generation of the SMT encoding. We believe this design principle willapply to many other tools that leverage SMT solvers. Our experimental evaluation reinforces that the SMT approach finds accurateerror sources using both expert-labeled programs and an automated method forlarger-scale analysis. Compared to prior work, Tyro lays the basis forlarge-scale evaluation of error localization techniques, which can beintegrated into programming environments and enable us to understand the impactof precise error messages for students in practice.
强类型函数式编程语言的传统实现往往忽略了类型错误的根本原因。因此,类型错误信息往往具有误导性和迷惑性,对于学习这种语言的学生来说尤其如此。我们介绍了 Tyro,这是一种类型错误定位工具,它可以根据 Pavlinovic 等人的基本思想,确定类型错误程序的最佳错误源:我们首先使用一种比实际 SMT 编码更具可读性的中间表示法,将类型约束翻译成 SMT(满足度模态理论);在这一阶段,我们为多态类型应用了一种新的编码。其次,我们将中间表示转化为实际的 SMT 编码,并利用现成 SMT 求解器的最新进展,有效地为类型不佳的程序找到最佳错误源。我们的设计保持了之前类似工作中的启发式和搜索分离。此外,我们的架构设计还增加了模块性、可重用性和整体架构的信任度,使用中间表示法来促进 SMT 编码的安全生成。我们相信这一设计原则将适用于其他许多利用 SMT 解算器的工具。我们的实验评估证明,SMT 方法可以利用专家标注的程序和用于更大规模分析的自动方法找到准确的错误源。与之前的工作相比,Tyro 为错误定位技术的大规模评估奠定了基础,这种技术可以集成到编程环境中,使我们能够在实践中了解精确错误信息对学生的影响。
{"title":"Modernizing SMT-Based Type Error Localization","authors":"Max Kopinsky, Brigitte Pientka, Xujie Si","doi":"arxiv-2408.09034","DOIUrl":"https://doi.org/arxiv-2408.09034","url":null,"abstract":"Traditional implementations of strongly-typed functional programming\u0000languages often miss the root cause of type errors. As a consequence, type\u0000error messages are often misleading and confusing - particularly for students\u0000learning such a language. We describe Tyro, a type error localization tool\u0000which determines the optimal source of an error for ill-typed programs\u0000following fundamental ideas by Pavlinovic et al. : we first translate typing\u0000constraints into SMT (Satisfiability Modulo Theories) using an intermediate\u0000representation which is more readable than the actual SMT encoding; during this\u0000phase we apply a new encoding for polymorphic types. Second, we translate our\u0000intermediate representation into an actual SMT encoding and take advantage of\u0000recent advancements in off-the-shelf SMT solvers to effectively find optimal\u0000error sources for ill-typed programs. Our design maintains the separation of\u0000heuristic and search also present in prior and similar work. In addition, our\u0000architecture design increases modularity, re-usability, and trust in the\u0000overall architecture using an intermediate representation to facilitate the\u0000safe generation of the SMT encoding. We believe this design principle will\u0000apply to many other tools that leverage SMT solvers. Our experimental evaluation reinforces that the SMT approach finds accurate\u0000error sources using both expert-labeled programs and an automated method for\u0000larger-scale analysis. Compared to prior work, Tyro lays the basis for\u0000large-scale evaluation of error localization techniques, which can be\u0000integrated into programming environments and enable us to understand the impact\u0000of precise error messages for students in practice.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"2 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179576","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
Arithmetizing Shape Analysis 形状分析的算术化
Pub Date : 2024-08-16 DOI: arxiv-2408.09037
Sebastian Wolff, Ekanshdeep Gupta, Zafer Esen, Hossein Hojjat, Philipp Rümmer, Thomas Wies
Memory safety is an essential correctness property of software systems. Forprograms operating on linked heap-allocated data structures, the problem ofproving memory safety boils down to analyzing the possible shapes of datastructures, leading to the field of shape analysis. This paper presents a novelreduction-based approach to memory safety analysis that relies on two forms ofabstraction: flow abstraction, representing global properties of the heap graphthrough local flow equations; and view abstraction, which enable verificationtools to reason symbolically about an unbounded number of heap objects. Incombination, the two abstractions make it possible to reduce memory-safetyproofs to proofs about heap-less imperative programs that can be dischargedusing off-the-shelf software verification tools without built-in support forheap reasoning. Using an empirical evaluation on a broad range of programs, thepaper shows that the reduction approach can effectively verify memory safetyfor sequential and concurrent programs operating on different kinds of linkeddata structures, including singly-linked, doubly-linked, and nested lists aswell as trees.
内存安全是软件系统的基本正确性属性。对于在链接堆分配的数据结构上运行的程序来说,证明内存安全性的问题可以归结为分析数据结构的可能形状,这也导致了形状分析领域的出现。本文提出了一种新颖的基于还原的内存安全分析方法,这种方法依赖于两种形式的抽象:流抽象和视图抽象,前者通过局部流方程来表示堆图的全局属性,后者则使验证工具能够对堆对象的无限数量进行符号推理。将这两种抽象结合起来,就有可能将内存安全证明简化为关于无堆命令式程序的证明,这些证明可以使用现成的软件验证工具来完成,而这些工具没有内置的堆推理支持。通过对大量程序的实证评估,论文表明这种还原方法可以有效地验证在不同类型链接数据结构(包括单链、双链和嵌套列表以及树)上运行的顺序和并发程序的内存安全性。
{"title":"Arithmetizing Shape Analysis","authors":"Sebastian Wolff, Ekanshdeep Gupta, Zafer Esen, Hossein Hojjat, Philipp Rümmer, Thomas Wies","doi":"arxiv-2408.09037","DOIUrl":"https://doi.org/arxiv-2408.09037","url":null,"abstract":"Memory safety is an essential correctness property of software systems. For\u0000programs operating on linked heap-allocated data structures, the problem of\u0000proving memory safety boils down to analyzing the possible shapes of data\u0000structures, leading to the field of shape analysis. This paper presents a novel\u0000reduction-based approach to memory safety analysis that relies on two forms of\u0000abstraction: flow abstraction, representing global properties of the heap graph\u0000through local flow equations; and view abstraction, which enable verification\u0000tools to reason symbolically about an unbounded number of heap objects. In\u0000combination, the two abstractions make it possible to reduce memory-safety\u0000proofs to proofs about heap-less imperative programs that can be discharged\u0000using off-the-shelf software verification tools without built-in support for\u0000heap reasoning. Using an empirical evaluation on a broad range of programs, the\u0000paper shows that the reduction approach can effectively verify memory safety\u0000for sequential and concurrent programs operating on different kinds of linked\u0000data structures, including singly-linked, doubly-linked, and nested lists as\u0000well as trees.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"62 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142223621","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
On the Expressivity of Typed Concurrent Calculi 论类型并发计算的可表达性
Pub Date : 2024-08-15 DOI: arxiv-2408.07915
Joseph William Neal Paulus
This thesis embarks on a comprehensive exploration of formal computationalmodels that underlie typed programming languages. We focus on programmingcalculi, both functional (sequential) and concurrent, as they provide acompelling rigorous framework for evaluating program semantics and fordeveloping analyses and program verification techniques. This is the fullversion of the thesis containing appendices.
本论文开始全面探索作为类型化编程语言基础的形式计算模型。我们重点关注编程分子,包括函数式(顺序式)和并发式,因为它们为评估程序语义以及开发分析和程序验证技术提供了令人信服的严格框架。这是论文的完整版,包含附录。
{"title":"On the Expressivity of Typed Concurrent Calculi","authors":"Joseph William Neal Paulus","doi":"arxiv-2408.07915","DOIUrl":"https://doi.org/arxiv-2408.07915","url":null,"abstract":"This thesis embarks on a comprehensive exploration of formal computational\u0000models that underlie typed programming languages. We focus on programming\u0000calculi, both functional (sequential) and concurrent, as they provide a\u0000compelling rigorous framework for evaluating program semantics and for\u0000developing analyses and program verification techniques. This is the full\u0000version of the thesis containing appendices.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"21 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179577","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
The Semantics of Metapropramming in Prolog Prolog中的元成语语义学
Pub Date : 2024-08-14 DOI: arxiv-2408.07652
David S. Warren
This paper describes a semantics for pure Prolog programs with negation thatprovides meaning to metaprograms. Metaprograms are programs that construct anduse data structures as programs. In Prolog a primary mataprogramming constructis the use of a variable as a literal in the body of a clause. The traditionalProlog 3-line metainterpreter is another example of a metaprogram. The accountgiven here also supplies a meaning for clauses that have a variable as head,even though most Prolog systems do not support such clauses. This semanticsnaturally includes such programs, giving them their intuitive meaning. Ideas from M. Denecker and his colleagues form the basis of this approach.The key idea is to notice that if we give meanings to all propositionalprograms and treat Prolog rules with variables as the set of their groundinstances, then we can give meanings to all programs. We must treat Prologrules (which may be metarules) as templates for generating ground propositionalrules, and not as first-order formulas, which they may not be. We useparameterized inductive definitions to give propositional models to Prologprograms, in which the propositions are expressions. Then the set ofexpressions of a propositional model determine a first-order Herbrand Model,providing a first-order logical semantics for all (pure) Prolog programs,including metaprograms. We give examples to show the applicability of this theory. We alsodemonstrate how this theory makes proofs of some important properties ofmetaprograms very straightforward.
本文描述了纯 Prolog 程序的否定语义,它为元程序提供了意义。元程序是将数据结构作为程序来构造和使用的程序。在 Prolog 中,一个主要的元编程构造是在子句的主体中使用变量作为字面形式。传统的Prolog三行元解释器是元编程的另一个例子。尽管大多数 Prolog 系统都不支持以变量为首的子句,但这里给出的解释也为这种子句提供了一个含义。这种语义自然地包含了这类程序,赋予了它们直观的含义。来自德内克(M. Denecker)及其同事的想法构成了这一方法的基础。关键的想法是,如果我们给所有命题程序赋予意义,并将带有变量的 Prolog 规则视为其基础实例的集合,那么我们就能给所有程序赋予意义。我们必须把 Prolog 规则(可能是元规则)当作生成基础命题规则的模板,而不是一阶公式,因为它们可能不是一阶公式。我们使用参数化的归纳定义来给出 Prolog 程序的命题模型,其中的命题是表达式。然后,命题模型的表达式集决定了一阶 Herbrand 模型,为包括元程序在内的所有(纯)Prolog 程序提供了一阶逻辑语义。我们举例说明了这一理论的适用性。我们还演示了这一理论如何使元程序的一些重要属性的证明变得非常直接。
{"title":"The Semantics of Metapropramming in Prolog","authors":"David S. Warren","doi":"arxiv-2408.07652","DOIUrl":"https://doi.org/arxiv-2408.07652","url":null,"abstract":"This paper describes a semantics for pure Prolog programs with negation that\u0000provides meaning to metaprograms. Metaprograms are programs that construct and\u0000use data structures as programs. In Prolog a primary mataprogramming construct\u0000is the use of a variable as a literal in the body of a clause. The traditional\u0000Prolog 3-line metainterpreter is another example of a metaprogram. The account\u0000given here also supplies a meaning for clauses that have a variable as head,\u0000even though most Prolog systems do not support such clauses. This semantics\u0000naturally includes such programs, giving them their intuitive meaning. Ideas from M. Denecker and his colleagues form the basis of this approach.\u0000The key idea is to notice that if we give meanings to all propositional\u0000programs and treat Prolog rules with variables as the set of their ground\u0000instances, then we can give meanings to all programs. We must treat Prolog\u0000rules (which may be metarules) as templates for generating ground propositional\u0000rules, and not as first-order formulas, which they may not be. We use\u0000parameterized inductive definitions to give propositional models to Prolog\u0000programs, in which the propositions are expressions. Then the set of\u0000expressions of a propositional model determine a first-order Herbrand Model,\u0000providing a first-order logical semantics for all (pure) Prolog programs,\u0000including metaprograms. We give examples to show the applicability of this theory. We also\u0000demonstrate how this theory makes proofs of some important properties of\u0000metaprograms very straightforward.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"8 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-14","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179579","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
Composing Automatic Differentiation with Custom Derivatives of Higher-Order Functions 用高阶函数的自定义导数组成自动微分法
Pub Date : 2024-08-14 DOI: arxiv-2408.07683
Sam Estep
Recent theoretical work on automatic differentiation (autodiff) has focusedon characteristics such as correctness and efficiency while assuming that allderivatives are automatically generated by autodiff using programtransformation, with the exception of a fixed set of derivatives for primitiveoperations. However, in practice this assumption is insufficient: theprogrammer often needs to provide custom derivatives for composite functions toachieve efficiency and numerical stability. In this work, we start from theuntyped lambda calculus with a reverse-mode autodiff operator, extend it withan operator to attach manual derivatives, and demonstrate its utility viaseveral examples.
最近关于自动微分(autodiff)的理论研究主要集中在正确性和效率等特性上,同时假设除了原始运算的一组固定导数外,所有导数都是由自动微分利用程序转换自动生成的。然而,在实践中,这一假设是不够的:程序员往往需要为复合函数提供自定义导数,以实现效率和数值稳定性。在这项工作中,我们从带有反向模式自动衍射算子的无类型 lambda 微积分出发,用一个附加手动导数的算子对其进行了扩展,并通过几个例子演示了它的实用性。
{"title":"Composing Automatic Differentiation with Custom Derivatives of Higher-Order Functions","authors":"Sam Estep","doi":"arxiv-2408.07683","DOIUrl":"https://doi.org/arxiv-2408.07683","url":null,"abstract":"Recent theoretical work on automatic differentiation (autodiff) has focused\u0000on characteristics such as correctness and efficiency while assuming that all\u0000derivatives are automatically generated by autodiff using program\u0000transformation, with the exception of a fixed set of derivatives for primitive\u0000operations. However, in practice this assumption is insufficient: the\u0000programmer often needs to provide custom derivatives for composite functions to\u0000achieve efficiency and numerical stability. In this work, we start from the\u0000untyped lambda calculus with a reverse-mode autodiff operator, extend it with\u0000an operator to attach manual derivatives, and demonstrate its utility via\u0000several examples.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"135 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-14","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179578","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