The optima Reference Manual

This is the optima Reference Manual, version 1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 06:16:39 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 optima

Optimized Pattern Matching Library

Author

Tomohiro Matsuyama

License

LLGPL

Long Description

optima is a fast pattern matching library which
uses optimizing techniques widely used in the functional programming
world. See the following references for more details:

* [Optimizing Pattern Matching](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.6.5507) by Fabrice Le Fessant, Luc Maranget
* [The Implementation of Functional Programming Languages](http://research.microsoft.com/en-us/um/people/simonpj/papers/slpj-book-1987/) by Simon Peyton Jones

Pattern Language
—————-

A pattern specifier, or a pattern for short ambiguous, is an
expression that describes how a value matches some
specification. Pattern specifiers are defined as follows:

pattern-specifier ::= constant-pattern
| variable-pattern
| place-pattern
| guard-pattern
| not-pattern
| or-pattern
| and-pattern
| constructor-pattern
| derived-pattern
constant-pattern ::= t | nil
| keyword
| atom-except-symbol
| (quote VALUE)
variable-pattern ::= SYMBOL | (variable SYMBOL)
place-pattern ::= (place SYMBOL)
guard-pattern ::= (guard PATTERN TEST-FORM)
not-pattern ::= (not PATTERN)
or-pattern ::= (or PATTERN*)
and-pattern ::= (and PATTERN*)
constructor-pattern ::= (NAME ARG*)
derived-pattern ::= (NAME PATTERN*)

### Constant-Pattern

A constant-pattern matches the constant itself.

Examples:

(match 1 (1 2)) => 2
(match "foo" ("foo" "bar")) => "bar"
(match ’(1) (’(1) 2)) => 2

### Variable-Pattern

A variable-pattern matches any value and binds the value to the
variable. "_" and "otherwise" are special variable-patterns (a.k.a
wildcard-pattern) which match any value but don’t bind.

Examples:

(match 1 (x x)) => 1
(match 1 (_ 2)) => 2
(match 1
(2 2)
(otherwise ’otherwise))
=> OTHERWISE

### Place-Pattern

A place-pattern matches any value, in the same way as
variable-patterns do, but binds the value by using SYMBOL-MACROLET.

Examples:

(defvar c (cons 1 2))
(match c ((cons (place x) y) (incf x) (incf y)))
c
=> (2 . 2)

### Guard-Pattern

A guard-pattern is a special pattern that tests whether TEST-FORM is
satisfied in the current matching context.

Examples:

(match 1 ((guard x (eql x 2)) t))
=> NIL
(match 1 ((guard x (eql x 1)) t))
=> T

### Not-Pattern

A not-pattern matches a value that is not matched with sub-PATTERN.

Examples:

(match 1 ((not 2) 3)) => 3
(match 1 ((not (not 1)) 1)) => 1

### Or-Pattern

An or-pattern matches a value that is matched with one of
sub-PATTERNs.

Examples:

(match ’(2 . 1) ((or (cons 1 x) (cons 2 x)) x))
=> 1

### And-Pattern

An and-pattern matches a value that is matched with all of its
sub-PATTERNs. The most common use case is to match a value and bind
the value to a variable.

Examples:

(match 1 ((and 1 x) x))
=> 1

### Constructor-Pattern

A constructor-pattern matches the sub-components of a value based on
its structure. The following constructors are available:

#### CONS

Syntax:

cons-constructor-pattern ::= (cons CAR-PATTERN CDR-PATTERN)

Examples:

(match ’(1 . 2)
((cons a b) (+ a b)))
=> 3

#### ASSOC

Syntax:

assoc-constructor-pattern ::= (assoc ITEM PATTERN &key key test)

Examples:

(match ’((1 . :one))
((assoc 1 x) x))
=> :ONE
(match ’((1 . :one) (2 . :two))
((assoc 2 x) x))
=> :TWO
(match ’(1 (2 . 3))
((assoc 2 x) x))
=> 3
(match ’(("a" . 123))
((assoc "A" 123 :test #’string-equal) t))
=> T

#### PROPERTY

Syntax:

property-constructor-pattern ::= (property KEY PATTERN)

Examples:

(match ’(:a 1)
((property :a x) x))
=> 1
(match ’(:a 1 :b 2)
((property :b x) x))
=> 2
(match ’(:a 1 2)
((property :a x) x))
=> 1

#### VECTOR

Syntax:

vector-constructor-pattern ::= (vector PATTERN*)

Examples:

(match #(1 2)
((vector a b) (+ a b)))
=> 3

#### SIMPLE-VECTOR

Syntax:

simple-vector-constructor-pattern ::= (simple-vector PATTERN*)

Examples:

(match #(1 2)
((simple-vector a b) (+ a b)))
=> 3

#### CLASS

Matches an instance of a given subclass of standard-class, as well as
the instance’s slots.

Syntax:

class-constructor-pattern ::= (class NAME slot*)
| (NAME slot*)
slot ::= SLOT-NAME
| (SLOT-NAME PATTERN*)

CLASS can be omitted. If slot is a symbol, then it will be regarded
as (slot slot). If more than one PATTERN is given, then they will be
wrapped by and-pattern like (and PATTERN*).

Examples:

(defclass point ()
((x :initarg :x)
(y :initarg :y)))
(defvar p (make-instance ’point :x 1 :y 2))
(match p
((point x y) (list x y)))
=> (1 2)
(match p
((point (x 1 x)) x))
=> 1
(defstruct person (name age))
(defvar foo (make-person :name "foo" :age 30))
(match foo
((person name age) (list name age)))
=> ("foo" 30)

You can also use MAKE-INSTANCE style pattern syntax like:

(match foo
((person :name name :age age) (list name age)))
=> ("foo" 30)

This is equal to the example above except this implicitly resolves the
slot names using the Metaobject Protocol. In this case, you have to
make sure the slot names can be determined uniquely during the
compilation. Otherwise, you will get a compiler error.

#### STRUCTURE

Matches any structure value, and its slot values.

Syntax:

structure-constructor-pattern ::= (structure CONC-NAME slot*)
| (CONC-NAME slot*)
slot ::= SLOT-NAME
| (SLOT-NAME PATTERN*)

As in the CLASS constructor-pattern, STRUCTURE can be
omitted. CONC-NAME is a prefix string of a predicate (CONC-NAME +
"p") and accessors (CONC-NAME + SLOT-NAME). For example, if we have
the following defstruct,

(defstruct person name age)

the structure constructor-pattern (person- name age) is valid because
PERSON-P, PERSON-NAME and PERSON-AGE are available here. Technically,
we don’t need an actual structure definition. If we have the following
code, for instance,

(defun point-p (p) (consp p))
(defun point-x (p) (car p))
(defun point-y (p) (cdr p))

the pattern matching below is valid.

(match (cons 1 2)
((point- x y) (list x y)))
=> (1 2)

Examples:

(defstruct (person (:conc-name :p-)
(:predicate p-p))
name age)
(match (make-person :name "foo" :age 30)
((p- name age) (list name age)))
=> ("foo" 30)

As in the class constructor-pattern, you can also use MAKE-INSTANCE
style pattern syntax like:

(match (cons 1 2)
((point- :x x :y y) (list x y)))
=> (1 2)

### Derived-Pattern

A derived-pattern is a pattern that is defined with DEFPATTERN. There
are some builtin derived patterns as below:

#### LIST

Expansion of LIST derived patterns:

(list a b c) => (cons a (cons b (cons c nil)))

#### LIST*

Expansion of LIST* derived patterns:

(list* a b c) => (cons a (cons b c))

#### SATISFIES

Expansion of SATISFIES derived patterns:

(satisfies f) => (guard it (f it))

#### EQ, EQL, EQUAL, EQUALP

Expansion of EQ, EQL, EQUAL, EQUALP derived patterns:

(eq ’foo) => (guard it (eq it ’foo))
(eql 123) => (guard it (eql it 123))
(equal ’(1 2)) => (guard it (equal it ’(1 2)))
(equalp "foo") => (guard it (equalp it "foo"))

#### TYPE

Expansion of TYPE derived patterns:

(TYPE type) => (guard it (typep it ’type))

Quasiquotation
————–

You may want to use a quasiquote in a pattern specifier like:

(match ’(1 2 3 4)
(‘(1 ,x ,@y) (list x y)))

To do so, you need to use a specific quasiquote reader, for example
[fare-quasiquote](http://cliki.net/fare-quasiquote) , loading
fare-quasiquote-optima system, because there is no standard expanded
form for quasiquote expressions.

Define Constructor Patterns
—————————

You can define your own constructor patterns by using the
‘OPTIMA.CORE‘ package. First, define a data structure for the
constructor pattern.

(defstruct (my-cons-pattern (:include constructor-pattern)
(:constructor make-cons-pattern (car-pattern cdr-pattern
&aux (subpatterns (list car-pattern cdr-pattern))))))

Note that you must keep ‘SUBPATTERNS‘ of the constructor pattern in
sync so that optima can take care of them.

Second, specify a condition for when the destructor of two constructor
patterns can be shared. This makes it possible to perform some
optimizations.

(defmethod constructor-pattern-destructor-sharable-p ((x my-cons-pattern) (y my-cons-pattern))
t)

Third, define a destructor generator for the constructor pattern. The
destructor generator will make a destructor that specifies how to
check the the data (‘PREDICATE-FORM‘) and how to access the
data (‘ACCESSOR-FORMS‘).

(defmethod constructor-pattern-make-destructor ((pattern my-cons-pattern) var)
(make-destructor :predicate-form ‘(consp ,var)
:accessor-forms (list ‘(car ,var) ‘(cdr ,var))))

Finally, define a parser and an unparser for the constructor pattern.

(defmethod parse-constructor-pattern ((name (eql ’my-cons)) &rest args)
(apply #’make-my-cons-pattern (mapcar #’parse-pattern args)))
(defmethod unparse-pattern ((pattern my-cons-pattern))
‘(cons ,(unparse-pattern (my-cons-pattern-car-pattern pattern))
,(unparse-pattern (my-cons-pattern-cdr-pattern pattern))))

See the source code for more detail.

Version

1.0

Dependencies
  • alexandria (system).
  • closer-mop (system).
Source

optima.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 optima/src

Source

optima.asd.

Parent Component

optima (system).

Child Components

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 optima/optima.asd

Source

optima.asd.

Parent Component

optima (system).

ASDF Systems

optima.


4.1.2 optima/src/packages.lisp

Source

optima.asd.

Parent Component

src (module).

Packages

4.1.3 optima/src/util.lisp

Dependency

packages.lisp (file).

Source

optima.asd.

Parent Component

src (module).

Internals

4.1.4 optima/src/runtime.lisp

Dependency

util.lisp (file).

Source

optima.asd.

Parent Component

src (module).

Public Interface

4.1.5 optima/src/pattern.lisp

Dependency

runtime.lisp (file).

Source

optima.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.6 optima/src/fail.lisp

Dependency

pattern.lisp (file).

Source

optima.asd.

Parent Component

src (module).

Public Interface

fail (macro).

Internals

4.1.7 optima/src/compiler.lisp

Dependency

fail.lisp (file).

Source

optima.asd.

Parent Component

src (module).

Internals

4.1.8 optima/src/match.lisp

Dependency

compiler.lisp (file).

Source

optima.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.9 optima/src/extra.lisp

Dependency

match.lisp (file).

Source

optima.asd.

Parent Component

src (module).

Public Interface

5 Packages

Packages are listed by definition order.


5.1 optima

Source

packages.lisp.

Use List
Used By List

optima.extra.

Public Interface
Internals

5.2 optima.core

Source

packages.lisp.

Use List

common-lisp.

Used By List

optima.

Public Interface

5.3 optima.extra

### [Pattern] alist

Syntax:

(alist (KEY . PATTERN)*)

Expansion:

(alist (k . p)*) => (and (assoc k p)*)

Examples:

(match ’((1 . :one) (2 . :two) (3 . :three)) ((alist (1 . x) (3 . y)) (list x y))) => (:ONE :THREE)

### [Pattern] plist

Syntax:

(plist {KEY PATTERN}*)

Expansion:

(plist {k p}*) => (and (property k p)*)

Examples:

(match ’(:name "John" :age 23)
((plist :name "John" :age age) age)) => 23

Source

packages.lisp.

Use List
Public Interface

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Macros

Macro: %equals (var value)

Equality macro for comparing pattern constants. This specializes the comparison form to some specific form as follows:

(equals x nil) => (null x)
(equals x ’foo) => (eq x ’foo)
(equals x 123) => (eql x 123)
(equals x ’(a b)) => (%equals x ’(a b))

Package

optima.core.

Source

runtime.lisp.

Macro: cmatch (arg &body clauses)

Same as MATCH, except a continuable MATCH-ERROR will be raised if none of the clauses match.

Package

optima.

Source

match.lisp.

Macro: defpattern (name lambda-list &body body)

Defines a derived pattern specifier named NAME. This is analogous to DEFTYPE.

Examples:

;; Defines a LIST pattern.
(defpattern list (&rest args)
(when args
‘(cons ,(car args) (list ,@(cdr args)))))

Package

optima.

Source

pattern.lisp.

Macro: ematch (arg &body clauses)

Same as MATCH, except MATCH-ERROR will be raised if not matched.

Package

optima.

Source

match.lisp.

Macro: fail ()

Causes the latest pattern matching to fail. After this failure, matching continues at the next pattern.

Package

optima.

Source

fail.lisp.

Macro: if-match (pattern arg &body then)

Equivalent to (match ARG (PATTERN THEN) (otherwise ELSE)).

Package

optima.extra.

Source

extra.lisp.

Macro: lambda-cmatch (&body clauses)

Equivalent to (lambda (arg) (cmatch arg CLAUSES...)).

Package

optima.extra.

Source

extra.lisp.

Macro: lambda-cmatch1 (pattern &body body)

Equivalent to (lambda-cmatch (PATTERN BODY...)).

Package

optima.extra.

Source

extra.lisp.

Macro: lambda-ematch (&body clauses)

Equivalent to (lambda (arg) (ematch arg CLAUSES...)).

Package

optima.extra.

Source

extra.lisp.

Macro: lambda-ematch1 (pattern &body body)

Equivalent to (lambda-ematch (PATTERN BODY...)).

Package

optima.extra.

Source

extra.lisp.

Macro: lambda-match (&body clauses)

Equivalent to (lambda (arg) (match arg CLAUSES...)).

Package

optima.extra.

Source

extra.lisp.

Macro: lambda-match1 (pattern &body body)

Equivalent to (lambda-match (PATTERN BODY...)).

Package

optima.extra.

Source

extra.lisp.

Macro: let-match (bindings &body body)

Similar to LET, except not only a variable but also a pattern can be used in BINDINGS.

Package

optima.extra.

Source

extra.lisp.

Macro: let-match* (bindings &body body)

Similar to LET-MATCH but matches sequentially.

Package

optima.extra.

Source

extra.lisp.

Macro: let-match1 (pattern arg &body body)

Equivalent to (let-match ((PATTERN ARG)) BODY...).

Package

optima.extra.

Source

extra.lisp.

Macro: match (arg &body clauses)

Matches ARG with CLAUSES. CLAUSES is a list of the form of (PATTERN
. BODY) where PATTERN is a pattern specifier and BODY is an implicit
progn. If ARG matches some PATTERN, ‘match‘ then evaluates
the corresponding BODY and returns the evaluated value. If no pattern matches, then returns NIL.

Evaluating a form (FAIL) in the clause body causes the latest pattern matching to fail. For example,

(match 1
(x (if (eql x 1)
(fail)
x))
(_ ’ok))

returns OK, because the form (FAIL) in the first clause is
evaluated.

If BODY starts with the symbols WHEN or UNLESS, then the next form
will be used to introduce (FAIL). That is,

(match list ((list x) when (oddp x) x))
(match list ((list x) unless (evenp x) x))

will be translated to

(match list ((list x) (if (oddp x) x (fail))))
(match list ((list x) (if (evenp x) (fail) x)))

Examples:

(match 1 (1 1))
=> 1
(match 1 (2 2))
=> 2
(match 1 (x x))
=> 1
(match (list 1 2 3)
(list x y z) (+ x y z))
=> 6

Package

optima.

Source

match.lisp.

Macro: multiple-value-cmatch (values-form &body clauses)

Same as MULTIPLE-VALUE-MATCH, except a continuable MATCH-ERROR will be raised if none of the clauses match.

Package

optima.

Source

match.lisp.

Macro: multiple-value-ematch (values-form &body clauses)

Same as MULTIPLE-VALUE-MATCH, except MATCH-ERROR will be raised if not matched.

Package

optima.

Source

match.lisp.

Macro: multiple-value-match (values-form &body clauses)

Matches the multiple values of VALUES-FORM with CLAUSES. Unlike MATCH, CLAUSES have to have the form of (PATTERNS . BODY), where PATTERNS is a list of patterns. The number of values that will be used to match is determined by the maximum arity of PATTERNS among CLAUSES.

Examples:

(multiple-value-match (values 1 2)
((2) 1)
((1 y) y))
=> 2

Package

optima.

Source

match.lisp.

Macro: unless-match (pattern arg &body body)

Equivalent to (match ARG (PATTERN) (otherwise BODY...)).

Package

optima.extra.

Source

extra.lisp.

Macro: when-match (pattern arg &body body)

Equivalent to (match ARG (PATTERN BODY...)).

Package

optima.extra.

Source

extra.lisp.


6.1.2 Ordinary functions

Function: %assoc (item alist &key test)

Safe ASSOC.

Package

optima.core.

Source

runtime.lisp.

Function: %equal (a b)

Equality function for comparing pattern constants.

Package

optima.core.

Source

runtime.lisp.

Function: %get-property (item plist)

Safe GETF.

Package

optima.core.

Source

runtime.lisp.

Function: %svref (simple-vector index)

Safe SVREF.

Package

optima.core.

Source

runtime.lisp.

Function: and-pattern-subpatterns (instance)
Package

optima.core.

Source

pattern.lisp.

Function: (setf and-pattern-subpatterns) (instance)
Package

optima.core.

Source

pattern.lisp.

Reader: assoc-pattern-item (instance)
Writer: (setf assoc-pattern-item) (instance)
Package

optima.core.

Source

pattern.lisp.

Target Slot

item.

Reader: assoc-pattern-key (instance)
Writer: (setf assoc-pattern-key) (instance)
Package

optima.core.

Source

pattern.lisp.

Target Slot

key.

Reader: assoc-pattern-test (instance)
Writer: (setf assoc-pattern-test) (instance)
Package

optima.core.

Source

pattern.lisp.

Target Slot

test.

Function: assoc-pattern-value-pattern (pattern)
Package

optima.core.

Source

pattern.lisp.

Function: check-patterns (patterns)

Check if PATTERNS are valid. Otherwise, an error will be raised.

Package

optima.core.

Source

pattern.lisp.

Reader: class-pattern-class-name (instance)
Writer: (setf class-pattern-class-name) (instance)
Package

optima.core.

Source

pattern.lisp.

Target Slot

class-name.

Reader: class-pattern-slot-names (instance)
Writer: (setf class-pattern-slot-names) (instance)
Package

optima.core.

Source

pattern.lisp.

Target Slot

slot-names.

Function: class-pattern-subpatterns (instance)
Package

optima.core.

Source

pattern.lisp.

Function: (setf class-pattern-subpatterns) (instance)
Package

optima.core.

Source

pattern.lisp.

Reader: complex-pattern-subpatterns (instance)
Writer: (setf complex-pattern-subpatterns) (instance)
Package

optima.core.

Source

pattern.lisp.

Target Slot

subpatterns.

Function: cons-pattern-car-pattern (pattern)
Package

optima.core.

Source

pattern.lisp.

Function: cons-pattern-cdr-pattern (pattern)
Package

optima.core.

Source

pattern.lisp.

Reader: constant-pattern-value (instance)
Writer: (setf constant-pattern-value) (instance)
Package

optima.core.

Source

pattern.lisp.

Target Slot

value.

Function: constructor-pattern-arity (pattern)
Package

optima.core.

Source

pattern.lisp.

Function: constructor-pattern-subpatterns (instance)
Package

optima.core.

Source

pattern.lisp.

Function: (setf constructor-pattern-subpatterns) (instance)
Package

optima.core.

Source

pattern.lisp.

Reader: destructor-accessor-forms (instance)
Writer: (setf destructor-accessor-forms) (instance)
Package

optima.core.

Source

pattern.lisp.

Target Slot

accessor-forms.

Function: guard-pattern-subpattern (pattern)
Package

optima.core.

Source

pattern.lisp.

Reader: guard-pattern-test-form (instance)
Writer: (setf guard-pattern-test-form) (instance)
Package

optima.core.

Source

pattern.lisp.

Target Slot

test-form.

Function: lift-guard-patterns (pattern)
Package

optima.core.

Source

pattern.lisp.

Function: make-and-pattern (&rest subpatterns)
Package

optima.core.

Source

pattern.lisp.

Function: make-assoc-pattern (item value-pattern &key key test)
Package

optima.core.

Source

pattern.lisp.

Function: make-class-pattern (class-name &rest slot-specs)
Package

optima.core.

Source

pattern.lisp.

Function: make-cons-pattern (car-pattern cdr-pattern)
Package

optima.core.

Source

pattern.lisp.

Function: make-constant-pattern (value)
Package

optima.core.

Source

pattern.lisp.

Function: make-destructor (&key bindings predicate-form accessor-forms)
Package

optima.core.

Source

pattern.lisp.

Function: make-guard-pattern (subpattern test-form)
Package

optima.core.

Source

pattern.lisp.

Function: make-not-pattern (subpattern)
Package

optima.core.

Source

pattern.lisp.

Function: make-or-pattern (&rest subpatterns)
Package

optima.core.

Source

pattern.lisp.

Function: make-place-pattern (name)
Package

optima.core.

Source

pattern.lisp.

Function: make-property-pattern (item value-pattern)
Package

optima.core.

Source

pattern.lisp.

Function: make-simple-vector-pattern (&rest subpatterns)
Package

optima.core.

Source

pattern.lisp.

Function: make-structure-pattern (conc-name &rest slot-specs)
Package

optima.core.

Source

pattern.lisp.

Function: make-variable-pattern (&optional name)
Package

optima.core.

Source

pattern.lisp.

Function: make-vector-pattern (&rest subpatterns)
Package

optima.core.

Source

pattern.lisp.

Function: not-pattern-subpattern (pattern)
Package

optima.core.

Source

pattern.lisp.

Function: or-pattern-subpatterns (instance)
Package

optima.core.

Source

pattern.lisp.

Function: (setf or-pattern-subpatterns) (instance)
Package

optima.core.

Source

pattern.lisp.

Function: parse-pattern (pattern)
Package

optima.core.

Source

pattern.lisp.

Function: pattern-expand (pattern)
Package

optima.core.

Source

pattern.lisp.

Function: pattern-expand-1 (pattern)
Package

optima.core.

Source

pattern.lisp.

Function: pattern-expand-all (pattern)
Package

optima.core.

Source

pattern.lisp.

Function: pattern-expand-function (name)
Package

optima.core.

Source

pattern.lisp.

Function: (setf pattern-expand-function) (name)
Package

optima.core.

Source

pattern.lisp.

Function: pattern-variables (pattern)

Returns the set of variables in PATTERN. If PATTERN is not linear, an error will be raised.

Package

optima.core.

Source

pattern.lisp.

Function: place-pattern-included-p (pattern)
Package

optima.core.

Source

pattern.lisp.

Reader: place-pattern-name (instance)
Writer: (setf place-pattern-name) (instance)
Package

optima.core.

Source

pattern.lisp.

Target Slot

name.

Reader: property-pattern-item (instance)
Writer: (setf property-pattern-item) (instance)
Package

optima.core.

Source

pattern.lisp.

Target Slot

item.

Function: property-pattern-value-pattern (pattern)
Package

optima.core.

Source

pattern.lisp.

Function: simple-vector-pattern-subpatterns (instance)
Package

optima.core.

Source

pattern.lisp.

Function: (setf simple-vector-pattern-subpatterns) (instance)
Package

optima.core.

Source

pattern.lisp.

Reader: structure-pattern-conc-name (instance)
Writer: (setf structure-pattern-conc-name) (instance)
Package

optima.core.

Source

pattern.lisp.

Target Slot

conc-name.

Reader: structure-pattern-slot-names (instance)
Writer: (setf structure-pattern-slot-names) (instance)
Package

optima.core.

Source

pattern.lisp.

Target Slot

slot-names.

Function: structure-pattern-subpatterns (instance)
Package

optima.core.

Source

pattern.lisp.

Function: (setf structure-pattern-subpatterns) (instance)
Package

optima.core.

Source

pattern.lisp.

Reader: variable-pattern-name (instance)
Writer: (setf variable-pattern-name) (instance)
Package

optima.core.

Source

pattern.lisp.

Target Slot

name.

Function: vector-pattern-subpatterns (instance)
Package

optima.core.

Source

pattern.lisp.

Function: (setf vector-pattern-subpatterns) (instance)
Package

optima.core.

Source

pattern.lisp.


6.1.3 Generic functions

Generic Function: constructor-pattern-destructor-sharable-p (x y)
Package

optima.core.

Source

pattern.lisp.

Methods
Method: constructor-pattern-destructor-sharable-p ((x structure-pattern) (y structure-pattern))
Method: constructor-pattern-destructor-sharable-p ((x class-pattern) (y class-pattern))
Method: constructor-pattern-destructor-sharable-p ((x simple-vector-pattern) (y simple-vector-pattern))
Method: constructor-pattern-destructor-sharable-p ((x vector-pattern) (y vector-pattern))
Method: constructor-pattern-destructor-sharable-p ((x property-pattern) (y property-pattern))
Method: constructor-pattern-destructor-sharable-p ((x assoc-pattern) (y assoc-pattern))
Method: constructor-pattern-destructor-sharable-p ((x cons-pattern) (y cons-pattern))
Generic Function: constructor-pattern-make-destructor (pattern var)
Package

optima.core.

Source

pattern.lisp.

Methods
Method: constructor-pattern-make-destructor ((pattern structure-pattern) var)
Method: constructor-pattern-make-destructor ((pattern class-pattern) var)
Method: constructor-pattern-make-destructor ((pattern simple-vector-pattern) var)
Method: constructor-pattern-make-destructor ((pattern vector-pattern) var)
Method: constructor-pattern-make-destructor ((pattern property-pattern) var)
Method: constructor-pattern-make-destructor ((pattern assoc-pattern) var)
Method: constructor-pattern-make-destructor ((pattern cons-pattern) var)
Generic Reader: match-error-patterns (condition)
Package

optima.

Methods
Reader Method: match-error-patterns ((condition match-error))
Source

match.lisp.

Target Slot

patterns.

Generic Reader: match-error-values (condition)
Package

optima.

Methods
Reader Method: match-error-values ((condition match-error))
Source

match.lisp.

Target Slot

values.

Generic Function: parse-constructor-pattern (name &rest args)
Package

optima.core.

Source

pattern.lisp.

Methods
Method: parse-constructor-pattern (name &rest slot-specs)
Method: parse-constructor-pattern ((name (eql structure)) &rest args)
Method: parse-constructor-pattern ((name (eql class)) &rest args)
Method: parse-constructor-pattern ((name (eql simple-vector)) &rest args)
Method: parse-constructor-pattern ((name (eql vector)) &rest args)
Method: parse-constructor-pattern ((name (eql optima:property)) &rest args)
Method: parse-constructor-pattern ((name (eql assoc)) &rest args)
Method: parse-constructor-pattern ((name (eql cons)) &rest args)
Generic Function: unparse-pattern (pattern)
Package

optima.core.

Source

pattern.lisp.

Methods
Method: unparse-pattern ((pattern structure-pattern))
Method: unparse-pattern ((pattern class-pattern))
Method: unparse-pattern ((pattern simple-vector-pattern))
Method: unparse-pattern ((pattern vector-pattern))
Method: unparse-pattern ((pattern property-pattern))
Method: unparse-pattern ((pattern assoc-pattern))
Method: unparse-pattern ((pattern cons-pattern))
Method: unparse-pattern ((pattern and-pattern))
Method: unparse-pattern ((pattern or-pattern))
Method: unparse-pattern ((pattern not-pattern))
Method: unparse-pattern ((pattern guard-pattern))
Method: unparse-pattern ((pattern constant-pattern))
Method: unparse-pattern ((pattern place-pattern))
Method: unparse-pattern ((pattern variable-pattern))

6.1.4 Standalone methods

Method: print-object ((pattern pattern) stream)
Source

pattern.lisp.


6.1.5 Conditions

Condition: match-error
Package

optima.

Source

match.lisp.

Direct superclasses

error.

Direct methods
Direct slots
Slot: values
Package

common-lisp.

Initform

(quote nil)

Initargs

:values

Readers

match-error-values.

Writers

This slot is read-only.

Slot: patterns
Initform

(quote nil)

Initargs

:patterns

Readers

match-error-patterns.

Writers

This slot is read-only.


6.1.6 Structures

Structure: and-pattern
Package

optima.core.

Source

pattern.lisp.

Direct superclasses

complex-pattern.

Direct methods

unparse-pattern.

Structure: assoc-pattern
Package

optima.core.

Source

pattern.lisp.

Direct superclasses

constructor-pattern.

Direct methods
Direct slots
Slot: item
Package

optima.

Readers

assoc-pattern-item.

Writers

(setf assoc-pattern-item).

Slot: key
Package

optima.

Readers

assoc-pattern-key.

Writers

(setf assoc-pattern-key).

Slot: test
Package

optima.

Readers

assoc-pattern-test.

Writers

(setf assoc-pattern-test).

Structure: class-pattern
Package

optima.core.

Source

pattern.lisp.

Direct superclasses

constructor-pattern.

Direct methods
Direct slots
Slot: class-name
Package

common-lisp.

Readers

class-pattern-class-name.

Writers

(setf class-pattern-class-name).

Slot: slot-names
Package

optima.

Readers

class-pattern-slot-names.

Writers

(setf class-pattern-slot-names).

Structure: complex-pattern
Package

optima.core.

Source

pattern.lisp.

Direct superclasses

pattern.

Direct subclasses
Direct slots
Slot: subpatterns
Readers

complex-pattern-subpatterns.

Writers

(setf complex-pattern-subpatterns).

Structure: cons-pattern
Package

optima.core.

Source

pattern.lisp.

Direct superclasses

constructor-pattern.

Direct methods
Structure: constant-pattern
Package

optima.core.

Source

pattern.lisp.

Direct superclasses

pattern.

Direct methods

unparse-pattern.

Direct slots
Slot: value
Package

optima.

Readers

constant-pattern-value.

Writers

(setf constant-pattern-value).

Structure: constructor-pattern
Package

optima.core.

Source

pattern.lisp.

Direct superclasses

complex-pattern.

Direct subclasses
Structure: destructor
Package

optima.core.

Source

pattern.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: bindings
Package

optima.

Readers

destructor-bindings.

Writers

(setf destructor-bindings).

Slot: predicate-form
Package

optima.

Readers

destructor-predicate-form.

Writers

(setf destructor-predicate-form).

Slot: accessor-forms
Package

optima.

Readers

destructor-accessor-forms.

Writers

(setf destructor-accessor-forms).

Structure: guard-pattern
Package

optima.core.

Source

pattern.lisp.

Direct superclasses

complex-pattern.

Direct methods

unparse-pattern.

Direct slots
Slot: test-form
Package

optima.

Readers

guard-pattern-test-form.

Writers

(setf guard-pattern-test-form).

Structure: not-pattern
Package

optima.core.

Source

pattern.lisp.

Direct superclasses

complex-pattern.

Direct methods

unparse-pattern.

Structure: or-pattern
Package

optima.core.

Source

pattern.lisp.

Direct superclasses

complex-pattern.

Direct methods

unparse-pattern.

Structure: place-pattern
Package

optima.core.

Source

pattern.lisp.

Direct superclasses

pattern.

Direct methods

unparse-pattern.

Direct slots
Slot: name
Package

optima.

Readers

place-pattern-name.

Writers

(setf place-pattern-name).

Structure: property-pattern
Package

optima.core.

Source

pattern.lisp.

Direct superclasses

constructor-pattern.

Direct methods
Direct slots
Slot: item
Package

optima.

Readers

property-pattern-item.

Writers

(setf property-pattern-item).

Structure: simple-vector-pattern
Package

optima.core.

Source

pattern.lisp.

Direct superclasses

constructor-pattern.

Direct methods
Structure: structure-pattern
Package

optima.core.

Source

pattern.lisp.

Direct superclasses

constructor-pattern.

Direct methods
Direct slots
Slot: conc-name
Package

optima.

Readers

structure-pattern-conc-name.

Writers

(setf structure-pattern-conc-name).

Slot: slot-names
Package

optima.

Readers

structure-pattern-slot-names.

Writers

(setf structure-pattern-slot-names).

Structure: variable-pattern
Package

optima.core.

Source

pattern.lisp.

Direct superclasses

pattern.

Direct methods

unparse-pattern.

Direct slots
Slot: name
Package

optima.

Readers

variable-pattern-name.

Writers

(setf variable-pattern-name).

Structure: vector-pattern
Package

optima.core.

Source

pattern.lisp.

Direct superclasses

constructor-pattern.

Direct methods

6.2 Internals


6.2.1 Special variables

Special Variable: *debug-compiler*
Package

optima.

Source

compiler.lisp.


6.2.2 Symbol macros

Symbol Macro: %fail
Package

optima.

Source

fail.lisp.


6.2.3 Macros

Macro: %if (test then else)

Similar to IF except %IF also allows to call (FAIL) in THEN branch to jump to ELSE branch.

Package

optima.

Source

fail.lisp.

Macro: %match (vars clauses else)

Compiler cushion macro. This is useful for seeing and debugging the process of pattern matching compiler.

Package

optima.

Source

compiler.lisp.

Macro: %or (&rest forms)

Causes the latest pattern matching to fail. After this failure, matching continues at the next pattern.

Package

optima.

Source

fail.lisp.

Macro: cmatch* (args &body clauses)
Package

optima.

Source

match.lisp.

Macro: ematch* (args &body clauses)
Package

optima.

Source

match.lisp.

Macro: match* (args &body clauses)
Package

optima.

Source

match.lisp.

Macro: once-only* (symbol &body body)
Package

optima.

Source

util.lisp.


6.2.4 Ordinary functions

Function: %compile-match (vars clauses else)
Package

optima.

Source

compiler.lisp.

Function: %make-class-pattern (&key subpatterns class-name slot-names)
Package

optima.

Source

pattern.lisp.

Function: %make-structure-pattern (&key subpatterns conc-name slot-names)
Package

optima.

Source

pattern.lisp.

Function: %make-variable-pattern (name)
Package

optima.

Source

pattern.lisp.

Function: and-pattern-p (object)
Package

optima.

Source

pattern.lisp.

Function: assoc-pattern-p (object)
Package

optima.

Source

pattern.lisp.

Function: assoc-pattern-subpatterns (instance)
Package

optima.

Source

pattern.lisp.

Function: (setf assoc-pattern-subpatterns) (instance)
Package

optima.

Source

pattern.lisp.

Function: class-pattern-p (object)
Package

optima.

Source

pattern.lisp.

Function: compile-clause-body (body)
Package

optima.

Source

compiler.lisp.

Function: compile-match (vars clauses else)
Package

optima.

Source

compiler.lisp.

Function: compile-match-1 (form clauses else)
Package

optima.

Source

compiler.lisp.

Function: compile-match-constant-group (vars clauses else)
Package

optima.

Source

compiler.lisp.

Function: compile-match-constructor-group (vars clauses else)
Package

optima.

Source

compiler.lisp.

Function: compile-match-empty-group (clauses else)
Package

optima.

Source

compiler.lisp.

Function: compile-match-fail (form else)
Package

optima.

Source

compiler.lisp.

Function: compile-match-group (vars group else)
Package

optima.

Source

compiler.lisp.

Function: compile-match-groups (vars groups else)
Package

optima.

Source

compiler.lisp.

Function: compile-match-not-group (vars clauses else)
Package

optima.

Source

compiler.lisp.

Function: compile-match-or-group (vars clauses else)
Package

optima.

Source

compiler.lisp.

Function: compile-match-place-group (vars clauses else)
Package

optima.

Source

compiler.lisp.

Function: compile-match-variable-group (vars clauses else)
Package

optima.

Source

compiler.lisp.

Function: compile-multiple-value-match (values-form clauses else)
Package

optima.

Source

compiler.lisp.

Function: complex-pattern-p (object)
Package

optima.

Source

pattern.lisp.

Function: cons-pattern-p (object)
Package

optima.

Source

pattern.lisp.

Function: cons-pattern-subpatterns (instance)
Package

optima.

Source

pattern.lisp.

Function: (setf cons-pattern-subpatterns) (instance)
Package

optima.

Source

pattern.lisp.

Function: constant-pattern-p (object)
Package

optima.

Source

pattern.lisp.

Function: constructor-pattern-p (object)
Package

optima.

Source

pattern.lisp.

Function: copy-and-pattern (instance)
Package

optima.

Source

pattern.lisp.

Function: copy-assoc-pattern (instance)
Package

optima.

Source

pattern.lisp.

Function: copy-class-pattern (instance)
Package

optima.

Source

pattern.lisp.

Function: copy-complex-pattern (instance)
Package

optima.

Source

pattern.lisp.

Function: copy-cons-pattern (instance)
Package

optima.

Source

pattern.lisp.

Function: copy-constant-pattern (instance)
Package

optima.

Source

pattern.lisp.

Function: copy-constructor-pattern (instance)
Package

optima.

Source

pattern.lisp.

Function: copy-destructor (instance)
Package

optima.

Source

pattern.lisp.

Function: copy-guard-pattern (instance)
Package

optima.

Source

pattern.lisp.

Function: copy-not-pattern (instance)
Package

optima.

Source

pattern.lisp.

Function: copy-or-pattern (instance)
Package

optima.

Source

pattern.lisp.

Function: copy-pattern (instance)
Package

optima.

Source

pattern.lisp.

Function: copy-place-pattern (instance)
Package

optima.

Source

pattern.lisp.

Function: copy-property-pattern (instance)
Package

optima.

Source

pattern.lisp.

Function: copy-simple-vector-pattern (instance)
Package

optima.

Source

pattern.lisp.

Function: copy-structure-pattern (instance)
Package

optima.

Source

pattern.lisp.

Function: copy-variable-pattern (instance)
Package

optima.

Source

pattern.lisp.

Function: copy-vector-pattern (instance)
Package

optima.

Source

pattern.lisp.

Reader: destructor-bindings (instance)
Writer: (setf destructor-bindings) (instance)
Package

optima.

Source

pattern.lisp.

Target Slot

bindings.

Function: destructor-p (object)
Package

optima.

Source

pattern.lisp.

Reader: destructor-predicate-form (instance)
Writer: (setf destructor-predicate-form) (instance)
Package

optima.

Source

pattern.lisp.

Target Slot

predicate-form.

Function: group (list &key test key)
Package

optima.

Source

util.lisp.

Function: group-match-clauses (clauses)
Package

optima.

Source

compiler.lisp.

Function: guard-pattern-p (object)
Package

optima.

Source

pattern.lisp.

Function: guard-pattern-subpatterns (instance)
Package

optima.

Source

pattern.lisp.

Function: (setf guard-pattern-subpatterns) (instance)
Package

optima.

Source

pattern.lisp.

Function: lift-guard-patterns-1 (pattern)

Lifts GUARD patterns in PATTERN so that the guards can see any variables in PATTERN. The transform looks like:

(list x (guard y (equal x y)))
=> (guard (list x y) (equal x y))

Multiple guards will be connected with conjunction in order of occurence like:

(list (guard x (consp x)) (guard y (eq y (car x)))) => (guard (list x (guard y (eq y (car x)))) (consp x)) => (guard (guard (list x y) (eq y (car x))) (consp x)) => (guard (list x y) (and (consp x) (eq y (car x))))

Package

optima.

Source

pattern.lisp.

Function: lift-guard-patterns-2 (pattern)

Lifts OR patterns that include guards like:

(list 3 (or 1 (guard x (evenp x))))
=> (or (list 3 1) (list 3 (guard x (evenp x)))) => (or (list 3 1) (guard (list 3 x) (evenp x)))

Package

optima.

Source

pattern.lisp.

Function: make-complex-pattern (&key subpatterns)
Package

optima.

Source

pattern.lisp.

Function: make-constructor-pattern (&key subpatterns)
Package

optima.

Source

pattern.lisp.

Function: make-pattern (&key)
Package

optima.

Source

pattern.lisp.

Function: not-pattern-p (object)
Package

optima.

Source

pattern.lisp.

Function: not-pattern-subpatterns (instance)
Package

optima.

Source

pattern.lisp.

Function: (setf not-pattern-subpatterns) (instance)
Package

optima.

Source

pattern.lisp.

Function: or-pattern-p (object)
Package

optima.

Source

pattern.lisp.

Function: parse-class-pattern (class-name &rest slot-specs)
Package

optima.

Source

pattern.lisp.

Function: parse-structure-pattern (conc-name &rest slot-specs)
Package

optima.

Source

pattern.lisp.

Function: pattern-p (object)
Package

optima.

Source

pattern.lisp.

Function: place-pattern-p (object)
Package

optima.

Source

pattern.lisp.

Function: preprocess-match-clause (clause)
Package

optima.

Source

compiler.lisp.

Function: preprocess-match-clauses (vars clauses)
Package

optima.

Source

compiler.lisp.

Function: property-pattern-p (object)
Package

optima.

Source

pattern.lisp.

Function: property-pattern-subpatterns (instance)
Package

optima.

Source

pattern.lisp.

Function: (setf property-pattern-subpatterns) (instance)
Package

optima.

Source

pattern.lisp.

Function: self-evaluating-object-p (object)
Package

optima.

Source

util.lisp.

Function: set-equal (set1 set2)
Package

optima.

Source

util.lisp.

Function: simple-vector-pattern-p (object)
Package

optima.

Source

pattern.lisp.

Function: span (list &key test key)
Package

optima.

Source

util.lisp.

Function: structure-pattern-p (object)
Package

optima.

Source

pattern.lisp.

Function: variable-pattern-p (object)
Package

optima.

Source

pattern.lisp.

Function: vector-pattern-p (object)
Package

optima.

Source

pattern.lisp.


6.2.5 Structures

Structure: pattern
Package

optima.

Source

pattern.lisp.

Direct superclasses

structure-object.

Direct subclasses
Direct methods

print-object.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (  
A   C   D   E   F   G   I   L   M   N   O   P   S   U   V   W  
Index Entry  Section

%
%assoc: Public ordinary functions
%compile-match: Private ordinary functions
%equal: Public ordinary functions
%equals: Public macros
%get-property: Public ordinary functions
%if: Private macros
%make-class-pattern: Private ordinary functions
%make-structure-pattern: Private ordinary functions
%make-variable-pattern: Private ordinary functions
%match: Private macros
%or: Private macros
%svref: Public ordinary functions

(
(setf and-pattern-subpatterns): Public ordinary functions
(setf assoc-pattern-item): Public ordinary functions
(setf assoc-pattern-key): Public ordinary functions
(setf assoc-pattern-subpatterns): Private ordinary functions
(setf assoc-pattern-test): Public ordinary functions
(setf class-pattern-class-name): Public ordinary functions
(setf class-pattern-slot-names): Public ordinary functions
(setf class-pattern-subpatterns): Public ordinary functions
(setf complex-pattern-subpatterns): Public ordinary functions
(setf cons-pattern-subpatterns): Private ordinary functions
(setf constant-pattern-value): Public ordinary functions
(setf constructor-pattern-subpatterns): Public ordinary functions
(setf destructor-accessor-forms): Public ordinary functions
(setf destructor-bindings): Private ordinary functions
(setf destructor-predicate-form): Private ordinary functions
(setf guard-pattern-subpatterns): Private ordinary functions
(setf guard-pattern-test-form): Public ordinary functions
(setf not-pattern-subpatterns): Private ordinary functions
(setf or-pattern-subpatterns): Public ordinary functions
(setf pattern-expand-function): Public ordinary functions
(setf place-pattern-name): Public ordinary functions
(setf property-pattern-item): Public ordinary functions
(setf property-pattern-subpatterns): Private ordinary functions
(setf simple-vector-pattern-subpatterns): Public ordinary functions
(setf structure-pattern-conc-name): Public ordinary functions
(setf structure-pattern-slot-names): Public ordinary functions
(setf structure-pattern-subpatterns): Public ordinary functions
(setf variable-pattern-name): Public ordinary functions
(setf vector-pattern-subpatterns): Public ordinary functions

A
and-pattern-p: Private ordinary functions
and-pattern-subpatterns: Public ordinary functions
assoc-pattern-item: Public ordinary functions
assoc-pattern-key: Public ordinary functions
assoc-pattern-p: Private ordinary functions
assoc-pattern-subpatterns: Private ordinary functions
assoc-pattern-test: Public ordinary functions
assoc-pattern-value-pattern: Public ordinary functions

C
check-patterns: Public ordinary functions
class-pattern-class-name: Public ordinary functions
class-pattern-p: Private ordinary functions
class-pattern-slot-names: Public ordinary functions
class-pattern-subpatterns: Public ordinary functions
cmatch: Public macros
cmatch*: Private macros
compile-clause-body: Private ordinary functions
compile-match: Private ordinary functions
compile-match-1: Private ordinary functions
compile-match-constant-group: Private ordinary functions
compile-match-constructor-group: Private ordinary functions
compile-match-empty-group: Private ordinary functions
compile-match-fail: Private ordinary functions
compile-match-group: Private ordinary functions
compile-match-groups: Private ordinary functions
compile-match-not-group: Private ordinary functions
compile-match-or-group: Private ordinary functions
compile-match-place-group: Private ordinary functions
compile-match-variable-group: Private ordinary functions
compile-multiple-value-match: Private ordinary functions
complex-pattern-p: Private ordinary functions
complex-pattern-subpatterns: Public ordinary functions
cons-pattern-car-pattern: Public ordinary functions
cons-pattern-cdr-pattern: Public ordinary functions
cons-pattern-p: Private ordinary functions
cons-pattern-subpatterns: Private ordinary functions
constant-pattern-p: Private ordinary functions
constant-pattern-value: Public ordinary functions
constructor-pattern-arity: Public ordinary functions
constructor-pattern-destructor-sharable-p: Public generic functions
constructor-pattern-destructor-sharable-p: Public generic functions
constructor-pattern-destructor-sharable-p: Public generic functions
constructor-pattern-destructor-sharable-p: Public generic functions
constructor-pattern-destructor-sharable-p: Public generic functions
constructor-pattern-destructor-sharable-p: Public generic functions
constructor-pattern-destructor-sharable-p: Public generic functions
constructor-pattern-destructor-sharable-p: Public generic functions
constructor-pattern-make-destructor: Public generic functions
constructor-pattern-make-destructor: Public generic functions
constructor-pattern-make-destructor: Public generic functions
constructor-pattern-make-destructor: Public generic functions
constructor-pattern-make-destructor: Public generic functions
constructor-pattern-make-destructor: Public generic functions
constructor-pattern-make-destructor: Public generic functions
constructor-pattern-make-destructor: Public generic functions
constructor-pattern-p: Private ordinary functions
constructor-pattern-subpatterns: Public ordinary functions
copy-and-pattern: Private ordinary functions
copy-assoc-pattern: Private ordinary functions
copy-class-pattern: Private ordinary functions
copy-complex-pattern: Private ordinary functions
copy-cons-pattern: Private ordinary functions
copy-constant-pattern: Private ordinary functions
copy-constructor-pattern: Private ordinary functions
copy-destructor: Private ordinary functions
copy-guard-pattern: Private ordinary functions
copy-not-pattern: Private ordinary functions
copy-or-pattern: Private ordinary functions
copy-pattern: Private ordinary functions
copy-place-pattern: Private ordinary functions
copy-property-pattern: Private ordinary functions
copy-simple-vector-pattern: Private ordinary functions
copy-structure-pattern: Private ordinary functions
copy-variable-pattern: Private ordinary functions
copy-vector-pattern: Private ordinary functions

D
defpattern: Public macros
destructor-accessor-forms: Public ordinary functions
destructor-bindings: Private ordinary functions
destructor-p: Private ordinary functions
destructor-predicate-form: Private ordinary functions

E
ematch: Public macros
ematch*: Private macros

F
fail: Public macros
Function, %assoc: Public ordinary functions
Function, %compile-match: Private ordinary functions
Function, %equal: Public ordinary functions
Function, %get-property: Public ordinary functions
Function, %make-class-pattern: Private ordinary functions
Function, %make-structure-pattern: Private ordinary functions
Function, %make-variable-pattern: Private ordinary functions
Function, %svref: Public ordinary functions
Function, (setf and-pattern-subpatterns): Public ordinary functions
Function, (setf assoc-pattern-item): Public ordinary functions
Function, (setf assoc-pattern-key): Public ordinary functions
Function, (setf assoc-pattern-subpatterns): Private ordinary functions
Function, (setf assoc-pattern-test): Public ordinary functions
Function, (setf class-pattern-class-name): Public ordinary functions
Function, (setf class-pattern-slot-names): Public ordinary functions
Function, (setf class-pattern-subpatterns): Public ordinary functions
Function, (setf complex-pattern-subpatterns): Public ordinary functions
Function, (setf cons-pattern-subpatterns): Private ordinary functions
Function, (setf constant-pattern-value): Public ordinary functions
Function, (setf constructor-pattern-subpatterns): Public ordinary functions
Function, (setf destructor-accessor-forms): Public ordinary functions
Function, (setf destructor-bindings): Private ordinary functions
Function, (setf destructor-predicate-form): Private ordinary functions
Function, (setf guard-pattern-subpatterns): Private ordinary functions
Function, (setf guard-pattern-test-form): Public ordinary functions
Function, (setf not-pattern-subpatterns): Private ordinary functions
Function, (setf or-pattern-subpatterns): Public ordinary functions
Function, (setf pattern-expand-function): Public ordinary functions
Function, (setf place-pattern-name): Public ordinary functions
Function, (setf property-pattern-item): Public ordinary functions
Function, (setf property-pattern-subpatterns): Private ordinary functions
Function, (setf simple-vector-pattern-subpatterns): Public ordinary functions
Function, (setf structure-pattern-conc-name): Public ordinary functions
Function, (setf structure-pattern-slot-names): Public ordinary functions
Function, (setf structure-pattern-subpatterns): Public ordinary functions
Function, (setf variable-pattern-name): Public ordinary functions
Function, (setf vector-pattern-subpatterns): Public ordinary functions
Function, and-pattern-p: Private ordinary functions
Function, and-pattern-subpatterns: Public ordinary functions
Function, assoc-pattern-item: Public ordinary functions
Function, assoc-pattern-key: Public ordinary functions
Function, assoc-pattern-p: Private ordinary functions
Function, assoc-pattern-subpatterns: Private ordinary functions
Function, assoc-pattern-test: Public ordinary functions
Function, assoc-pattern-value-pattern: Public ordinary functions
Function, check-patterns: Public ordinary functions
Function, class-pattern-class-name: Public ordinary functions
Function, class-pattern-p: Private ordinary functions
Function, class-pattern-slot-names: Public ordinary functions
Function, class-pattern-subpatterns: Public ordinary functions
Function, compile-clause-body: Private ordinary functions
Function, compile-match: Private ordinary functions
Function, compile-match-1: Private ordinary functions
Function, compile-match-constant-group: Private ordinary functions
Function, compile-match-constructor-group: Private ordinary functions
Function, compile-match-empty-group: Private ordinary functions
Function, compile-match-fail: Private ordinary functions
Function, compile-match-group: Private ordinary functions
Function, compile-match-groups: Private ordinary functions
Function, compile-match-not-group: Private ordinary functions
Function, compile-match-or-group: Private ordinary functions
Function, compile-match-place-group: Private ordinary functions
Function, compile-match-variable-group: Private ordinary functions
Function, compile-multiple-value-match: Private ordinary functions
Function, complex-pattern-p: Private ordinary functions
Function, complex-pattern-subpatterns: Public ordinary functions
Function, cons-pattern-car-pattern: Public ordinary functions
Function, cons-pattern-cdr-pattern: Public ordinary functions
Function, cons-pattern-p: Private ordinary functions
Function, cons-pattern-subpatterns: Private ordinary functions
Function, constant-pattern-p: Private ordinary functions
Function, constant-pattern-value: Public ordinary functions
Function, constructor-pattern-arity: Public ordinary functions
Function, constructor-pattern-p: Private ordinary functions
Function, constructor-pattern-subpatterns: Public ordinary functions
Function, copy-and-pattern: Private ordinary functions
Function, copy-assoc-pattern: Private ordinary functions
Function, copy-class-pattern: Private ordinary functions
Function, copy-complex-pattern: Private ordinary functions
Function, copy-cons-pattern: Private ordinary functions
Function, copy-constant-pattern: Private ordinary functions
Function, copy-constructor-pattern: Private ordinary functions
Function, copy-destructor: Private ordinary functions
Function, copy-guard-pattern: Private ordinary functions
Function, copy-not-pattern: Private ordinary functions
Function, copy-or-pattern: Private ordinary functions
Function, copy-pattern: Private ordinary functions
Function, copy-place-pattern: Private ordinary functions
Function, copy-property-pattern: Private ordinary functions
Function, copy-simple-vector-pattern: Private ordinary functions
Function, copy-structure-pattern: Private ordinary functions
Function, copy-variable-pattern: Private ordinary functions
Function, copy-vector-pattern: Private ordinary functions
Function, destructor-accessor-forms: Public ordinary functions
Function, destructor-bindings: Private ordinary functions
Function, destructor-p: Private ordinary functions
Function, destructor-predicate-form: Private ordinary functions
Function, group: Private ordinary functions
Function, group-match-clauses: Private ordinary functions
Function, guard-pattern-p: Private ordinary functions
Function, guard-pattern-subpattern: Public ordinary functions
Function, guard-pattern-subpatterns: Private ordinary functions
Function, guard-pattern-test-form: Public ordinary functions
Function, lift-guard-patterns: Public ordinary functions
Function, lift-guard-patterns-1: Private ordinary functions
Function, lift-guard-patterns-2: Private ordinary functions
Function, make-and-pattern: Public ordinary functions
Function, make-assoc-pattern: Public ordinary functions
Function, make-class-pattern: Public ordinary functions
Function, make-complex-pattern: Private ordinary functions
Function, make-cons-pattern: Public ordinary functions
Function, make-constant-pattern: Public ordinary functions
Function, make-constructor-pattern: Private ordinary functions
Function, make-destructor: Public ordinary functions
Function, make-guard-pattern: Public ordinary functions
Function, make-not-pattern: Public ordinary functions
Function, make-or-pattern: Public ordinary functions
Function, make-pattern: Private ordinary functions
Function, make-place-pattern: Public ordinary functions
Function, make-property-pattern: Public ordinary functions
Function, make-simple-vector-pattern: Public ordinary functions
Function, make-structure-pattern: Public ordinary functions
Function, make-variable-pattern: Public ordinary functions
Function, make-vector-pattern: Public ordinary functions
Function, not-pattern-p: Private ordinary functions
Function, not-pattern-subpattern: Public ordinary functions
Function, not-pattern-subpatterns: Private ordinary functions
Function, or-pattern-p: Private ordinary functions
Function, or-pattern-subpatterns: Public ordinary functions
Function, parse-class-pattern: Private ordinary functions
Function, parse-pattern: Public ordinary functions
Function, parse-structure-pattern: Private ordinary functions
Function, pattern-expand: Public ordinary functions
Function, pattern-expand-1: Public ordinary functions
Function, pattern-expand-all: Public ordinary functions
Function, pattern-expand-function: Public ordinary functions
Function, pattern-p: Private ordinary functions
Function, pattern-variables: Public ordinary functions
Function, place-pattern-included-p: Public ordinary functions
Function, place-pattern-name: Public ordinary functions
Function, place-pattern-p: Private ordinary functions
Function, preprocess-match-clause: Private ordinary functions
Function, preprocess-match-clauses: Private ordinary functions
Function, property-pattern-item: Public ordinary functions
Function, property-pattern-p: Private ordinary functions
Function, property-pattern-subpatterns: Private ordinary functions
Function, property-pattern-value-pattern: Public ordinary functions
Function, self-evaluating-object-p: Private ordinary functions
Function, set-equal: Private ordinary functions
Function, simple-vector-pattern-p: Private ordinary functions
Function, simple-vector-pattern-subpatterns: Public ordinary functions
Function, span: Private ordinary functions
Function, structure-pattern-conc-name: Public ordinary functions
Function, structure-pattern-p: Private ordinary functions
Function, structure-pattern-slot-names: Public ordinary functions
Function, structure-pattern-subpatterns: Public ordinary functions
Function, variable-pattern-name: Public ordinary functions
Function, variable-pattern-p: Private ordinary functions
Function, vector-pattern-p: Private ordinary functions
Function, vector-pattern-subpatterns: Public ordinary functions

G
Generic Function, constructor-pattern-destructor-sharable-p: Public generic functions
Generic Function, constructor-pattern-make-destructor: Public generic functions
Generic Function, match-error-patterns: Public generic functions
Generic Function, match-error-values: Public generic functions
Generic Function, parse-constructor-pattern: Public generic functions
Generic Function, unparse-pattern: Public generic functions
group: Private ordinary functions
group-match-clauses: Private ordinary functions
guard-pattern-p: Private ordinary functions
guard-pattern-subpattern: Public ordinary functions
guard-pattern-subpatterns: Private ordinary functions
guard-pattern-test-form: Public ordinary functions

I
if-match: Public macros

L
lambda-cmatch: Public macros
lambda-cmatch1: Public macros
lambda-ematch: Public macros
lambda-ematch1: Public macros
lambda-match: Public macros
lambda-match1: Public macros
let-match: Public macros
let-match*: Public macros
let-match1: Public macros
lift-guard-patterns: Public ordinary functions
lift-guard-patterns-1: Private ordinary functions
lift-guard-patterns-2: Private ordinary functions

M
Macro, %equals: Public macros
Macro, %if: Private macros
Macro, %match: Private macros
Macro, %or: Private macros
Macro, cmatch: Public macros
Macro, cmatch*: Private macros
Macro, defpattern: Public macros
Macro, ematch: Public macros
Macro, ematch*: Private macros
Macro, fail: Public macros
Macro, if-match: Public macros
Macro, lambda-cmatch: Public macros
Macro, lambda-cmatch1: Public macros
Macro, lambda-ematch: Public macros
Macro, lambda-ematch1: Public macros
Macro, lambda-match: Public macros
Macro, lambda-match1: Public macros
Macro, let-match: Public macros
Macro, let-match*: Public macros
Macro, let-match1: Public macros
Macro, match: Public macros
Macro, match*: Private macros
Macro, multiple-value-cmatch: Public macros
Macro, multiple-value-ematch: Public macros
Macro, multiple-value-match: Public macros
Macro, once-only*: Private macros
Macro, unless-match: Public macros
Macro, when-match: Public macros
make-and-pattern: Public ordinary functions
make-assoc-pattern: Public ordinary functions
make-class-pattern: Public ordinary functions
make-complex-pattern: Private ordinary functions
make-cons-pattern: Public ordinary functions
make-constant-pattern: Public ordinary functions
make-constructor-pattern: Private ordinary functions
make-destructor: Public ordinary functions
make-guard-pattern: Public ordinary functions
make-not-pattern: Public ordinary functions
make-or-pattern: Public ordinary functions
make-pattern: Private ordinary functions
make-place-pattern: Public ordinary functions
make-property-pattern: Public ordinary functions
make-simple-vector-pattern: Public ordinary functions
make-structure-pattern: Public ordinary functions
make-variable-pattern: Public ordinary functions
make-vector-pattern: Public ordinary functions
match: Public macros
match*: Private macros
match-error-patterns: Public generic functions
match-error-patterns: Public generic functions
match-error-values: Public generic functions
match-error-values: Public generic functions
Method, constructor-pattern-destructor-sharable-p: Public generic functions
Method, constructor-pattern-destructor-sharable-p: Public generic functions
Method, constructor-pattern-destructor-sharable-p: Public generic functions
Method, constructor-pattern-destructor-sharable-p: Public generic functions
Method, constructor-pattern-destructor-sharable-p: Public generic functions
Method, constructor-pattern-destructor-sharable-p: Public generic functions
Method, constructor-pattern-destructor-sharable-p: Public generic functions
Method, constructor-pattern-make-destructor: Public generic functions
Method, constructor-pattern-make-destructor: Public generic functions
Method, constructor-pattern-make-destructor: Public generic functions
Method, constructor-pattern-make-destructor: Public generic functions
Method, constructor-pattern-make-destructor: Public generic functions
Method, constructor-pattern-make-destructor: Public generic functions
Method, constructor-pattern-make-destructor: Public generic functions
Method, match-error-patterns: Public generic functions
Method, match-error-values: Public generic functions
Method, parse-constructor-pattern: Public generic functions
Method, parse-constructor-pattern: Public generic functions
Method, parse-constructor-pattern: Public generic functions
Method, parse-constructor-pattern: Public generic functions
Method, parse-constructor-pattern: Public generic functions
Method, parse-constructor-pattern: Public generic functions
Method, parse-constructor-pattern: Public generic functions
Method, parse-constructor-pattern: Public generic functions
Method, print-object: Public standalone methods
Method, unparse-pattern: Public generic functions
Method, unparse-pattern: Public generic functions
Method, unparse-pattern: Public generic functions
Method, unparse-pattern: Public generic functions
Method, unparse-pattern: Public generic functions
Method, unparse-pattern: Public generic functions
Method, unparse-pattern: Public generic functions
Method, unparse-pattern: Public generic functions
Method, unparse-pattern: Public generic functions
Method, unparse-pattern: Public generic functions
Method, unparse-pattern: Public generic functions
Method, unparse-pattern: Public generic functions
Method, unparse-pattern: Public generic functions
Method, unparse-pattern: Public generic functions
multiple-value-cmatch: Public macros
multiple-value-ematch: Public macros
multiple-value-match: Public macros

N
not-pattern-p: Private ordinary functions
not-pattern-subpattern: Public ordinary functions
not-pattern-subpatterns: Private ordinary functions

O
once-only*: Private macros
or-pattern-p: Private ordinary functions
or-pattern-subpatterns: Public ordinary functions

P
parse-class-pattern: Private ordinary functions
parse-constructor-pattern: Public generic functions
parse-constructor-pattern: Public generic functions
parse-constructor-pattern: Public generic functions
parse-constructor-pattern: Public generic functions
parse-constructor-pattern: Public generic functions
parse-constructor-pattern: Public generic functions
parse-constructor-pattern: Public generic functions
parse-constructor-pattern: Public generic functions
parse-constructor-pattern: Public generic functions
parse-pattern: Public ordinary functions
parse-structure-pattern: Private ordinary functions
pattern-expand: Public ordinary functions
pattern-expand-1: Public ordinary functions
pattern-expand-all: Public ordinary functions
pattern-expand-function: Public ordinary functions
pattern-p: Private ordinary functions
pattern-variables: Public ordinary functions
place-pattern-included-p: Public ordinary functions
place-pattern-name: Public ordinary functions
place-pattern-p: Private ordinary functions
preprocess-match-clause: Private ordinary functions
preprocess-match-clauses: Private ordinary functions
print-object: Public standalone methods
property-pattern-item: Public ordinary functions
property-pattern-p: Private ordinary functions
property-pattern-subpatterns: Private ordinary functions
property-pattern-value-pattern: Public ordinary functions

S
self-evaluating-object-p: Private ordinary functions
set-equal: Private ordinary functions
simple-vector-pattern-p: Private ordinary functions
simple-vector-pattern-subpatterns: Public ordinary functions
span: Private ordinary functions
structure-pattern-conc-name: Public ordinary functions
structure-pattern-p: Private ordinary functions
structure-pattern-slot-names: Public ordinary functions
structure-pattern-subpatterns: Public ordinary functions

U
unless-match: Public macros
unparse-pattern: Public generic functions
unparse-pattern: Public generic functions
unparse-pattern: Public generic functions
unparse-pattern: Public generic functions
unparse-pattern: Public generic functions
unparse-pattern: Public generic functions
unparse-pattern: Public generic functions
unparse-pattern: Public generic functions
unparse-pattern: Public generic functions
unparse-pattern: Public generic functions
unparse-pattern: Public generic functions
unparse-pattern: Public generic functions
unparse-pattern: Public generic functions
unparse-pattern: Public generic functions
unparse-pattern: Public generic functions

V
variable-pattern-name: Public ordinary functions
variable-pattern-p: Private ordinary functions
vector-pattern-p: Private ordinary functions
vector-pattern-subpatterns: Public ordinary functions

W
when-match: Public macros


A.3 Variables

Jump to:   %   *  
A   B   C   I   K   N   P   S   T   V  
Index Entry  Section

%
%fail: Private symbol macros

*
*debug-compiler*: Private special variables

A
accessor-forms: Public structures

B
bindings: Public structures

C
class-name: Public structures
conc-name: Public structures

I
item: Public structures
item: Public structures

K
key: Public structures

N
name: Public structures
name: Public structures

P
patterns: Public conditions
predicate-form: Public structures

S
Slot, accessor-forms: Public structures
Slot, bindings: Public structures
Slot, class-name: Public structures
Slot, conc-name: Public structures
Slot, item: Public structures
Slot, item: Public structures
Slot, key: Public structures
Slot, name: Public structures
Slot, name: Public structures
Slot, patterns: Public conditions
Slot, predicate-form: Public structures
Slot, slot-names: Public structures
Slot, slot-names: Public structures
Slot, subpatterns: Public structures
Slot, test: Public structures
Slot, test-form: Public structures
Slot, value: Public structures
Slot, values: Public conditions
slot-names: Public structures
slot-names: Public structures
Special Variable, *debug-compiler*: Private special variables
subpatterns: Public structures
Symbol Macro, %fail: Private symbol macros

T
test: Public structures
test-form: Public structures

V
value: Public structures
values: Public conditions


A.4 Data types

Jump to:   A   C   D   E   F   G   M   N   O   P   R   S   U   V  
Index Entry  Section

A
and-pattern: Public structures
assoc-pattern: Public structures

C
class-pattern: Public structures
compiler.lisp: The optima/src/compiler․lisp file
complex-pattern: Public structures
Condition, match-error: Public conditions
cons-pattern: Public structures
constant-pattern: Public structures
constructor-pattern: Public structures

D
destructor: Public structures

E
extra.lisp: The optima/src/extra․lisp file

F
fail.lisp: The optima/src/fail․lisp file
File, compiler.lisp: The optima/src/compiler․lisp file
File, extra.lisp: The optima/src/extra․lisp file
File, fail.lisp: The optima/src/fail․lisp file
File, match.lisp: The optima/src/match․lisp file
File, optima.asd: The optima/optima․asd file
File, packages.lisp: The optima/src/packages․lisp file
File, pattern.lisp: The optima/src/pattern․lisp file
File, runtime.lisp: The optima/src/runtime․lisp file
File, util.lisp: The optima/src/util․lisp file

G
guard-pattern: Public structures

M
match-error: Public conditions
match.lisp: The optima/src/match․lisp file
Module, src: The optima/src module

N
not-pattern: Public structures

O
optima: The optima system
optima: The optima package
optima.asd: The optima/optima․asd file
optima.core: The optima․core package
optima.extra: The optima․extra package
or-pattern: Public structures

P
Package, optima: The optima package
Package, optima.core: The optima․core package
Package, optima.extra: The optima․extra package
packages.lisp: The optima/src/packages․lisp file
pattern: Private structures
pattern.lisp: The optima/src/pattern․lisp file
place-pattern: Public structures
property-pattern: Public structures

R
runtime.lisp: The optima/src/runtime․lisp file

S
simple-vector-pattern: Public structures
src: The optima/src module
Structure, and-pattern: Public structures
Structure, assoc-pattern: Public structures
Structure, class-pattern: Public structures
Structure, complex-pattern: Public structures
Structure, cons-pattern: Public structures
Structure, constant-pattern: Public structures
Structure, constructor-pattern: Public structures
Structure, destructor: Public structures
Structure, guard-pattern: Public structures
Structure, not-pattern: Public structures
Structure, or-pattern: Public structures
Structure, pattern: Private structures
Structure, place-pattern: Public structures
Structure, property-pattern: Public structures
Structure, simple-vector-pattern: Public structures
Structure, structure-pattern: Public structures
Structure, variable-pattern: Public structures
Structure, vector-pattern: Public structures
structure-pattern: Public structures
System, optima: The optima system

U
util.lisp: The optima/src/util․lisp file

V
variable-pattern: Public structures
vector-pattern: Public structures