Port of core.unify to ClojureCLR
Clojure
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs/release-notes
src
README.md
epl-v10.html
pom.xml

README.md

This is a port of the clojure.core.unify library to ClojureCLR. The clojure.core.unify project is at https://github.com/clojure/core.unify. That project contains the following notice:

License

Copyright © 2011 Rich Hickey

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

This project copies extensively from that codebase. Edits and inclusions are marked in an obvious manner. This project is

Copyright (c) Robert Johnson, 2012.

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

This project copies extensively from that codebase. Edits and inclusions are marked in an obvious manner. This project is

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