首页 > 最新文献

arXiv - CS - Programming Languages最新文献

英文 中文
Mix Testing: Specifying and Testing ABI Compatibility of C/C++ Atomics Implementations 混合测试:规范和测试 C/C++ Atomics 实现的 ABI 兼容性
Pub Date : 2024-09-02 DOI: arxiv-2409.01161
Luke Geeson, James Brotherston, Wilco Dijkstra, Alastair F. Donaldson, Lee Smith, Tyler Sorensen, John Wickerson
The correctness of complex software depends on the correctness of both thesource code and the compilers that generate corresponding binary code.Compilers must do more than preserve the semantics of a single source file:they must ensure that generated binaries can be composed with other binaries toform a final executable. The compatibility of composition is ensured using anApplication Binary Interface (ABI), which specifies details of callingconventions, exception handling, and so on. Unfortunately, there are noofficial ABIs for concurrent programs, so different atomics mappings, althoughcorrect in isolation, may induce bugs when composed. Indeed, today, mixingbinaries generated by different compilers can lead to an erroneous resultingbinary. We present mix testing: a new technique designed to find compiler bugs whenthe instructions of a C/C++ test are separately compiled for multiplecompatible architectures and then mixed together. We define a class of compilerbugs, coined mixing bugs, that arise when parts of a program are compiledseparately using different mappings from C/C++ atomic operations to assemblysequences. To demonstrate the generality of mix testing, we have designed andimplemented a tool, atomic-mixer, which we have used: (a) to reproduce oneexisting non-mixing bug that state-of-the-art concurrency testing tools arelimited to being able to find (showing that atomic-mixer at least meets thecapabilities of these tools), and (b) to find four previously-unknown mixingbugs in LLVM and GCC, and one prospective mixing bug in mappings proposed forthe Java Virtual Machine. Lastly, we have worked with engineers at Arm tospecify, for the first time, an atomics ABI for Armv8, and have usedatomic-mixer to validate the LLVM and GCC compilers against it.
复杂软件的正确性既取决于源代码的正确性,也取决于生成相应二进制代码的编译器的正确性。编译器不仅要保留单个源文件的语义,还必须确保生成的二进制文件可以与其他二进制文件组成最终的可执行文件。编译器不仅要保留单个源文件的语义,还必须确保生成的二进制文件能与其他二进制文件组成最终的可执行文件。组成的兼容性是通过应用程序二进制接口(ABI)来保证的,该接口指定了调用约定、异常处理等细节。遗憾的是,目前还没有针对并发程序的官方 ABI,因此不同的原子映射虽然在孤立情况下是正确的,但在组合时可能会产生错误。事实上,如今混合使用不同编译器生成的二进制文件可能会导致错误的二进制结果。我们提出了混合测试:这是一种新技术,旨在发现 C/C++ 测试指令在为多种兼容架构分别编译后混合在一起时的编译器错误。我们定义了一类编译器错误,称为混合错误,当程序的各个部分分别使用不同的映射从 C/C++ 原子操作编译到汇编序列时,就会出现这类错误。为了证明混合测试的通用性,我们设计并实现了一个工具--原子混合器,并使用了它:(a) 重现了一个现有的非混合 Bug,而最先进的并发测试工具只能发现这些 Bug(表明 atomic-mixer 至少达到了这些工具的能力);(b) 在 LLVM 和 GCC 中发现了四个以前未知的混合 Bug,并在为 Java 虚拟机提出的映射中发现了一个潜在的混合 Bug。最后,我们与 Arm 公司的工程师合作,首次为 Armv8 确定了原子 ABI,并使用原子混合器对 LLVM 和 GCC 编译器进行了验证。
{"title":"Mix Testing: Specifying and Testing ABI Compatibility of C/C++ Atomics Implementations","authors":"Luke Geeson, James Brotherston, Wilco Dijkstra, Alastair F. Donaldson, Lee Smith, Tyler Sorensen, John Wickerson","doi":"arxiv-2409.01161","DOIUrl":"https://doi.org/arxiv-2409.01161","url":null,"abstract":"The correctness of complex software depends on the correctness of both the\u0000source code and the compilers that generate corresponding binary code.\u0000Compilers must do more than preserve the semantics of a single source file:\u0000they must ensure that generated binaries can be composed with other binaries to\u0000form a final executable. The compatibility of composition is ensured using an\u0000Application Binary Interface (ABI), which specifies details of calling\u0000conventions, exception handling, and so on. Unfortunately, there are no\u0000official ABIs for concurrent programs, so different atomics mappings, although\u0000correct in isolation, may induce bugs when composed. Indeed, today, mixing\u0000binaries generated by different compilers can lead to an erroneous resulting\u0000binary. We present mix testing: a new technique designed to find compiler bugs when\u0000the instructions of a C/C++ test are separately compiled for multiple\u0000compatible architectures and then mixed together. We define a class of compiler\u0000bugs, coined mixing bugs, that arise when parts of a program are compiled\u0000separately using different mappings from C/C++ atomic operations to assembly\u0000sequences. To demonstrate the generality of mix testing, we have designed and\u0000implemented a tool, atomic-mixer, which we have used: (a) to reproduce one\u0000existing non-mixing bug that state-of-the-art concurrency testing tools are\u0000limited to being able to find (showing that atomic-mixer at least meets the\u0000capabilities of these tools), and (b) to find four previously-unknown mixing\u0000bugs in LLVM and GCC, and one prospective mixing bug in mappings proposed for\u0000the Java Virtual Machine. Lastly, we have worked with engineers at Arm to\u0000specify, for the first time, an atomics ABI for Armv8, and have used\u0000atomic-mixer to validate the LLVM and GCC compilers against it.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"109 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-09-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179543","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 2024 miniKanren and Relational Programming Workshop 2024 miniKanren 和关系编程研讨会论文集
Pub Date : 2024-09-02 DOI: arxiv-2409.06505
Ekaterina Verbitskaia, Joseph P. Near
The miniKanren and Relational Programming Workshop is a workshop for theminiKanren family of relational (pure constraint logic programming) languages:miniKanren, microKanren, core.logic, OCanren, Guanxi, etc. The workshopsolicits papers and talks on the design, implementation, and application ofminiKanren-like languages. A major goal of the workshop is to bring togetherresearchers, implementors, and users from the miniKanren community, and toshare expertise and techniques for relational programming. Another goal for theworkshop is to push the state of the art of relational programming - forexample, by developing new techniques for writing interpreters, typeinferencers, theorem provers, abstract interpreters, CAD tools, and otherinteresting programs as relations, which are capable of being "run backward,"performing synthesis, etc.
miniKanren 和关系编程研讨会是针对关系(纯约束逻辑编程)语言 miniKanren、microKanren、core.logic、OCanren、Guanxi 等的 miniKanren 系列而举办的研讨会。研讨会征集有关类似迷你坎伦语言的设计、实现和应用的论文和讲座。研讨会的一个主要目标是汇聚迷你侃人社区的研究者、实现者和用户,分享关系编程的专业知识和技术。研讨会的另一个目标是推动关系编程技术的发展--例如,通过开发新的技术来编写解释器、类型判定器、定理证明器、抽象解释器、CAD 工具和其他有趣的关系程序,这些程序能够 "反向运行"、执行合成等。
{"title":"Proceedings of the 2024 miniKanren and Relational Programming Workshop","authors":"Ekaterina Verbitskaia, Joseph P. Near","doi":"arxiv-2409.06505","DOIUrl":"https://doi.org/arxiv-2409.06505","url":null,"abstract":"The miniKanren and Relational Programming Workshop is a workshop for the\u0000miniKanren family of relational (pure constraint logic programming) languages:\u0000miniKanren, microKanren, core.logic, OCanren, Guanxi, etc. The workshop\u0000solicits papers and talks on the design, implementation, and application of\u0000miniKanren-like languages. A major goal of the workshop is to bring together\u0000researchers, implementors, and users from the miniKanren community, and to\u0000share expertise and techniques for relational programming. Another goal for the\u0000workshop is to push the state of the art of relational programming - for\u0000example, by developing new techniques for writing interpreters, type\u0000inferencers, theorem provers, abstract interpreters, CAD tools, and other\u0000interesting programs as relations, which are capable of being \"run backward,\"\u0000performing synthesis, etc.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"6 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-09-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179549","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
Wasm-R3: Record-Reduce-Replay for Realistic and Standalone WebAssembly Benchmarks Wasm-R3:针对真实和独立 WebAssembly 基准的记录-缩减-重放功能
Pub Date : 2024-09-01 DOI: arxiv-2409.00708
Doehyun Baek, Jakob Getz, Yusung Sim, Daniel Lehmann, Ben L. Titzer, Sukyoung Ryu, Michael Pradel
WebAssembly (Wasm for short) brings a new, powerful capability to the web aswell as Edge, IoT, and embedded systems. Wasm is a portable, compact binarycode format with high performance and robust sandboxing properties. As Wasmapplications grow in size and importance, the complex performancecharacteristics of diverse Wasm engines demand robust, representativebenchmarks for proper tuning. Stopgap benchmark suites, such as PolyBenchC andlibsodium, continue to be used in the literature, though they are known to beunrepresentative. Porting of more complex suites remains difficult because Wasmlacks many system APIs and extracting real-world Wasm benchmarks from the webis difficult due to complex host interactions. To address this challenge, weintroduce Wasm-R3, the first record and replay technique for Wasm. Wasm-R3transparently injects instrumentation into Wasm modules to record an executiontrace from inside the module, then reduces the execution trace via severaloptimizations, and finally produces a replay module that is executablesandalone without any host environment - on any engine. The benchmarks createdby our approach are (i) realistic, because the approach records real-world webapplications, (ii) faithful to the original execution, because the replaybenchmark includes the unmodified original code, only adding emulation of hostinteractions, and (iii) standalone, because the replay benchmarks run on anyengine. Applying Wasm-R3 to web-based Wasm applications in the wilddemonstrates the correctness of our approach as well as the effectiveness ofour optimizations, which reduce the recorded traces by 99.53 percent and thesize of the replay benchmark by 9.98 percent. We release the resultingbenchmark suite of 27 applications, called Wasm-R3-Bench, to the community, toinspire a new generation of realistic and standalone Wasm benchmarks.
WebAssembly(简称 Wasm)为网络、边缘、物联网和嵌入式系统带来了全新的强大功能。Wasm 是一种便携、紧凑的二进制代码格式,具有高性能和强大的沙箱特性。随着 Wasm 应用程序的规模和重要性不断增加,各种 Wasm 引擎的复杂性能特征要求有稳健、有代表性的基准来进行适当的调整。PolyBenchC和libsodium等权宜基准套件仍在文献中使用,尽管众所周知它们不具代表性。由于 Wasmlacks 有许多系统应用程序接口(API),而且由于复杂的主机交互,从网络上提取真实世界的 Wasm 基准非常困难,因此移植更复杂的基准仍然很困难。为了应对这一挑战,我们引入了Wasm-R3,这是Wasm的首个记录和重放技术。Wasm-R3 以透明方式向 Wasm 模块注入仪器,记录模块内部的执行轨迹,然后通过多次优化减少执行轨迹,最后生成一个重放模块,该模块可在任何引擎上单独执行,无需任何主机环境。通过我们的方法创建的基准是:(i) 真实的,因为该方法记录了真实世界的网络应用;(ii) 忠实于原始执行,因为重放基准包括未修改的原始代码,只是增加了主机交互的模拟;(iii) 独立的,因为重放基准可在任何引擎上运行。将 Wasm-R3 应用于基于网络的野生 Wasm 应用程序证明了我们方法的正确性和优化的有效性,这些优化将记录的痕迹减少了 99.53%,将重放基准的大小减少了 9.98%。我们向社区发布了由 27 个应用程序组成的基准测试套件(称为 Wasm-R3-Bench),以激发新一代真实的独立 Wasm 基准测试。
{"title":"Wasm-R3: Record-Reduce-Replay for Realistic and Standalone WebAssembly Benchmarks","authors":"Doehyun Baek, Jakob Getz, Yusung Sim, Daniel Lehmann, Ben L. Titzer, Sukyoung Ryu, Michael Pradel","doi":"arxiv-2409.00708","DOIUrl":"https://doi.org/arxiv-2409.00708","url":null,"abstract":"WebAssembly (Wasm for short) brings a new, powerful capability to the web as\u0000well as Edge, IoT, and embedded systems. Wasm is a portable, compact binary\u0000code format with high performance and robust sandboxing properties. As Wasm\u0000applications grow in size and importance, the complex performance\u0000characteristics of diverse Wasm engines demand robust, representative\u0000benchmarks for proper tuning. Stopgap benchmark suites, such as PolyBenchC and\u0000libsodium, continue to be used in the literature, though they are known to be\u0000unrepresentative. Porting of more complex suites remains difficult because Wasm\u0000lacks many system APIs and extracting real-world Wasm benchmarks from the web\u0000is difficult due to complex host interactions. To address this challenge, we\u0000introduce Wasm-R3, the first record and replay technique for Wasm. Wasm-R3\u0000transparently injects instrumentation into Wasm modules to record an execution\u0000trace from inside the module, then reduces the execution trace via several\u0000optimizations, and finally produces a replay module that is executable\u0000sandalone without any host environment - on any engine. The benchmarks created\u0000by our approach are (i) realistic, because the approach records real-world web\u0000applications, (ii) faithful to the original execution, because the replay\u0000benchmark includes the unmodified original code, only adding emulation of host\u0000interactions, and (iii) standalone, because the replay benchmarks run on any\u0000engine. Applying Wasm-R3 to web-based Wasm applications in the wild\u0000demonstrates the correctness of our approach as well as the effectiveness of\u0000our optimizations, which reduce the recorded traces by 99.53 percent and the\u0000size of the replay benchmark by 9.98 percent. We release the resulting\u0000benchmark suite of 27 applications, called Wasm-R3-Bench, to the community, to\u0000inspire a new generation of realistic and standalone Wasm benchmarks.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"47 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-09-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179544","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
Type-Based Verification of Connectivity Constraints in Lattice Surgery 网格手术中基于类型的连接性约束验证
Pub Date : 2024-08-31 DOI: arxiv-2409.00529
Ryo Wakizaka, Yasunari Suzuki, Atsushi Igarashi
Fault-tolerant quantum computation using lattice surgery can be abstracted asoperations on graphs, wherein each logical qubit corresponds to a vertex of thegraph, and multi-qubit measurements are accomplished by connecting the verticeswith paths between them. Operations attempting to connect vertices without avalid path will result in abnormal termination. As the permissible paths mayevolve during execution, it is necessary to statically verify that theexecution of a quantum program can be completed. This paper introduces a type-based method to statically verify thatwell-typed programs can be executed without encountering halts induced bysurgery operations. Alongside, we present $mathcal{Q}_{LS}$, a first-orderquantum programming language to formalize the execution model of surgeryoperations. Furthermore, we provide a type checking algorithm by reducing thetype checking problem to the offline dynamic connectivity problem.
使用晶格手术的容错量子计算可以抽象为对图的操作,其中每个逻辑量子比特对应图中的一个顶点,多量子比特测量通过连接顶点和它们之间的路径来完成。试图连接没有有效路径的顶点的操作将导致异常终止。由于允许的路径可能会在执行过程中发生变化,因此有必要静态验证量子程序的执行是否能够完成。本文介绍了一种基于类型的方法,用于静态验证类型良好的程序是否可以执行,而不会遇到由手术操作引起的停止。同时,我们提出了一种一阶量子编程语言 $mathcal{Q}_{LS}$,用于形式化外科手术的执行模型。此外,我们通过将类型检查问题简化为离线动态连接问题,提供了一种类型检查算法。
{"title":"Type-Based Verification of Connectivity Constraints in Lattice Surgery","authors":"Ryo Wakizaka, Yasunari Suzuki, Atsushi Igarashi","doi":"arxiv-2409.00529","DOIUrl":"https://doi.org/arxiv-2409.00529","url":null,"abstract":"Fault-tolerant quantum computation using lattice surgery can be abstracted as\u0000operations on graphs, wherein each logical qubit corresponds to a vertex of the\u0000graph, and multi-qubit measurements are accomplished by connecting the vertices\u0000with paths between them. Operations attempting to connect vertices without a\u0000valid path will result in abnormal termination. As the permissible paths may\u0000evolve during execution, it is necessary to statically verify that the\u0000execution of a quantum program can be completed. This paper introduces a type-based method to statically verify that\u0000well-typed programs can be executed without encountering halts induced by\u0000surgery operations. Alongside, we present $mathcal{Q}_{LS}$, a first-order\u0000quantum programming language to formalize the execution model of surgery\u0000operations. Furthermore, we provide a type checking algorithm by reducing the\u0000type checking problem to the offline dynamic connectivity problem.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"82 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-31","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179546","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 C/Ctexttt{++} Model with Inline Assembly 使用内联程序集扩展 C/Ctexttt{++} 模型
Pub Date : 2024-08-30 DOI: arxiv-2408.17208
Paulo Emílio de Vilhena, Ori Lahav, Viktor Vafeiadis, Azalea Raad
Programs written in C/Ctexttt{++} often include textit{inline assembly}: asnippet of architecture-specific assembly code used to access low-levelfunctionalities that are impossible or expensive to simulate in the sourcelanguage. % Although inline assembly is widely used, its semantics has not yetbeen formally studied. In this paper, we overcome this deficiency by investigating the effect ofinline assembly on the textit{consistency} semantics of~C/Ctexttt{++}programs. % We propose the first memory model of the~Ctexttt{++} ProgrammingLanguage with support for inline assembly for Intel's textsf{x86} includingtextit{non-temporal stores} and textit{store fences}. % We argue thatprevious provably correct compiler optimizations and correct compiler mappingsshould remain correct under such an extended model and we prove that thisrequirement is met by our proposed model.
用 C/Ctexttt{++} 编写的程序通常包括内联汇编:用于访问低级功能的特定体系结构汇编代码片段,而这些功能在源语言中是无法模拟的,或者模拟成本很高。尽管内联汇编被广泛使用,但其语义尚未得到正式研究。在本文中,我们通过研究内联汇编对 ~C/Ctexttt{++} 程序语义的影响来克服这一缺陷。我们提出了第一个支持英特尔(Intel)textsf{x86}(包括textit{non-temporal stores}和textit{store fences})内联汇编的~C/Ctexttt{++}编程语言内存模型。我们认为,在这种扩展模型下,先前证明正确的编译器优化和正确的编译器映射应该保持正确,我们证明我们提出的模型满足了这一要求。
{"title":"Extending the C/Ctexttt{++} Model with Inline Assembly","authors":"Paulo Emílio de Vilhena, Ori Lahav, Viktor Vafeiadis, Azalea Raad","doi":"arxiv-2408.17208","DOIUrl":"https://doi.org/arxiv-2408.17208","url":null,"abstract":"Programs written in C/Ctexttt{++} often include textit{inline assembly}: a\u0000snippet of architecture-specific assembly code used to access low-level\u0000functionalities that are impossible or expensive to simulate in the source\u0000language. % Although inline assembly is widely used, its semantics has not yet\u0000been formally studied. In this paper, we overcome this deficiency by investigating the effect of\u0000inline assembly on the textit{consistency} semantics of~C/Ctexttt{++}\u0000programs. % We propose the first memory model of the~Ctexttt{++} Programming\u0000Language with support for inline assembly for Intel's textsf{x86} including\u0000textit{non-temporal stores} and textit{store fences}. % We argue that\u0000previous provably correct compiler optimizations and correct compiler mappings\u0000should remain correct under such an extended model and we prove that this\u0000requirement is met by our proposed model.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"5 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142223612","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 Computational Indistinguishability and Logical Relations 论计算无差别性与逻辑关系
Pub Date : 2024-08-30 DOI: arxiv-2408.17340
Ugo Dal Lago, Zeinab Galal, Giulia Giusti
A $lambda$-calculus is introduced in which all programs can be evaluated inprobabilistic polynomial time and in which there is sufficient structure torepresent sequential cryptographic constructions and adversaries for them, evenwhen the latter are oracle-based. A notion of observational equivalencecapturing computational indistinguishability and a class of approximate logicalrelations are then presented, showing that the latter represent a sound prooftechnique for the former. The work concludes with the presentation of anexample of a security proof in which the encryption scheme induced by apseudorandom function is proven secure against active adversaries in a purelyequational style.
本文介绍了一种$lambda$演算法,在这种演算法中,所有程序都可以在概率多项式时间内得到评估,并且有足够的结构来表示顺序加密构造和它们的对手,即使后者是基于甲骨文的。然后,我们提出了一个捕捉计算无差别性的观察等价性概念和一类近似逻辑关系,表明后者代表了前者的合理证明技术。最后,本文介绍了一个安全证明实例,在该实例中,用纯等式证明了伪随机函数诱导的加密方案对主动对手是安全的。
{"title":"On Computational Indistinguishability and Logical Relations","authors":"Ugo Dal Lago, Zeinab Galal, Giulia Giusti","doi":"arxiv-2408.17340","DOIUrl":"https://doi.org/arxiv-2408.17340","url":null,"abstract":"A $lambda$-calculus is introduced in which all programs can be evaluated in\u0000probabilistic polynomial time and in which there is sufficient structure to\u0000represent sequential cryptographic constructions and adversaries for them, even\u0000when the latter are oracle-based. A notion of observational equivalence\u0000capturing computational indistinguishability and a class of approximate logical\u0000relations are then presented, showing that the latter represent a sound proof\u0000technique for the former. The work concludes with the presentation of an\u0000example of a security proof in which the encryption scheme induced by a\u0000pseudorandom function is proven secure against active adversaries in a purely\u0000equational style.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"27 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179547","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 Relational Solver for Constraint-based Type Inference 基于约束的类型推断关系求解器
Pub Date : 2024-08-30 DOI: arxiv-2408.17138
Eridan Domoratskiy, Dmitry Boulytchev
We present a miniKanren-based type inferencer for an educational programminglanguage with first-class functions, S-expressions, and pattern-matching. Thelanguage itself is untyped which adds a certain specificity to the problem andrequires the employment of techniques conventionally used in implicit/gradualtyping settings. The presence of polymorphic and recursive types poses acertain challenge when implementing the inferencer in miniKanren and requires anumber of tricks, optimizations, and extensions to be used; we report on thoseas well.
我们为一种具有一流函数、S 表达式和模式匹配的教育编程语言提出了一种基于微型坎伦的类型推断器。该语言本身是无类型的,这给问题增加了一定的特殊性,并要求使用隐式/渐进式类型设置中常用的技术。多态类型和递归类型的存在给在 miniKanren 中实现推理器带来了一定的挑战,需要使用一些技巧、优化和扩展;我们也将对此进行报告。
{"title":"A Relational Solver for Constraint-based Type Inference","authors":"Eridan Domoratskiy, Dmitry Boulytchev","doi":"arxiv-2408.17138","DOIUrl":"https://doi.org/arxiv-2408.17138","url":null,"abstract":"We present a miniKanren-based type inferencer for an educational programming\u0000language with first-class functions, S-expressions, and pattern-matching. The\u0000language itself is untyped which adds a certain specificity to the problem and\u0000requires the employment of techniques conventionally used in implicit/gradual\u0000typing settings. The presence of polymorphic and recursive types poses a\u0000certain challenge when implementing the inferencer in miniKanren and requires a\u0000number of tricks, optimizations, and extensions to be used; we report on those\u0000as well.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"5 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179552","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
Relational Reactive Programming: miniKanren for the Web 关系式反应编程:网络迷你版关仁
Pub Date : 2024-08-30 DOI: arxiv-2408.17044
Evan Donahue
Over the past decade, reactive frameworks and languages have become thedominant programming paradigm in front-end web development. In this paradigm,user actions change application state, and those changes propagate reactivelyto derived state and to the display, reducing the likelihood that various partsof the data model and user-facing view will become out of sync due toprogrammer error. In this paper, we explore the application of relationalprogramming to the specification and synchronized evolution of model and viewacross time in response to user input. To that end, we present a reactiveJavascript implementation of miniKanren and an integrated reactive programmingmodel oriented towards the challenges of front-end web development.
在过去十年中,反应式框架和语言已成为前端网络开发的主流编程范式。在这种范例中,用户操作会改变应用状态,而这些改变会反应性地传播到派生状态和显示屏上,从而降低了数据模型和面向用户的视图的各个部分由于程序员的错误而不同步的可能性。在本文中,我们探讨了如何将关系编程应用于模型和视图的规范和同步演化,以响应用户输入。为此,我们针对前端网络开发所面临的挑战,介绍了迷你简仁的反应式 JavaScript 实现和集成的反应式编程模型。
{"title":"Relational Reactive Programming: miniKanren for the Web","authors":"Evan Donahue","doi":"arxiv-2408.17044","DOIUrl":"https://doi.org/arxiv-2408.17044","url":null,"abstract":"Over the past decade, reactive frameworks and languages have become the\u0000dominant programming paradigm in front-end web development. In this paradigm,\u0000user actions change application state, and those changes propagate reactively\u0000to derived state and to the display, reducing the likelihood that various parts\u0000of the data model and user-facing view will become out of sync due to\u0000programmer error. In this paper, we explore the application of relational\u0000programming to the specification and synchronized evolution of model and view\u0000across time in response to user input. To that end, we present a reactive\u0000Javascript implementation of miniKanren and an integrated reactive programming\u0000model oriented towards the challenges of front-end web development.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"1 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179548","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
To Be or Not To Be: Adding Integrity Constraints to stableKanren to Make a Decision 要还是不要:为稳定的 Kanren 添加完整性约束以做出决定
Pub Date : 2024-08-29 DOI: arxiv-2408.16699
Xiangyu Guo, Ajay Bansal
We integrate integrity constraints to stableKanren to enable a newproblem-solving paradigm in combinatorial search problems. stableKanren extendsminiKanren to reasoning about contradictions under stable model semantics.However, writing programs to solve combinatorial search problems instableKanren did not fully utilize the contradiction reasoning. This is mainlydue to the lack of control over the predicate (goal function) outcome duringresolution. Integrity constraints defined by answer set programming (ASP)provide the ability to constrain the predicate outcome. However, integrityconstraints are headless normal clauses, and stableKanren cannot create a goalfunction without a valid head. There are two approaches to handling integrityconstraints, but they do not fit stableKanren. Therefore, we design a newapproach to integrate integrity constraints into stableKanren. We show auniform framework to solve combinatorial search problems using integrityconstraints in extended stableKanren.
我们将完整性约束集成到了稳定坎仁算法中,从而在组合搜索问题中实现了一种新的问题解决范式。稳定坎仁算法将迷你坎仁算法扩展到了稳定模型语义下的矛盾推理。然而,编写程序来解决组合搜索问题时,不稳定坎仁算法并没有充分利用矛盾推理。这主要是由于在求解过程中缺乏对谓词(目标函数)结果的控制。由答案集编程(ASP)定义的完整性约束提供了约束谓词结果的能力。但是,完整性约束是无头正常从句,而稳定坎儿井无法创建没有有效头部的目标函数。有两种方法可以处理完整性约束,但它们并不适合稳定的 Kanren。因此,我们设计了一种新方法,将完整性约束集成到稳定坎儿井中。我们展示了在扩展稳定坎伦中使用完整性约束解决组合搜索问题的统一框架。
{"title":"To Be or Not To Be: Adding Integrity Constraints to stableKanren to Make a Decision","authors":"Xiangyu Guo, Ajay Bansal","doi":"arxiv-2408.16699","DOIUrl":"https://doi.org/arxiv-2408.16699","url":null,"abstract":"We integrate integrity constraints to stableKanren to enable a new\u0000problem-solving paradigm in combinatorial search problems. stableKanren extends\u0000miniKanren to reasoning about contradictions under stable model semantics.\u0000However, writing programs to solve combinatorial search problems in\u0000stableKanren did not fully utilize the contradiction reasoning. This is mainly\u0000due to the lack of control over the predicate (goal function) outcome during\u0000resolution. Integrity constraints defined by answer set programming (ASP)\u0000provide the ability to constrain the predicate outcome. However, integrity\u0000constraints are headless normal clauses, and stableKanren cannot create a goal\u0000function without a valid head. There are two approaches to handling integrity\u0000constraints, but they do not fit stableKanren. Therefore, we design a new\u0000approach to integrate integrity constraints into stableKanren. We show a\u0000uniform framework to solve combinatorial search problems using integrity\u0000constraints in extended stableKanren.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"16 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-29","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179550","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
Six Ways to Implement Divisibility by Three in miniKanren 在 miniKanren 中实现三除法的六种方法
Pub Date : 2024-08-29 DOI: arxiv-2408.16259
Brett Schreiber, Brysen Pfingsten, Jason Hemann
This paper explores options for implementing the relation $n equiv 0 (text{mod} 3)$ within miniKanren using miniKanren numbers and its arithmeticsuite. We examine different approaches starting from straightforwardimplementations to more optimized versions. The implementations discussedinclude brute-force arithmetic methods, divisibility tricks, and derivationfrom a finite automaton. Our contributions include an in-depth look at theprocess of implementing a miniKanren relation and observations on benchmarkingtexttt{defrel}s. This study aims to provide practical insights for miniKanrenprogrammers on both performance and implementation techniques.
本文探讨了在 miniKanren 中使用 miniKanren 数字及其算术套件实现关系式 $n equiv 0 (text{mod} 3)$ 的方案。我们研究了从直接实现到更优化版本的不同方法。讨论的实现方法包括暴力算术法、可分性技巧以及从有限自动机推导。我们的贡献包括深入探讨了迷你坎伦关系的实现过程,以及对基准文本的观察。本研究旨在为迷你坎仁函数编程人员提供性能和实现技术方面的实用见解。
{"title":"Six Ways to Implement Divisibility by Three in miniKanren","authors":"Brett Schreiber, Brysen Pfingsten, Jason Hemann","doi":"arxiv-2408.16259","DOIUrl":"https://doi.org/arxiv-2408.16259","url":null,"abstract":"This paper explores options for implementing the relation $n equiv 0 \u0000(text{mod} 3)$ within miniKanren using miniKanren numbers and its arithmetic\u0000suite. We examine different approaches starting from straightforward\u0000implementations to more optimized versions. The implementations discussed\u0000include brute-force arithmetic methods, divisibility tricks, and derivation\u0000from a finite automaton. Our contributions include an in-depth look at the\u0000process of implementing a miniKanren relation and observations on benchmarking\u0000texttt{defrel}s. This study aims to provide practical insights for miniKanren\u0000programmers on both performance and implementation techniques.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"1 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-08-29","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179553","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