1 ;;; -*- Mode: Lisp; Package: Macsyma -*-
2 ;;; Translated code for LMIVAX::MAX$DISK:[SHARE2]OPTVAR.MC;2
3 ;;; Written on 9/20/1984 05:11:16, from MACSYMA 302
6 ;;; TRANSL-AUTOLOAD version NIL
7 ;;; TRANSS version 87 TRANSL version 1157 TRUTIL version 27
8 ;;; TRANS1 version 108 TRANS2 version 39 TRANS3 version 50
9 ;;; TRANS4 version 29 TRANS5 version 26 TRANSF version NIL
10 ;;; TROPER version 15 TRPRED version 6 MTAGS version NIL
11 ;;; MDEFUN version 58 TRANSQ version 88 FCALL version 40
12 ;;; ACALL version 70 TRDATA version 68 MCOMPI version 146
13 ;;; TRMODE version 73 TRHOOK version NIL
14 (eval-when (compile eval
)
15 (setq *infile-name-key
*
16 (namestring (truename '#.standard-input
))))
19 (setq $tr_semicompile
'NIL
)
20 (setq forms-to-compile-queue
()))
22 (comment "OPTVAR.MC;2")
24 ;;; General declarations required for translated MACSYMA code.
28 $K $DYDT $DD $C $AUX $TIME $GRINDSWITCH $SOLVERADCAN $SINGSOLVE ^W
))
30 (DEFMTRFUN-EXTERNAL ($IC $ANY MDEFINE NIL NIL
))
32 (DECLARE (SPECIAL $AUX
))
34 (DECLARE (SPECIAL $C
))
36 (DECLARE (SPECIAL $DD
))
38 (DECLARE (SPECIAL $DYDT
))
40 (DECLARE (SPECIAL $K
))
42 (DEFMTRFUN-EXTERNAL ($HAM $ANY MDEFINE NIL NIL
))
44 (DEFMTRFUN-EXTERNAL ($EL $ANY MDEFINE NIL NIL
))
46 (DEFMTRFUN-EXTERNAL ($CONVERT $ANY MDEFINE NIL NIL
))
51 (SETQ $TIME
(SETQ $GRINDSWITCH
(SETQ $SOLVERADCAN
(SETQ $SINGSOLVE T
))))
53 (MEVAL* '(($ALIAS
) $DIFF $DIFF
))
55 (DEFPROP $IC T TRANSLATED
)
59 (DEFMTRFUN ($IC $ANY MDEFINE NIL NIL
) ($SOLN $XA $YA $DYA
) NIL
60 (SIMPLIFY (MFUNCTION-CALL $IC2 $SOLN $XA $YA $DYA
)))
62 (DEFPROP $DV T TRANSLATED
)
67 ($DV $ANY MDEFMACRO NIL NIL
) ($A
) NIL
69 (LIST (CONS '$A $A
)) '(($DEFINE_VARIABLE
) $A
((MQUOTE) $A
) $ANY
)))
71 (MEVAL* '(($MODEDECLARE
) $AUX $ANY
))
73 (MEVAL* '(($DECLARE
) $AUX $SPECIAL
))
75 (DEF-MTRVAR $AUX
'$AUX
)
77 (MEVAL* '(($MODEDECLARE
) $C $ANY
))
79 (MEVAL* '(($DECLARE
) $C $SPECIAL
))
83 (MEVAL* '(($MODEDECLARE
) $DD $ANY
))
85 (MEVAL* '(($DECLARE
) $DD $SPECIAL
))
89 (MEVAL* '(($MODEDECLARE
) $DYDT $ANY
))
91 (MEVAL* '(($DECLARE
) $DYDT $SPECIAL
))
93 (DEF-MTRVAR $DYDT
'$DYDT
)
95 (MEVAL* '(($MODEDECLARE
) $K $ANY
))
97 (MEVAL* '(($DECLARE
) $K $SPECIAL
))
101 (DEFPROP $HAM T TRANSLATED
)
103 (ADD2LNC '$HAM $PROPS
)
106 ($HAM $ANY MDEFINE NIL NIL
) ($ODES
) NIL
107 ((LAMBDA ($T $NSV $STATEVARS $AUXVARS $ANSW $ELIST $AUXDE
)
109 (COND ((NOT (MFUNCTION-CALL $LISTP $ODES
))
110 (SETQ $ODES
(LIST '(MLIST) $ODES
))))
111 (SETQ $T
(SIMPLIFY (MFUNCTION-CALL $PART $ODES
1 1 2)))
112 (SETQ $NSV
(MFUNCTION-CALL $LENGTH $ODES
))
113 (SETQ $STATEVARS
(SETQ $AUXVARS
(SETQ $ELIST
'((MLIST)))))
114 (DO (($I
1 (+ 1 $I
))) ((IS-BOOLE-CHECK (MGRP $I $NSV
)) '$DONE
)
117 (SIMPLIFY (MFUNCTION-CALL
118 $ENDCONS
(SIMPLIFY (MFUNCTION-CALL $PART $ODES $I
1 1))
124 $ENDCONS
(MARRAYREF (TRD-MSYMEVAL $AUX
'$AUX
) $I
) $AUXVARS
))))
129 (FUNGEN&ENV-FOR-MEVALSUMARG
131 (MUL* (SIMPLIFY (MFUNCTION-CALL $RHS
(MARRAYREF $ODES $I
)))
132 (MARRAYREF (TRD-MSYMEVAL $AUX
'$AUX
) $I
))
133 ((MTIMES) (($RHS
) (($ODES ARRAY
) $I
)) (($AUX ARRAY
) $I
)))
135 (DO (($I
1 (+ 1 $I
))) ((IS-BOOLE-CHECK (MGRP $I $NSV
)) '$DONE
)
141 (SIMPLIFY (LIST '(%DERIVATIVE
)
142 (MARRAYREF (TRD-MSYMEVAL $AUX
'$AUX
) $I
) $T
))
144 (SIMPLIFY (MFUNCTION-CALL $DIFF
(MARRAYREF $ANSW
1)
145 (MARRAYREF $STATEVARS $I
)))))))
146 (SETQ $ANSW
(SIMPLIFY (MFUNCTION-CALL $ENDCONS $AUXDE $ANSW
)))
148 ((LIKE (SIMPLIFY (MFUNCTION-CALL $RHS $AUXDE
)) 0)
155 (LIST '(MEQUAL) (MARRAYREF (TRD-MSYMEVAL $AUX
'$AUX
) $I
)
156 (MARRAYREF (TRD-MSYMEVAL $C
'$C
) $I
)))
158 (DO (($ITEM
) (MDO (CDR $ANSW
) (CDR MDO
))) ((NULL MDO
) '$DONE
)
159 (SETQ $ITEM
(CAR MDO
))
162 (SIMPLIFY (MFUNCTION-CALL
164 (SIMPLIFY ($FIRST
(SIMPLIFY (MFUNCALL '$LDISP $ITEM
))))
167 '$T
'$NSV
'$STATEVARS
'$AUXVARS
'$ANSW
'$ELIST
'$AUXDE
))
169 (DEFPROP $EL T TRANSLATED
)
171 (ADD2LNC '$EL $PROPS
)
174 ($EL $ANY MDEFINE NIL NIL
) ($F $YLIST $TLIST
) NIL
175 ((LAMBDA ($LY $LT $FSUB $ENERGYCON $FY $ANSW $ELIST
)
177 (COND ((NOT (MFUNCTION-CALL $LISTP $TLIST
))
178 (SETQ $TLIST
(LIST '(MLIST) $TLIST
))))
179 (COND ((NOT (MFUNCTION-CALL $LISTP $YLIST
))
180 (SETQ $YLIST
(LIST '(MLIST) $YLIST
))))
181 (SETQ $LY
(MFUNCTION-CALL $LENGTH $YLIST
))
182 (SETQ $LT
(MFUNCTION-CALL $LENGTH $TLIST
))
184 (SETQ $ENERGYCON
(LIKE $LT
1))
185 (DO (($I
1 (+ 1 $I
))) ((IS-BOOLE-CHECK (MGRP $I $LY
)) '$DONE
)
186 (DO (($J
1 (+ 1 $J
))) ((IS-BOOLE-CHECK (MGRP $J $LT
)) '$DONE
)
189 (MFUNCTION-CALL $DERIVDEGREE $FSUB
(MARRAYREF $YLIST $I
)
190 (MARRAYREF $TLIST $J
)))
191 (TRD-MSYMEVAL $DD
'$DD
) $I $J
)
192 (COND ((IS-BOOLE-CHECK
193 (MGRP (MARRAYREF (TRD-MSYMEVAL $DD
'$DD
) $I $J
) 1))
194 (SETQ $ENERGYCON NIL
)))
195 (DO (($KK
1 (+ 1 $KK
)))
197 (MGRP $KK
(MARRAYREF (TRD-MSYMEVAL $DD
'$DD
) $I $J
)))
206 (SIMPLIFY (LIST '(%DERIVATIVE
) (MARRAYREF $YLIST $I
)
207 (MARRAYREF $TLIST $J
) $KK
))
208 (MARRAYREF (TRD-MSYMEVAL $DYDT
'$DYDT
) $I $J $KK
)))
210 (COND ((NOT (MFUNCTION-CALL $FREEOF
(MARRAYREF $TLIST
1) $FSUB
))
211 (SETQ $ENERGYCON NIL
)))
212 (SETQ $ANSW
(COND ((IS-BOOLE-CHECK $ENERGYCON
) (LIST '(MLIST) $FSUB
))
214 (DO (($I
1 (+ 1 $I
))) ((IS-BOOLE-CHECK (MGRP $I $LY
)) '$DONE
)
216 $FY
(SIMPLIFY (MFUNCTION-CALL $DIFF $FSUB
(MARRAYREF $YLIST $I
))))
226 (FUNGEN&ENV-FOR-MEVALSUMARG
229 (FUNGEN&ENV-FOR-MEVALSUMARG
230 ($FSUB $J $I $TLIST
) ($KK
)
232 (POWER -
1 (ADD* $KK -
1))
238 (MARRAYREF (TRD-MSYMEVAL $DYDT
'$DYDT
)
240 (MARRAYREF $TLIST $J
) $KK
)))
242 ((MEXPT) ((MMINUS) 1) ((MPLUS) $KK
((MMINUS) 1)))
244 (($DIFF
) $FSUB
(($DYDT ARRAY
) $I $J $KK
))
245 (($TLIST ARRAY
) $J
) $KK
)))
246 '$KK
1 (MARRAYREF (TRD-MSYMEVAL $DD
'$DD
) $I $J
) T
)
249 ((MEXPT) ((MMINUS) 1) ((MPLUS) $KK
((MMINUS) 1)))
251 (($DIFF
) $FSUB
(($DYDT ARRAY
) $I $J $KK
))
252 (($TLIST ARRAY
) $J
) $KK
))
253 $KK
1 (($DD ARRAY
) $I $J
)))
258 ((IS-BOOLE-CHECK $ENERGYCON
)
266 (MARRAYREF (TRD-MSYMEVAL $DYDT
'$DYDT
) $I
1 1)))
267 (SIMPLIFY (LIST '(%DERIVATIVE
) (MARRAYREF $YLIST $I
)
268 (MARRAYREF $TLIST
1))))))
271 ((AND (LIKE $FY
0) (LIKE $LT
1)
272 (LIKE (MARRAYREF (TRD-MSYMEVAL $DD
'$DD
) $I
1) 1))
284 (MARRAYREF (TRD-MSYMEVAL $DYDT
'$DYDT
) $I
1 1)))
285 (MARRAYREF (TRD-MSYMEVAL $K
'$K
) $I
)))
288 ((IS-BOOLE-CHECK $ENERGYCON
)
289 (MARRAYSET (SIMPLIFY (LIST '(MEQUAL) (MARRAYREF $ANSW
1)
290 (MARRAYREF (TRD-MSYMEVAL $K
'$K
) 0)))
292 (DO (($I
1 (+ 1 $I
))) ((IS-BOOLE-CHECK (MGRP $I $LY
)) '$DONE
)
293 (DO (($J
1 (+ 1 $J
))) ((IS-BOOLE-CHECK (MGRP $J $LT
)) '$DONE
)
294 (DO (($KK
1 (+ 1 $KK
)))
296 (MGRP $KK
(MARRAYREF (TRD-MSYMEVAL $DD
'$DD
) $I $J
)))
305 (MARRAYREF (TRD-MSYMEVAL $DYDT
'$DYDT
) $I $J $KK
)
306 (SIMPLIFY (LIST '(%DERIVATIVE
) (MARRAYREF $YLIST $I
)
307 (MARRAYREF $TLIST $J
) $KK
))))
309 (SETQ $ELIST
'((MLIST)))
310 (DO (($EQN
) (MDO (CDR $ANSW
) (CDR MDO
))) ((NULL MDO
) '$DONE
)
311 (SETQ $EQN
(CAR MDO
))
314 (SIMPLIFY (MFUNCTION-CALL
316 (SIMPLIFY ($FIRST
(SIMPLIFY (MFUNCALL '$LDISP $EQN
))))
319 '$LY
'$LT
'$FSUB
'$ENERGYCON
'$FY
'$ANSW
'$ELIST
))
321 (DEFPROP $CONVERT T TRANSLATED
)
323 (ADD2LNC '$CONVERT $PROPS
)
326 ($CONVERT $ANY MDEFINE NIL NIL
) ($ODES $YLIST $T
) NIL
330 (COND ((NOT (MFUNCTION-CALL $LISTP $YLIST
))
331 (SETQ $YLIST
(LIST '(MLIST) $YLIST
))))
332 (SETQ $ANSW
(SIMPLIFY (MFUNCALL '$EV $ODES
'$EVAL
)))
333 (DO (($YY
) (MDO (CDR $YLIST
) (CDR MDO
))) ((NULL MDO
) '$DONE
)
344 (MFUNCTION-CALL $FUNMAKE $YY
(LIST '(MLIST) $T
)))))
351 (compile-forms-to-compile-queue)