Menu ▾ ▴

#3047 'save' saves some built-in stuff

None
closed
nobody
save (5)
5
1 day ago
2015-11-12
No

save should save only used-defined stuff, and not any built-in stuff. But save saves stuff related to sets and some function properties. E.g. Without any user-defined functions or variables, the saved file should be almost empty , but here's what I get at present for save("/tmp/foo.lisp", all):

;;; -*- Mode: LISP; package:maxima; syntax:common-lisp; -*- 
(in-package :maxima)
(DSKSETQ $%I1 '(($SAVE) "/tmp/foo.lisp" $ALL)) 
(ADDLABEL '$%I1) 
(MDEFPROP $NSET (NIL $VERSION 1.21) $PROPS) 
(ADD2LNC '$NSET $PROPS) 
(DEFPROP ${ %{ VERB) 
(DEFPROP ${ "{" OP) 
(SETF (GETHASH "{" *OPR-TABLE*) '${) 
(ADD2LNC '"{" $PROPS) 
(DEFINE-SYMBOL '"{") 
(SETQ *MOPL* (CONS '"{" *MOPL*)) 
(DEFPROP ${ DIMENSION-MATCH DIMENSION) 
(DEFPROP ${ ((#\{) #\}) DISSYM) 
(DEFPROP ${ MSIZE-MATCHFIX GRIND) 
(DEFPROP ${ 200. LBP) 
(DEFPROP ${ PARSE-MATCHFIX NUD) 
(DEFPROP %{ DIMENSION-MATCH DIMENSION) 
(DEFPROP %{ ((#\{) #\}) DISSYM) 
(DEFPROP ${ $} MATCH) 
(DEFPROP $} "}" OP) 
(SETF (GETHASH "}" *OPR-TABLE*) '$}) 
(ADD2LNC '"}" $PROPS) 
(DEFINE-SYMBOL '"}") 
(SETQ *MOPL* (CONS '"}" *MOPL*)) 
(DEFPROP $} 5. LBP) 
(DEFPROP $} DELIM-ERR NUD) 
(DEFPROP $} ERB-ERR LED) 
(DEFPROP %{ ${ NOUN) 
(MDEFPROP $TRYLEVEL (NIL $MAXMIN 1.) $PROPS) 
(ADD2LNC '$TRYLEVEL $PROPS) 
(MDEFPROP $MAXMIN (NIL $VERSION 1.) $PROPS) 
(ADD2LNC '$MAXMIN $PROPS) 
(MDEFPROP $NUMMOD (NIL $VERSION 3.) $PROPS) 
(ADD2LNC '$NUMMOD $PROPS) 
(DEFPROP $CONJUGATE SIMP-CONJUGATE OPERATORS) 
(ADD2LNC '$CONJUGATE $PROPS) 
(MDEFPROP $CONJUGATE (NIL $VERSION 1.) $PROPS) 
(ADD2LNC '$CONJUGATE $PROPS) 
(DEFPROP %ERF_GENERALIZED $ERF_GENERALIZED NOUN) 
(DEFPROP %ERF_GENERALIZED SIMP-ERF-GENERALIZED OPERATORS) 
(ADD2LNC '%ERF_GENERALIZED $PROPS) 
(DEFPROP %ERF_GENERALIZED T OPERS) 
(ADD2LNC '%ERF_GENERALIZED $PROPS) 
(DEFPROP %ERF_GENERALIZED T $ANTISYMMETRIC) 
(ADD2LNC '%ERF_GENERALIZED $PROPS) 
(DEFPROP $ERF_GENERALIZED %ERF_GENERALIZED VERB) 
(DEFPROP $BETA SIMPBETA OPERATORS) 
(ADD2LNC '$BETA $PROPS) 
(DEFPROP $BETA T OPERS) 
(ADD2LNC '$BETA $PROPS) 
(DEFPROP $BETA T $SYMMETRIC) 
(ADD2LNC '$BETA $PROPS) 
(SETQ $LINENUM 1.) 
(SETQ *ALPHABET* (NCONC '(#\_ #\%) *ALPHABET*)) 
(ADD2LNC '$INTEGERVALUED $FEATURES)

Discussion

  • Robert Dodier

    Robert Dodier - 3 days ago

    I bumped into another example today, in which restoring from save(..., all) changes the properties of MNCTIMES and therefore causes previously-acceptable .12345 to trigger a syntax error. See comment referring to bug #3047 in tests/rtestdefstruct.mac.

     
  • Robert Dodier

    Robert Dodier - 1 day ago
    • status: open --> closed
     
  • Robert Dodier

    Robert Dodier - 1 day ago

    When I looked at this again a few days ago, I saw that there were only a few default variables being saved, so I guess work on stuff other than src/dskfn.lisp fixed this problem to a large extent, that's great. I have pushed commits 7c5f7a and 626d2c to suppress output for the few remaining items; now the only thing output by save in a fresh session are the input and output label for the save call itself and assignment to linenum. Those can't be avoided so the work on this ticket is complete.

     

Log in to post a comment.