Giter Club home page Giter Club logo

cnfgen's Introduction

CNFgen formula generator

Build Status Documentation Status DOI

CNFgen produces benchmark propositional formulas in DIMACS format, ready to be fed to SAT solvers. These benchmarks come mostly from research in Proof Complexity (e.g. pigeonhole principle, ordering principle, k-clique,…). Many of these formulas encode structured combinatorial problems well known to be challenging for certain SAT solvers.

Homepage of the project at http://massimolauria.net/cnfgen/

Basic usage

In most cases it is sufficient to invoke cnfgen giving the name of the formula family and the corresponding parameters.

cnfgen <formula> <param1> <param2> ...

For example

cnfgen php 10 7

gives the Pigeonhole Principle from 10 pigeons and 7 holes. To get more help you can type

cnfgen --help                # available formulas / help for the tool
cnfgen <formula> --help      # help about a specific formula
cnfgen --tutorial            # a quick tutorial 

Lifting/transformations/post-processing

It is possible to apply one or more transformations to the formula by appending one or more -T <transformation> <params> to the command line. For example

cnfgen op 15 -T shuffle

produces the ordering principle formula on 15 elements, with a random shuffle of variables, polarities and clauses. To list the available transformations you can use

cnfgen --help

Installation

You can install CNFgen from Python Package Index, together with all its dependencies, typing either

pip3 install [--user] cnfgen

or

python3 -m pip install  [--user] cnfgen

if pip3 is not a program on your path. Otherwise it is possible to install from source, assuming the requirements are already installed, using

python3 setup.py install [--user]

The --user option allows to install the package in the user home directory. If you do that please check that the target location for the command line utilities are in your $PATH.

Resources

Contribution

Please contribute to the code by sending pull requests.

Copyright 2012-2021 © Massimo Lauria ([email protected])

cnfgen's People

Contributors

massimolauria avatar marcvinyals avatar alugowski avatar elffersj avatar louisabraham avatar arne-cl avatar sophie-ha 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.