Running the test suite
======================

just run "make"


Brief description of the test programs
======================================

bitpacking.c

    Read a polynomial from a text file, print its truth table using FES,
    using the bitpacked memory layout.  Check that FES is really in-place.

chevalley_warning.c 

	Read a polynomial f from a text file, then experimentally verify an
	interesting consequence of the Chevalley-Warning theorem.  Let f be a
	degree-d polynomial in n variables; if n >= d + 2, then the sum of all
	vectors x such that f(x) == 0 is equal to zero.  Uses FES with the
	array-of-bool memory representation.

demonstration_fes.c
demonstration_moebius.c
    
    Read a polynomial from a text file, print its truth table using FES /
    Moebius, respectively.  Uses the array-of-bool memory representation.
    Check that the operation is really in-place and that it produces the
    same result as repeated invocations of beanpole_eval().

parser.[ch]

	Utility code to read polynomial from text files.  The header describes the
	format.

product_bit.c
product_bool.c
product_vec.c

	Generate two random polynomials of the given degree and compute their
	product. Then check that the product is correct by computing their
	truth tables using Moebius and checking the product of the truth
	tables. This uses the bit-packed, array-of-bool, vectorized memory
	representation, respectively.  These programs are used to produce the
	multiplication speed benchmark in the companion paper.

ranking.c

	Check corner cases of the ranking / unranking functions.

subs.c

	Check the beanpole_subs() function.  It checks that the resulting polynomial 
	evaluates correctly and that the operation is involutive.

solver_fes.c
solver_moebius.c

	Generate a random system of 64 polynomials of the given degree with a
	known solution. Then find the solution by exhaustive search using FES
	or Moebius.  These programs are used to produce the results of the
	speed benchmark in the companion paper.

fes_ultra.c

	Walk through the truth table of **many** polynomials simultaneously using
	the FES algorithm and SIMD instructions.  This is a benchmark program.


Reproducing the benchmark results that appear in section 9 of the companion paper
=================================================================================

Disable Intel "Turbo Boost".  Under Linux, as root, run either:

echo 0 > /sys/devices/system/cpu/cpufreq/boost
or
echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo

Figure 11--12
-------------

for d in {2..16}
do
	time taskset 0x1 ./solver_fes     32 $d 30
	time taskset 0x1 ./solver_moebius 32 $d 30
done

for d in {2..12}
do
	time taskset 0x1 ./solver_fes     36 $d 30
	time taskset 0x1 ./solver_moebius 36 $d 30
done

for d in {2..12}
do
	time taskset 0x1 ./solver_fes     40 $d 30
	time taskset 0x1 ./solver_moebius 40 $d 30
done

for d in {2..11}
do
	time taskset 0x1 ./solver_fes     44 $d 30
	time taskset 0x1 ./solver_moebius 44 $d 30
done

for d in {2..10}
do
	time taskset 0x1 ./solver_fes     48 $d 30
	time taskset 0x1 ./solver_moebius 48 $d 30
done


Multiplication benchmark
------------------------

time taskset 0x1 ./product_bit 80 2 3
time taskset 0x1 ./product_bit 128 2 3
taskset 0x1 sage product.sage
taskset 0x1 magma product.magma


Crossbred benchmark
-------------------

# if AVX512 is available
make fes_ultra_avx512
time taskset 0x1 ./fes_ultra_avx512 20 4 8320

# AVX2 fallback
make fes_ultra_avx2
time taskset 0x1 ./fes_ultra_avx2 20 4 8320
