SuperStack: Superoptimization of Stack-Bytecode via Greedy, Constraint-Based, and SAT Techniques
Elvira Albert, Maria Garcia de la Banda, Alejandro Hernández-Cerezo, Alexey Ignatiev, Albert Rubio, Peter J. Stuckey
Abstract
Given a loop-free sequence of instructions, superoptimization techniques use a constraint solver to search for an equivalent sequence that is optimal for a desired objective. The complexity of the search grows exponentially with the length of the solution being constructed and the problem becomes intractable for large sequences of instructions. This paper presents a new approach to superoptimizing stack-bytecode via three novel components: (1) a greedy algorithm to refine the bound on the length of the optimal solution; (2) a new representation of the optimization problem as a set of weighted soft clauses in MaxSAT; (3) a series of domain-specific dominance and redundant constraints to reduce the search space for optimal solutions. We have developed a tool, named S uper S tack , which can be used to find optimal code translations of modern stack-based bytecode, namely WebAssembly or Ethereum bytecode. Experimental evaluation on more than 500,000 sequences shows the proposed greedy, constraint-based and SAT combination is able to greatly increase optimization gains achieved by existing superoptimizers and reduce to at least a fourth the optimization time.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 2c028daa-07e4-4b96-a6f7-496d365e0fbaBuilds on5
- Synthesis of Super-Optimized Smart Contracts Using Max-SMTElvira Albert, Pablo Gordillo, Albert Rubio, Maria Anna SchettCAV 2020 · 30 citations
- Exploring Missed Optimizations in WebAssembly OptimizersZhibo Liu, Dongwei Xiao, Zongjie Li, Shuai Wang et al.ISSTA 2023 · 24 citations
- Dataflow-based pruning for speeding up superoptimizationManasij Mukherjee, Pranav Kant, Zhengyang Liu, John RegehrOOPSLA 2020 · 21 citations
- A Scalable Two Stage Approach to Computing Optimal Decision SetsAlexey Ignatiev, Edward Lam, Peter J. Stuckey, João Marques-SilvaAAAI 2021 · 17 citations
- Synthesis-powered optimization of smart contracts via data type refactoringYanju Chen, Yuepeng Wang, Maruth Goyal, James Dong et al.OOPSLA 2022 · 14 citations
Related papers
- Vector instruction selection for digital signal processors using program synthesisMaaz Bin Safeer Ahmad, Alexander J. Root, Andrew Adams, Shoaib Kamil et al.ASPLOS 2022 · 13 citations
- Finding and Understanding Missed Optimizations in WebAssembly Optimizer (Experience Paper)Ruiyang Xu, Zetao Fan, Shan Huang, Ting SuISSTA 2026
- Practical Verification of Smart Contracts using Memory SplittingShelly Grossman, John Toman, Alexander Bakst, Sameer Arora et al.OOPSLA 2024 · 7 citations
- Targeted greybox fuzzing with static lookahead analysisValentin Wüstholz, Maria ChristakisICSE 2020 · 14 citations
- StackSight: Unveiling WebAssembly through Large Language Models and Neurosymbolic Chain-of-Thought DecompilationWeike Fang, Zhejian Zhou, Junzhou He, Weihang WangICML 2024 · 5 citations
