From: Robert D. <rob...@us...> - 2014-03-27 20:58:41
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Maxima CAS". The branch, master has been updated via ee1604870f08f5f0ecb14647fe5bc155add6a964 (commit) via 0067e7c330aa2685754305cf6f7a3cdbff397eb9 (commit) via 9507951bacb3ce1093facd97eb4765494b47dd28 (commit) via c2e834c24c83043500d005b12574e9e1104c99a5 (commit) via ee8512897f26f786326c48fde12a49a2f33ff385 (commit) via b20e096a3ae895ccb9e017a85983526ed4bcf19d (commit) via af19dacc2c4e02303df4ae89ac9862a338a37884 (commit) via b6471205c868a02593748ef2a1f4a60020daa4f1 (commit) via 7b7784f5ffce1178b0f3deb5625a65ba286fe52d (commit) via f61692c4dcd078eda62fbc71fcaabdcfb4ff76a4 (commit) via e39525831598102bbdefef7ae2958e83ff994394 (commit) via 4987fa2d33a1f6d79aa1419040f3dbc489705056 (commit) via 042774a4b24a17aa7f2a891962468edcf228f09e (commit) from 33a788272096bac0244fd1daba3c84162b4f5e34 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ee1604870f08f5f0ecb14647fe5bc155add6a964 Merge: 0067e7c 33a7882 Author: Robert Dodier <rob...@us...> Date: Thu Mar 27 13:58:04 2014 -0700 Merge branch 'master' of ssh://git.code.sf.net/p/maxima/code commit 0067e7c330aa2685754305cf6f7a3cdbff397eb9 Author: Robert Dodier <rob...@us...> Date: Thu Mar 27 13:57:04 2014 -0700 Put built-in operators on *MOPL* list. Fixes SF bug #2695: kill kills built-in properties of operator after user-defined property diff --git a/src/comm.lisp b/src/comm.lisp index ac45d9c..a5c6f04 100644 --- a/src/comm.lisp +++ b/src/comm.lisp @@ -45,7 +45,11 @@ (and (symbolp x) (remprop x 'opr)) (and (stringp x) (remhash x *opr-table*)))) -(mapc #'(lambda (x) (putprop (car x) (cadr x) 'op) (putopr (cadr x) (car x))) +;; Store build-in operators, which get additional properties. +;; These operators aren't killed by the function kill-operator. +(defvar *mopl* nil) + +(mapc #'(lambda (x) (putprop (car x) (cadr x) 'op) (putopr (cadr x) (car x)) (push (cadr x) *mopl*)) '((mplus "+") (mminus "-") (mtimes "*") (mexpt "**") (mexpt "^") (mnctimes ".") (rat "/") (mquotient "/") (mncexpt "^^") (mequal "=") (mgreaterp ">") (mlessp "<") (mleqp "<=") (mgeqp ">=") diff --git a/src/suprv1.lisp b/src/suprv1.lisp index b08d495..83ed87d 100644 --- a/src/suprv1.lisp +++ b/src/suprv1.lisp @@ -21,11 +21,7 @@ (setq old-ibase *read-base* old-base *print-base*) (setq *read-base* 10. *print-base* 10.)) -;; Store build-in operators, which get additional properties. -;; These operators aren't killed by the function kill-operator. -(defvar *mopl* nil) - -(declare-top (special bindlist loclist errset +(declare-top (special bindlist loclist errset *mopl* $values $functions $arrays $gradefs $dependencies $rules $props $ratvars varlist genvar diff --git a/tests/rtest1.mac b/tests/rtest1.mac index 2d0ff35..09584b8 100644 --- a/tests/rtest1.mac +++ b/tests/rtest1.mac @@ -409,3 +409,10 @@ todd_coxeter (symet (4)); todd_coxeter (symet (5)); 120; +/* SF bug #2695: 'kill' kills built-in properties of operator after user-defined property */ + +(kill (a, b), string (a*b)); +"a*b"; + +(put ("*", 'bar, 'foo), kill (all), string (a*b)); +"a*b"; commit 9507951bacb3ce1093facd97eb4765494b47dd28 Author: Robert Dodier <rob...@us...> Date: Thu Mar 27 11:12:07 2014 -0700 When first argument of "get" or "put" is a string, assume it is the name of an operator. E.g. put("*", bar, foo); get("*", foo); => bar diff --git a/src/mlisp.lisp b/src/mlisp.lisp index fe3b268..57a2cef 100644 --- a/src/mlisp.lisp +++ b/src/mlisp.lisp @@ -1381,7 +1381,9 @@ wrapper for this." (unless (or (symbolp ind) (stringp ind)) (merror (intl:gettext "~:M: indicator must be a symbol or a string; found: ~M") fun ind)) (unless (symbolp atom) - (setq atom (intern atom))) + (if (symbolp (getopr atom)) + (setq atom (getopr atom)) + (setq atom (intern atom)))) (unless (symbolp ind) (setq ind (intern ind))) (let ((u (mget atom '$props))) commit c2e834c24c83043500d005b12574e9e1104c99a5 Author: Robert Dodier <rob...@us...> Date: Thu Mar 27 09:26:10 2014 -0700 Update maximaMathML somewhat. * CtMathML.lisp: second argument must be a string or an output stream * PrMathML.lisp: second argument must be a string or an output stream; revise float formatting; format lambda expressions; format %build_info * ezunits.lisp: format ezunits expressions diff --git a/share/contrib/maximaMathML/CtMathML.lisp b/share/contrib/maximaMathML/CtMathML.lisp index 3fc8d75..0e32afe 100644 --- a/share/contrib/maximaMathML/CtMathML.lisp +++ b/share/contrib/maximaMathML/CtMathML.lisp @@ -36,12 +36,17 @@ ((null mexpress) (princ " NO EXPRESSION GIVEN ") (return nil)) ((null (cdr margs)) (setq filename nil) (setq mPrport t)) - ((null (cddr margs)) (setq filename (cadr margs)) + ((null (cddr margs)) (setq mPrport - (open (fullstrip1 (cadr margs)) - :direction :output - :if-exists :append - :if-does-not-exist :create))) + (if (stringp (cadr margs)) + (progn + (setq filename (cadr margs)) + (open (cadr margs) + :direction :output + :if-exists :append + :if-does-not-exist :create)) + ;; otherwise, assume (cadr margs) is a stream. + (cadr margs)))) (t (princ " wrong No. of Arguments given "))) (when (symbolp (setq x mexpress)) (setq x ($verbify x)) diff --git a/share/contrib/maximaMathML/PrMathML.lisp b/share/contrib/maximaMathML/PrMathML.lisp index 3acb69e..d91fb8d 100644 --- a/share/contrib/maximaMathML/PrMathML.lisp +++ b/share/contrib/maximaMathML/PrMathML.lisp @@ -23,7 +23,7 @@ ;;**************************************************************************** ;;Generatig MathML presenation codes for the expr ;;This is a maxima top-level function used the form -;; prmathml(expr, [,filename[,t (d)]]) on the C-line +;; prmathml(expr, [,(filename|stream)[,t (d)]]) on the C-line (defmfun $prmathml (&rest margs) (prog (ccol *row* *indent* filename mexplabel mexpress mPrport x y) @@ -33,12 +33,17 @@ ((null mexpress) (princ " NO EXPRESSION GIVEN ") (return nil)) ((null (cdr margs)) (setq filename nil) (setq mPrport t)) - ((null (cddr margs)) (setq filename (cadr margs)) + ((null (cddr margs)) (setq mPrport - (open (fullstrip1 (cadr margs)) - :direction :output - :if-exists :append - :if-does-not-exist :create))) + (if (stringp (cadr margs)) + (progn + (setq filename (cadr margs)) + (open (cadr margs) + :direction :output + :if-exists :append + :if-does-not-exist :create)) + ;; otherwise, assume (cadr margs) is a stream. + (cadr margs)))) (t (princ " wrong No. of Arguments given "))) (cond ((member mexpress $labels :test #'eq) @@ -608,12 +613,13 @@ (let (r firstpart exponent) (cond ((integerp atom) (tprinc "<mn>") (tprinc atom) (tprinc "</mn>")) - (t (setq r (explode atom)) - (setq exponent (member 'e r :test #'eq)) + (t (setq r (exploden atom)) + ;; Hmm. What if the exponent marker is something other than 'e' or 'E' ?? + (setq exponent (or (member #\e r :test #'eq) (member #\E r :test #'eq))) (cond ((null exponent) (tprinc "<mn>") (tprinc atom) (tprinc "</mn>")) (t (setq firstpart - (nreverse (cdr (member 'e (reverse r) :test #'eq)))) + (nreverse (cdr (or (member #\e (reverse r) :test #'eq) (member #\E (reverse r) :test #'eq))))) (tprinc "<mn>") (mapc #'tpchar firstpart) (tprinc "</mn>") (tprinc "<mo>·</mo><msup><mn>10</mn> <mn>") @@ -727,6 +733,25 @@ (defun mPr-times (mexpress) (let ((lop 'mtimes) (rop 'mtimes)) (mPr-infix mexpress))) +(defun mathml-presentation-lambda (mexpress) + (let + ((op (caar mexpress)) + (args (cdr (cadr mexpress))) + (body (cddr mexpress))) + (mPr_engine op 'mparen 'mparen) + (if (= (length args) 1) + (mPr_engine (car args) 'mparen 'mparen) + (mPr-listparen args)) + (mPr_engine "." 'mparen 'mparen) + (if (= (length body) 1) + (mPr_engine (car body) 'mparen 'mparen) + (mPr-listparen body)))) + +;; An improvement on the default, but not much. +;; Could benefit from just a little more attention. +(defun mathml-presentation-buildinfo (mexpress) + (mPr_engine `(($matrix) ,@(mapcar #'(lambda (e) `((mlist) ,e)) (cdr mexpress))) 'mparen 'mparen)) + ;;;;;;; Operators (setup '(mlist (mPrprocess mPr-list))) @@ -860,6 +885,10 @@ (setup '($matrix (mPrprocess mPr-matrix))) +(setup '(lambda (mPrprocess mathml-presentation-lambda))) + +(setup '(%build_info (mPrprocess mathml-presentation-buildinfo))) + (setup '($%pi (chchr "π"))) (setup '($%e (chchr "ⅇ"))) diff --git a/share/ezunits/ezunits.lisp b/share/ezunits/ezunits.lisp index 2e1de81..b0b5b12 100644 --- a/share/ezunits/ezunits.lisp +++ b/share/ezunits/ezunits.lisp @@ -42,3 +42,8 @@ (defun $evens (a) (cons '(mlist) (odds (cdr a) 0))) +(defun mathml-presentation-ezunits (mexpress) + (mPr_engine `((mtimes) ,(second mexpress) ,(third mexpress)) 'mparen 'mparen)) + +(when (fboundp 'setup) + (setup '($\` (mPrprocess mathml-presentation-ezunits)))) commit ee8512897f26f786326c48fde12a49a2f33ff385 Author: Robert Dodier <rob...@us...> Date: Thu Feb 27 11:30:32 2014 -0800 Special variable clean-up: cut out declaration for unused specials $SAVEFACTORS and $RATFAC. diff --git a/src/sinint.lisp b/src/sinint.lisp index 7093613..e0ee85d 100644 --- a/src/sinint.lisp +++ b/src/sinint.lisp @@ -14,8 +14,8 @@ (load-macsyma-macros ratmac) -(declare-top (special genvar $savefactors checkfactors - exp var $factorflag $ratfac $logabs $expop $expon +(declare-top (special genvar checkfactors + exp var $factorflag $logabs $expop $expon $keepfloat ratform rootfactor pardenom $algebraic wholepart parnumer varlist logptdx switch1)) commit b20e096a3ae895ccb9e017a85983526ed4bcf19d Author: Robert Dodier <rob...@us...> Date: Thu Feb 27 11:29:14 2014 -0800 Special variable clean-up: cut out declaration for unused specials QUOTIND and L. diff --git a/src/sin.lisp b/src/sin.lisp index 8919c77..3aea1a2 100644 --- a/src/sin.lisp +++ b/src/sin.lisp @@ -20,7 +20,7 @@ ;;;; A version with the missing pages is available (2008-12-14) from ;;;; http://www.softwarepreservation.org/projects/LISP/MIT -(declare-top (special $radexpand $%e_to_numlog quotind l ans arcpart coef +(declare-top (special $radexpand $%e_to_numlog ans arcpart coef aa powerlist *a* *b* k stack e w y expres arg var *powerl* *c* *d* exp varlist genvar $liflag $opsubst)) commit af19dacc2c4e02303df4ae89ac9862a338a37884 Merge: b647120 2d01ab6 Author: Robert Dodier <rob...@us...> Date: Sat Feb 22 16:27:46 2014 -0800 Merge branch 'master' of ssh://git.code.sf.net/p/maxima/code commit b6471205c868a02593748ef2a1f4a60020daa4f1 Merge: 7b7784f 50ae20e Author: Robert Dodier <rob...@us...> Date: Wed Feb 19 19:29:24 2014 -0800 Merge branch 'master' of ssh://git.code.sf.net/p/maxima/code commit 7b7784f5ffce1178b0f3deb5625a65ba286fe52d Merge: f61692c 7020269 Author: Robert Dodier <rob...@us...> Date: Thu Feb 13 11:45:06 2014 -0800 Merge branch 'master' of ssh://git.code.sf.net/p/maxima/code commit f61692c4dcd078eda62fbc71fcaabdcfb4ff76a4 Author: Robert Dodier <rob...@us...> Date: Sun Feb 9 15:46:30 2014 -0800 Special variable clean-up: cut out declaration for unused special COMPLEXSIGN. diff --git a/src/rpart.lisp b/src/rpart.lisp index 8cf929c..aef108e 100644 --- a/src/rpart.lisp +++ b/src/rpart.lisp @@ -21,7 +21,7 @@ (load-macsyma-macros rzmac) (declare-top (special $%emode $radexpand rp-polylogp $domain $m1pbranch - $logarc rischp $keepfloat complexsign)) + $logarc rischp $keepfloat)) (defmvar implicit-real nil "If t RPART assumes radicals and logs of real quantities are real and doesn't ask sign questions") commit e39525831598102bbdefef7ae2958e83ff994394 Author: Robert Dodier <rob...@us...> Date: Sun Feb 9 15:45:54 2014 -0800 Special variable clean-up: (1) Replace special YYY with lexical. (2) Cut out declarations for unused specials PROB, ROOTFAC, SIMP, and BIGFLOATZERO. diff --git a/src/risch.lisp b/src/risch.lisp index 578707e..9018bf1 100644 --- a/src/risch.lisp +++ b/src/risch.lisp @@ -14,16 +14,16 @@ (load-macsyma-macros rzmac ratmac) -(declare-top (special prob rootfac parnumer pardenom logptdx wholepart +(declare-top (special parnumer pardenom logptdx wholepart $ratalgdenom expexpflag $logsimp switch1 degree cary $ratfac $logexpand ratform genvar *var var rootfactor expint $keepfloat trigint operator $exponentialize $gcd $logarc changevp klth r s beta gamma b mainvar expflag expstuff liflag intvar switch varlist nogood genvar - $erfflag $liflag rischp $factorflag alphar m simp - genpairs hypertrigint *mosesflag yyy *exp y $algebraic + $erfflag $liflag rischp $factorflag alphar m + genpairs hypertrigint *mosesflag *exp y $algebraic implicit-real $%e_to_numlog generate-atan2 - context bigfloatzero rp-polylogp *in-risch-p*)) + context rp-polylogp *in-risch-p*)) (defmvar $liflag t "Controls whether `risch' generates polylogs") @@ -1085,5 +1085,5 @@ (subst '/_101x *var a)) (declare-top (unspecial b beta cary context *exp degree gamma - klth liflag m nogood operator prob - r s simp switch switch1 *var var y yyy)) + klth liflag m nogood operator + r s switch switch1 *var var y)) commit 4987fa2d33a1f6d79aa1419040f3dbc489705056 Merge: 042774a ebb4347 Author: Robert Dodier <rob...@us...> Date: Sun Feb 9 14:00:41 2014 -0800 Merge branch 'master' of ssh://git.code.sf.net/p/maxima/code ----------------------------------------------------------------------- Summary of changes: share/contrib/maximaMathML/CtMathML.lisp | 15 ++++-- share/contrib/maximaMathML/PrMathML.lisp | 47 +++++++++++++--- share/ezunits/ezunits.lisp | 5 ++ src/comm.lisp | 6 ++- src/commac.lisp | 88 ++++++++++++++++-------------- src/mlisp.lisp | 4 +- src/risch.lisp | 12 ++-- src/rpart.lisp | 2 +- src/sin.lisp | 2 +- src/sinint.lisp | 4 +- src/suprv1.lisp | 6 +-- tests/rtest1.mac | 7 +++ 12 files changed, 125 insertions(+), 73 deletions(-) hooks/post-receive -- Maxima CAS |