The architecture.builder-protocol Reference Manual

This is the architecture.builder-protocol Reference Manual, version 0.11.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 14:35:50 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 architecture.builder-protocol

Protocol and framework for building parse results and other object graphs.

Maintainer

Jan Moringen <>

Author

Jan Moringen <>

License

LGPLv3

Version

0.11.0

Dependency

alexandria (system).

Source

architecture.builder-protocol.asd.

Child Component

src (module).


3 Modules

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


3.1 architecture.builder-protocol/src

Source

architecture.builder-protocol.asd.

Parent Component

architecture.builder-protocol (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 architecture.builder-protocol/architecture.builder-protocol.asd

Source

architecture.builder-protocol.asd.

Parent Component

architecture.builder-protocol (system).

ASDF Systems

architecture.builder-protocol.


4.1.2 architecture.builder-protocol/src/package.lisp

Source

architecture.builder-protocol.asd.

Parent Component

src (module).

Packages

architecture.builder-protocol.


4.1.3 architecture.builder-protocol/src/util.lisp

Dependency

package.lisp (file).

Source

architecture.builder-protocol.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.4 architecture.builder-protocol/src/variables.lisp

Dependency

util.lisp (file).

Source

architecture.builder-protocol.asd.

Parent Component

src (module).

Public Interface

*builder* (special variable).


4.1.5 architecture.builder-protocol/src/protocol.lisp

Dependency

variables.lisp (file).

Source

architecture.builder-protocol.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.6 architecture.builder-protocol/src/macros.lisp

Dependency

protocol.lisp (file).

Source

architecture.builder-protocol.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.7 architecture.builder-protocol/src/mixins.lisp

Dependency

macros.lisp (file).

Source

architecture.builder-protocol.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.8 architecture.builder-protocol/src/list-builder.lisp

Dependency

mixins.lisp (file).

Source

architecture.builder-protocol.asd.

Parent Component

src (module).

Public Interface

4.1.9 architecture.builder-protocol/src/top-down-forcing-builder.lisp

Dependency

list-builder.lisp (file).

Source

architecture.builder-protocol.asd.

Parent Component

src (module).

Public Interface

5 Packages

Packages are listed by definition order.


5.1 architecture.builder-protocol

This package contains the build and "un-build" protocols.

The build protocol consists of two groups of generic functions

1. ‘prepare’, ‘finish’ and ‘wrap’
2. ‘make-node’, ‘finish-node’ and ‘relate’

and the special variable ‘*builder*’.

All of the above functions take an explicit builder argument which is usually the value of ‘*builder*’ .The convenience functions ‘prepare*’, ‘finish*’, ‘wrap*’, ‘make-node*’, ‘finish-node*’ and ‘relate*’ lack the builder argument and use the value of ‘*builder*’ automatically.

Further convenience functions ‘make+finish-node[*]’, ‘make+finish-node+relation[*]’ and macros ‘node[*]’ combine common idioms involving the above functions into a single function or macro respectively.

For construction of an object graph, a client binds ‘*builder*’ (for example via ‘with-builder’) to an object of the client’s choice for which methods on the above protocol generic functions exist and calls the object graph constructing
code (e.g. a parser). This way, the client can obtain different representations by supplying different builders and the object graph construction code does not have to know the concrete representation of the result it constructs.

This package also contains a builder for constructing list-based representations which are useful for debugging and unit
tests. This builder can be selected by binding ‘*builder*’ to the symbol ‘cl:list’.

Source

package.lisp.

Use List
  • alexandria.
  • common-lisp.
Public Interface
Internals

6 Definitions

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


6.1 Public Interface


6.1.1 Special variables

Special Variable: *builder*

Stores the builder object which should be used for constructing the result.

Package

architecture.builder-protocol.

Source

variables.lisp.


6.1.2 Macros

Macro: cardinality-case (cardinality &body clauses)

Execute the clause in CLAUSES which corresponds to the value of CARDINALITY.

CARDINALITY is evaluated and the resulting value is used to select a clause.

Elements of CLAUSES are of the form

(CARDINALITY-DESIGNATOR-OR-LIST &body BODY)

where CARDINALITY-DESIGNATOR-OR-LIST is either

1. One of the cardinality designators 1, ?, *, ‘:map’

A clause of this form matches if CARDINALITY evaluates to the specified cardinality designator or if CARDINALITY evaluates to (:map SOME-KEY) and CARDINALITY-DESIGNATOR-OR-LIST is ‘:map’.

2. A list of some of the cardinality designators mentioned above

A clause of this form matches if CARDINALITY evaluates to any of the cardinality designators mentioned in CARDINALITY-DESIGNATOR-OR-LIST or if CARDINALITY evaluates to (:map SOME-KEY) and ‘:map’ is an element of CARDINALITY-DESIGNATOR-OR-LIST.

3. An expression of the form (:map . KEY-VAR)

A clause of this form matches if the value of CARDINALITY is of the form (:map . SOME-KEY). During the evaluation of the BODY of the clause, KEY-VAR will be bound to SOME-KEY.

Package

architecture.builder-protocol.

Source

util.lisp.

Macro: cardinality-ecase (cardinality &body clauses)

Like ‘cardinality-case’ but signal a compile-time error if CLAUSES does not handle all cardinalities.

Package

architecture.builder-protocol.

Source

util.lisp.

Macro: node ((builder kind &rest initargs &key &allow-other-keys) &body relations)

Use BUILDER to create a KIND, INITARGS node, relate it via RELATIONS.

BUILDER, KIND and INITARGS are evaluated and passed to ‘make-node’.

RELATIONS is a list of relation specifications of the form accepted by ‘make+finish-node+relations’.

‘finish-node’ is called on the created node. The created node is returned.

Example:

(node (:operator :which ’+)
(* :operand (list left right)))

Package

architecture.builder-protocol.

Source

macros.lisp.

Macro: node* ((kind &rest initargs &key &allow-other-keys) &body relations)

Like ‘node’ but uses ‘*builder*’ instead of accepting a builder parameter.

Package

architecture.builder-protocol.

Source

macros.lisp.

Macro: with-builder (spec &body body)

Execute BODY with a builder binding according to SPEC.

SPEC is either

(BUILDER-VAR BUILDER-FORM)

During the evaluation of BODY, BUILDER-VAR is bound to the result of evaluating BUILDER-FORM.

(BUILDER-FORM)

Before the evaluation of BODY, BUILDER-FORM is evaluated, but the constructed builder is only accessible through the ‘*builder*’ special variable.

Note that during the evaluation of BODY the special variable ‘*builder*’ is usually bound to the builder constructed by BUILDER-FORM (depending on methods on ‘prepare’ and ‘wrap’).

Package

architecture.builder-protocol.

Source

macros.lisp.

Macro: with-unbuilder (spec &body body)

Execute BODY with a builder binding according to SPEC.

SPEC is either

(BUILDER-VAR BUILDER-FORM)

During the evaluation of BODY, BUILDER-VAR is bound to the result of evaluating BUILDER-FORM.

(BUILDER-FORM)

Before the evaluation of BODY, BUILDER-FORM is evaluated, but the constructed builder is only accessible through the ‘*builder*’ special variable.

Package

architecture.builder-protocol.

Source

macros.lisp.


6.1.3 Ordinary functions

Function: add-relations (builder node relations)

Use BUILDER to add relations according to RELATIONS to NODE.

RELATIONS is a list of relation specifications of the form

(CARDINALITY RELATION-NAME RIGHT &rest ARGS)

which are translated into ‘relate’ calls in which NODE is the "left" argument to ‘relate’. CARDINALITY has to be of type ‘relation-cardinality’ and is interpreted as follows:

? RIGHT is a single node or ‘nil’. If RIGHT is ‘nil’, ‘relate’ is not called.

1 RIGHT is a single node.

* RIGHT is a (possibly empty) sequence of nodes. ARGS must be of the form

:KEY₁ (VALUE₁₁ VALUE₁₂ …) :KEY₂ (VALUE₂₁ VALUE₂₂ …) …

. The ‘relate’ call for the k-th element of RIGHT will receive the keyword arguments
:KEY₁ VALUEₖ₁ :KEY₂ VALUEₖ₂ …. If the value list for a given key would be a repetition of a particular value VALUE, the circular list #1=(VALUE . #1#) may be used as a replacement for that value list.

(:map . KEY) RIGHT is a (possible empty) sequence of nodes that should be "zipped" with a sequence of keys (see below) to form a set of key-values pair and thus a map. The sequence of keys is the value of the property whose indicator is KEY in the ARGS plist. The two sequences must be of the same length. Elements at corresponding positions will be paired in a "zipping" operation as described above.

RELATION-NAME does not have to be unique across the elements of RELATIONS. This allows multiple "right" nodes to be related to NODE via a given RELATION-NAME with CARDINALITY * in multiple RELATIONS entries, potentially with different ARGS.

The modified NODE or a new node is returned.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Function: add-relations* (node relations)

Like ‘add-relations’ but uses ‘*builder*’ instead of accepting a builder parameter.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Function: call-with-builder (builder thunk)
Package

architecture.builder-protocol.

Source

macros.lisp.

Function: call-with-unbuilder (builder thunk)
Package

architecture.builder-protocol.

Source

macros.lisp.

Function: finish* (result)

Like ‘finish’ but uses ‘*builder*’ instead of accepting a builder parameter.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Function: finish-node* (kind node)

Like ‘finish-node’ but uses ‘*builder*’ instead of accepting a builder parameter.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Function: make+finish-node (builder kind &rest initargs &key &allow-other-keys)

Convenience function for constructing and immediately finishing a node.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Function: make+finish-node* (kind &rest initargs &key &allow-other-keys)

Like ‘make+finish-node’ but uses ‘*builder*’ instead of accepting a builder parameter.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Function: make+finish-node+relations (builder kind initargs relations)

Use BUILDER to create a KIND, INITARGS node, relate it via RELATIONS.

RELATIONS is processed as described for ‘add-relations’.

‘finish-node’ is called on the created node. The created node is returned.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Function: make+finish-node+relations* (kind initargs relations)

Like ‘make+finish-node+relations’ but uses ‘*builder*’ instead of accepting a builder parameter.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Function: make-node* (kind &rest initargs &key &allow-other-keys)

Like ‘make-node’ but uses ‘*builder*’ instead of accepting a builder parameter.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Function: node-initargs* (node)

Like ‘node-initargs’ but uses ‘*builder*’ instead of accepting a builder parameter.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Function: node-kind* (node)

Like ‘node-kind’ but uses ‘*builder*’ instead of accepting a builder parameter.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Function: node-relation* (relation node)

Like ‘node-relation’ but uses ‘*builder*’ instead of accepting a builder parameter.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Function: node-relations* (node)

Like ‘node-relations’ but uses ‘*builder*’ instead of accepting a builder parameter.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Function: normalize-relation (relation)

Return two values: 1) the relation kind of RELATION 2) the cardinality of RELATION.

RELATION can be of the form RELATION-KIND or (RELATION-KIND . CARDINALITY) where CARDINALITY is of type ‘relation-cardinality’.

Package

architecture.builder-protocol.

Source

util.lisp.

Function: peeking (peeking-function walk-function)
Package

architecture.builder-protocol.

Source

protocol.lisp.

Function: prepare* ()

Like ‘prepare’ but uses ‘*builder*’ instead of accepting a builder parameter.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Function: relate* (relation left right &rest args &key &allow-other-keys)

Like ‘relate’ but uses ‘*builder*’ instead of accepting a builder parameter.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Function: walk-nodes* (function root)

Like ‘walk-nodes’ but uses ‘*builder*’ instead of accepting a builder parameter.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Function: wrap* (thunk)

Like ‘wrap’ but uses ‘*builder*’ instead of accepting a builder parameter.

Package

architecture.builder-protocol.

Source

protocol.lisp.


6.1.4 Generic functions

Generic Function: builder-visit-function (builder)

Return a function to apply to the delayed nodes constructed by BUILDER.

The function is called with the root of the tree of ‘delayed-node’s.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Methods
Method: builder-visit-function ((builder top-down-forcing-builder))
Source

top-down-forcing-builder.lisp.

Generic Function: finish (builder values)

Finalize and return VALUES produced by BUILDER as multiple values.

VALUES is a list of objects that should be returned as multiple values and constitute the overall result of an object tree construction with BUILDER. The first element of VALUES which becomes the first return value is the constructed tree itself (which often coincides with the root node). Additional values are optional and their presence and meaning depend on BUILDER.

The default method just returns VALUES.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Methods
Method: finish ((builder order-forcing-mixin) (result cons))
Source

mixins.lisp.

Method: finish ((builder forwarding-mixin) result)
Source

mixins.lisp.

Method: finish (builder (result cons))
Generic Function: finish-node (builder kind node)

Use BUILDER to perform finalization for NODE.

Return the modified NODE or an appropriate newly created object.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Methods
Method: finish-node ((builder (eql list)) kind node)
Source

list-builder.lisp.

Method: finish-node ((builder forwarding-mixin) kind node)
Source

mixins.lisp.

Method: finish-node (builder kind node)
Generic Function: make-node (builder kind &rest initargs &key &allow-other-keys)

Use BUILDER to make a result tree node of kind KIND and return it.

As a convention, when supplied, the value of the :bounds keyword argument is of the form (START . END) and can be used to indicate the input range for which the tree is constructed.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Methods
Method: make-node ((builder (eql list)) kind &rest initargs &key)
Source

list-builder.lisp.

Method: make-node ((builder delaying-mixin) kind &rest initargs &key)
Source

mixins.lisp.

Method: make-node ((builder forwarding-mixin) kind &rest initargs &key &allow-other-keys)
Source

mixins.lisp.

Generic Function: node-initargs (builder node)

Return a plist of initargs for NODE w.r.t. BUILDER.

The returned list is EQUAL to the list of keyword arguments pass to the MAKE-NODE call that, using BUILDER, constructed NODE.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Methods
Method: node-initargs ((builder (eql list)) (node cons))
Source

list-builder.lisp.

Method: node-initargs ((builder forwarding-mixin) node)
Source

mixins.lisp.

Method: node-initargs (builder node)
Generic Function: node-kind (builder node)

Return the kind of NODE w.r.t. BUILDER.

The return value is EQ to the KIND argument used to create NODE with BUILDER.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Methods
Method: node-kind ((builder (eql list)) (node cons))
Source

list-builder.lisp.

Method: node-kind ((builder forwarding-mixin) node)
Source

mixins.lisp.

Generic Function: node-relation (builder relation node)

Return two values: 1) a single node or a sequence of nodes related to NODE via RELATION w.r.t. BUILDER 2) ‘nil’ or a same-length sequence of arguments of the relations.

RELATION must be of one of the forms

RELATION-NAME
(RELATION-NAME . CARDINALITY)

where RELATION-NAME names the relation and CARDINALITY is of type ‘relation-cardinality’. The second form is accepted for convenience so that, for example, relation descriptions returned by ‘node-relations’ can be used as arguments to this
function. CARDINALITY is not processed by this function except that a ‘type-error’ may be signaled if CARDINALITY is not of type ‘relation-cardinality’.

If the cardinality of RELATION is 1 or ‘?’, the first return value is a single node. Otherwise the first return value is a sequence of nodes. Again, note that the cardinality of RELATION here refers to the actual cardinality as known by BUILDER, not information encoded in RELATION by the caller supplying RELATION
as (RELATION-NAME . CARDINALITY).

Each element in the sequence of relation arguments is EQUAL to the list of arguments passed to the RELATE call that, using BUILDER, established the relation between NODE and the related node.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Methods
Method: node-relation ((builder (eql list)) relation (node cons))
Source

list-builder.lisp.

Method: node-relation ((builder forwarding-mixin) relation node)
Source

mixins.lisp.

Method: node-relation (builder (relation cons) node)
Generic Function: node-relations (builder node)

Return a list of relations of NODE w.r.t. BUILDER.

Each relation is of one of the forms

RELATION-NAME
(RELATION-NAME . CARDINALITY)

where RELATION-NAME names the relation and CARDINALITY is of type ‘relation-cardinality’. When the first form is used,
i.e. CARDINALITY is not present, it is assumed to be
‘*’. CARDINALITY values are interpreted as follows:

? The relation designated by RELATION-NAME with NODE as the "left" node has zero or one "right" nodes.

1 The relation designated by RELATION-NAME with NODE as the "left" node has exactly one "right" node.

* The relation designated by RELATION-NAME with NODE as the "left" node has zero or more "right" nodes.

(:map . KEY) The relation designated by RELATION-NAME with NODE as the "left" node has zero or more "right" nodes with the additional constraint that the relation parameters for each such node must contain a unique value for the key KEY.

. This cardinality information is reflected by the return values of (node-relation BUILDER RELATION-NAME NODE).

Package

architecture.builder-protocol.

Source

protocol.lisp.

Methods
Method: node-relations ((builder (eql list)) (node cons))
Source

list-builder.lisp.

Method: node-relations ((builder forwarding-mixin) node)
Source

mixins.lisp.

Method: node-relations (builder node)
Generic Function: prepare (builder)

Prepare BUILDER for result construction, return a builder.

The default method just returns BUILDER.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Methods
Method: prepare ((builder forwarding-mixin))
Source

mixins.lisp.

Method: prepare (builder)
Generic Function: relate (builder relation left right &rest args &key &allow-other-keys)

Establish RELATION between nodes LEFT and RIGHT and return the resulting modified LEFT node (or an appropriate newly created object).

ARGS can be used to supply additional information about the relation that is available from neither LEFT nor RIGHT.

In a typical case, RELATION could be :child, LEFT being the parent node and RIGHT being the child node.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Methods
Method: relate ((builder (eql list)) relation left (right null) &key)
Source

list-builder.lisp.

Method: relate ((builder (eql list)) relation left right &rest args &key)
Source

list-builder.lisp.

Method: relate ((builder delaying-mixin) relation left right &rest args &key)
Source

mixins.lisp.

Method: relate ((builder forwarding-mixin) relation left right &rest args &key &allow-other-keys)
Source

mixins.lisp.

Method: relate (builder relation left (right null) &key)
Method: relate (builder (relation cons) left right &key)
Generic Reader: target (builder)

Return the builder to which BUILDER delegates.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Methods
Reader Method: target ((delegating-mixin delegating-mixin))

Stores the builder to which ‘make-node’, ‘relate’, etc. calls should be delegated.

Source

mixins.lisp.

Target Slot

target.

Generic Function: walk-nodes (builder function root)

Call FUNCTION on nodes of the tree ROOT constructed by BUILDER.

Return whatever FUNCTION returns when called for ROOT.

The lambda-list of FUNCTION must be compatible to

(recurse relation relation-args node kind relations
&rest initargs)

where RELATION and RELATION-ARGS are the relation and its arguments connecting NODE to the previously visited node,

NODE is the node currently being visited,

KIND is the kind returned by ‘node-kind’ for BUILDER and NODE.

RELATIONS are the relations returned by ‘node-relations’ for BUILDER and NODE.

INITARGS are the initargs returned by ‘node-initargs’ for BUILDER and NODE.

RECURSE is a function with the lambda-list

(&key relations function)

that can be called, optionally with a list of relations, to traverse the nodes related to NODE by that relation. If a list of relations is not supplied via the :relations keyword parameter, all relations are traversed. The :function keyword parameter allows performing the traversal with a different function instead of FUNCTION. Calls of this function return a list of elements each of which is the result for the corresponding element of RELATIONS. The result for a relation is either the return value of FUNCTION if the cardinality of the relation is 1 or ? or a list of such return values if the cardinality is * or :map.

If FUNCTION is an instance of ‘peeking’, call the "peeking" function stored in FUNCTION before the ordinary walk
function (also stored in FUNCTION) is called. The lambda-list of the "peeking" function must be compatible to

(builder relation relation-args node)

(i.e. it does not receive kind, initargs or relations). This function can control whether NODE should be processed normally, replaced with something else, processed with a different builder or ignored: Its return values are interpreted as follows:

NIL

Forego processing of NODE, in particular do not call ‘node-kind’, ‘node-relations’, ‘node-initargs’ or the walk function for NODE.

T [* * * BUILDER]

Continue processing as if there was no "peeking" function.

If non-NIL, BUILDER specifies a builder that should be used instead of the current builder to process the NODE and its ancestors.

INSTEAD KIND INITARGS RELATIONS [BUILDER]

Continue processing as if NODE had been replaced by INSTEAD and builder had returned KIND, INITARGS and RELATIONS. In particular do not call ‘node-kind’, ‘node-relations’, ‘node-initargs’ for NODE.

If non-NIL, BUILDER specifies a builder that should be used instead of the current builder to process INSTEAD and its ancestors.

Depending on FUNCTION, potentially return a list-of-lists of the same shape as the traversed tree containing return values of FUNCTION.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Methods
Method: walk-nodes ((builder forwarding-mixin) function root)
Source

mixins.lisp.

Method: walk-nodes (builder (function peeking) root)
Method: walk-nodes (builder (function function) root)
Method: walk-nodes (builder function root)
Generic Function: wrap (builder thunk)

Call THUNK with an appropriate dynamic environment for BUILDER.

A method on this generic function could, for example, bind special variables around the construction of a result object tree.

The existing default methods do not specialize the BUILDER parameter and specialize the THUNK parameter to ‘cl:function’ and ‘cl:symbol’. These default methods just call THUNK.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Methods
Method: wrap ((builder forwarding-mixin) function)
Source

mixins.lisp.

Method: wrap (builder (thunk symbol))
Method: wrap (builder (thunk function))

6.1.5 Structures

Structure: peeking

Allows specifying a peeking function in conjunction with the walk function.

Package

architecture.builder-protocol.

Source

protocol.lisp.

Direct superclasses

structure-object.

Direct methods

walk-nodes.

Direct slots
Slot: peeking-function
Type

function

Readers

peeking-peeking-function.

Writers

This slot is read-only.

Slot: walk-function
Type

function

Readers

peeking-walk-function.

Writers

This slot is read-only.


6.1.6 Classes

Class: delaying-mixin

This class is intended to be mixed into builder classes that have to construct a tree of delayed nodes before doing their respective actual processing.

Package

architecture.builder-protocol.

Source

mixins.lisp.

Direct subclasses

top-down-forcing-builder.

Direct methods
Class: delegating-mixin

Intended to be mixed into builder classes that delegate certain operations to a "target" builder.

Package

architecture.builder-protocol.

Source

mixins.lisp.

Direct subclasses
Direct methods
Direct Default Initargs
InitargValue
:target(error ~@<missing required initarg for class ~s: ~s.~@:> (quote delegating-mixin) target)
Direct slots
Slot: target

Stores the builder to which ‘make-node’, ‘relate’, etc. calls should be delegated.

Initargs

:target

Readers
Writers

(setf %target).

Class: forwarding-mixin

Intended to be mixed into builder classes that delegate all operations to a "target" builder.

Package

architecture.builder-protocol.

Source

mixins.lisp.

Direct superclasses

delegating-mixin.

Direct methods
Class: order-forcing-mixin

This class is intended to be mixed into builder classes that have to process nodes in a particular order.

In combination with ‘delaying-mixin’, this makes the builder independent of the order of the original ‘make-node’ and ‘relate’ calls.

Package

architecture.builder-protocol.

Source

mixins.lisp.

Direct superclasses

delegating-mixin.

Direct subclasses

top-down-forcing-builder.

Direct methods

finish.

Class: top-down-forcing-builder

This builder can act as a proxy for other builders which require nodes to be created from the root downward.

Package

architecture.builder-protocol.

Source

top-down-forcing-builder.lisp.

Direct superclasses
Direct methods

builder-visit-function.


6.1.7 Types

Type: relation-cardinality ()

Cardinality of a relation between nodes.

? Zero or one "right" nodes can be related to the "left" node.

1 Exactly one "right" node is related to the "left" node.

* Zero or more "right" nodes can be related to the "left" node.

(:map . KEY) Zero or more "right" nodes can be related to the left node with the additional constraint that the relation parameters for each such node must contain a unique value for the key KEY.

See ‘relate’ for "left" and "right" node roles.

Package

architecture.builder-protocol.

Source

protocol.lisp.


6.2 Internals


6.2.1 Ordinary functions

Function: %expand-with-builder (spec body make-call)
Package

architecture.builder-protocol.

Source

macros.lisp.

Function: %install-with-builder-docstring (macro &optional extra)
Package

architecture.builder-protocol.

Source

macros.lisp.

Function: %walk-nodes (peeking-function walk-function builder root)
Package

architecture.builder-protocol.

Source

protocol.lisp.

Reader: argumented-arguments (instance)
Package

architecture.builder-protocol.

Source

mixins.lisp.

Target Slot

arguments.

Function: delayed-node-arguments (instance)
Package

architecture.builder-protocol.

Source

mixins.lisp.

Reader: delayed-node-kind (instance)
Package

architecture.builder-protocol.

Source

mixins.lisp.

Target Slot

kind.

Function: delayed-node-p (object)
Package

architecture.builder-protocol.

Source

mixins.lisp.

Reader: delayed-node-relations (instance)
Writer: (setf delayed-node-relations) (instance)
Package

architecture.builder-protocol.

Source

mixins.lisp.

Target Slot

relations.

Function: delayed-relation-arguments (instance)
Package

architecture.builder-protocol.

Source

mixins.lisp.

Reader: delayed-relation-kind (instance)
Package

architecture.builder-protocol.

Source

mixins.lisp.

Target Slot

kind.

Reader: delayed-relation-node (instance)
Package

architecture.builder-protocol.

Source

mixins.lisp.

Target Slot

node.

Function: delayed-relation-p (object)
Package

architecture.builder-protocol.

Source

mixins.lisp.

Function: expand-cardinality-case (cardinality clauses exhaustive)
Package

architecture.builder-protocol.

Source

util.lisp.

Function: make-delayed-node (kind arguments)
Package

architecture.builder-protocol.

Source

mixins.lisp.

Function: make-delayed-relation (kind node arguments)
Package

architecture.builder-protocol.

Source

mixins.lisp.

Function: make-keyword-arguments (multi-keyword-arguments)
Package

architecture.builder-protocol.

Source

protocol.lisp.

Reader: peeking-peeking-function (instance)
Package

architecture.builder-protocol.

Source

protocol.lisp.

Target Slot

peeking-function.

Reader: peeking-walk-function (instance)
Package

architecture.builder-protocol.

Source

protocol.lisp.

Target Slot

walk-function.


6.2.2 Generic functions

Generic Reader: %target (object)
Generic Writer: (setf %target) (object)
Package

architecture.builder-protocol.

Methods
Reader Method: %target ((delegating-mixin delegating-mixin))
Writer Method: (setf %target) ((delegating-mixin delegating-mixin))

Stores the builder to which ‘make-node’, ‘relate’, etc. calls should be delegated.

Source

mixins.lisp.

Target Slot

target.


6.2.3 Structures

Structure: argumented
Package

architecture.builder-protocol.

Source

mixins.lisp.

Direct superclasses

structure-object.

Direct subclasses
Direct slots
Slot: arguments
Type

list

Readers

argumented-arguments.

Writers

This slot is read-only.

Structure: delayed-node
Package

architecture.builder-protocol.

Source

mixins.lisp.

Direct superclasses

argumented.

Direct slots
Slot: kind
Readers

delayed-node-kind.

Writers

This slot is read-only.

Slot: relations
Type

list

Readers

delayed-node-relations.

Writers

(setf delayed-node-relations).

Structure: delayed-relation
Package

architecture.builder-protocol.

Source

mixins.lisp.

Direct superclasses

argumented.

Direct slots
Slot: kind
Readers

delayed-relation-kind.

Writers

This slot is read-only.

Slot: node
Readers

delayed-relation-node.

Writers

This slot is read-only.


6.2.4 Types

Type: %map-pattern ()
Package

architecture.builder-protocol.

Source

util.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (  
A   B   C   D   E   F   G   M   N   P   R   T   W  
Index Entry  Section

%
%expand-with-builder: Private ordinary functions
%install-with-builder-docstring: Private ordinary functions
%target: Private generic functions
%target: Private generic functions
%walk-nodes: Private ordinary functions

(
(setf %target): Private generic functions
(setf %target): Private generic functions
(setf delayed-node-relations): Private ordinary functions

A
add-relations: Public ordinary functions
add-relations*: Public ordinary functions
argumented-arguments: Private ordinary functions

B
builder-visit-function: Public generic functions
builder-visit-function: Public generic functions

C
call-with-builder: Public ordinary functions
call-with-unbuilder: Public ordinary functions
cardinality-case: Public macros
cardinality-ecase: Public macros

D
delayed-node-arguments: Private ordinary functions
delayed-node-kind: Private ordinary functions
delayed-node-p: Private ordinary functions
delayed-node-relations: Private ordinary functions
delayed-relation-arguments: Private ordinary functions
delayed-relation-kind: Private ordinary functions
delayed-relation-node: Private ordinary functions
delayed-relation-p: Private ordinary functions

E
expand-cardinality-case: Private ordinary functions

F
finish: Public generic functions
finish: Public generic functions
finish: Public generic functions
finish: Public generic functions
finish*: Public ordinary functions
finish-node: Public generic functions
finish-node: Public generic functions
finish-node: Public generic functions
finish-node: Public generic functions
finish-node*: Public ordinary functions
Function, %expand-with-builder: Private ordinary functions
Function, %install-with-builder-docstring: Private ordinary functions
Function, %walk-nodes: Private ordinary functions
Function, (setf delayed-node-relations): Private ordinary functions
Function, add-relations: Public ordinary functions
Function, add-relations*: Public ordinary functions
Function, argumented-arguments: Private ordinary functions
Function, call-with-builder: Public ordinary functions
Function, call-with-unbuilder: Public ordinary functions
Function, delayed-node-arguments: Private ordinary functions
Function, delayed-node-kind: Private ordinary functions
Function, delayed-node-p: Private ordinary functions
Function, delayed-node-relations: Private ordinary functions
Function, delayed-relation-arguments: Private ordinary functions
Function, delayed-relation-kind: Private ordinary functions
Function, delayed-relation-node: Private ordinary functions
Function, delayed-relation-p: Private ordinary functions
Function, expand-cardinality-case: Private ordinary functions
Function, finish*: Public ordinary functions
Function, finish-node*: Public ordinary functions
Function, make+finish-node: Public ordinary functions
Function, make+finish-node*: Public ordinary functions
Function, make+finish-node+relations: Public ordinary functions
Function, make+finish-node+relations*: Public ordinary functions
Function, make-delayed-node: Private ordinary functions
Function, make-delayed-relation: Private ordinary functions
Function, make-keyword-arguments: Private ordinary functions
Function, make-node*: Public ordinary functions
Function, node-initargs*: Public ordinary functions
Function, node-kind*: Public ordinary functions
Function, node-relation*: Public ordinary functions
Function, node-relations*: Public ordinary functions
Function, normalize-relation: Public ordinary functions
Function, peeking: Public ordinary functions
Function, peeking-peeking-function: Private ordinary functions
Function, peeking-walk-function: Private ordinary functions
Function, prepare*: Public ordinary functions
Function, relate*: Public ordinary functions
Function, walk-nodes*: Public ordinary functions
Function, wrap*: Public ordinary functions

G
Generic Function, %target: Private generic functions
Generic Function, (setf %target): Private generic functions
Generic Function, builder-visit-function: Public generic functions
Generic Function, finish: Public generic functions
Generic Function, finish-node: Public generic functions
Generic Function, make-node: Public generic functions
Generic Function, node-initargs: Public generic functions
Generic Function, node-kind: Public generic functions
Generic Function, node-relation: Public generic functions
Generic Function, node-relations: Public generic functions
Generic Function, prepare: Public generic functions
Generic Function, relate: Public generic functions
Generic Function, target: Public generic functions
Generic Function, walk-nodes: Public generic functions
Generic Function, wrap: Public generic functions

M
Macro, cardinality-case: Public macros
Macro, cardinality-ecase: Public macros
Macro, node: Public macros
Macro, node*: Public macros
Macro, with-builder: Public macros
Macro, with-unbuilder: Public macros
make+finish-node: Public ordinary functions
make+finish-node*: Public ordinary functions
make+finish-node+relations: Public ordinary functions
make+finish-node+relations*: Public ordinary functions
make-delayed-node: Private ordinary functions
make-delayed-relation: Private ordinary functions
make-keyword-arguments: Private ordinary functions
make-node: Public generic functions
make-node: Public generic functions
make-node: Public generic functions
make-node: Public generic functions
make-node*: Public ordinary functions
Method, %target: Private generic functions
Method, (setf %target): Private generic functions
Method, builder-visit-function: Public generic functions
Method, finish: Public generic functions
Method, finish: Public generic functions
Method, finish: Public generic functions
Method, finish-node: Public generic functions
Method, finish-node: Public generic functions
Method, finish-node: Public generic functions
Method, make-node: Public generic functions
Method, make-node: Public generic functions
Method, make-node: Public generic functions
Method, node-initargs: Public generic functions
Method, node-initargs: Public generic functions
Method, node-initargs: Public generic functions
Method, node-kind: Public generic functions
Method, node-kind: Public generic functions
Method, node-relation: Public generic functions
Method, node-relation: Public generic functions
Method, node-relation: Public generic functions
Method, node-relations: Public generic functions
Method, node-relations: Public generic functions
Method, node-relations: Public generic functions
Method, prepare: Public generic functions
Method, prepare: Public generic functions
Method, relate: Public generic functions
Method, relate: Public generic functions
Method, relate: Public generic functions
Method, relate: Public generic functions
Method, relate: Public generic functions
Method, relate: Public generic functions
Method, target: Public generic functions
Method, walk-nodes: Public generic functions
Method, walk-nodes: Public generic functions
Method, walk-nodes: Public generic functions
Method, walk-nodes: Public generic functions
Method, wrap: Public generic functions
Method, wrap: Public generic functions
Method, wrap: Public generic functions

N
node: Public macros
node*: Public macros
node-initargs: Public generic functions
node-initargs: Public generic functions
node-initargs: Public generic functions
node-initargs: Public generic functions
node-initargs*: Public ordinary functions
node-kind: Public generic functions
node-kind: Public generic functions
node-kind: Public generic functions
node-kind*: Public ordinary functions
node-relation: Public generic functions
node-relation: Public generic functions
node-relation: Public generic functions
node-relation: Public generic functions
node-relation*: Public ordinary functions
node-relations: Public generic functions
node-relations: Public generic functions
node-relations: Public generic functions
node-relations: Public generic functions
node-relations*: Public ordinary functions
normalize-relation: Public ordinary functions

P
peeking: Public ordinary functions
peeking-peeking-function: Private ordinary functions
peeking-walk-function: Private ordinary functions
prepare: Public generic functions
prepare: Public generic functions
prepare: Public generic functions
prepare*: Public ordinary functions

R
relate: Public generic functions
relate: Public generic functions
relate: Public generic functions
relate: Public generic functions
relate: Public generic functions
relate: Public generic functions
relate: Public generic functions
relate*: Public ordinary functions

T
target: Public generic functions
target: Public generic functions

W
walk-nodes: Public generic functions
walk-nodes: Public generic functions
walk-nodes: Public generic functions
walk-nodes: Public generic functions
walk-nodes: Public generic functions
walk-nodes*: Public ordinary functions
with-builder: Public macros
with-unbuilder: Public macros
wrap: Public generic functions
wrap: Public generic functions
wrap: Public generic functions
wrap: Public generic functions
wrap*: Public ordinary functions


A.4 Data types

Jump to:   %  
A   C   D   F   L   M   O   P   R   S   T   U   V  
Index Entry  Section

%
%map-pattern: Private types

A
architecture.builder-protocol: The architecture․builder-protocol system
architecture.builder-protocol: The architecture․builder-protocol package
architecture.builder-protocol.asd: The architecture․builder-protocol/architecture․builder-protocol․asd file
argumented: Private structures

C
Class, delaying-mixin: Public classes
Class, delegating-mixin: Public classes
Class, forwarding-mixin: Public classes
Class, order-forcing-mixin: Public classes
Class, top-down-forcing-builder: Public classes

D
delayed-node: Private structures
delayed-relation: Private structures
delaying-mixin: Public classes
delegating-mixin: Public classes

F
File, architecture.builder-protocol.asd: The architecture․builder-protocol/architecture․builder-protocol․asd file
File, list-builder.lisp: The architecture․builder-protocol/src/list-builder․lisp file
File, macros.lisp: The architecture․builder-protocol/src/macros․lisp file
File, mixins.lisp: The architecture․builder-protocol/src/mixins․lisp file
File, package.lisp: The architecture․builder-protocol/src/package․lisp file
File, protocol.lisp: The architecture․builder-protocol/src/protocol․lisp file
File, top-down-forcing-builder.lisp: The architecture․builder-protocol/src/top-down-forcing-builder․lisp file
File, util.lisp: The architecture․builder-protocol/src/util․lisp file
File, variables.lisp: The architecture․builder-protocol/src/variables․lisp file
forwarding-mixin: Public classes

L
list-builder.lisp: The architecture․builder-protocol/src/list-builder․lisp file

M
macros.lisp: The architecture․builder-protocol/src/macros․lisp file
mixins.lisp: The architecture․builder-protocol/src/mixins․lisp file
Module, src: The architecture․builder-protocol/src module

O
order-forcing-mixin: Public classes

P
Package, architecture.builder-protocol: The architecture․builder-protocol package
package.lisp: The architecture․builder-protocol/src/package․lisp file
peeking: Public structures
protocol.lisp: The architecture․builder-protocol/src/protocol․lisp file

R
relation-cardinality: Public types

S
src: The architecture․builder-protocol/src module
Structure, argumented: Private structures
Structure, delayed-node: Private structures
Structure, delayed-relation: Private structures
Structure, peeking: Public structures
System, architecture.builder-protocol: The architecture․builder-protocol system

T
top-down-forcing-builder: Public classes
top-down-forcing-builder.lisp: The architecture․builder-protocol/src/top-down-forcing-builder․lisp file
Type, %map-pattern: Private types
Type, relation-cardinality: Public types

U
util.lisp: The architecture․builder-protocol/src/util․lisp file

V
variables.lisp: The architecture․builder-protocol/src/variables․lisp file