Giter Site home page Giter Site logo

pysasp's Introduction

PySasp : Generate Python programs from s(ASP) answer set programs

Installation

  1. Need to have SWI-Prolog in PATH
  2. Run make on the top level directory
  3. Generated executable is pysasp

Usage:

pysasp <input_file>

To save the file, use IO-redirection of bash environment

pysasp <input_file> > <output_file>

For optimized version:

pysasp <input_file> -o > < output_file>

For a sample of how input file must be specified, see examples/color.lp

Info

<input_file> is an Answer Set Program in a particular format as outlined in the LOPSTR 2019 Paper

"Synthesizing Imperative Programs from Answer Set Programming Specifications"

Link to full paper: www.utdallas.edu/~gupta/aspsynthesis.pdf

Every program must additionally have the following annotations:

  1. A unique main predicate. If the main predicate name is "query" then the s(ASP) program must contain the fact "main(query)."
  2. Every variable in the program must be associated with a domain. Every domain must be annotated using the domain predicate. If the s(ASP) program uses a domain, say "num" then it should contain the fact "domain(num)".

Parser for PySasp is based on the s(ASP) parser. s(ASP) is a Predicate Answer Set Programs that produces stable models without grounding.

s(ASP) itself downloadable from: https://sourceforge.net/projects/sasp-system/

Papers describing s(ASP):

"Computing stable models of normal logic programs without grounding" Link to paper: https://arxiv.org/pdf/1709.00501.pdf

More recent paper on s(ASP):

"Constraint Answer Set Programming without Grounding"

Link to paper: https://arxiv.org/pdf/1804.11162.pdf

pysasp's People

Contributors

sarat-chandra-varanasi avatar

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.