contains functions used in the polynomial solver More...
#include "elimination.h"
Functions | |
Polynomial * | add_up_factors (FILE *file) |
std::vector< Polynomial * > | merge_factors (FILE *file, std::vector< Polynomial * > container) |
void | add_up_spec_of_slice (FILE *file) |
void | eliminate_by_one_gate (Gate *n1, Gate *n2, FILE *file) |
Polynomial * | reduce_by_one_poly (const Polynomial *p1, Gate *n, FILE *file) |
void | remove_internal_xor_gates (FILE *file) |
void | remove_single_occs_gates (FILE *file) |
void | remove_slice_minus_one_gates (FILE *file) |
void | decomposing (FILE *file) |
void | eliminate_booth_pattern (FILE *file) |
Polynomial * | inc_spec_poly (unsigned i) |
Polynomial * | mod_poly (const Polynomial *p1, bool print_rule, FILE *file) |
void | correct_pp_unsigned (const Polynomial *p, FILE *file) |
void | correct_pp_signed (const Polynomial *p, FILE *file) |
void | correct_pp (const Polynomial *p, FILE *file) |
const Polynomial * | reduce (FILE *file) |
bool | check_inputs_only (const Polynomial *p) |
void | write_witness_vector (const Term *t, FILE *file) |
void | write_witnesses (const Polynomial *p, FILE *file) |
void | generate_witness (const Polynomial *p, const char *name) |
Variables | |
bool | pac = 0 |
defines whether pac printing is enabled More... | |
bool | nss = 0 |
defines whether printing nullstellensatz proofs is enabled More... | |
std::vector< Polynomial * > | factors_per_slice |
used to collect the factors of each slice for PAC proofs More... | |
std::vector< Polynomial * > | spec_of_slice |
used to collect the specification of each slice for PAC proofs More... | |
contains functions used in the polynomial solver
This file contains all functions used for preprocessing the Gröbner basis and for reducing the specification by the slices.
Part of AMulet2.0 : AIG Multiplier Verification Tool. Copyright (C) 2020 Daniela Kaufmann, Johannes Kepler University Linz
Polynomial* add_up_factors | ( | FILE * | file | ) |
Adds up the computed factors of a slice to compute the sliced specification Prints PAC rules for the process. Used only when pac=1.
file | output file for PAC rules |
void add_up_spec_of_slice | ( | FILE * | file | ) |
Adds up the computed sliced specifications. Prints PAC rules for the process. Used only when pac=1.
file | output file for PAC rules |
bool check_inputs_only | ( | const Polynomial * | p | ) |
Checks whether the polynomial contains only input variables
p | Polynomial* to be checked |
void correct_pp | ( | const Polynomial * | p, |
FILE * | file | ||
) |
Reducing the computed specification by the modulo constant, by calling appropriate subfunctions.
p | Polynomial to be reduced |
file | output file for PAC rules |
void correct_pp_signed | ( | const Polynomial * | p, |
FILE * | file | ||
) |
Reducing the computed signed specification by the modulo constant
p | Polynomial to be reduced |
file | output file for PAC rules |
void correct_pp_unsigned | ( | const Polynomial * | p, |
FILE * | file | ||
) |
Reduces the computed unsigned specification by the modulo constant
p | Polynomial to be reduced |
file | output file for PAC rules |
void decomposing | ( | FILE * | file | ) |
Remove repeatedly all single gates (until completion)
file | output file for PAC rules |
void eliminate_booth_pattern | ( | FILE * | file | ) |
Remove all gates that are identified as a Booth pattern
file | output file for PAC rules |
void generate_witness | ( | const Polynomial * | p, |
const char * | name | ||
) |
Generates a witness for the remainder polynomial p, by identifying the smallest term in the polynomial and setting all its variables to 1.
p | Polynomial* for which counter examples are generated |
name | prefix name for the output file, suffix is '.cex' |
Polynomial* inc_spec_poly | ( | unsigned | i | ) |
Defines the slice specification for slice i: -s_i + PP_i
i | unsigned integer for the index of the slice |
std::vector<Polynomial*> merge_factors | ( | FILE * | file, |
std::vector< Polynomial * > | container | ||
) |
Merges computed factors of a slice of the same level. Prints PAC rules for the process. Used only when pac=1.
file | output file for PAC rules |
container | vector containing the factors, ordered by level |
Polynomial* mod_poly | ( | const Polynomial * | p1, |
bool | print_rule, | ||
FILE * | file | ||
) |
Reduces p1 by the constant 2^NN
p1 | Polynomial to be reduced |
print_rule | bool indicating whether we print the PAC rules |
file | output file for PAC rules |
const Polynomial* reduce | ( | FILE * | file | ) |
Incremental verification algorithm, where we reduce the slice-wise specifcations by the gate constraints of the slices
file | output file for PAC rules |
Polynomial* reduce_by_one_poly | ( | const Polynomial * | p1, |
Gate * | n, | ||
FILE * | file | ||
) |
Reduces p1 by the gate constraint of n
p1 | Polynomial to be reduced |
n | Gate |
file | output file for PAC rules |
void remove_internal_xor_gates | ( | FILE * | file | ) |
Remove all internal gates in identified XOR gates
file | output file for PAC rules |
void remove_single_occs_gates | ( | FILE * | file | ) |
Remove all single-parent gates (only one loop)
file | output file for PAC rules |
void remove_slice_minus_one_gates | ( | FILE * | file | ) |
Remove all gates that have not been assigned to a slice
file | output file for PAC rules |
void write_witness_vector | ( | const Term * | t, |
FILE * | file | ||
) |
Writes a vector to the file such that all input variables in the term t are set to 1, all other to 0.
t | Term |
file | output file for the counter example |
void write_witnesses | ( | const Polynomial * | p, |
FILE * | file | ||
) |
Search for the smallest term and calls write_witness_vector on that
p | Polynomial* for which counter examples are generated |
file | output file for the counter example |
std::vector<Polynomial*> factors_per_slice |
used to collect the factors of each slice for PAC proofs
bool nss = 0 |
defines whether printing nullstellensatz proofs is enabled
True, when the Nullstellensatz proof format is involved.
bool pac = 0 |
defines whether pac printing is enabled
True, when the PAC proof format is involved.
std::vector<Polynomial*> spec_of_slice |
used to collect the specification of each slice for PAC proofs