Rethinking Answer Set Programming Templates
In imperative programming, the Domain-Driven Design methodology helps in coping with the complexity of software development by materializing in code the invariants of a domain of interest. Code is cleaner and more secure because any implicit assumption is removed in favor of invariants, thus enabling a fail fast mindset and the immediate reporting of unexpected conditions. This article introduces a notion of template for Answer Set Programming that, in addition to the don’t repeat yourself principle, enforces locality of some predicates by means of a simple naming convention. Local predicates are mapped to the usual global namespace adopted by mainstream engines, using universally unique identifiers to avoid name clashes. This way, local predicates can be used to enforce invariants on the expected outcome of a template in a possibly empty context of application, independently by other rules that can be added to such a context. Template applications transpiled this way can be processed by mainstream engines and safely shared with other knowledge designers, even when they have zero knowledge of templates.
Mon 15 JanDisplayed time zone: London change
14:00 - 15:30 | |||
14:00 30mTalk | Marketplace Logistic via Answer Set Programming PADL Mario Alviano University of Calabria, Danilo Amendola Oliveru - Smartly Engineering, Luis Angel Rodriguez Reiners University of Calabria | ||
14:30 30mTalk | Rethinking Answer Set Programming Templates PADL Mario Alviano University of Calabria, Giovambattista Ianni University of Calabria, Italy, Francesco Pacenza Department of Mathematics and Computer Science, University of Calabria, Jessica Zangari Università della Calabria | ||
15:00 30mTalk | A direct ASP encoding for Declare PADL Francesco Chiariello University of Naples Federico II, Valeria Fionda University of Calabria, Antonio Ielo University of Calabria, Francesco Ricca University of Calabria, Italy |