Coder Social home page Coder Social logo

kwrx / qasp Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 12.4 MB

A new solver for asp programs with quantifiers over stable models

License: GNU General Public License v3.0

CMake 0.92% C++ 98.62% C 0.46%
ai answer-set-programming qbf logic-programming cpp education unical

qasp's Introduction

Quantifying over ASP

build GitHub release (latest by date) DOI License: GPL

For my bachelor's thesis in logic programming and artificial intelligence, I developed a tool that can be used to solve a wide range of problems in answer set programming, particularly those involving the use of quantifiers. This can be useful in a variety of applications, such as planning and scheduling, decision making, and artificial intelligence. Overall, my project aims to demonstrate the power and versatility of logic programming for solving complex problems.

In addition to its versatility, my project also aims to be highly performant compared to the current state of the art in answer set programming. This means that I will be focusing on developing a model that is efficient in terms of both time and space complexity, making it well-suited for solving large and complex problems.

Furthermore, I have also included a number of heuristics in my model that are designed to significantly improve its performance. These heuristics are based on my research into the latest advancements in answer set programming, and are intended to help the solver find solutions more quickly and accurately. By leveraging these heuristics, my project aims to provide a more efficient and effective solution to problems in answer set programming, compared to existing methods.

๐Ÿ“„ Abstract

We present here, a new ASP solver called Quantifying over ASP, or briefly QASP, for ASP(Q) problems resolution, i.e. an extensive ASP formalism, inspired by Quantified Boolean Formula, which adds quantifiers over stable models, in order to model every PSPACE problem. We describe the key components of this computational methodology by introducing all technical and formal aspects needed to a proper understanding of this thesis. Moreover, we present resolution algorithms and we observe how through rewriting and source analysis, we can reduce computational size of a given ASP(Q) problem by using alternative strategies like counter-example or look-ahead. Furthermore, we present the results of an experimental analysis we conducted in order to evaluate performance-wise impact. Specifically, given benchmarks of our system with respect to current state-of-art ASP(Q) solver q_asp, we observe how QASP can be very competitive in most cases, and even faster in other cases.

๐Ÿ› ๏ธ Build from sources

To build qasp from sources, execute the following commands:

# Clone repository
$ git clone https://github.com/kwrx/qasp && cd qasp
$ git submodule update --init --recursive

# Configure
$ mkdir -p build
$ cmake -DCMAKE_BUILD_TYPE=Release -B build .

# Build
$ cmake --build build -t clingo
$ cmake --build build

# Install
$ sudo cmake --install build

NOTE: CMake >= 3.20, Boost C++ Libraries >= 1.72.0 and Re2c >= 2.2 are required.

๐Ÿ’ป Usage

Open your terminal and type:

$ qasp [OPTIONS] SOURCES...

Or read from stdin

$ cat SOURCE | qasp [OPTIONS]

NOTE: type qasp --help for more information.

๐Ÿ“š Example

Given a logic asp with quantifiers program program.asp:

%@exists
a | b.
%@forall
c | d :- a.
d :- b.  
%@constraint
:- c, not d.

Calculate if exists all answer set of @exists program such that for each answer set of @forall program is a coherent solution.

$ qasp -n0 program.asp

๐ŸŒ License

Copyright (C) 2021 Antonino Natale. All rights reserved.

Licensed under the GPL-3.0 license.

qasp's People

Contributors

ciccioricca avatar kwrx avatar

Stargazers

 avatar

Watchers

 avatar  avatar

qasp's Issues

Implementare pipeline generazioni

Dettagli:

  • generate() progressivo con in input gli atomi del precedente AS
  • solve() progressivo con assumptions gli atomi del precedente AS

NOTE: Tutto thread-safe per una futura parallelizzazione

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.