[BACK]Return to loadpackage.kk CVS log [TXT][DIR] Up to [local] / OpenXM / src / k097 / debug

Annotation of OpenXM/src/k097/debug/loadpackage.kk, Revision 1.1.1.1

1.1       maekawa     1:
                      2:
                      3: /**Name:  yacc/debug/loadpackage.kk */
                      4: /**Date:  1997, 4/19 */
                      5:
                      6: def loadsm1(s) {
                      7:   sm1("[(parse) ",s," pushfile ] extension ");
                      8: }
                      9:
                     10: def void cppload(s) {
                     11:   local com;
                     12:   System("/bin/rm -f k00.cppload.tmp");
                     13:   com = AddString(["/lib/cpp -P -lang-c++ <",s,"  >k00.cppload.tmp"]);
                     14:   Println(com);
                     15:   System(com);
                     16:   /* load("k00.cppload.tmp"); */
                     17:   /* System("/bin/rm -f k00.cppload.tmp"); */
                     18: }
                     19:
                     20:
                     21: def diff0(f,x) {
                     22:   local dx,ans;
                     23:   if (!IsPolynomial(f)) return(Poly("0"));
                     24:   if (f == Poly("0")) return(f);
                     25:   dx = PolyR(AddString(["D",ToString(x)]),Ringp(f));
                     26:   ans = Replace(dx*f,[[dx,Poly("0")],[h,PolyR("1",Ringp(f))]]);
                     27:   return(ans);
                     28: }
                     29:
                     30: class Oaku extends Object {
                     31:   this = Oaku;  /* この this がないと, bf.sm1 の symbols は,
                     32:                    PrimitiveContextp に登録される. */
                     33:   loadsm1("/home/nobuki/SSkan/Doc/bf.sm1");
                     34:   def bf3(ff) {
                     35:     local f,g;
                     36:     sm1(" bf3_0 ");
                     37:     f = Poly(ff);
                     38:     /*  Give the generators.  t - s f(x), Dx + s Df/Dx Dt */
                     39:     g = [ t - s*f, Dx+ s*diff0(f,x)*Dt,
                     40:                    Dy+ s*diff0(f,y)*Dt,
                     41:                    Dz+ s*diff0(f,z)*Dt];
                     42:     sm1(g," bf3_1 reducedBase /FunctionValue set ");
                     43:   }
                     44: }
                     45:
                     46:
                     47:

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