[BACK]Return to sugar.sm1 CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Kan

Annotation of OpenXM/src/kan96xx/Kan/sugar.sm1, Revision 1.2

1.2     ! takayama    1: %% $OpenXM$
1.1       maekawa     2: %% sugar.sm1,   It should be developed on 300CT. 1998, 1/27 --
                      3: %% sugar.sm1  1998, 1/29.
                      4:
                      5: [(getOptions)
                      6:  [( getOptions [<options for system_variable>  <options for switch_function>])
                      7:   (cf. restoreOptions)
                      8:  ]
                      9: ] putUsages
                     10: [(restoreOptions)
                     11:  [([<options for system_variable>  <options for switch_function>] restoreOptions)
                     12:   (cf. getOptions)
                     13:  ]
                     14: ] putUsages
                     15: [(groebner_sugar)
                     16:  [(groebner_sugar computes Groebner basis by the sugar strategy.)
                     17:   (Format of arguments and results are as same as that of groebner.)
                     18:   (See groebner.  When you compute in the ring of polynomials,)
                     19:   $it is recommended to turn on the switch [(UseCriterion1) 1] system_variable$
                     20:   (Note that groebner_sugar does not use the homogenized Weyl algebra.)
                     21:   (So, it does work only for term orders. Never use negative weight vectors.)
                     22:  ]
                     23: ] putUsages
                     24:
                     25: /getOptions {
                     26:  [
                     27:   [
                     28:    [(ReduceLowerTerms) [(ReduceLowerTerms)] system_variable]
                     29:    [(Sugar) [(Sugar)] system_variable]
                     30:    [(Homogenize) [(Homogenize)] system_variable]
                     31:    [(CheckHomogenization) [(CheckHomogenization)] system_variable]
                     32:    [(UseCriterion2B) [(UseCriterion2B)] system_variable]
                     33:    [(UseCriterion1) [(UseCriterion1)] system_variable]
                     34:    [(Statistics) [(Statistics)] system_variable]
                     35:    [(KanGBmessage) [(KanGBmessage)] system_variable]
                     36:    [(Verbose) [(Verbose)] system_variable]
                     37:    [(Homogenize_vec) [(Homogenize_vec)] system_variable]
                     38:   ]
                     39:   [ [(mmLarger) (report) (mmLarger) switch_function]
                     40:     [(mpMult) (report) (mpMult) switch_function]
                     41:     [(monomialAdd) (report) (monomialAdd) switch_function]
                     42:     [(red@) (report) (red@) switch_function]
                     43:     [(sp) (report) (sp) switch_function]
                     44:     [(grade) (report) (grade) switch_function]
                     45:     [(groebner) (report) (groebner) switch_function]
                     46:   ]
                     47:  ]
                     48: } def
                     49:
                     50: /restoreOptions {
                     51:  /arg1 set
                     52:  [/opt ] pushVariables
                     53:  [
                     54:     /opt arg1 def
                     55:     opt 0 get { system_variable } map
                     56:     opt 1 get { aload pop switch_function } map
                     57:  ] pop
                     58:  popVariables
                     59: } def
                     60:
                     61: /on_sugar_mode {
                     62:   [(ReduceLowerTerms) 0] system_variable
                     63:   [(Sugar) 1] system_variable
                     64:   [(Homogenize) 0] system_variable
                     65:   [(CheckHomogenization) 0] system_variable
                     66:   [(UseCriterion2B) 1] system_variable
                     67: } def
                     68:
                     69: /off_sugar_mode {
                     70:   [(ReduceLowerTerms) 1] system_variable
                     71:   [(Sugar) 0] system_variable
                     72:   [(Homogenize) 1] system_variable
                     73:   [(CheckHomogenization) 1] system_variable
                     74:   [(UseCriterion2B) 0] system_variable
                     75: } def
                     76:
                     77: /groebner_sugar {
                     78:   /arg1 set
                     79:   [/savedopt  /ff] pushVariables
                     80:   [
                     81:      /ff arg1 def
                     82:      /savedopt getOptions def
                     83:      on_sugar_mode
                     84:      ff groebner /ff set
                     85:      savedopt restoreOptions
                     86:      /arg1 ff def
                     87:   ] pop
                     88:   popVariables
                     89:   arg1
                     90: } def
                     91:
                     92: %% cf. sugar-test.sm1
                     93:
                     94:
                     95:
                     96:

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>