首页 > 最新文献

arXiv - CS - Programming Languages最新文献

英文 中文
BinSub: The Simple Essence of Polymorphic Type Inference for Machine Code BinSub:机器码多态类型推断的简单精髓
Pub Date : 2024-09-03 DOI: arxiv-2409.01841
Ian Smith
Recovering high-level type information in binaries is a key task in reverseengineering and binary analysis. Binaries contain very little explicit typeinformation. The structure of binary code is incredibly flexible allowing forad-hoc subtyping and polymorphism. Prior work has shown that precise typeinference on binary code requires expressive subtyping and polymorphism. Implementations of these type system features in a binary type inferencealgorithm have thus-far been too inefficient to achieve widespread adoption.Recent advances in traditional type inference have achieved simple andefficient principal type inference in an ML like language with subtyping andpolymorphism through the framework of algebraic subtyping. BinSub, a new binarytype inference algorithm, recognizes the connection between algebraic subtypingand the type system features required to analyze binaries effectively. Usingthis connection, BinSub achieves simple, precise, and efficient binary typeinference. We show that BinSub maintains a similar precision to prior work,while achieving a 63x improvement in average runtime for 1568 functions. Wealso present a formalization of BinSub and show that BinSub's type systemmaintains the expressiveness of prior work.
恢复二进制文件中的高级类型信息是逆向工程和二进制分析中的一项关键任务。二进制文件几乎不包含显式类型信息。二进制代码的结构非常灵活,允许临时的子类型和多态性。先前的工作表明,要对二进制代码进行精确的类型推断,就需要具有表现力的子类型和多态性。传统类型推断的最新进展是通过代数子类型框架,在具有子类型和多态性的类似 ML 语言中实现了简单高效的主类型推断。BinSub 是一种新的二进制类型推断算法,它认识到代数子类型和有效分析二进制所需的类型系统特征之间的联系。利用这种联系,BinSub 实现了简单、精确和高效的二进制类型推断。我们的研究表明,BinSub 与之前的工作保持了类似的精度,同时在 1568 个函数的平均运行时间上提高了 63 倍。我们还介绍了 BinSub 的形式化,并证明 BinSub 的类型系统保持了之前工作的表现力。
{"title":"BinSub: The Simple Essence of Polymorphic Type Inference for Machine Code","authors":"Ian Smith","doi":"arxiv-2409.01841","DOIUrl":"https://doi.org/arxiv-2409.01841","url":null,"abstract":"Recovering high-level type information in binaries is a key task in reverse\u0000engineering and binary analysis. Binaries contain very little explicit type\u0000information. The structure of binary code is incredibly flexible allowing for\u0000ad-hoc subtyping and polymorphism. Prior work has shown that precise type\u0000inference on binary code requires expressive subtyping and polymorphism. Implementations of these type system features in a binary type inference\u0000algorithm have thus-far been too inefficient to achieve widespread adoption.\u0000Recent advances in traditional type inference have achieved simple and\u0000efficient principal type inference in an ML like language with subtyping and\u0000polymorphism through the framework of algebraic subtyping. BinSub, a new binary\u0000type inference algorithm, recognizes the connection between algebraic subtyping\u0000and the type system features required to analyze binaries effectively. Using\u0000this connection, BinSub achieves simple, precise, and efficient binary type\u0000inference. We show that BinSub maintains a similar precision to prior work,\u0000while achieving a 63x improvement in average runtime for 1568 functions. We\u0000also present a formalization of BinSub and show that BinSub's type system\u0000maintains the expressiveness of prior work.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0,"publicationDate":"2024-09-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179542","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
An Array Intermediate Language for Mixed Cryptography 混合密码学阵列中间语言
Pub Date : 2024-09-03 DOI: arxiv-2409.01587
Vivian Ding, Coşku Acay, Andrew C. Myers
We introduce AIRduct, a new array-based intermediate representation designedto support generating efficient code for interactive programs employingmultiple cryptographic mechanisms. AIRduct is intended as an IR for the Viaductcompiler, which can synthesize secure, distributed programs with an extensiblesuite of cryptography. Therefore, AIRduct supports an extensible variety ofcryptographic mechanisms, including MPC and ZKP.
我们介绍了 AIRduct,这是一种新的基于数组的中间表示法,旨在支持为采用多种加密机制的交互式程序生成高效代码。AIRduct 是 Viaductcompiler 的中间表示,它可以综合安全的分布式程序和扩展的密码学套件。因此,AIRduct 支持多种可扩展的加密机制,包括 MPC 和 ZKP。
{"title":"An Array Intermediate Language for Mixed Cryptography","authors":"Vivian Ding, Coşku Acay, Andrew C. Myers","doi":"arxiv-2409.01587","DOIUrl":"https://doi.org/arxiv-2409.01587","url":null,"abstract":"We introduce AIRduct, a new array-based intermediate representation designed\u0000to support generating efficient code for interactive programs employing\u0000multiple cryptographic mechanisms. AIRduct is intended as an IR for the Viaduct\u0000compiler, which can synthesize secure, distributed programs with an extensible\u0000suite of cryptography. Therefore, AIRduct supports an extensible variety of\u0000cryptographic mechanisms, including MPC and ZKP.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0,"publicationDate":"2024-09-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179545","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
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":null,"pages":null},"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":null,"pages":null},"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":null,"pages":null},"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":null,"pages":null},"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":null,"pages":null},"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":null,"pages":null},"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":null,"pages":null},"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":null,"pages":null},"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
期刊
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