Changeset 73ba50 in git


Ignore:
Timestamp:
Nov 30, 2014, 5:02:25 PM (9 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'e7cc1ebecb61be8b9ca6c18016352af89940b21a')
Children:
a7575a10aee0a3dae7dfe5c11fe477c57552464d
Parents:
10478c89d2b549aa165d123e05fd493ee4c8d415
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2014-11-30 17:02:25+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2014-11-30 18:22:50+01:00
Message:
Renamed some memebers __*__ -> OPT__\1
Location:
Singular/dyn_modules/syzextra
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Singular/dyn_modules/syzextra/mod_main.cc

    r10478c r73ba50  
    507507  const SchreyerSyzygyComputationFlags attributes(currRingHdl);
    508508
    509   const BOOLEAN __DEBUG__      = attributes.__DEBUG__;
    510 //  const BOOLEAN __SYZCHECK__   = attributes.__SYZCHECK__;
    511   const BOOLEAN __LEAD2SYZ__   = attributes.__LEAD2SYZ__;
    512 //  const BOOLEAN __HYBRIDNF__   = attributes.__HYBRIDNF__;
    513 //  const BOOLEAN __TAILREDSYZ__ = attributes.__TAILREDSYZ__;
     509  const BOOLEAN OPT__DEBUG      = attributes.OPT__DEBUG;
     510//  const BOOLEAN OPT__SYZCHECK   = attributes.OPT__SYZCHECK;
     511  const BOOLEAN OPT__LEAD2SYZ   = attributes.OPT__LEAD2SYZ;
     512//  const BOOLEAN OPT__HYBRIDNF   = attributes.OPT__HYBRIDNF;
     513//  const BOOLEAN OPT__TAILREDSYZ = attributes.OPT__TAILREDSYZ;
    514514
    515515  const ring r = attributes.m_rBaseRing;
     
    530530    assume(id != NULL);
    531531
    532     if( UNLIKELY( __DEBUG__ ) )
     532    if( UNLIKELY( OPT__DEBUG ) )
    533533    {
    534534      PrintS("ComputeLeadingSyzygyTerms::Input: \n");
     
    536536    }
    537537
    538     assume( !__LEAD2SYZ__ );
     538    assume( !OPT__LEAD2SYZ );
    539539
    540540    h = h->Next(); assume (h == NULL);
     
    557557  const SchreyerSyzygyComputationFlags attributes(currRingHdl);
    558558
    559   const BOOLEAN __DEBUG__      = FALSE; // attributes.__DEBUG__;
    560 //  const BOOLEAN __SYZCHECK__   = attributes.__SYZCHECK__;
    561 //  const BOOLEAN __LEAD2SYZ__   = attributes.__LEAD2SYZ__;
    562 //  const BOOLEAN __HYBRIDNF__   = attributes.__HYBRIDNF__;
    563 //  const BOOLEAN __TAILREDSYZ__ = attributes.__TAILREDSYZ__;
     559  const BOOLEAN OPT__DEBUG      = FALSE; // attributes.OPT__DEBUG;
     560//  const BOOLEAN OPT__SYZCHECK   = attributes.OPT__SYZCHECK;
     561//  const BOOLEAN OPT__LEAD2SYZ   = attributes.OPT__LEAD2SYZ;
     562//  const BOOLEAN OPT__HYBRIDNF   = attributes.OPT__HYBRIDNF;
     563//  const BOOLEAN OPT__TAILREDSYZ = attributes.OPT__TAILREDSYZ;
    564564
    565565  NoReturn(res);
     
    585585    assume(id != NULL);
    586586
    587     if( UNLIKELY( __DEBUG__ ) )
     587    if( UNLIKELY( OPT__DEBUG ) )
    588588    {
    589589      PrintS("Sort_c_ds::Input: \n");
     
    600600//    res->rtyp = h->Typ();
    601601
    602     if( UNLIKELY( __DEBUG__ ) )
     602    if( UNLIKELY( OPT__DEBUG ) )
    603603    {
    604604      PrintS("Sort_c_ds::Output: \n");
     
    619619  const SchreyerSyzygyComputationFlags attributes(currRingHdl);
    620620
    621   const BOOLEAN __DEBUG__      = attributes.__DEBUG__;
    622 //  const BOOLEAN __SYZCHECK__   = attributes.__SYZCHECK__;
    623   const BOOLEAN __LEAD2SYZ__   = attributes.__LEAD2SYZ__;
    624 //  const BOOLEAN __HYBRIDNF__   = attributes.__HYBRIDNF__;
    625 //  const BOOLEAN __TAILREDSYZ__ = attributes.__TAILREDSYZ__;
     621  const BOOLEAN OPT__DEBUG      = attributes.OPT__DEBUG;
     622//  const BOOLEAN OPT__SYZCHECK   = attributes.OPT__SYZCHECK;
     623  const BOOLEAN OPT__LEAD2SYZ   = attributes.OPT__LEAD2SYZ;
     624//  const BOOLEAN OPT__HYBRIDNF   = attributes.OPT__HYBRIDNF;
     625//  const BOOLEAN OPT__TAILREDSYZ = attributes.OPT__TAILREDSYZ;
    626626
    627627  const ring r = attributes.m_rBaseRing;
     
    636636  assume( h != NULL );
    637637
    638   assume( __LEAD2SYZ__ ); // ???
     638  assume( OPT__LEAD2SYZ ); // ???
    639639
    640640  if( h->Typ() == IDEAL_CMD || h->Typ() == MODUL_CMD)
     
    644644    assume(id != NULL);
    645645
    646     if( UNLIKELY( __DEBUG__ ) )
     646    if( UNLIKELY( OPT__DEBUG ) )
    647647    {
    648648      PrintS("Compute2LeadingSyzygyTerms::Input: \n");
     
    669669  const SchreyerSyzygyComputationFlags attributes(currRingHdl);
    670670
    671   const BOOLEAN __DEBUG__      = attributes.__DEBUG__;
    672 //   const BOOLEAN __SYZCHECK__   = attributes.__SYZCHECK__;
    673 //   const BOOLEAN __LEAD2SYZ__   = attributes.__LEAD2SYZ__;
    674 //   const BOOLEAN __HYBRIDNF__   = attributes.__HYBRIDNF__;
    675   const BOOLEAN __TAILREDSYZ__ = attributes.__TAILREDSYZ__;
     671  const BOOLEAN OPT__DEBUG      = attributes.OPT__DEBUG;
     672//   const BOOLEAN OPT__SYZCHECK   = attributes.OPT__SYZCHECK;
     673//   const BOOLEAN OPT__LEAD2SYZ   = attributes.OPT__LEAD2SYZ;
     674//   const BOOLEAN OPT__HYBRIDNF   = attributes.OPT__HYBRIDNF;
     675  const BOOLEAN OPT__TAILREDSYZ = attributes.OPT__TAILREDSYZ;
    676676
    677677  const char* usage = "`FindReducer(<poly/vector>, <vector/0>, <ideal/module>[,<module>])` expected";
     
    724724
    725725#ifndef SING_NDEBUG
    726   if( LIKELY( __TAILREDSYZ__) )
     726  if( LIKELY( OPT__TAILREDSYZ) )
    727727    assume (LS != NULL);
    728728#endif
     
    730730  assume( h == NULL );
    731731
    732   if( UNLIKELY(__DEBUG__) )
     732  if( UNLIKELY(OPT__DEBUG) )
    733733  {
    734734    PrintS("FindReducer(product, syzterm, L, T, #)::Input: \n");
     
    751751  res->data = FindReducer(product, syzterm, L, LS, attributes);
    752752
    753   if( UNLIKELY( __DEBUG__ ) )
     753  if( UNLIKELY( OPT__DEBUG ) )
    754754  {
    755755    PrintS("FindReducer::Output: \n");
     
    766766  const SchreyerSyzygyComputationFlags attributes(currRingHdl);
    767767
    768   const BOOLEAN __DEBUG__      = attributes.__DEBUG__;
    769 //   const BOOLEAN __SYZCHECK__   = attributes.__SYZCHECK__;
    770 //   const BOOLEAN __LEAD2SYZ__   = attributes.__LEAD2SYZ__;
    771   const BOOLEAN __HYBRIDNF__   = attributes.__HYBRIDNF__;
    772   const BOOLEAN __TAILREDSYZ__ = attributes.__TAILREDSYZ__;
     768  const BOOLEAN OPT__DEBUG      = attributes.OPT__DEBUG;
     769//   const BOOLEAN OPT__SYZCHECK   = attributes.OPT__SYZCHECK;
     770//   const BOOLEAN OPT__LEAD2SYZ   = attributes.OPT__LEAD2SYZ;
     771  const BOOLEAN OPT__HYBRIDNF   = attributes.OPT__HYBRIDNF;
     772  const BOOLEAN OPT__TAILREDSYZ = attributes.OPT__TAILREDSYZ;
    773773
    774774  const char* usage = "`SchreyerSyzygyNF(<vector>, <vector>, <ideal/module>, <ideal/module>[,<module>])` expected";
     
    777777  NoReturn(res);
    778778
    779   assume( __HYBRIDNF__ ); // ???
     779  assume( OPT__HYBRIDNF ); // ???
    780780
    781781  if ((h==NULL) || (h->Typ() != VECTOR_CMD) || (h->Data() == NULL))
     
    828828
    829829#ifndef SING_NDEBUG
    830   if( LIKELY( __TAILREDSYZ__) )
     830  if( LIKELY( OPT__TAILREDSYZ) )
    831831    assume (LS != NULL);
    832832#endif
     
    834834  assume( h == NULL );
    835835
    836   if( UNLIKELY( __DEBUG__ ) )
     836  if( UNLIKELY( OPT__DEBUG ) )
    837837  {
    838838    PrintS("SchreyerSyzygyNF(syz_lead, syz_2, L, T, #)::Input: \n");
     
    857857                               (syz_2!=NULL)? p_Copy(syz_2, r): syz_2, L, T, LS, attributes);
    858858
    859   if( UNLIKELY( __DEBUG__ ) )
     859  if( UNLIKELY( OPT__DEBUG ) )
    860860  {
    861861    PrintS("SchreyerSyzygyNF::Output: ");
     
    875875  const SchreyerSyzygyComputationFlags attributes(currRingHdl);
    876876
    877   const BOOLEAN __DEBUG__      = attributes.__DEBUG__;
    878 //  const BOOLEAN __SYZCHECK__   = attributes.__SYZCHECK__;
    879 //   const BOOLEAN __LEAD2SYZ__   = attributes.__LEAD2SYZ__;
    880 //   const BOOLEAN __HYBRIDNF__   = attributes.__HYBRIDNF__;
    881   const BOOLEAN __TAILREDSYZ__ = attributes.__TAILREDSYZ__;
     877  const BOOLEAN OPT__DEBUG      = attributes.OPT__DEBUG;
     878//  const BOOLEAN OPT__SYZCHECK   = attributes.OPT__SYZCHECK;
     879//   const BOOLEAN OPT__LEAD2SYZ   = attributes.OPT__LEAD2SYZ;
     880//   const BOOLEAN OPT__HYBRIDNF   = attributes.OPT__HYBRIDNF;
     881  const BOOLEAN OPT__TAILREDSYZ = attributes.OPT__TAILREDSYZ;
    882882
    883883  const char* usage = "`ReduceTerm(<poly>, <poly/vector>, <vector/0>, <ideal/module>, <ideal/module>[,<module>])` expected";
     
    949949
    950950#ifndef SING_NDEBUG
    951   if( LIKELY( __TAILREDSYZ__) )
     951  if( LIKELY( OPT__TAILREDSYZ) )
    952952    assume (LS != NULL);
    953953#endif
     
    955955  assume( h == NULL );
    956956
    957   if( UNLIKELY( __DEBUG__ ) )
     957  if( UNLIKELY( OPT__DEBUG ) )
    958958  {
    959959    PrintS("ReduceTerm(m, t, syzterm, L, T, #)::Input: \n");
     
    976976
    977977
    978   if ( UNLIKELY( __DEBUG__ && syztermCheck != NULL) )
     978  if ( UNLIKELY( OPT__DEBUG && syztermCheck != NULL) )
    979979  {
    980980    const int c = p_GetComp(syztermCheck, r) - 1;
     
    10011001
    10021002
    1003   if( UNLIKELY( __DEBUG__ ) )
     1003  if( UNLIKELY( OPT__DEBUG ) )
    10041004  {
    10051005    PrintS("ReduceTerm::Output: ");
     
    10201020  const SchreyerSyzygyComputationFlags attributes(currRingHdl);
    10211021
    1022   const BOOLEAN __DEBUG__      = attributes.__DEBUG__;
    1023 //   const BOOLEAN __SYZCHECK__   = attributes.__SYZCHECK__;
    1024 //   const BOOLEAN __LEAD2SYZ__   = attributes.__LEAD2SYZ__;
    1025 //   const BOOLEAN __HYBRIDNF__   = attributes.__HYBRIDNF__;
    1026   const BOOLEAN __TAILREDSYZ__ = attributes.__TAILREDSYZ__;
     1022  const BOOLEAN OPT__DEBUG      = attributes.OPT__DEBUG;
     1023//   const BOOLEAN OPT__SYZCHECK   = attributes.OPT__SYZCHECK;
     1024//   const BOOLEAN OPT__LEAD2SYZ   = attributes.OPT__LEAD2SYZ;
     1025//   const BOOLEAN OPT__HYBRIDNF   = attributes.OPT__HYBRIDNF;
     1026  const BOOLEAN OPT__TAILREDSYZ = attributes.OPT__TAILREDSYZ;
    10271027
    10281028  const char* usage = "`TraverseTail(<poly>, <poly/vector>, <ideal/module>, <ideal/module>[,<module>])` expected";
     
    10821082
    10831083#ifndef SING_NDEBUG
    1084   if( LIKELY( __TAILREDSYZ__) )
     1084  if( LIKELY( OPT__TAILREDSYZ) )
    10851085    assume (LS != NULL);
    10861086#endif
     
    10881088  assume( h == NULL );
    10891089
    1090   if( UNLIKELY( __DEBUG__ ) )
     1090  if( UNLIKELY( OPT__DEBUG ) )
    10911091  {
    10921092    PrintS("TraverseTail(m, t, L, T, #)::Input: \n");
     
    11111111
    11121112
    1113   if( UNLIKELY( __DEBUG__ ) )
     1113  if( UNLIKELY( OPT__DEBUG ) )
    11141114  {
    11151115    PrintS("TraverseTail::Output: ");
     
    11251125  const SchreyerSyzygyComputationFlags attributes(currRingHdl);
    11261126
    1127   const BOOLEAN __DEBUG__      = attributes.__DEBUG__;
     1127  const BOOLEAN OPT__DEBUG      = attributes.OPT__DEBUG;
    11281128
    11291129  const char* usage = "`ComputeResolution(<ideal/module>, <same as before>, <same as before>[,int])` expected";
     
    11831183    length = 1 + rVar(r);
    11841184
    1185   if( UNLIKELY( __DEBUG__ ) )
     1185  if( UNLIKELY( OPT__DEBUG ) )
    11861186  {
    11871187    PrintS("ComputeResolution(M, length)::Input: \n");
     
    12031203  _res->fullres[index++] = M;
    12041204
    1205 //  if (UNLIKELY(attributes.__TREEOUTPUT__))
    1206 //    Print("{ \"RESOLUTION: HYBRIDNF:%d, TAILREDSYZ: %d, LEAD2SYZ: %d, IGNORETAILS: %d\": [\n", attributes.__HYBRIDNF__, attributes.__TAILREDSYZ__, attributes.__LEAD2SYZ__, attributes.__IGNORETAILS__);
     1205//  if (UNLIKELY(attributes.OPT__TREEOUTPUT))
     1206//    Print("{ \"RESOLUTION: HYBRIDNF:%d, TAILREDSYZ: %d, LEAD2SYZ: %d, IGNORETAILS: %d\": [\n", attributes.OPT__HYBRIDNF, attributes.OPT__TAILREDSYZ, attributes.OPT__LEAD2SYZ, attributes.OPT__IGNORETAILS);
    12071207
    12081208  while( (!idIs0(L)) && (index < length))
     
    12131213    ComputeSyzygy(L, T, LL, TT, attributes);
    12141214
    1215     if( UNLIKELY( __DEBUG__ ) )
     1215    if( UNLIKELY( OPT__DEBUG ) )
    12161216    {
    12171217      Print("ComputeResolution()::Separated Syzygy[%d]: \n", index);
     
    12351235    M->rank = id_RankFreeModule(M, r);
    12361236
    1237     if( UNLIKELY( __DEBUG__ ) )
     1237    if( UNLIKELY( OPT__DEBUG ) )
    12381238    {
    12391239      Print("ComputeResolution()::Restored Syzygy[%d]: \n", index);
     
    12431243    _res->fullres[index++] = M; // ???
    12441244  }
    1245 //  if ( UNLIKELY(attributes.__TREEOUTPUT__) )
     1245//  if ( UNLIKELY(attributes.OPT__TREEOUTPUT) )
    12461246//    PrintS("] }\n");
    12471247
     
    12511251  res->rtyp = RESOLUTION_CMD;
    12521252
    1253   if( UNLIKELY(__DEBUG__) )
     1253  if( UNLIKELY(OPT__DEBUG) )
    12541254  {
    12551255    Print("ComputeResolution::Output (index: %d): ", index);
     
    12731273  const SchreyerSyzygyComputationFlags attributes(currRingHdl);
    12741274
    1275   const BOOLEAN __DEBUG__      = attributes.__DEBUG__;
    1276 //   const BOOLEAN __SYZCHECK__   = attributes.__SYZCHECK__;
    1277 //   const BOOLEAN __LEAD2SYZ__   = attributes.__LEAD2SYZ__;
    1278 //   const BOOLEAN __HYBRIDNF__   = attributes.__HYBRIDNF__;
    1279 //   const BOOLEAN __TAILREDSYZ__ = attributes.__TAILREDSYZ__;
     1275  const BOOLEAN OPT__DEBUG      = attributes.OPT__DEBUG;
     1276//   const BOOLEAN OPT__SYZCHECK   = attributes.OPT__SYZCHECK;
     1277//   const BOOLEAN OPT__LEAD2SYZ   = attributes.OPT__LEAD2SYZ;
     1278//   const BOOLEAN OPT__HYBRIDNF   = attributes.OPT__HYBRIDNF;
     1279//   const BOOLEAN OPT__TAILREDSYZ = attributes.OPT__TAILREDSYZ;
    12801280
    12811281  const char* usage = "`ComputeSyzygy(<ideal/module>, <ideal/module>)` expected";
     
    13071307  h = h->Next(); assume( h == NULL );
    13081308
    1309   if( UNLIKELY( __DEBUG__ ) )
     1309  if( UNLIKELY( OPT__DEBUG ) )
    13101310  {
    13111311    PrintS("ComputeSyzygy(L, T)::Input: \n");
     
    13261326  res->data = l; res->rtyp = LIST_CMD;
    13271327
    1328   if( UNLIKELY( __DEBUG__ ) )
     1328  if( UNLIKELY( OPT__DEBUG ) )
    13291329  {
    13301330    PrintS("ComputeSyzygy::Output: \nLL: \n");
  • Singular/dyn_modules/syzextra/syzextra.cc

    r10478c r73ba50  
    224224
    225225#ifndef SING_NDEBUG
    226   const int __DEBUG__ = 0;
    227   if( __DEBUG__ )
     226  const int OPT__DEBUG = 0;
     227  if( OPT__DEBUG )
    228228  {
    229229    PrintS("cmp_c_ds: a, b: \np1: "); dPrint(a, r, r, 0);
     
    253253
    254254#ifndef SING_NDEBUG
    255   if( __DEBUG__ )
     255  if( OPT__DEBUG )
    256256  {
    257257    PrintS("cmp_c_ds: a & b have the same comp & deg! "); PrintLn();
     
    297297
    298298#ifndef SING_NDEBUG
    299   const int __DEBUG__ = 0;
    300   if( __DEBUG__ )
     299  const int OPT__DEBUG = 0;
     300  if( OPT__DEBUG )
    301301  {
    302302    PrintS("cmp_lex: a, b: \np1: "); dPrint(a, r, r, 0);
     
    588588  assume( t != NULL );
    589589
    590   if( UNLIKELY(__DEBUG__ & __TAILREDSYZ__) )
     590  if( UNLIKELY(OPT__DEBUG & OPT__TAILREDSYZ) )
    591591    assume( !IsDivisible(t) ); // each input term should NOT be in <L>
    592592
     
    594594
    595595
    596   if( LIKELY(__TAILREDSYZ__) )
     596  if( LIKELY(OPT__TAILREDSYZ) )
    597597    if( p_LmIsConstant(t, r) ) // most basic case of baing coprime with L, whatever that is...
    598598      return 1; // TODO: prove this...?
     
    612612  const bool bSyzCheck = syzChecker.IsNonempty(); // need to check even in ideal case????? proof?  "&& !bIdealCase"
    613613
    614   if( LIKELY(__TAILREDSYZ__ && (bIdealCase || bSyzCheck)) )
     614  if( LIKELY(OPT__TAILREDSYZ && (bIdealCase || bSyzCheck)) )
    615615  {
    616616    const TReducers& v = itr->second;
     
    626626      assume( p_GetComp(p, r) == comp );
    627627
    628       // TODO: check if coprime with Leads... if __TAILREDSYZ__ !
     628      // TODO: check if coprime with Leads... if OPT__TAILREDSYZ !
    629629      for( int var = N; var > 0; --var )
    630630        if( (p_GetExp(p, var, r) != 0) && (p_GetExp(t, var, r) != 0) )
    631631        {
    632632#ifndef SING_NDEBUG
    633           if( __DEBUG__ | 0)
     633          if( OPT__DEBUG | 0)
    634634          {
    635635            PrintS("CReducerFinder::PreProcessTerm, 't' is NOT co-prime with the following leading term: \n");
     
    651651
    652652#ifndef SING_NDEBUG
    653         if( __DEBUG__ && !coprime)
     653        if( OPT__DEBUG && !coprime)
    654654        {
    655655          PrintS("CReducerFinder::PreProcessTerm, 't' is co-prime with p but may lead to NOT divisible syz.term: \n");
     
    666666
    667667#ifndef SING_NDEBUG
    668     if( __DEBUG__ && coprime )
     668    if( OPT__DEBUG && coprime )
    669669      PrintS("CReducerFinder::PreProcessTerm, the following 't' is 'co-prime' with all of leading terms! \n");
    670670#endif
     
    689689 
    690690#ifndef SING_NDEBUG
    691   if( __DEBUG__ | 0)
     691  if( OPT__DEBUG | 0)
    692692  {
    693693    PrintS("SchreyerSyzygyComputation::SetUpTailTerms(): Tails: \n");
     
    708708      {
    709709#ifndef SING_NDEBUG
    710         if( __DEBUG__)
     710        if( OPT__DEBUG)
    711711        {
    712712          Print("SchreyerSyzygyComputation::SetUpTailTerms(): PP (%d) the following TT: \n", k);
     
    723723
    724724#ifndef SING_NDEBUG
    725   if( __DEBUG__ | 0)
     725  if( OPT__DEBUG | 0)
    726726  {
    727727    PrintS("SchreyerSyzygyComputation::SetUpTailTerms(): Preprocessed Tails: \n");
     
    730730#endif
    731731
    732   if( UNLIKELY(__PROT__) )
     732  if( UNLIKELY(OPT__PROT) )
    733733  {
    734734    Print("(PP/ST: {c: %lu, C: %lu, P: %lu} + %lu)", pp[1], pp[2], pp[3], pp[0]);
     
    779779//  const SchreyerSyzygyComputationFlags& attributes = m_atttributes;
    780780
    781   assume(!__LEAD2SYZ__);
     781  assume(!OPT__LEAD2SYZ);
    782782
    783783  // 1. set of components S?
     
    850850  }
    851851
    852 //   if( __DEBUG__ & FALSE )
     852//   if( OPT__DEBUG & FALSE )
    853853//   {
    854854//     PrintS("ComputeLeadingSyzygyTerms::Temp0: \n");
     
    862862  id_DelDiv(newid, r); // #define SIMPL_LMDIV 32
    863863
    864 //   if( __DEBUG__ & FALSE )
     864//   if( OPT__DEBUG & FALSE )
    865865//   {
    866866//     PrintS("ComputeLeadingSyzygyTerms::Temp1: \n");
     
    870870  idSkipZeroes(newid); // #define SIMPL_NULL 2
    871871
    872 //   if( __DEBUG__ )
     872//   if( OPT__DEBUG )
    873873//   {
    874874//     PrintS("ComputeLeadingSyzygyTerms::Output: \n");
     
    979979  }
    980980
    981 //   if( __DEBUG__ & FALSE )
     981//   if( OPT__DEBUG & FALSE )
    982982//   {
    983983//     PrintS("Compute2LeadingSyzygyTerms::Temp0: \n");
     
    985985//   }
    986986
    987   if( UNLIKELY(!__TAILREDSYZ__) )
     987  if( UNLIKELY(!OPT__TAILREDSYZ) )
    988988  {
    989989      // simplify(newid, 2 + 32)??
     
    991991    id_DelDiv(newid, r); // #define SIMPL_LMDIV 32
    992992
    993 //     if( __DEBUG__ & FALSE )
     993//     if( OPT__DEBUG & FALSE )
    994994//     {
    995995//       PrintS("Compute2LeadingSyzygyTerms::Temp1 (deldiv): \n");
     
    10161016    newid = tmp;
    10171017
    1018 //     if( __DEBUG__ & FALSE )
     1018//     if( OPT__DEBUG & FALSE )
    10191019//     {
    10201020//       PrintS("Compute2LeadingSyzygyTerms::Temp1 (std): \n");
     
    10341034{
    10351035#ifndef SING_NDEBUG
    1036   if( __DEBUG__ )  {    m_div.Verify();    m_checker.Verify();  }
     1036  if( OPT__DEBUG )  {    m_div.Verify();    m_checker.Verify();  }
    10371037#endif
    10381038
     
    10501050
    10511051#ifndef SING_NDEBUG
    1052   if( __DEBUG__ )
     1052  if( OPT__DEBUG )
    10531053  {
    10541054    PrintS("SchreyerSyzygyComputation::TraverseNF(syz_lead, poly syz_2), \n");
     
    10611061#endif
    10621062 
    1063   if( UNLIKELY(__TREEOUTPUT__) )
     1063  if( UNLIKELY(OPT__TREEOUTPUT) )
    10641064  {
    10651065     PrintS("{ \"proc\": \"TraverseNF\", \"nodelabel\": \"");
     
    10711071
    10721072#ifndef SING_NDEBUG
    1073   if( __DEBUG__ )  {    m_div.Verify();    m_checker.Verify();  }
     1073  if( OPT__DEBUG )  {    m_div.Verify();    m_checker.Verify();  }
    10741074#endif
    10751075
     
    10781078  if( a2 != NULL )
    10791079  {
    1080     assume( __LEAD2SYZ__ );
    1081 
    1082     if( UNLIKELY(__TREEOUTPUT__) )
     1080    assume( OPT__LEAD2SYZ );
     1081
     1082    if( UNLIKELY(OPT__TREEOUTPUT) )
    10831083    {
    10841084 
     
    10981098
    10991099   
    1100     if( UNLIKELY(__TREEOUTPUT__) )
     1100    if( UNLIKELY(OPT__TREEOUTPUT) )
    11011101    {
    11021102      PrintS("], \"noderesult\": \"");
     
    11081108
    11091109#ifndef SING_NDEBUG
    1110     if( __DEBUG__ )    {      m_div.Verify();      m_checker.Verify();    }
     1110    if( OPT__DEBUG )    {      m_div.Verify();      m_checker.Verify();    }
    11111111#endif
    11121112   
     
    11161116  p_Delete(&aa, R);
    11171117
    1118   if( UNLIKELY(__TREEOUTPUT__) )
     1118  if( UNLIKELY(OPT__TREEOUTPUT) )
    11191119  {
    11201120//     poly tt = pp_Add_qq( a, t, R);
     
    11251125  }
    11261126#ifndef SING_NDEBUG
    1127   if( __DEBUG__ )
     1127  if( OPT__DEBUG )
    11281128  {
    11291129    PrintS("SchreyerSyzygyComputation::TraverseNF(syz_lead, poly syz_2), ==>>> \n");
     
    11341134
    11351135#ifndef SING_NDEBUG
    1136   if( __DEBUG__ )  {    m_div.Verify();    m_checker.Verify();  }
     1136  if( OPT__DEBUG )  {    m_div.Verify();    m_checker.Verify();  }
    11371137#endif
    11381138 
     
    11431143{
    11441144#ifndef SING_NDEBUG
    1145   if( __DEBUG__ )  {    m_div.Verify();    m_checker.Verify();  }
     1145  if( OPT__DEBUG )  {    m_div.Verify();    m_checker.Verify();  }
    11461146#endif
    11471147
     
    11691169#endif
    11701170
    1171   if( UNLIKELY(__TREEOUTPUT__) )
    1172     Print("\n{ \"syzygylayer\": \"%d\", \"hybridnf\": \"%d\", \"diagrams\": \n[", __SYZNUMBER__, __HYBRIDNF__ );
     1171  if( UNLIKELY(OPT__TREEOUTPUT) )
     1172    Print("\n{ \"syzygylayer\": \"%d\", \"hybridnf\": \"%d\", \"diagrams\": \n[", OPT__SYZNUMBER, OPT__HYBRIDNF );
    11731173 
    1174   if( UNLIKELY(__PROT__) ) Print("\n[%d]", __SYZNUMBER__ );
     1174  if( UNLIKELY(OPT__PROT) ) Print("\n[%d]", OPT__SYZNUMBER );
    11751175
    11761176  if( m_syzLeads == NULL )
    11771177  {
    11781178#ifdef SING_NDEBUG
    1179     if( UNLIKELY(__PROT__ & RTIMER_BENCHMARKING) )
     1179    if( UNLIKELY(OPT__PROT & RTIMER_BENCHMARKING) )
    11801180    {
    11811181      t = getTimer(); r = getRTimer();
     
    11841184#endif
    11851185     
    1186     ComputeLeadingSyzygyTerms( __LEAD2SYZ__ && !__IGNORETAILS__ ); // 2 terms OR 1 term!
     1186    ComputeLeadingSyzygyTerms( OPT__LEAD2SYZ && !OPT__IGNORETAILS ); // 2 terms OR 1 term!
    11871187     
    11881188#ifdef SING_NDEBUG
    1189     if( UNLIKELY(__PROT__ & RTIMER_BENCHMARKING) )
     1189    if( UNLIKELY(OPT__PROT & RTIMER_BENCHMARKING) )
    11901190    {
    11911191      t = getTimer() - t; r = getRTimer() - r;
     
    12041204  if( size == 1 && LL->m[0] == NULL )
    12051205  {
    1206      if( UNLIKELY(__TREEOUTPUT__) )
     1206     if( UNLIKELY(OPT__TREEOUTPUT) )
    12071207       PrintS("]},");
    12081208     return;
     
    12111211
    12121212  // use hybrid (Schreyer NF) method?
    1213   const bool method = (__HYBRIDNF__  == 1); //  || (__HYBRIDNF__ == 2 && __SYZNUMBER__ < 3);
    1214 
    1215   if( UNLIKELY(__PROT__) ) Print("[%s NF|%s]",(method) ? "PR" : "TT", (NOPRODUCT == 1)? "_,_": "^*^" );
     1213  const bool method = (OPT__HYBRIDNF  == 1); //  || (OPT__HYBRIDNF == 2 && OPT__SYZNUMBER < 3);
     1214
     1215  if( UNLIKELY(OPT__PROT) ) Print("[%s NF|%s]",(method) ? "PR" : "TT", (NOPRODUCT == 1)? "_,_": "^*^" );
    12161216   
    12171217
    1218   if(  LIKELY(!__IGNORETAILS__) )
     1218  if(  LIKELY(!OPT__IGNORETAILS) )
    12191219  {
    12201220    if( T != NULL )
    12211221    {
    12221222#ifdef SING_NDEBUG
    1223       if( UNLIKELY(__PROT__ & RTIMER_BENCHMARKING) )
     1223      if( UNLIKELY(OPT__PROT & RTIMER_BENCHMARKING) )
    12241224      {
    12251225        t = getTimer(); r = getRTimer();
     
    12311231       
    12321232#ifdef SING_NDEBUG
    1233       if( UNLIKELY(__PROT__ & RTIMER_BENCHMARKING) )
     1233      if( UNLIKELY(OPT__PROT & RTIMER_BENCHMARKING) )
    12341234      {
    12351235        t = getTimer() - t; r = getRTimer() - r;
     
    12411241
    12421242#ifdef SING_NDEBUG
    1243   if( UNLIKELY(__PROT__ & RTIMER_BENCHMARKING) )
     1243  if( UNLIKELY(OPT__PROT & RTIMER_BENCHMARKING) )
    12441244  {
    12451245    t = getTimer(); r = getRTimer();
     
    12491249
    12501250#ifndef SING_NDEBUG
    1251   if( __DEBUG__ )  {    m_div.Verify();    m_checker.Verify();  }
     1251  if( OPT__DEBUG )  {    m_div.Verify();    m_checker.Verify();  }
    12521252#endif
    12531253 
     
    12631263      pNext(a) = NULL;
    12641264
    1265     if( UNLIKELY(__IGNORETAILS__) )
     1265    if( UNLIKELY(OPT__IGNORETAILS) )
    12661266    {
    12671267      TT->m[k] = NULL;
     
    12781278
    12791279#ifndef SING_NDEBUG
    1280     if( __DEBUG__ )    {      m_div.Verify();      m_checker.Verify();    }
     1280    if( OPT__DEBUG )    {      m_div.Verify();      m_checker.Verify();    }
    12811281#endif
    12821282
     
    12891289
    12901290#ifndef SING_NDEBUG
    1291     if( __DEBUG__ )    {      m_div.Verify();      m_checker.Verify();    }
     1291    if( OPT__DEBUG )    {      m_div.Verify();      m_checker.Verify();    }
    12921292#endif
    12931293
    12941294    TT->m[k] = nf;
    12951295   
    1296     if( UNLIKELY(__SYZCHECK__) )
     1296    if( UNLIKELY(OPT__SYZCHECK) )
    12971297    {
    12981298      // TODO: check the correctness (syzygy property): a + TT->m[k] should be a syzygy!!!
     
    13021302      poly vp = p_VectorProductLT(s, L, T, R);
    13031303
    1304       if( UNLIKELY( __DEBUG__ && (vp != NULL) && ! __TREEOUTPUT__ ) )
     1304      if( UNLIKELY( OPT__DEBUG && (vp != NULL) && ! OPT__TREEOUTPUT ) )
    13051305      {
    13061306        Warn("SchreyerSyzygyComputation::ComputeSyzygy: failed syzygy property for syzygy [%d], non-zero image is as follows: ", k);       
     
    13341334
    13351335#ifndef SING_NDEBUG
    1336         if( __DEBUG__ )        {          m_div.Verify();          m_checker.Verify();         }
     1336        if( OPT__DEBUG )        {          m_div.Verify();          m_checker.Verify();         }
    13371337#endif
    13381338       
     
    13401340        assume( vp == NULL );
    13411341
    1342       if( UNLIKELY( __PROT__ && (vp != NULL) ) ) Warn("ERROR: SyzCheck failed, wrong tail: [%d]\n\n", k); // check k'th syzygy failed
     1342      if( UNLIKELY( OPT__PROT && (vp != NULL) ) ) Warn("ERROR: SyzCheck failed, wrong tail: [%d]\n\n", k); // check k'th syzygy failed
    13431343     
    13441344      p_Delete(&vp, R);
     
    13461346
    13471347#ifndef SING_NDEBUG
    1348     if( __DEBUG__ )    {      m_div.Verify();      m_checker.Verify();    }
     1348    if( OPT__DEBUG )    {      m_div.Verify();      m_checker.Verify();    }
    13491349#endif
    13501350  }
    13511351
    13521352#ifdef SING_NDEBUG
    1353   if( UNLIKELY( __PROT__ & RTIMER_BENCHMARKING ) )
     1353  if( UNLIKELY( OPT__PROT & RTIMER_BENCHMARKING ) )
    13541354  {
    13551355    t = getTimer() - t; r = getRTimer() - r;
     
    13601360  TT->rank = id_RankFreeModule(TT, R);
    13611361
    1362   if( UNLIKELY(__TREEOUTPUT__) )
     1362  if( UNLIKELY(OPT__TREEOUTPUT) )
    13631363    PrintS("\n]},");
    13641364 
    1365   if( UNLIKELY(__PROT__) ) PrintLn();
     1365  if( UNLIKELY(OPT__PROT) ) PrintLn();
    13661366}
    13671367
     
    13701370//  const SchreyerSyzygyComputationFlags& attributes = m_atttributes;
    13711371
    1372 //  const BOOLEAN __LEAD2SYZ__   = attributes.__LEAD2SYZ__;
    1373 //  const BOOLEAN __TAILREDSYZ__ = attributes.__TAILREDSYZ__;
     1372//  const BOOLEAN OPT__LEAD2SYZ   = attributes.OPT__LEAD2SYZ;
     1373//  const BOOLEAN OPT__TAILREDSYZ = attributes.OPT__TAILREDSYZ;
    13741374
    13751375  assume( m_syzLeads == NULL );
     
    13771377  if( UNLIKELY(bComputeSecondTerms) )
    13781378  {
    1379     assume( __LEAD2SYZ__ );
     1379    assume( OPT__LEAD2SYZ );
    13801380//    m_syzLeads = FROM_NAMESPACE(INTERNAL, _Compute2LeadingSyzygyTerms(m_idLeads, m_rBaseRing, m_atttributes));
    13811381    m_syzLeads = Compute2LeadingSyzygyTerms();
     
    13831383  else
    13841384  {
    1385     assume( !__LEAD2SYZ__ );
     1385    assume( !OPT__LEAD2SYZ );
    13861386
    13871387    m_syzLeads = Compute1LeadingSyzygyTerms();
     
    13921392  assume( m_syzLeads!= NULL );
    13931393
    1394   if ( LIKELY( __TAILREDSYZ__ && !__IGNORETAILS__ && (IDELEMS(m_syzLeads) > 0) && !((IDELEMS(m_syzLeads) == 1) && (m_syzLeads->m[0] == NULL)) ) )
     1394  if ( LIKELY( OPT__TAILREDSYZ && !OPT__IGNORETAILS && (IDELEMS(m_syzLeads) > 0) && !((IDELEMS(m_syzLeads) == 1) && (m_syzLeads->m[0] == NULL)) ) )
    13951395  {
    13961396    m_LS = m_syzLeads;
    13971397    m_checker.Initialize(m_syzLeads);
    13981398#ifndef SING_NDEBUG
    1399     if( __DEBUG__ )
     1399    if( OPT__DEBUG )
    14001400    {
    14011401      const ring& r = m_rBaseRing;
     
    14101410  }
    14111411
    1412   if( UNLIKELY( __PROT__ ) ) Print("(L%dS:%d)", bComputeSecondTerms ? 2 : 1, IDELEMS(m_syzLeads));
     1412  if( UNLIKELY( OPT__PROT ) ) Print("(L%dS:%d)", bComputeSecondTerms ? 2 : 1, IDELEMS(m_syzLeads));
    14131413     
    14141414}
     
    14161416poly SchreyerSyzygyComputation::SchreyerSyzygyNF(const poly syz_lead, poly syz_2) const
    14171417{
    1418   assume( !__IGNORETAILS__ );
     1418  assume( !OPT__IGNORETAILS );
    14191419
    14201420  const ideal& L = m_idLeads;
     
    14261426
    14271427#ifndef SING_NDEBUG
    1428   if( __DEBUG__ )
     1428  if( OPT__DEBUG )
    14291429  {
    14301430    PrintS("SchreyerSyzygyComputation::SchreyerSyzygyNF(syz_lead, poly syz_2), \n");
     
    14371437#endif
    14381438
    1439   if( UNLIKELY( __TREEOUTPUT__ ) )
     1439  if( UNLIKELY( OPT__TREEOUTPUT ) )
    14401440  {
    14411441    PrintS("{   \"nodelabel\": \""); writeLatexTerm(syz_lead, r);
     
    14541454    p_Test(syz_2, r);
    14551455
    1456     if( UNLIKELY( __TREEOUTPUT__ ) )
     1456    if( UNLIKELY( OPT__TREEOUTPUT ) )
    14571457    {
    14581458      PrintS("{ \"nodelabel\": \""); writeLatexTerm(syz_2, r); PrintS("\" },");
     
    14621462    aa = p_Mult_mm(aa, L->m[rr], r);
    14631463
    1464     if( UNLIKELY( __TREEOUTPUT__ ) )
     1464    if( UNLIKELY( OPT__TREEOUTPUT ) )
    14651465    {
    14661466      PrintS("{ \"nodelabel\": \""); writeLatexTerm(syz_2, r); PrintS("\", \"edgelabel\": \""); writeLatexTerm(aa, r, false); PrintS("\" },");
     
    15301530      assume( c >= 0 && c < IDELEMS(T) );
    15311531
    1532       if(UNLIKELY( __TREEOUTPUT__ ))
     1532      if(UNLIKELY( OPT__TREEOUTPUT ))
    15331533      {
    15341534        PrintS("{ \"nodelabel\": \""); writeLatexTerm(t, r); PrintS("\", \"edgelabel\": \""); writeLatexTerm(spoly, r, false); PrintS("\" },");
     
    15431543    } // otherwise discard that leading term altogether!
    15441544    else
    1545       if( UNLIKELY(__PROT__) ) ++ m_stat[4]; // PrintS("$"); // LOT
     1545      if( UNLIKELY(OPT__PROT) ) ++ m_stat[4]; // PrintS("$"); // LOT
    15461546   
    15471547    kbTest(bucket);
     
    15621562 
    15631563 
    1564   if( UNLIKELY(__TREEOUTPUT__) )
     1564  if( UNLIKELY(OPT__TREEOUTPUT) )
    15651565  {
    15661566    PrintS("]},");
     
    15681568
    15691569#ifndef SING_NDEBUG
    1570   if( __DEBUG__ )
     1570  if( OPT__DEBUG )
    15711571  {
    15721572    PrintS("SchreyerSyzygyComputation::SchreyerSyzygyNF(syz_lead, poly syz_2) =>>> \n");
     
    15921592{
    15931593#ifndef SING_NDEBUG
    1594   if( __DEBUG__ ) {    m_div.Verify();    m_checker.Verify();  }
     1594  if( OPT__DEBUG ) {    m_div.Verify();    m_checker.Verify();  }
    15951595#endif
    15961596
     
    16021602  p_Test(multiplier, r);
    16031603
    1604   if( UNLIKELY(__NOCACHING__) )
     1604  if( UNLIKELY(OPT__NOCACHING) )
    16051605    return ComputeImage(multiplier, tail);
    16061606
     
    16231623         return (NULL);
    16241624
    1625        if( UNLIKELY( __TREEOUTPUT__ ) )
     1625       if( UNLIKELY( OPT__TREEOUTPUT ) )
    16261626       {
    16271627//         PrintS("{ \"nodelabel\": \""); writeLatexTerm(multiplier, r, false);
     
    16411641         number n = n_Div( pGetCoeff(multiplier), pGetCoeff(itr->first), r); // new number
    16421642         
    1643          if( UNLIKELY( __TREEOUTPUT__ ) )
     1643         if( UNLIKELY( OPT__TREEOUTPUT ) )
    16441644         {
    16451645           StringSetS("");
     
    16501650         }
    16511651         
    1652          if( UNLIKELY( __PROT__ ) ) ++ m_stat[7]; // PrintS("l*"); // lookup & rescale
     1652         if( UNLIKELY( OPT__PROT ) ) ++ m_stat[7]; // PrintS("l*"); // lookup & rescale
    16531653         
    16541654         p = p_Mult_nn(p, n, r); // !
    16551655         n_Delete(&n, r);       
    16561656       } else
    1657          if( UNLIKELY( __PROT__ ) ) ++ m_stat[6]; // PrintS("l"); // lookup no rescale       
    1658 
    1659        if( UNLIKELY(__TREEOUTPUT__) )
     1657         if( UNLIKELY( OPT__PROT ) ) ++ m_stat[6]; // PrintS("l"); // lookup no rescale       
     1658
     1659       if( UNLIKELY(OPT__TREEOUTPUT) )
    16601660       {
    16611661         PrintS("\"noderesult\": \"");         writeLatexTerm(p, r, true, false);         PrintS("\" },");
     
    16631663
    16641664#ifndef SING_NDEBUG
    1665        if( __DEBUG__ )       {         m_div.Verify();         m_checker.Verify();       }
     1665       if( OPT__DEBUG )       {         m_div.Verify();         m_checker.Verify();       }
    16661666#endif
    16671667       p_Test(multiplier, r);
     
    16711671
    16721672
    1673      if( UNLIKELY(__TREEOUTPUT__) )
     1673     if( UNLIKELY(OPT__TREEOUTPUT) )
    16741674     {
    16751675       Print("{ \"proc\": \"TTStore%d\", \"nodelabel\": \"", tail + 1); writeLatexTerm(multiplier, r, false); Print(" \\\\GEN{%d}\", \"children\": [", tail + 1);
     
    16801680     const poly p = ComputeImage(multiplier, tail);
    16811681
    1682      if( UNLIKELY(__TREEOUTPUT__) )
     1682     if( UNLIKELY(OPT__TREEOUTPUT) )
    16831683     {
    16841684       PrintS("], \"noderesult\": \""); writeLatexTerm(p, r, true, false); PrintS("\" },");
    16851685     }
    16861686
    1687      if( UNLIKELY(__PROT__) ) ++ m_stat[8]; // PrintS("S"); // store
     1687     if( UNLIKELY(OPT__PROT) ) ++ m_stat[8]; // PrintS("S"); // store
    16881688     
    16891689     p_Test(multiplier, r);
     
    16971697
    16981698#ifndef SING_NDEBUG
    1699      if( __DEBUG__ )     {       m_div.Verify();       m_checker.Verify();     }
     1699     if( OPT__DEBUG )     {       m_div.Verify();       m_checker.Verify();     }
    17001700#endif
    17011701     
     
    17051705  CCacheCompare o(r); TP2PCache T(o);
    17061706
    1707   if( UNLIKELY(__TREEOUTPUT__) )
     1707  if( UNLIKELY(OPT__TREEOUTPUT) )
    17081708  {
    17091709    Print("{ \"proc\": \"TTStore%d\", \"nodelabel\": \"", 0); writeLatexTerm(multiplier, r, false); Print(" \\\\GEN{%d}\", \"children\": [", tail + 1);
     
    17121712  const poly p = ComputeImage(multiplier, tail);
    17131713
    1714   if( UNLIKELY(__TREEOUTPUT__) )
     1714  if( UNLIKELY(OPT__TREEOUTPUT) )
    17151715  {
    17161716    PrintS("], \"noderesult\": \""); writeLatexTerm(p, r, true, false); PrintS("\" },");
    17171717  }
    17181718
    1719   if( UNLIKELY( __PROT__ ) ) ++ m_stat[8]; // PrintS("S"); // store // %d", tail + 1);
     1719  if( UNLIKELY( OPT__PROT ) ) ++ m_stat[8]; // PrintS("S"); // store // %d", tail + 1);
    17201720 
    17211721  T.insert( TP2PCache::value_type(myp_Head(multiplier, (p==NULL), r), p) );
     
    17271727
    17281728#ifndef SING_NDEBUG
    1729   if( __DEBUG__ )  {    m_div.Verify();    m_checker.Verify();  }
     1729  if( OPT__DEBUG )  {    m_div.Verify();    m_checker.Verify();  }
    17301730#endif
    17311731
     
    17461746  if(t != NULL)
    17471747  {
    1748     if( UNLIKELY(__TREEOUTPUT__) )
     1748    if( UNLIKELY(OPT__TREEOUTPUT) )
    17491749    {
    17501750      PrintS("{ \"proc\": \"ComputeImage\", \"nodelabel\": \"");
     
    17591759    p_Test(multiplier, r);
    17601760
    1761     if( UNLIKELY(__TREEOUTPUT__) )
     1761    if( UNLIKELY(OPT__TREEOUTPUT) )
    17621762    {
    17631763      PrintS("], \"noderesult\": \""); writeLatexTerm(p, r, true, false); PrintS("\" },");
     
    17741774poly SchreyerSyzygyComputation::TraverseTail(poly multiplier, poly tail) const
    17751775{
    1776   assume( !__IGNORETAILS__ );
     1776  assume( !OPT__IGNORETAILS );
    17771777
    17781778  const ideal& L = m_idLeads;
     
    17881788   
    17891789#ifndef SING_NDEBUG
    1790   if( __DEBUG__ )  {    m_div.Verify();    m_checker.Verify();  }
    1791 #endif
    1792 
    1793   if( UNLIKELY( !(  (!__TAILREDSYZ__)   ||   m_lcm.Check(multiplier)     )) )
    1794   {
    1795     if( UNLIKELY(__TAILREDSYZ__ && __PROT__) ) ++ m_stat[5]; // PrintS("%"); // check LCM !
     1790  if( OPT__DEBUG )  {    m_div.Verify();    m_checker.Verify();  }
     1791#endif
     1792
     1793  if( UNLIKELY( !(  (!OPT__TAILREDSYZ)   ||   m_lcm.Check(multiplier)     )) )
     1794  {
     1795    if( UNLIKELY(OPT__TAILREDSYZ && OPT__PROT) ) ++ m_stat[5]; // PrintS("%"); // check LCM !
    17961796   
    17971797    return NULL;
     
    18271827  //    poly s = NULL;
    18281828
    1829   if( UNLIKELY( __TREEOUTPUT__ & 0 ) )
     1829  if( UNLIKELY( OPT__TREEOUTPUT & 0 ) )
    18301830  {
    18311831    Print("{ \"proc\": \"TTPoly\", \"nodelabel\": \""); writeLatexTerm(multiplier, r, false); Print(" * \\\\ldots \", \"children\": [");
     
    18641864 
    18651865#ifndef SING_NDEBUG
    1866   if( __DEBUG__ )  {    m_div.Verify();    m_checker.Verify();  }
    1867 #endif
    1868 
    1869   if( UNLIKELY( __TREEOUTPUT__ & 0 ) )
     1866  if( OPT__DEBUG )  {    m_div.Verify();    m_checker.Verify();  }
     1867#endif
     1868
     1869  if( UNLIKELY( OPT__TREEOUTPUT & 0 ) )
    18701870  {
    18711871    PrintS("], \"noderesult\": \""); writeLatexTerm(s, r, true, false); PrintS("\" },");
     
    18831883{
    18841884#ifndef SING_NDEBUG
    1885   if( __DEBUG__ )  {    m_div.Verify();    m_checker.Verify();  }
    1886 #endif
    1887 
    1888   assume( !__IGNORETAILS__ );
     1885  if( OPT__DEBUG )  {    m_div.Verify();    m_checker.Verify();  }
     1886#endif
     1887
     1888  assume( !OPT__IGNORETAILS );
    18891889
    18901890  const ideal& L = m_idLeads;
     
    19041904  poly s = NULL;
    19051905
    1906   if( (!__TAILREDSYZ__) || m_lcm.Check(multiplier) ) // TODO: UNLIKELY / LIKELY ????
     1906  if( (!OPT__TAILREDSYZ) || m_lcm.Check(multiplier) ) // TODO: UNLIKELY / LIKELY ????
    19071907  {
    19081908#if NOPRODUCT
     
    19141914    if( s == NULL ) // No Reducer?
    19151915    {     
    1916       if( UNLIKELY(__PROT__) ) ++ m_stat[4]; // PrintS("$"); // LOT     
     1916      if( UNLIKELY(OPT__PROT) ) ++ m_stat[4]; // PrintS("$"); // LOT     
    19171917      return NULL;
    19181918    }
    19191919
    1920     if( UNLIKELY( __TREEOUTPUT__ ) )
     1920    if( UNLIKELY( OPT__TREEOUTPUT ) )
    19211921    {
    19221922      poly product = pp_Mult_mm(multiplier, term4reduction, r);
     
    19371937    if( s == NULL ) // No Reducer?
    19381938    {
    1939       if( UNLIKELY(__PROT__) ) ++ m_stat[4]; // PrintS("$"); // LOT
     1939      if( UNLIKELY(OPT__PROT) ) ++ m_stat[4]; // PrintS("$"); // LOT
    19401940      return NULL;
    19411941    }
    19421942
    1943     if( UNLIKELY(__TREEOUTPUT__) )
     1943    if( UNLIKELY(OPT__TREEOUTPUT) )
    19441944    {
    19451945      PrintS("{ \"proc\": \"RdTrmP\", \"nodelabel\": \""); writeLatexTerm(s, r); PrintS("\", \"edgelabel\": \""); writeLatexTerm(product, r, false);
     
    19511951
    19521952#ifndef SING_NDEBUG
    1953   if( __DEBUG__ )  {    m_div.Verify();    m_checker.Verify();  }
     1953  if( OPT__DEBUG )  {    m_div.Verify();    m_checker.Verify();  }
    19541954#endif
    19551955
    19561956  if( s == NULL ) // No Reducer?
    19571957  {
    1958     if( UNLIKELY(__TAILREDSYZ__ && __PROT__) ) ++ m_stat[5]; // PrintS("%"); // check LCM !
     1958    if( UNLIKELY(OPT__TAILREDSYZ && OPT__PROT) ) ++ m_stat[5]; // PrintS("%"); // check LCM !
    19591959    return NULL;
    19601960  }
     
    19711971
    19721972
    1973   if( UNLIKELY( __TREEOUTPUT__ ) )
     1973  if( UNLIKELY( OPT__TREEOUTPUT ) )
    19741974     PrintS("\", \"children\": [");
    19751975
    19761976  const poly t = TraverseTail(b, c); // T->m[c];
    19771977
    1978   if( UNLIKELY( __TREEOUTPUT__ ) )
     1978  if( UNLIKELY( OPT__TREEOUTPUT ) )
    19791979  {
    19801980
     
    19991999 
    20002000#ifndef SING_NDEBUG
    2001   if( __DEBUG__ )  {    m_div.Verify();    m_checker.Verify();  }
     2001  if( OPT__DEBUG )  {    m_div.Verify();    m_checker.Verify();  }
    20022002#endif
    20032003
     
    20082008
    20092009SchreyerSyzygyComputationFlags::SchreyerSyzygyComputationFlags(idhdl rootRingHdl):
    2010     __DEBUG__( atGetInt(rootRingHdl,"DEBUG", 0) ),
    2011     __LEAD2SYZ__( atGetInt(rootRingHdl, "LEAD2SYZ", 0) ),
    2012     __TAILREDSYZ__( atGetInt(rootRingHdl, "TAILREDSYZ", 1) ),
    2013     __HYBRIDNF__( atGetInt(rootRingHdl, "HYBRIDNF", 0) ),
    2014     __IGNORETAILS__( atGetInt(rootRingHdl, "IGNORETAILS", 0) ),
    2015     __SYZNUMBER__( atGetInt(rootRingHdl, "SYZNUMBER", 0) ),
    2016     __TREEOUTPUT__( atGetInt(rootRingHdl, "TREEOUTPUT", 0) ),
    2017     __SYZCHECK__( atGetInt(rootRingHdl, "SYZCHECK", 0) ),
    2018     __NOCACHING__( atGetInt(rootRingHdl, "NOCACHING", 0) ),
    2019     __PROT__(TEST_OPT_PROT),
     2010    OPT__DEBUG( atGetInt(rootRingHdl,"DEBUG", 0) ),
     2011    OPT__LEAD2SYZ( atGetInt(rootRingHdl, "LEAD2SYZ", 0) ),
     2012    OPT__TAILREDSYZ( atGetInt(rootRingHdl, "TAILREDSYZ", 1) ),
     2013    OPT__HYBRIDNF( atGetInt(rootRingHdl, "HYBRIDNF", 0) ),
     2014    OPT__IGNORETAILS( atGetInt(rootRingHdl, "IGNORETAILS", 0) ),
     2015    OPT__SYZNUMBER( atGetInt(rootRingHdl, "SYZNUMBER", 0) ),
     2016    OPT__TREEOUTPUT( atGetInt(rootRingHdl, "TREEOUTPUT", 0) ),
     2017    OPT__SYZCHECK( atGetInt(rootRingHdl, "SYZCHECK", 0) ),
     2018    OPT__NOCACHING( atGetInt(rootRingHdl, "NOCACHING", 0) ),
     2019    OPT__PROT(TEST_OPT_PROT),
    20202020    m_rBaseRing( rootRingHdl->data.uring )
    20212021{
    20222022#ifndef SING_NDEBUG
    2023   if( __DEBUG__ & 0 )
     2023  if( OPT__DEBUG & 0 )
    20242024  {
    20252025    PrintS("SchreyerSyzygyComputationFlags: \n");
    2026     Print("        DEBUG: \t%d\n", __DEBUG__);
    2027 //    Print("   SYZCHECK  : \t%d\n", __SYZCHECK__);
    2028     Print("     LEAD2SYZ: \t%d\n", __LEAD2SYZ__);
    2029     Print("   TAILREDSYZ: \t%d\n", __TAILREDSYZ__);
    2030     Print("  IGNORETAILS: \t%d\n", __IGNORETAILS__);
    2031     Print("   TREEOUTPUT: \t%d\n", __TREEOUTPUT__);
    2032     Print("     SYZCHECK: \t%d\n", __SYZCHECK__);
     2026    Print("        DEBUG: \t%d\n", OPT__DEBUG);
     2027//    Print("   SYZCHECK  : \t%d\n", OPT__SYZCHECK);
     2028    Print("     LEAD2SYZ: \t%d\n", OPT__LEAD2SYZ);
     2029    Print("   TAILREDSYZ: \t%d\n", OPT__TAILREDSYZ);
     2030    Print("  IGNORETAILS: \t%d\n", OPT__IGNORETAILS);
     2031    Print("   TREEOUTPUT: \t%d\n", OPT__TREEOUTPUT);
     2032    Print("     SYZCHECK: \t%d\n", OPT__SYZCHECK);
    20332033  }
    20342034#endif
     
    22722272//      assume ( !n_IsZero( p_GetCoeff(product, m_rBaseRing), m_rBaseRing ) );
    22732273#ifndef SING_NDEBUG
    2274       if( __DEBUG__ )        m_reds.Verify();
     2274      if( OPT__DEBUG )        m_reds.Verify();
    22752275#endif
    22762276    }
     
    23222322        {
    23232323#ifndef SING_NDEBUG
    2324           if( __DEBUG__ )
     2324          if( OPT__DEBUG )
    23252325          {
    23262326            Print("CDivisorEnumerator::MoveNext::est LS: q is divisible by LS[%d] !:((, diviser is: ", 1 + Current().label());
     
    23482348{
    23492349#ifndef SING_NDEBUG
    2350   if( __DEBUG__ )    Verify();
     2350  if( OPT__DEBUG )    Verify();
    23512351#endif
    23522352 
     
    23852385    if( (*vit)->DivisibilityCheck(product, not_sev, r) )
    23862386    {
    2387       if( __DEBUG__ )
     2387      if( OPT__DEBUG )
    23882388      {
    23892389        Print("_FindReducer::Test LS: q is divisible by LS[%d] !:((, diviser is: ", 1 + (*vit)->label());
     
    25032503//      assume( p_GetComp(m_multiplier, m_rBaseRing) == 0 );
    25042504#ifndef SING_NDEBUG
    2505       if( __DEBUG__ ) m_reds.Verify();
     2505      if( OPT__DEBUG ) m_reds.Verify();
    25062506#endif
    25072507    }
     
    25532553        {
    25542554#ifndef SING_NDEBUG
    2555           if( __DEBUG__ )
     2555          if( OPT__DEBUG )
    25562556          {
    25572557            Print("CDivisorEnumerator::MoveNext::est LS: q is divisible by LS[%d] !:((, diviser is: ", 1 + Current().label());
     
    25822582   
    25832583#ifndef SING_NDEBUG
    2584   if( __DEBUG__ )  {    Verify();    syz_checker.Verify();  }
     2584  if( OPT__DEBUG )  {    Verify();    syz_checker.Verify();  }
    25852585#endif
    25862586   
     
    26072607  p_Test(multiplier, r);
    26082608   
    2609   if (UNLIKELY( __DEBUG__ && (syzterm != NULL) ))
     2609  if (UNLIKELY( OPT__DEBUG && (syzterm != NULL) ))
    26102610  {
    26112611    const poly m = L->m[c]; assume( m != NULL ); assume( pNext(m) == NULL );
     
    26232623
    26242624#ifndef SING_NDEBUG
    2625   if( __DEBUG__ )  {    Verify();    syz_checker.Verify();  }
     2625  if( OPT__DEBUG )  {    Verify();    syz_checker.Verify();  }
    26262626#endif
    26272627 
    2628   const BOOLEAN to_check = (syz_checker.IsNonempty()); // __TAILREDSYZ__ &&
     2628  const BOOLEAN to_check = (syz_checker.IsNonempty()); // OPT__TAILREDSYZ &&
    26292629
    26302630//  const poly q = p_One(r);
    26312631  const poly q = p_New(r); pNext(q) = NULL;
    26322632
    2633   if( UNLIKELY(__DEBUG__) )
     2633  if( UNLIKELY(OPT__DEBUG) )
    26342634    p_SetCoeff0(q, 0, r); // for printing q
    26352635   
     
    26572657      {
    26582658#ifndef SING_NDEBUG
    2659         if( __DEBUG__ )
     2659        if( OPT__DEBUG )
    26602660        {
    26612661          Print("_FindReducer::Test SYZTERM: q == syzterm !:((, syzterm is: ");
     
    26712671    {
    26722672#ifndef SING_NDEBUG
    2673       if( __DEBUG__ )
     2673      if( OPT__DEBUG )
    26742674      {
    26752675        PrintS("_FindReducer::Test LS: q is divisible by LS[?] !:((: ");
     
    26942694
    26952695#ifndef SING_NDEBUG
    2696     if( __DEBUG__ )    {      Verify();      syz_checker.Verify();    }
     2696    if( OPT__DEBUG )    {      Verify();      syz_checker.Verify();    }
    26972697#endif
    26982698    p_Test(multiplier, r);
     
    27602760      if (p_ExpVectorEqual(syzterm, q, r))
    27612761      {
    2762         if( __DEBUG__ )
     2762        if( OPT__DEBUG )
    27632763        {
    27642764          Print("_FindReducer::Test SYZTERM: q == syzterm !:((, syzterm is: ");
     
    27722772    if( to_check && syz_checker.IsDivisible(q) )
    27732773    {
    2774       if( __DEBUG__ )
     2774      if( OPT__DEBUG )
    27752775      {
    27762776        PrintS("_FindReducer::Test LS: q is divisible by LS[?] !:((: ");
     
    27912791 
    27922792#ifndef SING_NDEBUG
    2793   if( __DEBUG__ )  {    Verify();    syz_checker.Verify();  }
     2793  if( OPT__DEBUG )  {    Verify();    syz_checker.Verify();  }
    27942794#endif
    27952795   
     
    28062806
    28072807#ifndef SING_NDEBUG
    2808   if( __DEBUG__ )  {    Verify();    syz_checker.Verify();  }
     2808  if( OPT__DEBUG )  {    Verify();    syz_checker.Verify();  }
    28092809#endif
    28102810
     
    28282828  assume( c >= 0 && c < IDELEMS(L) );
    28292829
    2830   if (UNLIKELY( __DEBUG__ && (syzterm != NULL) ))
     2830  if (UNLIKELY( OPT__DEBUG && (syzterm != NULL) ))
    28312831  {
    28322832    const poly m = L->m[c];
     
    28442844
    28452845#ifndef SING_NDEBUG
    2846   if( __DEBUG__ )  {    Verify();    syz_checker.Verify();  }
    2847 #endif
    2848 
    2849   const BOOLEAN to_check = (syz_checker.IsNonempty()); // __TAILREDSYZ__ &&
     2846  if( OPT__DEBUG )  {    Verify();    syz_checker.Verify();  }
     2847#endif
     2848
     2849  const BOOLEAN to_check = (syz_checker.IsNonempty()); // OPT__TAILREDSYZ &&
    28502850
    28512851  const poly q = p_New(r); pNext(q) = NULL;
    28522852
    2853   if( UNLIKELY(__DEBUG__) )
     2853  if( UNLIKELY(OPT__DEBUG) )
    28542854    p_SetCoeff0(q, 0, r); // ONLY for printing q
    28552855
     
    28702870      {
    28712871#ifndef SING_NDEBUG
    2872         if( __DEBUG__ )
     2872        if( OPT__DEBUG )
    28732873        {
    28742874          Print("_FindReducer::Test SYZTERM: q == syzterm !:((, syzterm is: ");
     
    28842884    {
    28852885#ifndef SING_NDEBUG
    2886       if( __DEBUG__ )
     2886      if( OPT__DEBUG )
    28872887      {
    28882888        PrintS("_FindReducer::Test LS: q is divisible by LS[?] !:((: ");
     
    29042904   
    29052905#ifndef SING_NDEBUG
    2906     if( __DEBUG__ )    {      Verify();      syz_checker.Verify();    }
     2906    if( OPT__DEBUG )    {      Verify();      syz_checker.Verify();    }
    29072907#endif
    29082908   
     
    29372937  const TReducers& reducers = it->second;
    29382938
    2939   const BOOLEAN to_check = (syz_checker.IsNonempty()); // __TAILREDSYZ__ &&
     2939  const BOOLEAN to_check = (syz_checker.IsNonempty()); // OPT__TAILREDSYZ &&
    29402940
    29412941  const poly q = p_New(r); pNext(q) = NULL;
    29422942
    2943   if( __DEBUG__ )
     2943  if( OPT__DEBUG )
    29442944    p_SetCoeff0(q, 0, r); // for printing q
    29452945
     
    29732973      if (p_ExpVectorEqual(syzterm, q, r))
    29742974      {
    2975         if( __DEBUG__ )
     2975        if( OPT__DEBUG )
    29762976        {
    29772977          Print("_FindReducer::Test SYZTERM: q == syzterm !:((, syzterm is: ");
     
    29852985    if( to_check && syz_checker.IsDivisible(q) )
    29862986    {
    2987       if( __DEBUG__ )
     2987      if( OPT__DEBUG )
    29882988      {
    29892989        PrintS("_FindReducer::Test LS: q is divisible by LS[?] !:((: ");
     
    30013001
    30023002#ifndef SING_NDEBUG
    3003   if( __DEBUG__ )  {    Verify();    syz_checker.Verify();  }
     3003  if( OPT__DEBUG )  {    Verify();    syz_checker.Verify();  }
    30043004#endif
    30053005 
     
    30193019  assume( L != NULL );
    30203020
    3021   if( LIKELY( __TAILREDSYZ__ && !__HYBRIDNF__ && (L != NULL) )) // TODO: not hybrid!?
     3021  if( LIKELY( OPT__TAILREDSYZ && !OPT__HYBRIDNF && (L != NULL) )) // TODO: not hybrid!?
    30223022  {
    30233023    const int l = IDELEMS(L);
     
    30483048    const ring& R = m_rBaseRing;
    30493049
    3050     assume( __TAILREDSYZ__ && !__HYBRIDNF__ );
     3050    assume( OPT__TAILREDSYZ && !OPT__HYBRIDNF );
    30513051
    30523052    for (unsigned int j = m_N; j > 0; j--)
  • Singular/dyn_modules/syzextra/syzextra.h

    r10478c r73ba50  
    192192
    193193    SchreyerSyzygyComputationFlags(const SchreyerSyzygyComputationFlags& attr):
    194         __DEBUG__(attr.__DEBUG__),
    195         __LEAD2SYZ__(attr.__LEAD2SYZ__),  __TAILREDSYZ__(attr.__TAILREDSYZ__),
    196         __HYBRIDNF__(attr.__HYBRIDNF__), __IGNORETAILS__(attr.__IGNORETAILS__),
    197         __SYZNUMBER__(attr.__SYZNUMBER__), __TREEOUTPUT__(attr.__TREEOUTPUT__),
    198         __SYZCHECK__(attr.__SYZCHECK__), __PROT__(attr.__PROT__),
    199         __NOCACHING__(attr.__NOCACHING__),
     194        OPT__DEBUG(attr.OPT__DEBUG),
     195        OPT__LEAD2SYZ(attr.OPT__LEAD2SYZ),  OPT__TAILREDSYZ(attr.OPT__TAILREDSYZ),
     196        OPT__HYBRIDNF(attr.OPT__HYBRIDNF), OPT__IGNORETAILS(attr.OPT__IGNORETAILS),
     197        OPT__SYZNUMBER(attr.OPT__SYZNUMBER), OPT__TREEOUTPUT(attr.OPT__TREEOUTPUT),
     198        OPT__SYZCHECK(attr.OPT__SYZCHECK), OPT__PROT(attr.OPT__PROT),
     199        OPT__NOCACHING(attr.OPT__NOCACHING),
    200200        m_rBaseRing(attr.m_rBaseRing)
    201201    {}
    202202
    203203  /// output all the intermediate states
    204   const int __DEBUG__; // DebugOutput;
     204  const int OPT__DEBUG; // DebugOutput;
    205205
    206206  /// ?
    207   const int __LEAD2SYZ__; // TwoLeadingSyzygyTerms;
     207  const int OPT__LEAD2SYZ; // TwoLeadingSyzygyTerms;
    208208
    209209  /// Reduce syzygy tails wrt the leading syzygy terms
    210   const int __TAILREDSYZ__; // TailReducedSyzygies;
     210  const int OPT__TAILREDSYZ; // TailReducedSyzygies;
    211211
    212212  /// Use the usual NF's S-poly reduction while dropping lower order terms
    213213  /// 2 means - smart selection!
    214   const int __HYBRIDNF__; // UseHybridNF
     214  const int OPT__HYBRIDNF; // UseHybridNF
    215215
    216216
    217217  /// ignore tails and compute the pure Schreyer frame
    218   const int __IGNORETAILS__; // @IGNORETAILS
     218  const int OPT__IGNORETAILS; // @IGNORETAILS
    219219
    220220  /// Syzygy level (within a resolution)
    221   mutable int __SYZNUMBER__;
     221  mutable int OPT__SYZNUMBER;
    222222
    223223  inline void  nextSyzygyLayer() const
    224224  {
    225      __SYZNUMBER__++;
     225     OPT__SYZNUMBER++;
    226226  }
    227227
    228228  /// output lifting tree
    229   const int __TREEOUTPUT__;
     229  const int OPT__TREEOUTPUT;
    230230
    231231  /// CheckSyzygyProperty: TODO
    232   const int __SYZCHECK__;
     232  const int OPT__SYZCHECK;
    233233
    234234  /// TEST_OPT_PROT
    235   const bool __PROT__;   
     235  const bool OPT__PROT;   
    236236   
    237237  /// no caching/stores/lookups
    238   const int __NOCACHING__;
     238  const int OPT__NOCACHING;
    239239
    240240  /// global base ring
     
    411411        m_spoly_bucket(NULL)
    412412    {
    413       if( UNLIKELY(__PROT__) ) memset( &m_stat, 0, sizeof(m_stat) );
     413      if( UNLIKELY(OPT__PROT) ) memset( &m_stat, 0, sizeof(m_stat) );
    414414    }
    415415
     
    424424        m_spoly_bucket(NULL)
    425425    {
    426       if( UNLIKELY(__PROT__) ) memset( &m_stat, 0, sizeof(m_stat) );
     426      if( UNLIKELY(OPT__PROT) ) memset( &m_stat, 0, sizeof(m_stat) );
    427427     
    428       if( LIKELY(__TAILREDSYZ__ && !__IGNORETAILS__) )
     428      if( LIKELY(OPT__TAILREDSYZ && !OPT__IGNORETAILS) )
    429429      {
    430430        if (syzLeads != NULL)
     
    453453      m_syzLeads = m_syzTails = NULL; // m_LS ?
    454454     
    455       if ( UNLIKELY(__PROT__) )
     455      if ( UNLIKELY(OPT__PROT) )
    456456        PrintStats();
    457457    }
Note: See TracChangeset for help on using the changeset viewer.