match-chunk

Class summary
matched-chunk inherits from chunk
Structure summary
intersection-tuple
map-frame
typed-var
Method summary
compatible-types type-1 type-2
embedding sub-program super-program &optional frame
equivalent-irl-programs? irl-program-1 irl-program-2
find-map-function a b &optional frame &key
make-s-expression-with-typed-vars thing
meaning-map-frame matched-chunk
print-object (var typed-var) stream
print-object (frame map-frame) stream
source-chunk matched-chunk
Function summary
copy-intersection-tuple intersection-tuple
copy-map-frame map-frame
copy-typed-var typed-var
expand-intersection-tuple tuple &key (extension-test (function surjective-function-frame))
extend-frame frame new-binding &key (extension-test (function function-frame))
find-intersection left-irl-network right-irl-network &key (extension-test (function surjective-function-frame))
function-frame frame new-binding
intersection-tuple-frame intersection-tuple
intersection-tuple-intersection intersection-tuple
intersection-tuple-left-irl-network intersection-tuple
intersection-tuple-p object
intersection-tuple-right-irl-network intersection-tuple
intersection-tuple-trash intersection-tuple
make-intersection-tuple &key left-irl-network right-irl-network intersection trash frame
make-map-frame &key bindings
make-typed-var &key name type
map-frame-bindings map-frame
map-frame-p object
match-chunk chunk meaning &key (notify t)
same-primitives irl-program-1 irl-program-2
surjective-function-frame frame new-binding
typed-var-name typed-var
typed-var-p object
typed-var-type typed-var
unify-irl-programs irl-program-1 irl-program-2
matched-chunk   inherits from chunk  [Class]
:meaning-map-frame    [Initarg]
:source-chunk    [Initarg]
meaning-map-frame    [Slot]

The map frame for the meaning returned by match-chunk

source-chunk    [Slot]

Pointer to the chunk used in the matching

source-chunk   matched-chunk  [Generic function]

Returns and (with setf) changes the source-chunk of the specified matched-chunk

meaning-map-frame   matched-chunk  [Generic function]

Returns and (with setf) changes the meaning-map-frame of the specified matched-chunk

typed-var    [Structure]
typed-var-type   typed-var  [Function]

Returns and (with setf) changes the type of the specified typed-var

typed-var-name   typed-var  [Function]

Returns and (with setf) changes the name of the specified typed-var

make-typed-var   &key name type  [Function]

Returns a newly created typed-var.

copy-typed-var   typed-var  [Function]

Returns a copy of the specified typed-var.

typed-var-p   object  [Function]

Returns T if the specified object is of type typed-var.

map-frame    [Structure]
map-frame-bindings   map-frame  [Function]

Returns and (with setf) changes the bindings of the specified map-frame

make-map-frame   &key bindings  [Function]

Returns a newly created map-frame.

copy-map-frame   map-frame  [Function]

Returns a copy of the specified map-frame.

map-frame-p   object  [Function]

Returns T if the specified object is of type map-frame.

intersection-tuple    [Structure]
intersection-tuple-frame   intersection-tuple  [Function]

Returns and (with setf) changes the frame of the specified intersection-tuple

intersection-tuple-trash   intersection-tuple  [Function]

Returns and (with setf) changes the trash of the specified intersection-tuple

intersection-tuple-intersection   intersection-tuple  [Function]

Returns and (with setf) changes the intersection of the specified intersection-tuple

intersection-tuple-right-irl-network   intersection-tuple  [Function]

Returns and (with setf) changes the right-irl-network of the specified intersection-tuple

intersection-tuple-left-irl-network   intersection-tuple  [Function]

Returns and (with setf) changes the left-irl-network of the specified intersection-tuple

make-intersection-tuple   &key left-irl-network right-irl-network intersection trash frame  [Function]

Returns a newly created intersection-tuple.

copy-intersection-tuple   intersection-tuple  [Function]

Returns a copy of the specified intersection-tuple.

intersection-tuple-p   object  [Function]

Returns T if the specified object is of type intersection-tuple.

*equivalent-irl-programs?-timer*    [Variable]
compatible-types   type-1 type-2  [Generic function]

When one type is is a subtype of the other, returns the subtype. E.g. compatible-types(integer,number)=integer

find-map-function   a b &optional frame &key  [Generic function]

A unification with type checking that does not add equalities to the right side

make-s-expression-with-typed-vars   thing  [Generic function]

Renders an irl program or a chunk into an s-expression where bind statements are replaced by typed variables

embedding   sub-program super-program &optional frame  [Generic function]

finds all map-frames for all possible mappings from sub-program to super-program

equivalent-irl-programs?   irl-program-1 irl-program-2  [Generic function]

Checks whether two irl programs are equivalent, that is they contain the same predicates and the variable links between them are the same

print-object   (var typed-var) stream  [Method]
print-object   (frame map-frame) stream  [Method]
extend-frame   frame new-binding &key (extension-test (function function-frame))  [Function]

Test if a new binding (i.e a (?var-1 . ?var-2) cons) can be added to a frame without violating any compatibility constraints. If so, the new frame is returned. If not, nil is returned. The compatibility constraint for map is that the frame is a function.

function-frame   frame new-binding  [Function]

frame = F, new-bindings = (a, b) F+ = F + {(a, b)} Suppose F is a function then F+ is a function iff for all (a', b') in F

surjective-function-frame   frame new-binding  [Function]

frame = F, new-bindings = (a, b) F+ = F + {(a, b)} Suppose F is a surjective function then F+ is a surjective function iff:

expand-intersection-tuple   tuple &key (extension-test (function surjective-function-frame))  [Function]
find-intersection   left-irl-network right-irl-network &key (extension-test (function surjective-function-frame))  [Function]
match-chunk   chunk meaning &key (notify t)  [Function]

Match a chunk with a meaning. Returns a list of chunks.

If no chunks are returned, the meaning does not match the chunk.

unify-irl-programs   irl-program-1 irl-program-2  [Function]

checks whether irl-program-1 is a sub-program of irl-program-2 and returns the bindings

same-primitives   irl-program-1 irl-program-2  [Function]