[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-497901-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-497901-en":131},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","superstack-superoptimization-of-stack-bytecode-via-greedy-constraint-based-and-sat-techniques","SuperStack: Superoptimization of Stack-Bytecode via Greedy, Constraint-Based, and SAT Techniques","","SuperStack introduces a scalable superoptimization method for stack-bytecode, targeting cases where equivalent optimal instruction sequences become intractable as solution length grows. Starting from a loop-free instruction sequence, it refines the optimal length bound using a greedy algorithm, reformulates the optimization as weighted soft clauses in MaxSAT, and adds domain-specific dominance and redundant constraints to shrink the search space. A tool implementation is evaluated on over 500,000 instruction sequences across WebAssembly and Ethereum bytecode, increasing optimization gains and cutting optimization time to at least one fourth versus prior superoptimizers.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/research-report/","Research & Report",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/superstack-superoptimization-of-stack-bytecode-via-greedy-constraint-based-and-sat-techniques/497901/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/superstack-superoptimization-of-stack-bytecode-via-greedy-constraint-based-and-sat-techniques/497901.png","ImageObject",300,407,{"name":42,"@type":43},"PakDamar76","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-23","2026-10-02",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",13,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What problem does SuperStack address in superoptimization?","Question",{"text":63,"@type":64},"SuperStack targets the scalability challenge: the optimality search becomes exponentially harder as the constructed solution length increases, making existing approaches impractical for larger instruction sequences.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"Which three components does SuperStack use to improve the search?",{"text":68,"@type":64},"It combines a greedy algorithm to tighten the bound on optimal solution length, a MaxSAT-based weighted soft-clauses representation, and domain-specific dominance and redundant constraints to reduce the search space.",{"name":70,"@type":61,"acceptedAnswer":71},"How is SuperStack evaluated and what are the results?",{"text":72,"@type":64},"Experimental evaluation on more than 500,000 instruction sequences shows the greedy + constraint-based + SAT combination increases optimization gains and reduces optimization time to at least one fourth compared with existing superoptimizers.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},497901,1791834557,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,106,111,115,120,123,127],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":102,"doc_module":4,"doc_module_name":25,"category_name":103,"show_sort_weight":104,"slug":105},6,"Technology",50,"technology",{"id":107,"doc_module":4,"doc_module_name":25,"category_name":108,"show_sort_weight":109,"slug":110},7,"Healthcare",40,"healthcare",{"id":112,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":113,"slug":114},8,30,"research-report",{"id":116,"doc_module":4,"doc_module_name":25,"category_name":117,"show_sort_weight":118,"slug":119},9,"Religion & Spirituality",20,"religion-spirituality",{"id":118,"doc_module":4,"doc_module_name":25,"category_name":121,"show_sort_weight":118,"slug":122},"World Cup","world-cup",{"id":124,"doc_module":4,"doc_module_name":25,"category_name":125,"show_sort_weight":124,"slug":126},10,"Lifestyle","lifestyle",{"id":128,"doc_module":4,"doc_module_name":25,"category_name":129,"show_sort_weight":97,"slug":130},19,"General","general",{"code":4,"msg":82,"data":132},{"doc_id":79,"user_id":133,"nickname":42,"user_avatar":134,"doc_module":4,"category_id":112,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":140,"language":141,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":142,"faqs":143,"seo_title":144,"seo_description":12,"update_tm":145,"read_time":146,"preview_page_count":33,"preview_urls":147},962090893057,"https://ap-avatar.wpscdn.com/davatar_155a257f0dc6eb9ab79c44ca47cae57d","SuperStack: Superoptimization of Stack-Bytecode via Greedy, Constraint-Based, and SAT Techniques  \nELVIRA ALBERT, Complutense University of Madrid, Spain  \nMARIA GARCIA DE LA BANDA, Monash University, Australia ALEJANDRO HERNÁNDEZ-CEREZO, Complutense University of Madrid, Spain ALEXEY IGNATIEV, Monash University, Australia  \nALBERT RUBIO, Complutense University of Madrid, Spain PETER J. STUCKEY, Monash University, Australia  \nGiven 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) anew 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 SuperStack, 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.  \nCCS Concepts: • Software and its engineering → Automatic programming; Compilers.  \nAdditional Key Words and Phrases: Superoptimization, Program Synthesis, SAT, EVM, WebAssembly  \nACM Reference Format:  \nElvira Albert, Maria Garcia de la Banda, Alejandro Hernández-Cerezo, Alexey Ignatiev, Albert Rubio, and Peter J. Stuckey. 2024. SuperStack: Superoptimization of Stack-Bytecode via Greedy, Constraint-Based, and SAT Techniques. Proc. ACM Program. Lang. 8, PLDI, Article 205 (June 2024), 26 pages. [https://doi.org/10.1145/3656435](https://doi.org/10.1145/3656435)  \n1 INTRODUCTION  \nProgram optimization is one of the pillars of software system development and a key component of green software. Superoptimization [42] is a powerful but expensive form of program optimization that can achieve results unattainable by pre-cooked transformations (such as peephole optimizations [43]) . It was originally defined as a compilation technique that searches for an optimal sequence of instructions semantically equivalent to a given loop-free sequence. It can hence be classified as a synthesis technique, where the original sequence acts as a specification of the semantics for the optimal code and the search is automated often using a constraint solver (e.g., an SMT [10]  \nAuthors’ addresses: Elvira Albert, Complutense University of Madrid, Madrid, Spain, elvira@sip.ucm.es; Maria Garcia dela Banda, Monash University, Melbourne, Australia, [maria.garciadelabanda@monash.edu](maria.garciadelabanda@monash.edu); Alejandro Hernández-Cerezo, Complutense University of Madrid, Madrid, Spain, [aleher06@ucm.es](aleher06@ucm.es); Alexey Ignatiev, Monash University, Melbourne,  \nAustralia, [alexey.ignatiev@monash.edu](alexey.ignatiev@monash.edu); Albert Rubio, Complutense University of Madrid, Madrid, Spain, [alberu04@ucm.es](alberu04@ucm.es);  \nPeter J. Stuckey, Monash University, Melbourne, Australia, [peter.stuckey@monash.edu](peter.stuckey@monash.edu).  \nPermission to make digital or hard copies of part or all ofthis work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for third-party components of this work must be honored. For all other uses, contact the owner/author(s) .  \n© 2024 Copyright held by the owner/author(s","cbCailGCn9FADQ50","https://ap.wps.com/l/cbCailGCn9FADQ50","pdf",720613,26,"English","# Introduction\n# Contributions","[{\"question\":\"What problem does SuperStack address in superoptimization?\",\"answer\":\"SuperStack targets the scalability challenge: the optimality search becomes exponentially harder as the constructed solution length increases, making existing approaches impractical for larger instruction sequences.\"},{\"question\":\"Which three components does SuperStack use to improve the search?\",\"answer\":\"It combines a greedy algorithm to tighten the bound on optimal solution length, a MaxSAT-based weighted soft-clauses representation, and domain-specific dominance and redundant constraints to reduce the search space.\"},{\"question\":\"How is SuperStack evaluated and what are the results?\",\"answer\":\"Experimental evaluation on more than 500,000 instruction sequences shows the greedy + constraint-based + SAT combination increases optimization gains and reduces optimization time to at least one fourth compared with existing superoptimizers.\"}]","SuperStack: Superoptimization of Stack-Bytecode via Greedy, Constraint-Based, and SAT Techniques | PDF",1790970982,66,[148,152,156,160],{"page_no":22,"url":149,"width":150,"height":151},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/2fd85ae1a9488766d2b846b8ecf1eba5.webp",983,1415,{"page_no":26,"url":153,"width":154,"height":155},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/66473ed45642e5b0b1df016f44a83f39.webp",982,1414,{"page_no":30,"url":157,"width":158,"height":159},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/06162b2e43797324bf37b376ff4a2e24.webp",981,1412,{"page_no":33,"url":161,"width":162,"height":163},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/1ab8cdb282b0c2d8bf0a8b60c0d1c0a6.webp",980,1411]