cnfgen.clihelpers.simple_helpers module¶
Formula Helpers for simple and random formulas
Copyright (C) 2012, 2013, 2014, 2015, 2016, 2019, 2020, 2021 Massimo Lauria <massimo.lauria@uniroma1.it> https://massimolauria.net/cnfgen/
-
class
AND
¶ Bases:
cnfgen.clihelpers.formula_helpers.FormulaHelper
Command line helper for a 1-CNF (i.e. conjunction)
Methods
build_cnf
(args)Build a conjunction setup_command_line
(parser)Setup the command line options for an and of literals -
static
build_cnf
(args)¶ Build a conjunction
Arguments: - args: command line options
-
description
= 'a single conjunction'¶
-
name
= 'and'¶
-
static
setup_command_line
(parser)¶ Setup the command line options for an and of literals
Arguments: - parser: parser to load with options.
-
static
-
class
FALSE
¶ Bases:
cnfgen.clihelpers.formula_helpers.FormulaHelper
Command line helper for the contradiction (one empty clause)
Methods
build_cnf
(args)Build a CNF formula with an empty clause setup_command_line
(parser)Setup the command line parser for this formula subcommand -
static
build_cnf
(args)¶ Build a CNF formula with an empty clause
Parameters: - args : ignored
command line options
-
description
= 'CNF with one empty clause'¶
-
name
= 'false'¶
-
static
setup_command_line
(parser)¶ Setup the command line parser for this formula subcommand
-
static
-
class
OR
¶ Bases:
cnfgen.clihelpers.formula_helpers.FormulaHelper
Command line helper for a single clause formula
Methods
build_cnf
(args)Build an disjunction setup_command_line
(parser)Setup the command line options for single or of literals -
static
build_cnf
(args)¶ Build an disjunction
Arguments: - args: command line options
-
description
= 'a single disjunction'¶
-
name
= 'or'¶
-
static
setup_command_line
(parser)¶ Setup the command line options for single or of literals
Arguments: - parser: parser to load with options.
-
static
-
class
RandCmdHelper
¶ Bases:
cnfgen.clihelpers.formula_helpers.FormulaHelper
Command line helper for random formulas
Methods
build_cnf
(args)Build a conjunction setup_command_line
(parser)Setup the command line options for an and of literals -
static
build_cnf
(args)¶ Build a conjunction
Arguments: - args: command line options
-
description
= 'random k-CNF'¶
-
name
= 'randkcnf'¶
-
static
setup_command_line
(parser)¶ Setup the command line options for an and of literals
Arguments: - parser: parser to load with options.
-
static
-
class
TRUE
¶ Bases:
cnfgen.clihelpers.formula_helpers.FormulaHelper
Command line helper for the empty CNF (no clauses)
Methods
build_cnf
(args)Build an empty CNF formula setup_command_line
(parser)Setup the command line parser for this formula subcommand -
static
build_cnf
(args)¶ Build an empty CNF formula
Parameters: - args : ignored
command line options
-
description
= 'CNF formula with no clauses'¶
-
name
= 'true'¶
-
static
setup_command_line
(parser)¶ Setup the command line parser for this formula subcommand
-
static