cnfgen.clihelpers.counting_helpers module

Implementation of counting/matching formulas helpers

Copyright (C) 2012, 2013, 2014, 2015, 2016, 2019, 2020 Massimo Lauria <massimo.lauria@uniroma1.it> https://massimolauria.net/cnfgen/

class CountingCmdHelper

Bases: cnfgen.clihelpers.formula_helpers.FormulaHelper

Command line helper for Counting Principle formulas

Methods

build_cnf(args) Build an Counting Principle formula according to the arguments
setup_command_line(parser) Setup the command line options for Counting Principle formula
static build_cnf(args)

Build an Counting Principle formula according to the arguments

Arguments: - args: command line options

description = 'counting principle'
name = 'count'
static setup_command_line(parser)

Setup the command line options for Counting Principle formula

Arguments: - parser: parser to load with options.

class PMatchingCmdHelper

Bases: cnfgen.clihelpers.formula_helpers.FormulaHelper

Command line helper for Perfect Matching Principle formulas

Methods

build_cnf(args) Buil the CNF according to the parameters on the command line
setup_command_line(parser) Setup the command line options for Perfect Matching Principle formula
static build_cnf(args)

Buil the CNF according to the parameters on the command line

description = 'perfect matching principle'
name = 'matching'
static setup_command_line(parser)

Setup the command line options for Perfect Matching Principle formula

Arguments: - parser: parser to load with options.

class ParityCmdHelper

Bases: cnfgen.clihelpers.formula_helpers.FormulaHelper

Command line helper for Parity Principle formulas

Methods

build_cnf(args) Buil the CNF according to the parameters on the command line
setup_command_line(parser) Setup the command line options for Parity Principle formula
static build_cnf(args)

Buil the CNF according to the parameters on the command line

description = 'parity principle'
name = 'parity'
static setup_command_line(parser)

Setup the command line options for Parity Principle formula

Arguments: - parser: parser to load with options.

class SCCmdHelper

Bases: cnfgen.clihelpers.formula_helpers.FormulaHelper

Methods

build_cnf(args) Buil the CNF according to the parameters on the command line
setup_command_line(parser) Setup the command line parser for this formula subcommand
static build_cnf(args)

Buil the CNF according to the parameters on the command line

description = 'subset cardinality formulas'
name = 'subsetcard'
static setup_command_line(parser)

Setup the command line parser for this formula subcommand

class TseitinCmdHelper

Bases: cnfgen.clihelpers.formula_helpers.FormulaHelper

Command line helper for Tseitin formulas

Methods

build_cnf(args) Build Tseitin formula according to the arguments
setup_command_line(parser) Setup the command line options for Tseitin formula
static build_cnf(args)

Build Tseitin formula according to the arguments

Arguments: - args: command line options

description = 'tseitin formula'
name = 'tseitin'
static setup_command_line(parser)

Setup the command line options for Tseitin formula

Arguments: - parser: parser to load with options.