Common Lisp Package: CL-BAYESNET

A Common Lisp Bayesian Network Inference Engine

README:

cl-bayesnet - a Common Lisp Bayesian Network Inference Engine #

Overview ##

cl-bayesnet is a tool for the compilation and probability calculation of discrete, probabilistic Bayesian Networks.

It provides two types of compilation. The first is join-tree compilation. A join-tree is an auxiliary structure which uses message passing to calculate local probabilities given evidence in a network. Compiling a Bayesian Network to a join tree is quick, but message passing is relatively slow. The join tree's space cost should also be taken into account.

The second type of compilation compiles the Bayesian Network into an Arithmetic Circuit, which is written as a series of arithmetic instructions. These instructions can be interpreted on the fly, or written out as source code for a compiler such as gcc. The compilation process is quite slow, but the instructions are evaluated much faster than message passing (using my implementation, anyway). My tests showed approximately 70x speed up of interpreted instructions over message passing, and then the C compiled instructions executed 20x faster than interpreted instructions!

An additional advantage of the arithmetic circuit is that it compiles to a single, standalone function. That means it is perfect for embedded systems, and can be used anywhere, without dependence on any library at all! An absolutely minimal footprint.

 Scope and Goals ##

The scope of cl-bayesnet is just Bayesian Network compilation and probability calculation. There is no API for building or modifying a Bayesian Network. There are no modelling tools. There is no GUI. These tools already exist, and have done for years.

However, there are not many free, open-source Bayesian Network probability calculators. http://sourceforge.net/projects/bnj/ is the only other open-source one I know of. I know of no other project which can compile direct to machine code (through gcc) like cl-bayesnet can.

The goals of this project is to be useful to developers who want to use the results of their Bayesian Network modelling freely in any domain. If there is demand, compilation to pure Java and compilation to pure Lisp can be quickly developed.

 Highlights ##

  • Load from dne, ace, xmlbif formats.
  • Simple query API.
  • Use message passing or arithmetic circuit methods.
  • Embeddable C code generation. Other languages such as Java and Lisp are possible.

Using cl-bayesnet ##

Dependencies

cl-bayesnet uses S-XML to parse xmlbif. It uses trivial-shell to call the C compiler and CFFI to load the resultant shared object file. You can disable the dependencies on CFFI and trivial-shell by adding :cl-bayesnet-no-cffi to your Lisp's features list.

All dependencies are available through quicklisp.

Installation

I suggest using quicklisp. Install that, and then grab the source (via tarball or git) and put it in ~/quicklisp/local-projects/. Symlinks work okay too.

Documentation

See the API-Documentation on github. It may not necessarily be up to date.

Or, use make-api-doc.sbcl in this directory to make the API documentation (cl-bayesnet.html). This assumes you have quicklisp and sbcl installed.

Usage

See tests/test-alarm.lisp for example usage.

Ownership and License ##

cl-bayesnet's contributors are listed in the AUTHORS file. The authors of cl-bayesnet grant you use of this software under the terms of the Lisp Lesser General Public License (LLGPL). For details see the files COPYING, COPYING.LESSER and COPYING.LISP in this directory.

Contributing ##

If you find problems with this library please take the time to report the issue. This helps you by increasing the chance the issue will be fixed. It helps motivate me by letting me know the library is being used. It helps everyone when the fixed issue creates a stronger codebase.

To report an issue, use the cl-bayesnet issue tracker at github.com.

For issue fixes and improvements, I prefer pull requests. Simple one or two liner fixes are okay over email for now.

FUNCTION

Public

LOAD-ACE (FILE)

Load a file in ace file format. Returns a net.

LOAD-DNE (FILE)

Load a file in Netica's dne file format. Returns a net.

LOAD-XMLBIF (FILE)

Load a file in xmlbif file format. Returns a net.

QUERY (OBJECT &OPTIONAL QUERY)

Queries a net or node object. node only - A probability vector for the states of node. node and integer - The probability the node is in that numbered state (according to (states node)). node and symbol - The probability the node is in that state. node and list - A probability vector for the states of node given list, which is a plist of node-state pairs. net only - The joint probability for the whole net. net and vector - The joint probability for the whole net, given the vector. Vector has the num-nodes length, and contains either a state number for each node, or -1 if the node state is unknown. net and symbol - A probability vector for the states of the node designated by symbol. net and list - The joint probability for the whole net, given list, which is a plist of node-state pairs.

USE-COMPILED-C (NET &OPTIONAL SOURCE-LOCATION)

Writes out arithmetic circuit instructions to a c file, compiles it with gcc, loads the shared object, and prepares the net to use the loaded function. If source-location is specified, writes the c file there. Otherwise uses a temporary file. Returns the closure used, the raw cffi function pointer, and the number of instructions.

USE-INTERPRETED (NET)

Use interpreted arithmetic circuit instructions for the net. Returns the instructions object.

USE-JOIN-TREE (NET)

Use a join-tree to evaluate this net. Returns the join-tree object.

Private

%TRIE-MAP-KEY-VALUE (FN KEY TRIE NEW-TRIE)

Create a new trie with the same structure as trie, applying fn to the key and the old trie node.

%TRIE-MAP-TRIE (FN NEW-TRIE TRIE &REST TRIES)

Create a new trie with the same structure as trie, applying fn to each trie-node in turn.

ASSIGN-NODES (NET CLIQUES)

Returns an assignment of a clique node for each net node. Since lookup within a clique is sequential, just uses an array of lists. An array of assignments from the node perspective is returned as a second value.

BEST (SEQ/HASH COMPARE &KEY (KEY #'IDENTITY))

Returns the best value in seq/hash, along with its position (or key for the hash), according to compare. The comparison value is returned as a third value. key extracts the value to be used for comparison.

BEST-IN-ARRAY (ARRAY COMPARE &KEY (KEY #'IDENTITY))

return the best value in array, along with its position and its comparison value. See best.

BEST-IN-HASH (HASH COMPARE &KEY (KEY #'IDENTITY))

return the best value in hash along with its hash-key and its comparison value. See best.

BEST-IN-LIST (LIST COMPARE &KEY (KEY #'IDENTITY))

return the best value in list, along with its position and its comparison value. See best.

CLIQUE-TREE (NET)

Builds a clique-tree for dag. The tree is represented by an upper triangular matrix which has lists of clique-nodes in its diagonal.

CLUSTER-NODE (GRAPH NODE)

Generates a list of added links (node1 . node2) which are necessary to form a cluster around node. Uses an (edge-tree).

COMPOSE (&REST FNS)

Create a function which is the composition of the given functions.

CPT-INCF (ATT-STATE ATT-MASK)

Increments att-state according to att-mask; att-state and att-mask are vectors. att-mask is nil for non-included attributes and the number of values for included attributes. It takes (reduce #'* (remove nil att-mask)) to iterate through att-state. att-state must be a positive integer below the mask's value, wherever mask is non-nil.

CPT-INDEX (MASK ATT-STATE)

Given the mask and att-state, return an index. Used to map attribute values to a single lookup value in a table.

DEGEN-PROB (I LENGTH)

Creates a 0-vector of the given length, with the i'th argument set to 1.

DELETE-NODE (GRAPH NODE)

Remove references to the node from graph. Replaces the node with t

DIMENSION-LIST (LIST)

Calculates the dimensionality of the list. EG: (make-array (dimension-list list) :initial-contents list)))

DIMENSION-LIST-BUT-ONE (LIST)

Calculates the dimensionality of the list, minus one. EG: (make-array (dimension-list list) :initial-contents list)))

EMIT-C-PREAMBLE (FUNC-NAME NET-SPEC STREAM)

Write out the matching function for state and val. Returns 1.0 if state is negative (missing) or state = val. Returns 0.0 otherwise.

FLOAT-TO-FIXNUMS (FLOAT)

This converts a float to a list of fixnums, useful for hashing floats using fixnum-based schemes.

FLOYD-WARSHALL (GRAPH)

This finds all shortest paths in graph. I could make it more efficient by using the fact that the paths are symmetric.

GEN-CLIQUES (NET GRAPH)

Graph is an array of (itree), where each tree contains that node's neighbours. Returns a list of cliques obtained from triangulating the graph. The triangulation can be recovered by starting with a moral graph and ensuring each clique is completely connected. Each clique is an itree of nodes. Destroys graph.

GEN-INSTRUCTIONS (NET)

Generate an arithmetic circuit for the bn represented by a net (bn.lisp). Note that this version assumes the clique-tree is a single tree (which is correct at 15/12/2007).

GEN-PARAMETER (NET NET-STATE NODE-NUM)

Generate a parameter for the net with the given net-state and node-num.

GEN-SEPARATOR (NET INS NET-STATE TRAVERSAL DEPTH)

bn - a net object. clique-tree - a clique-tree built from the bn's dag. Symmetric array with node-num lists on the diagonal and t where connected. node-assignment - (aref node-assignment node-num) == node's clique index. net-state - array of the current node states. Nil means the node hasn't been processed. traversal - the current traversal to operate on: (clique trav1 ... travn) depth - the current depth of the traversal.

HASH-TO-TRIE (HASH &KEY (TRIE (MAKE-TRIE TEST (HASH-TABLE-TEST HASH))) (TRIE-KEY #'IDENTITY) (TRIE-VALUE #'IDENTITY) BAGP)

Add the elements of hash to the given trie (if no trie is given, make one with the same test as the hash table. trie-key (default #'identity) is a function to apply to the hash-key. It should convert the hash-key to a list of atoms which are compatible with the trie's test. trie-value (default #'identity) is a function to extract the value of interest from the actual value (or the key if bagp is non-nil) held in the hash.

JT-OBS (JT NODE-NUM OBS)

Enter the observation that node-num is obs.

JT-PROB (JT NODE-NUM)

Calculates the probability of node-num given junction tree jt.

JUNCTION-P (CLIQUES TREE)

Test whether the tree is in fact a junction tree, meaning for each pair of cliques, all cliques in between contain their intersection.

MAKE-TRIE-HASH (ALIST &KEY (TEST 'EQL))

Converts a trie alist to a trie-specific hash.

MAP-INT (FN N)

Map fn across integers from 0 below n, returning the results in an (ordered) list.

MAP-PAIRS (FN LIST)

applies fn to each pair of items and returns a list of the resulting values. > (map-pairs #'cons '(1 2 3 4)) => ((1 . 2) (1 . 3) (1 . 4) (2 . 3) (2 . 4) (3 . 4))

MAPARRAY (FN ARRAY)

maparray applies fn to all elements in array, returning the result in an array the same dimension as the first array

MARGINALISE (SEP-SET CLUSTER)

Return a new potential for sep-set to match cluster.

MATCH (VAL1 VAL2)

Matches evidence.

NEIGHBOURS (GRAPH NODE-NUM)

Generates a list of neighbours of the node.

NET-GRAPH (NET)

Output the net's structure in a viewable form.

NET-MASKS (NET CLIQUES TRAVERSAL)

Shadowing traversal, returns (tree-node node-mask combinations) for each tree-node in traversal.

NODE-COMBINATIONS (INITIAL NODE-MASK)

Returns a vector of all node index combinations built from initial. node-mask is a vector which is nil for non-incremented nodes and numstates for included nodes. DEPRECATED for being horribly slow.

NORMALIZE (VEC &OPTIONAL SMOOTHING-FACTOR)

Normalize a vector. Optionally adds smoothing-factor (which should be a number) to each element first. If tot is less than or equal to 0.

ORDER-VECTOR (END &OPTIONAL (START 0))

Create a vector of length (end - start), filled with numbers from start...(end - 1). Start defaults to 0.

PARSE-ACE-STREAM (STREAM &KEY (NET (MAKE-INSTANCE 'NET)))

Idea taken from trivial-configuration-parser by Brian Mastenbrook.

PARSE-NETICA-STREAM (STREAM &KEY (NET (MAKE-INSTANCE 'NET)))

Idea taken from trivial-configuration-parser by Brian Mastenbrook.

POST-PROCESS-PLUS (DEPTH ARGS INS)

Puts the form in canonical form for insertion.

POST-PROCESS-TIMES (DEPTH ARGS INS)

Puts the form in canonical form for insertion.

PREPROCESS-NETWORK (NET)

Readies the network for efficient lookup. Sets a node ordering for the network. Also sets node parent-vec and parent-indices.

PREPROCESS-NODE (NODE)

Store information for efficient lookup.

PUSH-FORM (FORM INS &OPTIONAL DEPTH)

Pushes a form onto instructions, and returns an index into forms. Won't actually add a form if a matching one exists (acts like pushnew).

ROOTS (GRAPH)

Returns the roots of the graph as a list.

SEP-COST (A B STATES)

Find prod states of x in X + prod states of y in Y. clique1 and clique2 are lists, states is a vector.

SEP-MASS (A B)

Find |intersection| of lists clique1 and clique2

SYMMETRIC (ARRAY X Y)

Treat 2D array as a symmetric array. Settable.

TRAVERSE (TREE &OPTIONAL (ROOT 0))

Builds a traversal for the undirected tree structure tree. Structure is ;(tree-node subtraversal1 ... subtraversaln)

TRIE-BOTTOM-P (TRIE)

Returns t if the given trie has no branches.

TRIE-BRANCH (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

TRIE-BRANCH-COUNT (TRIE)

Count the number of branches of trie.

TRIE-BRANCH-VALUES (TRIE)

Return (key . trie-value) for each branch of trie.

TRIE-CLEAR (TRIE)

Empties the trie, but leaves the test as is.

TRIE-COUNT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

TRIE-INSERT (VALUE TRIE KEY)

Insert the value in the trie with the given key. Returns the accessed trie node.

TRIE-LIST-BOTTOM (TRIE)

List all values at the bottom of the trie (i.e. values of all tries with no branches).

TRIE-LIST-DEPTH (TRIE DEPTH)

List all values at the given depth (0 is the top level).

TRIE-LIST-VALUES (TRIE)

Recursively list all values in the trie.

TRIE-MAP-B (FN TRIE)

Apply fn to each branch of trie. Returns the trie.

TRIE-MAP-BRANCHES (FN TRIE)

Apply fn to each branch of trie. Returns a list of the returned values.

TRIE-MAP-KEY-VALUE (FN TRIE)

Create a new trie with the same structure as trie, applying fn to the key and the old trie node.

TRIE-MAP-TRIE (FN TRIE &REST TRIES)

Apply fn to the given trie and its children, returning the results as the values of a matching trie.

TRIE-MAP-VALUES (FN TRIE)

Apply fn to the given trie's non-nil values, returning the results as the values of a matching trie.

TRIE-PRUNE (TO-PRUNE EXAMPLE)

Recursively remove all branches in to-prune that don't also appear in example, thus to-prune is guaranteed to be as small as example or smaller.

TRIE-TEST (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

TRIE-VALUE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

VECFN (FN NUM)

Build a vector by calling fn num times.

WEIGHT-CLUSTER (NET GRAPH NODE)

a cluster's weight is the product of its nodes' states.

Undocumented

%EVIDENCE-1 (NET ARRAY)

ADD-FORM (FORM INS &OPTIONAL DEPTH)

BEST-ROOT (TREE)

BEST-TRAVERSAL (NET INS)

COLLECT-EVIDENCE (JT CLUSTER)

CONNECT (GRAPH A B)

COPY-ARRAY (ARRAY)

COPY-TRIE (INSTANCE)

CYCLE (GRAPH A)

DISTRIBUTE-EVIDENCE (JT CLUSTER)

EDGE< (EDGE1 EDGE2)

EDGE= (EDGE1 EDGE2)

EMIT-C-DOUBLE (DOUBLE)

EMIT-C-FORMS (FUNC-NAME NET-SPEC FORMS STREAM)

EMIT-C-NET (NET STREAM)

FIND-TEMPORARY-FILE (PREFIX SUFFIX &OPTIONAL (DIRECTORY *TEMPORARY-DIRECTORY*))

GEN-CLIQUE (NET INS NET-STATE TRAVERSAL DEPTH)

GEN-EVIDENCE (NET NET-STATE NODE-NUM)

GET-* (INS VALS DEPTH)

GET-+ (INS VALS DEPTH)

GET-MATCH (INS NODE-NUM VALUE)

INTERPRET (INS NET-SPEC)

JT-PROPAGATE (JT)

JT-RETRACT (JT)

KEYIFY (STRING)

MAKE-JOIN-TREE (NET)

MAKE-POTENTIAL (NET CLUSTER ASSIGNMENT)

MAKE-TRIE (&KEY ((VALUE DUM0) NIL) ((COUNT DUM1) 0) ((TEST DUM2) 'EQL) ((BRANCH DUM3) NIL))

MAKE-VECTOR (LEN &OPTIONAL INITARG)

MORAL (NET)

NEIGHBOUR (GRAPH A B)

NUM-ARCS (NET)

NUM-NODES-1 (NET)

NUM-STATES-1 (NODE)

PARSE-ACE-NODE (NAME LIST)

PARSE-ACE-POTENTIAL (NET PARENTS DATA-LIST)

PARSE-NETICA-NET (LIST &KEY (NET (MAKE-INSTANCE 'NET)))

PARSE-NETICA-NODE (NAME LIST)

PATH (GRAPH A B)

RANDOM-CHOOSE (SEQ)

RANDOM-EVIDENCE (NET &OPTIONAL (NET-SPEC (MAKE-ARRAY (NUM-NODES NET) ELEMENT-TYPE 'FIXNUM)) (ARR (RETURNIT (MAKE-ARRAY (NUM-NODES NET) ELEMENT-TYPE 'FIXNUM) (DOTIMES (I (NUM-NODES NET)) (SETF (AREF IT I) I)))))

RANDOM-GRAPH (NUM-NODES NUM-ARCS &KEY ENSURE-CONNECTED)

RANDOM-NETWORK (MAX-STATES &REST RANDOM-GRAPH-ARGS)

RANDOM-PROB (NUM-STATES)

RANDOM-TABLE (NODE)

SEP-SETS (CLIQUES STATES)

SET-* (INS VALS FORM-NUM DEPTH)

SET-+ (INS VALS FORM-NUM DEPTH)

SET-MATCH (INS NODE-NUM VALUE FORM-NUM)

SPLIT (P X)

SPLIT-PROBS (PROBS PROB-LENGTH)

STATEP (NODE STATE)

SETFSYMMETRIC (VAL ARRAY X Y)

TABLE-LOOKUP (TABLE INDICES)

TEST-NET-RANDOM (NET &OPTIONAL (ITERATIONS 100))

TREE-DEPTH (TREE ROOT)

SETFTRIE-BRANCH (NEW-VALUE INSTANCE)

SETFTRIE-COUNT (NEW-VALUE INSTANCE)

TRIE-P (OBJECT)

SETFTRIE-TEST (NEW-VALUE INSTANCE)

SETFTRIE-VALUE (NEW-VALUE INSTANCE)

XMLBIF-ADD-DEFINITION (NET DEF)

XMLBIF-ADD-VARIABLE (NET NODE)

MACRO

Public

WITH-EVIDENCE ((NET &REST EVIDENCE) &BODY BODY)

Saves the existing evidence in the net and sets the evidence to evidence. Restores the net to its previous state after leaving the with-evidence block.

Private

AIF (TEST-FORM THEN-FORM &OPTIONAL ELSE-FORM)

Anaphoric if. (lexically sets 'it' to the test-form, which can then be referenced in then-form and else-form.

AWHEN (TEST-FORM &BODY BODY)

Anaphoric when. See aif.

DO-TRIE-BRANCHES ((NEXT-TRIE TRIE &OPTIONAL RESULT) &BODY BODY)

Loop over the trie's branches.

DO-UPPER ((I J LEN &OPTIONAL RESULT) &BODY BODY)

do for upper triangular i and j. i from 0 to len, j from i+1 to len.

MULTF (REF MULTIPLIER)

(setf ref (* ref multiplier)). Like incf.

RETURNIT (VAL &BODY BODY)

An anaphorous macro. binds the first val to `it', allows possible modifications in the body, then returns the values. A more general prog1.

WHILE (EXPR &BODY BODY)

Continue performing body until expr is false.

WITH-CALCULATION (LABEL &BODY BODY)

Unless label is nil, caches the calculation performed by body using label. If there is no calculation-context, does not evaluate label, so don't rely on side effects.

WITH-CALCULATION-CONTEXT ((&OPTIONAL (TEST 'EQUALP)) &BODY BODY)

Defines a calculation context within which calculations performed within with-calculation are cached according to their label.

Undocumented

DO-TRIE-VALUES ((VALUE TRIE &OPTIONAL RETVAL) &BODY BODY)

MULTIPLY-FLOATS (FLOATS)

RESET-POTENTIAL (PLACE)

SAVE-EVIDENCE (OBJECT &BODY BODY)

SUM-FLOATS (FLOATS)

VLENGTH (VEC)

WITH-GENSYMS ((&REST SYMBOLS) &BODY BODY)

GENERIC-FUNCTION

Public

ADD-EVIDENCE (OBJECT EVIDENCE)

Sets the evidence in a node via state index or symbol. For a net or join-tree, adds the evidence as a plist of node-state pairs.

CLEAR-EVIDENCE (OBJECT)

Clear all evidence from object.

EVIDENCE (OBJECT)

Returns the evidence in a node as its state symbol (nil if no evidence), and for nets and join-trees a plist of node-state pairs. Settable.

SETFEVIDENCE (EVIDENCE OBJECT)

Sets the evidence in a node via state index or symbol. For a net or join-tree, sets the evidence as either a plist of node-state pairs, or a vector of state indices (or -1 for unobserved) corresponding to the net's node-order.

EVIDENCE-INDEX (OBJECT)

Returns the evidence in a node as a state index and nets as a vector of state indices. -1 indicates no evidence.

NODE (NAME/INDEX NET/JOIN-TREE)

Retrieve the node represented by a keyword name or index from the given net or join-tree.

Private

%QUERY (NET QUERY)

Query a net/node.

SHUFFLE (OBJECT)

Randomise the object, which should represent a sequence.

Undocumented

EVIDENCE-1 (OBJECT)

MESSAGE-PASS (JT CLIQUE1 CLIQUE2)

SLOT-ACCESSOR

Public

NAME (NET/NODE)

The For a net, a string identifier and for a node, a keyword identifier.

NET (NODE/JOIN-TREE)

The Returns the containing net for a node or join-tree.

NODE-ORDER (NET)

The Returns a list of node-names as keywords. The ordering matches their index order. This is set as part of the network compilation process.

NUM-NODES (NET)

The The amount of nodes in the network.

NUM-STATES (NODE)

The The amount of states for the given node.

PARENTS (NODE)

The A vector of parent names as keywords for the given node.

STATES (NODE)

The A vector of state names as keywords for the given node.

Private

Undocumented

%EVIDENCE (OBJECT)

SETF%EVIDENCE (NEW-VALUE OBJECT)

*-LOOKUP (OBJECT)

+-LOOKUP (OBJECT)

ALL-SEP-SETS (OBJECT)

ASSIGNMENT (OBJECT)

SETFASSIGNMENT (NEW-VALUE OBJECT)

CLEAN-POTENTIAL (OBJECT)

CLIQUES (OBJECT)

SETFCLIQUES (NEW-VALUE OBJECT)

CLUSTERS (OBJECT)

COMPILED (OBJECT)

SETFCOMPILED (NEW-VALUE OBJECT)

CONSISTENT (OBJECT)

SETFCONSISTENT (NEW-VALUE OBJECT)

EVI (OBJECT)

SETFEVI (NEW-VALUE OBJECT)

FORM-COUNT (OBJECT)

SETFFORM-COUNT (NEW-VALUE OBJECT)

FORMS (OBJECT)

SETFFORMS (NEW-VALUE OBJECT)

INDEX (OBJECT)

SETFINDEX (NEW-VALUE OBJECT)

JOIN-TREE-OF (OBJECT)

SETFJOIN-TREE-OF (NEW-VALUE OBJECT)

MARK (OBJECT)

SETFMARK (NEW-VALUE OBJECT)

MASK (OBJECT)

MATCH-LOOKUP (OBJECT)

NODE-VEC (OBJECT)

SETFNODE-VEC (NEW-VALUE OBJECT)

NODES (OBJECT)

OBS (OBJECT)

SETFOBS (NEW-VALUE OBJECT)

PARENT-INDICES (OBJECT)

SETFPARENT-INDICES (NEW-VALUE OBJECT)

PARENT-VEC (OBJECT)

SETFPARENT-VEC (NEW-VALUE OBJECT)

POTENTIAL (OBJECT)

SETFPOTENTIAL (NEW-VALUE OBJECT)

PROPERTIES (OBJECT)

SET-NAME (NEW-VALUE OBJECT)

SET-NET (NEW-VALUE OBJECT)

SET-NODE-ORDER (NEW-VALUE OBJECT)

SET-PARENTS (NEW-VALUE OBJECT)

SET-STATES (NEW-VALUE OBJECT)

TABLE (OBJECT)

SETFTABLE (NEW-VALUE OBJECT)

TREE (OBJECT)

SETFTREE (NEW-VALUE OBJECT)

VARIABLE

Private

*CALCULATION-CONTEXT*

Used by with-calculation(-context) to define a limited caching environment.

*GCC-FORMAT-STRING*

String to pass to format. First arg is source, second is target.

*TEMPORARY-DIRECTORY*

Temporary work directory for C-based network compilation

CLASS

Public

Undocumented

INSTRUCTIONS

JOIN-TREE

NET (NODE/JOIN-TREE)

NODE (NAME/INDEX NET/JOIN-TREE)

Private

TRIE

A trie node.

Undocumented

CLUSTER

JT-NODE

POTENTIAL-CONTAINER

SEP-SET

CONSTANT

Private

Undocumented

+TRIE-HASH-THRESHOLD+