Skip to content

Commit

Permalink
test files for truncate gb
Browse files Browse the repository at this point in the history
  • Loading branch information
mohabsafey committed Feb 12, 2024
1 parent 9c40824 commit d7999e2
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ check_PROGRAMS = neogb_io \

checkdiff = test/diff/diff_cp_d_3_n_4_p_2.sh \
test/diff/diff_eco11-31.sh \
test/diff/diff_elim-31.sh \
test/diff/diff_truncate_gb.sh \
test/diff/diff_elim-31.sh \
test/diff/diff_elim-qq.sh \
test/diff/diff_F4SAT-31.sh \
test/diff/diff_F4SAT-byone-31.sh \
Expand Down
5 changes: 4 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,12 @@ AC_CONFIG_LINKS([
output_files/nonradical_radicalshape-no-square-qq.res:output_files/nonradical_radicalshape-no-square-qq.res
output_files/nonradical_radicalshape-no-square-qq.p3.res:output_files/nonradical_radicalshape-no-square-qq.p3.res
test/diff/diff_nonradical_radicalshape-no-square-qq.sh:test/diff/diff_nonradical_radicalshape-no-square-qq.sh
input_files/one-16.ms:input_files/one-16.ms
input_files/one-16.ms:input_files/one-16.ms
output_files/one-16.res:output_files/one-16.res
test/diff/diff_one-16.sh:test/diff/diff_one-16.sh
input_files/kat8-qq-truncate.ms:input_files/kat8-qq-truncate.ms
output_files/kat8-qq-truncate.res:output_files/kat8-qq-truncate.res
test/diff/diff_truncate_gb.sh:test/diff/diff_truncate_gb.sh
input_files/one-31.ms:input_files/one-31.ms
output_files/one-31.res:output_files/one-31.res
test/diff/diff_one-31.sh:test/diff/diff_one-31.sh
Expand Down
10 changes: 10 additions & 0 deletions input_files/kat8-qq-truncate.ms
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
x1,x2,x3,x4,x5,x6,x7,x8
0
x1+2*x2+2*x3+2*x4+2*x5+2*x6+2*x7+2*x8-1,
x1^2+2*x2^2+2*x3^2+2*x4^2+2*x5^2+2*x6^2+2*x7^2+2*x8^2-x1,
2*x1*x2+2*x2*x3+2*x3*x4+2*x4*x5+2*x5*x6+2*x6*x7+2*x7*x8-x2,
x2^2+2*x1*x3+2*x2*x4+2*x3*x5+2*x4*x6+2*x5*x7+2*x6*x8-x3,
2*x2*x3+2*x1*x4+2*x2*x5+2*x3*x6+2*x4*x7+2*x5*x8-x4,
x3^2+2*x2*x4+2*x1*x5+2*x2*x6+2*x3*x7+2*x4*x8-x5,
2*x3*x4+2*x2*x5+2*x1*x6+2*x2*x7+2*x3*x8-x6,
x4^2+2*x3*x5+2*x2*x6+2*x1*x7+2*x2*x8-x7
13 changes: 13 additions & 0 deletions output_files/kat8-qq-truncate.res
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#Truncated reduced Groebner basis data
#---
#field characteristic: 0
#variable order: x1, x2, x3, x4, x5, x6, x7, x8
#monomial order: graded reverse lexicographical
#length of basis: 5 elements sorted by increasing leading monomials
#---
[x1+2*x2+2*x3+2*x4+2*x5+2*x6+2*x7+2*x8-1,
15*x5^2+30*x4*x6+64*x5*x6+51*x6^2+30*x3*x7+64*x4*x7+102*x5*x7+144*x6*x7+95*x7^2+30*x2*x8+64*x3*x8+102*x4*x8+144*x5*x8+190*x6*x8+240*x7*x8+147*x8^2-1*x2-4*x3-9*x4-16*x5-25*x6-36*x7-49*x8,
30*x4*x5+30*x3*x6-34*x5*x6-36*x6^2+30*x2*x7-34*x4*x7-72*x5*x7-114*x6*x7-80*x7^2-60*x2*x8-94*x3*x8-132*x4*x8-174*x5*x8-220*x6*x8-270*x7*x8-192*x8^2+x2+4*x3+9*x4+16*x5+25*x6+36*x7+64*x8,
x4^2+2*x3*x5+2*x2*x6-4*x2*x7-4*x3*x7-4*x4*x7-4*x5*x7-4*x6*x7-4*x7^2+2*x2*x8-4*x7*x8+x7,
2*x3*x4+2*x2*x5-4*x2*x6-4*x3*x6-4*x4*x6-4*x5*x6-4*x6^2+2*x2*x7-4*x6*x7+2*x3*x8-4*x6*x8+x6
]:
49 changes: 49 additions & 0 deletions test/diff/diff_truncate_gb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/bash

file=kat8-qq-truncate

$(pwd)/msolve -f input_files/$file.ms -o test/diff/$file.res \
-N 5 -g 2 -l 2 -t 1
if [ $? -gt 0 ]; then
exit 1
fi

diff test/diff/$file.res output_files/$file.res
if [ $? -gt 0 ]; then
exit 2
fi

$(pwd)/msolve -f input_files/$file.ms -o test/diff/$file.res \
-N 5 -g 2 -l 2 -t 2
if [ $? -gt 0 ]; then
exit 21
fi

diff test/diff/$file.res output_files/$file.res
if [ $? -gt 0 ]; then
exit 22
fi

$(pwd)/msolve -f input_files/$file.ms -o test/diff/$file.res \
-N 5 -g 2 -l 44 -t 1
if [ $? -gt 0 ]; then
exit 41
fi

diff test/diff/$file.res output_files/$file.res
if [ $? -gt 0 ]; then
exit 42
fi

$(pwd)/msolve -f input_files/$file.ms -o test/diff/$file.res \
-N 5 -g 2 -l 44 -t 2
if [ $? -gt 0 ]; then
exit 61
fi

diff test/diff/$file.res output_files/$file.res
if [ $? -gt 0 ]; then
exit 62
fi

rm test/diff/$file.res

0 comments on commit d7999e2

Please sign in to comment.