We gratefully acknowledge support from
the Simons Foundation and member institutions.

Programming Languages

New submissions

[ total of 6 entries: 1-6 ]
[ showing up to 1000 entries per page: fewer | more ]

New submissions for Wed, 24 Apr 24

[1]  arXiv:2404.15204 [pdf, other]
Title: Towards a high-performance AI compiler with upstream MLIR
Comments: 13 pages, 8 figures, presented at CGO C4ML 2024 & MLIR Workshop EuroLLVM 2024
Subjects: Programming Languages (cs.PL); Artificial Intelligence (cs.AI); Hardware Architecture (cs.AR); Distributed, Parallel, and Cluster Computing (cs.DC); Machine Learning (cs.LG)

This work proposes a compilation flow using open-source compiler passes to build a framework to achieve ninja performance from a generic linear algebra high-level abstraction. We demonstrate this flow with a proof-of-concept MLIR project that uses input IR in Linalg-on-Tensor from TensorFlow and PyTorch, performs cache-level optimizations and lowering to micro-kernels for efficient vectorization, achieving over 90% of the performance of ninja-written equivalent programs. The contributions of this work include: (1) Packing primitives on the tensor dialect and passes for cache-aware distribution of tensors (single and multi-core) and type-aware instructions (VNNI, BFDOT, BFMMLA), including propagation of shapes across the entire function; (2) A linear algebra pipeline, including tile, fuse and bufferization strategies to get model-level IR into hardware friendly tile calls; (3) A mechanism for micro-kernel lowering to an open source library that supports various CPUs.

Cross-lists for Wed, 24 Apr 24

[2]  arXiv:2404.14580 (cross-list from cs.CR) [pdf, other]
Title: Demystifying Invariant Effectiveness for Securing Smart Contracts
Subjects: Cryptography and Security (cs.CR); Programming Languages (cs.PL); Software Engineering (cs.SE)

Smart contract transactions associated with security attacks often exhibit distinct behavioral patterns compared with historical benign transactions before the attacking events. While many runtime monitoring and guarding mechanisms have been proposed to validate invariants and stop anomalous transactions on the fly, the empirical effectiveness of the invariants used remains largely unexplored. In this paper, we studied 23 prevalent invariants of 8 categories, which are either deployed in high-profile protocols or endorsed by leading auditing firms and security experts. Using these well-established invariants as templates, we developed a tool Trace2Inv which dynamically generates new invariants customized for a given contract based on its historical transaction data.
We evaluated Trace2Inv on 42 smart contracts that fell victim to 27 distinct exploits on the Ethereum blockchain. Our findings reveal that the most effective invariant guard alone can successfully block 18 of the 27 identified exploits with minimal gas overhead. Our analysis also shows that most of the invariants remain effective even when the experienced attackers attempt to bypass them. Additionally, we studied the possibility of combining multiple invariant guards, resulting in blocking up to 23 of the 27 benchmark exploits and achieving false positive rates as low as 0.32%. Trace2Inv outperforms current state-of-the-art works on smart contract invariant mining and transaction attack detection in terms of both practicality and accuracy. Though Trace2Inv is not primarily designed for transaction attack detection, it surprisingly found two previously unreported exploit transactions, earlier than any reported exploit transactions against the same victim contracts.

[3]  arXiv:2404.14662 (cross-list from cs.LG) [pdf, other]
Title: NExT: Teaching Large Language Models to Reason about Code Execution
Comments: 35 pages
Subjects: Machine Learning (cs.LG); Computation and Language (cs.CL); Programming Languages (cs.PL); Software Engineering (cs.SE)

A fundamental skill among human developers is the ability to understand and reason about program execution. As an example, a programmer can mentally simulate code execution in natural language to debug and repair code (aka. rubber duck debugging). However, large language models (LLMs) of code are typically trained on the surface textual form of programs, thus may lack a semantic understanding of how programs execute at run-time. To address this issue, we propose NExT, a method to teach LLMs to inspect the execution traces of programs (variable states of executed lines) and reason about their run-time behavior through chain-of-thought (CoT) rationales. Specifically, NExT uses self-training to bootstrap a synthetic training set of execution-aware rationales that lead to correct task solutions (e.g., fixed programs) without laborious manual annotation. Experiments on program repair tasks based on MBPP and HumanEval demonstrate that NExT improves the fix rate of a PaLM 2 model, by 26.1% and 14.3% absolute, respectively, with significantly improved rationale quality as verified by automated metrics and human raters. Our model can also generalize to scenarios where program traces are absent at test-time.

[4]  arXiv:2404.14921 (cross-list from cs.LO) [pdf, ps, other]
Title: More Church-Rosser Proofs in BELUGA
Authors: Alberto Momigliano (Dipartimento di Informatica, Università degli Studi di Milano, Italy), Martina Sassella (Dipartimento di Matematica, Università degli Studi di Milano, Italy)
Comments: In Proceedings LSFA/HCVS 2023, arXiv:2404.13672
Journal-ref: EPTCS 402, 2024, pp. 34-42
Subjects: Logic in Computer Science (cs.LO); Programming Languages (cs.PL)

We report on yet another formalization of the Church-Rosser property in lambda-calculi, carried out with the proof environment Beluga. After the well-known proofs of confluence for beta-reduction in the untyped settings, with and without Takahashi's complete developments method, we concentrate on eta-reduction and obtain the result for beta-eta modularly. We further extend the analysis to typed-calculi, in particular System F. Finally, we investigate the idea of pursuing the encoding directly in Beluga's meta-logic, as well as the use of Beluga's logic programming engine to search for counterexamples.

[5]  arXiv:2404.14924 (cross-list from cs.LO) [pdf, other]
Title: An Encoding for CLP Problems in SMT-LIB
Comments: In Proceedings LSFA/HCVS 2023, arXiv:2404.13672
Journal-ref: EPTCS 402, 2024, pp. 118-130
Subjects: Logic in Computer Science (cs.LO); Programming Languages (cs.PL)

The input language for today's CHC solvers are commonly the standard SMT-LIB format, borrowed from SMT solvers, and the Prolog format that stems from Constraint-Logic Programming (CLP). This paper presents a new front-end of the Eldarica CHC solver that allows inputs in the Prolog language. We give a formal translation of a subset of Prolog into the SMT-LIB commands. Our initial experiments show the effectiveness of the approach and the potential benefits to both the CHC solving and CLP communities.

Replacements for Wed, 24 Apr 24

[6]  arXiv:2401.16277 (replaced) [pdf, other]
Title: SECOMP: Formally Secure Compilation of Compartmentalized C Programs
Comments: Accepted at CCS'24 (artifact evaluation submission version)
Subjects: Programming Languages (cs.PL); Cryptography and Security (cs.CR)
[ total of 6 entries: 1-6 ]
[ showing up to 1000 entries per page: fewer | more ]

Disable MathJax (What is MathJax?)

Links to: arXiv, form interface, find, cs, recent, 2404, contact, help  (Access key information)