A unification library for Clojure.
A unification library for Clojure.
(extract-lvars form)
(extract-lvars lv-fn form)
Takes a datastructure and returns a distinct set of the logical variables found within.
Takes a datastructure and returns a distinct set of the logical variables found within.
(flatten-bindings binds)
(flatten-bindings variable? binds)
Flattens recursive bindings in the given map to the same ground (if possible).
Flattens recursive bindings in the given map to the same ground (if possible).
(make-occurs-subst-fn variable-fn)
Given a function to recognize unification variables, returns a function that will attempt to substitute unification bindings between two expressions. This function uses an 'occurs check' methodology for detecting cycles.
Given a function to recognize unification variables, returns a function that will attempt to substitute unification bindings between two expressions. This function uses an 'occurs check' methodology for detecting cycles.
(make-occurs-unifier-fn variable-fn)
Given a function to recognize unification variables, returns a function to perform the unification of two expressions. This function uses an 'occurs check' methodology for detecting cycles.
Given a function to recognize unification variables, returns a function to perform the unification of two expressions. This function uses an 'occurs check' methodology for detecting cycles.
(make-occurs-unify-fn variable-fn)
Given a function to recognize unification variables, returns a function to return a bindings map for two expressions. This function uses an 'occurs check' methodology for detecting cycles.
Given a function to recognize unification variables, returns a function to return a bindings map for two expressions. This function uses an 'occurs check' methodology for detecting cycles.
(make-subst-fn variable-fn)
Given a function to recognize unification variables, returns a function that will attempt to substitute unification bindings between two expressions.
Given a function to recognize unification variables, returns a function that will attempt to substitute unification bindings between two expressions.
(make-unifier-fn variable-fn)
Given a function to recognize unification variables, returns a function to perform the unification of two expressions.
Given a function to recognize unification variables, returns a function to perform the unification of two expressions.
(make-unify-fn variable-fn)
Given a function to recognize unification variables, returns a function to return a bindings map for two expressions.
Given a function to recognize unification variables, returns a function to return a bindings map for two expressions.
(subst expression bindings)
Attempts to substitute the bindings in the appropriate locations in the given expression.
Attempts to substitute the bindings in the appropriate locations in the given expression.
(unifier expression1 expression2)
Attempts the entire unification process from garnering the bindings to substituting the appropriate bindings. Note: This function is implemented with an occurs-check.
Attempts the entire unification process from garnering the bindings to substituting the appropriate bindings. Note: This function is implemented with an occurs-check.
(unifier- expression1 expression2)
Attempts the entire unification process from garnering the bindings to substituting the appropriate bindings. Note: This function is implemented without an occurs-check.
Attempts the entire unification process from garnering the bindings to substituting the appropriate bindings. Note: This function is implemented **without** an occurs-check.
(unify expression1 expression2)
Attempt to unify x and y with the given bindings (if any). Potentially returns a map of the
unifiers (bindings) found. Will throw an IllegalStateException
if the expressions
contain a cycle relationship. Will also throw an IllegalArgumentException
if the
sub-expressions clash. Note: This function is implemented with an occurs-check.
Attempt to unify x and y with the given bindings (if any). Potentially returns a map of the unifiers (bindings) found. Will throw an `IllegalStateException` if the expressions contain a cycle relationship. Will also throw an `IllegalArgumentException` if the sub-expressions clash. Note: This function is implemented with an occurs-check.
(unify- expression1 expression2)
Attempt to unify x and y with the given bindings (if any). Potentially returns a map of the
unifiers (bindings) found. Will throw an IllegalStateException
if the expressions
contain a cycle relationship. Will also throw an IllegalArgumentException
if the
sub-expressions clash. Note: This function is implemented without an occurs-check.
Attempt to unify x and y with the given bindings (if any). Potentially returns a map of the unifiers (bindings) found. Will throw an `IllegalStateException` if the expressions contain a cycle relationship. Will also throw an `IllegalArgumentException` if the sub-expressions clash. Note: This function is implemented **without** an occurs-check.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close