NextPrevTopIndex

Contents

1 Introduction

1.1 About this manual

1.2 The LispWorks manuals

1.3 Other documentation

1.4 Notation and conventions

2 Starting LispWorks

2.1 The usual way to start LispWorks

2.2 Passing arguments to LispWorks

2.2.1 Saving a new image

2.2.2 Saving a console mode image

2.2.3 Bypassing initialization files

2.3 Other command line options

2.4 Starting the Common LispWorks Graphical IDE

2.5 Using LispWorks with SLIME

2.6 Quitting LispWorks

3 The Listener

3.1 First use of the listener

3.2 Standard listener commands

3.2.1 Standard top-level loop commands

3.2.2 Examples

3.3 The listener prompt

4 The Debugger

4.1 Entering the REPL debugger

4.2 Simple use of the REPL debugger

4.3 The stack in the debugger

4.4 REPL debugger commands

4.4.1 Backtracing

4.4.2 Moving around the stack

4.4.3 Miscellaneous commands

4.4.4 Leaving the debugger

4.4.5 Example debugging session

4.5 Debugger control variables

5 The REPL Inspector

5.1 Describe

5.2 Inspect

5.3 Inspection modes

5.3.1 Hash table inspection modes

6 The Trace Facility

6.1 Simple tracing

6.2 Tracing options

6.2.1 Evaluating forms on entry to and exit from a traced function

6.2.2 Evaluating forms without printing results

6.2.3 Using the debugger when tracing

6.2.4 Entering stepping mode

6.2.5 Configuring function entry and exit information

6.2.6 Directing trace output

6.2.7 Restricting tracing

6.2.8 Storing the memory allocation made during a function call

6.2.9 Tracing functions from inside other functions

6.3 Example

6.4 Tracing methods

6.5 Trace variables

7 The Advice Facility

7.1 Combining the advice

7.1.1 :before and :after advice

7.1.2 :around advice

7.2 Removing advice

7.3 Advice for macros and methods

7.4 Examples

7.5 Advice functions and macros

8 Dspecs: Tools for Handling Definitions

8.1 Dspecs

8.2 Forms of dspecs

8.2.1 Canonical dspecs

8.3 Dspec namespaces

8.3.1 Dspec classes

8.3.1.1 Complete example of a top-level dspec class

8.3.1.2 Example of subclassing

8.3.2 Dspec aliases

8.4 Types of relations between definitions

8.4.1 Functionally equivalent definers

8.4.2 Grouping subdefinitions together

8.4.3 Distributed definitions

8.5 Details of system dspec classes and aliases

8.5.1 CLOS dspec classes

8.5.2 Part Classes

8.5.3 Foreign callable dspecs

8.6 Subfunction dspecs

8.7 Tracking definitions

8.7.1 Locations

8.7.2 Recording definitions and redefinition checking

8.7.2.1 Use of record-definition

8.8 Finding locations

8.9 Users of location information

8.9.1 Finding definitions in the LispWorks editor

8.9.2 The editor's implicit form parser

8.9.3 Reusing form parsers

9 Action Lists

9.1 Defining and undefining action lists

9.2 Exception handling variables

9.3 Other variables

9.4 Diagnostic utilities

9.5 Examples

9.6 Standard Action Lists

10 The Compiler

10.1 Compiling a function

10.2 Compiling a source file

10.3 How the compiler works

10.4 Compiler control

10.5 Declare, proclaim, and declaim

10.5.1 Naming conventions

10.6 Optimizing your code

10.6.1 Compiler optimization hints

10.6.2 Fast 32-bit arithmetic

10.6.2.1 Optimized and unoptimized INT32 code

10.6.2.2 The INT32 API

10.6.2.3 INT32 Optimization

10.6.3 Floating point optimization

10.6.4 Tail call optimization

10.6.5 Stack allocation of objects with dynamic extent

10.6.6 Inlining foreign slot access

10.7 Compiler parameters affecting LispWorks

11 Storage Management

11.1 Introduction

11.2 Generations and segments

11.3 Memory Management in 32-bit LispWorks

11.3.1 Generations

11.3.2 Allocation of objects

11.3.2.1 Allocation of static objects

11.3.2.2 Allocation in different generations

11.3.3 Mark and sweep

11.3.4 Promotion

11.3.5 Garbage collection strategy

11.3.6 Overflow

11.3.7 Behavior of generation 1

11.3.8 Behavior of generation 2

11.3.9 Forcing expansion

11.3.10 Controlling Fragmentation

11.3.11 Summary of garbage collection symbols

11.3.11.1 Determining storage usage

11.3.11.2 Allocating in specific generations

11.3.11.3 Controlling a specific generation

11.3.11.4 Controlling the garbage collector

11.4 Memory Management in 64-bit LispWorks

11.4.1 General organization of memory

11.4.2 Segments and Allocation Types

11.4.3 Garbage Collection Operations

11.4.4 Generation Management

11.4.5 Tuning the GC

11.4.5.1 Interface for tuning the GC

11.5 Common Memory Management Features

11.5.1 Timing the garbage collector

11.5.2 Reducing image size

11.5.3 Allocation of interned symbols and packages

11.5.4 Allocation of stacks

11.5.5 Mapping across all objects

11.5.6 Special actions

11.5.7 Garbage collection of foreign objects

11.5.8 Freeing of objects by the GC

11.6 Assisting the Garbage Collector

11.6.1 Breaking pointers from older objects

12 The Profiler

12.1 What the profiler does

12.2 Setting up the profiler

12.3 Running the profiler

12.3.1 Using the macro profile

12.3.2 Programmatic control of profiling

12.4 Profiler output

12.5 Interpretation of profiling results

12.6 Profiling pitfalls

12.7 Profiling and garbage collection

13 Customization of LispWorks

13.1 Introduction

13.1.1 Pre-loading code

13.1.2 Loading code at start up

13.1.3 Specific customizations

13.2 Configuration and initialization files

13.2.1 Configuration files

13.2.2 Initialization files

13.3 Saving a LispWorks image

13.3.1 The save-image script

13.3.2 Save your new image

13.3.3 Use your new image

13.4 Load and open your files on startup

13.5 Customizing the editor

13.5.1 Controlling appearance of found definitions

13.5.2 Specifying the number of editor windows

13.5.3 Binding commands to keystrokes

13.6 Finding source code

13.7 Specifying the initial working directory

13.8 Using ! for :redo

13.9 Customizing LispWorks for use with your own code

13.9.1 Preloading selected modules

13.9.2 Creating packages

13.10 Structure printing

13.11 Configuring the printer

13.11.1 PPD file details

14 LispWorks as a dynamic library

14.1 Introduction

14.2 Creating a dynamic library

14.2.1 C functions provided by the system

14.2.2 C functions provided by the application

14.2.3 Example

14.3 Initialization of the dynamic library

14.3.1 Automatic initialization

14.3.2 Initialization via InitLispWorks

14.4 Relocation

14.5 Multiprocessing in a dynamic library

14.6 Unloading a dynamic library

15 The Metaobject Protocol

15.1 Metaobject features incompatible with AMOP

15.1.1 Instance Structure Protocol

15.1.2 Method Metaobjects

15.1.3 Method Lambdas

15.1.4 Method Functions

15.1.5 EQL specializers

15.1.6 Generic Function Invocation Protocol

15.1.7 Method combinations

15.1.8 Inheritance Structure of Metaobject Classes

15.2 Common problems when using the MOP

15.2.1 Inheritance across metaclasses

15.2.2 Accessors not using structure instance protocol

15.2.3 The MOP in delivered images

15.3 Implementation of virtual slots

16 Multiprocessing

16.1 Introduction to processes

16.2 The process programming interface

16.2.1 Creating a process

16.2.2 Finding out about processes

16.2.3 Process Priorities

16.2.4 Interrupting a process

16.2.5 Multiprocessing

16.2.5.1 Starting multiprocessing interactively

16.2.5.2 Multiprocessing on startup

16.2.5.3 Running your own processes on startup

16.2.6 Values across processes

16.2.6.1 Returning a value from another process

16.2.6.2 Accessing symbol values across processes

16.2.7 Stopping and unstopping processes

16.2.8 Example

16.3 Locks

16.4 Timers

16.4.1 Timers and multiprocessing

16.4.2 Input and output for timer functions

16.5 Native threads and foreign code

16.5.1 Native threads on Windows, Mac OS X, Linux and FreeBSD

16.5.2 Native threads on other platforms

16.6 Example

17 Common Defsystem

17.1 Introduction

17.2 Defining a system

17.2.1 DEFSYSTEM syntax

17.2.2 DEFSYSTEM options

17.2.3 DEFSYSTEM members

17.2.4 DEFSYSTEM rules

17.2.5 Examples

18 The Parser Generator

18.1 Introduction

18.2 Grammar rules

18.2.1 Example

18.2.2 Resolving ambiguities

18.3 Functions defined by defparser

18.4 Error handling

18.5 Interface to lexical analyzer

18.6 Example

19 Dynamic Data Exchange

19.1 Introduction

19.1.1 Types of transaction

19.1.2 Conversations, servers, topics, and items

19.1.3 Advise loops

19.1.4 Execute transactions

19.2 Client interface

19.2.1 Opening and closing conversations

19.2.2 Automatically managed conversations

19.2.3 Advise loops

19.2.4 Request and poke transactions

19.2.5 Execute transactions

19.3 Server interface

19.3.1 Starting a DDE server

19.3.2 Handling poke and request transactions

19.3.3 Topics

19.3.3.1 General topics

19.3.3.2 Dispatching topics

19.3.3.3 The system topic

20 Common SQL

20.1 Introduction

20.1.1 Overview

20.1.2 Supported databases

20.2 Initialization

20.2.1 SQL interface

20.2.2 Database classes

20.2.3 Initialization functions and variables

20.2.4 Database libraries

20.2.5 General database connection and disconnection

20.2.5.1 Connection example

20.2.6 Connecting to Oracle

20.2.7 Connecting to ODBC

20.2.7.1 Connecting to ODBC using a string

20.2.7.2 Connecting to ODBC using a plist

20.2.8 Connecting to MySQL

20.2.8.1 Connecting to MySQL using a string

20.2.8.2 Connecting to MySQL using a plist

20.2.8.3 Locating the MySQL client library

20.2.8.4 Special instructions for MySQL on Mac OS X

20.2.9 Connecting to PostgreSQL

20.2.9.1 Connecting to PostgreSQL using a string

20.2.9.2 Connecting to PostgreSQL using a plist

20.3 Functional interface

20.3.1 Functional Data Manipulation Language (FDML)

20.3.1.1 Querying

20.3.1.2 Modification

20.3.1.3 Caching of table queries

20.3.1.4 Transaction handling

20.3.1.5 Iteration

20.3.1.6 Specifying SQL directly

20.3.1.7 Building vendor-specific SQL

20.3.2 Functional Data Definition Language (FDDL)

20.3.2.1 Querying the schema

20.3.2.2 FDDL Querying example

20.3.2.3 Modification

20.4 Object oriented interface

20.4.1 Object oriented/relational model

20.4.2 Object-Oriented Data Definition Language (OODDL)

20.4.2.1 Example View Class definition

20.4.3 Object-Oriented Data Manipulation Language (OODML)

20.4.3.1 Examples

20.4.3.2 Iteration

20.4.3.3 Garbage collection of view instances

20.5 Symbolic SQL syntax

20.5.1 The "[...]" Syntax

20.5.1.1 Enclosing database identifiers

20.5.1.2 SQL strings representing symbolic expressions

20.5.1.3 Calling database functions

20.5.1.4 Enclosing literal SQL

20.5.2 Programmatic interface

20.5.2.1 Examples

20.5.3 Utilities

20.6 Working with date fields

20.6.1 Testing date values

20.6.2 DATE returned as universal time

20.6.2.1 Timezone of returned DATEs

20.6.3 DATE returned as string

20.6.4 Using universal time format

20.7 SQL I/O recording

20.8 Error handling in Common SQL

20.8.1 SQL condition classes

20.8.2 Database error accessors

20.9 Using MySQL

20.9.1 Connection specification

20.9.2 Case of table names and and database names

20.9.3 Encoding (character sets in MySQL).

20.9.4 SQL mode

20.9.5 Meaning of the :owner argument to select

20.9.6 Special considerations for iteration functions and macros

20.9.6.1 Fetching multiple records

20.9.6.2 Aborting queries which fetch many records

20.9.7 Table types

20.9.8 Rollback errors

20.9.9 Types of values returned from queries

20.9.10 Autocommit

20.10 Using Oracle

20.10.1 Connection specification

20.10.2 Setting connection parameters

20.11 Oracle LOB interface

20.11.1 Introduction

20.11.1.1 Retrieving LOB locators

20.11.1.2 Operating on LOB locators

20.11.1.3 Inserting empty LOBs

20.11.2 Retrieving Lob Locators

20.11.3 Locking

20.11.4 Retrieving LOB Locators as streams

20.11.5 Attaching a stream to a LOB locator

20.11.6 Interactions with foreign calls

20.11.7 Determining the type of a LOB

20.11.8 Reading and writing from and to LOBs

20.11.9 The LOB functions

20.11.9.1 Querying functions

20.11.9.2 LOB management functions

20.11.9.3 Modifying LOBs

20.11.9.4 File operations

20.11.9.5 Direct I/O

20.11.9.6 Temporary LOBs

20.11.9.7 Control of buffering

21 User Defined Streams

21.1 Introduction

21.2 An illustrative example of user defined streams

21.2.1 Defining a new stream class

21.2.2 Recognizing the stream element type

21.2.3 Stream directionality

21.2.4 Stream input

21.2.5 Stream output

21.2.6 Instantiating the stream

22 Socket Stream SSL interface

22.1 Creating a stream with SSL

22.2 SSL-CTX and SSL objects

22.3 OpenSSL interface

22.3.1 OpenSSL constants

22.3.2 Naming conventions for direct OpenSSL calls

22.3.2.1 Mapping C names to Lisp names

22.3.2.2 Mapping Lisp names to C names

22.3.3 Direct calls to OpenSSL

22.4 Socket Stream SSL keyword arguments

22.5 Attaching SSL to an existing socket-stream

22.6 Using SSL objects directly

22.7 Initialization

22.8 Obtaining and installing the OpenSSL library

22.8.1 Installing the OpenSSL library on Solaris

22.8.2 Loading the OpenSSL libraries

22.9 Errors in SSL

23 Internationalization

23.1 Introduction

23.2 Character and String types

23.2.1 Character types

23.2.2 Character Syntax

23.2.3 String types

23.2.3.1 String types at runtime

23.2.3.2 String types at compile time

23.3 String accessors

23.4 String Construction

23.4.1 Default string construction

23.4.2 String construction with known type

23.4.3 Controlling string construction

23.4.4 String construction on Windows systems

23.5 External Formats

23.6 External Formats and File Streams

23.6.1 Using complete external formats

23.6.2 Guessing the external format

23.6.3 External formats and stream-element-type

23.6.4 External formats and the LispWorks Editor

23.6.5 Byte Order Mark

23.7 External Formats and the Foreign Language Interface

24 LispWorks' Operating Environment

24.1 The Operating System

24.2 Site Name

24.3 The Lisp Image

24.4 The Command Line

24.4.1 Command Line Arguments

24.5 Address Space and Image Size

24.5.1 Size of real memory

24.5.2 Layout of memory

24.5.3 Reporting current allocation

24.6 Startup relocation

24.6.1 How to relocate LispWorks

24.6.2 Startup relocation of 32-bit LispWorks

24.6.2.1 Linux

24.6.2.2 FreeBSD

24.6.2.3 Windows and Macintosh

24.6.3 Startup relocation of 64-bit LispWorks

24.6.3.1 Linux

24.6.3.2 Solaris

24.6.3.3 Windows and Macintosh

24.7 Exit status

24.8 Creating a new executable with code preloaded

24.9 Universal binaries on Mac OS X

24.10 User Preferences

24.10.1 Location of persistant settings

24.10.2 Accessing persistant settings

24.10.3 Example using user preferences

24.11 Accessing the Windows registry

24.12 The home directory

24.13 Special Folders

25 64-bit LispWorks

25.1 Introduction

25.2 Heap size

25.3 Architectural constants

25.4 Speed

25.5 Memory Management

25.6 Float types

25.7 External libraries

Index

 


LispWorks User Guide - 11 Mar 2008

NextPrevTopIndex