Common Lisp Package: COM.INFORMATIMAGO.COMMON-LISP.LISP.STEPPER.INTERNAL

This is an internal package of the Common Lisp stepper. This package exports the stepper generator functions, and defines stepper interactive functions (not exported). See the documentation of the package COM.INFORMATIMAGO.COMMON-LISP.LISP.STEPPER. BUGS: we should probably design it with hooks so that clients may define the stepping/tracing user interface. Copyright Pascal J. Bourguignon 2012 - 2012 This package is provided under the Afero General Public License 3. See the source file for details.

README:

FUNCTION

Public

DID-BIND (VARIABLE VALUE &OPTIONAL (STREAM *STEP-TRACE-OUTPUT*))

RETURN: VALUE

STEP-DISABLED (FORM)

RETURN: A form where FORM is evaluated in an environment where all the stepper special operator macros expand to CL special operators.

STEP-FUNCTION (KIND NAME LAMBDA-LIST BODY ENV)

KIND: A lambda-list kind (:ordinary for functions, :specialized for methods, :destructuring for macros). NAME: The name of the defined function or macro. LAMBDA-FORM: A lambda form. BODY: A list of forms, the body of the function. RETURN: A stepping body.

STEP-LAMBDA (LAMBDA-FORM &KEY (KIND ORDINARY) NAME ENVIRONMENT)

ENV: An environment. LAMBDA-FORM: A lambda form. KIND: A lambda-list kind (:ordinary for functions, :generic for generic functions, :specialized for methods, :destructuring for macros, etc). NAME: The name of the defined function or macro. RETURN: A stepping lambda-form from the LAMBDA-FORM.

Undocumented

DID-STEP (FORM RESULTS &OPTIONAL (STREAM *STEP-TRACE-OUTPUT*))

DID-TAG (TAG &OPTIONAL (STREAM *STEP-TRACE-OUTPUT*))

SIMPLE-STEP (FORM &OPTIONAL (DISPLAY-FORM FORM))

STEP-ATOM (OBJECT)

STEP-BINDINGS (MODE BINDINGS FORM ENV)

STEP-BODY (WHERE BODY ENV)

STEP-CHOICE (&OPTIONAL THUNK)

STEP-EXPRESSION (FORM ENV)

STEP-SIMPLE-FORM (ACTUAL &OPTIONAL (FORM ACTUAL))

STEPPER-DECLARATION-P (DECLARATIONS KEYWORD)

SUBSTITUTE-IGNORABLE (DECLARATIONS)

WILL-STEP (FORM &OPTIONAL (STREAM *STEP-TRACE-OUTPUT*))

Private

TRIVIAL-ATOM-P (ATOM)

Trivial atoms are either (quote something) forms, or atoms that are self-evaluating.

Undocumented

CALL-SIMPLE-STEP (THUNK DISPLAY-FORM)

CALL-STEP-ATOM (ATOM THUNK)

CALL-STEP-FUNCTION (NAME PNAMES PVALS THUNK)

STEP-FUNCTION-CALL (FORM ENV)

MACRO

Public

STEP-BREAK-ENTRY (&REST FNAMES)

DO: Enable breaking on entry of functions named by FNAMES. FNAMES: A list of function names. NOTE: The functions must have been compiled with the operators from the CL-STEPPER package not the CL package. RETURN: The list of function names added.

STEP-BREAK-EXIT (&REST FNAMES)

DO: Enable breaking on exit of functions named by FNAMES. FNAMES: A list of function names. NOTE: The functions must have been compiled with the operators from the CL-STEPPER package not the CL package. RETURN: The list of function names added.

STEP-TRACE-FUNCTION (&REST FNAMES)

DO: Enable tracing of functions named by FNAMES. FNAMES: A list of function names. NOTE: The functions must have been compiled with the operators from the CL-STEPPER package not the CL package. RETURN: The list of function names added.

STEP-UNBREAK-ENTRY (&REST FNAMES)

DO: Disable breaking on entry of functions named by FNAMES. FNAMES: A list of function names. NOTE: The functions must have been compiled with the operators from the CL-STEPPER package not the CL package. RETURN: The list of step-break-entry functions remaining.

STEP-UNBREAK-EXIT (&REST FNAMES)

DO: Disable breaking on exit of functions named by FNAMES. FNAMES: A list of function names. NOTE: The functions must have been compiled with the operators from the CL-STEPPER package not the CL package. RETURN: The list of step-break-entry functions remaining.

STEP-UNTRACE-FUNCTION (&REST FNAMES)

DO: Disable tracing of functions named by FNAMES. FNAMES: A list of function names. NOTE: The functions must have been compiled with the operators from the CL-STEPPER package not the CL package. RETURN: The list of step-traced functions remaining.

Private

Undocumented

SELF-EVALUATING (OBJECT)

SYMBOL-REFERENCE (SYMBOL &ENVIRONMENT ENV)

WITH-PARENS (STREAM &BODY BODY)

WITH-STEP-PRINTING (&BODY BODY)

GENERIC-FUNCTION

Public

Undocumented

STEP-MESSAGE (CONDITION)

VARIABLE

Public

*STEP-LEVEL*

The level.

*STEP-MAX-TRACE-DEPTH*

The maximum depth of function calls that should be traced. When more than that depth of calls occur, the *step-mode* switches to :run.

*STEP-MODE*

May be :run, :function :trace or :step. :run don't print anything, just evaluate the forms. :function just prints the function calls and their results. :trace just prints the forms and their results as they are evaluted. :step prints the form, then ask the user what to do (step over, step into, trace, run). When break-points are implemented, :run, :function and :trace will run until a break-point is reached.

*STEP-PACKAGE*

The package bound to *PACKAGE* while printing tracing logs.

*STEP-PRINT-CASE*

The value bound to *PRINT-CASE* while printing tracing logs.

*STEP-PRINT-LENGTH*

The value bound to *PRINT-LENGTH* while printing tracing logs.

*STEP-PRINT-LEVEL*

The value bound to *PRINT-LEVEl* while printing tracing logs.

*STEP-PRINT-READABLY*

The value bound to *PRINT-READABLY* while printing tracing logs.

*STEP-TRACE-OUTPUT*

The stream where the stepper traces are written to.

Private

*BREAK-FUNCTIONS-ENTRY*

A list of function names that we must break into the stepper upon entry. SEE: STEP-BREAK-ENTRY, STEP-UNBREAK-ENTRY.

*BREAK-FUNCTIONS-EXIT*

A list of function names that we must break into the stepper upon exit. SEE: STEP-BREAK-EXIT, STEP-UNBREAK-EXIT.

*STEP-CURRENT-TRACE-DEPTH*

The current depth of instrumented function calls.

*TRACE-FUNCTIONS*

A list of function names that we must trace with the stepper. SEE: STEP-TRACE, STEP-UNTRACE.

CONDITION

Public

Undocumented

STEP-CONDITION