arXiv - CS - Programming Languages最新文献

筛选
英文 中文
Repr Types: One Abstraction to Rule Them All Repr 类型:一个抽象概念统领一切
arXiv - CS - Programming Languages Pub Date : 2024-09-12 DOI: arxiv-2409.07950
Viktor Palmkvist, Anders Ågren Thuné, Elias Castegren, David Broman
{"title":"Repr Types: One Abstraction to Rule Them All","authors":"Viktor Palmkvist, Anders Ågren Thuné, Elias Castegren, David Broman","doi":"arxiv-2409.07950","DOIUrl":"https://doi.org/arxiv-2409.07950","url":null,"abstract":"The choice of how to represent an abstract type can have a major impact on\u0000the performance of a program, yet mainstream compilers cannot perform\u0000optimizations at such a high level. When dealing with optimizations of data\u0000type representations, an important feature is having extensible\u0000representation-flexible data types; the ability for a programmer to add new\u0000abstract types and operations, as well as concrete implementations of these,\u0000without modifying the compiler or a previously defined library. Many research\u0000projects support high-level optimizations through static analysis,\u0000instrumentation, or benchmarking, but they are all restricted in at least one\u0000aspect of extensibility. This paper presents a new approach to representation-flexible data types\u0000without such restrictions and which still finds efficient optimizations. Our\u0000approach centers around a single built-in type $texttt{repr}$ and function\u0000overloading with cost annotations for operation implementations. We evaluate\u0000our approach (i) by defining a universal collection type as a library, a single\u0000type for all conventional collections, and (ii) by designing and implementing a\u0000representation-flexible graph library. Programs using $texttt{repr}$ types are\u0000typically faster than programs with idiomatic representation choices --\u0000sometimes dramatically so -- as long as the compiler finds good implementations\u0000for all operations. Our compiler performs the analysis efficiently by finding\u0000optimized solutions quickly and by reusing previous results to avoid\u0000recomputations.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0,"publicationDate":"2024-09-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179503","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
$μλεδ$-Calculus: A Self Optimizing Language that Seems to Exhibit Paradoxical Transfinite Cognitive Capabilities μλεδ$-微积分:一种似乎具有自相矛盾的无限认知能力的自我优化语言
arXiv - CS - Programming Languages Pub Date : 2024-09-09 DOI: arxiv-2409.05351
Ronie Salgado
{"title":"$μλεδ$-Calculus: A Self Optimizing Language that Seems to Exhibit Paradoxical Transfinite Cognitive Capabilities","authors":"Ronie Salgado","doi":"arxiv-2409.05351","DOIUrl":"https://doi.org/arxiv-2409.05351","url":null,"abstract":"Formal mathematics and computer science proofs are formalized using\u0000Hilbert-Russell-style logical systems which are designed to not admit paradoxes\u0000and self-refencing reasoning. These logical systems are natural way to describe\u0000and reason syntactic about tree-like data structures. We found that\u0000Wittgenstein-style logic is an alternate system whose propositional elements\u0000are directed graphs (points and arrows) capable of performing paraconsistent\u0000self-referencing reasoning without exploding. Imperative programming language\u0000are typically compiled and optimized with SSA-based graphs whose most general\u0000representation is the Sea of Node. By restricting the Sea of Nodes to only the\u0000data dependencies nodes, we attempted to stablish syntactic-semantic\u0000correspondences with the Lambda-calculus optimization. Surprisingly, when we\u0000tested our optimizer of the lambda calculus we performed a natural extension\u0000onto the $mulambda$ which is always terminating. This always terminating\u0000algorithm is an actual paradox whose resulting graphs are geometrical fractals,\u0000which seem to be isomorphic to original source program. These fractal\u0000structures looks like a perfect compressor of a program, which seem to resemble\u0000an actual physical black-hole with a naked singularity. In addition to these\u0000surprising results, we propose two additional extensions to the calculus to\u0000model the cognitive process of self-aware beings: 1) $epsilon$-expressions to\u0000model syntactic to semantic expansion as a general model of macros; 2)\u0000$delta$-functional expressions as a minimal model of input and output. We\u0000provide detailed step-by-step construction of our language interpreter,\u0000compiler and optimizer.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0,"publicationDate":"2024-09-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179504","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
Conversational Concurrency 会话并发
arXiv - CS - Programming Languages Pub Date : 2024-09-06 DOI: arxiv-2409.04055
Tony Garnock-Jones
{"title":"Conversational Concurrency","authors":"Tony Garnock-Jones","doi":"arxiv-2409.04055","DOIUrl":"https://doi.org/arxiv-2409.04055","url":null,"abstract":"Concurrent computations resemble conversations. In a conversation,\u0000participants direct utterances at others and, as the conversation evolves,\u0000exploit the known common context to advance the conversation. Similarly,\u0000collaborating software components share knowledge with each other in order to\u0000make progress as a group towards a common goal. This dissertation studies concurrency from the perspective of cooperative\u0000knowledge-sharing, taking the conversational exchange of knowledge as a central\u0000concern in the design of concurrent programming languages. In doing so, it\u0000makes five contributions: 1. It develops the idea of a common dataspace as a\u0000medium for knowledge exchange among concurrent components, enabling a new\u0000approach to concurrent programming. While dataspaces loosely resemble both\u0000\"fact spaces\" from the world of Linda-style languages and Erlang's\u0000collaborative model, they significantly differ in many details. 2. It offers\u0000the first crisp formulation of cooperative, conversational knowledge-exchange\u0000as a mathematical model. 3. It describes two faithful implementations of the\u0000model for two quite different languages. 4. It proposes a completely novel\u0000suite of linguistic constructs for organizing the internal structure of\u0000individual actors in a conversational setting. The combination of dataspaces\u0000with these constructs is dubbed Syndicate. 5. It presents and analyzes evidence\u0000suggesting that the proposed techniques and constructs combine to simplify\u0000concurrent programming. The dataspace concept stands alone in its focus on representation and\u0000manipulation of conversational frames and conversational state and in its\u0000integral use of explicit epistemic knowledge. The design is particularly suited\u0000to integration of general-purpose I/O with otherwise-functional languages, but\u0000also applies to actor-like settings more generally.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0,"publicationDate":"2024-09-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179507","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
Expressing and Analyzing Quantum Algorithms with Qualtran 用 Qualtran 表达和分析量子算法
arXiv - CS - Programming Languages Pub Date : 2024-09-06 DOI: arxiv-2409.04643
Matthew P. Harrigan, Tanuj Khattar, Charles Yuan, Anurudh Peduri, Noureldin Yosri, Fionn D. Malone, Ryan Babbush, Nicholas C. Rubin
{"title":"Expressing and Analyzing Quantum Algorithms with Qualtran","authors":"Matthew P. Harrigan, Tanuj Khattar, Charles Yuan, Anurudh Peduri, Noureldin Yosri, Fionn D. Malone, Ryan Babbush, Nicholas C. Rubin","doi":"arxiv-2409.04643","DOIUrl":"https://doi.org/arxiv-2409.04643","url":null,"abstract":"Quantum computing's transition from theory to reality has spurred the need\u0000for novel software tools to manage the increasing complexity, sophistication,\u0000toil, and fallibility of quantum algorithm development. We present Qualtran, an\u0000open-source library for representing and analyzing quantum algorithms. Using\u0000appropriate abstractions and data structures, we can simulate and test\u0000algorithms, automatically generate information-rich diagrams, and tabulate\u0000resource requirements. Qualtran offers a standard library of algorithmic\u0000building blocks that are essential for modern cost-minimizing compilations. Its\u0000capabilities are showcased through the re-analysis of key algorithms in\u0000Hamiltonian simulation, chemistry, and cryptography. Architecture-independent\u0000resource counts output by Qualtran can be forwarded to our implementation of\u0000cost models to estimate physical costs like wall-clock time and number of\u0000physical qubits assuming a surface-code architecture. Qualtran provides a\u0000foundation for explicit constructions and reproducible analysis, fostering\u0000greater collaboration within the growing quantum algorithm development\u0000community.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0,"publicationDate":"2024-09-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179505","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 Brief Overview of the Pawns Programming Language 卒子编程语言简介
arXiv - CS - Programming Languages Pub Date : 2024-09-05 DOI: arxiv-2409.03152
Lee Naish
{"title":"A Brief Overview of the Pawns Programming Language","authors":"Lee Naish","doi":"arxiv-2409.03152","DOIUrl":"https://doi.org/arxiv-2409.03152","url":null,"abstract":"Pawns is a programming language under development which supports pure\u0000functional programming (including algebraic data types, higher order\u0000programming and parametric polymorphism) and imperative programming (including\u0000pointers, destructive update of shared data structures and global variables),\u0000integrated so each can call the other and with purity checked by the compiler.\u0000For pure functional code the programmer need not understand the representation\u0000of the data structures. For imperative code the representation must be\u0000understood and all effects and dependencies must be documented in the code. For\u0000example, if a function may update one of its arguments, this must be declared\u0000in the function type signature and noted where the function is called. A single\u0000update operation may affect several variables due to sharing of representations\u0000(pointer aliasing). Pawns code requires all affected variables to be annotated\u0000wherever they may be updated and information about sharing to be declared.\u0000Annotations are also required where IO or other global variables are used and\u0000this must be declared in type signatures as well. Sharing analysis, performed\u0000by the compiler, is the key to many aspects of Pawns. It enables us to check\u0000that all effects are made obvious in the source code, effects can be\u0000encapsulated inside a pure interface and effects can be used safely in the\u0000presence of polymorphism.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0,"publicationDate":"2024-09-05","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179509","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
Dynamic String Generation and C++-style Output in Fortran 在 Fortran 中动态生成字符串和 C++ 风格输出
arXiv - CS - Programming Languages Pub Date : 2024-09-05 DOI: arxiv-2409.03397
Marcus Mohr
{"title":"Dynamic String Generation and C++-style Output in Fortran","authors":"Marcus Mohr","doi":"arxiv-2409.03397","DOIUrl":"https://doi.org/arxiv-2409.03397","url":null,"abstract":"Using standard components of modern Fortran we present a technique to\u0000dynamically generate strings with as little coding overhead as possible on the\u0000application side. Additionally we demonstrate how this can be extended to allow\u0000for output generation with a C++ stream-like look and feel.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0,"publicationDate":"2024-09-05","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179508","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
The MLIR Transform Dialect. Your compiler is more powerful than you think MLIR 转换方言。你的编译器比你想象的更强大
arXiv - CS - Programming Languages Pub Date : 2024-09-05 DOI: arxiv-2409.03864
Martin Lücke, Oleksandr Zinenko, William S. Moses, Michel Steuwer, Albert Cohen
{"title":"The MLIR Transform Dialect. Your compiler is more powerful than you think","authors":"Martin Lücke, Oleksandr Zinenko, William S. Moses, Michel Steuwer, Albert Cohen","doi":"arxiv-2409.03864","DOIUrl":"https://doi.org/arxiv-2409.03864","url":null,"abstract":"To take full advantage of a specific hardware target, performance engineers\u0000need to gain control on compilers in order to leverage their domain knowledge\u0000about the program and hardware. Yet, modern compilers are poorly controlled,\u0000usually by configuring a sequence of coarse-grained monolithic black-box\u0000passes, or by means of predefined compiler annotations/pragmas. These can be\u0000effective, but often do not let users precisely optimize their varying compute\u0000loads. As a consequence, performance engineers have to resort to implementing\u0000custom passes for a specific optimization heuristic, requiring compiler\u0000engineering expert knowledge. In this paper, we present a technique that provides fine-grained control of\u0000general-purpose compilers by introducing the Transform dialect, a controllable\u0000IR-based transformation system implemented in MLIR. The Transform dialect\u0000empowers performance engineers to optimize their various compute loads by\u0000composing and reusing existing - but currently hidden - compiler features\u0000without the need to implement new passes or even rebuilding the compiler. We demonstrate in five case studies that the Transform dialect enables\u0000precise, safe composition of compiler transformations and allows for\u0000straightforward integration with state-of-the-art search methods.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0,"publicationDate":"2024-09-05","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179506","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
Register Aggregation for Hardware Decompilation 用于硬件解码的寄存器聚合
arXiv - CS - Programming Languages Pub Date : 2024-09-04 DOI: arxiv-2409.03119
Varun Rao, Zachary D. Sisco
{"title":"Register Aggregation for Hardware Decompilation","authors":"Varun Rao, Zachary D. Sisco","doi":"arxiv-2409.03119","DOIUrl":"https://doi.org/arxiv-2409.03119","url":null,"abstract":"Hardware decompilation reverses logic synthesis, converting a gate-level\u0000digital electronic design, or netlist, back up to hardware description language\u0000(HDL) code. Existing techniques decompile data-oriented features in netlists,\u0000like loops and modules, but struggle with sequential logic. In particular, they\u0000cannot decompile memory elements, which pose difficulty due to their\u0000deconstruction into individual bits and the feedback loops they form in the\u0000netlist. Recovering multi-bit registers and memory blocks from netlists would\u0000expand the applications of hardware decompilation, notably towards retargeting\u0000technologies (e.g. FPGAs to ASICs) and decompiling processor memories. We\u0000devise a method for register aggregation, to identify relationships between the\u0000data flip-flops in a netlist and group them into registers and memory blocks,\u0000resulting in HDL code that instantiates these memory elements. We aggregate\u0000flip-flops by identifying common enable pins, and derive the bit-order of the\u0000resulting registers using functional dependencies. This scales similarly to\u0000memory blocks, where we repeat the algorithm in the second dimension with\u0000special attention to the read, write, and address ports of each memory block.\u0000We evaluate our technique over a dataset of 13 gate-level netlists, comprising\u0000circuits from binary multipliers to CPUs, and we compare the quantity and\u0000widths of recovered registers and memory blocks with the original source code.\u0000The technique successfully recovers memory elements in all of the tested\u0000circuits, even aggregating beyond the source code expectation. In 10 / 13\u0000circuits, all source code memory elements are accounted for, and we are able to\u0000compact up to 2048 disjoint bits into a single memory block.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0,"publicationDate":"2024-09-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179510","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
CoolerSpace: A Language for Physically Correct and Computationally Efficient Color Programming CoolerSpace:一种物理上正确、计算上高效的色彩编程语言
arXiv - CS - Programming Languages Pub Date : 2024-09-04 DOI: arxiv-2409.02771
Ethan Chen, Jiwon Chang, Yuhao Zhu
{"title":"CoolerSpace: A Language for Physically Correct and Computationally Efficient Color Programming","authors":"Ethan Chen, Jiwon Chang, Yuhao Zhu","doi":"arxiv-2409.02771","DOIUrl":"https://doi.org/arxiv-2409.02771","url":null,"abstract":"Color programmers manipulate lights, materials, and the resulting colors from\u0000light-material interactions. Existing libraries for color programming provide\u0000only a thin layer of abstraction around matrix operations. Color programs are,\u0000thus, vulnerable to bugs arising from mathematically permissible but physically\u0000meaningless matrix computations. Correct implementations are difficult to write\u0000and optimize. We introduce CoolerSpace to facilitate physically correct and\u0000computationally efficient color programming. CoolerSpace raises the level of\u0000abstraction of color programming by allowing programmers to focus on describing\u0000the logic of color physics. Correctness and efficiency are handled by\u0000CoolerSpace. The type system in CoolerSpace assigns physical meaning and\u0000dimensions to user-defined objects. The typing rules permit only legal\u0000computations informed by color physics and perception. Along with type\u0000checking, CoolerSpace also generates performance-optimized programs using\u0000equality saturation. CoolerSpace is implemented as a Python library and\u0000compiles to ONNX, a common intermediate representation for tensor computations.\u0000CoolerSpace not only prevents common errors in color programming, but also does\u0000so without run-time overhead: even unoptimized CoolerSpace programs out-perform\u0000existing Python-based color programming systems by up to 5.7 times; our\u0000optimizations provide up to an additional 1.4 times speed-up.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0,"publicationDate":"2024-09-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142223611","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
Sharing Analysis in the Pawns Compiler 卒子编译器中的分析共享
arXiv - CS - Programming Languages Pub Date : 2024-09-04 DOI: arxiv-2409.02398
Lee Naish
{"title":"Sharing Analysis in the Pawns Compiler","authors":"Lee Naish","doi":"arxiv-2409.02398","DOIUrl":"https://doi.org/arxiv-2409.02398","url":null,"abstract":"Pawns is a programming language under development that supports algebraic\u0000data types, polymorphism, higher order functions and \"pure\" declarative\u0000programming. It also supports impure imperative features including destructive\u0000update of shared data structures via pointers, allowing significantly increased\u0000efficiency for some operations. A novelty of Pawns is that all impure \"effects\"\u0000must be made obvious in the source code and they can be safely encapsulated in\u0000pure functions in a way that is checked by the compiler. Execution of a pure\u0000function can perform destructive updates on data structures that are local to\u0000or eventually returned from the function without risking modification of the\u0000data structures passed to the function. This paper describes the sharing\u0000analysis which allows impurity to be encapsulated. Aspects of the analysis are\u0000similar to other published work, but in addition it handles explicit pointers\u0000and destructive update, higher order functions including closures and pre- and\u0000post-conditions concerning sharing for functions.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0,"publicationDate":"2024-09-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142179511","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
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
相关产品
×
本文献相关产品
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信