Fix #4414: Add url for bug reporting page in bug_report
[maxima.git] / archive / src / cl-maxima-sysdef.lisp
blob9a0027a5d9c0aa42133634f816c5135431da35eb
1 ;;; -*- Mode: Lisp; Package: Maxima; Syntax: Common-Lisp; Base: 10 -*- ;;;;
2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3 ;;; The data in this file contains enhancments. ;;;;;
4 ;;; ;;;;;
5 ;;; Copyright (c) 1984,1987 by William Schelter,University of Texas ;;;;;
6 ;;; All rights reserved ;;;;;
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
10 ;; Instructions for making a Maxima system.
11 ;; We have called it Maxima so as not to conflict with another system of
12 ;; similar name installed here at UTexas.
15 (or (member :cl lisp:*features*) (push :cl lisp:*features*))
16 #+symbolics
17 (cond ( (>= (si::get-system-version 'system) 349)
18 (push :genera Lisp:*features*)
19 (push :zlch lisp:*features*))
20 (t (push :pre-genera lisp:*features*)))
22 #+ti
23 (cond ((= (si::get-system-version ) 1)
24 (push :tirel3 Lisp:*features*)))
26 ;; We are now assuming that #-zetalisp valid. Remove from *features* if necessary!
28 ;;note its compile-sytem and load-sytem in release 7 on symbolics.
29 ;; (MAKE-SYSTEM 'MAXIMA) to load.
30 ;; (MAKE-SYSTEM 'MAXIMA ':BATCH) to load without questions or more processing.
31 ;; (MAKE-SYSTEM 'MAXIMA ':COMPILE) to compile recently changed files and then load.
32 ;; (MAKE-SYSTEM 'MAXIMA ':RECOMPILE) to recompile the entire system and then load.
36 (cond ((find-package "CL-MAXIMA"))
37 (t (make-package 'cl-MAXIMA
38 :nicknames '(cl-macsyma maxima macsyma )
39 :use '( "LISP"))))
41 ;;Many of the things shadowed aren't in most peoples idea of the lisp package
42 ;;but just to be sure.
44 (SHADOW '(#+TI FIXNUMP
45 #+TI COPY
46 #+TI BIGP
47 #+TI PUTPROP
48 ARGS ;;unused outside maxima
49 DEF
50 DISPATCH
51 FETCH ;;unused outside maxima
52 LET
53 LET*
54 LISTEN
55 PAIR ;;unused outside maxima
56 SELECTOR
57 TRUE
58 XOR ;;unused outside maxima
59 STORE) 'CL-MAXIMA)
61 #+ti
62 (shadow '(*array arg listify setarg exploden explodec implode ceil
63 signp tyo tyi tyipeek arraycall local-declare
64 cursorpos readlist explode getcharn getchar ascii maknam flatc flatsize ) 'maxima)
66 (shadow '(tan sinh cosh tanh ) 'cl-maxima)
68 ;;defined in polyrz
69 (shadow '(signum ) 'cl-maxima)
71 ;;lmsup
72 (shadow '(namestring) 'cl-maxima)
74 ;;in transs
75 (shadow '(truename) 'cl-maxima)
77 #+lispm
78 (import '(
79 global:gc-on global:gc-off
80 global:user-id
81 global:ERROR-RESTART-LOOP
82 global:condition-case
83 global:compile-flavor-methods
84 global:default-cons-area
85 global:errset
86 global:make-condition
87 global:signal-condition
88 si::record-source-file-name
89 #+ti tv::define-user-option-alist
90 #+ti tv:font-char-height ;for plot win
91 #+ti tv:font-char-width ;for plot win
92 #-ti global:define-user-option-alist
93 #-symbolics global:defflavor
94 #-symbolics global:defmethod
95 #-symbolics global:defun-method
96 global:self
97 global:send
98 global:print-herald
99 global:without-interrupts
100 global:current-process
101 global:working-storage-area
102 ) 'cl-maxima)
105 #+cl
106 (shadow '(
107 ARRAY ;;"CL-MAXIMA-SOURCE: MAXIMA; COMMAC" ;not a function in common lisp but symbol in the package
108 EXP ;;various files declare this special which is bad since it is in LISP package.
109 LET ;;"CL-MAXIMA-SOURCE: MAXIMA; LET" ;;like let*
110 LET* ;;"CL-MAXIMA-SOURCE: MAXIMA; LET" ;;maxima:let* does destructuring.
111 LISTEN ;;"CL-MAXIMA-SOURCE: MAXIMA; SUPRV" ;;has trivial definition in suprv (listen any) ==> 0
112 SIGNUM ;;"CL-MAXIMA-SOURCE: MAXIMA; COMMAC" ;same except (cl:signum 1.3)==1.0 not 1 but I think this is ok for macsyma
113 ATAN ;; (zl:atan y x) == (cl:atan y x) + 2 pi if latter is negative
114 ASIN ;; different for complex numbers
115 ACOS
116 ASINH
117 ACOSH
118 ATANH
119 TANH ;;"CL-MAXIMA-SOURCE: MAXIMA; TRIGI" ;same could remove from trigi
120 COSH ;;"CL-MAXIMA-SOURCE: MAXIMA; TRIGI" ;same ditto
121 SINH ;;"CL-MAXIMA-SOURCE: MAXIMA; TRIGI" ;same ditto
122 TAN ;;"CL-MAXIMA-SOURCE: MAXIMA; TRIGI" ;;same ditto
123 ) 'cl-maxima)
125 ;;new definitions in commac to handle narg compat.
126 (shadow '(arg listify setarg) 'cl-maxima)
129 ;;logical pathname declarations are in sys:site;cl-maxima-source.translations
130 ;;and sys:site;cl-maxima-object.translations
131 ;;And the whole sysdef file (minus the declarations) is pointed to
132 ;;by sys:site; maxima.system so that we should not have to load it
134 ;;Syntax is "Device:directory; filename" and the above should result in the code being looked for
135 ;; in the right place but being compiled and send to new directories"
139 (defun cl-maxima-compile (file-name &aux ans in out)
140 (setq ans (compile-file (setq in (fs:merge-pathname-defaults (format nil "Cl-maxima-source:maxima;~A.lisp" file-name)))
141 :output-file
142 (setq out (format nil "Cl-maxima-object:maxima;~A" file-name))))
143 (format t "~%Compiled ~A with true name ~A to ~A ~% with true name ~A" in (send in :truename) ans (send ans :truename)) ans)
144 (defun cl-maxima-load (file-name)
145 (load (format nil "Cl-maxima-object:maxima;~A" file-name)))
147 (defmacro defsys (name source-dir obj-dir options-list files-list)
148 "The files in FILES-LIST will be compiled and loaded sequentially.
149 Elements of files-list can be either one file or a list of files. A
150 list would be done in parallel. The list of files may also be of the
151 form (:module name-of-module (file1 file2 ..)).
152 This is equivalent to (file1 file2 ...) The SOURCE-DIR is appended to the
153 beginning of each file for source and objects go under OBJ-DIR"
154 (sloop for v in files-list with module-name
155 do (or (listp v) (setf v (list v)))
156 (cond ((eql (car v) :module)
157 (setf module-name (second v))
158 (setf v (third v)))
159 (t(setq module-name (intern (format nil "~a" (car v))))))
160 collecting module-name into module-names
161 collecting
162 `(:module ,module-name
163 , (sloop for file in v
164 collecting (list (format nil "~a~a" source-dir file)
165 (format nil "~a~a" obj-dir file))))
166 into modules
167 finally (return
168 `(global:defsystem ,name #+genera ,options-list #+(or ti pre-genera)
169 ,@ options-list
170 ,@ modules
171 #+genera (:serial ,@ module-names)
172 #+(or ti pre-genera)
173 ,@ (sloop for v in module-names
174 with so-far
175 collecting
176 (cond ((setq so-far (copy-list names))
177 `(:compile-load ,v
178 (:fasload ,@ so-far)
179 (:fasload ,@ so-far)))
180 (t `(:compile-load ,v)))
181 into orders
182 collecting v into names
183 finally (return orders))))))
186 (DEFSYS cl-maxima "cl-maxima-source:maxima;" "cl-maxima-object:maxima;"
187 #+genera
188 (:pretty-name "Cl Maxima"
189 :default-pathname "cl-maxima-object:maxima;"
190 :patchable t)
191 #+(or ti pre-genera)
192 ((:Name "Interactive Formatting")
193 (:patchable "cl-maxima-patch:maxima;"))
194 ((:Module declarations
195 (LMDCLS))
196 (:MODULE DESTRUCTURING-LET
197 (LET))
198 (:module compatibility-macros1
199 (clmacs
201 (:module compatibility-macros
202 ( commac
204 #+symbolics method-compat
205 (:MODULE PREREQUISITES
206 (MORMAC
207 COMPAT))
208 (:MODULE FUNDAMENTAL-MACROS
209 (DEFOPT
210 DEFCAL
211 MAXMAC ))
212 (:MODULE UTILITY-MACROS
213 (MOPERS
214 MFORMA
215 DEFCAL
217 (:MODULE OTHER-MACROS
218 (MRGMAC
219 PROCS
220 RZMAC
221 STRMAC
222 DISPLM ))
223 (:MODULE RAT-MACROS
224 (RATMAC
225 MHAYAT ))
226 (:MODULE NUMERICAL-MACROS
227 (NUMERM ))
229 ;;other (:MODULE MACROS (
230 ;; OTHER-MACROS RAT-MACROS NUMERICAL-MACROS))
231 (:MODULE UTILITIES
232 (OPERS
233 UTILS
234 SUMCON
235 SUBLIS
236 RUNTIM
237 MERROR
238 MFORMT
239 MUTILS
240 OUTMIS
242 MISC ))
243 (:MODULE COMMANDS
244 (COMM
245 COMM2 ))
246 (:MODULE EVALUATOR
247 (MLISP
248 MMACRO
249 BUILDQ ))
250 (:MODULE SIMPLIFICATION
251 (SIMP
252 FLOAT
253 CSIMP
254 CSIMP2
255 ZERO
256 LOGARC
257 RPART ))
258 (:MODULE I-O
259 (LMSUP
260 SYSTEM
261 MLOAD
262 SUPRV1
263 ;; we should really look, *seriously*, at the functionality provided
264 ;; by the DSKFN package. Mainly, it saves and manages environments.
265 DSKFN
267 (:MODULE FACTORING
268 (LESFAC
269 FACTOR
270 ALGFAC
271 NALGFA
272 ; NEWFAC ;Why was this commented out?
273 UFACT
274 RESULT ))
275 (:MODULE RATIONAL-FUNCTIONS
276 (RAT3A
277 RAT3B
278 RAT3D
279 RAT3C
280 RAT3E
281 NRAT4
282 RATOUT ))
283 (:MODULE MAXIMA-LANGUAGE-COMPILER-MACROS
284 (TRANSM ))
285 (:MODULE MAXIMA-LANGUAGE-COMPILER
286 ;; This includes the translator itself and runtime
287 ;; support needed for translated code.
288 (TRANSL
289 TRANSS
290 TRANS1
291 TRANS2
292 TRANS3
293 TRANS4
294 TRANS5
295 TRANSF
296 TROPER
297 TRUTIL
298 TRMODE
299 TRDATA
300 TRPRED
301 TRANSQ
302 ACALL ;
303 FCALL
304 EVALW
305 TRPROP
306 MDEFUN
308 (:MODULE NUMERICAL-FUNCTIONS
309 (BESSEL
310 ELLIPT
311 NUMER
312 INTPOL
313 ROMBRG
315 ;;Rest of System
316 (:MODULE READER
317 (NPARSE ))
318 (:MODULE DISPLAY
319 (DISPLA
320 NFORMA
321 LDISP
322 GRIND ))
323 (:MODULE GCD
324 (SPGCD
325 ezgcd
327 ; (:MODULE RATIONAL-FUNCTION-SUBSYSTEM
328 ; (RATIONAL-FUNCTIONS FACTORING GCD))
329 (:MODULE DOcuMENTATION
330 (OPTION
331 ;; Due to the highly hackish readtable munging,
332 ;; and file accessing done in the PRIMER it has not
333 ;; been converted.
334 ;;(("Cl-maxima-source:MAXIMA;PRIMER" "Cl-maxima-object:MAXIMA;PRIMER")
335 describe
336 MUDOC ))
337 (:MODULE ALGEBRAIC-DATABASE
338 (INMIS
340 COMPAR
341 ASKP )) ;does this belong here?
342 (:MODULE INTEGRATION
343 (SININT
344 SIN
345 RISCH ))
346 (:MODULE TAYLOR-SERIES
347 (HAYAT ))
348 (:MODULE DEFINITE-INTEGRATION
349 (DEFINT
350 RESIDU ))
351 ; (:MODULE DISPLAY-EDITOR-MACROS
353 ; EDMAC
354 ; ))
355 ; (:MODULE DISPLAY-EDITOR
357 ; EDLM ;;for lispm use good zmacs interface
358 ; ;;instead of this stuff. Can display into zmacs and evaluate etc. --wfs
359 ; EDCTL
360 ; EDEXP
361 ; EDBUF ;;not to useful for lispm -wfs
362 ; ))
363 (:MODULE PLOTTING
364 (PLTWIN
365 PLOTLL ; fix the instance
366 PLOT
367 IFFUN
368 PLOT3D ))
369 (:MODULE TRIGONOMETRY
370 (TRIGI
371 TRIGO
372 TRGRED ))
373 (:MODULE SPECIAL-FUNCTIONS
374 (SPECFN ))
375 (:MODULE MATRIX-ALGEBRA
376 (MAT
377 MATRIX ))
378 (:MODULE DETERMINANTS
379 (SPRDET
380 NEWINV
381 LINNEW
382 NEWDET ))
383 (:MODULE PATTERN-MATCHING
384 (SCHATC
385 MATCOM
386 MATRUN
387 NISIMP ))
388 (:MODULE LIMITS
389 (TLIMIT
390 LIMIT ))
391 (:MODULE SOLVE
392 (SOLVE
393 PSOLVE
394 ALGSYS
395 POLYRZ
396 CPOLY ))
397 ; (:Module Tensor
398 ; (itensr
399 ; canten
400 ; gener
401 ; symtry ))
403 ; (:module documentation-files
404 ; (:documentation macsym.doc)
405 (:MODULE DEBUGGING
406 (MTRACE ))
407 (:MODULE MISCELLANEOUS
408 (SCS
409 ASUM
410 FORTRA
411 OPTIM
412 ARRAY
413 MDOT
414 IRINTE
415 SERIES
416 NUMTH
417 LAPLAC
418 PADE
419 HOMOG
420 COMBIN
421 MSTUFF))
422 (:MODULE POISSON-SERIES
423 (RATPOI
424 POIS2
425 POIS3 ))
426 (:MODULE INTERACTION-WITH-EDITOR
427 (BUFFER1
428 buffer2
429 BUFFER))
430 (:Module translated-packages
431 (nusum
432 desoln
433 elim
434 trgsmp
435 ode2
436 invert
440 #+ti
441 (progn
442 (setq compiler::qc-file-check-indentation nil)
443 (remprop 'prog 'compiler::style-checker)
446 #+distribute ;for making tape
447 (tape:carry-dump '("sys:site;cl-maxima.system"
448 "sys:site;*cl-maxima*.translations.newest"
449 "maxima-documentation:maxima;*instal*.*.newest"
450 "cl-maxima-source:maxima;*.lisp.newest"
451 "cl-maxima-source:maxima;*.mac.newest"
452 "maxima-documentation:maxima;*.*.newest"))