Coder Social home page Coder Social logo

zachjhansen / anthem-rs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jorgefandinno/anthem

0.0 0.0 0.0 331 KB

🎼 Translate answer set programs to first-order theorem prover language

Home Page: https://potassco.org/

License: MIT License

Rust 100.00%

anthem-rs's Introduction

anthem GitHub Release Build Status Build Status

Translate answer set programs to first-order theorem prover language

Overview

anthem translates ASP programs (in the input language of clingo) to the language of first-order theorem provers such as Prover9.

Usage

To verify that a program implements a specification, invoke anthem using the verify-program command:

$ anthem verify-program <program file> <specification file>...

Note that multiple specification files may be specified. This is useful for separating lemmas and axioms from the assumptions and specs.

The example for computing the floor of the square root of a number can be reproduced as follows:

$ anthem verify-program examples/example-2.{lp,spec,lemmas}

The braces notation is a Bash shorthand for

$ anthem verify-program examples/example-2.lp examples/example-2.spec examples/example-2.lemmas

By default, anthem performs Clark’s completion on the translated formulas, detects which variables are integer, and simplifies the output by applying several basic transformation rules.

These processing steps can be turned off with the options --no-complete, --no-simplify, and --no-detect-integers.

Warnings can be shown by setting the environmental variable ANTHEM_LOG to "warn"

$ ANTHEM_LOG="warn" anthem verify-program examples/example-2.{lp,spec,lemmas}

Building

anthem is built with Rust’s cargo toolchain. After installing Rust, anthem can be built as follows:

$ git clone https://github.com/potassco/anthem.git
$ cd anthem
$ cargo build --release

The anthem binary will then be available in the target/release/ directory. Alternatively, anthem can be invoked using cargo as follows:

$ cargo run -- verify-program <program file> <specification file>...

Contributors

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.