 
     ;; rewrite clauses
     (doseq [[rule-id clauses] @rule-id->clauses]
-      (doseq [[_ clause-type clause-id name] clauses]
+      (doseq [[_ clause-type clause-id name] clauses
+              :when (not #{"constant=" "variable=" "function="} name)]
         (let [fields (get @clause-id->fields clause-id)
               var->key (atom {})]
           (doseq [[_ field-type key val] fields]

                                                       ix-a (get var->ix variable-a)
                                                       ix-b (get var->ix variable-b)]
                                                   [(btree/equal) #js [ix-a ix-b]])
                                     (let [clause-vars&keys (sort-by (fn [[val key]] (var->ix val))
                                                                     (for [[_ field-type key val] fields]
                                                                       [val key]))


(.get-or-create-index kn "know" "connected" #js ["x" "y"])

(.add-facts kn "know" "clauses" #js ["rule-id" "when|know|remember|forget" "clause-id" "name"] #js [#js ["x-function-edge" "when" "get-function-edge" "edge"]
                                                                                                    #js ["x-function-edge" "when" "make-str" "=function"]
                                                                                                    #js ["x-function-edge" "know" "know-str" "str-edge"]])

(.add-facts kn "know" "clause-fields" #js ["clause-id" "constant|variable" "key" "val"] #js [#js ["get-function-edge" "variable" "x" "xx"]
                                                                                             #js ["get-function-edge" "variable" "y" "yy"]
                                                                                             #js ["make-str" "variable" "variable" "zz"]
                                                                                             #js ["make-str" "constant" "js" "\"edge \" + xx + \" \" + yy"]
                                                                                             #js ["know-str" "variable" "name" "zz"]])

(.run (nth (compile kn) 2) kn)

(.get-or-create-index kn "know" "str-edge" #js ["name"])
