首页 > 最新文献

Proceedings of the 25th ACM International Workshop on Formal Techniques for Java-like Programs最新文献

英文 中文
Towards Verified Scalable Parallel Computing with Coq and Spark 用Coq和Spark实现可扩展并行计算
F. Loulergue, Jolan Philippe
SyDPaCC (Systematic Development of programs for Parallel and Cloud Computing) is a framework for the Coq interactive theorem prover. It allows to systematically develop correct parallel programs from specifications via verified and automated program transformations. The obtained programs are scalable, i.e. able to run on numerous processors. SyDPaCC produces programs written in the multi-paradigm and functional programming language OCaml with calls to the BSML (Bulk Synchronous parallel ML) parallel programming library. In this paper we present ongoing work towards an extension of SyDPaCC to be able to produce Scala programs using Apache Spark for parallel processing.
SyDPaCC (system Development of programs for Parallel and Cloud Computing)是Coq交互定理证明器的框架。它允许系统地开发通过验证和自动化程序转换规范的正确并行程序。获得的程序是可伸缩的,即能够在多个处理器上运行。SyDPaCC生成用多范式和函数式编程语言OCaml编写的程序,并调用BSML(批量同步并行ML)并行编程库。在本文中,我们介绍了正在进行的SyDPaCC扩展工作,以便能够使用Apache Spark进行并行处理来生成Scala程序。
{"title":"Towards Verified Scalable Parallel Computing with Coq and Spark","authors":"F. Loulergue, Jolan Philippe","doi":"10.1145/3605156.3606450","DOIUrl":"https://doi.org/10.1145/3605156.3606450","url":null,"abstract":"SyDPaCC (Systematic Development of programs for Parallel and Cloud Computing) is a framework for the Coq interactive theorem prover. It allows to systematically develop correct parallel programs from specifications via verified and automated program transformations. The obtained programs are scalable, i.e. able to run on numerous processors. SyDPaCC produces programs written in the multi-paradigm and functional programming language OCaml with calls to the BSML (Bulk Synchronous parallel ML) parallel programming library. In this paper we present ongoing work towards an extension of SyDPaCC to be able to produce Scala programs using Apache Spark for parallel processing.","PeriodicalId":254071,"journal":{"name":"Proceedings of the 25th ACM International Workshop on Formal Techniques for Java-like Programs","volume":"20 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-07-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"128386459","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
Runtime Verification of Hash Code in Mutable Classes 可变类中哈希码的运行时验证
D. Ancona, Angelo Ferrando, V. Mascardi
Most mainstream object-oriented languages provide a notion of equality between objects which can be customized to be weaker than reference equality, and which is coupled with the customizable notion of object hash code. This feature is so pervasive in object-oriented code that incorrect redefinition or use of equality and hash code may have a serious impact on software reliability and safety. Despite redefinition of equality and hash code in mutable classes is unsafe, many widely used API libraries do that in Java and other similar languages. When objects of such classes are used as keys in hash tables, programs may exhibit unexpected and unpredictable behavior. In this paper we propose a runtime verification solution to avoid or at least mitigate this issue. Our proposal uses RML, a rewriting-based domain specific language for runtime verification which is independent from code instrumentation and the programming language used to develop the software to be verified.
大多数主流的面向对象语言都提供了对象之间相等的概念,这种概念可以定制为比引用相等更弱,并且与对象哈希码的可定制概念相结合。此特性在面向对象代码中非常普遍,因此不正确地重新定义或使用相等和哈希码可能会对软件的可靠性和安全性产生严重影响。尽管在可变类中重新定义相等和散列代码是不安全的,但许多广泛使用的API库在Java和其他类似语言中都这样做。当这些类的对象被用作哈希表中的键时,程序可能会表现出意外和不可预测的行为。在本文中,我们提出了一个运行时验证解决方案来避免或至少减轻这个问题。我们的建议使用RML,这是一种基于重写的领域特定语言,用于运行时验证,它独立于代码插装和用于开发待验证软件的编程语言。
{"title":"Runtime Verification of Hash Code in Mutable Classes","authors":"D. Ancona, Angelo Ferrando, V. Mascardi","doi":"10.1145/3605156.3606452","DOIUrl":"https://doi.org/10.1145/3605156.3606452","url":null,"abstract":"Most mainstream object-oriented languages provide a notion of equality between objects which can be customized to be weaker than reference equality, and which is coupled with the customizable notion of object hash code. This feature is so pervasive in object-oriented code that incorrect redefinition or use of equality and hash code may have a serious impact on software reliability and safety. Despite redefinition of equality and hash code in mutable classes is unsafe, many widely used API libraries do that in Java and other similar languages. When objects of such classes are used as keys in hash tables, programs may exhibit unexpected and unpredictable behavior. In this paper we propose a runtime verification solution to avoid or at least mitigate this issue. Our proposal uses RML, a rewriting-based domain specific language for runtime verification which is independent from code instrumentation and the programming language used to develop the software to be verified.","PeriodicalId":254071,"journal":{"name":"Proceedings of the 25th ACM International Workshop on Formal Techniques for Java-like Programs","volume":"33 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-07-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"115537282","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
Verifying Well-Typedness Preservation of Refactorings using Scope Graphs 用作用域图验证重构的良好类型保存
L. Miljak, Casper Bach Poulsen, Flip van Spaendonck
The goal of automated refactoring is to reduce maintenance effort. To realize this, programmers need to be able to trust or manually check that refactorings actually preserve behavior. To allow programmers to focus on such checks, automated refactorings should preserve program well-typedness. However, historically automated refactorings in popular IDEs could break well-typedness. The reason is that modern languages have complex name binding semantics which makes it hard to guarantee well-typedness in general. In recent work, scope graphs have been proposed as a uniform model for name binding. The model supports complex name binding patterns, and its uniformity makes it attractive to consider for verifying that refactorings preserve well-typedness. This paper explores how to prove that refactorings preserve well-typedness, using scope graphs. We consider a simple refactoring for merging modules in a toy module language, and prove that this refactoring preserves well-typedness. We give a generic template for proving well-typedness preservation using scope graphs, and discuss how this template relates to refactorings more generally.
自动化重构的目标是减少维护工作。要实现这一点,程序员需要能够信任或手动检查重构实际上保留了行为。为了让程序员专注于这样的检查,自动化重构应该保持程序的良好类型。然而,历史上流行的ide中的自动化重构可能会破坏良好类型。原因是现代语言具有复杂的名称绑定语义,这使得很难保证一般的良好类型。在最近的工作中,范围图被提议作为名称绑定的统一模型。该模型支持复杂的名称绑定模式,它的一致性使得考虑验证重构是否保留了良好的类型性非常有吸引力。本文探讨了如何使用作用域图来证明重构保持良好类型。我们考虑了一个简单的重构,用于在一个玩具模块语言中合并模块,并证明了这种重构保留了良好的类型。我们给出了一个通用模板,用于使用作用域图证明良好类型保存,并讨论了该模板如何与更一般的重构相关联。
{"title":"Verifying Well-Typedness Preservation of Refactorings using Scope Graphs","authors":"L. Miljak, Casper Bach Poulsen, Flip van Spaendonck","doi":"10.1145/3605156.3606455","DOIUrl":"https://doi.org/10.1145/3605156.3606455","url":null,"abstract":"The goal of automated refactoring is to reduce maintenance effort. To realize this, programmers need to be able to trust or manually check that refactorings actually preserve behavior. To allow programmers to focus on such checks, automated refactorings should preserve program well-typedness. However, historically automated refactorings in popular IDEs could break well-typedness. The reason is that modern languages have complex name binding semantics which makes it hard to guarantee well-typedness in general. In recent work, scope graphs have been proposed as a uniform model for name binding. The model supports complex name binding patterns, and its uniformity makes it attractive to consider for verifying that refactorings preserve well-typedness. This paper explores how to prove that refactorings preserve well-typedness, using scope graphs. We consider a simple refactoring for merging modules in a toy module language, and prove that this refactoring preserves well-typedness. We give a generic template for proving well-typedness preservation using scope graphs, and discuss how this template relates to refactorings more generally.","PeriodicalId":254071,"journal":{"name":"Proceedings of the 25th ACM International Workshop on Formal Techniques for Java-like Programs","volume":"510 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-07-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"122216571","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
Points-to Analysis for Context-Oriented JavaScript Programs 指向面向上下文的JavaScript程序的分析
S. Cárdenas, Paul Leger, Hiroaki Fukuda, Nicolás Cardozo
Static analyses, as points-to analysis, are useful to determine and assure different properties about a program, such as security or type safety. While existing analyses are effective in programs restricted to static features, precision declines in the presence of dynamic language features, and even further when the system behavior changes dynamically. As a consequence, improved points-to sets algorithms taking into account such language features and uses are required. In this paper, we present and extension of the point-to sets analysis to incorporate the language abstractions introduced by context-oriented programming adding the capability for programs to adapt their behavior dynamically to the system’s execution context. To do this, we extend WALA to detect the context-oriented language abstractions, and their representation within the system, to capture the dynamic behavior, in the particular case of the Context Traits JavaScript language extension. To prove the effectiveness of our extension, we evaluate the precision of the points-to set analysis with respect to the state of the art, over a set of context-oriented programs taken from the literature.
作为点对点分析,静态分析对于确定和确保程序的不同属性非常有用,例如安全性或类型安全性。虽然现有的分析在仅限于静态特性的程序中是有效的,但是在存在动态语言特性的情况下,精度会下降,当系统行为动态变化时甚至会进一步下降。因此,需要考虑到这些语言特征和用法的改进的点到集算法。在本文中,我们提出并扩展了点到集分析,以结合由面向上下文的编程引入的语言抽象,增加了程序动态调整其行为以适应系统执行上下文的能力。为此,我们扩展WALA来检测面向上下文的语言抽象及其在系统中的表示,以捕获动态行为,在Context Traits JavaScript语言扩展的特殊情况下。为了证明我们的扩展的有效性,我们评估了点集分析的精度,相对于最先进的状态,在一组从文献中提取的面向上下文的程序。
{"title":"Points-to Analysis for Context-Oriented JavaScript Programs","authors":"S. Cárdenas, Paul Leger, Hiroaki Fukuda, Nicolás Cardozo","doi":"10.1145/3605156.3606451","DOIUrl":"https://doi.org/10.1145/3605156.3606451","url":null,"abstract":"Static analyses, as points-to analysis, are useful to determine and assure different properties about a program, such as security or type safety. While existing analyses are effective in programs restricted to static features, precision declines in the presence of dynamic language features, and even further when the system behavior changes dynamically. As a consequence, improved points-to sets algorithms taking into account such language features and uses are required. In this paper, we present and extension of the point-to sets analysis to incorporate the language abstractions introduced by context-oriented programming adding the capability for programs to adapt their behavior dynamically to the system’s execution context. To do this, we extend WALA to detect the context-oriented language abstractions, and their representation within the system, to capture the dynamic behavior, in the particular case of the Context Traits JavaScript language extension. To prove the effectiveness of our extension, we evaluate the precision of the points-to set analysis with respect to the state of the art, over a set of context-oriented programs taken from the literature.","PeriodicalId":254071,"journal":{"name":"Proceedings of the 25th ACM International Workshop on Formal Techniques for Java-like Programs","volume":"21 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-07-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"133883758","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
Dependency-Free Capture Tracking 无依赖捕获跟踪
Edward Lee, Kavin Satheeskumar, O. Lhoták
Type systems usually characterize the shapes of values but not usually their free variables. Many desirable safety properties could be guaranteed by the type system if it knew exactly which variables were free in values. There has been much recent work investigating such systems, with an eventual goal of incorporating a capture tracking system into Scala. These systems are unfortunately complicated by advanced features in Scala's type system, particularly dependent types. We explore what a capture tracking system could look like without the full complication of dependent
类型系统通常描述值的形状,但通常不描述它们的自由变量。如果类型系统确切地知道哪些变量的值是自由的,那么它可以保证许多理想的安全属性。最近有很多研究此类系统的工作,其最终目标是将捕获跟踪系统集成到Scala中。不幸的是,Scala类型系统中的高级特性,特别是依赖类型,使这些系统变得复杂。我们探索捕捉跟踪系统可能看起来像没有完全复杂的依赖
{"title":"Dependency-Free Capture Tracking","authors":"Edward Lee, Kavin Satheeskumar, O. Lhoták","doi":"10.1145/3605156.3606454","DOIUrl":"https://doi.org/10.1145/3605156.3606454","url":null,"abstract":"Type systems usually characterize the shapes of values but not usually their free variables. Many desirable safety properties could be guaranteed by the type system if it knew exactly which variables were free in values. There has been much recent work investigating such systems, with an eventual goal of incorporating a capture tracking system into Scala. These systems are unfortunately complicated by advanced features in Scala's type system, particularly dependent types. We explore what a capture tracking system could look like without the full complication of dependent","PeriodicalId":254071,"journal":{"name":"Proceedings of the 25th ACM International Workshop on Formal Techniques for Java-like Programs","volume":"29 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-07-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"115588082","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
Correctness-by-Construction Meets Refinement Types 构造正确性满足精化类型
Baber Rehman
Type systems provide specifications and enable reasoning about the programs. Among other benefits, type systems provide guarantees of the absence of certain (ill-typed) program behaviors. Refinement types further enrich the expressiveness of type systems by allowing a predicate alongside the type. The crucial divide by zero and null pointer errors are safely eliminated with refinement types. Interestingly, Correctness-by-Construction (CbC) also provides a way to set specifications for the programs. The specifications are provided for the smaller modules. Larger programs are built by composing the functionally correct smaller modules. Therefore, CbC naturally results in verified and correct programs following the program specifications. In this short paper, we highlight that CbC meets refinement types in a sense that both approaches provide specifications for program correctness and larger programs are built by composing the functionally correct smaller modules.
类型系统提供规范并使程序推理成为可能。在其他好处中,类型系统提供了不存在某些(病态的)程序行为的保证。细化类型允许在类型旁边添加谓词,从而进一步丰富了类型系统的表达性。关键的除以零和空指针错误可以通过细化类型安全地消除。有趣的是,构造正确性(CbC)也提供了一种为程序设置规范的方法。提供了较小模块的规格。较大的程序是由功能正确的较小模块组成的。因此,CbC自然会产生符合程序规范的经过验证和正确的程序。在这篇短文中,我们强调CbC在某种意义上符合细化类型,这两种方法都提供了程序正确性的规范,并且通过组合功能正确的较小模块来构建较大的程序。
{"title":"Correctness-by-Construction Meets Refinement Types","authors":"Baber Rehman","doi":"10.1145/3605156.3606449","DOIUrl":"https://doi.org/10.1145/3605156.3606449","url":null,"abstract":"Type systems provide specifications and enable reasoning about the programs. Among other benefits, type systems provide guarantees of the absence of certain (ill-typed) program behaviors. Refinement types further enrich the expressiveness of type systems by allowing a predicate alongside the type. The crucial divide by zero and null pointer errors are safely eliminated with refinement types. Interestingly, Correctness-by-Construction (CbC) also provides a way to set specifications for the programs. The specifications are provided for the smaller modules. Larger programs are built by composing the functionally correct smaller modules. Therefore, CbC naturally results in verified and correct programs following the program specifications. In this short paper, we highlight that CbC meets refinement types in a sense that both approaches provide specifications for program correctness and larger programs are built by composing the functionally correct smaller modules.","PeriodicalId":254071,"journal":{"name":"Proceedings of the 25th ACM International Workshop on Formal Techniques for Java-like Programs","volume":"55 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-07-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"122920021","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
Constructing Structured SSA from FJ 从FJ构造结构化SSA
Kenny Zhuo Ming Lu, Daniel Yu Hian Low
We propose a novel approach of constructing structured SSA forms. Specifically, our declarative algorithm converts a Featherweight Java (FJ) program into its structured SSA form in a single pass. We prove that the proposed algorithm produces valid SSA forms which are semantically consistent with respect to the original source programs. We verify the resulting SSA forms are minimal. We demonstrate that structured SSA form can serve as a unified intermediate representation for both compiler optimization and program verification pipelines. We implemented the algorithm as a library.
我们提出了一种构造结构化SSA表单的新方法。具体来说,我们的声明性算法一次就将轻量级Java (FJ)程序转换为结构化的SSA形式。我们证明了该算法产生的有效的SSA形式与原始源程序在语义上是一致的。我们验证生成的SSA表单是最小的。我们证明了结构化SSA形式可以作为编译器优化和程序验证管道的统一中间表示。我们将算法实现为一个库。
{"title":"Constructing Structured SSA from FJ","authors":"Kenny Zhuo Ming Lu, Daniel Yu Hian Low","doi":"10.1145/3605156.3606457","DOIUrl":"https://doi.org/10.1145/3605156.3606457","url":null,"abstract":"We propose a novel approach of constructing structured SSA forms. Specifically, our declarative algorithm converts a Featherweight Java (FJ) program into its structured SSA form in a single pass. We prove that the proposed algorithm produces valid SSA forms which are semantically consistent with respect to the original source programs. We verify the resulting SSA forms are minimal. We demonstrate that structured SSA form can serve as a unified intermediate representation for both compiler optimization and program verification pipelines. We implemented the algorithm as a library.","PeriodicalId":254071,"journal":{"name":"Proceedings of the 25th ACM International Workshop on Formal Techniques for Java-like Programs","volume":"31 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-07-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"130043688","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
Gradual Guarantee for FJ with lambda-Expressions 带lambda表达式的FJ的渐进保证
Pedro Ângelo, V. Bono, M. Dezani-Ciancaglini, Mário Florido
We present FJ&λ⋆, a new core calculus that extends Featherweight Java (FJ) with interfaces, λ-expressions, intersection types and a form of dynamic type. Intersection types can be used anywhere, in particular to specify target types of λ-expressions. The dynamic type is exploited to specify parts of the class tables and programs we want to exclude temporarily from static typing. Our main result is the gradual guarantee, which says that if a program is well typed in a class table, then replacing type annotations (from the program and from the class table) with the dynamic type always produces a program that is still well typed in the obtained class table. Furthermore, if a typed program evaluates to a value in a class table, then replacing type annotations with dynamic types always produces a program that evaluates to the same value in the obtained class table.
我们提出了FJ&λ—一个新的核心演算,它扩展了轻量级Java (FJ),具有接口,λ表达式,交叉类型和动态类型形式。交集类型可以在任何地方使用,特别是用于指定λ表达式的目标类型。动态类型用于指定我们希望暂时从静态类型中排除的类表和程序的部分。我们的主要结果是渐进保证,即如果一个程序在类表中类型良好,那么用动态类型替换类型注释(来自程序和类表)总是会生成一个在获得的类表中类型良好的程序。此外,如果类型化程序的计算结果为类表中的值,那么用动态类型替换类型注释总是会生成一个在获得的类表中计算结果相同的程序。
{"title":"Gradual Guarantee for FJ with lambda-Expressions","authors":"Pedro Ângelo, V. Bono, M. Dezani-Ciancaglini, Mário Florido","doi":"10.1145/3605156.3606453","DOIUrl":"https://doi.org/10.1145/3605156.3606453","url":null,"abstract":"We present FJ&λ⋆, a new core calculus that extends Featherweight Java (FJ) with interfaces, λ-expressions, intersection types and a form of dynamic type. Intersection types can be used anywhere, in particular to specify target types of λ-expressions. The dynamic type is exploited to specify parts of the class tables and programs we want to exclude temporarily from static typing. Our main result is the gradual guarantee, which says that if a program is well typed in a class table, then replacing type annotations (from the program and from the class table) with the dynamic type always produces a program that is still well typed in the obtained class table. Furthermore, if a typed program evaluates to a value in a class table, then replacing type annotations with dynamic types always produces a program that evaluates to the same value in the obtained class table.","PeriodicalId":254071,"journal":{"name":"Proceedings of the 25th ACM International Workshop on Formal Techniques for Java-like Programs","volume":"32 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-07-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"127994260","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
Using Rewrite Strategies for Efficient Functional Automatic Differentiation 利用重写策略实现高效的功能自动区分
Timon Böhler, D. Richter, M. Mezini
Automatic Differentiation (AD) has become a dominant technique in ML. AD frameworks have first been implemented for imperative languages using tapes. Meanwhile, functional implementations of AD have been developed, often based on dual numbers, which are close to the formal specification of differentiation and hence easier to prove correct. But these papers have focussed on correctness not efficiency. Recently, it was shown how an approach using dual numbers could be made efficient through the right optimizations. Optimizations are highly dependent on order, as one optimization can enable another. It can therefore be useful to have fine-grained control over the scheduling of optimizations. One method expresses compiler optimizations as rewrite rules, whose application can be combined and controlled using strategy languages. Previous work describes the use of term rewriting and strategies to generate high-performance code in a compiler for a functional language. In this work, we implement dual numbers AD in a functional array programming language using rewrite rules and strategy combinators for optimization. We aim to combine the elegance of differentiation using dual numbers with a succinct expression of the optimization schedule using a strategy language. We give preliminary evidence suggesting the viability of the approach on a micro-benchmark.
自动区分(AD)已经成为机器学习中的主要技术。AD框架首先是在命令式语言中使用磁带实现的。同时,AD的功能实现已经被开发出来,通常基于对偶数,这更接近微分的形式规范,因此更容易证明是正确的。但是这些论文关注的是正确性而不是效率。最近,我们展示了如何通过正确的优化使使用对偶数的方法变得高效。优化高度依赖于顺序,因为一个优化可以启用另一个优化。因此,对优化调度进行细粒度控制是很有用的。一种方法将编译器优化表达为重写规则,其应用可以使用策略语言进行组合和控制。以前的工作描述了使用术语重写和策略在函数式语言的编译器中生成高性能代码。在这项工作中,我们使用重写规则和策略组合子进行优化,在函数数组编程语言中实现对偶数AD。我们的目标是将使用对偶数的微分的优雅性与使用策略语言的优化调度的简洁表达结合起来。我们给出了初步证据,表明该方法在微观基准上的可行性。
{"title":"Using Rewrite Strategies for Efficient Functional Automatic Differentiation","authors":"Timon Böhler, D. Richter, M. Mezini","doi":"10.1145/3605156.3606456","DOIUrl":"https://doi.org/10.1145/3605156.3606456","url":null,"abstract":"Automatic Differentiation (AD) has become a dominant technique in ML. AD frameworks have first been implemented for imperative languages using tapes. Meanwhile, functional implementations of AD have been developed, often based on dual numbers, which are close to the formal specification of differentiation and hence easier to prove correct. But these papers have focussed on correctness not efficiency. Recently, it was shown how an approach using dual numbers could be made efficient through the right optimizations. Optimizations are highly dependent on order, as one optimization can enable another. It can therefore be useful to have fine-grained control over the scheduling of optimizations. One method expresses compiler optimizations as rewrite rules, whose application can be combined and controlled using strategy languages. Previous work describes the use of term rewriting and strategies to generate high-performance code in a compiler for a functional language. In this work, we implement dual numbers AD in a functional array programming language using rewrite rules and strategy combinators for optimization. We aim to combine the elegance of differentiation using dual numbers with a succinct expression of the optimization schedule using a strategy language. We give preliminary evidence suggesting the viability of the approach on a micro-benchmark.","PeriodicalId":254071,"journal":{"name":"Proceedings of the 25th ACM International Workshop on Formal Techniques for Java-like Programs","volume":"82 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-07-05","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"132333199","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
Verifying C++ Dynamic Binding 验证c++动态绑定
Niels Mommen, Bart Jacobs
We propose an approach for modular verification of programs written in an object-oriented language where, like in C++, the same virtual method call is bound to different methods at different points during the construction or destruction of an object. Our separation logic combines Parkinson and Bierman's abstract predicate families with essentially explicitly tracking each subobject's vtable pointer. Our logic supports polymorphic destruction. Virtual inheritance is not yet supported. We formalized our approach and implemented it in our VeriFast tool for semi-automated modular formal verification of C++ programs.
我们提出了一种用面向对象语言编写的程序的模块化验证方法,其中,像在c++中一样,在对象的构造或销毁过程中,相同的虚拟方法调用在不同的点绑定到不同的方法。我们的分离逻辑结合了Parkinson和Bierman的抽象谓词族,本质上显式地跟踪每个子对象的虚表指针。我们的逻辑支持多态销毁。暂不支持虚拟继承。我们将我们的方法形式化,并在我们的VeriFast工具中实现它,用于c++程序的半自动模块化形式化验证。
{"title":"Verifying C++ Dynamic Binding","authors":"Niels Mommen, Bart Jacobs","doi":"10.1145/3605156.3606448","DOIUrl":"https://doi.org/10.1145/3605156.3606448","url":null,"abstract":"We propose an approach for modular verification of programs written in an object-oriented language where, like in C++, the same virtual method call is bound to different methods at different points during the construction or destruction of an object. Our separation logic combines Parkinson and Bierman's abstract predicate families with essentially explicitly tracking each subobject's vtable pointer. Our logic supports polymorphic destruction. Virtual inheritance is not yet supported. We formalized our approach and implemented it in our VeriFast tool for semi-automated modular formal verification of C++ programs.","PeriodicalId":254071,"journal":{"name":"Proceedings of the 25th ACM International Workshop on Formal Techniques for Java-like Programs","volume":"41 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-06-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"126090988","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
期刊
Proceedings of the 25th ACM International Workshop on Formal Techniques for Java-like Programs
全部 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学术文献互助群
群 号:604180095
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1