home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / e / e031 / 3.ddi / MATHZIP2 / STARTUP / SYSTHIN.M < prev    next >
Encoding:
Text File  |  1991-09-23  |  6.8 KB  |  209 lines

  1. (* we put all this in the System context *)
  2.    Begin["System`"]
  3.  
  4. (* set up the first possible message *)
  5.    General::noopen = "Can't open `1`."
  6.  
  7. (* this message is here because we want to use Off[General::writewarn] *)
  8.    General::writewarn = "Defining rule for `1`."
  9.  
  10.    Off[General::newsym]
  11.  
  12. (* install SetAttributes and ClearAttributes commands.  Some of the
  13.     packages below use SetAttributes[ ] so keep this up here. *)
  14.    <<Attributes.m
  15.  
  16. (* external packages communication (to be moved into the kernel) *)
  17.    << Install.m
  18.  
  19. (* install ExpandAll,ExpandDenominator,ExpandNumerator,PowerExpand *)
  20.    <<Expand.m
  21.  
  22. (* install ValueQ function *)
  23.    <<ValueQ.m
  24.  
  25. (* install basic Mathematica code for Integrate[ ] *)
  26.    <<Integrate.m
  27.  
  28. (* install SinIntegral, CosIntegral *)
  29.    <<SinIntegral.m
  30.  
  31. (* install inverse functions *)
  32.    <<InverseFunctions.m
  33.  
  34. (* install formats for Infinity *)
  35.    <<FormatInfinity.m
  36.  
  37. (* install multidimensional Fourier Transforms *)
  38.    <<Fourier.m
  39.  
  40. (* install RunThrough command *)
  41.    <<RunThrough.m
  42.  
  43. (* install Edit command *)
  44.    <<Edit.m
  45.  
  46. (* install the correct conversion utilities for Plots *)
  47.   <<GraphicsCoercion.m
  48.  
  49. (* install Digits.m (obsolete) *)
  50.    << Digits.m
  51.  
  52. (* warning messages for obsolete options and functions *)
  53.   << Obsolete.m
  54.  
  55. (* Now carry out Thin system generation *)
  56.  
  57. $DumpedPackages = 
  58.   { "Install.m", "Expand.m", "ValueQ.m", "Integrate.m", "SinIntegral.m",
  59.     "InverseFunctions.m", "FormatInfinity.m", "Fourier.m", "RunThrough.m",
  60.     "Edit.m", "Attributes.m", "GraphicsCoercion.m", "Digits.m", "Obsolete.m"}
  61.  
  62. $DumpedPackages::usage = "$DumpedPackages gives a list of the packages which
  63.     have been dumped into the system."
  64.  
  65. System`Private`FatStuff := 
  66. (
  67. Get["msg.m"];             (* read in messages file *)
  68. Get["info.m"];             (* read in file of information about functions *)
  69. Get["Integrate/table.m"];     (* install code for indefinite integration  *)
  70. Get["Integrate/main.m"];     (* install code for definite integration  *)
  71. Get["Elliptic.m"];         (* install elliptic functions *)
  72. Get["HypergeometricPFQ.m"];     (* install generalized hypergeometric functions *)
  73. Get["Series.m"];         (* install additional Series definitions *)
  74. Get["ClebschGordan.m"];     (* install symbolic Clebsch-Gordan coefficients *)
  75. Get["LinearProgramming.m"];     (* install linear programming *)
  76. Get["PrimePi.m"];         (* install PrimePi *)
  77. Get["GroebnerBasis.m"];     (* install GroebnerBasis command *)
  78. Get["ComplexExpand.m"];        (* install ComplexExpand code *)
  79. Get["NSolve.m"];         (* install NSolve *)
  80. $DumpedPackages = Join[ $DumpedPackages,
  81.   {"msg.m", "info.m", "Integrate/table.m",
  82.    "Integrate/main.m", "Elliptic.m", "HypergeometricPFQ.m", "Series.m", 
  83.    "ClebschGordan.m", "LinearProgramming.m", "PrimePi.m", "GroebnerBasis.m",
  84.    "NSolve.m", "ComplexExpand.m"}]
  85. )
  86.  
  87. (* Thin system stuff  *)
  88.  
  89.  
  90. Unprotect[ $NewMessage]
  91.  
  92. Unprotect[ SystemStub]
  93.  
  94. Unprotect[AutoLoad]
  95.  
  96. Begin["`Private`"] 
  97.  
  98. $NewMessage :=
  99.         Function[ {Symb, Tag},
  100.                 Module[ {Res, Mname},
  101.                         Mname = ToString[ MessageName[Symb, Tag]] ;
  102.                         Res = If[ Tag =!= "usage",
  103.                                 FindList[ "msgthin.m",{ Mname,
  104.                                         ToString[MessageName[General, Tag]]}],
  105.                                 FindList[ "infothin.m", Mname]] ;
  106.             If[ ListQ[Res] && Apply[ And, Map[ StringQ, Res]],
  107.                       ToExpression[ Res]] ;
  108.                         ],
  109.                 {HoldAll}]
  110.  
  111. Attributes[ $NewMessage] = {Protected}
  112.  
  113. SystemStub[ Fn_, File_] :=
  114.         Block[{Args},
  115.                 Unprotect[ Fn] ;
  116.                 (Fn[Args___]:= AutoLoad[Fn,File,{Args}]);
  117.                 SetAttributes[Fn, {Protected, ReadProtected}];
  118.         ]
  119.  
  120. Attributes[ SystemStub] = {Protected}
  121.  
  122. AutoLoad[Fn_,File_,Args_]:=
  123.         Block[{},
  124.                 Get[File];
  125.                 Apply[Fn,Args]
  126.         ];
  127.  
  128. Attributes[ AutoLoad] = {Protected}
  129.  
  130. End[]
  131.  
  132. SystemStub[ Integrate`Definite, "Integrate`main`"];
  133. SystemStub[ Integrate`TableLookUp, "Integrate`table`"];
  134. SystemStub[ JacobiSN, "Elliptic.m"];
  135. SystemStub[ JacobiSD, "Elliptic.m"];
  136. SystemStub[ JacobiSC, "Elliptic.m"];
  137. SystemStub[ JacobiCS, "Elliptic.m"];
  138. SystemStub[ JacobiCN, "Elliptic.m"];
  139. SystemStub[ JacobiCD, "Elliptic.m"];
  140. SystemStub[ JacobiNC, "Elliptic.m"];
  141. SystemStub[ JacobiND, "Elliptic.m"];
  142. SystemStub[ JacobiDN, "Elliptic.m"];
  143. SystemStub[ JacobiDS, "Elliptic.m"];
  144. SystemStub[ JacobiDC, "Elliptic.m"];
  145. SystemStub[ JacobiAmplitude, "Elliptic.m"];
  146. SystemStub[ InverseJacobiSN, "Elliptic.m"];
  147. SystemStub[ InverseJacobiSD, "Elliptic.m"];
  148. SystemStub[ InverseJacobiSC, "Elliptic.m"];
  149. SystemStub[ InverseJacobiCS, "Elliptic.m"];
  150. SystemStub[ InverseJacobiCN, "Elliptic.m"];
  151. SystemStub[ InverseJacobiCD, "Elliptic.m"];
  152. SystemStub[ InverseJacobiNS, "Elliptic.m"];
  153. SystemStub[ InverseJacobiNC, "Elliptic.m"];
  154. SystemStub[ InverseJacobiDS, "Elliptic.m"];
  155. SystemStub[ InverseJacobiDC, "Elliptic.m"];
  156. SystemStub[ InverseJacobiDN, "Elliptic.m"];
  157. SystemStub[ InverseJacobiND, "Elliptic.m"];
  158. SystemStub[ EllipticNomeQ, "Elliptic.m"];
  159. SystemStub[ EllipticThetaS, "Elliptic.m"];
  160. SystemStub[ EllipticThetaC, "Elliptic.m"];
  161. SystemStub[ EllipticThetaN, "Elliptic.m"];
  162. SystemStub[ EllipticThetaD, "Elliptic.m"];
  163. SystemStub[ WeierstrassP, "Elliptic.m"];
  164. SystemStub[ WeierstrassPPrime, "Elliptic.m"];
  165. SystemStub[ InverseWeierstrassP, "Elliptic.m"];
  166. SystemStub[ EllipticExp, "Elliptic.m"];
  167. SystemStub[ EllipticLog, "Elliptic.m"];
  168. SystemStub[ HypergeometricPFQ, "HypergeometricPFQ.m"];
  169. SystemStub[ HypergeometricPFQRegularized, "HypergeometricPFQ.m"];
  170. SystemStub[ Hypergeometric1F1, "HypergeometricPFQ.m"];
  171. SystemStub[ Hypergeometric2F1, "HypergeometricPFQ.m"];
  172. SystemStub[InverseSeries, "Series.m"];
  173. SystemStub[Series, "Series.m"];
  174. SystemStub[SeriesData, "Series.m"];
  175. SystemStub[ ClebschGordan, "ClebschGordan.m"];
  176. SystemStub[ ThreeJSymbol, "ClebschGordan.m"];
  177. SystemStub[ SixJSymbol, "ClebschGordan.m"];
  178. SystemStub[ LinearProgramming, "LinearProgramming.m"];
  179. SystemStub[ PrimePi, "PrimePi.m"];
  180. SystemStub[ NSolve, "NSolve.m"];
  181. SystemStub[ GroebnerBasis, "GroebnerBasis.m"];
  182. SystemStub[ ComplexExpand, "ComplexExpand.m"];
  183. SystemStub[ TargetFunctions, "ComplexExpand.m"];
  184. Begin[ "System`ComplexExpand`"];
  185. SystemStub[ AbsExpr, "ComplexExpand.m"];
  186. SystemStub[ ArgExpr, "ComplexExpand.m"];
  187. SystemStub[ ConjugateExpr, "ComplexExpand.m"];
  188. SystemStub[ ReImExpr, "ComplexExpand.m"];
  189. SystemStub[ SignExpr, "ComplexExpand.m"];
  190. End[];
  191.  
  192. (* End Thin system stuff *)
  193.  
  194.  
  195. (* NProtect functions READ this is LAST to prevent wrong symbols
  196.     being generated *)
  197. (*
  198.    <<NProt.m
  199. *)
  200.  
  201. (* this symbol will be evaluated when Mathematica ends *)
  202.    $Epilog := << end.m
  203.  
  204. (* restore previous context *)
  205.    End[]
  206.  
  207. (* standard return value for the Get which got this file *)
  208.    Null
  209.