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.
The main system appears first, followed by any subsystem dependency.
flow
A flowchart and generalised graph library.
Yukari Hafner <shinmera@tymoon.eu>
Yukari Hafner <shinmera@tymoon.eu>
(GIT https://github.com/Shinmera/flow.git)
zlib
1.0.0
documentation-utils
(system).
closer-mop
(system).
package.lisp
(file).
toolkit.lisp
(file).
conditions.lisp
(file).
nodes.lisp
(file).
static-node.lisp
(file).
graph.lisp
(file).
documentation.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
flow/flow.asd
flow/package.lisp
flow/toolkit.lisp
flow/conditions.lisp
flow/nodes.lisp
flow/static-node.lisp
flow/graph.lisp
flow/documentation.lisp
flow/toolkit.lisp
package.lisp
(file).
flow
(system).
find-slot-by-name
(function).
find-slots-by-initarg
(function).
flow/conditions.lisp
toolkit.lisp
(file).
flow
(system).
connection
(reader method).
connection-already-exists
(condition).
designator-not-a-port
(condition).
flow-condition
(condition).
graph-contains-cycles
(condition).
graph-is-bipartite
(condition).
graph-structure-error
(condition).
illegal-connection
(condition).
message
(reader method).
new-connection
(reader method).
node
(reader method).
node
(reader method).
node-a
(reader method).
node-b
(reader method).
old-connection
(reader method).
port-name
(reader method).
flow/nodes.lisp
conditions.lisp
(file).
flow
(system).
1-port
(class).
attribute
(method).
(setf attribute)
(method).
attributes
(reader method).
(setf attributes)
(writer method).
check-connection-accepted
(generic function).
connect
(method).
connection
(class).
connection=
(method).
connection=
(method).
connections
(method).
connections
(reader method).
(setf connections)
(writer method).
directed-connection
(class).
disconnect
(method).
disconnect
(method).
disconnect
(method).
disconnect
(method).
dynamic-node
(class).
in-port
(class).
left
(reader method).
(setf left)
(writer method).
n-port
(class).
name
(reader method).
(setf name)
(writer method).
node
(reader method).
(setf node)
(writer method).
node
(class).
other-node
(function).
out-port
(class).
port
(method).
port
(class).
ports
(reader method).
(setf ports)
(writer method).
print-object
(method).
print-object
(method).
print-object
(method).
remove-attribute
(method).
remove-connection
(method).
remove-connection
(method).
right
(reader method).
(setf right)
(writer method).
sever
(method).
sever
(method).
sever
(method).
target-node
(function).
unit
(class).
with-attributes
(macro).
flow/static-node.lisp
nodes.lisp
(file).
flow
(system).
*resolve-port*
(special variable).
change-class
(method).
compute-effective-slot-definition
(method).
define-node
(macro).
define-port-value-slot
(macro).
direct-slot-definition-class
(method).
effective-slot-definition-class
(method).
initialize-instance
(method).
port
(method).
port-definition
(class).
port-type
(method).
port-type
(reader method).
(setf port-type)
(writer method).
port-value
(method).
(setf port-value)
(method).
port-value-boundp
(method).
port-value-makunbound
(method).
ports
(method).
shared-initialize
(method).
slot-boundp-using-class
(method).
slot-makunbound-using-class
(method).
(setf slot-value-using-class)
(method).
slot-value-using-class
(method).
static-node
(class).
static-node-class
(class).
validate-superclass
(method).
validate-superclass
(method).
validate-superclass
(method).
validate-superclass
(method).
compute-effective-slot-definition-initargs
(function).
direct-port-definition
(class).
effective-port-definition
(class).
port-initargs
(reader method).
(setf port-initargs)
(writer method).
port-slot-boundp
(function).
port-slot-value
(function).
(setf port-slot-value)
(function).
flow/graph.lisp
static-node.lisp
(file).
flow
(system).
a*
(function).
allocate-ports
(function).
color-nodes
(function).
extract-graph
(function).
topological-sort
(function).
visit
(function).
Packages are listed by definition order.
flow
org.shirakumo.flow
common-lisp
.
*resolve-port*
(special variable).
1-port
(class).
a*
(function).
allocate-ports
(function).
attribute
(generic function).
(setf attribute)
(generic function).
attributes
(generic reader).
(setf attributes)
(generic writer).
check-connection-accepted
(generic function).
color-nodes
(function).
connect
(generic function).
connection
(generic reader).
connection
(class).
connection-already-exists
(condition).
connection=
(generic function).
connections
(generic function).
(setf connections)
(generic writer).
define-node
(macro).
define-port-value-slot
(macro).
designator-not-a-port
(condition).
directed-connection
(class).
disconnect
(generic function).
dynamic-node
(class).
extract-graph
(function).
flow-condition
(condition).
graph-contains-cycles
(condition).
graph-is-bipartite
(condition).
graph-structure-error
(condition).
illegal-connection
(condition).
in-port
(class).
left
(generic reader).
(setf left)
(generic writer).
message
(generic reader).
n-port
(class).
name
(generic reader).
(setf name)
(generic writer).
new-connection
(generic reader).
node
(generic reader).
(setf node)
(generic writer).
node
(class).
node-a
(generic reader).
node-b
(generic reader).
old-connection
(generic reader).
other-node
(function).
out-port
(class).
port
(generic function).
port
(class).
port-definition
(class).
port-type
(generic function).
(setf port-type)
(generic writer).
port-value
(generic function).
(setf port-value)
(generic function).
port-value-boundp
(generic function).
port-value-makunbound
(generic function).
ports
(generic function).
(setf ports)
(generic writer).
remove-attribute
(generic function).
remove-connection
(generic function).
right
(generic reader).
(setf right)
(generic writer).
sever
(generic function).
static-node
(class).
static-node-class
(class).
target-node
(function).
topological-sort
(function).
unit
(class).
visit
(function).
with-attributes
(macro).
compute-effective-slot-definition-initargs
(function).
direct-port-definition
(class).
effective-port-definition
(class).
find-slot-by-name
(function).
find-slots-by-initarg
(function).
port-initargs
(generic reader).
(setf port-initargs)
(generic writer).
port-name
(generic reader).
port-slot-boundp
(function).
port-slot-value
(function).
(setf port-slot-value)
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
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.
flow
.
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
flow
.
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
flow
.
Shorthand macro to access the given attributes through a variable.
This is similar to WITH-SLOTS.
See UNIT
See ATTRIBUTE
See CL:WITH-SLOTS
flow
.
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
flow
.
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
flow
.
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.
flow
.
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
flow
.
Return the node on the other side of the connection.
This works with both directed and undirected connections.
See TARGET-NODE
flow
.
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
flow
.
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
flow
.
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.
flow
.
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
Accessor to the unit’s hash table of attributes.
See UNIT
See ATTRIBUTE
See REMOVE-ATTRIBUTE
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
flow
.
progn
.
:most-specific-first
directed-connection
) (port out-port
)) ¶directed-connection
) (port in-port
)) ¶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
Returns the connection that could not be added.
See ILLEGAL-CONNECTION
flow
.
illegal-connection
)) ¶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
flow
.
directed-connection
) (b directed-connection
)) ¶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
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=
Accessor to the "left" port of a connection.
See CONNECTION
flow
.
connection
)) ¶automatically generated reader method
left
.
flow
.
connection
)) ¶automatically generated writer method
left
.
Returns a reason for the failure.
See ILLEGAL-CONNECTION
flow
.
illegal-connection
)) ¶Returns the new connection that was attempted to be added.
See CONNECTION-ALREADY-EXISTS
flow
.
connection-already-exists
)) ¶Accessor to the node this port is home to.
See PORT
flow
.
graph-contains-cycles
)) ¶node
.
designator-not-a-port
)) ¶node
.
Returns the first node associated with the failure.
See GRAPH-IS-BIPARTITE
flow
.
graph-is-bipartite
)) ¶Returns the second node associated with the failure.
See GRAPH-IS-BIPARTITE
flow
.
graph-is-bipartite
)) ¶Returns the old connection that already exists on the ports.
See CONNECTION-ALREADY-EXISTS
flow
.
connection-already-exists
)) ¶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
flow
.
static-node
) (name symbol
)) ¶dynamic-node
) (name symbol
)) ¶Accessor to the port type contained in this slot.
See PORT-DEFINITION
flow
.
slot-definition
)) ¶port-definition
)) ¶automatically generated reader method
flow
.
port-definition
)) ¶automatically generated writer method
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
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
Makes the value slot in this static port unbound.
See STATIC-NODE
See PORT-VALUE
See PORT-VALUE-BOUNDP
See DEFINE-PORT-VALUE-SLOT
Returns a list of port objects that the node contains.
This list may not be fresh and thus must not be modified.
See NODE
flow
.
static-node
)) ¶dynamic-node
)) ¶automatically generated reader method
flow
.
dynamic-node
)) ¶automatically generated writer method
Remove the named attribute from the unit.
See ATTRIBUTES
See ATTRIBUTE
See UNIT
Remove the given connection from the unit.
See PORT
See NODE
See CONNECTIONS
Accessor to the "right" port of a connection.
See CONNECTION
flow
.
connection
)) ¶automatically generated reader method
flow
.
connection
)) ¶automatically generated writer method
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
static-node-class
) &rest initargs) ¶static-node-class
) name direct-slots) ¶sb-mop
.
static-node-class
) &rest initargs) ¶sb-mop
.
static-node-class
) &rest initargs &key port-type port-initargs) ¶sb-mop
.
port-definition
) &rest initargs &key &allow-other-keys) ¶connection
) stream) ¶directed-connection
) stream) ¶static-node-class
) object (slot effective-port-definition
)) ¶sb-mop
.
static-node-class
) object (slot effective-port-definition
)) ¶sb-mop
.
static-node-class
) object (slot effective-port-definition
)) ¶sb-mop
.
static-node-class
) object (slot effective-port-definition
)) ¶sb-mop
.
static-node-class
) (superclass static-node-class
)) ¶sb-mop
.
static-node-class
) (superclass standard-class
)) ¶sb-mop
.
standard-class
) (superclass static-node-class
)) ¶sb-mop
.
static-node-class
) superclass) ¶sb-mop
.
Error signalled if an equivalent connection is added.
See NEW-CONNECTION
See OLD-CONNECTION
See FLOW-CONDITION
flow
.
error
.
flow-condition
.
:new-connection
This slot is read-only.
:old-connection
This slot is read-only.
Error signalled when a port is accessed that does not exist.
See NODE
See PORT-NAME
flow
.
error
.
flow-condition
.
Base type for all conditions from the Flow library.
flow
.
condition
.
Error signalled if the graph is cyclic.
This error is signalled on algorithms that expect
an acyclic graph.
See NODE
See GRAPH-STRUCTURE-ERROR
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
flow
.
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
flow
.
error
.
flow-condition
.
Error signalled if the connection is not permitted by the ports.
See CONNECTION
See MESSAGE
See FLOW-CONDITION
flow
.
error
.
flow-condition
.
:connection
This slot is read-only.
A port that only accepts a single connection.
See PORT
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
A connection for which information only flows from left to right.
See CONNECTION
flow
.
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
A port that only accepts incoming connections.
See PORT
A port that accepts an arbitrary number of connections.
See PORT
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
A port that only accepts outgoing connections.
See 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
Superclass for port definition slot classes.
See PORT-TYPE
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
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
flow
.
standard-class
.
change-class
.
compute-effective-slot-definition
.
direct-slot-definition-class
.
effective-slot-definition-class
.
slot-boundp-using-class
.
slot-makunbound-using-class
.
(setf slot-value-using-class)
.
slot-value-using-class
.
validate-superclass
.
validate-superclass
.
validate-superclass
.
validate-superclass
.
Superclass for all any entity in a Flow graph.
See ATTRIBUTES
See ATTRIBUTE
See REMOVE-ATTRIBUTE
See WITH-ATTRIBUTES
flow
.
connection
.
node
.
port
.
(make-hash-table :test (quote eql))
Returns the slot whose name matches the given one.
flow
.
Returns the list of slots that have key as an initarg.
flow
.
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*
flow
.
Accessor to the actual port object contained in the node’s slot.
See STATIC-NODE
See *RESOLVE-PORT*
flow
.
flow
.
port-definition
)) ¶automatically generated reader method
flow
.
port-definition
)) ¶automatically generated writer method
Returns the name of the port that was attempted to be accessed.
See DESIGNATOR-NOT-A-PORT
flow
.
designator-not-a-port
)) ¶Class for direct port slot definitions
See PORT-DEFINITION
See C2MOP:STANDARD-DIRECT-SLOT-DEFINITION
flow
.
port-definition
.
standard-direct-slot-definition
.
Class for effective port slot definitions
See PORT-DEFINITION
See C2MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION
flow
.
port-definition
.
standard-effective-slot-definition
.
Jump to: | (
A C D E F G I L M N O P R S T V W |
---|
Jump to: | (
A C D E F G I L M N O P R S T V W |
---|
Jump to: | *
A C L M N O P R S |
---|
Jump to: | *
A C L M N O P R S |
---|
Jump to: | 1
C D E F G I N O P S T U |
---|
Jump to: | 1
C D E F G I N O P S T U |
---|