MCPcopy Create free account
hub / github.com/Singular/Singular / kTest_T

Function kTest_T

kernel/GBEngine/kutil.cc:799–922  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

797
798STATIC_VAR BOOLEAN sloppy_max = FALSE;
799BOOLEAN kTest_T(TObject * T, kStrategy strat, int i, char TN)
800{
801 ring tailRing = T->tailRing;
802 ring strat_tailRing = strat->tailRing;
803 if (strat_tailRing == NULL) strat_tailRing = tailRing;
804 r_assume(strat_tailRing == tailRing);
805
806 poly p = T->p;
807 // ring r = currRing;
808
809 if (T->p == NULL && T->t_p == NULL && i >= 0)
810 return dReportError("%c[%d].poly is NULL", TN, i);
811
812 if (T->p!=NULL)
813 {
814 nTest(pGetCoeff(T->p));
815 if ((T->t_p==NULL)&&(pNext(T->p)!=NULL)) p_Test(pNext(T->p),currRing);
816 }
817 if (T->t_p!=NULL)
818 {
819 nTest(pGetCoeff(T->t_p));
820 if (pNext(T->t_p)!=NULL) p_Test(pNext(T->t_p),strat_tailRing);
821 }
822 if ((T->p!=NULL)&&(T->t_p!=NULL)) assume(pGetCoeff(T->p)==pGetCoeff(T->t_p));
823
824 if (T->tailRing != currRing)
825 {
826 if (T->t_p == NULL && i > 0)
827 return dReportError("%c[%d].t_p is NULL", TN, i);
828 pFalseReturn(p_Test(T->t_p, T->tailRing));
829 if (T->p != NULL) pFalseReturn(p_LmTest(T->p, currRing));
830 if ((T->p != NULL) && (T->t_p != NULL))
831 {
832 const char* msg = kTest_LmEqual(T->p, T->t_p, T->tailRing);
833 if (msg != NULL)
834 return dReportError("%c[%d] %s", TN, i, msg);
835 // r = T->tailRing;
836 p = T->t_p;
837 }
838 if (T->p == NULL)
839 {
840 p = T->t_p;
841 // r = T->tailRing;
842 }
843 if (T->t_p != NULL && i >= 0 && TN == 'T')
844 {
845 if (pNext(T->t_p) == NULL)
846 {
847 if (T->max_exp != NULL)
848 return dReportError("%c[%d].max_exp is not NULL as it should be", TN, i);
849 }
850 else
851 {
852 if (T->max_exp == NULL)
853 return dReportError("%c[%d].max_exp is NULL", TN, i);
854 if (pNext(T->max_exp) != NULL)
855 return dReportError("pNext(%c[%d].max_exp) != NULL", TN, i);
856

Callers 12

kTest_LFunction · 0.85
kTestFunction · 0.85
enterTFunction · 0.85
enterT_strongFunction · 0.85
ksReducePolyZFunction · 0.85
ksReducePolyFunction · 0.85
ksReducePolyGCDFunction · 0.85
ksReducePolyLCFunction · 0.85
ksReducePolyBoundFunction · 0.85
ksReducePolySigFunction · 0.85
ksReducePolySigRingFunction · 0.85
doRedFunction · 0.85

Calls 10

dReportErrorFunction · 0.85
kTest_LmEqualFunction · 0.85
p_CheckPolyRingFunction · 0.85
p_GetMaxExpPFunction · 0.85
p_SetmFunction · 0.85
p_LmFreeFunction · 0.85
rIsSyzIndexRingFunction · 0.85
pLengthFunction · 0.85
pFDegMethod · 0.80
p_ExpVectorEqualFunction · 0.50

Tested by

no test coverage detected