Lune

PLDI2024Top-tier venue

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 Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Synthesis-powered optimization of smart contracts via data type refactoring cites Synthesis of Super-Optimized Smart Contracts Using Max-SMT
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on5

  1. Synthesis of Super-Optimized Smart Contracts Using Max-SMTElvira Albert, Pablo Gordillo, Albert Rubio, Maria Anna SchettCAV 2020 · 30 citations
  2. Exploring Missed Optimizations in WebAssembly OptimizersZhibo Liu, Dongwei Xiao, Zongjie Li, Shuai Wang et al.ISSTA 2023 · 24 citations
  3. Dataflow-based pruning for speeding up superoptimizationManasij Mukherjee, Pranav Kant, Zhengyang Liu, John RegehrOOPSLA 2020 · 21 citations
  4. A Scalable Two Stage Approach to Computing Optimal Decision SetsAlexey Ignatiev, Edward Lam, Peter J. Stuckey, João Marques-SilvaAAAI 2021 · 17 citations
  5. 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

  1. 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
  2. Finding and Understanding Missed Optimizations in WebAssembly Optimizer (Experience Paper)Ruiyang Xu, Zetao Fan, Shan Huang, Ting SuISSTA 2026
  3. Practical Verification of Smart Contracts using Memory SplittingShelly Grossman, John Toman, Alexander Bakst, Sameer Arora et al.OOPSLA 2024 · 7 citations
  4. Targeted greybox fuzzing with static lookahead analysisValentin Wüstholz, Maria ChristakisICSE 2020 · 14 citations
  5. StackSight: Unveiling WebAssembly through Large Language Models and Neurosymbolic Chain-of-Thought DecompilationWeike Fang, Zhejian Zhou, Junzhou He, Weihang WangICML 2024 · 5 citations
Dusk over the sea between two cliffs drawn in fine vertical lines