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 |
: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
Returns and (with setf) changes the type of the specified typed-var
Returns and (with setf) changes the frame of the specified intersection-tuple
Returns and (with setf) changes the trash of the specified intersection-tuple
Returns and (with setf) changes the intersection of the specified intersection-tuple
Returns and (with setf) changes the right-irl-network of the specified intersection-tuple
Returns a newly created intersection-tuple.
Returns a copy of the specified intersection-tuple.
When one type is is a subtype of the other, returns the subtype. E.g. compatible-types(integer,number)=integer
A unification with type checking that does not add equalities to the right side
Renders an irl program or a chunk into an s-expression where bind statements are replaced by typed variables
finds all map-frames for all possible mappings from sub-program to super-program
Checks whether two irl programs are equivalent, that is they contain the same predicates and the variable links between them are the same
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.
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
frame = F, new-bindings = (a, b) F+ = F + {(a, b)} Suppose F is a surjective function then F+ is a surjective function iff:
Match a chunk with a meaning. Returns a list of chunks.
If no chunks are returned, the meaning does not match the chunk.
checks whether irl-program-1 is a sub-program of irl-program-2 and returns the bindings