SBCL User Manual SBCL Version 2.1.9 2021-09 This Manual Is Part of the SBCL Software System
Total Page:16
File Type:pdf, Size:1020Kb
SBCL User Manual SBCL version 2.1.9 2021-09 This manual is part of the SBCL software system. See the README file for more information. This manual is largely derived from the manual for the CMUCL system, which was produced at Carnegie Mellon University and later released into the public domain. This manual is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. i Table of Contents 1 Getting Support and Reporting Bugs ::::::::::::::::::::::::::::::::::::::::: 1 1.1 Volunteer Support ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 1 1.2 Commercial Support::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 1 1.3 Reporting Bugs:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 1 1.3.1 How to Report Bugs Effectively::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 1 1.3.2 Signal Related Bugs :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 2 2 Introduction ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 3 2.1 ANSI Conformance :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 3 2.1.1 Exceptions ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 3 2.2 Extensions::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 3 2.3 Idiosyncrasies:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 4 2.3.1 Declarations :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 4 2.3.2 FASL Format::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 4 2.3.3 Compiler-only Implementation :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 5 2.3.4 Defining Constants ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 5 2.3.5 Style Warnings ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 5 2.4 Development Tools :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 5 2.4.1 Editor Integration :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 6 2.4.2 Language Reference :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 6 2.4.3 Generating Executables::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 6 2.5 More SBCL Information ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 6 2.5.1 SBCL Homepage ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 6 2.5.2 Online Documentation:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 6 2.5.3 Additional Documentation Files :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 6 2.5.4 Internals Documentation:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 6 2.6 More Common Lisp Information ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 7 2.6.1 Internet Community :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 7 2.6.2 Third-party Libraries ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 7 2.6.3 Common Lisp Books ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 7 2.7 History and Implementation of SBCL :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 7 3 Starting and Stopping :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 9 3.1 Starting SBCL::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 9 3.1.1 From Shell to Lisp:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 9 3.1.2 Running from Emacs ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 9 3.1.3 Shebang Scripts :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 9 3.2 Stopping SBCL :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 9 3.2.1 Exit :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 9 3.2.2 End of File :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 10 3.2.3 Saving a Core Image :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 10 3.2.4 Exit on Errors::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 12 3.3 Command Line Options :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 12 3.3.1 Runtime Options :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 12 3.3.2 Toplevel Options :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 13 3.4 Initialization Files :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 14 3.5 Initialization and Exit Hooks ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 14 4 Compiler :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 15 4.1 Diagnostic Messages :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 15 4.1.1 Controlling Verbosity :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 15 4.1.2 Diagnostic Severity :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 16 ii 4.1.3 Understanding Compile Diagnostics:::::::::::::::::::::::::::::::::::::::::::::::::::::: 16 4.1.3.1 The Parts of a Compiler Diagnostic::::::::::::::::::::::::::::::::::::::::::::::::: 16 4.1.3.2 The Original and Actual Source :::::::::::::::::::::::::::::::::::::::::::::::::::: 18 4.1.3.3 The Processing Path ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 18 4.2 Handling of Types :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 19 4.2.1 Declarations as Assertions ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 19 4.2.2 Precise Type Checking :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 19 4.2.3 Getting Existing Programs to Run::::::::::::::::::::::::::::::::::::::::::::::::::::::: 20 4.2.4 Implementation Limitations ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 21 4.3 Compiler Policy :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 21 4.4 Compiler Errors :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 23 4.4.1 Type Errors at Compile Time ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 23 4.4.2 Errors During Macroexpansion :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 24 4.4.3 Read Errors ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 24 4.5 Open Coding and Inline Expansion ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 24 4.6 Interpreter ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 25 4.7 Advanced Compiler Use and Efficiency Hints:::::::::::::::::::::::::::::::::::::::::::::::::: 25 5 Debugger ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 26 5.1 Debugger Entry :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 26 5.1.1 Debugger Banner:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 26 5.1.2 Debugger Invocation :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 26 5.2 Debugger Command Loop :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 26 5.3 Stack Frames ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 27 5.3.1 Stack Motion:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 27 5.3.2 How Arguments are Printed ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 27 5.3.3 Function Names ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 28 5.3.3.1 Entry Point Details :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 28 5.3.4 Debug Tail Recursion:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 28 5.3.5 Unknown Locations and Interrupts :::::::::::::::::::::::::::::::::::::::::::::::::::::: 29 5.4 Variable Access::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 29 5.4.1 Variable Value Availability :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 30 5.4.2 Note On Lexical Variable Access::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 30 5.5 Source Location Printing ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 31 5.5.1 How the Source is Found :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 31 5.5.2 Source Location Availability ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 32 5.6 Debugger Policy Control:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 32 5.7 Exiting Commands ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 33 5.8 Information Commands::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 33 5.9 Function Tracing ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 34 5.10 Single Stepping:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 35 5.11 Enabling and Disabling the Debugger :::::::::::::::::::::::::::::::::::::::::::::::::::::::: 36 6 Efficiency ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 37 6.1 Slot access ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 37 6.1.1 Structure object slot access ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::