1 ;;; -*- Mode: Lisp; Package: Maxima; Syntax: Common-Lisp; Base: 10 -*- ;;;;
2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3 ;;; The data in this file contains enhancments. ;;;;;
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
*))
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
*)))
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
)
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
48 ARGS
;;unused outside maxima
51 FETCH
;;unused outside maxima
55 PAIR
;;unused outside maxima
58 XOR
;;unused outside maxima
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
)
69 (shadow '(signum ) 'cl-maxima
)
72 (shadow '(namestring) 'cl-maxima
)
75 (shadow '(truename) 'cl-maxima
)
79 global
:gc-on global
:gc-off
81 global
:ERROR-RESTART-LOOP
83 global
:compile-flavor-methods
84 global
:default-cons-area
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
99 global
:without-interrupts
100 global
:current-process
101 global
:working-storage-area
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
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
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
)))
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
))
159 (t(setq module-name
(intern (format nil
"~a" (car v
))))))
160 collecting module-name into module-names
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
))))
168 `(global:defsystem
,name
#+genera
,options-list
#+(or ti pre-genera
)
171 #+genera
(:serial
,@ module-names
)
173 ,@ (sloop for v in module-names
176 (cond ((setq so-far
(copy-list names
))
179 (:fasload
,@ so-far
)))
180 (t `(:compile-load
,v
)))
182 collecting v into names
183 finally
(return orders
))))))
186 (DEFSYS cl-maxima
"cl-maxima-source:maxima;" "cl-maxima-object:maxima;"
188 (:pretty-name
"Cl Maxima"
189 :default-pathname
"cl-maxima-object:maxima;"
192 ((:Name
"Interactive Formatting")
193 (:patchable
"cl-maxima-patch:maxima;"))
194 ((:Module declarations
196 (:MODULE DESTRUCTURING-LET
198 (:module compatibility-macros1
201 (:module compatibility-macros
204 #+symbolics method-compat
205 (:MODULE PREREQUISITES
208 (:MODULE FUNDAMENTAL-MACROS
212 (:MODULE UTILITY-MACROS
217 (:MODULE OTHER-MACROS
226 (:MODULE NUMERICAL-MACROS
229 ;;other (:MODULE MACROS (
230 ;; OTHER-MACROS RAT-MACROS NUMERICAL-MACROS))
250 (:MODULE SIMPLIFICATION
263 ;; we should really look, *seriously*, at the functionality provided
264 ;; by the DSKFN package. Mainly, it saves and manages environments.
272 ; NEWFAC ;Why was this commented out?
275 (:MODULE RATIONAL-FUNCTIONS
283 (:MODULE MAXIMA-LANGUAGE-COMPILER-MACROS
285 (:MODULE MAXIMA-LANGUAGE-COMPILER
286 ;; This includes the translator itself and runtime
287 ;; support needed for translated code.
308 (:MODULE NUMERICAL-FUNCTIONS
327 ; (:MODULE RATIONAL-FUNCTION-SUBSYSTEM
328 ; (RATIONAL-FUNCTIONS FACTORING GCD))
329 (:MODULE DOcuMENTATION
331 ;; Due to the highly hackish readtable munging,
332 ;; and file accessing done in the PRIMER it has not
334 ;;(("Cl-maxima-source:MAXIMA;PRIMER" "Cl-maxima-object:MAXIMA;PRIMER")
337 (:MODULE ALGEBRAIC-DATABASE
341 ASKP
)) ;does this belong here?
346 (:MODULE TAYLOR-SERIES
348 (:MODULE DEFINITE-INTEGRATION
351 ; (:MODULE DISPLAY-EDITOR-MACROS
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
361 ; EDBUF ;;not to useful for lispm -wfs
365 PLOTLL
; fix the instance
369 (:MODULE TRIGONOMETRY
373 (:MODULE SPECIAL-FUNCTIONS
375 (:MODULE MATRIX-ALGEBRA
378 (:MODULE DETERMINANTS
383 (:MODULE PATTERN-MATCHING
403 ; (:module documentation-files
404 ; (:documentation macsym.doc)
407 (:MODULE MISCELLANEOUS
422 (:MODULE POISSON-SERIES
426 (:MODULE INTERACTION-WITH-EDITOR
430 (:Module translated-packages
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"))