5,395 research outputs found
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
Towards the implementation of a preference-and uncertain-aware solver using answer set programming
Logic programs with possibilistic ordered disjunction (or LPPODs) are a recently defined logic-programming framework based on logic programs with ordered disjunction and possibilistic logic. The framework inherits the properties of such formalisms and merging them, it supports a reasoning which is nonmonotonic, preference-and uncertain-aware. The LPPODs syntax allows to specify 1) preferences in a qualitative way, and 2) necessity values about the certainty of program clauses. As a result at semantic level, preferences and necessity values can be used to specify an order among program solutions. This class of program therefore fits well in the representation of decision problems where a best option has to be chosen taking into account both preferences and necessity measures about information. In this paper we study the computation and the complexity of the LPPODs semantics and we describe the algorithm for its implementation following on Answer Set Programming approach. We describe some decision scenarios where the solver can be used to choose the best solutions by checking whether an outcome is possibilistically preferred over another considering preferences and uncertainty at the same time.Postprint (published version
Singular and Plural Functions for Functional Logic Programming
Functional logic programming (FLP) languages use non-terminating and
non-confluent constructor systems (CS's) as programs in order to define
non-strict non-determi-nistic functions. Two semantic alternatives have been
usually considered for parameter passing with this kind of functions: call-time
choice and run-time choice. While the former is the standard choice of modern
FLP languages, the latter lacks some properties---mainly
compositionality---that have prevented its use in practical FLP systems.
Traditionally it has been considered that call-time choice induces a singular
denotational semantics, while run-time choice induces a plural semantics. We
have discovered that this latter identification is wrong when pattern matching
is involved, and thus we propose two novel compositional plural semantics for
CS's that are different from run-time choice.
We study the basic properties of our plural semantics---compositionality,
polarity, monotonicity for substitutions, and a restricted form of the bubbling
property for constructor systems---and the relation between them and to
previous proposals, concluding that these semantics form a hierarchy in the
sense of set inclusion of the set of computed values. We have also identified a
class of programs characterized by a syntactic criterion for which the proposed
plural semantics behave the same, and a program transformation that can be used
to simulate one of them by term rewriting. At the practical level, we study how
to use the expressive capabilities of these semantics for improving the
declarative flavour of programs. We also propose a language which combines
call-time choice and our plural semantics, that we have implemented in Maude.
The resulting interpreter is employed to test several significant examples
showing the capabilities of the combined semantics.
To appear in Theory and Practice of Logic Programming (TPLP)Comment: 53 pages, 5 figure
- …