diff --git a/books/bookvol4.pamphlet b/books/bookvol4.pamphlet index a16e645..951ed1a 100644 --- a/books/bookvol4.pamphlet +++ b/books/bookvol4.pamphlet @@ -3541,6 +3541,16 @@ setvars.boot.pamphlet. Thus if you plan to add a new output style to the system, or figure out where a current style is broken, these two files are the place to start. +A new )set breakmode command has been implemented to handle the +case that you might want an error message or an error return code +from AXIOMsys. You can set this option with +\begin{verbatim} + )set breakmode quit +)end{verbatim} +This will cause AXIOMsys to exit with the return code of 1. +Note that if you invoke the ``axiom'' shell script to start +AXIOMsys you will not see this return code (sman swallows it). + \section{Special Output Formats} The first level of special output formatting is handled by functions in setvart.boot.pamphlet. This handles the options diff --git a/books/bookvol5.pamphlet b/books/bookvol5.pamphlet index b74e87f..bdae2bc 100644 --- a/books/bookvol5.pamphlet +++ b/books/bookvol5.pamphlet @@ -4598,7 +4598,7 @@ To pair badge and badgee @ \defmacro{memq} -<>= +<>= (defmacro memq (a b) `(member ,a ,b :test #'eq)) @@ -19624,6 +19624,7 @@ These commands are restricted to keep the user from causing damage. query resume fastlinks + quit The current setting is indicated. @@ -19639,7 +19640,7 @@ These commands are restricted to keep the user from causing damage. |interpreter| LITERALS |$BreakMode| - (|nobreak| |break| |query| |resume| |fastlinks|) + (|nobreak| |break| |query| |resume| |fastlinks| |quit|) |nobreak|) ; needed to avoid possible startup looping @ \section{debug} @@ -35487,6 +35488,7 @@ This needs to work off the internal exposure list, not the file. <> <> <> +<> <> <> @@ -36099,6 +36101,7 @@ This needs to work off the internal exposure list, not the file. <> <> <> +<> <> <> <> diff --git a/changelog b/changelog index 5e30657..9f2b94b 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,11 @@ +20100216 tpd src/axiom-website/patches.html 20100216.01.rhx.patch +20100216 tpd src/input/cachedf.input fix tests for )set break quit +20100216 tpd src/input/unittest2.input fix tests for )set break quit +20100216 rhx src/input/setcmd.input add )set break quit +20100216 rhx src/interp/g-error.lisp add )set break quit +20100216 rhx src/interp/vmlisp.lisp add )set break quit +20100216 rhx books/bookvol5 add )set break quit +20100216 rhx books/bookvol4 add )set break quit 20100215 tpd src/axiom-website/patches.html 20100215.01.tpd.patch 20100215 tpd src/interp/vmlisp.lisp treeshake 20100215 tpd src/interp/ptrop.lisp treeshake diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index cd24bb5..f4354cc 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -2459,5 +2459,7 @@ books/bookvol5 treeshake cparse, ptrees, serror, vmlisp
books/bookvol5 treeshake cparse, ptrees
20100215.01.tpd.patch books/bookvol5 treeshake cparse, ptrees, ptrop vmlisp
+20100216.01.rhx.patch +books/bookvol5 add )set break quit
diff --git a/src/input/cachedf.input.pamphlet b/src/input/cachedf.input.pamphlet index ab950e2..9a26fd3 100644 --- a/src/input/cachedf.input.pamphlet +++ b/src/input/cachedf.input.pamphlet @@ -78,7 +78,7 @@ CachedFunction(A: SetCategory, B:SetCategory): Exports == Implementation where --R compiling exported recursiveDefine : ($,A -> B) -> $ --ITime: 0 SEC. --R ---R(time taken in buildFunctor: 0 . NIL) +--I(time taken in buildFunctor: 0 . NIL) --R --R;;; *** |CachedFunction| REDEFINED --R diff --git a/src/input/setcmd.input.pamphlet b/src/input/setcmd.input.pamphlet index b087f72..fe992fa 100644 --- a/src/input/setcmd.input.pamphlet +++ b/src/input/setcmd.input.pamphlet @@ -29,6 +29,7 @@ --R query --R -> resume --R fastlinks +--R quit --R --R The current setting is indicated. --R diff --git a/src/input/unittest2.input.pamphlet b/src/input/unittest2.input.pamphlet index 7449b8b..f93629c 100644 --- a/src/input/unittest2.input.pamphlet +++ b/src/input/unittest2.input.pamphlet @@ -1340,7 +1340,7 @@ This generates non-printing characters --S 213 of 237 )lisp (identity |$setOptions|) --R ---RValue = ((|breakmode| "execute break processing on error" |interpreter| LITERALS |$BreakMode| (|nobreak| |break| |query| |resume| |fastlinks|) |nobreak|) (|compiler| "Library compiler options" |interpreter| TREE |novar| ((|output| "library in which to place compiled code" |interpreter| FUNCTION |setOutputLibrary| NIL |htSetOutputLibrary|) (|input| "controls libraries from which to load compiled code" |interpreter| FUNCTION |setInputLibrary| NIL |htSetInputLibrary|) (|args| "arguments for compiling AXIOM code" |interpreter| FUNCTION |setAsharpArgs| (("enter compiler options " STRING |$asharpCmdlineFlags| |chkDirectory| "-O -Fasy -Fao -Flsp -laxiom -Mno-AXL__W__WillObsolete -DAxiom -Y $AXIOM/algebra")) NIL))) (|debug| "debug options" |interpreter| TREE |novar| ((|lambdatype| "show type information for #1 syntax" |interpreter| LITERALS $LAMBDATYPE (|on| |off|) |off|) (|dalymode| "Interpret leading open paren as lisp" |interpreter| LITERALS $DALYMODE (|on| |off|) |off|))) (|expose| "control interpreter constructor exposure" |interpreter| FUNCTION |setExpose| NIL |htSetExpose|) (|functions| "some interpreter function options" |interpreter| TREE |novar| ((|cache| "number of function results to cache" |interpreter| FUNCTION |setFunctionsCache| NIL |htSetCache|) (|compile| "compile, don't just define function bodies" |interpreter| LITERALS |$compileDontDefineFunctions| (|on| |off|) |on|) (|recurrence| "specially compile recurrence relations" |interpreter| LITERALS |$compileRecurrence| (|on| |off|) |on|))) (|fortran| "view and set options for FORTRAN output" |interpreter| TREE |novar| ((|ints2floats| "where sensible, coerce integers to reals" |interpreter| LITERALS |$fortInts2Floats| (|on| |off|) |on|) (|fortindent| "the number of characters indented" |interpreter| INTEGER |$fortIndent| (0 NIL) 6) (|fortlength| "the number of characters on a line" |interpreter| INTEGER |$fortLength| (1 NIL) 72) (|typedecs| "print type and dimension lines" |interpreter| LITERALS |$printFortranDecs| (|on| |off|) |on|) (|defaulttype| "default generic type for FORTRAN object" |interpreter| LITERALS |$defaultFortranType| (REAL INTEGER COMPLEX LOGICAL CHARACTER) REAL) (|precision| "precision of generated FORTRAN objects" |interpreter| LITERALS |$fortranPrecision| (|single| |double|) |double|) (|intrinsic| "whether to use INTRINSIC FORTRAN functions" |interpreter| LITERALS |$useIntrinsicFunctions| (|on| |off|) |off|) (|explength| "character limit for FORTRAN expressions" |interpreter| INTEGER |$maximumFortranExpressionLength| (0 NIL) 1320) (|segment| "split long FORTRAN expressions" |interpreter| LITERALS |$fortranSegment| (|on| |off|) |on|) (|optlevel| "FORTRAN optimisation level" |interpreter| INTEGER |$fortranOptimizationLevel| (0 2) 0) (|startindex| "starting index for FORTRAN arrays" |interpreter| INTEGER |$fortranArrayStartingIndex| (0 1) 1) (|calling| "options for external FORTRAN calls" |interpreter| TREE |novar| ((|tempfile| "set location of temporary data files" |interpreter| FUNCTION |setFortTmpDir| (("enter directory name for which you have write-permission" DIRECTORY |$fortranTmpDir| |chkDirectory| "/tmp/")) NIL) (|directory| "set location of generated FORTRAN files" |interpreter| FUNCTION |setFortDir| (("enter directory name for which you have write-permission" DIRECTORY |$fortranDirectory| |chkDirectory| "./")) NIL) (|linker| "linker arguments (e.g. libraries to search)" |interpreter| FUNCTION |setLinkerArgs| (("enter linker arguments " STRING |$fortranLibraries| |chkDirectory| "-lxlf")) NIL))))) (|kernel| "library functions built into the kernel for efficiency" |interpreter| TREE |novar| ((|warn| "warn when re-definition is attempted" |interpreter| FUNCTION |protectedSymbolsWarning| NIL |htSetKernelWarn|) (|protect| "prevent re-definition of kernel functions" |interpreter| FUNCTION |protectSymbols| NIL |htSetKernelProtect|))) (|hyperdoc| "options in using HyperDoc" |interpreter| TREE |novar| ((|fullscreen| "use full screen for this facility" |interpreter| LITERALS |$fullScreenSysVars| (|on| |off|) |off|) (|mathwidth| "screen width for history output" |interpreter| INTEGER |$historyDisplayWidth| (0 NIL) 120))) (|help| "view and set some help options" |interpreter| TREE |novar| ((|fullscreen| "use fullscreen facility, if possible" |interpreter| LITERALS |$useFullScreenHelp| (|on| |off|) |off|))) (|history| "save workspace values in a history file" |interpreter| LITERALS |$HiFiAccess| (|on| |off|) |on|) (|messages| "show messages for various system features" |interpreter| TREE |novar| ((|any| "print the internal type of objects of domain Any" |interpreter| LITERALS |$printAnyIfTrue| (|on| |off|) |on|) (|autoload| "print file auto-load messages" |interpreter| LITERALS |$printLoadMsgs| (|on| |off|) |on|) (|bottomup| "display bottom up modemap selection" |development| LITERALS |$reportBottomUpFlag| (|on| |off|) |off|) (|coercion| "display datatype coercion messages" |development| LITERALS |$reportCoerceIfTrue| (|on| |off|) |off|) (|dropmap| "display old map defn when replaced" |interpreter| LITERALS |$displayDroppedMap| (|on| |off|) |off|) (|expose| "warning for unexposed functions" |interpreter| LITERALS |$giveExposureWarning| (|on| |off|) |off|) (|file| "print msgs also to SPADMSG LISTING" |development| LITERALS |$printMsgsToFile| (|on| |off|) |off|) (|frame| "display messages about frames" |interpreter| LITERALS |$frameMessages| (|on| |off|) |off|) (|highlighting| "use highlighting in system messages" |interpreter| LITERALS |$highlightAllowed| (|on| |off|) |off|) (|instant| "present instantiation summary" |development| LITERALS |$reportInstantiations| (|on| |off|) |off|) (|insteach| "present instantiation info" |development| LITERALS |$reportEachInstantiation| (|on| |off|) |off|) (|interponly| "say when function code is interpreted" |interpreter| LITERALS |$reportInterpOnly| (|on| |off|) |on|) (|naglink| "show NAGLink messages" |interpreter| LITERALS |$nagMessages| (|on| |off|) |on|) (|number| "display message number with message" |interpreter| LITERALS |$displayMsgNumber| (|on| |off|) |off|) (|prompt| "set type of input prompt to display" |interpreter| LITERALS |$inputPromptType| (|none| |frame| |plain| |step| |verbose|) |step|) (|selection| "display function selection msgs" |interpreter| LITERALS |$reportBottomUpFlag| (|on| |off|) |off|) (|set| "show )set setting after assignment" |interpreter| LITERALS |$displaySetValue| (|on| |off|) |off|) (|startup| "display messages on start-up" |interpreter| LITERALS |$displayStartMsgs| (|on| |off|) |on|) (|summary| "print statistics after computation" |interpreter| LITERALS |$printStatisticsSummaryIfTrue| (|on| |off|) |off|) (|testing| "print system testing header" |development| LITERALS |$testingSystem| (|on| |off|) |off|) (|time| "print timings after computation" |interpreter| LITERALS |$printTimeIfTrue| (|on| |off| |long|) |off|) (|type| "print type after computation" |interpreter| LITERALS |$printTypeIfTrue| (|on| |off|) |on|) (|void| "print Void value when it occurs" |interpreter| LITERALS |$printVoidIfTrue| (|on| |off|) |off|))) (|naglink| "options for NAGLink" |interpreter| TREE |novar| ((|host| "internet address of host for NAGLink" |interpreter| FUNCTION |setNagHost| (("enter host name" DIRECTORY |$nagHost| |chkDirectory| "localhost")) NIL) (|persistence| "number of (fortran) functions to remember" |interpreter| FUNCTION |setFortPers| (("Requested remote storage (for asps):" INTEGER |$fortPersistence| (0 NIL) 10)) NIL) (|messages| "show NAGLink messages" |interpreter| LITERALS |$nagMessages| (|on| |off|) |on|) (|double| "enforce DOUBLE PRECISION ASPs" |interpreter| LITERALS |$nagEnforceDouble| (|on| |off|) |on|))) (|output| "view and set some output options" |interpreter| TREE |novar| ((|abbreviate| "abbreviate type names" |interpreter| LITERALS |$abbreviateTypes| (|on| |off|) |off|) (|algebra| "display output in algebraic form" |interpreter| FUNCTION |setOutputAlgebra| (("display output in algebraic form" LITERALS |$algebraFormat| (|off| |on|) |on|) (BREAK $ALGEBRAFORMAT) ("where algebra printing goes (enter {em console} or a pathname)?" FILENAME |$algebraOutputFile| |chkOutputFileName| "console")) NIL) (|characters| "choose special output character set" |interpreter| FUNCTION |setOutputCharacters| NIL |htSetOutputCharacters|) (|fortran| "create output in FORTRAN format" |interpreter| FUNCTION |setOutputFortran| (("create output in FORTRAN format" LITERALS |$fortranFormat| (|off| |on|) |off|) (|break| |$fortranFormat|) ("where FORTRAN output goes (enter {em console} or a a pathname)" FILENAME |$fortranOutputFile| |chkOutputFileName| "console")) NIL) (|fraction| "how fractions are formatted" |interpreter| LITERALS |$fractionDisplayType| (|vertical| |horizontal|) |vertical|) (|length| "line length of output displays" |interpreter| INTEGER $LINELENGTH (10 245) 77) (|mathml| "create output in MathML style" |interpreter| FUNCTION |setOutputMathml| (("create output in MathML format" LITERALS |$mathmlFormat| (|off| |on|) |off|) (|break| |$mathmlFormat|) ("where MathML output goes (enter {em console} or a pathname)" FILENAME |$mathmlOutputFile| |chkOutputFileName| "console")) NIL) (|openmath| "create output in OpenMath style" |interpreter| FUNCTION |setOutputOpenMath| (("create output in OpenMath format" LITERALS |$openMathFormat| (|off| |on|) |off|) (|break| |$openMathFormat|) ("where TeX output goes (enter {em console} or a pathname)" FILENAME |$openMathOutputFile| |chkOutputFileName| "console")) NIL) (|script| "display output in SCRIPT formula format" |interpreter| FUNCTION |setOutputFormula| (("display output in SCRIPT format" LITERALS |$formulaFormat| (|off| |on|) |off|) (|break| |$formulaFormat|) ("where script output goes (enter {em console} or a a pathname)" FILENAME |$formulaOutputFile| |chkOutputFileName| "console")) NIL) (|scripts| "show subscripts,... linearly" |interpreter| LITERALS |$linearFormatScripts| (|on| |off|) |off|) (|showeditor| "view output of )show in editor" |interpreter| LITERALS |$useEditorForShowOutput| (|on| |off|) |off|) (|tex| "create output in TeX style" |interpreter| FUNCTION |setOutputTex| (("create output in TeX format" LITERALS |$texFormat| (|off| |on|) |off|) (|break| |$texFormat|) ("where TeX output goes (enter {em console} or a pathname)" FILENAME |$texOutputFile| |chkOutputFileName| "console")) NIL))) (|quit| "protected or unprotected quit" |interpreter| LITERALS |$quitCommandType| (|protected| |unprotected|) |protected|) (|streams| "set some options for working with streams" |interpreter| TREE |novar| ((|calculate| "specify number of elements to calculate" |interpreter| FUNCTION |setStreamsCalculate| (("number of initial stream elements you want calculated" INTEGER |$streamCount| (0 NIL) 10)) NIL) (|showall| "display all stream elements computed" |interpreter| LITERALS |$streamsShowAll| (|on| |off|) |off|))) (|system| "set some system development variables" |development| TREE |novar| ((|functioncode| "show gen. LISP for functions when compiled" |development| LITERALS |$reportCompilation| (|on| |off|) |off|) (|optimization| "show optimized LISP code" |development| LITERALS |$reportOptimization| (|on| |off|) |off|) (|prettyprint| "prettyprint BOOT func's as they compile" |development| LITERALS $PRETTYPRINT (|on| |off|) |on|))) (|userlevel| "operation access level of system user" |interpreter| LITERALS |$UserLevel| (|interpreter| |compiler| |development|) |development|)) +--RValue = ((|breakmode| "execute break processing on error" |interpreter| LITERALS |$BreakMode| (|nobreak| |break| |query| |resume| |fastlinks| |quit|) |nobreak|) (|compiler| "Library compiler options" |interpreter| TREE |novar| ((|output| "library in which to place compiled code" |interpreter| FUNCTION |setOutputLibrary| NIL |htSetOutputLibrary|) (|input| "controls libraries from which to load compiled code" |interpreter| FUNCTION |setInputLibrary| NIL |htSetInputLibrary|) (|args| "arguments for compiling AXIOM code" |interpreter| FUNCTION |setAsharpArgs| (("enter compiler options " STRING |$asharpCmdlineFlags| |chkDirectory| "-O -Fasy -Fao -Flsp -laxiom -Mno-AXL__W__WillObsolete -DAxiom -Y $AXIOM/algebra")) NIL))) (|debug| "debug options" |interpreter| TREE |novar| ((|lambdatype| "show type information for #1 syntax" |interpreter| LITERALS $LAMBDATYPE (|on| |off|) |off|) (|dalymode| "Interpret leading open paren as lisp" |interpreter| LITERALS $DALYMODE (|on| |off|) |off|))) (|expose| "control interpreter constructor exposure" |interpreter| FUNCTION |setExpose| NIL |htSetExpose|) (|functions| "some interpreter function options" |interpreter| TREE |novar| ((|cache| "number of function results to cache" |interpreter| FUNCTION |setFunctionsCache| NIL |htSetCache|) (|compile| "compile, don't just define function bodies" |interpreter| LITERALS |$compileDontDefineFunctions| (|on| |off|) |on|) (|recurrence| "specially compile recurrence relations" |interpreter| LITERALS |$compileRecurrence| (|on| |off|) |on|))) (|fortran| "view and set options for FORTRAN output" |interpreter| TREE |novar| ((|ints2floats| "where sensible, coerce integers to reals" |interpreter| LITERALS |$fortInts2Floats| (|on| |off|) |on|) (|fortindent| "the number of characters indented" |interpreter| INTEGER |$fortIndent| (0 NIL) 6) (|fortlength| "the number of characters on a line" |interpreter| INTEGER |$fortLength| (1 NIL) 72) (|typedecs| "print type and dimension lines" |interpreter| LITERALS |$printFortranDecs| (|on| |off|) |on|) (|defaulttype| "default generic type for FORTRAN object" |interpreter| LITERALS |$defaultFortranType| (REAL INTEGER COMPLEX LOGICAL CHARACTER) REAL) (|precision| "precision of generated FORTRAN objects" |interpreter| LITERALS |$fortranPrecision| (|single| |double|) |double|) (|intrinsic| "whether to use INTRINSIC FORTRAN functions" |interpreter| LITERALS |$useIntrinsicFunctions| (|on| |off|) |off|) (|explength| "character limit for FORTRAN expressions" |interpreter| INTEGER |$maximumFortranExpressionLength| (0 NIL) 1320) (|segment| "split long FORTRAN expressions" |interpreter| LITERALS |$fortranSegment| (|on| |off|) |on|) (|optlevel| "FORTRAN optimisation level" |interpreter| INTEGER |$fortranOptimizationLevel| (0 2) 0) (|startindex| "starting index for FORTRAN arrays" |interpreter| INTEGER |$fortranArrayStartingIndex| (0 1) 1) (|calling| "options for external FORTRAN calls" |interpreter| TREE |novar| ((|tempfile| "set location of temporary data files" |interpreter| FUNCTION |setFortTmpDir| (("enter directory name for which you have write-permission" DIRECTORY |$fortranTmpDir| |chkDirectory| "/tmp/")) NIL) (|directory| "set location of generated FORTRAN files" |interpreter| FUNCTION |setFortDir| (("enter directory name for which you have write-permission" DIRECTORY |$fortranDirectory| |chkDirectory| "./")) NIL) (|linker| "linker arguments (e.g. libraries to search)" |interpreter| FUNCTION |setLinkerArgs| (("enter linker arguments " STRING |$fortranLibraries| |chkDirectory| "-lxlf")) NIL))))) (|kernel| "library functions built into the kernel for efficiency" |interpreter| TREE |novar| ((|warn| "warn when re-definition is attempted" |interpreter| FUNCTION |protectedSymbolsWarning| NIL |htSetKernelWarn|) (|protect| "prevent re-definition of kernel functions" |interpreter| FUNCTION |protectSymbols| NIL |htSetKernelProtect|))) (|hyperdoc| "options in using HyperDoc" |interpreter| TREE |novar| ((|fullscreen| "use full screen for this facility" |interpreter| LITERALS |$fullScreenSysVars| (|on| |off|) |off|) (|mathwidth| "screen width for history output" |interpreter| INTEGER |$historyDisplayWidth| (0 NIL) 120))) (|help| "view and set some help options" |interpreter| TREE |novar| ((|fullscreen| "use fullscreen facility, if possible" |interpreter| LITERALS |$useFullScreenHelp| (|on| |off|) |off|))) (|history| "save workspace values in a history file" |interpreter| LITERALS |$HiFiAccess| (|on| |off|) |on|) (|messages| "show messages for various system features" |interpreter| TREE |novar| ((|any| "print the internal type of objects of domain Any" |interpreter| LITERALS |$printAnyIfTrue| (|on| |off|) |on|) (|autoload| "print file auto-load messages" |interpreter| LITERALS |$printLoadMsgs| (|on| |off|) |on|) (|bottomup| "display bottom up modemap selection" |development| LITERALS |$reportBottomUpFlag| (|on| |off|) |off|) (|coercion| "display datatype coercion messages" |development| LITERALS |$reportCoerceIfTrue| (|on| |off|) |off|) (|dropmap| "display old map defn when replaced" |interpreter| LITERALS |$displayDroppedMap| (|on| |off|) |off|) (|expose| "warning for unexposed functions" |interpreter| LITERALS |$giveExposureWarning| (|on| |off|) |off|) (|file| "print msgs also to SPADMSG LISTING" |development| LITERALS |$printMsgsToFile| (|on| |off|) |off|) (|frame| "display messages about frames" |interpreter| LITERALS |$frameMessages| (|on| |off|) |off|) (|highlighting| "use highlighting in system messages" |interpreter| LITERALS |$highlightAllowed| (|on| |off|) |off|) (|instant| "present instantiation summary" |development| LITERALS |$reportInstantiations| (|on| |off|) |off|) (|insteach| "present instantiation info" |development| LITERALS |$reportEachInstantiation| (|on| |off|) |off|) (|interponly| "say when function code is interpreted" |interpreter| LITERALS |$reportInterpOnly| (|on| |off|) |on|) (|naglink| "show NAGLink messages" |interpreter| LITERALS |$nagMessages| (|on| |off|) |on|) (|number| "display message number with message" |interpreter| LITERALS |$displayMsgNumber| (|on| |off|) |off|) (|prompt| "set type of input prompt to display" |interpreter| LITERALS |$inputPromptType| (|none| |frame| |plain| |step| |verbose|) |step|) (|selection| "display function selection msgs" |interpreter| LITERALS |$reportBottomUpFlag| (|on| |off|) |off|) (|set| "show )set setting after assignment" |interpreter| LITERALS |$displaySetValue| (|on| |off|) |off|) (|startup| "display messages on start-up" |interpreter| LITERALS |$displayStartMsgs| (|on| |off|) |on|) (|summary| "print statistics after computation" |interpreter| LITERALS |$printStatisticsSummaryIfTrue| (|on| |off|) |off|) (|testing| "print system testing header" |development| LITERALS |$testingSystem| (|on| |off|) |off|) (|time| "print timings after computation" |interpreter| LITERALS |$printTimeIfTrue| (|on| |off| |long|) |off|) (|type| "print type after computation" |interpreter| LITERALS |$printTypeIfTrue| (|on| |off|) |on|) (|void| "print Void value when it occurs" |interpreter| LITERALS |$printVoidIfTrue| (|on| |off|) |off|))) (|naglink| "options for NAGLink" |interpreter| TREE |novar| ((|host| "internet address of host for NAGLink" |interpreter| FUNCTION |setNagHost| (("enter host name" DIRECTORY |$nagHost| |chkDirectory| "localhost")) NIL) (|persistence| "number of (fortran) functions to remember" |interpreter| FUNCTION |setFortPers| (("Requested remote storage (for asps):" INTEGER |$fortPersistence| (0 NIL) 10)) NIL) (|messages| "show NAGLink messages" |interpreter| LITERALS |$nagMessages| (|on| |off|) |on|) (|double| "enforce DOUBLE PRECISION ASPs" |interpreter| LITERALS |$nagEnforceDouble| (|on| |off|) |on|))) (|output| "view and set some output options" |interpreter| TREE |novar| ((|abbreviate| "abbreviate type names" |interpreter| LITERALS |$abbreviateTypes| (|on| |off|) |off|) (|algebra| "display output in algebraic form" |interpreter| FUNCTION |setOutputAlgebra| (("display output in algebraic form" LITERALS |$algebraFormat| (|off| |on|) |on|) (BREAK $ALGEBRAFORMAT) ("where algebra printing goes (enter {em console} or a pathname)?" FILENAME |$algebraOutputFile| |chkOutputFileName| "console")) NIL) (|characters| "choose special output character set" |interpreter| FUNCTION |setOutputCharacters| NIL |htSetOutputCharacters|) (|fortran| "create output in FORTRAN format" |interpreter| FUNCTION |setOutputFortran| (("create output in FORTRAN format" LITERALS |$fortranFormat| (|off| |on|) |off|) (|break| |$fortranFormat|) ("where FORTRAN output goes (enter {em console} or a a pathname)" FILENAME |$fortranOutputFile| |chkOutputFileName| "console")) NIL) (|fraction| "how fractions are formatted" |interpreter| LITERALS |$fractionDisplayType| (|vertical| |horizontal|) |vertical|) (|length| "line length of output displays" |interpreter| INTEGER $LINELENGTH (10 245) 77) (|mathml| "create output in MathML style" |interpreter| FUNCTION |setOutputMathml| (("create output in MathML format" LITERALS |$mathmlFormat| (|off| |on|) |off|) (|break| |$mathmlFormat|) ("where MathML output goes (enter {em console} or a pathname)" FILENAME |$mathmlOutputFile| |chkOutputFileName| "console")) NIL) (|openmath| "create output in OpenMath style" |interpreter| FUNCTION |setOutputOpenMath| (("create output in OpenMath format" LITERALS |$openMathFormat| (|off| |on|) |off|) (|break| |$openMathFormat|) ("where TeX output goes (enter {em console} or a pathname)" FILENAME |$openMathOutputFile| |chkOutputFileName| "console")) NIL) (|script| "display output in SCRIPT formula format" |interpreter| FUNCTION |setOutputFormula| (("display output in SCRIPT format" LITERALS |$formulaFormat| (|off| |on|) |off|) (|break| |$formulaFormat|) ("where script output goes (enter {em console} or a a pathname)" FILENAME |$formulaOutputFile| |chkOutputFileName| "console")) NIL) (|scripts| "show subscripts,... linearly" |interpreter| LITERALS |$linearFormatScripts| (|on| |off|) |off|) (|showeditor| "view output of )show in editor" |interpreter| LITERALS |$useEditorForShowOutput| (|on| |off|) |off|) (|tex| "create output in TeX style" |interpreter| FUNCTION |setOutputTex| (("create output in TeX format" LITERALS |$texFormat| (|off| |on|) |off|) (|break| |$texFormat|) ("where TeX output goes (enter {em console} or a pathname)" FILENAME |$texOutputFile| |chkOutputFileName| "console")) NIL))) (|quit| "protected or unprotected quit" |interpreter| LITERALS |$quitCommandType| (|protected| |unprotected|) |protected|) (|streams| "set some options for working with streams" |interpreter| TREE |novar| ((|calculate| "specify number of elements to calculate" |interpreter| FUNCTION |setStreamsCalculate| (("number of initial stream elements you want calculated" INTEGER |$streamCount| (0 NIL) 10)) NIL) (|showall| "display all stream elements computed" |interpreter| LITERALS |$streamsShowAll| (|on| |off|) |off|))) (|system| "set some system development variables" |development| TREE |novar| ((|functioncode| "show gen. LISP for functions when compiled" |development| LITERALS |$reportCompilation| (|on| |off|) |off|) (|optimization| "show optimized LISP code" |development| LITERALS |$reportOptimization| (|on| |off|) |off|) (|prettyprint| "prettyprint BOOT func's as they compile" |development| LITERALS $PRETTYPRINT (|on| |off|) |on|))) (|userlevel| "operation access level of system user" |interpreter| LITERALS |$UserLevel| (|interpreter| |compiler| |development|) |development|)) --E 213 --S 214 of 237 obsolete |$shoeReadLineFunction| diff --git a/src/interp/g-error.lisp.pamphlet b/src/interp/g-error.lisp.pamphlet index 08382a3..2040ed0 100644 --- a/src/interp/g-error.lisp.pamphlet +++ b/src/interp/g-error.lisp.pamphlet @@ -35,7 +35,7 @@ (DECLARE (SPECIAL |$AlgebraError|)) (RETURN (PROGN - (SPADLET |msg| + (setq |msg| (CONS "The test" (APPEND (|bright| (|pred2English| |condit|)) (CONS "evaluates to" @@ -103,7 +103,7 @@ (BOOT-EQUAL |$BreakMode| '|trapNumerics|)) (THROW '|trapNumerics| |$numericFailure|)) ('T (BUMPCOMPERRORCOUNT) - (SPADLET |errorLabel| + (setq |errorLabel| (COND ((BOOT-EQUAL |errorType| |$SystemError|) "System error") @@ -113,7 +113,7 @@ "Error detected within library code") ((STRINGP |errorType|) |errorType|) ('T "Error with unknown classification"))) - (SPADLET |msg| + (setq |msg| (COND ((AND (PAIRP |errorMsg|) (EQ (QCAR |errorMsg|) '|mathprint|)) @@ -121,19 +121,19 @@ ((NULL (PAIRP |errorMsg|)) (CONS (MAKESTRING " ") (CONS |errorMsg| NIL))) - ('T (SPADLET |splitmsg| 'T) + ('T (setq |splitmsg| 'T) (COND ((|member| '|%b| |errorMsg|) - (SPADLET |splitmsg| NIL)) + (setq |splitmsg| NIL)) ((|member| '|%d| |errorMsg|) - (SPADLET |splitmsg| NIL)) + (setq |splitmsg| NIL)) ((|member| '|%l| |errorMsg|) - (SPADLET |splitmsg| NIL)) + (setq |splitmsg| NIL)) ('T NIL)) (COND (|splitmsg| (CDR (PROG (G166072) - (SPADLET G166072 NIL) + (setq G166072 NIL) (RETURN (DO ((G166077 |errorMsg| @@ -204,158 +204,92 @@ ; returnToReader() ; returnToTopLevel() -(DEFUN |handleLispBreakLoop| (|$BreakMode|) - (DECLARE (SPECIAL |$BreakMode|)) - (PROG (|msgQ| |x| |gotIt|) - (DECLARE (SPECIAL |$cclSystem|)) - (RETURN - (SEQ (PROGN - (TERPRI) - (ENABLE-BACKTRACE NIL) - (COND - ((BOOT-EQUAL |$BreakMode| '|break|) - (|sayBrightly| (MAKESTRING " ")) (BREAK)) - ((BOOT-EQUAL |$BreakMode| '|query|) - (SPADLET |gotIt| NIL) - (DO () ((NULL (NULL |gotIt|)) NIL) - (SEQ (EXIT (PROGN - (SPADLET |gotIt| 'T) - (SPADLET |msgQ| - (COND - (|$cclSystem| - (CONS '|%l| - (CONS - " You have two options. Enter:" - (CONS '|%l| - (CONS " " - (APPEND - (|bright| "top ") - (CONS - " to return to top level, or" - (CONS '|%l| - (CONS " " - (APPEND - (|bright| - "break ") - (CONS - " to enter a LISP break loop." - (CONS '|%l| - (CONS '|%l| - (CONS - " Please enter your choice now:" - NIL)))))))))))))) - ('T - (CONS '|%l| - (CONS - " You have three options. Enter:" - (CONS '|%l| - (CONS " " - (APPEND - (|bright| "continue") - (CONS - " to continue processing," - (CONS '|%l| - (CONS " " - (APPEND - (|bright| - "top ") - (CONS - " to return to top level, or" - (CONS '|%l| - (CONS " " - (APPEND - (|bright| - "break ") - (CONS - " to enter a LISP break loop." - (CONS '|%l| - (CONS '|%l| - (CONS - " Please enter your choice now:" - NIL)))))))))))))))))))) - (SPADLET |x| - (STRING2ID-N - (|queryUser| |msgQ|) 1)) - (SPADLET |x| - (COND - (|$cclSystem| - (|selectOptionLC| |x| - '(|top| |break|) NIL)) - ('T - (|selectOptionLC| |x| - '(|top| |break| |continue|) - NIL)))) - (COND - ((NULL |x|) - (|sayBrightly| - (|bright| - " That was not one of your choices!")) - (SPADLET |gotIt| NIL)) - ((BOOT-EQUAL |x| '|top|) - (|returnToTopLevel|)) - ((BOOT-EQUAL |x| '|break|) - (SPADLET |$BreakMode| '|break|) - (COND - ((NULL |$cclSystem|) - (|sayBrightly| - (CONS " Enter" - (APPEND (|bright| ":C") - (CONS - "when you are ready to continue processing where you " - (CONS '|%l| - (CONS - " interrupted the system, enter" - (APPEND (|bright| "(TOP)") - (CONS - "when you wish to return" - (CONS '|%l| - (CONS " to top level." - (CONS '|%l| - (CONS '|%l| NIL)))))))))))))) - (BREAK)) - ('T - (|sayBrightly| - " Processing will continue where it was interrupted.") - (THROW 'SPAD_READER NIL)))))))) - ((BOOT-EQUAL |$BreakMode| '|resume|) (|returnToReader|)) - ('T (|returnToTopLevel|)))))))) +(defun |handleLispBreakLoop| (|$BreakMode|) + (declare (special |$BreakMode|)) + (let (msgQ x go-tit) + (declare (special |$cclSystem|)) + (terpri) + (enable-backtrace nil) + (cond + ((eq |$BreakMode| '|break|) (|sayBrightly| " ") (break)) + ((eq |$BreakMode| '|query|) + (do () + ((null (null go-tit)) nil) + (setq go-tit t) + (setq msgQ + `(|%l| " You have three options. Enter:" |%l| + " " ,@(|bright| "continue") " to continue processing," |%l| + " " ,@(|bright| "top ") " to return to top level, or" |%l| + " " ,@(|bright| "break ") " to enter a LISP break loop." |%l| + |%l| " Please enter your choice now:")) + (setq x (string2id-n (|queryUser| msgQ) 1)) + (setq x (|selectOptionLC| x '(|top| |break| |continue|) nil)) + (cond + ((null x) + (|sayBrightly| (|bright| " That was not one of your choices!")) + (setq go-tit nil)) + ((eq x '|top|) (|returnToTopLevel|)) + ((boot-equal x '|break|) + (setq |$BreakMode| '|break|) + (|sayBrightly| + `(" Enter" ,@(|bright| ":C") + "when you are ready to continue processing where you " |%l| + " interrupted the system, enter" ,@(|bright| "(TOP)") + "when you wish to return" |%l| " to top level." |%l| |%l|)) + (break)) + (t + (|sayBrightly| " Processing will continue where it was interrupted.") + (throw 'spad_reader nil))))) + ((eq |$BreakMode| '|resume|) (|returnToReader|)) + ((eq |$BreakMode| '|quit|) (exitWithStatus 1)) + (t (|returnToTopLevel|))))) + +; if the BreakMode is set to quit when the compile fails then +; exit, returning the value, typically 1. If the argument is not +; numeric then it prints the message and exits with a 1 status. +(defun exitWithStatus (value) + (format *error-output* "Axiom exit with status = ~s~%" value) + (if (numberp value) + (bye value) + (bye 1))) ;TOP() == returnToTopLevel() -(DEFUN TOP () (|returnToTopLevel|)) +(defun top () (|returnToTopLevel|)) ;returnToTopLevel() == ; SETQ(CHR, "ENDOFLINECHR") ; SETQ(TOK, 'END__UNIT) ; TOPLEVEL() -(DEFUN |returnToTopLevel| () - (PROGN (SETQ CHR 'ENDOFLINECHR) (SETQ TOK 'END_UNIT) (TOPLEVEL))) +(defun |returnToTopLevel| () + (setq chr 'endoflinechr) + (setq tok 'end_unit) + (toplevel)) ;returnToReader() == ; ^$ReadingFile => returnToTopLevel() ; sayBrightly ['" Continuing to read the file...", '%l] ; THROW('SPAD__READER, nil) -(DEFUN |returnToReader| () - (DECLARE (SPECIAL |$ReadingFile|)) - (COND - ((NULL |$ReadingFile|) (|returnToTopLevel|)) - ('T - (|sayBrightly| - (CONS " Continuing to read the file..." (CONS '|%l| NIL))) - (THROW 'SPAD_READER NIL)))) +(defun |returnToReader| () + (declare (special |$ReadingFile|)) + (cond + ((null |$ReadingFile|) (|returnToTopLevel|)) + (t + (|sayBrightly| '(" Continuing to read the file..." |%l|)) + (throw 'spad_reader nil)))) ;sayErrorly(errorLabel, msg) == ; $saturn => saturnSayErrorly(errorLabel, msg) ; sayErrorly1(errorLabel, msg) -(DEFUN |sayErrorly| (|errorLabel| |msg|) - (DECLARE (SPECIAL |$saturn|)) - (COND - (|$saturn| (|saturnSayErrorly| |errorLabel| |msg|)) - ('T (|sayErrorly1| |errorLabel| |msg|)))) +(defun |sayErrorly| (|errorLabel| |msg|) + (declare (special |$saturn|)) + (if |$saturn| + (|saturnSayErrorly| |errorLabel| |msg|) + (|sayErrorly1| |errorLabel| |msg|))) ;saturnSayErrorly(errorLabel, msg) == ; _*STANDARD_-OUTPUT_* : fluid := $texOutputStream @@ -372,8 +306,8 @@ (DECLARE (SPECIAL *STANDARD-OUTPUT* |$texOutputStream|)) (RETURN (PROGN - (SPADLET *STANDARD-OUTPUT* |$texOutputStream|) - (SPADLET |old| (|pushSatOutput| '|line|)) + (setq *STANDARD-OUTPUT* |$texOutputStream|) + (setq |old| (|pushSatOutput| '|line|)) (|sayString| (MAKESTRING "\\bgroup\\color{red}")) (|sayString| (MAKESTRING "\\begin{verbatim}")) (|sayErrorly1| |errorLabel| |msg|) @@ -399,14 +333,14 @@ (COND (|$testingSystem| (|sayMSG| |$testingErrorPrefix|))) (|sayBrightly| (CONS " >> " (CONS |errorLabel| (CONS ":" NIL)))) - (SPADLET |m| |msg|) + (setq |m| |msg|) (COND ((AND (PAIRP |msg|) (EQ (QCAR |msg|) '|mathprint|) (PROGN - (SPADLET |ISTMP#1| (QCDR |msg|)) + (setq |ISTMP#1| (QCDR |msg|)) (AND (PAIRP |ISTMP#1|) (EQ (QCDR |ISTMP#1|) NIL) (PROGN - (SPADLET |mathexpr| (QCAR |ISTMP#1|)) + (setq |mathexpr| (QCAR |ISTMP#1|)) 'T)))) (|mathprint| |mathexpr|)) ('T (|sayBrightly| |msg|))))))) @@ -454,7 +388,7 @@ (RETURN (PROGN (COND (|$compilingMap| (|clearCache| |$mapName|))) - (SPADLET |msg'| (|mkMessage| (|concatList| |msg|))) + (setq |msg'| (|mkMessage| (|concatList| |msg|))) (|sayMSG| |msg'|) (COND (|$printMsgsToFile| (|sayMSG2File| |msg'|))) (|spadThrow|))))) diff --git a/src/interp/vmlisp.lisp.pamphlet b/src/interp/vmlisp.lisp.pamphlet index e9ad49c..8619b47 100644 --- a/src/interp/vmlisp.lisp.pamphlet +++ b/src/interp/vmlisp.lisp.pamphlet @@ -4727,31 +4727,30 @@ terminals and empty or at-end files. In Common Lisp, we must assume record size (load eval) (unembed 'system:universal-error-handler) (embed 'system:universal-error-handler - '(lambda (type correctable? op - continue-string error-string &rest args) - (block - nil - (setq |$NeedToSignalSessionManager| T) - (if (and (boundp '|$inLispVM|) (boundp '|$BreakMode|)) - (cond ((eq |$BreakMode| '|validate|) - (|systemError| (error-format error-string args))) - ((and (eq |$BreakMode| '|trapNumerics|) - (eq type :ERROR)) - (setq |$BreakMode| nil) (throw '|trapNumerics| |$numericFailure|)) - ((and (eq |$BreakMode| '|trapNumerics|) - (boundp '|$oldBreakMode|) - (setq |$BreakMode| |$oldBreakMode|) - nil)) ;; resets error handler - ((and (null |$inLispVM|) - (memq |$BreakMode| '(|nobreak| |query| |resume|))) - (let ((|$inLispVM| T)) ;; turn off handler - (return - (|systemError| (error-format error-string args))))) - ((eq |$BreakMode| '|letPrint2|) - (setq |$BreakMode| nil) - (throw '|letPrint2| nil)))) - (apply system:universal-error-handler type correctable? op - continue-string error-string args ))))) + '(lambda (type correctable? op continue-string error-string &rest args) + (block + nil + (setq |$NeedToSignalSessionManager| T) + (if (and (boundp '|$inLispVM|) (boundp '|$BreakMode|)) + (cond + ((eq |$BreakMode| '|validate|) + (|systemError| (error-format error-string args))) + ((and (eq |$BreakMode| '|trapNumerics|) (eq type :ERROR)) + (setq |$BreakMode| nil) + (throw '|trapNumerics| |$numericFailure|)) + ((and (eq |$BreakMode| '|trapNumerics|) (boundp '|$oldBreakMode|) + (setq |$BreakMode| |$oldBreakMode|) + nil)) ;; resets error handler + ((and (null |$inLispVM|) + (memq |$BreakMode| '(|nobreak| |query| |resume| |quit|))) + (let ((|$inLispVM| T)) ;; turn off handler + (return + (|systemError| (error-format error-string args))))) + ((eq |$BreakMode| '|letPrint2|) + (setq |$BreakMode| nil) + (throw '|letPrint2| nil)))) + (apply system:universal-error-handler type correctable? op + continue-string error-string args ))))) ;;; @(#)debug.lisp 2.5 90/02/15 10:27:33