[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.1.1.1

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

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