I am experimenting with core.logic and want to include my own custom data type to participate in logical expressions:
(deftype Expression [node vars]
....)
This is basically a node in a mathematical expression tree containing a node tree and a set of unrelated variables. nodeis either a constant, or a symbol, or a (Operator Expression Expression....)node tree . I would like to be able to use core.logic to manage mathematical expressions and map them to subtrees of such expressions.
How can I do this if possible?
I see from the source code core.logic, there are many protocols , that look as if they were good for expansion (eg IUnifyTerms, IReifyTermsetc.), but it is not clear how they are intended to be used, and which ones I really need to expand.
source
share