chunk

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
chunk    [Class]

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

score   chunk  [Generic function]

Returns and (with setf) changes the score of the specified chunk

open-vars   chunk  [Generic function]

Returns and (with setf) changes the open-vars of the specified chunk

target-var   chunk  [Generic function]

Returns and (with setf) changes the target-var of the specified chunk

irl-program   chunk  [Generic function]

Returns and (with setf) changes the irl-program of the specified chunk

id   chunk  [Generic function]

Returns and (with setf) changes the id of the specified chunk

substitute-variables   thing substitutions  [Generic function]

Substitutes variables in thing. Substitutions is an association list. The result is a new structure with unsubstituted symbols eq to those in thing

combine-chunk-program   chunk other-chunk  [Generic function]
print-object   (chunk chunk) stream  [Method]
copy-object   (chunk chunk)  [Method]
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

create-chunks-from-primitives   primitive-ids &key (score 0.5) (chunk-class (quote chunk))  [Function]

Creates chunks from primitives

get-unconnected-vars   irl-program  [Function]
get-target-var   irl-program  [Function]
get-open-vars   irl-program  [Function]
create-chunk-from-irl-program   irl-program &key (chunk-class (quote chunk)) (id (irl-program->id irl-program)) (score 0.5) (target-var nil)  [Function]
expand-chunks   irl-program ontology &optional already-expanded-symbols  [Function]
combine-chunk-call-pattern   chunk other-chunk  [Function]

Adds the call pattern of another chunk when the target variable of that chunk is compatble with an open variable

recombine-open-variables   chunk  [Function]

Tries to account for open variables of 'chunk' by using primitives that are already in the irl program. Returns all possible solutions.

link-open-variables   chunk  [Function]

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.

add-bind-statement-for-open-var-to-chunk   chunk bind-statement  [Function]

Adds a bind statement to a chunk and removes the variable from the open vars. Returns nil when this was not possible

irl-program->title   program &key (for-html t)  [Function]

creates flat string description of the primitives used in an irl program

irl-program->id   program &optional (max-number-of-letters 10)  [Function]

creates a symbol representing the primitives used