Class summary | |
---|---|
chunk |
Method summary | |
---|---|
combine-chunk-program | chunk other-chunk |
copy-object | (chunk chunk) |
id | chunk |
irl-program | chunk |
open-vars | chunk |
print-object | (chunk chunk) stream |
score | chunk |
substitute-variables | thing substitutions |
target-var | chunk |
Function summary | |
---|---|
add-bind-statement-for-open-var-to-chunk | chunk bind-statement |
combine-chunk-call-pattern | chunk other-chunk |
create-chunk-from-irl-program | irl-program &key (chunk-class (quote chunk)) (id (irl-program->id irl-program)) (score 0.5) (target-var nil) |
create-chunk-from-primitive | primitive-id &key (score 0.5) (chunk-class (quote chunk)) chunk-id target-var-is-open-var |
create-chunks-from-primitives | primitive-ids &key (score 0.5) (chunk-class (quote chunk)) |
expand-chunks | irl-program ontology &optional already-expanded-symbols |
get-open-vars | irl-program |
get-target-var | irl-program |
get-unconnected-vars | irl-program |
irl-program->id | program &optional (max-number-of-letters 10) |
irl-program->title | program &key (for-html t) |
link-open-variables | chunk |
recombine-open-variables | chunk |
A chunk is an irl program with an explicit target and open variables
:id | [Initarg] |
:irl-program | [Initarg] |
:target-var | [Initarg] |
:open-vars | [Initarg] |
:score | [Initarg] |
irl-program | [Slot] |
the s-expression representation of the irl program
target-var | [Slot] |
A (?variable . type) cons for the target for the chunk
open-vars | [Slot] |
A list of (?variable . type) conses for the open variables
score | [Slot] |
A score for the chunk
Returns and (with setf) changes the open-vars of the specified chunk
Returns and (with setf) changes the target-var of the specified chunk
Returns and (with setf) changes the irl-program of the specified chunk
Substitutes variables in thing. Substitutions is an association list. The result is a new structure with unsubstituted symbols eq to those in thing
create-chunk-from-primitive | primitive-id &key (score 0.5) (chunk-class (quote chunk)) chunk-id target-var-is-open-var | [Function] |
Creates a chunk from a primitive by making the variable of the first slot the target variable and all other variables open variables
Creates chunks from primitives
Adds the call pattern of another chunk when the target variable of that chunk is compatble with an open variable
Tries to account for open variables of 'chunk' by using primitives that are already in the irl program. Returns all possible solutions.
Tries to make two open variables of compatible type equal and when it does, reduces the number of open variables of the chunk by one.
Adds a bind statement to a chunk and removes the variable from the open vars. Returns nil when this was not possible
creates flat string description of the primitives used in an irl program