File: [local] / OpenXM / src / kan96xx / Kan / sugar.sm1 (download)
Revision 1.1.1.1 (vendor branch), Fri Oct 8 02:12:02 1999 UTC (24 years, 9 months ago) by maekawa
Branch: OpenXM
CVS Tags: ALPHA Changes since 1.1: +0 -0
lines
o import OpenXM sources
|
%% sugar.sm1, It should be developed on 300CT. 1998, 1/27 --
%% sugar.sm1 1998, 1/29.
[(getOptions)
[( getOptions [<options for system_variable> <options for switch_function>])
(cf. restoreOptions)
]
] putUsages
[(restoreOptions)
[([<options for system_variable> <options for switch_function>] restoreOptions)
(cf. getOptions)
]
] putUsages
[(groebner_sugar)
[(groebner_sugar computes Groebner basis by the sugar strategy.)
(Format of arguments and results are as same as that of groebner.)
(See groebner. When you compute in the ring of polynomials,)
$it is recommended to turn on the switch [(UseCriterion1) 1] system_variable$
(Note that groebner_sugar does not use the homogenized Weyl algebra.)
(So, it does work only for term orders. Never use negative weight vectors.)
]
] putUsages
/getOptions {
[
[
[(ReduceLowerTerms) [(ReduceLowerTerms)] system_variable]
[(Sugar) [(Sugar)] system_variable]
[(Homogenize) [(Homogenize)] system_variable]
[(CheckHomogenization) [(CheckHomogenization)] system_variable]
[(UseCriterion2B) [(UseCriterion2B)] system_variable]
[(UseCriterion1) [(UseCriterion1)] system_variable]
[(Statistics) [(Statistics)] system_variable]
[(KanGBmessage) [(KanGBmessage)] system_variable]
[(Verbose) [(Verbose)] system_variable]
[(Homogenize_vec) [(Homogenize_vec)] system_variable]
]
[ [(mmLarger) (report) (mmLarger) switch_function]
[(mpMult) (report) (mpMult) switch_function]
[(monomialAdd) (report) (monomialAdd) switch_function]
[(red@) (report) (red@) switch_function]
[(sp) (report) (sp) switch_function]
[(grade) (report) (grade) switch_function]
[(groebner) (report) (groebner) switch_function]
]
]
} def
/restoreOptions {
/arg1 set
[/opt ] pushVariables
[
/opt arg1 def
opt 0 get { system_variable } map
opt 1 get { aload pop switch_function } map
] pop
popVariables
} def
/on_sugar_mode {
[(ReduceLowerTerms) 0] system_variable
[(Sugar) 1] system_variable
[(Homogenize) 0] system_variable
[(CheckHomogenization) 0] system_variable
[(UseCriterion2B) 1] system_variable
} def
/off_sugar_mode {
[(ReduceLowerTerms) 1] system_variable
[(Sugar) 0] system_variable
[(Homogenize) 1] system_variable
[(CheckHomogenization) 1] system_variable
[(UseCriterion2B) 0] system_variable
} def
/groebner_sugar {
/arg1 set
[/savedopt /ff] pushVariables
[
/ff arg1 def
/savedopt getOptions def
on_sugar_mode
ff groebner /ff set
savedopt restoreOptions
/arg1 ff def
] pop
popVariables
arg1
} def
%% cf. sugar-test.sm1