24 research outputs found
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
A Machine Learning guided Rewriting Approach for ASP Logic Programs
Answer Set Programming (ASP) is a declarative logic formalism that allows to
encode computational problems via logic programs. Despite the declarative
nature of the formalism, some advanced expertise is required, in general, for
designing an ASP encoding that can be efficiently evaluated by an actual ASP
system. A common way for trying to reduce the burden of manually tweaking an
ASP program consists in automatically rewriting the input encoding according to
suitable techniques, for producing alternative, yet semantically equivalent,
ASP programs. However, rewriting does not always grant benefits in terms of
performance; hence, proper means are needed for predicting their effects with
this respect. In this paper we describe an approach based on Machine Learning
(ML) to automatically decide whether to rewrite. In particular, given an ASP
program and a set of input facts, our approach chooses whether and how to
rewrite input rules based on a set of features measuring their structural
properties and domain information. To this end, a Multilayer Perceptrons model
has then been trained to guide the ASP grounder I-DLV on rewriting input rules.
We report and discuss the results of an experimental evaluation over a
prototypical implementation.Comment: In Proceedings ICLP 2020, arXiv:2009.0915
Optimized 3D path planner for steerable catheters with deductive reasoning
Keyhole neurosurgery is challenging, due to the complex anatomy of the brain and the inherent risk of damaging vital structures while reaching the surgical target. This paper presents a path planner for safe and effective neurosurgical interventions. The strengths of the proposed framework lay in the integration of multiple risk structures combined into a deductive method for fast and intuitive user interaction, and a modular architecture. The tool is intended to support neurosurgeons at quickly determining the most appropriate surgical trajectory through the brain matter with minimized risk; the user interface guides the user through the decision making process and helps save planning time of neurosurgical interventions. Risk structures and trajectories can be visualized in an intuitive way, thanks to a 3D brain surgery simulator developed with Unity. A qualitative evaluation with clinical experts shows the practical relevance, while a quantitative performance and functionality analysis proves the robustness and effectiveness of the system with respect to literature