[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-505060-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-505060-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","semi-declarative-language-for-combinatorial-search","Semi-declarative Language for Combinatorial Search","","Semi-declarative Language for Combinatorial Search presents SetLah!, a block-structured language designed to bridge the gap between Propositional Satisfiability (SAT) and Answer Set Programming (ASP). The work targets difficulties in SAT’s manual CNF modelling and ASP’s steep learning curve from stable-model semantics, limited constraint forms, and reduced modularity. SetLah! supports stratified rule blocks with first-order logic constraints, compiles into optimized ASP encodings, and delivers more concise, intuitive specifications with empirical performance improvements over SAT-based tools.",{"@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/semi-declarative-language-for-combinatorial-search/505060/",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/semi-declarative-language-for-combinatorial-search/505060.png","ImageObject",300,407,{"name":42,"@type":43},"Kurz","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-07","2026-10-04",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",16,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What problem does SetLah! aim to address in combinatorial search?","Question",{"text":63,"@type":64},"It reduces the modelling burden of translating high-level requirements into SAT encodings and improves modularity and usability compared with typical ASP modelling.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"How is a SetLah! program structured?",{"text":68,"@type":64},"A program is a sequence of stratified blocks, where each block contains rules defining the search space and arbitrary first-order logic constraints that prune it.",{"name":70,"@type":61,"acceptedAnswer":71},"How does SetLah! relate to ASP and SAT solvers?",{"text":72,"@type":64},"SetLah! programs are compiled into ASP, leveraging existing efficient ASP solvers, while the compilation process automatically optimises the generated encodings; the results can outperform SAT-based tools on common problems.","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},505060,1791288962,{"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},2336478945635,"https://ap-avatar.wpscdn.com/davatar_6f874abed73319feea01a86fa6f0fab8","Semi-declarative Language for Combinatorial Search  \nZIYI YANG, National University of Singapore, Singapore ILYA SERGEY, National University of Singapore, Singapore  \nCombinatorial search—finding solutions that meet constraints within an exponentially large space of candidates—underpins problems from hardware verification to scheduling and combinatorial design. The most successful approach in practice is Propositional Satisfiability (SAT) solving, but modelling a problem for a SAT solver requires manually translating high-level requirements into conjunctions of boolean clauses, a tedious step that sacrifices clarity and modularity. Answer Set Programming (ASP) offers a higher-level alternative, with a rule-based language whose variables and finite-domain reasoning yield more compact problem descriptions that can be automatically compiled into low-level solver input. Yet, ASP has its own shortcomings: its semantics, defined via a notion of stable models, is hard to build intuition for; it does not allow arbitrary first-order logic formulas as constraints; and its programs tend to be monolithic, making modular design and reuse difficult.  \nWe propose SetLah!, a semi-declarative language for combinatorial search that addresses the shortcomings of both SAT and ASP. A SetLah! program is a sequence of stratified blocks, each containing rules that define the search space and arbitrary first-order logic constraints that prune it. This block structure enables modular problem decomposition, allowing for an intuitive semantics: candidate solutions are generated and filtered block by block. We built a compiler from SetLah! programs into ASP, allowing us to take full advantage of the existing efficient ASP solvers, while also automatically optimising the generated encodings. Our empirical evaluation demonstrates that SetLah! offers substantially more concise and intuitive specifications for common combinatorial search problems, and its compiled ASP encodings can significantly outperform SAT-based tools.  \nCCS Concepts: • Theory of computation → Constraint and logic programming; • Computing methodologies → Logic programming and answer set programming.  \nAdditional Key Words and Phrases: Answer set programming, first-order logic, constraint solving  \nACM Reference Format:  \nZiyi Yang and Ilya Sergey. 2026. Semi-declarative Language for Combinatorial Search. Proc. ACM Program. Lang. 10, OOPSLA2, Article 399 (October 2026), 29 pages. [https://doi.org/10.1145/3839531](https://doi.org/10.1145/3839531)  \n1 Introduction  \nCombinatorial search—finding constrained solutions over large, discrete search spaces—is hard. It is hard in principle: unless P = NP, there is no polynomial-time algorithm that can solve all instances of NP-complete problems, the class to which most combinatorial problems belong. It is also hard in practice: while small problem instances might be amenable to brute-force enumeration (e.g., the classical eight-queens problem), real-world instances such as hardware verification or large-scale scheduling are far beyond the reach of naïve search.  \nGuess-and-check is a dominant approach used to solve instances of NP-hard problems in practice, and Propositional Satisfiability (SAT) [13] is its most prominent incarnation: a problem instance is encoded as a set of boolean variables and constraints over them, and the solver searches fora satisfying truth assignment, i.e., a mapping of all variables to true or false that meets every constraint. Thanks to highly efficient SAT solvers equipped with Conflict-Driven Clause Learning  \nAuthors’ Contact Information: Ziyi Yang, National University of Singapore, Singapore, Singapore, [yangziyi@u.nus.edu](yangziyi@u.nus.edu); Ilya Sergey, National University of Singapore, Singapore, Singapore, [ilya@nus.edu.sg](ilya@nus.edu.sg).  \nThis work is licensed under a Creative Commons Attribution 4 .0 International License.  \n© 2026 Copyright held by the owner/author(s) .  \nACM 2475-1421/2026/10-ART399  \n[","cbCaic24MYDMvMhe","https://ap.wps.com/l/cbCaic24MYDMvMhe","pdf",1064490,29,"English","# Introduction\n## Challenge of combinatorial search\n## Guess-and-check and SAT solving\n## ASP as a higher-level alternative\n## Barriers in ASP semantics","[{\"question\":\"What problem does SetLah! aim to address in combinatorial search?\",\"answer\":\"It reduces the modelling burden of translating high-level requirements into SAT encodings and improves modularity and usability compared with typical ASP modelling.\"},{\"question\":\"How is a SetLah! program structured?\",\"answer\":\"A program is a sequence of stratified blocks, where each block contains rules defining the search space and arbitrary first-order logic constraints that prune it.\"},{\"question\":\"How does SetLah! relate to ASP and SAT solvers?\",\"answer\":\"SetLah! programs are compiled into ASP, leveraging existing efficient ASP solvers, while the compilation process automatically optimises the generated encodings; the results can outperform SAT-based tools on common problems.\"}]","Semi-declarative Language for Combinatorial Search | PDF",1791087813,73,[148,152,156,160],{"page_no":22,"url":149,"width":150,"height":151},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/0c6928eb72d1047758831b45f5dd3aa3.webp",983,1415,{"page_no":26,"url":153,"width":154,"height":155},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/294ef6073ddddabe89c2bc64c840aa47.webp",982,1414,{"page_no":30,"url":157,"width":158,"height":159},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/4a0b8c19ba62c78f952fc07c1d4c1461.webp",981,1412,{"page_no":33,"url":161,"width":162,"height":163},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/25908747e7233df8e538a2fe2e2ecf50.webp",980,1411]