The flow Reference Manual

This is the flow Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 06:07:32 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 flow

A flowchart and generalised graph library.

Maintainer

Yukari Hafner <>

Author

Yukari Hafner <>

Home Page

https://Shinmera.github.io/flow/

Source Control

(GIT https://github.com/Shinmera/flow.git)

Bug Tracker

https://github.com/Shinmera/flow/issues

License

zlib

Version

1.0.0

Dependencies
  • documentation-utils (system).
  • closer-mop (system).
Source

flow.asd.

Child Components

3 Files

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


3.1 Lisp


3.1.1 flow/flow.asd

Source

flow.asd.

Parent Component

flow (system).

ASDF Systems

flow.


3.1.2 flow/package.lisp

Source

flow.asd.

Parent Component

flow (system).

Packages

flow.


3.1.3 flow/toolkit.lisp

Dependency

package.lisp (file).

Source

flow.asd.

Parent Component

flow (system).

Internals

3.1.4 flow/conditions.lisp

Dependency

toolkit.lisp (file).

Source

flow.asd.

Parent Component

flow (system).

Public Interface
Internals

port-name (reader method).


3.1.5 flow/nodes.lisp

Dependency

conditions.lisp (file).

Source

flow.asd.

Parent Component

flow (system).

Public Interface

3.1.6 flow/static-node.lisp

Dependency

nodes.lisp (file).

Source

flow.asd.

Parent Component

flow (system).

Public Interface
Internals

3.1.7 flow/graph.lisp

Dependency

static-node.lisp (file).

Source

flow.asd.

Parent Component

flow (system).

Public Interface

3.1.8 flow/documentation.lisp

Dependency

graph.lisp (file).

Source

flow.asd.

Parent Component

flow (system).


4 Packages

Packages are listed by definition order.


4.1 flow

Source

package.lisp.

Nickname

org.shirakumo.flow

Use List

common-lisp.

Public Interface
Internals

5 Definitions

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


5.1 Public Interface


5.1.1 Special variables

Special Variable: *resolve-port*

Whether a slot-value/slot-makunbound/slot-boundp call should resolve the port.

If this is T (the default), then the port’s
slot within the object’s slot is resolved,
rather than directly resolving the slot that the
port is itself contained in.

Package

flow.

Source

static-node.lisp.


5.1.2 Macros

Macro: define-node (name direct-superclasses direct-slots &rest options)

Shorthand macro to define a static node class.

All this does is add the necessary :METACLASS option and inject STATIC-NODE as a direct-superclass.

See STATIC-NODE

Package

flow.

Source

static-node.lisp.

Macro: define-port-value-slot (port-class slot &optional accessor)

Easily define a slot to be used for the port value of a port class.

If ACCESSOR is given it should be a symbol denoting
the name of an accessor responsible for getting and
setting the appropriate value on the port. If it is
not given, SLOT-VALUE is used instead.

This automatically generates appropriate methods for
the port value functions.

See PORT-VALUE
See PORT-VALUE-BOUNDP
See PORT-VALUE-MAKUNBOUND

Package

flow.

Source

static-node.lisp.

Macro: with-attributes (attributes unit &body body)

Shorthand macro to access the given attributes through a variable.

This is similar to WITH-SLOTS.

See UNIT
See ATTRIBUTE
See CL:WITH-SLOTS

Package

flow.

Source

nodes.lisp.


5.1.3 Ordinary functions

Function: a* (start goal cost-fun &key test)

Performs an A* shortest-path calculation.

Returns a list of connections along the shortest path.

START and GOAL must be nodes of the same graph. COST-FUN must be a function of two arguments that returns an estimated cost to move from the first to the second node that is passed.

The TEST function can be used to exclude connections from the shortest path computation. Only connections for which TEST returns T will be considered viable for use in the path.

Signals an error of type GRAPH-IS-BIPARTITE if no valid path can be found between START and GOAL.

See GRAPH-IS-BIPARTITE

Package

flow.

Source

graph.lisp.

Function: allocate-ports (nodes &key attribute clear in-place-attribute test sort)

Perform a colour "allocation" on the ports of the graph.

Each port reachable in the graph from the given starting nodes out that is not of type in-port is assigned a "colour" to the specified attribute.
If clear is non-NIL, the colour attribute is first cleared off of each port, ensuring a clean colouring.

The colouring rules are as follows:
A port may not have the same colour as any of the other ports on the same node. Unless the node’s in-place-attribute is non-NIL, the colour must
also be distinct from the colour of any of the node’s predecessor ports. A predecessor port being any port that is connected to an in-port of the node.

In effect this produces a colouring that is useful to calculate the allocation of buffers and other resources necessary to perform a calculation for
a node. These rules ensure that the calculation
can be performed without accidentally overwriting buffer data necessary at a later point in the execution of the graph, while at the same time
also minimising the number of necessary buffers.

The given graph may not contain any cycles.

Before the nodes are processed, they are sorted by SORT, defaulting to a TOPOLOGICAL-SORT. The sorted nodes must be in such an order that the nodes
appear in a topological order.

If TEST is given, only ports for which the TEST function returns non-NIL are considered for the colouring. This allows you to distribute multiple colour "kinds" across a single graph by running
the colouring once for each kind of colour and excluding the ports that should not be coloured for that kind.

See TOPOLOGICAL-SORT

Package

flow.

Source

graph.lisp.

Function: color-nodes (node &key attribute clear)

Perform a graph colouring.

Each node in the graph from the given starting node out is assigned a "colour" to the specified attribute. This colour is in practise an integer in the range [0,n] where n is the number of nodes in the graph. The colours are distributed in such a way that no neighbouring nodes have the same colour.

The employed algorithm is greedy and cannot guarantee an optimal colouring. Optimal colouring is an NP- complete problem, and the results produced by a greedy algorithm are usually shown to be good enough.

The full list of coloured nodes is returned.

Package

flow.

Source

graph.lisp.

Function: extract-graph (node)

Extract the graph starting from the given node.

This returns two lists, the first being the list of vertices (nodes), and the second being the list of edges, with each edge being a list of left and right vertex that are connected. The edges are intended to be directed. Undirected edges are represented by two edges, one from left to right and one from right to left.

The order of the vertices and edges in the returned lists is unspecified.

See VISIT

Package

flow.

Source

graph.lisp.

Function: other-node (node connection)

Return the node on the other side of the connection.

This works with both directed and undirected connections.

See TARGET-NODE

Package

flow.

Source

nodes.lisp.

Function: target-node (node connection)

Return the node on the other side of the connection.

If the connection is directed, the target node is only returned if the left-side of the connection is the given node. Otherwise NIL is returned. For undirected connections this acts the same as OTHER-NODE.

See OTHER-NODE

Package

flow.

Source

nodes.lisp.

Function: topological-sort (nodes)

Produces a topological sorting of the given nodes.

This uses Tarjan’s algorithm to compute the topological sorting. Note that if the given list of nodes does not include all reachable nodes, the result may be erroneous.

Signals an error of type GRAPH-CONTAINS-CYCLES if the graph contains cycles.

See GRAPH-CONTAINS-CYCLES

Package

flow.

Source

graph.lisp.

Function: visit (node function)

Visit each node in the graph, starting from the given node.

The visiting proceeds by calling the function on a node, then recursing through each connection of the node. The recursion does not respect directed connections. It is guaranteed that each node is
only visited once, regardless of cycles.

Package

flow.

Source

graph.lisp.


5.1.4 Generic functions

Generic Function: attribute (unit name &optional default)

Accessor to the named attribute on the unit.

The attribute’s name must be comparable by EQL. If the attribute does not exist on the unit, the default value is returned instead.

See ATTRIBUTES
See REMOVE-ATTRIBUTE
See UNIT

Package

flow.

Methods
Method: attribute ((unit unit) name &optional default)
Source

nodes.lisp.

Generic Function: (setf attribute) (unit name)
Package

flow.

Methods
Method: (setf attribute) ((unit unit) name)
Source

nodes.lisp.

Generic Reader: attributes (object)

Accessor to the unit’s hash table of attributes.

See UNIT
See ATTRIBUTE
See REMOVE-ATTRIBUTE

Package

flow.

Methods
Reader Method: attributes ((unit unit))

automatically generated reader method

Source

nodes.lisp.

Target Slot

attributes.

Generic Writer: (setf attributes) (object)
Package

flow.

Methods
Writer Method: (setf attributes) ((unit unit))

automatically generated writer method

Source

nodes.lisp.

Target Slot

attributes.

Generic Function: check-connection-accepted (connection port)

Check whether the given connection is accepted on the given unit.

If it is not accepted, an error is signalled. This
generic function uses a PROGN method combination,
which forces tests of all superclasses to be performed
as well.

See CONNECTION-ALREADY-EXISTS
See ILLEGAL-CONNECTION

Package

flow.

Source

nodes.lisp.

Method Combination

progn.

Options

:most-specific-first

Methods
Method: check-connection-accepted progn ((connection directed-connection) (port out-port))
Method: check-connection-accepted progn ((connection directed-connection) (port in-port))
Method: check-connection-accepted progn (connection (port 1-port))
Method: check-connection-accepted progn (new-connection (port port))
Generic Function: connect (left right &optional connection-type &rest initargs)

Forge a connection between the two units.

The connection is only made if it is accepted on both left and right hand sides by CHECK-CONNECTION-ACCEPTED. If both accept the connection, it is pushed onto their respective connections lists.

See PORT
See CHECK-CONNECTION-ACCEPTED
See CONNECTIONS

Package

flow.

Methods
Method: connect ((left port) (right port) &optional connection-type &rest initargs)
Source

nodes.lisp.

Generic Reader: connection (condition)

Returns the connection that could not be added.

See ILLEGAL-CONNECTION

Package

flow.

Methods
Reader Method: connection ((condition illegal-connection))
Source

conditions.lisp.

Target Slot

connection.

Generic Function: connection= (a b)

Tests whether two connections are considered equal.

Connections are the same under this comparison, if they are connected to the same ports "in the same way". This simply means that whether ports are connected the same may depend on the specific connection being tested. For example, directed connections are only the same if the left and right ports match up, whereas undirected connections are the same regardless of the order between them.

See CONNECTION

Package

flow.

Methods
Method: connection= ((a directed-connection) (b directed-connection))
Source

nodes.lisp.

Method: connection= (a b)
Source

nodes.lisp.

Generic Function: connections (object)

Accessor to the list of connections on this unit.

The list is not guaranteed to be fresh and thus may not be modified without potentially messing things up.

See PORT
See NODE

Package

flow.

Methods
Method: connections ((node node))
Source

nodes.lisp.

Reader Method: connections ((port port))

automatically generated reader method

Source

nodes.lisp.

Target Slot

connections.

Generic Writer: (setf connections) (object)
Package

flow.

Methods
Writer Method: (setf connections) ((port port))

automatically generated writer method

Source

nodes.lisp.

Target Slot

connections.

Generic Function: disconnect (left right)

Remove any matching connection from left to right.

This constructs a directed-connection between the two and then removes all connections from each of them that matches the constructed connection by CONNECTION=.

See PORT
See DIRECTED-CONNECTION
See REMOVE-CONNECTION
See CONNECTION=

Package

flow.

Methods
Method: disconnect ((a node) (b node))
Source

nodes.lisp.

Method: disconnect ((port port) (node node))
Source

nodes.lisp.

Method: disconnect ((node node) (port port))
Source

nodes.lisp.

Method: disconnect ((left port) (right port))
Source

nodes.lisp.

Generic Reader: left (object)

Accessor to the "left" port of a connection.

See CONNECTION

Package

flow.

Methods
Reader Method: left ((connection connection))

automatically generated reader method

Source

nodes.lisp.

Target Slot

left.

Generic Writer: (setf left) (object)
Package

flow.

Methods
Writer Method: (setf left) ((connection connection))

automatically generated writer method

Source

nodes.lisp.

Target Slot

left.

Generic Reader: message (condition)

Returns a reason for the failure.

See ILLEGAL-CONNECTION

Package

flow.

Methods
Reader Method: message ((condition illegal-connection))
Source

conditions.lisp.

Target Slot

message.

Generic Reader: name (object)
Package

flow.

Methods
Reader Method: name ((port port))

automatically generated reader method

Source

nodes.lisp.

Target Slot

name.

Generic Writer: (setf name) (object)
Package

flow.

Methods
Writer Method: (setf name) ((port port))

automatically generated writer method

Source

nodes.lisp.

Target Slot

name.

Generic Reader: new-connection (condition)

Returns the new connection that was attempted to be added.

See CONNECTION-ALREADY-EXISTS

Package

flow.

Methods
Reader Method: new-connection ((condition connection-already-exists))
Source

conditions.lisp.

Target Slot

new-connection.

Generic Reader: node (condition)

Accessor to the node this port is home to.

See PORT

Package

flow.

Methods
Reader Method: node ((port port))

automatically generated reader method

Source

nodes.lisp.

Target Slot

node.

Reader Method: node ((condition graph-contains-cycles))
Source

conditions.lisp.

Target Slot

node.

Reader Method: node ((condition designator-not-a-port))
Source

conditions.lisp.

Target Slot

node.

Generic Writer: (setf node) (object)
Package

flow.

Methods
Writer Method: (setf node) ((port port))

automatically generated writer method

Source

nodes.lisp.

Target Slot

node.

Generic Reader: node-a (condition)

Returns the first node associated with the failure.

See GRAPH-IS-BIPARTITE

Package

flow.

Methods
Reader Method: node-a ((condition graph-is-bipartite))
Source

conditions.lisp.

Target Slot

node-a.

Generic Reader: node-b (condition)

Returns the second node associated with the failure.

See GRAPH-IS-BIPARTITE

Package

flow.

Methods
Reader Method: node-b ((condition graph-is-bipartite))
Source

conditions.lisp.

Target Slot

node-b.

Generic Reader: old-connection (condition)

Returns the old connection that already exists on the ports.

See CONNECTION-ALREADY-EXISTS

Package

flow.

Methods
Reader Method: old-connection ((condition connection-already-exists))
Source

conditions.lisp.

Target Slot

old-connection.

Generic Function: port (node name)

Return the port object contained in the node with the specified name.

If the name does not designate a port, an error of type DESIGNATOR-NOT-A-PORT is signalled.

See NODE
See DESIGNATOR-NOT-A-PORT

Package

flow.

Methods
Method: port ((node static-node) (name symbol))
Source

static-node.lisp.

Method: port ((node dynamic-node) (name symbol))
Source

nodes.lisp.

Generic Function: port-type (object)

Accessor to the port type contained in this slot.

See PORT-DEFINITION

Package

flow.

Methods
Method: port-type ((slot slot-definition))
Source

static-node.lisp.

Reader Method: port-type ((port-definition port-definition))

automatically generated reader method

Source

static-node.lisp.

Target Slot

port-type.

Generic Writer: (setf port-type) (object)
Package

flow.

Methods
Writer Method: (setf port-type) ((port-definition port-definition))

automatically generated writer method

Source

static-node.lisp.

Target Slot

port-type.

Generic Function: port-value (port)

Accessor to the primary "value" contained in this static port.

For standard ports this is the CONNECTIONS slot.

See STATIC-NODE
See PORT-VALUE-BOUNDP
See PORT-VALUE-MAKUNBOUND
See DEFINE-PORT-VALUE-SLOT

Package

flow.

Methods
Method: port-value ((port port))
Source

static-node.lisp.

Generic Function: (setf port-value) (port)
Package

flow.

Methods
Method: (setf port-value) ((port port))
Source

static-node.lisp.

Generic Function: port-value-boundp (port)

Returns non-NIL if the value slot in this static port is bound.

See STATIC-NODE
See PORT-VALUE
See PORT-VALUE-MAKUNBOUND
See DEFINE-PORT-VALUE-SLOT

Package

flow.

Methods
Method: port-value-boundp ((port port))
Source

static-node.lisp.

Generic Function: port-value-makunbound (port)

Makes the value slot in this static port unbound.

See STATIC-NODE
See PORT-VALUE
See PORT-VALUE-BOUNDP
See DEFINE-PORT-VALUE-SLOT

Package

flow.

Methods
Method: port-value-makunbound ((port port))
Source

static-node.lisp.

Generic Function: ports (object)

Returns a list of port objects that the node contains.

This list may not be fresh and thus must not be modified.

See NODE

Package

flow.

Methods
Method: ports ((node static-node))
Source

static-node.lisp.

Reader Method: ports ((dynamic-node dynamic-node))

automatically generated reader method

Source

nodes.lisp.

Target Slot

ports.

Generic Writer: (setf ports) (object)
Package

flow.

Methods
Writer Method: (setf ports) ((dynamic-node dynamic-node))

automatically generated writer method

Source

nodes.lisp.

Target Slot

ports.

Generic Function: remove-attribute (unit name)

Remove the named attribute from the unit.

See ATTRIBUTES
See ATTRIBUTE
See UNIT

Package

flow.

Methods
Method: remove-attribute ((unit unit) name)
Source

nodes.lisp.

Generic Function: remove-connection (connection port &key test)

Remove the given connection from the unit.

See PORT
See NODE
See CONNECTIONS

Package

flow.

Methods
Method: remove-connection (connection (node node) &key test)
Source

nodes.lisp.

Method: remove-connection (connection (port port) &key test)
Source

nodes.lisp.

Generic Reader: right (object)

Accessor to the "right" port of a connection.

See CONNECTION

Package

flow.

Methods
Reader Method: right ((connection connection))

automatically generated reader method

Source

nodes.lisp.

Target Slot

right.

Generic Writer: (setf right) (object)
Package

flow.

Methods
Writer Method: (setf right) ((connection connection))

automatically generated writer method

Source

nodes.lisp.

Target Slot

right.

Generic Function: sever (connection)

Sever the connections of this unit.

For a connection, severing it means simply removing that connection. For a port severing means severing all connections of the port. For a node severing severing all connections of all of its ports.

See CONNECTION
See PORT
See NODE

Package

flow.

Methods
Method: sever ((node node))
Source

nodes.lisp.

Method: sever ((port port))
Source

nodes.lisp.

Method: sever ((connection connection))
Source

nodes.lisp.


5.1.5 Standalone methods

Method: change-class :around (instance (node static-node-class) &rest initargs)
Source

static-node.lisp.

Method: compute-effective-slot-definition ((class static-node-class) name direct-slots)
Package

sb-mop.

Source

static-node.lisp.

Method: direct-slot-definition-class ((class static-node-class) &rest initargs)
Package

sb-mop.

Source

static-node.lisp.

Method: effective-slot-definition-class ((class static-node-class) &rest initargs &key port-type port-initargs)
Package

sb-mop.

Source

static-node.lisp.

Method: initialize-instance :after ((definition port-definition) &rest initargs &key &allow-other-keys)
Source

static-node.lisp.

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

nodes.lisp.

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

nodes.lisp.

Method: print-object ((connection directed-connection) stream)
Source

nodes.lisp.

Method: shared-initialize ((node static-node) initform-slots &rest initargs)
Source

static-node.lisp.

Method: slot-boundp-using-class ((node static-node-class) object (slot effective-port-definition))
Package

sb-mop.

Source

static-node.lisp.

Method: slot-makunbound-using-class ((node static-node-class) object (slot effective-port-definition))
Package

sb-mop.

Source

static-node.lisp.

Method: (setf slot-value-using-class) ((node static-node-class) object (slot effective-port-definition))
Package

sb-mop.

Source

static-node.lisp.

Method: slot-value-using-class ((node static-node-class) object (slot effective-port-definition))
Package

sb-mop.

Source

static-node.lisp.

Method: validate-superclass ((class static-node-class) (superclass static-node-class))
Package

sb-mop.

Source

static-node.lisp.

Method: validate-superclass ((class static-node-class) (superclass standard-class))
Package

sb-mop.

Source

static-node.lisp.

Method: validate-superclass ((class standard-class) (superclass static-node-class))
Package

sb-mop.

Source

static-node.lisp.

Method: validate-superclass ((class static-node-class) superclass)
Package

sb-mop.

Source

static-node.lisp.


5.1.6 Conditions

Condition: connection-already-exists

Error signalled if an equivalent connection is added.

See NEW-CONNECTION
See OLD-CONNECTION
See FLOW-CONDITION

Package

flow.

Source

conditions.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: new-connection
Initargs

:new-connection

Readers

new-connection.

Writers

This slot is read-only.

Slot: old-connection
Initargs

:old-connection

Readers

old-connection.

Writers

This slot is read-only.

Condition: designator-not-a-port

Error signalled when a port is accessed that does not exist.

See NODE
See PORT-NAME

Package

flow.

Source

conditions.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: node
Initargs

:node

Readers

node.

Writers

This slot is read-only.

Slot: port-name
Initargs

:port-name

Readers

port-name.

Writers

This slot is read-only.

Condition: flow-condition

Base type for all conditions from the Flow library.

Package

flow.

Source

conditions.lisp.

Direct superclasses

condition.

Direct subclasses
Condition: graph-contains-cycles

Error signalled if the graph is cyclic.

This error is signalled on algorithms that expect an acyclic graph.

See NODE
See GRAPH-STRUCTURE-ERROR

Package

flow.

Source

conditions.lisp.

Direct superclasses

graph-structure-error.

Direct methods

node.

Direct slots
Slot: node
Initargs

:node

Readers

node.

Writers

This slot is read-only.

Condition: graph-is-bipartite

Error signalled if the graph is bipartite.

This error is signalled on algorithms that expect a singular, connected graph.

See NODE-A
See NODE-B
See GRAPH-STRUCTURE-ERROR

Package

flow.

Source

conditions.lisp.

Direct superclasses

graph-structure-error.

Direct methods
Direct slots
Slot: node-a
Initargs

:node-a

Readers

node-a.

Writers

This slot is read-only.

Slot: node-b
Initargs

:node-b

Readers

node-b.

Writers

This slot is read-only.

Condition: graph-structure-error

Base type for conditions related to structural problems in graphs.

These conditions are used by the various generic
algorithms offered in Flow to signal that a
precondition of an operation is not fulfilled in
some way.

See FLOW-CONDITION

Package

flow.

Source

conditions.lisp.

Direct superclasses
Direct subclasses
Condition: illegal-connection

Error signalled if the connection is not permitted by the ports.

See CONNECTION
See MESSAGE
See FLOW-CONDITION

Package

flow.

Source

conditions.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: connection
Initargs

:connection

Readers

connection.

Writers

This slot is read-only.

Slot: message
Initform

(quote nil)

Initargs

:message

Readers

message.

Writers

This slot is read-only.


5.1.7 Classes

Class: 1-port

A port that only accepts a single connection.

See PORT

Package

flow.

Source

nodes.lisp.

Direct superclasses

port.

Direct methods

check-connection-accepted.

Class: connection

Representation of a connection between two ports.

This connection is undirected, meaning that it is intended to represent information flowing in both directions.

See LEFT
See RIGHT
See UNIT
See CONNECTION=
See SEVER

Package

flow.

Source

nodes.lisp.

Direct superclasses

unit.

Direct subclasses

directed-connection.

Direct methods
Direct slots
Slot: left
Initargs

:left

Readers

left.

Writers

(setf left).

Slot: right
Initargs

:right

Readers

right.

Writers

(setf right).

Class: directed-connection

A connection for which information only flows from left to right.

See CONNECTION

Package

flow.

Source

nodes.lisp.

Direct superclasses

connection.

Direct methods
Class: dynamic-node

Superclass for all dynamic nodes.

A dynamic node’s ports are allocated on a per-instance basis, rather than on a per-class basis like for the static-node.

See NODE

Package

flow.

Source

nodes.lisp.

Direct superclasses

node.

Direct methods
Direct slots
Slot: ports
Initargs

:ports

Readers

ports.

Writers

(setf ports).

Class: in-port

A port that only accepts incoming connections.

See PORT

Package

flow.

Source

nodes.lisp.

Direct superclasses

port.

Direct methods

check-connection-accepted.

Class: n-port

A port that accepts an arbitrary number of connections.

See PORT

Package

flow.

Source

nodes.lisp.

Direct superclasses

port.

Class: node

Superclass for all nodes in a Flow graph.

A node has a set of PORT instances that are used to form connections to other nodes over.

See UNIT
See PORT
See PORTS
See SEVER
See CONNECTIONS
See REMOVE-CONNECTION
See DISCONNECT

Package

flow.

Source

nodes.lisp.

Direct superclasses

unit.

Direct subclasses
Direct methods
Class: out-port

A port that only accepts outgoing connections.

See PORT

Package

flow.

Source

nodes.lisp.

Direct superclasses

port.

Direct methods

check-connection-accepted.

Class: port

Representation of a connection port on a node.

Ports are named places on a node through which connections between nodes can be made.

See UNIT
See CONNECTIONS
See NODE
See SLOT
See CONNECT
See DISCONNECT
See REMOVE-CONNECTION
See CHECK-CONNECTION-ACCEPTED
See SEVER

Package

flow.

Source

nodes.lisp.

Direct superclasses

unit.

Direct subclasses
Direct methods
Direct slots
Slot: connections
Initargs

:connections

Readers

connections.

Writers

(setf connections).

Slot: node
Initargs

:node

Readers

node.

Writers

(setf node).

Slot: name
Initargs

:name

Readers

name.

Writers

(setf name).

Class: port-definition

Superclass for port definition slot classes.

See PORT-TYPE

Package

flow.

Source

static-node.lisp.

Direct subclasses
Direct methods
Direct Default Initargs
InitargValue
:port-typenil
Direct slots
Slot: port-type
Initargs

:port-type

Readers

port-type.

Writers

(setf port-type).

Slot: port-initargs
Readers

port-initargs.

Writers

(setf port-initargs).

Class: static-node

Superclass for all static nodes.

The set of ports of a static node is defined per-class and is thus the same for each instance of the class.

In addition to the standard slot keywords, a node supports the :PORT-TYPE keyword. This takes a symbol as argument, designating the name of the class to use for the port of this slot.

If a slot is a port on the class, connections to other ports may be established through that port.

See NODE
See STATIC-NODE-CLASS
See DEFINE-NODE
See PORTS
See PORT
See SEVER
See CONNECTIONS
See REMOVE-CONNECTION
See DISCONNECT

Package

flow.

Source

static-node.lisp.

Direct superclasses

node.

Direct methods
Class: static-node-class

Metaclass for all static nodes.

This class allows the usage of the :PORT-TYPE initarg on slots. If non-null, the slot is treated as a port of the node, allowing to be used for connections between nodes. When such a slot is accessed normally, it immediately resolves to the PORT-VALUE of the port contained in the slot.

Every port of a port-typed slot is also automatically instantiated upon instantiation of the class itself, ensuring that it is consistent with the definition.

If an access to the actual port object contained in the slot is necessary, the PORT-SLOT-VALUE and PORT-SLOT-BOUNDP functions can be used instead.

See PORT-VALUE
See DIRECT-PORT-DEFINITION
See EFFECTIVE-PORT-DEFINITION
See DEFINE-NODE
See PORT-SLOT-VALUE
See PORT-SLOT-BOUNDP

Package

flow.

Source

static-node.lisp.

Direct superclasses

standard-class.

Direct methods
Class: unit

Superclass for all any entity in a Flow graph.

See ATTRIBUTES
See ATTRIBUTE
See REMOVE-ATTRIBUTE
See WITH-ATTRIBUTES

Package

flow.

Source

nodes.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: attributes
Initform

(make-hash-table :test (quote eql))

Readers

attributes.

Writers

(setf attributes).


5.2 Internals


5.2.1 Ordinary functions

Function: compute-effective-slot-definition-initargs (direct-slotds)
Package

flow.

Source

static-node.lisp.

Function: find-slot-by-name (name slots)

Returns the slot whose name matches the given one.

Package

flow.

Source

toolkit.lisp.

Function: find-slots-by-initarg (key slots)

Returns the list of slots that have key as an initarg.

Package

flow.

Source

toolkit.lisp.

Function: port-slot-boundp (node name)

Test to see whether the actual port object contained in the node’s slot is bound.

For any successfully initialised node, this should
always return T.

See STATIC-NODE
See *RESOLVE-PORT*

Package

flow.

Source

static-node.lisp.

Function: port-slot-value (node slot)

Accessor to the actual port object contained in the node’s slot.

See STATIC-NODE
See *RESOLVE-PORT*

Package

flow.

Source

static-node.lisp.

Function: (setf port-slot-value) (node slot)
Package

flow.

Source

static-node.lisp.


5.2.2 Generic functions

Generic Reader: port-initargs (object)
Package

flow.

Methods
Reader Method: port-initargs ((port-definition port-definition))

automatically generated reader method

Source

static-node.lisp.

Target Slot

port-initargs.

Generic Writer: (setf port-initargs) (object)
Package

flow.

Methods
Writer Method: (setf port-initargs) ((port-definition port-definition))

automatically generated writer method

Source

static-node.lisp.

Target Slot

port-initargs.

Generic Reader: port-name (condition)

Returns the name of the port that was attempted to be accessed.

See DESIGNATOR-NOT-A-PORT

Package

flow.

Methods
Reader Method: port-name ((condition designator-not-a-port))
Source

conditions.lisp.

Target Slot

port-name.


5.2.3 Classes

Class: direct-port-definition

Class for direct port slot definitions

See PORT-DEFINITION
See C2MOP:STANDARD-DIRECT-SLOT-DEFINITION

Package

flow.

Source

static-node.lisp.

Direct superclasses
Class: effective-port-definition

Class for effective port slot definitions

See PORT-DEFINITION
See C2MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION

Package

flow.

Source

static-node.lisp.

Direct superclasses
Direct methods

Appendix A Indexes


A.1 Concepts


A.2 Functions

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

(
(setf attribute): Public generic functions
(setf attribute): Public generic functions
(setf attributes): Public generic functions
(setf attributes): Public generic functions
(setf connections): Public generic functions
(setf connections): Public generic functions
(setf left): Public generic functions
(setf left): Public generic functions
(setf name): Public generic functions
(setf name): Public generic functions
(setf node): Public generic functions
(setf node): Public generic functions
(setf port-initargs): Private generic functions
(setf port-initargs): Private generic functions
(setf port-slot-value): Private ordinary functions
(setf port-type): Public generic functions
(setf port-type): Public generic functions
(setf port-value): Public generic functions
(setf port-value): Public generic functions
(setf ports): Public generic functions
(setf ports): Public generic functions
(setf right): Public generic functions
(setf right): Public generic functions
(setf slot-value-using-class): Public standalone methods

A
a*: Public ordinary functions
allocate-ports: Public ordinary functions
attribute: Public generic functions
attribute: Public generic functions
attributes: Public generic functions
attributes: Public generic functions

C
change-class: Public standalone methods
check-connection-accepted: Public generic functions
check-connection-accepted: Public generic functions
check-connection-accepted: Public generic functions
check-connection-accepted: Public generic functions
check-connection-accepted: Public generic functions
color-nodes: Public ordinary functions
compute-effective-slot-definition: Public standalone methods
compute-effective-slot-definition-initargs: Private ordinary functions
connect: Public generic functions
connect: Public generic functions
connection: Public generic functions
connection: Public generic functions
connection=: Public generic functions
connection=: Public generic functions
connection=: Public generic functions
connections: Public generic functions
connections: Public generic functions
connections: Public generic functions

D
define-node: Public macros
define-port-value-slot: Public macros
direct-slot-definition-class: Public standalone methods
disconnect: Public generic functions
disconnect: Public generic functions
disconnect: Public generic functions
disconnect: Public generic functions
disconnect: Public generic functions

E
effective-slot-definition-class: Public standalone methods
extract-graph: Public ordinary functions

F
find-slot-by-name: Private ordinary functions
find-slots-by-initarg: Private ordinary functions
Function, (setf port-slot-value): Private ordinary functions
Function, a*: Public ordinary functions
Function, allocate-ports: Public ordinary functions
Function, color-nodes: Public ordinary functions
Function, compute-effective-slot-definition-initargs: Private ordinary functions
Function, extract-graph: Public ordinary functions
Function, find-slot-by-name: Private ordinary functions
Function, find-slots-by-initarg: Private ordinary functions
Function, other-node: Public ordinary functions
Function, port-slot-boundp: Private ordinary functions
Function, port-slot-value: Private ordinary functions
Function, target-node: Public ordinary functions
Function, topological-sort: Public ordinary functions
Function, visit: Public ordinary functions

G
Generic Function, (setf attribute): Public generic functions
Generic Function, (setf attributes): Public generic functions
Generic Function, (setf connections): Public generic functions
Generic Function, (setf left): Public generic functions
Generic Function, (setf name): Public generic functions
Generic Function, (setf node): Public generic functions
Generic Function, (setf port-initargs): Private generic functions
Generic Function, (setf port-type): Public generic functions
Generic Function, (setf port-value): Public generic functions
Generic Function, (setf ports): Public generic functions
Generic Function, (setf right): Public generic functions
Generic Function, attribute: Public generic functions
Generic Function, attributes: Public generic functions
Generic Function, check-connection-accepted: Public generic functions
Generic Function, connect: Public generic functions
Generic Function, connection: Public generic functions
Generic Function, connection=: Public generic functions
Generic Function, connections: Public generic functions
Generic Function, disconnect: Public generic functions
Generic Function, left: Public generic functions
Generic Function, message: Public generic functions
Generic Function, name: Public generic functions
Generic Function, new-connection: Public generic functions
Generic Function, node: Public generic functions
Generic Function, node-a: Public generic functions
Generic Function, node-b: Public generic functions
Generic Function, old-connection: Public generic functions
Generic Function, port: Public generic functions
Generic Function, port-initargs: Private generic functions
Generic Function, port-name: Private generic functions
Generic Function, port-type: Public generic functions
Generic Function, port-value: Public generic functions
Generic Function, port-value-boundp: Public generic functions
Generic Function, port-value-makunbound: Public generic functions
Generic Function, ports: Public generic functions
Generic Function, remove-attribute: Public generic functions
Generic Function, remove-connection: Public generic functions
Generic Function, right: Public generic functions
Generic Function, sever: Public generic functions

I
initialize-instance: Public standalone methods

L
left: Public generic functions
left: Public generic functions

M
Macro, define-node: Public macros
Macro, define-port-value-slot: Public macros
Macro, with-attributes: Public macros
message: Public generic functions
message: Public generic functions
Method, (setf attribute): Public generic functions
Method, (setf attributes): Public generic functions
Method, (setf connections): Public generic functions
Method, (setf left): Public generic functions
Method, (setf name): Public generic functions
Method, (setf node): Public generic functions
Method, (setf port-initargs): Private generic functions
Method, (setf port-type): Public generic functions
Method, (setf port-value): Public generic functions
Method, (setf ports): Public generic functions
Method, (setf right): Public generic functions
Method, (setf slot-value-using-class): Public standalone methods
Method, attribute: Public generic functions
Method, attributes: Public generic functions
Method, change-class: Public standalone methods
Method, check-connection-accepted: Public generic functions
Method, check-connection-accepted: Public generic functions
Method, check-connection-accepted: Public generic functions
Method, check-connection-accepted: Public generic functions
Method, compute-effective-slot-definition: Public standalone methods
Method, connect: Public generic functions
Method, connection: Public generic functions
Method, connection=: Public generic functions
Method, connection=: Public generic functions
Method, connections: Public generic functions
Method, connections: Public generic functions
Method, direct-slot-definition-class: Public standalone methods
Method, disconnect: Public generic functions
Method, disconnect: Public generic functions
Method, disconnect: Public generic functions
Method, disconnect: Public generic functions
Method, effective-slot-definition-class: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, left: Public generic functions
Method, message: Public generic functions
Method, name: Public generic functions
Method, new-connection: Public generic functions
Method, node: Public generic functions
Method, node: Public generic functions
Method, node: Public generic functions
Method, node-a: Public generic functions
Method, node-b: Public generic functions
Method, old-connection: Public generic functions
Method, port: Public generic functions
Method, port: Public generic functions
Method, port-initargs: Private generic functions
Method, port-name: Private generic functions
Method, port-type: Public generic functions
Method, port-type: Public generic functions
Method, port-value: Public generic functions
Method, port-value-boundp: Public generic functions
Method, port-value-makunbound: Public generic functions
Method, ports: Public generic functions
Method, ports: Public generic functions
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, remove-attribute: Public generic functions
Method, remove-connection: Public generic functions
Method, remove-connection: Public generic functions
Method, right: Public generic functions
Method, sever: Public generic functions
Method, sever: Public generic functions
Method, sever: Public generic functions
Method, shared-initialize: Public standalone methods
Method, slot-boundp-using-class: Public standalone methods
Method, slot-makunbound-using-class: Public standalone methods
Method, slot-value-using-class: Public standalone methods
Method, validate-superclass: Public standalone methods
Method, validate-superclass: Public standalone methods
Method, validate-superclass: Public standalone methods
Method, validate-superclass: Public standalone methods

N
name: Public generic functions
name: Public generic functions
new-connection: Public generic functions
new-connection: Public generic functions
node: Public generic functions
node: Public generic functions
node: Public generic functions
node: Public generic functions
node-a: Public generic functions
node-a: Public generic functions
node-b: Public generic functions
node-b: Public generic functions

O
old-connection: Public generic functions
old-connection: Public generic functions
other-node: Public ordinary functions

P
port: Public generic functions
port: Public generic functions
port: Public generic functions
port-initargs: Private generic functions
port-initargs: Private generic functions
port-name: Private generic functions
port-name: Private generic functions
port-slot-boundp: Private ordinary functions
port-slot-value: Private ordinary functions
port-type: Public generic functions
port-type: Public generic functions
port-type: Public generic functions
port-value: Public generic functions
port-value: Public generic functions
port-value-boundp: Public generic functions
port-value-boundp: Public generic functions
port-value-makunbound: Public generic functions
port-value-makunbound: Public generic functions
ports: Public generic functions
ports: Public generic functions
ports: Public generic functions
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods

R
remove-attribute: Public generic functions
remove-attribute: Public generic functions
remove-connection: Public generic functions
remove-connection: Public generic functions
remove-connection: Public generic functions
right: Public generic functions
right: Public generic functions

S
sever: Public generic functions
sever: Public generic functions
sever: Public generic functions
sever: Public generic functions
shared-initialize: Public standalone methods
slot-boundp-using-class: Public standalone methods
slot-makunbound-using-class: Public standalone methods
slot-value-using-class: Public standalone methods

T
target-node: Public ordinary functions
topological-sort: Public ordinary functions

V
validate-superclass: Public standalone methods
validate-superclass: Public standalone methods
validate-superclass: Public standalone methods
validate-superclass: Public standalone methods
visit: Public ordinary functions

W
with-attributes: Public macros


A.4 Data types

Jump to:   1  
C   D   E   F   G   I   N   O   P   S   T   U  
Index Entry  Section

1
1-port: Public classes

C
Class, 1-port: Public classes
Class, connection: Public classes
Class, direct-port-definition: Private classes
Class, directed-connection: Public classes
Class, dynamic-node: Public classes
Class, effective-port-definition: Private classes
Class, in-port: Public classes
Class, n-port: Public classes
Class, node: Public classes
Class, out-port: Public classes
Class, port: Public classes
Class, port-definition: Public classes
Class, static-node: Public classes
Class, static-node-class: Public classes
Class, unit: Public classes
Condition, connection-already-exists: Public conditions
Condition, designator-not-a-port: Public conditions
Condition, flow-condition: Public conditions
Condition, graph-contains-cycles: Public conditions
Condition, graph-is-bipartite: Public conditions
Condition, graph-structure-error: Public conditions
Condition, illegal-connection: Public conditions
conditions.lisp: The flow/conditions․lisp file
connection: Public classes
connection-already-exists: Public conditions

D
designator-not-a-port: Public conditions
direct-port-definition: Private classes
directed-connection: Public classes
documentation.lisp: The flow/documentation․lisp file
dynamic-node: Public classes

E
effective-port-definition: Private classes

F
File, conditions.lisp: The flow/conditions․lisp file
File, documentation.lisp: The flow/documentation․lisp file
File, flow.asd: The flow/flow․asd file
File, graph.lisp: The flow/graph․lisp file
File, nodes.lisp: The flow/nodes․lisp file
File, package.lisp: The flow/package․lisp file
File, static-node.lisp: The flow/static-node․lisp file
File, toolkit.lisp: The flow/toolkit․lisp file
flow: The flow system
flow: The flow package
flow-condition: Public conditions
flow.asd: The flow/flow․asd file

G
graph-contains-cycles: Public conditions
graph-is-bipartite: Public conditions
graph-structure-error: Public conditions
graph.lisp: The flow/graph․lisp file

I
illegal-connection: Public conditions
in-port: Public classes

N
n-port: Public classes
node: Public classes
nodes.lisp: The flow/nodes․lisp file

O
out-port: Public classes

P
Package, flow: The flow package
package.lisp: The flow/package․lisp file
port: Public classes
port-definition: Public classes

S
static-node: Public classes
static-node-class: Public classes
static-node.lisp: The flow/static-node․lisp file
System, flow: The flow system

T
toolkit.lisp: The flow/toolkit․lisp file

U
unit: Public classes