shen/release/test_programs/semantic_net.shen in shen-ruby-0.12.1 vs shen/release/test_programs/semantic_net.shen in shen-ruby-0.13.0

- old
+ new

@@ -1,44 +1,44 @@ -(define query - [is Object Concept] -> (if (belongs? Object Concept) yes no)) - -(define belongs? - Object Concept -> (element? Concept (fix spread-activation [Object]))) - -(define spread-activation - [] -> [] - [Vertex | Vertices] -> (union (accessible-from Vertex) - (spread-activation Vertices))) - -(define accessible-from - Vertex -> [Vertex | (union (is_links Vertex) (type_links Vertex))]) - -(define is_links - Vertex -> (get-prop Vertex is_a [])) - -(define type_links - Vertex -> (get-prop Vertex type_of [])) - -(define assert - [Object is_a Type] -> (put Object is_a [Type | (is_links Object)]) - [Type1 type_of Type2] -> (put Type1 type_of [Type2 | (type_links Type1)])) - -(define get-prop - Ob Pointer Default -> (trap-error (get Ob Pointer) (/. E Default))) - -(define clear - Ob -> (put Ob is_a (put Ob type_of []))) - - - - - - - - - - - - - - - +(define query + [is Object Concept] -> (if (belongs? Object Concept) yes no)) + +(define belongs? + Object Concept -> (element? Concept (fix spread-activation [Object]))) + +(define spread-activation + [] -> [] + [Vertex | Vertices] -> (union (accessible-from Vertex) + (spread-activation Vertices))) + +(define accessible-from + Vertex -> [Vertex | (union (is_links Vertex) (type_links Vertex))]) + +(define is_links + Vertex -> (get-prop Vertex is_a [])) + +(define type_links + Vertex -> (get-prop Vertex type_of [])) + +(define assert + [Object is_a Type] -> (put Object is_a [Type | (is_links Object)]) + [Type1 type_of Type2] -> (put Type1 type_of [Type2 | (type_links Type1)])) + +(define get-prop + Ob Pointer Default -> (trap-error (get Ob Pointer) (/. E Default))) + +(define clear + Ob -> (put Ob is_a (put Ob type_of []))) + + + + + + + + + + + + + + +