ASP Chef grows Mustache to look better DOI: XXX
MARIO ALVIANO University of Calabria, Italy, WOLFGANG FABER University of Klagenfurt, Austria, LUIS ANGEL RODRIGUEZ REINERS University of Calabria, Italy · 2025
Read ASP Chef grows Mustache to look better DOI: XXX by MARIO ALVIANO University of Calabria, Italy, WOLFGANG FABER University of Klagenfurt, Austria, LUIS ANGEL RODRIGUEZ REINERS University of Calabria, Italy (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2505-24537.txt.
Introduction
Mario Alviano, Wolfgang Faber, and Luis Rodriguez Reiners present a 2025 tool that turns logic program answers into rich web displays. Answer set programming, or ASP, solves hard problems by stating rules and letting a solver find the solutions. The earlier ASP Chef tool rendered those solutions with templates. The new extension adopts a logic-less template style borrowed from the Mustache system.
Templates can now call on chart, table, and graph libraries to draw solutions as interactive views. Template queries support formatting, sorting, and expansion in stages, which allows structured, layered output. The authors show the tool on three cases: data from an Italian research review, pictures of blocking sets in graphs, and scheduling problems. The work bridges declarative solving and modern visual analytics.
Catalog record
| CREATOR | MARIO ALVIANO University of Calabria, Italy, WOLFGANG FABER University of Klagenfurt, Austria, LUIS ANGEL RODRIGUEZ REINERS University of Calabria, Italy |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 35 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2505-24537
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
ASP Chef grows Mustache to look better DOI: XXX MARIO ALVIANO University of Calabria, Italy, WOLFGANG FABER University of Klagenfurt, Austria, LUIS ANGEL RODRIGUEZ REINERS University of Calabria, Italy Abstract We present ASP Chef Mustache, an extension of ASP Chef that enhances template-based rendering of ASP solutions using a logic-less templating system inspired by Mustache. Our approach integrates data visualization frameworks such as Tabulator, Chart.js, and vis.js, enabling interactive representations of ASP interpretations as tables, charts, and graphs. Mustache queries in templates support advanced constructs for formatting, sorting, and multi-stage expansion, facilitating the generation of rich, structured outputs. We demonstrate the power of this framework through a series of use cases, including data analysis for the Italian VQR, visualization of blocking sets in graphs, and scheduling problems. The result is a versatile tool for bridging declarative problem solving and modern web-based visual analytics. Under consideration for publication in Theory and Practice of Logic Programming (TPLP) t] \jdate March 2003 \pagerange ASP Chef grows Mustache to look better – References keywords Answer Set Programming, ASP Chef, Visualization, Systems Integration 1 Introduction Answer Set Programming (ASP) is a well-established declarative paradigm for solving complex combinatorial problems, offering a clean separation between problem modeling and computation [ 10 , 21 , 29 , 26 , 2 ] . While modern ASP solvers can efficiently compute answer sets, interpreting and presenting these solutions in practical applications often requires substantial custom post-processing that motivated the development of several tools for answer set visualization [ 17 , 27 , 28 , 9 , 25 , 7 ] . In the same spirit, ASP Chef [ 1 ] was introduced to streamline the construction of pipelines that combine ASP-based search and optimization tasks with other tools for filtering, aggregation, and visualization [ 5 ] . In previous developments, ASP Chef has demonstrated its flexibility in composing pipelines involving combinatorial search and optimization by integrating external tools through mappings , i.e., sets of procedures that convert ASP facts into representations suitable for systems implemented in other languages. This methodology enabled meaningful collaborations with tools such as MiniZinc [ 31 ] , for constraint modeling and solving, and Structured Declarative Language (SDL) [ 3 ] , for structured problem descriptions. These integrations [ 4 , 4 ] relied on defining specific interpretations of ASP facts to match the syntax and semantics required by each target system. However, as the expressiveness and complexity of the external language increased, so did the difficulty and cost of building and maintaining the corresponding mappings. Consequently, such efforts often focused on a limited subset of the features available in the target language, hindering full exploitation of the capabilities of the integrated tool. In this work, we introduce a different and more scalable approach to tool integration, grounded in the use of Mustache templates (a popular web templating system; \citeNP mittapalli2021survey). Rather than building logic-based rules to obtain ASP facts that are later interpreted to interact with third-party tools, users can now define output templates using the native format of the target tool, embedding variable placeholders that are filled directly using the answer sets. This shift in paradigm allows ASP developers to write plain templates in the language of the external tool, with minimal effort and no need for custom interpreters or adapters. As a result, the richness of the target system no longer translates into integration complexity. Instead, users are empowered to access the full feature set of the external tool by simply referring to its original documentation and writing the appropriate Mustache template. This template-based mechanism preserves the declarative spirit of ASP while promoting openness, modularity, and extensibility in the design of logic-based pipelines. Thanks to Mustache, we extend ASP Chef to support the embedding of interactive views using popular JavaScript libraries such as Tabulator (for dynamic tables), Chart.js (for customizable charts), and vis.js (for networks, timelines, and 3D visualizations). This enhancement empowers ASP developers to generate human-readable reports, dashboards, and exploratory interfaces with minimal additional effort, all within a declarative framework. The newly integrated libraries find application in several common and new use cases of ASP, including scheduling and data analysis. 2 Background Mustache Templating System. Mustache is a logic-less templating system designed for generating HTML, configuration files, and other structured documents. Its simplicity and flexibility make it a popular choice for developers who need to separate data from presentation while avoiding complex scripting within templates. At its core, Mustache templates use placeholders enclosed in {{ ... }} to insert dynamic content. In this work, we restrict placeholders to be variables that get assigned values during template rendering, or sections of the form {{# variable }} ... {{/ variable }} that enable loops and conditionals. Data are taken from a YAML or JSON file during template rendering. Example 1 Let us consider the following Mustache template: ⬇ The OS is {{ operating system }}. The list of users is the following : {{# users }} - {{ username }} ( id {{ userid }}) {{/ users }} Applying the above template to the JSON object ⬇ { " operating system ": " Linux ", " users ": [ { " userid ": 1000, " username ": " alice " }, { " userid ": 1001, " username ": " bob " } ] } renders the following text (which can be part of a Markdown document): ⬇ The OS is Linux . The list of users is the following : - alice ( id 1000) - bob ( id 1001) \blacksquare Answer Set Programming. A program is a set of rules defining conditions (conjunctive bodies) under which atoms must be derived (atomic heads) or guessed (choices). Programs are associated with zero or more answer sets, i.e., interpretations satisfying all rules and a stability condition [ 23 ] . Programs are extended with # show directives of the form ⬇ # show p(\overline{t}) : \mathit{conjunctive\_query} . where p is an optional predicate, \overline{t} is a possibly empty sequence of terms, and \mathit{conjunctive\_query} is a conjunction. Answer sets of the program are projected according to the # show directives. We refer the ASP-Core-2 format for details [ 14 ] . Example 2 The following program solves the K-Clique problem in ASP: ⬇ r_{1}: edge ( X , Y ) :- edge ( Y , X ). r_{2}: { in ( N ) : node ( N )} = K :- size ( K ). r_{3}: :- in ( X ), in ( Y ), X < Y , not edge ( X , Y ). r_{4}: # show ( Index +1, N ) : in ( N ), size ( K ), Index = # count { N ': in ( N '), N > N '}. Rule r_{1} defines edge as a symmetrically closed relation (as the graph is undirected). The choice rule r_{2} guesses K nodes (a K -clique candidate). The constraint r_{3} checks that all selected nodes are linked (a valid clique). Finally, the # show directive r_{4} projects the answer sets over the selected nodes, indexing them according to their natural ordering. Given size (3) , and the graph node ( a ) , node ( b ) , node