Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Unification library
Clojure

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
docs/release-notes
src
.gitignore
README.md
epl-v10.html
pom.xml

README.md

clojure.core.unify

core.unify is a Clojure contrib library providing the following features:

  • Factory functions for constructing unification binding, subst, and unification functions, with or without occurs checking

  • Packaged functions for unification binding, subst, and unification functions, with or without occurs checking, recognizing variables tagged as symbols prefixed with ? characters

core.unify is based on a library named Unifycle, found at http://github.com/fogus/unifycle that has been deprecated.

more information

Example

(unifier '((?a * ?x ** 2) + (?b * ?x) + ?c) 
         '(?z + (4 * 5) + 3))

;=> ((?a * 5 ** 2) + (4 * 5) + 3)

Getting core.unify

You can use core.unify in your Leiningen and Cake projects with the following :dependencies directive in your project.clj file:

[org.clojure/core.unify "0.5.2"]

For Maven-driven projects, use the following slice of XML in your pom.xml's <dependencies> section:

<dependency>
  <groupId>org.clojure</groupId>
  <artifactId>core.unify</artifactId>
  <version>0.5.2</version>
</dependency>

Enjoy!

Places

Plans and ideas

The following capabilities are under design, development, or consideration for future versions of core.unify:

  • High-performant unification based on unrolling recursive backtracking into polymorphic calls
  • Iterative unification option
  • Boolean unification
  • Implicit variable recognition option(s)
  • More examples
  • More documentation

More planning is needed around capabilities not listed nor thought of.

References

License

Copyright © 2011 Rich Hickey

Licensed under the EPL. (See the file epl.html.)

Something went wrong with that request. Please try again.