Article
To read the full-text of this research, you can request a copy directly from the authors.

Abstract

We briefly describe the answer set programming system DLV, focusing on some of its peculiar features and mentioning a number of successful applications.

No full-text available

Request Full-text Paper PDF

To read the full-text of this research,
you can request a copy directly from the authors.

... The Answer Set Programming (ASP) language has become very popular in the last years thanks to the availability of more and more efficient solvers (e.g., Clingo [8] and DLV [1]). It is based on the stable model semantics from Gelfond and Lifschitz [9], introduced to resemble the human reasoning process; together with its simple syntax, this makes ASP a very intuitive language to be used. ...
... Then, C is an admissible coloring of Γ iff there exists a coloring sequence C 0 ,C 1 , . . . ,C n such that: (1) ...
Preprint
Full-text available
Answer Set Programming (ASP) is a famous logic language for knowledge representation, which has been really successful in the last years, as witnessed by the great interest into the development of efficient solvers for ASP. Yet, the great request of resources for certain types of problems, as the planning ones, still constitutes a big limitation for problem solving. Particularly, in the case the program is grounded before the resolving phase, an exponential blow up of the grounding can generate a huge ground file, infeasible for single machines with limited resources, thus preventing even the discovering of a single non-optimal solution. To address this problem, in this paper we present a distributed approach to ASP solving, exploiting distributed computation benefits in order to overcome the just explained limitations. The here presented tool, which is called Distributed Answer Set Coloring (DASC), is a pure solver based on the well-known Graph Coloring algorithm. DASC is part of a bigger project aiming to bring logic programming into a distributed system, started in 2017 by Federico Igne with mASPreduce and continued in 2018 by Pietro Totis with a distributed grounder. In this paper we present a low level implementation of the Graph Coloring algorithm, via the Boost and MPI libraries for C++. Finally, we provide a few results of the very first working version of our tool, at the moment without any strong optimization or heuristic.
... The Answer Set Programming (ASP) language has become very popular in the last years thanks to the availability of more and more efficient solvers (e.g., Clingo [8] and DLV [1]). It is based on the stable model semantics from Gelfond and Lifschitz [9], introduced to resemble the human reasoning process; together with its simple syntax, this makes ASP a very intuitive language to be used. ...
... Then, C is an admissible coloring of Γ iff there exists a coloring sequence C 0 ,C 1 , . . . ,C n such that: (1) ...
Article
Full-text available
Answer Set Programming (ASP) is a famous logic language for knowledge representation, which has been really successful in the last years, as witnessed by the great interest into the development of efficient solvers for ASP. Yet, the great request of resources for certain types of problems, as the planning ones, still constitutes a big limitation for problem solving. Particularly, in the case the program is grounded before the resolving phase, an exponential blow up of the grounding can generate a huge ground file, infeasible for single machines with limited resources, thus preventing even the discovering of a single non-optimal solution. To address this problem, in this paper we present a distributed approach to ASP solving, exploiting distributed computation benefits in order to overcome the just explained limitations. The here presented tool, which is called Distributed Answer Set Coloring (DASC), is a pure solver based on the well-known Graph Coloring algorithm. DASC is part of a bigger project aiming to bring logic programming into a distributed system, started in 2017 by Federico Igne with mASPreduce and continued in 2018 by Pietro Totis with a distributed grounder. In this paper we present a low level implementation of the Graph Coloring algorithm, via the Boost and MPI libraries for C++. Finally, we provide a few results of the very first working version of our tool, at the moment without any strong optimization or heuristic.
... Full-fledged applications of such formalisms in real-world contexts typically feature some kind of interactions between "non-declarative", i.e., object-orientedbased components, that cannot be avoided (even just for user interfaces or more technical aspects), with "declarative" components that are in charge of specific complex reasoning tasks. For instance, an application that relies on such schema has been developed and successfully applied in the context of e-Medicine [1,18]; in such scenarios, medical knowledge bases resulting from the integration of different databases often suffer from errors and anomalies. The application consists of a multi-source data cleaning system that automatically generates and executes ad hoc ASP programs for identifying and possibly fixing both syntactic and semantic anomalies in the involved knowledge bases. ...
... Notably, we provide also a Python implementation of the embASP framework that exposes the same functionalities of the Java one, apart from the specializations for the Android mobile setting due to restriction of the platform. 1 Recently, we released also a C# implementation that, along with the Python one, confirms that the proposed approach is flexible and easily extensible; a more thorough discussions on this can be found in Sect. 7. Furthermore, the C# implementation paves the way to a large number of interesting application scenarios, like, just as a matter of example, AI in games; indeed, embASP has already been used [11] to define by means of logic programs the behaviour of artificial characters in applications developed in Unity, 2 one of the most popular and widespread development environments in the game design field. ...
Article
Thanks to a number of efficient implementations, the use of logic formalisms for problem-solving has been increased in several real-world domains. This is the case, for instance, of action languages, such as planning domain definition language (PDDL), or answer set programming (ASP), which is a well-established declarative problem-solving paradigm that became widely used in AI and recognized as a powerful tool for knowledge representation and reasoning (KRR). As the application scenarios widened, the need for proper development tools and interoperability mechanisms for easing interaction and integration between declarative logic-based systems and external systems clearly emerged. In this work, we present a framework for integrating the KRR capabilities of, possibly more than one, declarative formalisms into generic applications developed by means of different programming paradigms. We show the use of the framework by illustrating proper specializations for two formalisms, namely ASP and PDDL, along with specializations for some relevant systems over different platforms, including the mobile setting.
... Among those semantics, the stable model semantics based answer set programming (ASP) [14] paradigm is popular for knowledge representation and reasoning as well as for solving combinatorial problems. Though computing ASP programs is considered to be NP-hard, there are a lot of ASP solvers (e.g., CLINGO [7], DLV [2], s(CASP) [3]) that can compute stable models of an ASP program efficiently. Answer Set Programming (ASP) is a declarative paradigm that extends logic programming with negation-as-failure. ...
Preprint
Full-text available
Provenance graphs are useful and powerful tools for representing system-level activities in cybersecurity; however, existing approaches often struggle with complex queries and flexible reasoning. This paper presents a novel approach using Answer Set Programming (ASP) to model and analyze provenance graphs. We introduce an ASP-based representation that captures intricate relationships between system entities, including temporal and causal dependencies. Our model enables sophisticated analysis capabilities such as attack path tracing, data exfiltration detection, and anomaly identification. The declarative nature of ASP allows for concise expression of complex security patterns and policies, facilitating both real-time threat detection and forensic analysis. We demonstrate our approach's effectiveness through case studies showcasing its threat detection capabilities. Experimental results illustrate the model's ability to handle large-scale provenance graphs while providing expressive querying. The model's extensibility allows for incorporation of new system behaviors and security rules, adapting to evolving cyber threats. This work contributes a powerful, flexible, and explainable framework for reasoning about system behaviors and security incidents, advancing the development of effective threat detection and forensic investigation tools.
... In other words, the answers to Q ↓ over D ↓ coincide with the hyperedges of the downward closure. Hence, to construct the downward closure we exploit a state-of-the-art Datalog engine, that is, version 2.1.1 of DLV (Adrian et al. 2018). Note that our approach based on evaluating a Datalog query differs form the one in (Elhalawati, Krötzsch, and Mennicke 2022), which uses an extension of Datalog with set terms. ...
Preprint
Full-text available
Explaining why a database query result is obtained is an essential task towards the goal of Explainable AI, especially nowadays where expressive database query languages such as Datalog play a critical role in the development of ontology-based applications. A standard way of explaining a query result is the so-called why-provenance, which essentially provides information about the witnesses to a query result in the form of subsets of the input database that are sufficient to derive that result. To our surprise, despite the fact that the notion of why-provenance for Datalog queries has been around for decades and intensively studied, its computational complexity remains unexplored. The goal of this work is to fill this apparent gap in the why-provenance literature. Towards this end, we pinpoint the data complexity of why-provenance for Datalog queries and key subclasses thereof. The takeaway of our work is that why-provenance for recursive queries, even if the recursion is limited to be linear, is an intractable problem, whereas for non-recursive queries is highly tractable. Having said that, we experimentally confirm, by exploiting SAT solvers, that making why-provenance for (recursive) Datalog queries work in practice is not an unrealistic goal.
... Likewise, Warded was recently introduced as fragment of the Datalog ± family (Calì et al. 2010) and is implemented as logic core of the reasoner Vadalog system (Bellomarini et al. 2020). Both find many industrial applications in the financial, media intelligence, security, logistics, pricing domains, and more (Berger et al. 2019;Adrian et al. 2018). ...
Conference Paper
Full-text available
Datalog^E is the extension of Datalog with existential quantification. While its high expressive power, underpinned by a simple syntax and the support for full recursion, renders it particularly suitable for modern applications on Knowledge Graphs, query answering (QA) over such language is known to be undecidable in general. For this reason, different fragments have emerged, introducing syntactic limitations to Datalog^E that strike a balance between its expressive power and the computational complexity of QA, to achieve decidability. In this short paper, we focus on two promising tractable candidates, namely Shy and Warded Datalog+/-. Reacting to an explicit interest from the community, we shed light on the relationship between these fragments. Moreover, we carry out an experimental analysis of the systems implementing Shy and Warded, respectively DLV^E and Vadalog.
... The answer set semantics associates a problem specification with none, one, or many intended models, called answer sets, each one corresponding to a solution; an ASP program that models a computational problem, coupled with a proper representation of an instance of such problem, can be fed to an implementation of ASP, called ASP solver, in order to actually compute all corresponding answer sets. Efficient and reliable ASP solvers exist, such as DLV/DLV2 (Adrian et al., 2018;Leone et al., 2006), WASP for solving the prepositional part of DLV2 (Alviano et al., 2019) and clingo (Gebser et al., 2019). ...
Article
Full-text available
Traditional path planning methods, such as sampling-based and iterative approaches, allow for optimal path’s computation in complex environments. Nonetheless, environment exploration is subject to rules which can be obtained by domain experts and could be used for improving the search. The present work aims at integrating inductive techniques that generate path candidates with deductive techniques that choose the preferred ones. In particular, an inductive learning model is trained with expert demonstrations and with rules translated into a reward function, while logic programming is used to choose the starting point according to some domain expert’s suggestions. We discuss, as use case, 3-D path planning for neurosurgical steerable needles. Results show that the proposed method computes optimal paths in terms of obstacle clearance and kinematic constraints compliance, and is able to outperform state-of-the-art approaches in terms of safety distance-from-obstacles respect, smoothness, and computational time.
... Likewise, Warded was recently introduced as fragment of the Datalog ± family (Calì et al. 2010) and is implemented as logic core of the reasoner Vadalog system (Bellomarini et al. 2020). Both find many industrial applications in the financial, media intelligence, security, logistics, pricing domains, and more (Berger et al. 2019;Adrian et al. 2018). ...
Preprint
Datalog^E is the extension of Datalog with existential quantification. While its high expressive power, underpinned by a simple syntax and the support for full recursion, renders it particularly suitable for modern applications on knowledge graphs, query answering (QA) over such language is known to be undecidable in general. For this reason, different fragments have emerged, introducing syntactic limitations to Datalog^E that strike a balance between its expressive power and the computational complexity of QA, to achieve decidability. In this short paper, we focus on two promising tractable candidates, namely Shy and Warded Datalog+/-. Reacting to an explicit interest from the community, we shed light on the relationship between these fragments. Moreover, we carry out an experimental analysis of the systems implementing Shy and Warded, respectively DLV^E and Vadalog.
... Among those semantics, the stable model semantics based answer set programming (ASP) [13] paradigm is popular for knowledge representation and reasoning as well as for solving combinatorial problems. Though computing ASP programs is considered to be NP-hard, there are a lot of ASP solvers (e.g., CLINGO [7], DLV [2], s(CASP) [3]) that can compute stable models of an ASP program efficiently. Meanwhile, there are also many approaches to solve programs under the well-founded semantics, such as XSB [15] and XOLDTNF [6]. ...
Preprint
Full-text available
In this paper we present a dependency graph-based method for computing the various semantics of normal logic programs. Our method employs \textit{conjunction nodes} to unambiguously represent the dependency graph of normal logic programs. The dependency graph can be transformed suitably in a semantics preserving manner and re-translated into an equivalent normal logic program. This transformed normal logic program can be augmented with a few rules written in answer set programming (ASP), and the CLINGO system used to compute its answer sets. Depending on how these additional rules are coded in ASP, one can compute models of the original normal logic program under the stable model semantics, the well-founded semantics, or the co-stable model semantics. In each case, justification for each atom in the model is also generated. We report on the implementation of our method as well as its performance evaluation.
... 6. Clingo [20] -Answer Set Programming (ASP) tool that combines gringo grounder and clasp solver [19] (handles data as ASP facts, no native support for RDF). 7. DLV [2,7] -another ASP solver using a dialect of ASP slightly different from Clingo's one. ...
Chapter
Full-text available
The use of formal knowledge representation models in intelligent tutoring systems often requires logical reasoning on these models by predefined rules. This process can be time and memory consuming, so finding effective software reasoners for different applications is an important research field. This problem is relevant for cognitive and constraint-based intelligent tutoring systems. We performed a comparative study of various software reasoners (Pellet, Apache Jena inference subsystem, Apache Jena SPARQL query processor, SWI-Prolog with semweb package, Closed World Machine, and Answer Set Programming solvers Clingo and DLV) for solving tasks specific to intelligent tutoring systems using three formal models with different properties and corresponding rule sets created for intelligent tutoring systems in introductory programming education domain. We compared features of rule-definition formalisms for different approaches and measured run and wall time, average CPU load, and peak RAM usage based on the count of inferred RDF triples. The experiments show that Apache Jena infers the solution quicker than other reasoners on the majority of tasks but consumes a significant amount of memory, while Clingo performs significantly better for combinatorial problems.
... The tokenization and standardization of data supported by the XBRL Consortium allow extensive and meaningful use of AI techniques to support economic analysis and fraud detection. I-DLV [9] is a new intelligent grounder of the logic-based Artificial Intelligence system DLV [10], it is an ASP instantiator that natively supports the ASP standard language. Beside ASP features, external computation in I-DLV is achieved by means of external atoms, whose extension is not defined by the semantics within the logic program, but rather is specified by means of externally defined Python programs, the so-called external atom in the rule bodies, which are also one of the most outstanding of I-DLV. ...
Article
Full-text available
Financial report activity standardization becomes more essential in Financial Services and Technology, to facilitate the digitization of the process of communicating and acquiring business information. The eXtensible Business Reporting Language (XBRL) is one of the first steps towards this vision by providing a general digital format of financial reports with different rules and tags. Analyzing XBRL reports allow us to verify the quality and transparency of the data and well as have the full history of the stored transactions. Currently, checking and storing reports are independent for each organization and country, which is less transparent for the public and investors, who might be interested in checking company's records before investing in them. In this paper, we propose a blockchain-based solution where all reports analysis activities and results are recorded into a shared ledger to guarantee their transparency and trustworthy. Specifically, we design and implement a prototype to evaluate and store financial statements using Ethereum blockchain following special metrics. Moreover, we examine different architectural decisions in terms of cost and performance and look at their advantages and disadvantages.
... Answer Set Programming (ASP) [5,21,30] is a declarative knowledge representation formalism that has been applied successfully in a variety of industrial and scientific applications such as configuration [3,33], team building [43], molecular biology [11], planning [13], and others [14,17]. In the vast majority of these applications ASP solvers such as CLINGO [22] or DLV [1,35] applied the ground-andsolve approach [26]. Such solvers first instantiate the given non-ground program and then apply various strategies to find answer sets of the obtained ground program. ...
Preprint
Full-text available
Domain-specific heuristics are an important technique for solving combinatorial problems efficiently. We propose a novel semantics for declarative specifications of domain-specific heuristics in Answer Set Programming (ASP). Decision procedures that are based on a partial solution are a frequent ingredient of existing domain-specific heuristics, e.g., for placing an item that has not been placed yet in bin packing. Therefore, in our novel semantics negation as failure and aggregates in heuristic conditions are evaluated on a partial solver state. State-of-the-art solvers do not allow such a declarative specification. Our implementation in the lazy-grounding ASP system Alpha supports heuristic directives under this semantics. By that, we also provide the first implementation for incorporating declaratively specified domain-specific heuristics in a lazy-grounding setting. Experiments confirm that the combination of ASP solving with lazy grounding and our novel heuristics can be a vital ingredient for solving industrial-size problems.
... Answer set programming (ASP) [8], based on the logic programming paradigm, is an elegant method to represent defaults, exceptions and preferences. There are comprehensive, well known, implementations of ASP such as CLINGO [7] and DLV [1]. But most of them are based on grounding the logic program and then using a SAT solver to compute a model. ...
Preprint
Our research is focused on making a human-like question answering system which can answer rationally. The distinguishing characteristic of our approach is that it will use automated common sense reasoning to truly "understand" dialogues, allowing it to converse like a human. Humans often make many assumptions during conversations. We infer facts not told explicitly by using our common sense. Incorporating commonsense knowledge in a question answering system will simply make it more robust.
... Answer set programming (ASP) [8], based on the logic programming paradigm, is an elegant method to represent defaults, exceptions and preferences. There are comprehensive, well known, implementations of ASP such as CLINGO [7] and DLV [1]. But most of them are based on grounding the logic program and then using a SAT solver to compute a model. ...
Article
Full-text available
Our research is focused on making a human-like question answering system which can answer rationally. The distinguishing characteristic of our approach is that it will use automated common sense reasoning to truly ``understand'' dialogues, allowing it to converse like a human. Humans often make many assumptions during conversations. We infer facts not told explicitly by using our common sense. Incorporating commonsense knowledge in a question answering system will simply make it more robust.
... Answer Set Programming (ASP) [5,21,30] is a declarative knowledge representation formalism that has been applied successfully in a variety of industrial and scientific applications such as configuration [3,33], team building [43], molecular biology [11], planning [13], and others [14,17]. In the vast majority of these applications ASP solvers such as CLINGO [22] or DLV [1,35] applied the ground-andsolve approach [26]. Such solvers first instantiate the given non-ground program and then apply various strategies to find answer sets of the obtained ground program. ...
Article
Full-text available
Domain-specific heuristics are an important technique for solving combinatorial problems efficiently. We propose a novel semantics for declarative specifications of domain-specific heuristics in Answer Set Programming (ASP). Decision procedures that are based on a partial solution are a frequent ingredient of existing domain-specific heuristics, e.g., for placing an item that has not been placed yet in bin packing. Therefore, in our novel semantics negation as failure and aggregates in heuristic conditions are evaluated on a partial solver state. State-of-the-art solvers do not allow such a declarative specification. Our implementation in the lazy-grounding ASP system Alpha supports heuristic directives under this semantics. By that, we also provide the first implementation for incorporating declaratively specified domain-specific heuristics in a lazy-grounding setting. Experiments confirm that the combination of ASP solving with lazy grounding and our novel heuristics can be a vital ingredient for solving industrial-size problems.
... The implementation of the proposed algorithm into an actual ASP system requires to face several customization choices; in particular, Figure 2 reports as underlined the parts that are expected to be specialized to the implementation of choice. In [7] we also report about our implementation into the DLV system [1,4] with the explicit aim to optimize the "grounding" (or instantiation) process, that is, one of the two relevant phases of the typical ASP computation which transforms the program into an equivalent variable-free one. We designed customization heuristics that, relying on information available during the computation and, in particular, at grounding time, try to estimate on a per-rule basis both the instantiation cost of the original program and of the decompositions, in order to guide the choice. ...
Article
Full-text available
Hybrid MKNF Knowledge Bases (HMKNF-KBs) constitute a formalism for tightly integrated reasoning over closed-world rules and open-world ontologies. This approach allows for accurate modeling of real-world systems, which often rely on both categorical and normative reasoning. Conflict-driven solving is the leading approach for computationally hard problems, such as satisfiability (SAT) and answer set programming (ASP), in which MKNF is rooted. This paper investigates the theoretical underpinnings required for a conflict-driven solver of HMKNF-KBs. The approach defines a set of completion and loop formulas, whose satisfaction characterizes MKNF models. This forms the basis for a set of nogoods, which in turn can be used as the backbone for a conflict-driven solver.
Article
Full-text available
Over the last decade, the use of robots in production and daily life has increased. With increasingly complex tasks and interaction in different environments including humans , robots are required a higher level of autonomy for efficient deliberation. Task planning is a key element of deliberation. It combines elementary operations into a structured plan to satisfy a prescribed goal, given specifications on the robot and the environment. In this manuscript, we present a survey on recent advances in the application of logic programming to the problem of task planning. Logic programming offers several advantages compared to other approaches, including greater expressivity and interpretability which may aid in the development of safe and reliable robots. We analyze different planners and their suitability for specific robotic applications, based on expressivity in domain representation, computational efficiency and software implementation. In this way, we support the robotic designer in choosing the best tool for his application.
Article
A key prerequisite for the successful adoption of the Shapes Constraint Language (SHACL)---the W3C standardized constraint language for RDF graphs---is the availability of automated tools that efficiently validate targeted constraints (known as shapes graphs ) over possibly very large RDF graphs. There are already significant efforts to produce optimized engines for SHACL validation, but they focus on restricted fragments of SHACL. For unrestricted SHACL, that is SHACL with unrestricted recursion and negation, there is no validator beyond a proof-of-concept prototype, and existing techniques are inherently incompatible with the goal-driven approaches being pursued by existing validators. Instead they require a global computation on the entire data graph that is not only computationally very costly, but also brittle, and can easily result in validation failures due to conflicts that are irrelevant to the validation targets. To address these challenges, we present a 'magic' transformation---based on Magic Sets as known from Logic Programming---that transforms a SHACL shapes graph S into a new shapes graph S' whose validation considers only the relevant neighbourhood of the targeted nodes. The new S' is equivalent to S whenever there are no conflicts between the constraints and the data, and in case the validation of S fails due to conflicts that are irrelevant to the target, S' may still admit a lazy, target-oriented validation. We implement the algorithm and run preliminary experiments, showing our approach can be a stepping stone towards validators for full SHACL, and that it can significantly improve the performance of the only prototype validator that currently supports full recursion and negation.
Article
The development of complex software requires tools promoting fail-fast approaches, so that bugs and unexpected behavior can be quickly identified and fixed. Tools for data validation may save the day of computer programmers. In fact, processing invalid data is a waste of resources at best, and a drama at worst if the problem remains unnoticed and wrong results are used for business. Answer Set Programming (ASP) is not an exception, but the quest for better and better performance resulted in systems that essentially do not validate data. Even under the simplistic assumption that input/output data are eventually validated by external tools, invalid data may appear in other portions of the program, and go undetected until some other module of the designed software suddenly breaks. This paper formalizes the problem of data validation for ASP programs, introduces a language to specify data validation, and presents valasp , a tool to inject data validation in ordinary programs. The proposed approach promotes fail-fast techniques at coding time without imposing any lag on the deployed system if data are pretended to be valid. Validation can be specified in terms of statements using YAML, ASP and Python. Additionally, the proposed approach opens the possibility to use ASP for validating data of imperative programming languages.
Thesis
Full-text available
The traditional ground-and-solve approach to Answer Set Programming (ASP) suffers from the grounding bottleneck, which makes large-scale problem instances unsolvable. Lazy grounding is an alternative approach that interleaves grounding with solving and thus uses space more efficiently. However, the limited view on the search space in lazy grounding poses unique challenges and can adversely affect solving performance. This thesis advances ASP solving technology, especially in conjunction with lazy grounding, to improve ASP's applicability to large, real-world problem instances. First, we introduce novel lazy-grounding strategies that enhance solving performance by making compromises between lazily grounding as little as possible and the traditional full grounding upfront. We call these compromises "degrees of laziness" in grounding. We investigate how these degrees of laziness compare to each other formally as well as in solving performance. Experiments show that our novel grounding strategies perform significantly better than the state-of-the-art lazy grounding systems in many cases. Second, we suggest a new approach to learn information while solving one problem instance that can speed up the solving of future problem instances. Our solution combines well-known ASP solving techniques with deductive logic-based machine learning. We demonstrate the effects of our method using realistic examples, showing that our approach requires a low computational cost to learn constraints that yield significant performance benefits in our test cases. These benefits can be observed with ground-and-solve systems as well as with lazy-grounding systems. Third, we investigate how several solving techniques employed by ground-and-solve systems can be adapted and used in lazy-grounding systems. These techniques include restarts, phase saving, domain-independent heuristics, and learned-clause deletion. Experiments show significant runtime improvements. Fourth, we present novel syntax and semantics for declarative specifications of domain-specific heuristics in ASP. Domain-specific heuristics are an essential technique for solving combinatorial problems efficiently. Our approach supports heuristics that depend non-monotonically on the partial assignment maintained during solving, which has not been possible before. Such heuristics frequently occur in practice, such as picking an item that has not yet been placed in bin packing. Experiments show that combining lazy-grounding ASP solving and our novel heuristics can be vital for solving industrial-size problems. For all our contributions, working prototypes have been implemented based on the lazy-grounding ASP system Alpha.
Chapter
In the last few years, we have been witnessing the spread of computing devices getting smaller and smaller (e.g., Smartphones, Smart Devices, Raspberry, etc.), and the production and availability of data getting bigger and bigger. In this work we introduce DLV Large Scale (DLV-LS), a framework based on Answer Set Programming (ASP) for performing declarative-based reasoning tasks over data-intensive applications, possibly on Smart Devices. The framework encompasses DLV Mobile Edition (DLV-ME), an ASP based solver for Android systems and Raspberry devices, and DLV Enterprise Edition (DLV-EE), an ASP-based platform, accessible by REST interfaces, for large-scale reasoning over Big Data, classical relational database systems, and NoSQL databases. DLV-LS enables Smart Devices to both locally perform reasoning over data generated by their own sensors and properly interact with DLV-EE when more computational power is needed for harder tasks, possibly over bigger centralized data. We present also a real-world application of DLV-LS; the use case consists of a tourist navigator that calculates the best routes and optimizes a tour of a tourist under custom-defined time constraints.
Article
We address the problem of compiling defeasible theories to Datalog¬ programs. We prove the correctness of this compilation, for the defeasible logic DL (∂ || ), but the techniques we use apply to many other defeasible logics. Structural properties of DL (∂ || ) are identified that support efficient implementation and/or approximation of the conclusions of defeasible theories in the logic, compared with other defeasible logics. We also use previously well-studied structural properties of logic programs to adapt to incomplete Datalog¬ implementations.
Article
Purpose Real-time location sensing (RTLS) systems offer a significant potential to advance the management of construction processes by potentially providing real-time access to the locations of workers and equipment. Many location-sensing technologies tend to perform poorly for indoor work environments and generate large data sets that are somewhat difficult to process in a meaningful way. Unfortunately, little is still known regarding the practical benefits of converting raw worker tracking data into meaningful information about construction project progress, effectively impeding widespread adoption in construction. Design/methodology/approach The presented framework is designed to automate as many steps as possible, aiming to avoid manual procedures that significantly increase the time between progress estimation updates. The authors apply simple location tracking sensor data that does not require personal handling, to ensure continuous data acquisition. They use a generic and non-site-specific knowledge base (KB) created through domain expert interviews. The sensor data and KB are analyzed in an abductive reasoning framework implemented in Answer Set Programming (extended to support spatial and temporal reasoning), a logic programming paradigm developed within the artificial intelligence domain. Findings This work demonstrates how abductive reasoning can be applied to automatically generate rich and qualitative information about activities that have been carried out on a construction site. These activities are subsequently used for reasoning about the progress of the construction project. Our framework delivers an upper bound on project progress (“optimistic estimates”) within a practical amount of time, in the order of seconds. The target user group is construction management by providing project planning decision support. Research limitations/implications The KB developed for this early-stage research does not encapsulate an exhaustive body of domain expert knowledge. Instead, it consists of excerpts of activities in the analyzed construction site. The KB is developed to be non-site-specific, but it is not validated as the performed experiments were carried out on one single construction site. Practical implications The presented work enables automated processing of simple location tracking sensor data, which provides construction management with detailed insight into construction site progress without performing labor-intensive procedures common nowadays. Originality/value While automated progress estimation and activity recognition in construction have been studied for some time, the authors approach it differently. Instead of expensive equipment, manually acquired, information-rich sensor data, the authors apply simple data, domain knowledge and a logical reasoning system for which the results are promising.
Chapter
Data validation may save the day of computer programmers, whatever programming language they use. In fact, processing invalid data is a waste of resources at best, and a drama at worst if the problem remains unnoticed and wrong results are used for business. Answer Set Programming is not an exception, but the quest for better and better performance resulted in systems that essentially do not validate data in any way. Even under the simplistic assumption that input and output data are eventually validated by external tools, invalid data may appear in other portions of the program, and go undetected until some other module of the designed software suddenly breaks. This paper formalizes the problem of data validation for ASP programs, introduces a declarative language to specify data validation, and presents a tool to inject data validation in ordinary programs. The proposed approach promotes fail-fast techniques at coding time without imposing any lag on the deployed system if data are pretended to be valid. Additionally, the proposed approach opens the possibility to take advantage of ASP declarativity for validating complex data of imperative programming languages.
Article
A Logic-Based Framework Leveraging Neural Networks for Studying the Evolution of Neurological Disorders - FRANCESCO CALIMERI, FRANCESCO CAUTERUCCIO, LUCA CINELLI, ALDO MARZULLO, CLAUDIO STAMILE, GIORGIO TERRACINA, FRANÇOISE DURAND-DUBIEF, DOMINIQUE SAPPEY-MARINIER
Article
Magic sets are a Datalog to Datalog rewriting technique to optimize query answering. The rewritten program focuses on a portion of the stable model(s) of the input program which is sufficient to answer the given query. However, the rewriting may introduce new recursive definitions, which can involve even negation and aggregations, and may slow down program evaluation. This paper enhances the magic set technique by preventing the creation of (new) recursive definitions in the rewritten program. It turns out that the new version of magic sets is closed for Datalog programs with stratified negation and aggregations, which is very convenient to obtain efficient computation of the stable model of the rewritten program. Moreover, the rewritten program is further optimized by the elimination of subsumed rules and by the efficient handling of the cases where binding propagation is lost. The research was stimulated by a challenge on the exploitation of Datalog/dlv for efficient reasoning on large ontologies. All proposed techniques have been hence implemented in the dlv system, and tested for ontological reasoning, confirming their effectiveness.
Article
Full-text available
This paper presents the DLV system, which is widely considered the state-of-the-art implementation of disjunctive logic programming, and addresses several aspects. As for problem solving, we provide a formal definition of its kernel language, function-free disjunctive logic programs (also known as disjunctive datalog), extended by weak constraints, which are a powerful tool to express optimization problems. We then illustrate the usage of DLV as a tool for knowledge representation and reasoning, describing a new declarative programming methodology which allows one to encode complex problems (up to Δ3P\Delta^P_3-complete problems) in a declarative fashion. On the foundational side, we provide a detailed analysis of the computational complexity of the language of DLV, and by deriving new complexity results we chart a complete picture of the complexity of this language and important fragments thereof. Furthermore, we illustrate the general architecture of the DLV system which has been influenced by these results. As for applications, we overview application front-ends which have been developed on top of DLV to solve specific knowledge representation tasks, and we briefly describe the main international projects investigating the potential of the system for industrial exploitation. Finally, we report about thorough experimentation and benchmarking, which has been carried out to assess the efficiency of the system. The experimental results confirm the solidity of DLV and highlight its potential for emerging application areas like knowledge management and information integration.
Article
Full-text available
Answer Set Programming (ASP) is a fully-declarative logic programming paradigm, which has been proposed in the area of knowledge representation and non-monotonic reasoning. Nowadays, the formal properties of ASP are well-understood, efficient ASP systems are available, and, recently, ASP has been employed in a few industrial applications. However, ASP technology is not mature for a successful exploitation in industry yet; mainly because ASP technologies are not integrated in the well-assessed development processes and platforms which are tailored for imperative/object-oriented programming languages. In this paper we present a new programming framework blending ASP with Java. The framework is based on JASP, an hybrid language that transparently supports a bilateral interaction between ASP and Java. JASP specifications are compliant with the JPA standard to perfectly fit extensively-adopted enterprise application technologies. The framework also encompasses an implementation of JASP as a plug-in for the Eclipse platform, called JDLV, which includes a compiler from JASP to Java. Moreover, we show a real-world application developed with JASP and JDLV, which highlights the effectiveness of our ASP-Java integration framework. Copyright © 2012, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved.
Article
Full-text available
An important limitation of traditional logic programming as a knowledge representation tool, in comparison with classical logic, is that logic programming does not allow us to deal directly with incomplete information. In order to overcome this limitation, we extend the class of general logic programs by including classical negation, in addition to negation-as-failure. The semantics of such extended programs is based on the method of stable models. The concept of a disjunctive database can be extended in a similar way. We show that some facts of commonsense knowledge can be represented by logic programs and disjunctive databases more easily when classical negation is available. Computationally, classical negation can be eliminated from extended programs by a simple preprocessor. Extended programs are identical to a special case of default theories in the sense of Reiter.
Article
Full-text available
The motivation and key concepts behind answer set programming---a promising approach to declarative problem solving.
Article
ASP has been applied fruitfully to a wide range of areas in AI and in other fields, both in academia and in industry, thanks to the expressive representation languages of ASP and the continuous improvement of ASP solvers. We present some of these ASP applications, in particular, in knowledge representation and reasoning, robotics, bioinformatics and computational biology as well as some industrial applications. We discuss the challenges addressed by ASP in these applications and emphasize the strengths of ASP as a useful AI paradigm.
Article
relevant industrial applications. Similarly to the other main-stream ASP systems, while processing an input program, in a first phase of the computation DLV eliminates the variables, thus generating a ground program which is semantically equivalent to the original one, but significantly smaller than the Herbrand Instantiation, in general. This phase, called ‘grounding’, plays a key role for the successful deployment in real-world contexts. In this work we present ℐ-DLV, a brand new version of the intelligent grounder of DLV . While relying on the solid theoretical foundations of its predecessor, it has been completely redesigned and re-engineered, both in algorithms and data structures; it now features full support to ASP-Core-2 standard language, increased flexibility and customizability, significantly improved performance, and an extensible design that eases the incorporation of language updates and optimization techniques. ℐ-DLV results in a stable and efficient ASP instantiator, that turns out to be a full-fledged deductive database system. We describe here the main features of ℐ-DLV and present the results of proper experimental activities for assessing both its applicability and performance.
Conference Paper
DLV is a powerful system for knowledge representation and reasoning which supports Answer Set Programming (ASP) – a logic-based programming paradigm for solving problems in a fully declarative way. DLV is widely used in academy, and, importantly, it has been fruitfully employed in many relevant industrial applications. As for the other main-stream ASP systems, in the first phase of the computation DLV eliminates the variables, generating a ground program which is semantically equivalent to the original one but significantly smaller than the Herbrand Instantiation, in general. This phase, called ‘grounding’, plays a key role for the successful deployment in real-world contexts. In this work we present I-DLV, a brand new version of the intelligent grounder of DLV. While relying on the solid theoretical foundations of its predecessor, it has been completely redesigned and re-engineered, both in algorithms and data structures; it now features full support to ASPCore2 standard language, increased flexibility and customizability, significantly improved performances, and an extensible design that eases the incorporation of language updates and optimization techniques. I-DLV results in a stable and efficient ASP instantiator that turns out to be a full-fledged deductive database system. We describe the main features of I-DLV and carry out experimental activities for assessing applicability and performances.
Conference Paper
Answer Set Programming (ASP) is a well-established declarative problem solving paradigm which became widely used in AI and recognized as a powerful tool for knowledge representation and reasoning (KRR), especially for its high expressiveness and the ability to deal also with incomplete knowledge. Recently, thanks to the availability of a number of robust and efficient implementations, ASP has been increasingly employed in a number of different domains, and used for the development of industrial-level and enterprise applications. This made clear the need for proper development tools and interoperability mechanisms for easing interaction and integration with external systems in the widest range of real-world scenarios, including mobile applications and educational contexts. In this work we present a framework for integrating the KRR capabilities of ASP into generic applications. We show the use of the framework by illustrating proper specializations for some relevant ASP systems over different platforms, including the mobile setting; furthermore, the potential of the framework for educational purposes is illustrated by means of the development of several ASP-based applications.
Chapter
Answer Set Programming (ASP) is a powerful rule-based language for knowledge representation and reasoning that has been developed in the field of logic programming and nonmonotonic reasoning. After more than twenty years from the introduction of ASP, the theoretical properties of the language are well understood and the solving technology has become mature for practical applications. In this paper, we first present the basics of the ASP language, and we then concentrate on its usage for knowledge representation and reasoning in real-world contexts. In particular, we report on the development of some industry-level applications with the ASP system DLV, and we illustrate two advanced development tools for ASP, namely ASPIDE and JDLV, which speed-up and simplify the implementation of applications.
Combining answer set programming and domain heuristics for solving hard industrial problems (application paper)
  • C Dodaro
  • P Gasteiger
  • N Leone
  • B Musitsch
  • F Ricca
  • K Schekotihin
Dodaro C, Gasteiger P, Leone N, Musitsch B, Ricca F, Schekotihin K (2016) Combining answer set programming and domain heuristics for solving hard industrial problems (application paper). TPLP 16(5-6):653-669
ASPIDE: integrated development environment for answer set programming
  • O Febbraro
  • K Reale
Febbraro O, Reale K, Ricca F (2011) ASPIDE: integrated development environment for answer set programming. LPNMR, LNCS, vol 6645. Springer, New York, pp 317-330
  • M Alviano
  • F Calimeri
  • C Dodaro
  • D Fuscà
  • N Leone
  • Perri S Ricca
  • F Veltri
  • P Zangari
Alviano M, Calimeri F, Dodaro C, Fuscà D, Leone N, Perri S, Ricca F, Veltri P, Zangari J (2017) The ASP system DLV2. LPNMR, LNCS, vol 10377. Springer, New York, pp 215-221
  • M Alviano
  • C Dodaro
  • N Leone
Alviano M, Dodaro C, Leone N, Ricca F (2015) Advances in WASP. LPNMR, LNCS, vol 9345. Springer, New York, pp 40-54
  • F Calimeri
  • S Cozza
  • G Ianni
  • N Leone
Calimeri F, Cozza S, Ianni G, Leone N (2008) Computable functions in ASP: theory and implementation. ICLP, LNCS, vol 5366. Springer, New York, pp 407-424